1 2012-11-21 Eli Zaretskii <eliz@gnu.org>
3 * indent.c (Fvertical_motion): If the starting position is covered
4 by a display string, return to one position before that, to avoid
5 overshooting it inside move_it_to. (Bug#12930)
7 2012-11-20 Daniel Colascione <dancol@dancol.org>
9 * w32fns.c (Fx_file_dialog):
10 (Fx_file_dialog): Accomodate rename of cygwin_convert_path* to
11 cygwin_convert_file_name*.
13 * cygw32.c (Fcygwin_convert_path_to_windows, syms_of_cygw32):
14 Rename cygwin_convert_path* to cygwin_convert_file_name*.
16 2012-11-20 Ken Brown <kbrown@cornell.edu>
18 * emacs.c (main): Set the G_SLICE environment variable for all
19 Cygwin builds, not just GTK builds. See
20 https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00368.html.
22 2012-11-19 Eli Zaretskii <eliz@gnu.org>
24 * xdisp.c (start_hourglass) [HAVE_NTGUI]: Don't mix declaration of
25 w32_note_current_window with code. (Backport from trunk.)
27 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
28 (FILE_ANY_ACCESS, CTL_CODE, FSCTL_GET_REPARSE_POINT) [_MSC_VER]:
29 Define for the MSVC compiler.
31 * w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing
34 2012-11-18 Eli Zaretskii <eliz@gnu.org>
36 * fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
37 (Fexpand_file_name) [DOS_NT]: Pass encoded file name to
38 dostounix_filename. Prevents crashes down the road, because
39 dostounix_filename assumes it gets a unibyte string. Reported by
40 Michel de Ruiter <michel@sentient.nl>, see
41 http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html
43 2012-11-17 Eli Zaretskii <eliz@gnu.org>
45 * w32select.c: Include w32common.h before w32term.h, so that
46 windows.h gets included before w32term.h uses some of its
49 * w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]: New
51 (EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]: New
53 (EnumSystemLocales) [_MSC_VER]: Define if undefined. (Bug#12878)
55 2012-11-17 Jan Djärv <jan.h.d@swipnet.se>
57 * nsterm.m (hold_event): Set send_appdefined to YES (Bug#12834).
58 (ns_select): Return at once if events are held (Bug#12834).
60 2012-11-16 enami tsugutomo <tsugutomo.enami@jp.sony.com>
62 * unexelf.c (ELFSIZE) [__NetBSD__ && _LP64]: Set to 64.
63 Needed following 2012-10-20 change. (Bug#12902)
65 2012-11-16 Glenn Morris <rgm@gnu.org>
67 * editfns.c (Fmessage): Mention message-log-max. (Bug#12849)
69 2012-11-15 Stefan Monnier <monnier@iro.umontreal.ca>
71 * eval.c (Finteractive_p): Revert lexbind-merge mishap.
73 2012-11-14 Eli Zaretskii <eliz@gnu.org>
75 * w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread
76 use the same value of thread handle.
77 (start_timer_thread): If the timer thread exited (due to error),
78 clean up by closing the two handles it used. Duplicate the caller
79 thread's handle here, so it gets duplicated only once, when
80 launching the timer thread. Set priority of the timer thread, not
82 (getitimer): Don't duplicate the caller thread's handle here.
85 2012-11-13 Jan Djärv <jan.h.d@swipnet.se>
87 * nsterm.m (hold_event): Send SIGIO to make sure ns_read_socket is
90 2012-11-12 Eli Zaretskii <eliz@gnu.org>
92 * xdisp.c (decode_mode_spec): Limit the value of WIDTH argument
93 passed to pint2str and pint2hrstr to be at most the size of the
94 frame's decode_mode_spec_buffer. This avoids crashes with very
95 large values of FIELD_WIDTH argument to decode_mode_spec.
98 2012-11-07 Martin Rudalics <rudalics@gmx.at>
100 * window.c (Fsplit_window_internal): Set combination limit of
101 new parent window to t iff Vwindow_combination_limit is t;
102 fixing a regression introduced with the change from 2012-09-22.
103 (Fwindow_combination_limit, Fset_window_combination_limit):
106 2012-11-06 Eli Zaretskii <eliz@gnu.org>
108 * xdisp.c (try_scrolling): Fix correction of aggressive-scroll
109 amount when the scroll margins are too large. When scrolling
110 backwards in the buffer, give up if cannot reach point or the
111 scroll margin within a reasonable number of screen lines.
112 Fixes point position in window under scroll-up/down-aggressively when
113 point is positioned many lines beyond the window top/bottom.
116 2012-11-05 Eli Zaretskii <eliz@gnu.org>
118 * ralloc.c (relinquish): If real_morecore fails to return memory
119 to the system, don't crash; instead, leave the last heap
120 unchanged and return. (Bug#12774)
122 2012-11-03 Eli Zaretskii <eliz@gnu.org>
124 * lisp.mk: Adjust comments to the fact that term/internal is now
125 loaded from loadup.el.
127 * msdos.c (msdos_abort): Rename from emacs_abort, and make static.
128 (msdos_fatal_signal): New function.
129 (XMenuActivate): Adjust the call to kbd_buffer_events_waiting to
132 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Define to "inline"
133 for GCC versions before 4.
134 (emacs_raise): Define to call msdos_fatal_signal.
136 * xdisp.c (init_from_display_pos): Fix initialization of the bidi
137 iterator when starting in the middle of a display or overlay
140 2012-11-03 Jan Djärv <jan.h.d@swipnet.se>
142 * widget.c (resize_cb): New function.
143 (EmacsFrameRealize): Add resize_cb as event handler (Bug#12733).
144 (EmacsFrameResize): Check if all is up to date before changing frame
147 2012-11-01 Eli Zaretskii <eliz@gnu.org>
149 * w32proc.c (getpgrp, setpgid): New functions. (Bug#12776)
151 2012-10-31 Paul Eggert <eggert@cs.ucla.edu>
153 Fix crash when using Emacs as commit editor for git (Bug#12697).
154 * callproc.c (setpgrp): Remove macro, as we now use setpgid
155 and it is configured in conf_post.h.
156 (Fcall_process): Don't invoke both setsid and setpgid; the former
157 is enough, if it exists.
158 * callproc.c (Fcall_process, child_setup):
159 * process.c (create_process): Use setpgid.
160 * conf_post.h (setpgid) [!HAVE_SETPGID]: New macro, which substitutes
162 * dispnew.c (init_display): Initialize the foreground group
163 if we are running a tty display.
164 * emacs.c (main): Do not worry about setpgrp; init_display does it now.
165 * lisp.h (init_foreground_group): New decl.
166 * sysdep.c (inherited_pgroup): New static var.
167 (init_foreground_group, tcsetpgrp_without_stopping)
168 (narrow_foreground_group, widen_foreground_group): New functions.
169 (init_sys_modes): Narrow foreground group.
170 (reset_sys_modes): Widen foreground group.
172 2012-10-31 Michael Albinus <michael.albinus@gmx.de>
174 * dbusbind.c: Fix cut'n'waste error. Use HAVE_DBUS_VALIDATE_INTERFACE.
176 2012-10-31 Martin Rudalics <rudalics@gmx.at>
178 * minibuf.c (read_minibuf): Restore current buffer since
179 choose_minibuf_frame calling Fset_frame_selected_window may
180 change it (Bug#12766).
182 2012-10-30 Jan Djärv <jan.h.d@swipnet.se>
184 * frame.c (Fframe_pixel_height): Fix documentation (Bug#12733).
186 2012-10-30 Kenichi Handa <handa@gnu.org>
188 * font.c (Ffont_at): If WINDOW is specified and it is not
189 displaying the current buffer, signal an error.
191 2012-10-29 Daniel Colascione <dancol@dancol.org>
193 * cygw32.h, cygw32.c (Qutf_16le, from_unicode, to_unicode):
194 In preparation for fixing bug#12739, move these functions from
197 * coding.h, coding.c: ... to here, and compile them only when
198 WINDOWSNT or CYGWIN. Moving these functions out of cygw32 proper
199 lets us write cygw32-agnostic code for the HAVE_NTGUI case.
201 2012-10-28 Eli Zaretskii <eliz@gnu.org>
203 * w32proc.c (TIMER_TICKS_PER_SEC): New macro.
204 (timer_loop, getitimer, setitimer): Use it instead of
205 CLOCKS_PER_SEC, which is no longer pertinent, since we don't use
207 (w32_get_timer_time): Use 10*TIMER_TICKS_PER_SEC instead of a
210 2012-10-28 Jan Djärv <jan.h.d@swipnet.se>
212 * nsterm.m (NO_APPDEFINED_DATA): New define.
213 (last_appdefined_event_data): New variable
214 (last_appdefined_event): Remove.
215 (ns_select): Initialize t from last_appdefined_event_data instead
216 of [last_appdefined_event data1].
217 (sendEvent:): Save [theEvent data1] to last_appdefined_event_data,
218 remove last_appdefined_event (Bug#12698).
220 2012-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
222 * frame.c (x_set_font): Catch internal error.
224 2012-10-27 Eli Zaretskii <eliz@gnu.org>
226 Avoid overflow in w32 implementation of interval timers.
227 When possible, for ITIMER_PROF count only times the main thread
229 * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
230 'volatile ULONGLONG' types. All the other data which was
231 previously clock_t is now ULONGLONG. 'terminate' is 'volatile int'.
232 (GetThreadTimes_Proc): New typedef.
233 (w32_get_timer_time): New function, returns a suitable time value
235 (timer_loop): Enter critical section when accessing ULONGLONG
236 values of the itimer_data struct, as these accesses are no longer
237 atomic. Call 'w32_get_timer_time' instead of 'clock'.
238 Remove unused variable.
239 (init_timers): Initialize s_pfn_Get_Thread_Times.
240 (start_timer_thread): Don't assign itimer->caller_thread here.
241 (getitimer): Assign itimer->caller_thread here.
242 (setitimer): Always call getitimer to get the value of ticks_now.
243 (sys_spawnve): Avoid compiler warning about format mismatch.
245 2012-10-26 Eli Zaretskii <eliz@gnu.org>
247 * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of
248 mouse movement events if the menu bar is active. This avoids
249 producing a busy "hour-glass" cursor by Windows if the mouse
250 pointer is positioned over a tooltip shown for some menu item.
252 2012-10-25 Paul Eggert <eggert@cs.ucla.edu>
254 Don't assume process IDs fit in int.
255 * emacs.c (shut_down_emacs) [!DOS_NT]:
256 * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
257 * term.c (dissociate_if_controlling_tty) [!DOS_NT]:
258 Use pid_t, not int, to store process IDs, as 'int'
259 is not wide enough on a few platforms (e.g., AIX and IRIX).
261 2012-10-23 Kenichi Handa <handa@gnu.org>
263 The following change is to make face-font-rescale-alist work
264 correctly for non-ASCII fonts.
266 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
267 (font_open_for_lface): Handle Vface_font_rescale_alist.
269 2012-10-23 Chong Yidong <cyd@gnu.org>
271 * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
273 2012-10-21 Jan Djärv <jan.h.d@swipnet.se>
275 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
277 (nsfont_draw): Turn off LCD-smoothing (Bug#11484).
279 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
282 2012-10-21 Glenn Morris <rgm@gnu.org>
284 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
286 2012-10-20 Paul Eggert <eggert@cs.ucla.edu>
289 * frame.c (Fmouse_position, Fmouse_pixel_position):
290 * xdisp.c (produce_stretch_glyph):
291 Declare local vars only when they're needed.
292 This is clearer and avoids a warning on OpenBSD about unused vars.
293 * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
294 This is safer, and avoids OpenBSD warnings about unused vars.
295 * keyboard.c (record_menu_key): Remove unnecessary decl.
296 (poll_timer): Define only if POLL_FOR_INPUT is defined.
297 * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
298 as our definition clashes with OpenBSD's.
299 * xfaces.c (load_face_colors, check_lface_attrs)
300 (get_lface_attributes_no_remap, get_lface_attributes)
301 (lface_fully_specified_p, x_supports_face_attributes_p)
302 (tty_supports_face_attributes_p, face_fontset, realize_face)
303 (realize_x_face, realize_tty_face):
304 Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
305 merely Lisp_Object *. This is more informative and avoids
306 a warning on OpenBSD about accessing beyond an object's size.
308 2012-10-20 Chong Yidong <cyd@gnu.org>
310 * lread.c (Fload): Doc fix (Bug#12592).
312 2012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
314 * font.c (Ffont_at): Fix previous change.
316 2012-10-19 Eli Zaretskii <eliz@gnu.org>
318 * puresize.h (BASE_PURESIZE): Bump the base value to 1700000.
319 See http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
322 * alloc.c (NSTATICS): Decrease to 0x800.
324 2012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
326 * fns.c (Fnreverse): Include the problem element when signalling an
329 2012-10-18 Jan Djärv <jan.h.d@swipnet.se>
331 * nsterm.m (ns_select): Check writefds before call to
332 FD_ISSET (Bug#12668).
334 2012-10-18 Daniel Colascione <dancol@dancol.org>
336 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000
337 (staticpro): If we run out of staticpro slots, die with an
338 informative error instead of just calling emacs_abort.
340 2012-10-18 Martin Rudalics <rudalics@gmx.at>
342 Fix two flaws reported by Dmitry Antipov.
343 * window.c (Ftemp_output_buffer_show): Remove.
344 (Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
345 (syms_of_window): Remove defsubr for Stemp_output_buffer_show.
347 2012-10-17 Eli Zaretskii <eliz@gnu.org>
349 * makefile.w32-in ($(BLD)/w32.$(O)):
350 ($(BLD)/vm-limit.$(O)):
352 ($(BLD)/unexw32.$(O)):
353 ($(BLD)/fileio.$(O)):
354 ($(BLD)/dispnew.$(O)): Update dependencies.
356 * w32term.h (w32_initialize_display_info, initialize_w32_display):
359 * w32proc.c: Include ctype.h.
361 * w32.h (init_environment, check_windows_init_file)
362 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
363 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
364 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
365 (sys_link): Add prototypes.
367 * w32.c: Include w32select.h.
368 (sys_access, e_malloc, sys_select): Add prototypes.
369 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
371 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
373 * unexw32.c: Include lisp.h and w32.h.
375 * term.c [WINDOWSNT]: Include w32term.h.
377 * process.c [WINDOWSNT]: Add prototype of sys_select.
379 * fileio.c [WINDOWSNT]: Include w32.h.
381 * dispnew.c [WINDOWSNT]: Include w32.h.
383 * cygw32.c (Fcygwin_convert_path_to_windows)
384 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
385 Lisp_Object values. (Bug#12661)
387 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
388 to Lisp_Object. (Bug#12661)
390 2012-10-17 Kenichi Handa <handa@gnu.org>
392 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
395 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
397 * buffer.c (Fkill_buffer): When unchaining the marker,
398 reset its buffer pointer to NULL (Bug#12652).
400 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
402 Do not verify indirection counters of killed buffers (Bug#12579).
403 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
404 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
406 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
408 * alloc.c (Fmake_byte_code): Fix typo in comment.
409 * print.c (print_interval): Define as static to match prototype.
410 * indent.c (disptab_matches_widthtab, recompute_width_table):
413 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
415 * editfns.c (get_system_name): Remove.
416 * lisp.h (get_system_name): Remove prototype.
417 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
418 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
420 2012-10-15 Daniel Colascione <dancol@dancol.org>
422 * dbusbind.c: Add comment explaining reason for previous change.
424 2012-10-15 Martin Rudalics <rudalics@gmx.at>
426 * window.c (Fwindow_end): Rewrite check whether cached position
427 can be used (Bug#12600).
428 (resize_frame_windows, grow_mini_window, shrink_mini_window):
429 Set windows_or_buffers_changed.
431 2012-10-15 Daniel Colascione <dancol@dancol.org>
433 * dbusbind.c: Fix cygw32 build break when compiling with dbus
434 enabled by undefining the symbol "interface", which the platform
435 headers define to something incompatible.
437 2012-10-14 Daniel Colascione <dancol@dancol.org>
439 * image.c (init_tiff_functions, init_imagemagick_functions)
440 (init_svg_functions): Fix cygw32 build break by using these
441 functions only when WINDOWSNT _and_ HAVE_NTGUI.
443 2012-10-14 Jan Djärv <jan.h.d@swipnet.se>
445 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
447 2012-10-13 Jan Djärv <jan.h.d@swipnet.se>
449 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
451 2012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
453 * coding.c (detect_coding): Set coding->id before calling
456 2012-10-13 Andreas Schwab <schwab@linux-m68k.org>
458 * fileio.c: Formatting fixes.
460 2012-10-13 Paul Eggert <eggert@cs.ucla.edu>
462 Fix some stat-related races.
463 * fileio.c (Fwrite_region): Avoid race condition if a file is
464 removed or renamed by some other process immediately after Emacs
465 writes it but before Emacs stats it. Do not assume that stat (or
467 * image.c (slurp_file): Resolve the file name with fopen + fstat
468 rather than stat + fopen.
469 (pbm_read_file) [0]: Remove unused code with stat race.
470 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
471 Remove ineffective code with stat race.
473 2012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
475 * doc.c (get_doc_string): Don't signal an error if the file is missing.
477 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
479 * nsterm.m (hold_event_q): New static variable.
480 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
482 (hold_event): New function.
483 (ns_read_socket): If hold_event_q have events, store them and
485 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
488 2012-10-12 Juanma Barranquero <lekktu@gmail.com>
490 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
492 2012-10-12 Eli Zaretskii <eliz@gnu.org>
494 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
496 * fileio.c (check_existing): New function.
497 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
498 instead of calling 'stat', when what's needed is to check whether
499 a file exists. This avoids expensive system calls on MS-Windows.
502 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
504 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
505 determine whether a file exists and is not a directory.
507 * lisp.h (check_existing): Add prototype.
509 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
511 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
513 2012-10-12 Glenn Morris <rgm@gnu.org>
515 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
517 2012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
519 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
521 * eval.c (Fautoload): Remember previous autoload status in load-history.
523 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
525 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
526 * lread.c (load_each_byte, new_backquote_flag, readchar)
527 (read_filtered_event, lisp_file_lexically_bound_p)
528 (safe_to_load_version, Fload, complete_filename_p, openp)
529 (build_load_history, readevalloop, read_escape, read1)
530 (string_to_number, read_vector, read_list):
531 * macros.c (Fstart_kbd_macro):
532 * marker.c (CONSIDER):
533 * menu.c (parse_single_submenu, digest_single_submenu)
534 (find_and_return_menu_selection, Fx_popup_menu):
535 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
537 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
539 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
540 (xmenu_show, xdialog_show):
541 Use bool for booleans.
542 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
543 as it's not a predicate. All uses changed. Omit unnecessary
546 2012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
548 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
549 (save_excursion_restore): Do not restore mark if it was not saved.
551 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
553 * marker.c (cached_modiff): EMACS_INT, not int.
555 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
556 instead of having a wrong decl.
557 * nsmenu.m (waiting_for_input): Remove wrong decl.
559 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
561 keyboard.c, keymap.c: Use bool for booleans.
562 * dispnew.c (sit_for): Distinguish between 3-way display_option
563 and boolean do_display.
564 * keyboard.c (single_kboard, this_command_key_count_reset)
565 (waiting_for_input, echoing, immediate_quit, input_pending)
566 (interrupt_input, interrupts_deferred, pop_kboard)
567 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
568 (command_loop_1, adjust_point_for_property)
569 (safe_run_hooks_error, input_polling_used, read_char):
570 (help_char_p, readable_events, kbd_buffer_events_waiting)
571 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
572 (lucid_event_type_list_p, get_input_pending):
573 (gobble_input, menu_separator_name_p, menu_bar_item)
574 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
575 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
576 (keyremap_step, test_undefined, read_key_sequence)
577 (detect_input_pending, detect_input_pending_ignore_squeezables)
578 (detect_input_pending_run_timers, requeued_events_pending_p)
579 (quit_throw_to_read_char, Fset_input_interrupt_mode):
580 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
581 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
582 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
583 (accessible_keymaps_1, Fkey_description, push_key_description):
584 (shadow_lookup, struct where_is_internal_data)
585 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
586 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
587 (describe_map, describe_vector):
588 * menu.c (single_menu_item):
589 * nsmenu.m (ns_update_menubar):
590 * process.c (wait_reading_process_output):
591 * search.c (scan_buffer, scan_newline):
592 Use bool for boolean.
593 * keyboard.c (timers_run, swallow_events)
594 (detect_input_pending_run_timers):
595 * process.c (wait_reading_process_output):
596 Use unsigned for counter where wraparound-on-overflow is desired,
597 since unsigned is guaranteed to have that behavior and signed is not.
598 (read_char): Use ptrdiff_t for string length.
599 (get_input_pending): Remove first argument, since it was always
600 the same pointer-to-int (now pointer-to-boolean) &input_pending,
601 and behave as if it had that value. Return new value of
602 input_pending. All callers changed.
603 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
604 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
606 * keymap.c (push_key_description): Omit last arg, which was always 1.
609 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
611 2012-10-10 Juanma Barranquero <lekktu@gmail.com>
613 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
614 ($(BLD)/term.$(O)): Update dependencies.
616 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
618 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
619 * lisp.h (enum pvec_type): Adjust comments and omit explicit
620 initializer for PVEC_NORMAL_VECTOR.
622 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
624 Clean out old termopts cruft.
625 * termopts.h (flow_control, meta_key): Remove unused decls.
626 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
627 Don't include termopts.h.
629 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
631 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
633 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
635 * commands.h (immediate_quit): Remove duplicate decl.
637 2012-10-09 Jan Djärv <jan.h.d@swipnet.se>
639 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
641 (nsfont_open): Remove setting of Vfonts_in_cache.
642 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
644 2012-10-09 Eli Zaretskii <eliz@gnu.org>
646 * w32fns.c (w32_last_error): Change the return value to DWORD, to
647 match what GetLastError returns. Explain why the function is
650 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
651 'is_tooltip_frame', to avoid confusion with its global namesake.
653 2012-10-08 Daniel Colascione <dancol@dancol.org>
655 * xdisp.c (start_hourglass): Call w32_note_current_window when
656 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
657 build that caused Emacs to display the hourglass cursor forever.
659 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
660 which is broken under remote desktop, calculate the number of
661 colors available for a display based on the display's number of
662 planes and number of bits per pixel per plane. (bug#10397).
664 2012-10-08 Jan Djärv <jan.h.d@swipnet.se>
666 * nsfont.m (Vfonts_in_cache): New variable.
667 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
668 are used. Add cached fonts to Vfonts_in_cache.
669 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
671 2012-10-08 Juanma Barranquero <lekktu@gmail.com>
673 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
675 (FONT_H): Define after FRAME_H.
676 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
679 * w32term.c: Remove leftover declaration of keyboard_codepage.
681 2012-10-08 Eli Zaretskii <eliz@gnu.org>
683 * makefile.w32-in (FONT_H): Add $(FRAME_H).
684 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
685 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
686 (GLOBAL_SOURCES): Add cygw32.c.
687 ($(BLD)/unexw32.$(O)):
689 ($(BLD)/w32console.$(O)):
690 ($(BLD)/w32fns.$(O)):
691 ($(BLD)/w32heap.$(O)):
692 ($(BLD)/w32menu.$(O)):
693 ($(BLD)/w32proc.$(O)): Add w32common.h.
695 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
697 (x_to_w32_color): Don't modify the argument, modify a copy instead.
699 2012-10-08 Daniel Colascione <dancol@dancol.org>
701 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
702 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
703 accidental message numbering hole. Change other messages to
706 * w32select.h (HAVE_W32SELECT): Remove.
708 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
709 w32common.h instead of w32heap.h.
711 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
712 (get_allocation_unit, get_processor_type, get_w32_major_version)
713 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
714 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
715 (OS_NT, os_subtype, cache_system_info): Move declarations to
718 * w32heap.c: Include w32common.h.
719 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
720 (w32_minor_version, w32_build_number, w32_subtype):
721 Remove duplicate definitions.
723 * w32fns.c: Include w32common.h; include w32heap.h only in
726 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
727 Use `report_file_error' instead of `error' in order to better
728 inform users of what went wrong. Increase NTGUI_UNICODE file
729 dialog box file name length to 32k, the maximum allowed by the NT
732 * w32common.h: New file.
733 (ROUND_UP, ROUND_DOWN, get_page_size)
734 (get_allocation_unit, get_processor_type, get_w32_major_version)
735 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
736 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
737 (OS_NT, os_subtype, cache_system_info): Move here.
739 * unexw32.c, unexcw.c: Include w32common.h.
741 * emacs.c (main): Use (defined (WINDOWSNT) || defined
742 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
743 to call syms_of_w32select.
745 * cygw32.h: Remove obsolete EXFUN declarations.
747 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
749 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
750 of w32inevt.o from SOME_MACHINE_OBJECTS.
752 2012-10-08 Daniel Colascione <dancol@dancol.org>
754 * image.c: Permanent fix for JPEG compilation issue --- limit
755 jpeglib `boolean' redefinition to Cygwin builds.
757 2012-10-08 Eli Zaretskii <eliz@gnu.org>
759 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
761 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
764 2012-10-08 Daniel Colascione <dancol@dancol.org>
766 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
767 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
768 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
769 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
770 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
771 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
772 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
773 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
774 now a supported configuration.
776 * Makefile.in: consolidate image variables into LIBIMAGE; add
777 W32_OBJ and W32_LIBS. Compile new files.
780 (_DebPrint) declare tracing facility for W32 debugging. We need
781 to unify tracing later.
783 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
784 unconditional use of W32 Unicode functions. Cygwin runs only on
785 100% Unicode operating systems.
787 * cygw32.c: New file. Define Cygwin-specific facilities.
788 (Fcygwin_convert_path_to_windows)
789 (Fcygwin_convert_path_from_windows): New user functions for
790 accessing Cygwin path-munging routines.
792 * cygw32.h: New file.
793 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
794 UTF-16LE strings temporarily inside non-Lisp-visible string
797 (w32_strerror): Just what it says on the tin.
799 * emacs.c: Make the NS fork-then-exec code for daemon-launching
800 also run for Cygwin; both systems have the same problem with using
801 GUI facilities in a forked child. Also call syms_of_cygw32,
802 syms_of_w32select in correct places.
804 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
805 needs fork-then-exec for daemon launching.
807 * font.h: Include frame.h.
809 * image.c: Use the image library cache machinery only when we're
810 compiling for native WINDOWSNT; Cygwin can use shared libraries
811 like any other Unixlike system.
813 * keyboard.c: Clarify a comment regarding the input loop.
815 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
816 functions directly instead of trying to detect at runtime that our
817 host operating system supports them. We make this change for two
818 reasons: Cygwin lacks support for the multibyte character
819 conversion functions used by the legacy menu code, and Cygwin
820 never needs to rely on non-Unicode APIs.
822 * unexw32.c (hinst): Declare extern.
824 * w32.c: Change header order;
825 (w32_strerror): Move to w32fns.c because we need it for
826 non-WINDOWSNT builds.
828 * w32.h: Add #error macro to make sure we don't include w32.h for
829 Cygwin builds. Remove w32select declarations.
831 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
832 w32fns.c. w32console.c is WINDOWSNT-only.
834 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
835 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
837 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
838 (w32_major_version, w32_minor_version, w32_build_number)
839 (os_subtype, sound_type): Define here
840 (w32_defined_color): Make color parameter const for consistency
841 with other _defined_color functions.
842 (w32_createwindow): Unconditionally call w32_init_class instead of
843 doing so only when hprevinst is non-NULL. Plumbing hprevinst
844 through the code is complex and unnecessary because class
845 registration is practically free.
846 (w32_name_of_message): New EMACSDEBUG-only function.
847 (Fset_message_beep): Move here
848 (Fx_open_connection): Require that the display name for Windows be
849 "w32" for consistency, emacsclient disambiguation, and maybe, one
850 day, multi-window-system support.
851 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
852 Cygwin files for W32 GUI facilities, since these clearly don't
855 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
856 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
857 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
858 (w32_last_error): Remove.
860 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
862 * w32heap.c (syspage_mask): Declare here.
863 (cache_system_info): Remove.
865 * w32inevt.c (faked_key): Define globally, not statically.
866 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
867 (w32_console_toggle_lock_key): Move to w32fns.c.
869 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
871 * w32proc.c (_DebPrint): Move to w32fns.c.
872 * w32select.c: Include string.h, stdio.h for Cygwin.
873 * w32select.h: New File.
875 * w32term.c: Include io.h for non-CYGWIN builds; needed for
877 (w32_message_fd): New variable. Under Cygwin, holds the file
878 descriptor the system used to tell us about pending thread
881 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
882 that prevented compilation under non-WINDOWSNT systems.
884 (w32_initialize): Open /dev/windows and assign it to
885 w32_message_fd. Provide w32 feature.
887 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
888 (WM_EMACS_INPUT_READY): add.
889 (prepend_msg, w32_message_fd): Declare globally.
892 (keyboard_handle): Use only when WINDOWSNT.
893 (notify_msg_ready): New function. Posts a message to the main
894 thread's message queue under CYGWIN, which wakes up the main
895 thread from select(2) by making the /dev/windows file descriptor
896 ready. Under WINDOWSNT, it sets an event the same way the old
899 (post, prepend_msg): Actually call notify_msg_ready instead of
900 setting the input event directly.
902 2012-10-07 Eli Zaretskii <eliz@gnu.org>
904 * ralloc.c (relinquish): If a heap is ready to be relinquished,
905 but it still has blocs in it, don't return it to the system,
906 instead of aborting. (Bug#12402)
908 2012-10-07 Jan Djärv <jan.h.d@swipnet.se>
910 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
912 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
913 MAC_OS_X_VERSION_10_6.
914 (syms_of_nsterm): Remove comment about Panther and above for
916 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
917 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
918 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
920 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
921 MAC_OS_X_VERSION_10_4.
923 * nsmenu.m (fillWithWidgetValue:): Remove code for <
924 MAC_OS_X_VERSION_10_2.
926 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
928 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
929 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
931 * nsterm.m (ns_in_resize): Remove (Bug#12479).
932 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
933 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
934 Remove ns_in_resize check.
935 (ns_clear_frame_area): Remove resize handle code.
937 * nsfns.m (ns_in_resize): Remove.
938 (x_set_icon_name, ns_set_name, ns_set_name_as_filename):
939 Remove ns_in_resize check.
941 2012-10-07 Paul Eggert <eggert@cs.ucla.edu>
943 Improve sys_siglist detection.
944 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
945 defined as a macro, as is done in Solaris.
946 (sys_siglist_entries): New macro.
947 (save_strsignal): Use it.
948 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
949 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
951 2012-10-06 Jan Djärv <jan.h.d@swipnet.se>
953 * nsfns.m (Fx_create_frame): Call x_default_parameter with
954 fullscreen/Fullscreen.
956 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
959 * nsterm.m (x_make_frame_visible): Check for fullscreen.
960 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
961 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
962 (windowDidResize:): Check for correct window if old style fullscreen.
963 Capitalize word in comment. Remove incorrect comment.
964 (initFrameFromEmacs:): tbar_height renamed tibar_height.
965 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
966 error in drawing background.
967 (toggleFullScreen:): Remove comment. Rearrange calls.
968 Set toolbar values to zero, save old height in tobar_height.
969 Restore tool bar height when leaving fullscreen.
970 (canBecomeMainWindow): New function.
972 2012-10-06 Paul Eggert <eggert@cs.ucla.edu>
974 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
976 2012-10-05 Eli Zaretskii <eliz@gnu.org>
978 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
980 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
981 that time stamps of directories could also be changed.
982 Don't request the too broad GENERIC_WRITE, only the more restrictive
983 FILE_WRITE_ATTRIBUTES access rights.
985 * fileio.c (Fset_file_times): Special-case ignoring errors for
986 directories only on MSDOS, not on MS-Windows.
988 2012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
990 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
992 2012-10-04 Eli Zaretskii <eliz@gnu.org>
994 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
995 see whether CreateFile failed.
997 2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
999 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
1000 to avoid similar races.
1001 * keyboard.c (pending_signals): Now bool, not int.
1003 Port timers to OpenBSD, plus check for timer failures.
1004 OpenBSD problem reported by Han Boetes.
1005 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
1007 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
1008 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
1009 like OpenBSD, which has timer_settime but does not declare it.
1010 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
1011 whether to use itimerspec-related primitives. All uses of
1012 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
1014 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
1016 * profiler.c (handle_profiler_signal): Fix a malloc race
1017 that caused Emacs to hang on Fedora 17 when profiling Lisp.
1019 2012-10-02 Jan Djärv <jan.h.d@swipnet.se>
1021 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
1023 2012-10-02 Eli Zaretskii <eliz@gnu.org>
1025 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
1026 consistent with the change in return value of 'safe_strsignal'.
1028 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
1030 Prefer plain 'static' to 'static inline' (Bug#12541).
1031 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
1032 (bidi_set_sor_type, bidi_push_embedding_level)
1033 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
1034 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
1035 (bidi_cache_search, bidi_cache_ensure_space)
1036 (bidi_cache_iterator_state, bidi_cache_find)
1037 (bidi_peek_at_next_level, bidi_set_paragraph_end)
1038 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
1039 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
1040 Now 'static', not 'static inline'.
1042 Count overruns when profiling; change units to ns.
1043 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
1044 Give extra weight to samples after overruns, to attempt to count
1045 the time more accurately.
1046 (setup_cpu_timer): Change sampling interval units from ms to ns, since
1047 the underlying primitives nominally do ns.
1048 (Fprofiler_cpu_start): Document the change. Mention that
1049 the sampling intervals are only approximate.
1051 2012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
1053 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
1055 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
1056 case for the special 0 coding-system.
1058 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
1059 (Fmake_overlay): Remove redundant tests.
1060 (fix_start_end_in_overlays): Remove redundant recentering.
1062 2012-10-02 Juanma Barranquero <lekktu@gmail.com>
1064 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
1065 Update dependencies.
1067 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
1069 Fix a malloc race condition involving strsignal.
1070 A signal can arrive in the middle of a malloc, and Emacs's signal
1071 handler can invoke strsignal, which can invoke malloc, which is
1072 not portable. This race condition bug makes Emacs hang on GNU/Linux.
1073 Fix it by altering the signal handler so that it does not invoke
1075 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
1076 * process.c (status_message): Use const pointer, in case strsignal
1077 is #defined to safe_strsignal.
1078 * sysdep.c (sys_siglist, init_signals): Always define and
1079 initialize a substitute sys_siglist if the system does not define
1080 one, even if HAVE_STRSIGNAL.
1081 (safe_strsignal): Rename from strsignal. Always define,
1082 using sys_siglist. Return a const pointer.
1083 * syssignal.h (safe_strsignal): New decl.
1084 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
1086 2012-10-01 Eli Zaretskii <eliz@gnu.org>
1088 * w32proc.c (timer_loop): Fix code that waits for timer
1089 expiration, to avoid high CPU usage.
1091 2012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
1093 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
1094 (sweep_weak_table): Remove redundant prototypes.
1096 2012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
1098 * emacs.c: Move the inclusion of TERM_HEADER after including
1099 windows.h on WINDOWSNT. This avoids compilation problems with
1102 2012-10-01 Eli Zaretskii <eliz@gnu.org>
1104 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
1105 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
1106 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
1107 as the previous version used 'void *'.
1109 * ralloc.c (ROUNDUP): Fix last change.
1110 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
1113 * w32proc.c <disable_itimers>: New static flag.
1114 (init_timers): Initialize it to zero, after creating the critical
1115 sections used by the timer threads.
1116 (term_timers): Set to 1 before deleting the critical sections.
1117 (getitimer, setitimer): If disable_itimers is non-zero, return an
1118 error indication without doing anything. Reported by Fabrice
1119 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
1120 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
1122 [!HAVE_SETITIMER]: Behave as the previous version that didn't
1125 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
1126 term_ntproc after all the other bookkeeping, to get timers working
1127 as long as possible.
1129 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
1131 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
1132 Suggested by Juri Linkov in
1133 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
1135 Prefer plain 'static' to 'static inline' (Bug#12541).
1136 With static functions, modern compilers inline pretty well by
1137 themselves; advice from programmers often hurts as much as it helps.
1138 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
1139 this change shrinks the text size of the Emacs executable by 1.1%
1140 without affecting CPU significantly in my benchmark.
1141 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
1142 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
1143 (mark_maybe_object, mark_maybe_pointer, bounded_number):
1144 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
1145 (bset_auto_fill_function, bset_auto_save_file_format)
1146 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
1147 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
1148 (bset_cache_long_line_scans, bset_case_fold_search)
1149 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
1150 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
1151 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
1152 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
1153 (bset_header_line_format, bset_indicate_buffer_boundaries)
1154 (bset_indicate_empty_lines, bset_invisibility_spec)
1155 (bset_left_fringe_width, bset_major_mode, bset_mark)
1156 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
1157 (bset_name, bset_overwrite_mode, bset_pt_marker)
1158 (bset_right_fringe_width, bset_save_length)
1159 (bset_scroll_bar_width, bset_scroll_down_aggressively)
1160 (bset_scroll_up_aggressively, bset_selective_display)
1161 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
1162 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
1163 (set_buffer_overlays_after):
1164 * category.c (bset_category_table):
1165 * charset.c (read_hex):
1166 * coding.c (produce_composition, produce_charset)
1167 (handle_composition_annotation, handle_charset_annotation)
1169 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
1170 (assign_row, set_frame_matrix_frame, make_current)
1172 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
1173 * fns.c (maybe_resize_hash_table):
1174 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
1175 * gmalloc.c (register_heapinfo):
1176 * image.c (lookup_image_type):
1177 * intervals.c (set_interval_object, set_interval_left)
1178 (set_interval_right, copy_interval_parent, rotate_right)
1179 (rotate_left, balance_possible_root_interval):
1180 * keyboard.c (kset_echo_string, kset_kbd_queue)
1181 (kset_keyboard_translate_table, kset_last_prefix_arg)
1182 (kset_last_repeatable_command, kset_local_function_key_map)
1183 (kset_overriding_terminal_local_map, kset_real_last_command)
1184 (kset_system_key_syms, clear_event, set_prop):
1185 * lread.c (digit_to_number):
1186 * marker.c (attach_marker, live_buffer, set_marker_internal):
1187 * nsterm.m (ns_compute_glyph_string_overhangs):
1188 * process.c (pset_buffer, pset_command)
1189 (pset_decode_coding_system, pset_decoding_buf)
1190 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
1191 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
1192 (pset_status, pset_tty_name, pset_type, pset_write_queue):
1193 * syntax.c (bset_syntax_table, dec_bytepos):
1194 * terminal.c (tset_param_alist):
1195 * textprop.c (interval_has_some_properties)
1196 (interval_has_some_properties_list):
1197 * window.c (wset_combination_limit, wset_dedicated)
1198 (wset_display_table, wset_hchild, wset_left_fringe_width)
1199 (wset_left_margin_cols, wset_new_normal, wset_new_total)
1200 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
1201 (wset_right_fringe_width, wset_right_margin_cols)
1202 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
1203 (wset_vertical_scroll_bar_type, wset_window_parameters):
1204 * xdisp.c (wset_base_line_number, wset_base_line_pos)
1205 (wset_column_number_displayed, wset_region_showing)
1206 (window_box_edges, run_window_scroll_functions)
1207 (append_glyph_string_lists, prepend_glyph_string_lists)
1208 (append_glyph_string, set_glyph_string_background_width)
1209 (append_glyph, append_composite_glyph)
1210 (take_vertical_position_into_account):
1211 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
1212 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
1213 (lface_hash, lface_same_font_attributes_p, lookup_face):
1214 * xml.c (libxml2_loaded_p):
1215 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
1216 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
1217 Now 'static', not 'static inline'.
1220 (bidi_copy_it): Do the whole copy with a single memcpy.
1221 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
1223 Revert the FOLLOW-SYMLINKS change for file-attributes.
1224 Doing it right would require several changes to Tramp, and there's
1225 not enough time to get that tested before the freeze today.
1226 * dired.c (directory_files_internal, Ffile_attributes):
1229 * frame.c (x_report_frame_params): Port better to wider ints.
1230 Do not assume that EMACS_UINT is the same width as uprintmax_t,
1231 or that pointers can be printed in 15 decimal digits.
1232 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
1234 2012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
1236 Support x64 build on MS-Windows.
1237 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
1238 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
1239 compatibility with x64.
1240 (x_get_focus_frame): Add prototype.
1242 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
1243 defining an XRectangle structure.
1245 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
1246 arithmetics for compatibility with x64.
1248 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
1249 compatibility with x64.
1251 * w32heap.h: Adjust prototypes and declarations.
1253 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
1254 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
1255 DWORD, long, and unsigned long, for compatibility with x64.
1256 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
1257 (sbrk): Argument is now of type ptrdiff_t.
1259 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
1261 (w32_msg_pump): Use WPARAM type for 'result'.
1263 * w32.c (init_environment, get_emacs_configuration): Support AMD64
1265 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
1266 compatibility with x64.
1268 * vm-limit.c (lim_data): Now size_t.
1269 (check_memory_limits): Adjust prototypes of real_morecore and
1270 __morecore to receive argument of type ptrdiff_t. Use size_t for
1271 five_percent and data_size.
1273 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
1274 variables, for compatibility with x64.
1275 (rva_to_section, offset_to_section, relocate_offset)
1276 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
1277 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
1278 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
1279 for compatibility with x64.
1281 * sysdep.c (STDERR_FILENO): Define if not already defined.
1283 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
1284 (__morecore): Argument type is now ptrdiff_t.
1285 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
1286 (relinquish): Use ptrdiff_t type for 'excess'.
1287 (r_alloc_sbrk): Argument type is now ptrdiff_t.
1289 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
1290 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
1291 instead of a literal number.
1293 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
1294 (min): Define only if not already defined.
1296 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
1297 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
1300 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
1301 'bitmaps' is a pointer.
1303 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
1305 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
1307 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1309 file-attributes has a new optional arg FOLLOW-SYMLINKS.
1310 * dired.c (directory_files_internal, Ffile_attributes):
1311 New arg follow_symlinks. All uses changed.
1313 2012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
1315 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
1317 2012-09-30 Eli Zaretskii <eliz@gnu.org>
1319 Support atimers and CPU profiler via profile.c on MS-Windows.
1320 * w32proc.c (sig_mask, crit_sig): New static variables.
1321 (sys_signal): Support SIGALRM and SIGPROF.
1322 (sigemptyset, sigaddset, sigfillset, sigprocmask)
1323 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
1324 sigfillset, and sigprocmask are no longer no-ops.
1325 (sigismember): New function.
1326 (struct itimer_data): New definition.
1327 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
1328 (crit_prof): New static variables.
1329 (MAX_SINGLE_SLEEP): New definition.
1330 (timer_loop, stop_timer_thread, term_timers, init_timers)
1331 (start_timer_thread, getitimer, setitimer): New functions.
1332 (alarm): No longer a no-op, calls setitimer.
1334 * w32.c (term_ntproc): Call term_timers.
1335 (init_ntproc): Make sure all signals are unblocked at startup, to
1336 erase any traces of dumping. Call init_timers.
1338 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
1339 Windows-specific code to display the hourglass mouse pointer is no
1341 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
1342 to hourglass timer expiration.
1343 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
1344 Remove, no longer used.
1345 (w32_note_current_window, show_hourglass, hide_hourglass):
1346 New functions, in support of hourglass cursor display similar to other
1348 (syms_of_w32fns): Don't initialize hourglass_timer.
1350 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
1352 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
1354 * w32.h (init_timers, term_timers): Add prototypes.
1356 2012-09-30 Kenichi Handa <handa@gnu.org>
1358 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
1359 to the buffer relocation which may be caused by ccl_driver.
1361 2012-09-30 Jan Djärv <jan.h.d@swipnet.se>
1363 * xfns.c (Fx_file_dialog): Update comment.
1365 * w32fns.c (Fx_file_dialog): Update comment.
1367 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
1368 Initialize panel name field if OSX >= 10.6.
1370 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
1372 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
1374 * nsterm.m (NEW_STYLE_FS): New define.
1375 (ns_fullscreen_hook, windowWillEnterFullScreen)
1376 (windowDidEnterFullScreen, windowWillExitFullScreen)
1377 (windowDidExitFullScreen, toggleFullScreen, handleFS)
1378 (setFSValue): New functions.
1379 (EmacsFSWindow): New implementation.
1380 (canBecomeKeyWindow): New function for EmacsFSWindow.
1381 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
1382 (dealloc): Release nonfs_window if in fullscreen.
1383 (updateFrameSize:): Call windowDidMove to update top/left.
1384 (windowWillResize:toSize:): Check if frame is still maximized.
1385 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
1386 next_maximized, maximized_width, maximized_height and nonfs_window.
1387 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
1389 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
1390 fullscreen. Set maximized_width/height. Act on next_maximized.
1392 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
1393 (EmacsView): Add variables for fullscreen.
1394 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
1395 (EmacsFSWindow): New interface for fullscreen.
1397 2012-09-30 Juanma Barranquero <lekktu@gmail.com>
1399 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1401 2012-09-30 Chong Yidong <cyd@gnu.org>
1403 * fns.c (Frandom): Doc fix.
1405 2012-09-30 Martin Rudalics <rudalics@gmx.at>
1407 * window.c (Vwindow_combination_limit): New default value.
1408 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
1410 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1412 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
1413 Suggested by Eli Zaretskii in
1414 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
1416 2012-09-30 Eli Zaretskii <eliz@gnu.org>
1418 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
1419 HAVE_TIMER_SETTIME is defined.
1421 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1423 Profiler improvements: more-accurate timers, overflow checks.
1424 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
1425 signal.h, setjmp.h. Include systime.h instead.
1426 (saturated_add): New function.
1427 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
1428 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
1429 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
1431 (enum profiler_cpu_running): New enum.
1432 (profiler_cpu_running): Now of that enum type, not bool.
1433 All uses changed to store the new value.
1434 (handle_profiler_signal): Rename from sigprof_handler_1,
1435 for consistency with other handlers. Do not check whether
1436 cpu_log is a hash-table if garbage collecting, since it
1437 doesn't matter in that case.
1438 (deliver_profiler_signal): Rename from sigprof_handler,
1439 for consistency with other handlers.
1440 (setup_cpu_timer): New function, with much of what used to be in
1441 Fprofiler_cpu_start. Check for out-of-range argument.
1442 Prefer timer_settime if available, and prefer
1443 thread cputime clocks, then process cputime clocks, then
1444 monotonic clocks, to the old realtime clock. Use make_timeval
1445 to round more-correctly when falling back to setitimer.
1446 (Fprofiler_cpu_start): Use it.
1447 (Fprofiler_cpu_stop): Prefer timer_settime if available.
1448 Don't assume that passing NULL as the 2nd argument of setitimer
1449 is the same as passing a pointer to all-zero storage.
1450 Ignore SIGPROF afterwards.
1451 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
1452 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
1453 non-fatal signal handlers. Ignore SIGPROF on startup.
1454 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
1455 in profiler.c, since sysdep.c now uses it.
1457 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
1458 Suggested by Eli Zaretskii in
1459 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
1461 2012-09-29 Juanma Barranquero <lekktu@gmail.com>
1463 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1465 2012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
1467 * lisp.h (struct backtrace): Remove indirection for `function' field.
1468 * xdisp.c (redisplay_internal):
1469 * profiler.c (record_backtrace, sigprof_handler_1):
1470 * alloc.c (Fgarbage_collect):
1471 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
1472 (Fbacktrace_frame): Adjust accordingly.
1474 2012-09-28 Glenn Morris <rgm@gnu.org>
1476 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
1477 (Frun_hook_with_args_until_failure): Doc fixes.
1479 2012-09-28 Eli Zaretskii <eliz@gnu.org>
1481 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
1482 Qautomatic_redisplay and change the symbol name. All users changed.
1484 2012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
1486 * profiler.c (sigprof_handler): Fix race condition.
1488 2012-09-28 Glenn Morris <rgm@gnu.org>
1490 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
1492 2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
1494 Check more robustly for timer_settime.
1495 * Makefile.in (LIB_TIMER_TIME): New macro.
1497 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
1498 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
1501 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1503 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
1505 2012-09-26 Juanma Barranquero <lekktu@gmail.com>
1507 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1509 2012-09-26 Paul Eggert <eggert@cs.ucla.edu>
1511 * character.h (MAYBE_UNIFY_CHAR): Remove.
1512 * charset.c, charset.h (maybe_unify_char): Now static.
1513 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
1514 Since this stuff is now private to charset.c, there's no need for
1515 a public macro and no need to inline by hand.
1517 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1518 Stefan Monnier <monnier@iro.umontreal.ca>
1519 Juanma Barranquero <lekktu@gmail.com>
1521 * profiler.c: New file.
1522 * Makefile.in (base_obj): Add profiler.o.
1523 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
1524 ($(BLD)/profiler.$(O)): New target.
1525 * emacs.c (main): Call syms_of_profiler.
1526 * alloc.c (Qautomatic_gc): New constant.
1527 (MALLOC_PROBE): New macro.
1528 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
1529 (total_bytes_of_live_objects): New function.
1530 (Fgarbage_collect): Use it. Record itself in backtrace_list.
1531 Call malloc_probe for the memory profiler.
1532 (syms_of_alloc): Define Qautomatic_gc.
1533 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
1535 (struct backtrace): Move definition...
1536 * lisp.h (struct backtrace): ..here.
1537 (Qautomatic_gc, profiler_memory_running): Declare vars.
1538 (malloc_probe, syms_of_profiler): Declare functions.
1539 * xdisp.c (Qautomatic_redisplay): New constant.
1540 (redisplay_internal): Record itself in backtrace_list.
1541 (syms_of_xdisp): Define Qautomatic_redisplay.
1543 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1544 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
1546 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
1548 2012-09-25 Paul Eggert <eggert@cs.ucla.edu>
1550 Prefer POSIX timers if available.
1551 They avoid a race if the timer is too close to the current time.
1552 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
1553 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
1554 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
1556 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1558 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
1559 CHAR_STRING_ADVANCE.
1560 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
1561 STRING_CHAR_ADVANCE.
1563 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
1565 Move Vlibrary_cache to emacs.c and reset before dumping.
1567 * lisp.h (reset_image_types): Declare.
1568 [WINDOWSNT] (Vlibrary_cache): Declare.
1570 * image.c (reset_image_types): New function.
1572 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
1573 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
1574 (Fdump_emacs): Reset Vlibrary_cache and image_types.
1576 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
1577 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
1579 * w32.h (Vlibrary_cache): Do not declare.
1581 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1583 * w32proc.c (sys_signal): Handle all signals defined by the
1584 MS-Windows runtime, not just SIGCHLD. Actually install the signal
1585 handlers for signals supported by Windows. Don't override
1586 term_ntproc as the handler for SIGABRT.
1587 (sigaction): Rewrite to call sys_signal instead of duplicating its
1589 (sys_kill): Improve commentary.
1591 * w32.c (term_ntproc): Accept (and ignore) one argument, for
1592 consistency with a signature of a signal handler. All callers
1594 (init_ntproc): Accept an argument DUMPING. If dumping, don't
1595 install term_ntproc as a signal handler for SIGABRT, as that
1596 should be done by the dumped Emacs.
1598 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
1600 * w32select.c (term_w32select): Protect against repeated
1601 invocation by setting clipboard_owner to NULL after calling
1604 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
1605 and term_ntproc to their modified signatures.
1607 * character.c (char_string, string_char): Remove calls to
1608 MAYBE_UNIFY_CHAR. See the discussion starting at
1609 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
1612 2012-09-25 Chong Yidong <cyd@gnu.org>
1614 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
1616 2012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
1618 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
1619 when encountering an unknown bytecode.
1621 2012-09-24 Paul Eggert <eggert@cs.ucla.edu>
1623 image.c, indent.c: Use bool for booleans.
1624 * dispextern.h (struct image_type): Members valid_p, load, init
1625 now return bool, not int. All uses changed.
1626 * image.c: Omit unnecessary static decls.
1627 (x_create_bitmap_mask, x_build_heuristic_mask):
1628 Return void, not int, since callers don't care about the return value.
1629 (x_create_bitmap_mask, define_image_type, valid_image_p)
1630 (struct image_keyword, parse_image_spec, image_spec_value)
1631 (check_image_size, image_background)
1632 (image_background_transparent, x_clear_image_1)
1633 (postprocess_image, lookup_image, x_check_image_size)
1634 (x_create_x_image_and_pixmap, xbm_image_p)
1635 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
1636 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
1637 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
1638 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
1639 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
1640 (png_image_p, init_png_functions, png_load_body, png_load)
1641 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
1642 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
1643 (init_gif_functions, gif_load, imagemagick_image_p)
1644 (imagemagick_load_image, imagemagick_load, svg_image_p)
1645 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
1647 * nsimage.m (ns_load_image):
1648 * nsterm.m (ns_defined_color):
1649 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
1650 * xfns.c (x_defined_color):
1651 * xterm.c (x_alloc_lighter_color_for_widget)
1652 (x_alloc_nearest_color_1, x_alloc_nearest_color)
1653 (x_alloc_lighter_color):
1654 * indent.c (disptab_matches_widthtab, current_column)
1655 (scan_for_column, string_display_width, indented_beyond_p)
1656 (compute_motion, vmotion, Fvertical_motion):
1657 Use bool for booleans.
1659 2012-09-24 Chong Yidong <cyd@gnu.org>
1661 * chartab.c (Fset_char_table_default): Obsolete function removed.
1663 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1665 Move pid_t related decls out of lisp.h.
1666 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
1667 (interruptible_wait_for_termination):
1668 Move these decls from lisp.h to syswait.h, since they use pid_t.
1669 Needed on FreeBSD; see Herbert J. Skuhra in
1670 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
1671 * callproc.c: Include syswait.h.
1673 gnutls.c, gtkutil.c: Use bool for boolean.
1674 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
1675 (emacs_gnutls_handle_error):
1676 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
1677 (xg_hide_tooltip, xg_create_frame_widgets)
1678 (create_dialog, xg_uses_old_file_dialog)
1679 (xg_get_file_with_chooser, xg_get_file_with_selection)
1680 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
1681 (xg_item_label_same_p, xg_update_menubar)
1682 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
1683 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
1684 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
1685 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
1686 (update_frame_tool_bar, free_frame_tool_bar):
1687 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
1688 * nsmenu.m (ns_update_menubar):
1689 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
1690 * xfns.c (Fx_show_tip) [USE_GTK]:
1691 Use bool for boolean.
1692 * gtkutil.c (xg_update_frame_menubar):
1693 * xmenu.c (update_frame_menubar):
1694 Return void, not int, since caller ignores return value.
1695 * gtkutil.c (xg_change_toolbar_position):
1698 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
1700 * makefile.w32-in (BLOCKINPUT_H): Remove.
1701 (SYSSIGNAL_H): New macro.
1702 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
1703 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
1704 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
1705 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
1706 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
1707 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
1708 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
1709 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
1710 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
1711 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
1712 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
1713 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
1714 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
1715 ($(BLD)/w32xfns.$(O)): Update dependencies.
1717 2012-09-23 Eli Zaretskii <eliz@gnu.org>
1719 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
1720 fatal_error_backtrace.
1722 * w32proc.c (sys_kill): Undo last change: don't do anything when
1723 invoked to deliver SIGABRT to our own process. This is now
1724 handled by emacs_raise.
1726 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
1728 * w32term.c (w32_read_socket): Remove leftover reference to
1729 interrupt_input_pending.
1731 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1733 Do not use SA_NODEFER.
1734 Problem reported by Dani Moncayo in
1735 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
1737 * sysdep.c (emacs_abort): Do not reset signal handler.
1738 * emacs.c (terminate_due_to_signal): Reset signal handler here.
1739 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
1740 wanted even on POSIXish hosts, and it doesn't work on Windows.
1742 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1744 * xterm.c (x_term_init): Call fixup_locale before and after calling
1745 gtk_init (Bug#12392).
1747 2012-09-23 Chong Yidong <cyd@gnu.org>
1749 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
1750 Vdynamic_library_alist.
1752 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
1753 (Fgnutls_available_p): Caller changed.
1755 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
1756 (Flibxml_parse_xml_region): Likewise.
1758 * dispextern.h (struct image_type): Remove arg from init function.
1760 * image.c (Finit_image_library, lookup_image_type)
1761 (define_image_type): Remove now-unneeded second arg.
1762 (init_xpm_functions, init_png_functions, init_jpeg_functions)
1763 (init_tiff_functions, init_gif_functions, init_svg_functions):
1764 Arglist and w32_delayed_load calling convention changed.
1765 (gs_type): Remove init_gs_functions; there is no such function.
1766 (valid_image_p, make_image): Fix caller to lookup_image_type.
1768 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1770 Simplify and avoid signal-handling races (Bug#12471).
1772 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
1773 Avoid recursive loop if there's a fatal error in the function itself.
1774 * atimer.c (pending_atimers):
1775 * blockinput.h: Don't include "atimer.h"; no longer needed.
1776 (interrupt_input_pending): Remove. All uses removed.
1777 pending_signals now counts both atimers and ordinary interrupts.
1778 This is less racy than having three separate pending-signal flags.
1779 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
1781 Rename from their upper-case counterparts BLOCK_INPUT,
1782 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
1783 INPUT_BLOCKED_P, and turn into functions. All uses changed.
1784 This makes it easier to access volatile variables more accurately.
1785 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
1786 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
1787 that's more reliable if the code is buggy and sets
1788 interrupt_input_blocked to a negative value. All uses changed.
1789 * atimer.c (deliver_alarm_signal):
1790 Remove. No need to deliver this to the parent; any thread can
1791 handle this signal now. All uses replaced by underlying handler.
1792 * atimer.c (turn_on_atimers):
1793 * dispnew.c (handle_window_change_signal):
1794 * emacs.c (handle_danger_signal):
1795 * keyboard.c (kbd_buffer_get_event):
1796 Don't reestablish signal handler; not needed with sigaction.
1797 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
1799 Rework to avoid unnecessary accesses to volatile variables.
1800 (UNBLOCK_INPUT_TO): Now a function.
1801 (totally_unblock_input, unblock_input): New decls.
1802 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
1803 (init_data): Remove. Necessary stuff now done in init_signal.
1804 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
1805 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
1806 (fatal_error_code): Remove; no longer needed.
1807 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
1808 it doesn't always backtrace. All uses changed. No need to reset
1809 signal to default, since sigaction and/or die does that for us now.
1810 Use emacs_raise (FOO), not kill (getpid (), FOO).
1811 (main): Check more-accurately whether we're dumping.
1812 Move fatal-error setup to sysdep.c
1813 * floatfns.c: Do not include "syssignal.h"; no longer needed.
1814 * gtkutil.c (xg_get_file_name, xg_get_font):
1815 Remove no-longer-needed signal-mask manipulation.
1816 * keyboard.c, process.c (POLL_FOR_INPUT):
1817 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
1818 * keyboard.c (read_avail_input): Remove.
1819 All uses replaced by gobble_input.
1820 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
1821 (kbd_buffer_store_event_hold, gobble_input):
1822 (record_asynch_buffer_change) [USABLE_SIGIO]:
1823 (store_user_signal_events):
1824 No need to mess with signal mask.
1825 (gobble_input): If blocking input and there are terminals, simply
1826 set pending_signals to 1 and return. All hooks changed to not
1827 worry about whether input is blocked.
1828 (process_pending_signals): Clear pending_signals before processing
1829 them, in case a signal comes in while we're processing.
1830 By convention callers now test pending_signals before calling us.
1831 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
1832 New functions, to support changes to blockinput.h.
1833 (handle_input_available_signal): Now extern.
1834 (reinvoke_input_signal): Remove. All uses replaced by
1836 (quit_count): Now volatile, since a signal handler uses it.
1837 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
1838 All callers changed. Block SIGINT only if not already blocked.
1839 Clear sigmask reliably, even if Fsignal returns, which it can.
1840 Omit unnecessary accesses to volatile var.
1841 (quit_throw_to_read_char): No need to restore sigmask.
1842 * keyboard.c (gobble_input, handle_user_signal):
1843 * process.c (wait_reading_process_output):
1844 Call signal-handling code rather than killing ourselves.
1845 * lisp.h: Include <float.h>, for...
1846 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
1847 (pending_signals): Now volatile.
1848 (syms_of_data): Now const if IEEE floating point.
1849 (handle_input_available_signal) [USABLE_SIGIO]:
1850 (terminate_due_to_signal, record_child_status_change): New decls.
1851 * process.c (create_process): Avoid disaster if memory is exhausted
1852 while we're processing a vfork, by tightening the critical section
1854 (send_process_frame, process_sent_to, handle_pipe_signal)
1855 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
1857 (send_process): No need for setjmp/longjmp any more, since the
1858 SIGPIPE stuff is now gone. Instead, report an error if errno
1860 (record_child_status_change): Now extern. PID and W are now args.
1861 Return void, not bool. All callers changed.
1862 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
1863 Remove. All uses removed. This bug should be fixed now in a
1865 (wait_for_termination_1): Use waitpid rather than sigsuspend,
1866 and record the child status change directly. This avoids the
1867 need to futz with the signal mask.
1868 (process_fatal_action): Move here from emacs.c.
1869 (emacs_sigaction_flags): New function, containing
1870 much of what used to be in emacs_sigaction_init.
1871 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
1872 caught by emacs, to make races less likely.
1873 (deliver_process_signal): Rename from handle_on_main_thread.
1875 (BACKTRACE_LIMIT_MAX): Now at top level.
1876 (thread_backtrace_buffer, threadback_backtrace_pointers):
1878 (deliver_thread_signal, deliver_fatal_thread_signal):
1879 New functions, for more-accurate delivery of thread-specific signals.
1880 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
1881 (deliver_arith_signal): Handle in this thread, not
1882 in the main thread, since it's triggered by this thread.
1883 (maybe_fatal_sig): New function.
1884 (init_signals): New arg DUMPING so that we can be more accurate
1885 about whether we're dumping. Caller changed.
1886 Treat thread-specific signals differently from process-general signals.
1887 Block all signals while handling fatal error; that's safer.
1888 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
1890 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
1891 Ignore SIGPIPE unless batch.
1892 (emacs_backtrace): Output backtrace for the appropriate thread,
1893 which is not necessarily the main thread.
1894 * syssignal.h: Include <stdbool.h>.
1895 (emacs_raise): New macro.
1896 * xterm.c (x_connection_signal): Remove; no longer needed
1897 now that we use sigaction.
1898 (x_connection_closed): No need to mess with sigmask now.
1899 (x_initialize): No need to reset SIGPIPE handler here, since
1900 init_signals does this for us now.
1902 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1904 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
1905 background rect may be larger (Bug#12245).
1907 2012-09-23 Chong Yidong <cyd@gnu.org>
1909 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
1911 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1913 * .gdbinit: Just stop at fatal_error_backtrace.
1914 See Stefan Monnier's request in
1915 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
1916 Remove no-longer-used query of system type.
1918 2012-09-22 Chong Yidong <cyd@gnu.org>
1920 * search.c (Freplace_match): Doc fix (Bug#12325).
1922 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
1924 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
1925 (Fline_end_position): Doc fix.
1927 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
1929 2012-09-22 Chong Yidong <cyd@gnu.org>
1931 * dispextern.h (struct image_type): Add new slot, storing a type
1932 initialization function.
1934 * image.c (define_image_type): Call the image initializer function
1935 if it is defined. Arguments and return value changed.
1936 (valid_image_p, make_image): Callers changed.
1937 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
1938 (gif_type, imagemagick_type, svg_type, gs_type):
1939 Add initialization functions.
1940 (Finit_image_library): Call lookup_image_type.
1941 (CHECK_LIB_AVAILABLE): Macro deleted.
1942 (lookup_image_type): Call define_image_type here, rather than via
1943 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
1944 (syms_of_image): Move define_image_type calls for xbm_type and
1945 pbm_type to lookup_image_type.
1947 2012-09-22 Eli Zaretskii <eliz@gnu.org>
1949 * keyboard.c (timer_check_2): Move calculation of 'timers' and
1950 'idle_timers' from here ...
1951 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
1952 lists, to avoid infloops when the timer does something stupid,
1953 like reinvoke itself with the same or smaller time-out.
1956 2012-09-22 Martin Rudalics <rudalics@gmx.at>
1958 * window.c (Fsplit_window_internal): Handle only Qt value of
1959 Vwindow_combination_limit separately.
1960 (Qtemp_buffer_resize): New symbol.
1961 (Vwindow_combination_limit): New default value.
1964 2012-09-22 Eli Zaretskii <eliz@gnu.org>
1966 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
1967 the new overlay string. (Bug#10159)
1969 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
1971 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
1972 or that fprintf is async-signal-safe. POSIX doesn't require
1975 2012-09-22 Chong Yidong <cyd@gnu.org>
1977 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
1980 2012-09-22 Kenichi Handa <handa@gnu.org>
1982 * composite.c (composition_reseat_it): Handle the case that a
1983 grapheme cluster is not covered by a single font (Bug#12352).
1985 2012-09-21 Chong Yidong <cyd@gnu.org>
1987 * image.c (define_image_type): Avoid adding duplicate types to
1988 image_types (Bug#12463). Suggested by Jörg Walter.
1990 2012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1992 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
1993 (print_load_command_name): Add case LC_DATA_IN_CODE.
1994 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
1996 2012-09-21 Glenn Morris <rgm@gnu.org>
1998 * eval.c (Frun_hook_with_args_until_success)
1999 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
2001 2012-09-21 Andreas Schwab <schwab@linux-m68k.org>
2003 * fileio.c (Ffile_selinux_context): Only call freecon when
2004 lgetfilecon succeeded.
2005 (Fset_file_selinux_context): Likewise. (Bug#12444)
2007 2012-09-21 Eli Zaretskii <eliz@gnu.org>
2009 * xdisp.c (try_window_reusing_current_matrix): Under bidi
2010 reordering, locate the cursor by calling set_cursor_from_row; if
2011 that fails, clear the desired glyph matrix before returning a
2012 failure indication to the caller. Fixes leaving garbled display
2013 when fast scrolling with a down-key. (Bug#12403)
2014 (compute_stop_pos_backwards): Fix a typo that caused crashes while
2015 scrolling through multibyte text.
2017 2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
2019 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
2020 calling mark_vectorlike since that's the one that marks the window.
2021 (mark_discard_killed_buffers): Mark the final cdr.
2022 * window.h (struct window): Move prev/next_buffers to the
2023 non-standard fields.
2024 * window.c (make_window): Initialize prev/next_buffers manually.
2026 2012-09-20 Paul Eggert <eggert@cs.ucla.edu>
2028 Omit unused arg EXPECTED from socket hooks.
2029 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
2030 * nsterm.m (ns_term_init):
2031 * termhooks.h (struct terminal.read_socket_hook):
2032 * w32inevt.c (w32_console_read_socket):
2033 * w32term.c (w32_read_socket):
2034 * xterm.c (XTread_socket):
2035 Omit unused arg EXPECTED. All callers changed.
2036 (store_user_signal_events): Return void, not int, since callers no
2037 longer care about the return value. All uses changed.
2039 2012-09-20 Juanma Barranquero <lekktu@gmail.com>
2041 * w32gui.h (XParseGeometry): Do not declare.
2043 2012-09-19 Paul Eggert <eggert@cs.ucla.edu>
2045 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
2046 Ignore 'expected'. See Eli Zaretskii in
2047 <http://bugs.gnu.org/12471#8> (last line).
2049 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
2050 (XParseGeometry): Now static. Substitute extremal values for
2051 values that are out of range.
2053 2012-09-19 Jan Djärv <jan.h.d@swipnet.se>
2055 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
2057 * nsfns.m (XParseGeometry): Remove.
2058 (Fx_create_frame): Call x_set_offset to correctly interpret
2059 top_pos in geometry.
2061 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
2062 (Fx_parse_geometry): If there is a space in string, call
2063 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
2065 2012-09-17 Eli Zaretskii <eliz@gnu.org>
2067 * search.c (scan_buffer): Use character positions in calls to
2068 region_cache_forward and region_cache_backward, not byte
2069 positions. (Bug#12196)
2071 * w32term.c (w32_read_socket): Set pending_signals to 1, like
2072 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
2074 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
2075 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
2076 emacs_blocked_malloc, now deleted.
2078 2012-09-17 Paul Eggert <eggert@cs.ucla.edu>
2080 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
2081 The workaround was for improving performance on Solaris 2.4, but
2082 is getting in the way now. Emacs will still work if someone is
2083 still running Solaris 2.4 in a museum somewhere; Sun dropped
2084 support for Solaris 2.4 in 2003.
2085 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
2086 * process.c (create_process) [HAVE_WORKING_VFORK]:
2087 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
2088 since Emacs no longer uses vfork on that platform.
2090 2012-09-17 Glenn Morris <rgm@gnu.org>
2092 * emacs.c: Use COPYRIGHT.
2094 2012-09-16 Paul Eggert <eggert@cs.ucla.edu>
2096 Remove configure's --without-sync-input option (Bug#12450).
2097 When auditing signal-handling in preparation for cleaning it up,
2098 I found that SYNC_INPUT has race conditions and would be a real
2099 pain to fix. Since it's an undocumented and deprecated
2100 configure-time option, now seems like a good time to remove it.
2101 Also see <http://bugs.gnu.org/11080#16>.
2102 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
2103 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
2104 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
2105 (malloc_hysteresis):
2106 (check_depth) [XMALLOC_OVERRUN_CHECK]:
2107 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
2108 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
2109 (dont_register_blocks, bytes_used_when_reconsidered)
2110 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
2111 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
2112 [!SYSTEM_MALLOC && !SYNC_INPUT]:
2113 Remove. All uses removed.
2114 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
2115 implementation, one that depends on whether the new macro
2116 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
2118 * atimer.c (run_timers, handle_alarm_signal):
2119 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
2120 (handle_async_input, process_pending_signals)
2121 (handle_input_available_signal, init_keyboard):
2122 * nsterm.m (ns_read_socket):
2123 * process.c (wait_reading_process_output):
2124 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
2125 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
2127 * xterm.c (XTread_socket):
2129 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
2130 * eval.c (handling_signal): Remove. All uses removed.
2131 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
2132 All uses replaced with the SYNC_INPUT version.
2133 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
2135 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2138 * font.c (Ffont_shape_gstring): Remove unused local.
2140 2012-09-16 Glenn Morris <rgm@gnu.org>
2142 * Makefile.in (clean): No longer run nextstep's clean.
2144 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
2146 (ns-app): Move here from ns.mk, and simplify.
2147 (clean): Simplify nextstep entry.
2148 * ns.mk: Remove file.
2150 2012-09-17 Kenichi Handa <handa@gnu.org>
2152 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
2153 not covert the last few charactes.
2155 2012-09-16 Kenichi Handa <handa@gnu.org>
2157 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
2158 here, but just check the validity of glyphs in the glyph-string.
2160 2012-09-16 Martin Rudalics <rudalics@gmx.at>
2162 * window.c (Fwindow_parameter, Fset_window_parameter):
2163 Accept any window as argument (Bug#12452).
2165 2012-09-16 Jan Djärv <jan.h.d@swipnet.se>
2167 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
2168 to ns_term_init to avoid memory leak.
2170 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
2171 explicit retain/release.
2172 (ns_term_init): Only allow one display. Initialize outerpool and
2175 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
2177 Port _setjmp fix to POSIXish hosts as well as Microsoft.
2178 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
2179 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
2180 the Microsoft problem in a different way, by altering ../nt/config.nt.
2182 2012-09-15 Eli Zaretskii <eliz@gnu.org>
2197 * w16select.c: Remove inclusion of setjmp.h, as it is now included
2198 by lisp.h. This completes removal of setjmp.h inclusion
2199 erroneously announced in the previous commit. (Bug#12446)
2201 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
2204 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
2205 not defined as a macro. The latter happens on MS-Windows.
2208 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
2210 Port better to POSIX hosts lacking _setjmp (Bug#12446).
2211 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
2212 Some instances of '#include <setjmp.h>' removed, if the
2213 only reason for the instance was because "lisp.h" was included.
2214 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
2215 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
2216 and _longjmp with the new symbols. Emacs already uses _setjmp if
2217 available, so this change affects only POSIXish hosts that have
2218 sigsetjmp but not _setjmp, such as some versions of Solaris and
2219 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
2220 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
2221 (png_load_body) [HAVE_PNG]:
2222 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
2223 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
2224 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
2225 since PNG requires jmp_buf. This is the only exception to the
2226 general rule that we now use sys_setjmp and sys_longjmp.
2227 This exception is OK since this code does not change the signal
2228 mask or longjmp out of a signal handler.
2230 2012-09-14 Paul Eggert <eggert@cs.ucla.edu>
2232 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
2233 Include "syssignal.h", for 'main_thread'.
2235 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
2237 Avoid out-of-range marker position (Bug#12426).
2238 * insdel.c (replace_range, replace_range_2):
2239 Adjust markers before overlays, as suggested by comments.
2240 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
2241 Remove redundant check before calling offset_intervals.
2243 2012-09-14 Martin Rudalics <rudalics@gmx.at>
2245 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
2246 current buffer (Bug#12387).
2248 2012-09-14 Juanma Barranquero <lekktu@gmail.com>
2250 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
2252 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
2254 Use a more backwards-compatible timer format (Bug#12430).
2255 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
2256 vector element, not from the 4th, since PSECS is now at the end.
2257 (Fcurrent_idle_time): Doc fix.
2259 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
2261 Function to mark objects and remove killed buffers at once.
2262 * alloc.c (discard_killed_buffers): Rename to ...
2263 (mark_discard_killed buffers) ... new name. Add marking
2264 of remaining objects. Fix comment. Adjust users.
2265 (mark_object): Do not touch frame buffer lists here.
2266 * frame.c (delete_frame): Reset frame buffer lists here.
2268 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
2270 Better workaround for GNOME bug when --enable-gcc-warnings.
2271 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
2272 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
2273 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
2275 Simplify SIGIO usage (Bug#12408).
2276 The code that dealt with SIGIO was crufty and confusing, e.g., it
2277 played tricks like "#undef SIGIO" but these tricks were not used
2278 consistently. Simplify mostly by not #undeffing standard symbols,
2279 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
2280 or not as we please) rather than "defined SIGIO" (standard symbol
2281 that we probably shouldn't #undef).
2282 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
2283 Modules that need it can include it.
2284 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
2285 * dispextern.h (ignore_sigio): New decl.
2286 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
2287 unconditionally, since it's now a no-op if !USABLE_SIGIO.
2288 * emacs.c (shut_down_emacs):
2289 * keyboard.c (kbd_buffer_store_event_hold):
2290 Use ignore_sigio rather than invoking 'signal' directly.
2291 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
2293 (FIONREAD, SIGIO): Do not #undef.
2294 (tty_read_avail_input): Use #error rather than a syntax error.
2295 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
2296 for I_PIPE, used by SETUP_SLAVE_PTY.
2297 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
2298 * sysdep.c (croak): Remove; no longer needed. This bit of
2299 temporary code, with Fred N. Fish's comment that it's temporary,
2300 has been in Emacs since at least 1992!
2301 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
2302 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
2303 * syssignal.h (croak): Remove decl.
2304 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
2305 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
2306 now that we're termios-only.
2307 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
2308 * term.c (dissociate_if_controlling_tty): Use #error rather than
2311 Work around GCC and GNOME bugs when --enable-gcc-warnings.
2312 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
2313 to work around GNOME bug 683906.
2314 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
2315 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
2316 This works around GCC bug 54561.
2318 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
2320 More fixes for 'volatile' and setjmp/longjmp.
2321 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
2322 * image.c (struct png_load_context) [HAVE_PNG]: New type.
2323 (png_load_body) [HAVE_PNG]:
2324 (jpeg_load_body) [HAVE_JPEG]:
2325 New function, with most of the old parent function's body.
2326 (png_load) [HAVE_PNG]:
2327 (jpeg_load) [HAVE_JPEG]:
2328 Invoke the new function, to avoid longjmp munging our locals.
2329 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
2330 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
2331 longjmp is passed 2, as the C standard doesn't guarantee this.
2332 Instead, store the failure code into mgr->failure_code.
2334 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2336 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
2337 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
2338 (syms_of_keyboard): Remove support for unread-command-char.
2340 2012-09-12 Eli Zaretskii <eliz@gnu.org>
2342 * w32proc.c (sys_kill): If PID is our process ID and the signal is
2343 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
2344 violation. (Bug#12426)
2346 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
2348 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
2350 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2352 * eval.c: Add `inhibit-debugger'.
2353 (Qinhibit_debugger): New symbol.
2354 (call_debugger): Bind it instead of Qdebug_on_error.
2355 (maybe_call_debugger): Test Vinhibit_debugger.
2356 (syms_of_eval): Define inhibit-debugger.
2357 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
2358 (syms_of_xdisp): Remove inhibit-debug-on-message.
2360 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2362 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
2363 If a nonvolatile local variable is written before a _longjmp to
2364 the frame containing the variable, and is read after the _longjmp,
2365 the value read is indeterminate. Some local variables of type
2366 'struct handler' and 'struct catchtag' are used in this way, so
2367 mark each of their slots as volatile if the slot can be set before
2368 _longjmp and read afterwards.
2369 * lisp.h (struct handler): var and chosen_clause are now volatile.
2370 (struct catchtag): val, next, and pdlcount are now volatile.
2372 * bidi.c (bidi_push_it, bidi_pop_it):
2373 * fns.c (copy_hash_table):
2374 * image.c (define_image_type):
2375 * keyboard.c (kbd_buffer_store_event_hold):
2376 * process.c (Fprocess_send_eof):
2377 * xfaces.c (x_create_gc) [HAVE_NS]:
2378 * xgselect.c (xg_select):
2379 Prefer assignment to memcpy when either will do.
2381 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
2382 Use pointer-to-a-pointer to simplify and avoid a NILP check each
2383 time an item is removed. No need to mark this function 'inline';
2384 the compiler knows better than we do.
2386 2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
2388 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
2389 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
2390 to change_frame_size (Bug#12388).
2391 (windowDidResize:): Pass YES to updateFrameSize.
2393 * nsterm.h: Add delay parameter to updateFrameSize.
2395 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2397 Discard killed buffers from deleted window and frame objects.
2398 This reduces an amount of references to killed buffers and
2399 helps GC to reclaim them faster.
2400 * alloc.c (discard_killed_buffers): New function.
2401 (mark_object): Use it for deleted windows and frames.
2402 (mark_object): If symbol's value is set up for a killed buffer
2403 or deleted frame, restore its global binding.
2404 * data.c (swap_in_global_binding): Add GC notice.
2405 (swap_in_symval_forwarding): Use convenient set_blv_where.
2406 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
2407 * window.h: ... to here.
2409 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2411 Convenient macro to check whether the buffer is live.
2412 * buffer.h (BUFFER_LIVE_P): New macro.
2413 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
2414 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
2416 2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2418 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
2419 composition cases (Bug#12364).
2421 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
2422 overhang of succeeding glyphs overlapping box cursor.
2424 * w32term.c (x_draw_glyph_string): Likewise.
2426 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2428 Simplify, document, and port floating-point (Bug#12381).
2429 The porting part of this patch fixes bugs on non-IEEE platforms
2430 with frexp, ldexp, logb.
2431 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
2433 * floatfns.c: Simplify discussion of functions that Emacs doesn't
2434 support, by removing commented-out code and briefly listing the
2435 C89 functions excluded. The commented-out stuff was confusing
2436 maintenance, e.g., we thought we needed cbrt but it was commented out.
2437 (logb): Remove decl; no longer needed.
2438 (isfinite): New macro, if not already supplied.
2439 (isnan): Don't replace any existing macro.
2440 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
2441 are present on all C89 platforms.
2442 (Ffrexp): Do not special-case zero, as frexp does the right thing
2444 (Flogb): Do not use logb, as it doesn't have the desired meaning
2445 on hosts that use non-base-2 floating point. Instead, stick with
2446 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
2447 frexp, to avoid getting an unspecified result.
2449 * xdisp.c (Qinhibit_debug_on_message): Now static.
2451 2012-09-10 Jan Djärv <jan.h.d@swipnet.se>
2453 * nsterm.m (ns_update_begin): Set clip path to whole view by using
2454 NSBezierPath (Bug#12131).
2456 2012-09-10 Chong Yidong <cyd@gnu.org>
2458 * fns.c (Fdelq, Fdelete): Doc fix.
2460 2012-09-10 Paul Eggert <eggert@cs.ucla.edu>
2462 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
2463 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
2465 2012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
2467 * lisp.h (make_lisp_ptr): New macro to replace XSET.
2468 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
2471 2012-09-09 Eli Zaretskii <eliz@gnu.org>
2473 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
2474 left fringe if the window has a left margin. This avoids leaving
2475 traces of the cursor because its leftmost pixel is not drawn over.
2477 * dispnew.c (update_window_line): When the left margin area of a
2478 screen line is updated, set the redraw_fringe_bitmaps_p flag of
2479 that screen line. (Bug#12277)
2481 2012-09-09 Paul Eggert <eggert@cs.ucla.edu>
2483 Assume C89 or later for math functions (Bug#12381).
2484 This simplifies the code, and makes it a bit smaller and faster,
2485 and (most important) makes it easier to clean up signal handling
2486 since we can stop worring about floating-point exceptions in
2487 library code. That was a problem before C89, but the problem
2488 went away many years ago on all practical Emacs targets.
2489 * data.c, image.c, lread.c, print.c:
2490 Don't include <math.h>; no longer needed.
2491 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
2492 might be autoconfigured, as that never happens.
2494 * doprnt.c (DBL_MAX_10_EXP):
2495 * print.c (DBL_DIG):
2496 Remove. C89 or later always defines these.
2497 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
2498 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
2499 (arith_error, domain_error, domain_error2):
2500 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
2501 no longer needed -- we simply return what C returns. All uses removed.
2502 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
2504 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
2505 Remove. All uses expanded, as these macros are no longer used
2506 more than once and are now more trouble than they're worth.
2507 (Ftan): Use tan, not sin / cos.
2508 (Flogb): Assume C89 frexp.
2509 (fmod_float): Assume C89 fmod.
2510 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
2511 (init_floatfns): Remove. All uses removed.
2513 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2515 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
2516 compositeToPoint for OSX < 10.6 (Bug#12390).
2518 2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
2520 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
2521 This produces more-accurate results.
2523 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2525 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
2526 changes (Bug#12088).
2528 2012-09-08 Chong Yidong <cyd@gnu.org>
2530 * syntax.c (Fstring_to_syntax): Doc fix.
2532 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2534 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
2535 in the internal border.
2536 (x_set_window_size): Remove static variables and their usage.
2537 (ns_redraw_scroll_bars): Fix NSTRACE arg.
2538 (ns_after_update_window_line, ns_draw_fringe_bitmap):
2539 Remove fringe/internal border adjustment (Bug#11052).
2540 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
2541 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
2542 (ns_fix_rect_ibw): Remove.
2543 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
2544 (ns_dumpglyphs_box_or_relief): Ditto.
2545 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
2547 (ns_dumpglyphs_image): Ditto.
2548 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
2550 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
2551 their usage. Add fringe_extended_p and its use as in other terms.
2552 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
2553 scroll bar was removed.
2554 (updateFrameSize): New function.
2555 (windowDidResize): Move code to updateFrameSize and call it.
2557 * nsterm.h (EmacsView): Add updateFrameSize.
2559 2012-09-07 Chong Yidong <cyd@gnu.org>
2561 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
2563 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
2565 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2567 More signal-handler cleanup (Bug#12327).
2568 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
2569 Problem introduced when merging patches. Noted by Eli Zaretskii in
2570 <http://bugs.gnu.org/12327#67>.
2571 * floatfns.c: Comment fix.
2572 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
2573 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
2574 and anyway the declaration is harmless even if SIGDANGER is not defined.
2575 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
2576 defined BROKEN_FIONREAD). systty.h formerly did this, but other
2577 source files not surprisingly expected syssignal.h to define, or
2578 not define, SIGIO, and it's cleaner to do it that way, for consistency.
2579 Include <sys/ioctl.h>, for FIONREAD.
2580 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
2581 This eliminates a problem whereby other files mysteriously had
2582 to include "syssignal.h" before including "systty.h" if they
2583 wanted to use "#ifdef SIGIO".
2585 2012-09-07 Eli Zaretskii <eliz@gnu.org>
2587 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
2589 * w32.c (sigemptyset): Empty the set.
2590 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
2592 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
2594 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
2596 * alloc.c (mark_buffer): Revert unsafe marking optimization.
2597 (mark_object): Likewise for frame objects.
2599 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2601 * syssignal.h (handle_on_main_thread): Always declare,
2602 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
2603 This ports to platforms without HAVE_PTHREAD.
2605 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2607 Signal-handler cleanup (Bug#12327).
2608 Emacs's signal handlers were written in the old 4.2BSD style with
2609 sigblock and sigmask and so forth, and this led to some
2610 inefficiencies and confusion. Rewrite these to use
2611 pthread_sigmask etc. without copying signal sets around. Also,
2612 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
2613 'signal', and instead use functions that do not attempt to take
2614 over the system name space. This patch causes Emacs's text
2615 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
2616 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
2617 Do not include <signal.h> or "syssignal.h", as these
2618 modules do not use signals.
2619 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
2620 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
2621 Do not include <signal.h>, as "syssignal.h" does that for us now.
2622 * atimer.c (sigmask_atimers): New function.
2623 (block_atimers, unblock_atimers): New functions,
2624 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
2626 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
2627 no longer needed here.
2628 * emacs.c (main): Inspect existing signal handler with sigaction,
2629 so that there's no need to block and unblock SIGHUP.
2630 * sysdep.c (struct save_signal): New member 'action', replacing
2631 old member 'handler'.
2632 (save_signal_handlers, restore_signal_handlers):
2633 Use sigaction instead of 'signal' to save and restore.
2634 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
2635 New function. All users of 'signal' modified to use set_sighandler
2636 if they're writeonly, and to use sys_signal if they're read+write.
2637 (emacs_sigaction_init, forwarded_signal): New functions.
2638 (sys_signal): Remove. All uses replaced by calls to sigaction
2639 and emacs_sigaction_init, or by direct calls to 'signal'.
2640 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
2641 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
2642 all uses replaced by pthread_sigmask etc. calls.
2643 * syssignal.h: Include <signal.h>.
2644 (emacs_sigaction_init, forwarded_signal): New decls.
2645 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
2646 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
2647 (sigmask, sys_sigmask): Remove; no longer needed.
2648 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
2649 (sigblock, sigunblock, sigfree):
2650 (sigsetmask) [!defined sigsetmask]:
2651 Remove. All uses replaced by pthread_sigmask.
2652 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
2653 no longer need to be replaced, and its typical old uses
2654 are now done via emacs_sigaction_init and sigaction.
2655 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
2656 (sys_sigdel): Remove; unused.
2657 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
2659 2012-09-06 Eli Zaretskii <eliz@gnu.org>
2661 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
2662 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
2664 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2666 Explicitly mark buffer_defaults and buffer_local_symbols.
2667 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
2668 mark_local_symbols here.
2669 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
2670 since special buffers aren't marked here any more.
2671 (allocate_buffer): Chain new buffer with all_buffers here...
2672 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
2674 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
2675 (syms_of_buffer): Remove staticpro of the above.
2676 (init_buffer_once): Set names for buffer_defaults and
2677 buffer_local_symbols.
2679 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2681 Use bool for booleans in font-related modules.
2682 * font.c (font_intern_prop, font_style_to_value)
2683 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
2684 (generate_otf_features, font_check_otf_features, font_check_otf)
2685 (font_match_p, font_list_entities, font_at):
2686 * fontset.c (fontset_id_valid_p, reorder_font_vector
2687 (fontset_find_font, Fset_fontset_font)
2688 (face_suitable_for_char_p) [0]:
2689 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
2690 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
2691 (m17n_flt_initialized, ftfont_shape_by_flt):
2692 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
2693 * nsfont.m (nsfont_draw):
2694 * w32font.c (w32font_draw):
2695 * w32term.c (x_draw_glyphless_glyph_string_foreground):
2696 Use bool for booleans.
2697 * font.h: Adjust to above API changes.
2698 (struct font, struct font_driver, struct font_driver_list):
2699 Use bool for booleans.
2700 (struct font): Remove useless member encoding_type.
2702 * fontset.c, xftfont.c: Omit unnecessary static decls.
2704 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2706 * alloc.c (mark_object): Revert window marking code
2707 since it's unsafe for the Fset_window_configuration.
2709 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2711 Fix race conditions with signal handlers and errno (Bug#12327).
2712 Be more systematic about preserving errno whenever a signal
2713 handler returns, even if it's not in the main thread. Do this by
2714 renaming signal handlers to distinguish between signal delivery
2715 and signal handling. All uses changed.
2716 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
2717 * data.c (deliver_arith_signal): Rename from arith_error.
2718 * dispnew.c (deliver_window_change_signal): Rename from
2719 window_change_signal.
2720 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
2721 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
2722 * keyboard.c (deliver_input_available_signal): Rename from
2723 input_available_signal.
2724 (deliver_user_signal): Rename from handle_user_signal.
2725 (deliver_interrupt_signal): Rename from interrupt_signal.
2726 * process.c (deliver_pipe_signal): Rename from send_process_trap.
2727 (deliver_child_signal): Rename from sigchld_handler.
2728 * atimer.c (handle_alarm_signal):
2729 * data.c (handle_arith_signal):
2730 * dispnew.c (handle_window_change_signal):
2731 * emacs.c (handle_fatal_signal, handle_danger_signal):
2732 * keyboard.c (handle_input_available_signal):
2733 * keyboard.c (handle_user_signal, handle_interrupt_signal):
2734 * process.c (handle_pipe_signal, handle_child_signal):
2735 New functions, with the actual signal-handling code taken from the
2736 original respective signal handlers, sans the sporadic attempts to
2737 preserve errno, since that's now done by handle_on_main_thread.
2738 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
2739 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
2740 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2742 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2743 Move initialization of main_thread to sysdep.c's init_signals.
2744 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
2745 our usage, and simplifies the mainline code.
2746 (record_child_status_change): New static function, as a helper
2747 for handle_child_signal, and with most of the old child handler's
2749 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
2750 (handle_child_signal): Use the above.
2751 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2752 Moved here from emacs.c.
2753 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
2754 code moved here from emacs.c's main function.
2755 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
2756 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
2757 This lets callers save and restore errno properly.
2759 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2761 Remove redundant or unused things here and there.
2762 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
2763 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
2764 * editfns.c (Fcompare_buffer_substrings): Likewise.
2765 * frame.h (struct terminal, struct font_driver_list):
2766 Remove redundant declarations.
2767 * window.h (Qleft, Qright): Likewise.
2769 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2771 Do not mark objects from deleted buffers, windows and frames.
2772 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
2773 (mark_object): Likewise for windows and frames.
2775 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2777 * alloc.c (valid_lisp_object_p): Treat killed buffers,
2778 buffer_defaults and buffer_local_symbols as valid objects.
2779 Return special value to denote them.
2781 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2783 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
2784 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
2785 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
2786 (file_name_absolute_p, Fsubstitute_in_file_name):
2787 (check_executable, check_writable, Ffile_accessible_directory_p)
2788 (Fset_file_selinux_context, Fdefault_file_modes)
2789 (Finsert_file_contents, choose_write_coding_system)
2790 (Fwrite_region, build_annotations, a_write, e_write)
2792 * filelock.c (boot_time_initialized, get_boot_time)
2793 (get_boot_time_1, lock_file_1, within_one_second):
2794 * floatfns.c (in_float):
2795 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
2796 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
2797 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
2798 * lisp.h (struct Lisp_Hash_Table.cmpfn):
2799 * window.c (compare_window_configurations):
2800 Use bool for booleans.
2801 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
2802 (Fdefault_file_modes): Now mode_t, not int, for modes.
2803 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
2804 (internal_delete_file): Now returns void, not a (boolean) int,
2805 since nobody was looking at the return value.
2806 * lisp.h, window.h: Adjust to above API changes.
2808 * xdisp.c (set_message): Simplify and reindent last change.
2810 2012-09-05 Juanma Barranquero <lekktu@gmail.com>
2812 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
2814 2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
2816 * eval.c (call_debugger): Make the function non-static so that we
2817 can call it from set_message.
2819 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
2820 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
2822 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2824 Give more-useful info on a fatal error (Bug#12328).
2825 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
2826 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
2827 of doing the work ourselves.
2828 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
2829 do most of the work.
2830 (fatal_error_backtrace): New function, taken from the guts
2831 of the old fatal_error_signal, but with a new option to output
2833 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
2834 info about the signal than just its number.
2835 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
2836 * sysdep.c: Include <execinfo.h>
2837 (emacs_backtrace): New function, taken partly from the previous
2838 code of the 'die' function.
2839 (emacs_abort): Call fatal_error_backtrace rather than abort.
2841 2012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
2843 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
2844 eager (load-time) macro-expansion.
2845 * lisp.mk (lisp): Add macroexp.
2847 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2849 Simplify redefinition of 'abort' (Bug#12316).
2850 Do not try to redefine the 'abort' function. Instead, redo
2851 the code so that it calls 'emacs_abort' rather than 'abort'.
2852 This removes the need for the NO_ABORT configure-time macro
2853 and makes it easier to change the abort code to do a backtrace.
2854 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
2855 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
2856 Remove; sysdep.c's emacs_abort now takes its place.
2857 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
2858 'abort' changed to use 'emacs_abort'.
2859 * msdos.c (dos_abort) [defined abort]: Remove; not used.
2860 (abort) [!defined abort]: Rename to ...
2861 (emacs_abort): ... new name.
2862 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
2863 the place of the old 'abort' in emacs.c.
2864 * w32.c, w32fns.c (abort): Do not #undef.
2865 * w32.c (emacs_abort): Rename from w32_abort.
2867 2012-09-04 Eli Zaretskii <eliz@gnu.org>
2869 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
2870 offsets[j].dv, since the y axis of the screen coordinates points
2871 down, while the y axis of the font definition coordinates points
2872 up. This fixes display of Arabic diacritics such as KASRA and
2873 KASRATAN. (Bug#11860)
2875 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2877 Be more systematic about _setjmp vs setjmp.
2878 * alloc.c (test_setjmp, mark_stack):
2879 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
2880 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
2881 (png_load, my_error_exit, jpeg_load):
2882 * process.c (send_process_trap, send_process):
2883 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
2884 The underscored versions are up to 30x faster on some hosts.
2885 Formerly, the code used setjmp+longjmp sometimes and
2886 _setjmp+_longjmp at other times, with no particular reason to
2887 prefer setjmp+longjmp.
2889 2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
2891 Fix minor problem found by static checking.
2892 * buffer.c (Fdelete_all_overlays): Return nil.
2894 2012-09-03 Martin Rudalics <rudalics@gmx.at>
2896 * buffer.c (Fdelete_all_overlays): New function.
2898 2012-09-03 Chong Yidong <cyd@gnu.org>
2900 * gtkutil.c: Add extern decl for Qxft.
2902 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2904 * emacs.c, eval.c: Use bool for boolean.
2905 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
2906 (malloc_using_checking) [DOUG_LEA_MALLOC]:
2907 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
2908 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
2909 (main, decode_env_path, Fdaemon_initialized):
2910 * eval.c (call_debugger, Finteractive_p, interactive_p):
2911 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
2912 (maybe_call_debugger, Fbacktrace):
2913 * process.c (read_process_output, exec_sentinel):
2914 Use bool for booleans.
2915 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
2916 All callers changed.
2917 * eval.c (interactive_p): Omit always-true boolean argument
2918 EXCLUDE_SUBRS_P. All callers changed.
2919 * dispextern.h, lisp.h: Reflect above API changes.
2920 * firstfile.c (dummy): Use the address of 'main', whose signature
2921 won't change, instead of the address of 'initialize', whose
2922 signature just changed from int to bool.
2923 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
2924 * msdos.c (fatal_error_in_progress): ... from here.
2925 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
2927 (redisplay_internal, unwind_redisplay): Simply clear
2928 REDISPLAYING_P when unwinding, instead of saving its previous,
2929 always-false value and then restoring it.
2931 Clean up some extern decls.
2932 Mostly, this hoists extern decls out of .c files and into .h files.
2933 That way, we're more likely to catch errors if the interfaces change.
2934 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
2935 declare xg_mark_data.
2936 * dispextern.h (x_frame_parm_handlers):
2938 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
2939 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
2940 (Qultra_bold, Qoblique, Qitalic):
2941 Move extern decl here from .c file.
2942 * alloc.c (xg_mark_data) [USE_GTK]:
2944 * eval.c (Qlexical_binding):
2945 * fns.c (time) [!HAVE_UNISTD_H]:
2946 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
2947 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
2948 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
2949 * lread.c (Qinternal_interpreter_environment):
2950 * minibuf.c (Qbuffer):
2951 * process.c (QCfamily, QCfilter):
2952 * widget.c (free_frame_faces):
2953 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
2954 * xfont.c (x_clear_errors):
2955 * xterm.c (x_frame_parm_handlers):
2956 Remove now-redundant extern decls.
2957 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
2958 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
2960 * xfaces.c: Remove unnecessary static decls.
2961 * xterm.c (updating_frame): Remove decl of nonexistent object.
2963 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
2964 when building globals.h, as the objects that are not built on
2965 this host are not needed to compile C files on this host.
2967 2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
2969 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
2971 * frame.h: Add missing prototype for x_wm_set_size_hint.
2973 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
2975 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
2976 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
2977 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
2978 (Fsubstitute_command_keys):
2979 * editfns.c (region_limit, find_field, Fconstrain_to_field)
2980 (save_excursion_save, save_excursion_restore)
2981 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
2982 (format_time_string, general_insert_function)
2983 (make_buffer_string, make_buffer_string_both)
2984 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
2985 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
2986 (copy_text, insert_1, insert_1_both, insert_from_string)
2987 (insert_from_string_before_markers, insert_from_string_1)
2988 (insert_from_buffer, insert_from_buffer_1, replace_range)
2989 (replace_range_2, del_range_1, del_range_byte, del_range_both)
2990 (del_range_2, modify_region):
2991 * intervals.c (intervals_equal, balance_possible_root_interval)
2992 (adjust_intervals_for_insertion, merge_properties_sticky)
2993 (graft_intervals_into_buffer, lookup_char_property)
2994 (adjust_for_invis_intang, set_point_both)
2995 (get_property_and_range, compare_string_intervals)
2996 (set_intervals_multibyte_1, set_intervals_multibyte):
2997 * keyboard.c (decode_timer):
2998 Use bool for boolean.
2999 * intervals.h, lisp.h, systime.h: Reflect above API changes.
3000 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
3002 2012-09-02 Chong Yidong <cyd@gnu.org>
3004 * keymap.c (push_key_description): Print M-TAB as C-M-i
3007 2012-09-02 Juanma Barranquero <lekktu@gmail.com>
3009 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
3010 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
3011 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
3012 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
3013 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
3014 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
3015 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
3017 2012-09-01 Eli Zaretskii <eliz@gnu.org>
3019 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
3020 more than one grapheme cluster passed to the shaper: compute the
3021 offset adjustment values separately for each cluster. (Bug#11860)
3023 * image.c: Restore mistakenly removed inclusion of w32.h. Without
3024 it, GCC doesn't see prototypes of w32_delayed_load, and complains
3025 about implicit conversions from integer to pointer.
3027 2012-09-01 Daniel Colascione <dancol@dancol.org>
3029 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
3030 system used too early.
3032 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
3034 Better seed support for (random).
3035 * emacs.c (main): Call init_random.
3036 * fns.c (Frandom): Set the seed from a string argument, if given.
3037 Remove long-obsolete Gentzel cruft.
3038 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
3039 (init_random): New function.
3041 2012-09-01 Daniel Colascione <dancol@dancol.org>
3043 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
3044 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
3045 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
3046 x_wm_set_size_hint, x_query_colors, x_real_positions,
3047 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
3048 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
3049 all of which have been moved to common code.
3051 * xfaces.c: Include TERM_HEADER instead of listing all possible
3052 window-system headers.
3054 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
3057 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
3058 directly accessing frame internals.
3060 * w32font.h: Include font.h. Define syms_of_w32font and
3063 * process.c: Include TERM_HEADER instead of listing all possible
3064 window-system headers.
3066 * nsterm.h: Remove declarations now in frame.h.
3067 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
3069 * menu.c: Include TERM_HEADER instead of listing all possible
3070 window-system headers.
3072 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
3075 * keyboard.c: Include TERM_HEADER instead of listing all possible
3076 window-system headers.
3078 * image.c: Include TERM_HEADER instead of listing all possible
3079 window-system headers. Declare Vlibrary_cache when compiling for
3082 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
3083 window system declarations.
3085 * frame.h: Move common functions here: set_frame_menubar,
3086 x_set_window_size, x_sync, x_get_focus_frame,
3087 x_set_mouse_position, x_set_mouse_pixel_position,
3088 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
3089 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
3090 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
3091 x_activate_menubar, x_real_positions, x_bitmap_icon,
3092 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
3095 * frame.c: Include TERM_HEADER instead of listing all possible
3096 window-system headers.
3098 * font.c: Include TERM_HEADER instead of listing all possible
3099 window-system headers.
3101 * emacs.c: Include TERM_HEADER.
3103 * dispnew.c: Include TERM_HEADER instead of listing all possible
3104 window-system headers.
3106 * ccl.h: Include character.h.
3108 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
3109 the current window system; include in list of objects to link into
3112 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
3114 Remove mark_ttys function and fix tty_display_info initialization.
3115 * lisp.h (mark_ttys): Remove prototype.
3116 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
3117 to mark_ttys because all possible values of 'top_frame' slot are
3118 the frames which are reachable from Vframe_list.
3119 * term.c (mark_ttys): Remove.
3120 (init_tty): Safely initialize 'top_frame' slot with Qnil.
3122 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
3124 Change struct frame bitfields from unsigned char to unsigned.
3125 * frame.h (struct frame): Change type of 'display_preempted',
3126 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
3127 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
3128 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
3129 bitfields from unsigned char to unsigned.
3131 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
3133 Remove unused member of struct x_output and struct w32_output.
3134 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
3135 * w32term.h (struct w32_output): Likewise.
3137 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
3139 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
3140 does not become zero (Bug#12234).
3142 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
3144 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
3145 for GCC 4.7.1 x86-64.
3147 2012-08-30 Glenn Morris <rgm@gnu.org>
3149 * lread.c (init_lread): For out-of-tree builds, only add the
3150 source directory's site-lisp dir to the load-path if it exists,
3151 consistent with in-tree builds. (Bug#12302)
3153 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
3155 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
3156 button_values to NULL. Call setStykeMask so dialogs get a close button.
3157 (windowShouldClose:): Set window_closed.
3158 (dealloc): New member, free button_values.
3159 (process_dialog:): Make member function. Remove window argument,
3160 replace window with self. Count buttons and allocate and store values
3162 (addButton:value:row:): value is int with the name tag. Call setTag
3163 with tag. Remove return self, declare return value as void.
3164 (addString:row:): Remove return self, declare return value as void.
3165 (addSplit): Remove return self, declare return value as void.
3166 (clicked:): Remove return self, declare return value as void.
3167 Set dialog_return to button_values[seltag]. Code formatting change.
3168 (initFromContents:isQuestion:): Adjust call to process_dialog.
3169 Code formatting change.
3170 (timeout_handler:): Set timer_fired to YES.
3171 (runDialogAt:): Set timer_fired to NO.
3172 Handle click on close button as quit.
3174 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
3175 Add window_closed and button_values. Add void as return value for
3176 add(Button|String|Split). addButton takes int instead of Lisp_Object.
3177 Add process_dialog as new member.
3179 2012-08-28 Eli Zaretskii <eliz@gnu.org>
3181 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
3182 is not one of the heaps we manage. (Bug#12242)
3184 2012-08-28 Glenn Morris <rgm@gnu.org>
3186 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
3188 2012-08-28 Martin Rudalics <rudalics@gmx.at>
3190 * window.c (Fset_window_configuration): Remove handling of
3191 auto-buffer-name window parameter. Install revision of reverted
3194 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3196 Do not allow to set major mode for a dead buffer.
3197 * buffer.c (Fset_buffer_major_mode): Signal an error
3198 if the buffer is dead.
3199 (Fother_buffer, other_buffer_safely): Remove redundant
3202 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3204 Always use set_buffer_if_live to restore original buffer at unwind.
3205 * buffer.h (record_unwind_current_buffer): New function.
3206 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
3207 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
3208 * undo.c, window.c: Adjust users.
3209 * buffer.c (set_buffer_if_live): Fix comment.
3211 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3213 Fix usage of set_buffer_internal.
3214 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
3215 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
3216 * coding.c (decode_coding): Omit redundant test.
3217 * fileio.c (decide_coding_unwind): Likewise.
3218 * fns.c (secure_hash): Likewise.
3219 * insdel.c (modify_region): Likewise.
3220 * keyboard.c (command_loop_1): Likewise.
3221 * print.c (PRINTFINISH): Likewise.
3222 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
3224 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
3226 * dispnew.c: Use bool for boolean.
3227 (frame_garbaged, display_completed, delayed_size_change)
3228 (fonts_changed_p, add_window_display_history)
3229 (add_frame_display_history, verify_row_hash)
3230 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
3231 (row_equal_p, realloc_glyph_pool)
3232 (allocate_matrices_for_frame_redisplay)
3233 (showing_window_margins_p)
3234 (adjust_frame_glyphs_for_frame_redisplay)
3235 (build_frame_matrix_from_leaf_window, make_current)
3236 (mirrored_line_dance, mirror_line_dance, update_frame)
3237 (update_window_tree, update_single_window)
3238 (check_current_matrix_flags, update_window, update_text_area)
3239 (update_window_line, set_window_update_flags, scrolling_window)
3240 (update_frame_1, scrolling, buffer_posn_from_coords)
3241 (do_pending_window_change, change_frame_size)
3242 (change_frame_size_1, sit_for):
3243 Use bool for boolean.
3244 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
3245 and remove last int (actually boolean) argument, which was always 0.
3246 All callers changed.
3247 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
3248 * dispextern.h (struct composition_it): Use bool for boolean.
3249 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
3250 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
3251 * dired.c (file_name_completion):
3252 Use bool for boolean. (This was missed in an earlier change.)
3254 2012-08-27 Martin Rudalics <rudalics@gmx.at>
3256 * window.c (Fset_window_configuration): Revert first part of
3259 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
3261 * nsterm.h (NSPanel): New class variable dialog_return.
3263 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
3264 Initialize dialog_return.
3265 (windowShouldClose:): Use stop instead of stopModalWithCode.
3266 (clicked:): Ditto, and also set dialog_return (Bug#12258).
3267 (timeout_handler:): Use stop instead of abortModal. Send a dummy
3269 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
3272 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
3274 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
3275 * composite.c (find_composition, composition_gstring_p)
3276 (composition_reseat_it, find_automatic_composition):
3277 * data.c (let_shadows_buffer_binding_p)
3278 (let_shadows_global_binding_p, set_internal, make_blv)
3279 (Fmake_variable_buffer_local, Fmake_local_variable)
3280 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
3281 (cons_to_signed, arith_driver):
3282 * dbusbind.c (xd_in_read_queued_messages):
3283 * dired.c (directory_files_internal, file_name_completion):
3284 Use bool for booleans.
3285 * dired.c (file_name_completion):
3286 * process.h (fd_callback):
3287 Omit int (actually boolean) argument. It wasn't being used.
3289 * composite.h, lisp.h: Reflect above API changes.
3291 * cmds.c, coding.c: Use bool for booleans.
3292 * cmds.c (move_point, Fself_insert_command):
3293 * coding.h (struct composition status, struct coding_system):
3294 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
3295 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
3296 (emacs_mule_char, decode_coding_emacs_mule)
3297 (encode_coding_emacs_mule, detect_coding_iso_2022)
3298 (decode_coding_iso_2022, encode_invocation_designation)
3299 (encode_designation_at_bol, encode_coding_iso_2022)
3300 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
3301 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
3302 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
3303 (encode_coding_raw_text, detect_coding_charset)
3304 (decode_coding_charset, encode_coding_charset, detect_eol)
3305 (detect_coding, get_translation_table, produce_chars)
3306 (consume_chars, reused_workbuf_in_use)
3307 (make_conversion_work_buffer, code_conversion_save)
3308 (decode_coding_object, encode_coding_object)
3309 (detect_coding_system, char_encodable_p)
3310 (Funencodable_char_position, code_convert_region)
3311 (code_convert_string, code_convert_string_norecord)
3312 (Fset_coding_system_priority):
3313 * fileio.c (Finsert_file_contents):
3314 Use bool for booleans.
3315 * coding.h, lisp.h: Reflect above API changes.
3316 * coding.c: Remove unnecessary static function decls.
3317 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
3318 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
3319 not a boolean 'int', since callers never look at the return value.
3320 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
3321 * coding.h (decoding_buffer_size, encoding_buffer_size)
3322 (emacs_mule_string_char): Remove unused extern decls.
3323 (struct iso_2022_spec, struct coding_system):
3324 Use 'unsigned int : 1' for boolean fields, since there's more than one.
3325 (struct emacs_mule_spec): Remove unused field 'full_support'.
3326 All initializations removed.
3327 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
3329 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3331 Fix spare memory change (Bug#12286).
3332 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
3333 (valid_lisp_object_p): Likewise.
3335 2012-08-27 Martin Rudalics <rudalics@gmx.at>
3337 * window.c (Fset_window_configuration): Record any window's old
3338 buffer if it's replaced (see Bug#8789). If the new current
3339 buffer doesn't appear in the selected window, go to its old
3342 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3344 Special MEM_TYPE_SPARE to denote reserved memory.
3345 * alloc.c (enum mem_type): New memory type.
3346 (refill_memory_reserve): Use new type for spare memory.
3347 This prevents live_cons_p and live_string_p from incorrect
3348 detection of uninitialized objects from spare memory as live.
3350 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
3353 * Makefile.in (.PHONY): versioclean -> versionclean.
3355 Remove unused external symbols.
3356 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
3357 * window.c (Qwindow_valid_p, decode_valid_window):
3358 Now static, not extern.
3359 * data.c (Qinterval): Remove; unused.
3360 (syms_of_data): Do not define 'interval'.
3361 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
3362 * window.h (decode_valid_window):
3365 * character.c, charset.c, chartab.c: Use bool for booleans.
3366 * character.c (lisp_string_width, string_count_byte8)
3367 (string_escape_byte8):
3368 * charset.c (charset_map_loaded, load_charset_map, read_hex):
3369 (load_charset_map_from_file, map_charset_chars)
3370 (Fdefine_charset_internal, define_charset_internal)
3371 (Fdeclare_equiv_charset, find_charsets_in_text)
3372 (Ffind_charset_region, char_charset, Fiso_charset):
3373 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
3374 (sub_char_table_set, sub_char_table_set_range)
3375 (char_table_set_range, optimize_sub_char_table)
3376 (map_sub_char_table):
3377 Use bool for boolean.
3378 * character.c (str_to_unibyte): Omit last boolean argument; it was
3379 always 0. All callers changed.
3380 * character.h, charset.h: Adjust to match previous changes.
3381 * character.h (char_printable_p): Remove decl of nonexistent function.
3382 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
3383 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
3384 are all boolean, so make them single-bit bitfields.
3386 * lisp.h (ASET): Remove attempt to detect side effects.
3387 It was meant to be temporary and it often doesn't work,
3388 because when IDX has side effects the behavior of IDX==IDX
3389 is undefined. See Stefan Monnier in
3390 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
3392 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
3394 * lisp.h (functionp): New function (extracted from Ffunctionp).
3395 (FUNCTIONP): Use it.
3396 * eval.c (Ffunctionp): Use it.
3398 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3400 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
3401 as that's faster and simpler than static storage. Don't bother
3402 with the g_main_context_query overhead if g_main_context_pending
3403 says no events are pending.
3404 (gfds, gfds_size): Remove these static vars.
3405 (xgselect_initialize): Remove; no longer needed.
3406 All uses and decls removed.
3408 * emacs.c (fatal_error_signal_hook): Remove.
3409 All uses removed. This leftover from old code was always 0.
3411 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
3412 * casefiddle.c (casify_object, casify_region):
3413 * casetab.c (set_case_table):
3414 * category.c, category.h (word_boundary_p):
3415 * category.h (CHAR_HAS_CATEGORY):
3416 Use bool for booleans, instead of int.
3418 2012-08-25 Eli Zaretskii <eliz@gnu.org>
3420 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
3422 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3424 On assertion failure, print backtrace if available.
3425 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
3426 (die) [ENABLE_CHECKING]: Print a backtrace if available.
3427 * Makefile.in (LIB_EXECINFO): New macro.
3430 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
3431 * bytecode.c (exec_byte_code):
3432 * callint.c (check_mark, Fcall_interactively):
3433 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
3434 (getenv_internal, sync_process_alive, call_process_exited):
3435 * lisp.h (USE_SAFE_ALLOCA):
3436 Use bool for booleans, instead of int.
3437 * lisp.h, process.h: Adjust prototypes to match above changes.
3438 * callint.c (Fcall_interactively): Don't assume the mark's
3439 offset fits in 'int'.
3441 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
3443 * buffer.c, buffer.h: Use bool for boolean.
3444 * buffer.c (reset_buffer_local_variables)
3445 (buffer_lisp_local_variables, Fset_buffer_modified_p)
3446 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
3447 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
3448 (overlay_touches_p, overlay_strings, Foverlay_put)
3449 (report_overlay_modification, call_overlay_mod_hooks):
3450 (mmap_enlarge, mmap_set_vars):
3451 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
3452 Use bool for booleans, instead of int.
3453 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
3454 since the 1-or-0 return value is always ignored anyway.
3455 (mmap_initialized_p):
3456 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
3457 * buffer.h, lisp.h: Adjust prototypes to match above changes.
3459 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3461 * bidi.c: Use bool for boolean.
3462 This is a bit more readable, and makes the text segment of bidi.o
3463 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
3464 Presumably it's faster too.
3465 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
3467 (bidi_cache_find_level_change, bidi_cache_iterator_state)
3468 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
3469 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
3470 (bidi_explicit_dir_char, bidi_level_of_next_char)
3471 (bidi_find_other_level_edge, bidi_move_to_visually_next):
3472 Use bool for booleans, instead of int.
3473 * dispextern.h (bidi_init_it, bidi_paragraph_init)
3474 (bidi_unshelve_cache): Adjust decls to match code.
3476 2012-08-23 Martin Rudalics <rudalics@gmx.at>
3478 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
3481 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3483 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
3484 * atimer.h: Include <stdbool.h>.
3486 2012-08-22 Dan Nicolaescu <dann@gnu.org>
3488 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
3489 compile time tests instead of run time tests on systems that do
3491 (FRAME_MAC_P): Remove leftover from deleted code.
3492 * frame.c (syms_of_frame): Remove leftover from deleted code.
3494 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
3496 * nsterm.m (insertText:): Don't clear modifiers if code is space.
3498 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
3500 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
3501 Otherwise, the compiler complains about (A?B:C) where B is void
3502 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
3503 (fontset_add): Return void, for FONTSET_ADD.
3505 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3507 * alloc.c: Use bool for booleans.
3508 (gc_in_progress, abort_on_gc)
3509 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3510 (dont_register_blocks) [GC_MALLOC_CHECK]:
3511 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
3512 (check_string_bytes, make_specified_string, memory_full)
3513 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
3514 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
3515 (mark_stack, valid_pointer_p, make_pure_string)
3516 (Fgarbage_collect, survives_gc_p, gc_sweep):
3517 Use bool for booleans, instead of int.
3518 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3519 Remove unused local.
3520 * alloc.c (PURE_POINTER_P):
3521 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
3522 * editfns.c (Fformat):
3523 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
3525 * fns.c (sweep_weak_table):
3526 * lisp.h (suppress_checking, push_message, survives_gc_p)
3527 (make_pure_string, gc_in_progress, abort_on_gc):
3528 * lread.c (readchar, read1):
3529 * print.c (Fprin1_to_string):
3530 * xdisp.c (push_message):
3531 Use bool for booleans affected directly or indirectly by
3534 Make recently-introduced setters macros.
3535 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
3536 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
3537 (set_fontset_default, set_fontset_fallback): Rename from their
3538 upper-case counterparts, and make them functions rather than macros.
3539 This is more consistent with the other recently-introduced setters.
3540 These don't need to be inline, since they're local.
3542 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
3544 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
3545 the loop (Bug#12247).
3547 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3549 * lisp.h (vcopy): Use memcpy rather than our own loop.
3550 This fixes a performance regression introduced by the recent
3551 addition of vcopy. This means 'vcopy' will need to be modified
3552 for a copying collector, but that's OK. Also, tighten the
3553 checking in the assertion.
3555 2012-08-21 Eli Zaretskii <eliz@gnu.org>
3557 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
3558 components for RTL text (Bug#11860). Adjust X-OFFSET of each
3559 non-base glyph for the width of the base character, according to
3560 what x_draw_composite_glyph_string_foreground expects.
3561 Generate WADJUST value according to composition_gstring_width's
3562 expectations, to produce correct width of the composed character.
3563 Reverse the sign of the DU offset produced by ScriptPlace.
3565 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3567 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
3569 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3571 Avoid direct writes to contents member of struct Lisp_Vector.
3572 * lisp.h (vcopy): New function to copy data into vector.
3573 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
3574 * fns.c (Ffillarray): Use ASET.
3575 * keyboard.c (timer_check_2): Use AREF and ASET.
3576 (append_tool_bar_item, Frecent_keys): Use vcopy.
3577 * lread.c (read_vector): Use ASET.
3578 * msdos.c (Frecent_doskeys): Use vcopy.
3579 * xface.c (Finternal_copy_lisp_face): Use vcopy.
3580 (Finternal_merge_in_global_face): Use ASET and vcopy.
3581 * xfont.c (xfont_list_pattern): Likewise.
3583 2012-08-21 Martin Rudalics <rudalics@gmx.at>
3585 * window.c (Fwindow_point): For the selected window always return
3586 the position of its buffer's point.
3587 (Fset_window_point): For the selected window always go in its
3588 buffer to the specified position.
3590 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3592 Setter macros for fontsets.
3593 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
3594 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
3595 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
3598 2012-08-20 Glenn Morris <rgm@gnu.org>
3600 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
3601 Don't assume that `ln -f' works.
3603 2012-08-20 Eli Zaretskii <eliz@gnu.org>
3605 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
3606 and later about non-assignments with no effect. See discussion at
3607 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
3610 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3612 Inline setter functions for Lisp_Objects slots of struct specbinding.
3613 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
3616 2012-08-20 Martin Rudalics <rudalics@gmx.at>
3618 * window.c (select_window): Always make selected window's buffer
3621 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3623 Use AREF and ASET for docstrings of category tables.
3624 * category.h (CATEGORY_DOCSTRING): Use AREF.
3625 (SET_CATEGORY_DOCSTRING): Use ASET.
3626 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
3628 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3630 Inline setter functions for hash table members.
3631 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
3632 (set_hash_hash, set_hash_index): Rename with _slot suffix.
3633 (set_hash_key_and_value, set_hash_index, set_hash_next)
3634 (set_hash_hash): New functions.
3635 * charset.c, fns.c: Adjust users.
3637 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3639 Inline getter and setter functions for per-buffer values.
3640 * buffer.h (per_buffer_default, set_per_buffer_default)
3641 (per_buffer_value, set_per_buffer_value): New functions.
3642 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
3643 * buffer.c, data.c: Adjust users.
3645 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
3647 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
3649 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
3651 Rely on <config.h> + <unistd.h> to declare 'environ',
3652 as gnulib does this if the system doesn't.
3653 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
3654 Remove declaration. MS-Windows declares it on stdlib.h which is
3655 included by conf_post.h.
3656 * emacs.c (environ) [DOUG_LEA_MALLOC]:
3657 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
3658 * vm-limit.c: Include <unistd.h>, for 'environ'.
3660 * unexaix.c, unexcoff.c: Include "mem-limits.h".
3661 (start_of_data): Remove decl; mem-limits.h provides it.
3663 * xdisp.c (handle_invisible_prop): Make it a bit faster
3664 and avoid a gcc -Wmaybe-uninitialized diagnostic.
3666 2012-08-19 Chong Yidong <cyd@gnu.org>
3668 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
3671 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
3673 * .gdbinit: Use call instead of set when calling a function in the
3676 * data.c (set_internal): Don't use set_blv_found.
3677 (Fkill_local_variable): Likewise.
3679 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
3681 * nsfont.m (ns_ascii_average_width): Ensure the string
3682 ascii_printable is initialized with a null-terminated character
3683 array. Otherwise, it can contain undesired extra characters.
3685 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3687 port new setting code to Sun C 5.8 2005/10/13
3688 * chartab.c, lisp.h (char_table_set, char_table_set_range):
3689 Return void, not Lisp_Object. Otherwise, the compiler
3690 complains about (A?B:C) where B is void and C is Lisp_Object
3691 when compiling CHAR_TABLE_SET, due to the recent change to
3692 the API of sub_char_table_set_contents.
3694 2012-08-18 Chong Yidong <cyd@gnu.org>
3696 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
3697 for the string case (Bug#3874).
3699 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3701 * buffer.h (BSET): Remove (Bug#12215).
3702 Replace all uses with calls to new setter functions.
3703 (bset_bidi_paragraph_direction, bset_case_canon_table)
3704 (bset_case_eqv_table, bset_directory, bset_display_count)
3705 (bset_display_time, bset_downcase_table)
3706 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
3707 (bset_last_selected_window, bset_local_var_alist)
3708 (bset_mark_active, bset_point_before_scroll, bset_read_only)
3709 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
3711 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
3712 (bset_auto_fill_function, bset_auto_save_file_format)
3713 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
3714 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
3715 (bset_cache_long_line_scans, bset_case_fold_search)
3716 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
3717 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
3718 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
3719 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
3720 (bset_header_line_format, bset_indicate_buffer_boundaries)
3721 (bset_indicate_empty_lines, bset_invisibility_spec)
3722 (bset_left_fringe_width, bset_major_mode, bset_mark)
3723 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
3724 (bset_name, bset_overwrite_mode, bset_pt_marker)
3725 (bset_right_fringe_width, bset_save_length)
3726 (bset_scroll_bar_width, bset_scroll_down_aggressively)
3727 (bset_scroll_up_aggressively, bset_selective_display)
3728 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
3729 (bset_word_wrap, bset_zv_marker):
3730 * category.c (bset_category_table):
3731 * syntax.c (bset_syntax_table):
3732 New setter functions.
3734 * process.h (PSET): Remove (Bug#12215).
3735 Replace all uses with calls to new setter functions.
3736 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3737 (PROCESS_INLINE): New macro.
3738 (pset_childp): New setter function.
3739 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
3740 * process.c (PROCESS_INLINE):
3741 Define to EXTERN_INLINE, so that the corresponding functions
3742 are compiled into code.
3743 (pset_buffer, pset_command, pset_decode_coding_system)
3744 (pset_decoding_buf, pset_encode_coding_system)
3745 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
3746 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
3747 (pset_type, pset_write_queue): New setter functions.
3749 * window.h (WSET): Remove (Bug#12215).
3750 Replace all uses with calls to new setter functions.
3751 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3752 (WINDOW_INLINE): New macro.
3753 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
3754 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
3755 (wset_total_lines, wset_vertical_scroll_bar)
3756 (wset_window_end_pos, wset_window_end_valid)
3757 (wset_window_end_vpos): New setter functions.
3758 * window.c (WINDOW_INLINE):
3759 Define to EXTERN_INLINE, so that the corresponding functions
3760 are compiled into code.
3761 (wset_combination_limit, wset_dedicated, wset_display_table)
3762 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
3763 (wset_new_normal, wset_new_total, wset_next_buffers)
3764 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
3765 (wset_prev_buffers, wset_right_fringe_width)
3766 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
3767 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
3768 (wset_window_parameters):
3769 * xdisp.c (wset_base_line_number, wset_base_line_pos)
3770 (wset_column_number_displayed, wset_region_showing):
3771 New setter functions.
3773 * termhooks.h (TSET): Remove (Bug#12215).
3774 Replace all uses with calls to new setter functions.
3775 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3776 (TERMHOOKS_INLINE): New macro.
3777 (tset_charset_list, tset_selection_alist): New setter functions.
3778 * terminal.c (TERMHOOKS_INLINE):
3779 Define to EXTERN_INLINE, so that the corresponding functions
3780 are compiled into code.
3781 (tset_param_alist): New setter function.
3783 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3785 * keyboard.h (KSET): Remove (Bug#12215).
3786 Replace all uses with calls to new setter functions.
3787 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3788 (KEYBOARD_INLINE): New macro.
3789 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
3790 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
3791 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
3792 New setter functions.
3793 * keyboard.c (KEYBOARD_INLINE):
3794 Define to EXTERN_INLINE, so that the corresponding functions
3795 are compiled into code.
3796 (kset_echo_string, kset_kbd_queue)
3797 (kset_keyboard_translate_table, kset_last_prefix_arg)
3798 (kset_last_repeatable_command, kset_local_function_key_map)
3799 (kset_overriding_terminal_local_map, kset_real_last_command)
3800 (kset_system_key_syms): New setter functions.
3802 * frame.h (FSET): Remove (Bug#12215).
3803 Replace all uses with calls to new setter functions.
3804 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3805 (FRAME_INLINE): New macro.
3806 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
3807 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
3808 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
3809 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
3810 (fset_param_alist, fset_root_window, fset_scroll_bars)
3811 (fset_selected_window, fset_title, fset_tool_bar_items)
3812 (fset_tool_bar_position, fset_tool_bar_window): New functions.
3813 * frame.c (FRAME_INLINE):
3814 Define to EXTERN_INLINE, so that the corresponding functions
3815 are compiled into code.
3816 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
3818 A few more naming-convention fixes for getters and setters.
3819 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
3820 and rename from buffer_overlays_set_before.
3821 (set_buffer_overlays_after): Move here from buffer.h, and rename
3822 from buffer_overlays_set_after.
3823 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
3825 (set_buffer_intervals): Rename from buffer_set_intervals.
3826 * intervals.c (set_interval_object): Move here from intervals.h,
3827 and rename from interval_set_object.
3828 (set_interval_left): Move here from intervals.h, and rename from
3830 (set_interval_right): Move here from intervals.h, and rename from
3832 (copy_interval_parent): Move here from intervals.h, and rename from
3833 interval_copy_parent.
3834 * intervals.h (set_interval_parent): Rename from interval_set_parent.
3835 (set_interval_plist): Rename from interval_set_plist.
3836 Return void, not Lisp_Object, since no caller uses the result.
3837 * lisp.h (string_intervals): Rename from string_get_intervals.
3838 (set_string_intervals): Rename from string_set_intervals.
3840 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
3841 (set_char_table_contents): Rename from char_table_set_contents.
3842 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
3843 All uses changed. See the end of
3844 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
3846 * lisp.h (CSET): Remove (Bug#12215).
3847 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
3848 (set_char_table_purpose): New functions,
3849 replacing CSET. All uses changed. For example, replace
3850 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
3851 "set_char_table_parent (char_table, parent);".
3852 The old version was confusing because it used the same name
3853 'parent' for two different things.
3855 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3857 Functions to get and set Lisp_Object fields of buffer-local variables.
3858 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
3859 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
3860 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
3861 * data.c, eval.c, frame.c: Adjust users.
3863 2012-08-17 Chong Yidong <cyd@gnu.org>
3865 * xfaces.c (merge_face_vectors): If the target font specfies a
3866 font spec, make the font's attributes take precedence over
3867 directly-specified attributes.
3868 (merge_face_ref): Recognize :font.
3870 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3872 Do not use memcpy for copying intervals.
3873 * intervals.c (reproduce_interval): New function.
3874 (reproduce_tree, reproduce_tree_obj): Use it.
3875 (reproduce_tree_obj): Remove prototype.
3877 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3879 * lisp.h (duration_to_sec_usec): Remove unused decl.
3881 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
3883 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
3884 to an allocated instance of NSString, not to the class itself.
3886 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
3888 * makefile.w32-in (C_CTYPE_H): New macro.
3889 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
3890 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
3891 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
3893 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
3895 Use ASCII tests for character types.
3896 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
3898 Don't include <ctype.h>; was not needed.
3899 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
3900 * sysdep.c, xfaces.c:
3901 Include <c-ctype.h> instead of <ctype.h>.
3902 * nsterm.m: Include <c-ctype.h>.
3903 * charset.c (read_hex):
3904 * doc.c (Fsnarf_documentation):
3905 * fileio.c (IS_DRIVE) [WINDOWSNT]:
3906 (DRIVE_LETTER) [DOS_NT]:
3907 (Ffile_name_directory, Fexpand_file_name)
3908 (Fsubstitute_in_file_name):
3909 * font.c (font_parse_xlfd, font_parse_fcname):
3910 * frame.c (x_set_font_backend):
3911 * gtkutil.c (xg_get_font):
3912 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
3913 * nsimage.m (hexchar):
3914 * nsterm.m (ns_xlfd_to_fontname):
3915 * sysdep.c (system_process_attributes):
3916 * xfaces.c (hash_string_case_insensitive):
3917 Use C-locale tests instead of locale-specific tests for character
3918 types, since we want the ASCII interpretation here, not the
3919 interpretation suitable for whatever happens to be the current locale.
3921 2012-08-16 Martin Rudalics <rudalics@gmx.at>
3923 Consistently check windows for validity/liveness
3924 (Bug#11984, Bug#12025, Bug#12026).
3925 * lisp.h (CHECK_VALID_WINDOW): New macro.
3926 * window.c (decode_window): Rename to decode_live_window.
3927 (decode_valid_window, Fwindow_valid_p): New functions.
3928 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
3929 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
3930 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
3931 (Fwindow_prev_sibling, Fwindow_combination_limit)
3932 (Fset_window_combination_limit, Fwindow_use_time)
3933 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
3934 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
3935 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
3936 (Fwindow_hscroll, Fset_window_hscroll)
3937 (Fwindow_redisplay_end_trigger)
3938 (Fset_window_redisplay_end_trigger, Fwindow_edges)
3939 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
3940 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
3941 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
3942 (Fwindow_end, Fset_window_point, Fset_window_start)
3943 (Fpos_visible_in_window_p, Fwindow_line_height)
3944 (Fwindow_dedicated_p, Fset_window_dedicated_p)
3945 (Fwindow_prev_buffers, Fset_window_prev_buffers)
3946 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
3947 (Fset_window_parameter, Fwindow_display_table)
3948 (Fset_window_display_table, Fdelete_other_windows_internal)
3949 (Fset_window_buffer, Fset_window_new_total)
3950 (Fset_window_new_normal, Fdelete_window_internal)
3951 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
3952 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
3953 (Fwindow_scroll_bars): Check whether argument window is a valid or
3954 live window. Update doc-strings.
3955 (syms_of_window): New symbol Qwindow_valid_p.
3956 * keyboard.c (Fposn_at_x_y): Check whether argument
3957 frame_or_window denotes a valid window.
3959 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3961 Fix previous char table change.
3962 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
3963 * chartab.c (optimize_sub_char_table): Likewise.
3965 2012-08-16 Chong Yidong <cyd@gnu.org>
3967 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
3969 * xfont.c (xfont_open):
3970 * xftfont.c (xftfont_open): Set the font's max_width field.
3972 * nsfont.m (nsfont_open): Similar to the Xft backend, set
3973 min_width to space_width and average_width to the average over
3974 printable ASCII characters.
3975 (ns_char_width): Code cleanup.
3976 (ns_ascii_average_width): New utility function.
3978 * font.h (struct font): Update comments.
3980 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
3982 Simple interface to set Lisp_Object fields of character tables.
3983 * lisp.h (CSET): New macro.
3984 (char_table_set_extras, char_table_set_contents)
3985 (sub_char_table_set_contents): New function.
3986 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
3987 * syntax.c: Adjust users.
3989 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
3991 * eval.c (eval_sub): Bind lexical-binding.
3992 * lread.c (Qlexical_binding): Make non-static.
3994 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
3996 * nsmenu.m (popupSession): Remove.
3997 (pop_down_menu): Remove endModalSession.
3998 (timeout_handler:): New method.
3999 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
4000 Call runModalForWindow. Check timer_fired when it returns.
4001 If not set, cancel timer and break out of loop.
4002 Otherwise loop again, with a new timeout.
4004 * nsterm.m: Include fcntl.h if present.
4005 (fd_entry, t_readfds, inNsSelect): Remove.
4006 (select_writefds, select_valid, select_timeout, selfds)
4007 (select_mutex, apploopnr): Add.
4008 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
4009 Otherwise call kbd_buffer_store_event.
4010 (ns_send_appdefined): Remove release of fd_entry.
4011 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
4012 Increment and decrement apploopnr.
4013 (ns_select): If no file descriptors, just do a NSTimer.
4014 Otherwise copy read/write masks and start select thread (fd_handler).
4015 Start main loop and wait for application defined event.
4016 Inform select thread to stop selecting after main loop is exited.
4017 (ns_term_init): Create selfds pipe and set non-blocking.
4018 Initialize select_mutex. Start the select thread (fd_handler).
4019 (fd_handler:): Loop forever, wait for info from the main thread
4020 to either start or stop selecting. When select returns, send
4021 and appdefined event.
4022 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
4023 If not call kbd_buffer_store_event.
4025 * nsterm.h (EmacsApp): fd_handler takes id argument.
4026 (EmacsDialogPanel): Add timer_fired and timeout_handler.
4028 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
4030 2012-08-15 Eli Zaretskii <eliz@gnu.org>
4032 * region-cache.c (move_cache_gap): Update gap_len using the actual
4033 growth of the boundaries array. Do not change cache_len.
4036 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
4038 Generalize and cleanup font subsystem checks.
4039 * font.h (FONT_DEBUG, font_assert): Remove.
4040 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
4041 Change font_assert to eassert. Use eassert where appropriate.
4043 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
4045 * gtkutil.c (xg_get_font): Use pango_units_to_double.
4047 2012-08-15 Chong Yidong <cyd@gnu.org>
4049 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
4050 When using the new font chooser, use gtk_font_chooser_get_font_desc to
4051 extract the font descriptor instead of just the font name.
4052 In that case, return a font spec instead of a string.
4053 (x_last_font_name): Move to this file from xfns.c.
4055 * xfns.c (Fx_select_font): The return value can also be a font
4056 spec. Move x_last_font_name management to gtkutil.c.
4058 * xfaces.c: Make font weight and style symbols non-static.
4060 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
4062 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
4065 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
4067 * alloc.c (Fgarbage_collect): Use plural form consistently.
4069 2012-08-14 Eli Zaretskii <eliz@gnu.org>
4071 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
4072 iteration through the command loop. Fixes a problem whereby mouse
4073 movements are ignored until the first mouse click.
4075 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
4077 Use bool, not int, for Lisp booleans.
4078 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
4079 makes Emacs a bit smaller and presumably a bit faster.
4080 * lisp.h: Include <stdbool.h>.
4081 (struct Lisp_Boolfwd, defvar_bool):
4082 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
4083 * regex.c [!emacs]: Include <stdbool.h>.
4084 (false, true): Remove; <stdbool.h> does this for us now.
4086 2012-08-14 Chong Yidong <cyd@gnu.org>
4088 * character.c (Fcharacterp): Doc fix (Bug#12076).
4090 * data.c (Findirect_variable): Doc fix (Bug#11040).
4092 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
4094 * editfns.c (Fformat): Doc fix (Bug#12059).
4095 (Fsave_current_buffer): Doc fix (Bug#11542).
4097 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
4099 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
4102 2012-08-14 Martin Rudalics <rudalics@gmx.at>
4104 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
4105 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
4106 * minibuf.c (choose_minibuf_frame, read_minibuf):
4107 * w32fns.c (x_create_tip_frame):
4108 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
4109 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
4111 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
4113 * intervals.c (offset_intervals): Remove obsolete comment.
4115 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
4117 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
4119 2012-08-14 Gergely Risko <gergely@risko.hu>
4121 * coding.c (decode_coding): Record buffer modification before
4122 disabling undo_list (Bug#11773).
4124 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
4126 Revert and cleanup some recent overlay changes.
4127 * buffer.h (enum overlay_type): Remove.
4128 (buffer_get_overlays, buffer_set_overlays): Likewise.
4129 (buffer_set_overlays_before, buffer_set_overlays_after):
4130 New function. Adjust users.
4131 (unchain_both): Add eassert.
4133 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
4135 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
4137 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
4139 * gtkutil.c (xg_mark_data): Don't assume C99.
4141 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
4143 * gtkutil.c (xg_frame_tb_info): New struct.
4144 (TB_INFO_KEY): New define.
4145 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
4146 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
4147 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
4149 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
4150 is up to date. Otherwise store new data.
4151 (free_frame_tool_bar): Free xg_frame_tb_info if present.
4153 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
4155 Use KSET for write access to Lisp_Object members of struct kboard.
4156 * keyboard.h (KSET): New macro.
4157 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
4158 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
4159 * xterm.c: Adjust users.
4161 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
4163 Use BSET for write access to Lisp_Object members of struct buffer.
4164 * buffer.h (BSET): New macro.
4165 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
4166 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
4167 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
4168 * window.c, xdisp.c, xfns.c: Adjust users.
4170 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
4172 * lread.c (syms_of_lread): Initialize Vlexical_binding.
4174 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
4176 * nsterm.m (not_in_argv): New function.
4177 (application:openFile, application:openTempFile:):
4178 (application:openFileWithoutUI:, application:openFiles:): Open file
4179 if not_in_argv returns non-zero (bug#12171).
4181 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
4182 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
4183 Define for Gtk+ versions less than 3.2.
4184 (xg_get_font_name): Use those functions/macros here.
4185 Reported by Frans Oilinki <moilinki@gmail.com>.
4187 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
4189 * unexmacosx.c (copy_data_segment): Copy initialized data in
4190 statically linked libraries from input file rather than memory.
4192 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
4193 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
4194 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
4196 2012-08-10 Glenn Morris <rgm@gnu.org>
4198 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
4199 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
4201 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4203 Fix last change to allow compilation with low optimization levels.
4204 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
4205 Reported by Jan Djärv <jan.h.d@swipnet.se>.
4207 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4209 Use common inline syntax in intervals.h.
4210 * intervals.h (INTERVALS_INLINE): New macro.
4211 Change all users from LISP_INLINE.
4213 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4215 Define Qnone once for all platforms.
4216 * frame.c (Qnone): Define here.
4217 (syms_of_frame): DEFSYM it.
4218 * lisp.h (Qnone): New declaration.
4219 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
4220 * xfns.c: Remove duplication. Adjust users.
4222 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4224 Remove unused macros from intervals.h.
4225 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
4226 * intervals.c: Adjust comment.
4228 2012-08-10 Eli Zaretskii <eliz@gnu.org>
4230 * w32fns.c <w32_unicode_gui>: New static variable.
4231 (globals_of_w32fns): Initialize it according to os_subtype.
4232 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
4235 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
4236 Eli Zaretskii <eliz@gnu.org>
4238 Fix bug #10299 with Unicode characters sent by customized
4239 keyboards created by MSKLC.
4240 * w32fns.c (INIT_WINDOW_CLASS): New macro.
4241 (w32_init_class): Use it to initialize the Emacs class with either
4242 ANSI or Unicode API calls.
4243 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
4245 (w32_wnd_proc): If the character code sent by WM_CHAR or
4246 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
4247 original message. Call DefWindowProcW on NT and later.
4249 2012-08-10 Glenn Morris <rgm@gnu.org>
4251 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
4253 * lisp.h (DIRECTORY_SEP): Let configure set it.
4255 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
4257 Use TSET for write access to Lisp_Object slots of struct terminal.
4258 * termhooks.h (TSET): New macro.
4259 * coding.c, terminal.c, xselect.c: Adjust users.
4261 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
4263 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
4264 the failing expression, include them in the error message.
4265 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
4266 * lisp.h (internal_condition_case_n): Update declaration.
4268 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4270 Inline functions to examine and change buffer overlays.
4271 * buffer.c (unchain_both): New function.
4272 * buffer.h (buffer_get_overlays, buffer_set_overlays):
4273 (buffer_has_overlays): New function.
4274 (enum overlay_type): New enum.
4275 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
4276 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
4278 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4280 Inline functions to examine and change buffer intervals.
4281 * alloc.c (mark_interval_tree): Remove.
4282 (MARK_INTERVAL_TREE): Simplify.
4283 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
4284 * intervals.c (buffer_balance_intervals): New function.
4285 (graft_intervals_into_buffer): Adjust indentation.
4286 (set_intervals_multibyte): Simplify.
4287 * buffer.h (BUF_INTERVALS): Remove.
4288 (buffer_get_intervals, buffer_set_intervals): New function.
4289 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
4290 * intervals.c, textprop.c: Adjust users.
4292 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4294 Inline functions to examine and change string intervals.
4295 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
4296 (string_get_intervals, string_set_intervals): New function.
4297 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
4298 * lread.c, print.c, textprop.c: Adjust users.
4300 2012-08-08 Glenn Morris <rgm@gnu.org>
4302 * lisp.mk (lisp): Remove language/persian.elc.
4304 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4307 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
4308 (NULL_INTERVAL_P): Likewise. Adjust users.
4309 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
4310 Adjust comment. Move under #if 0.
4311 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
4312 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
4314 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4316 Check total length of intervals with eassert.
4317 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
4318 * intervals.c: Change all users to eassert.
4320 2012-08-07 Eli Zaretskii <eliz@gnu.org>
4322 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
4323 Rename fields to match removal of FGET and WGET and disuse of
4324 INTERNAL_FIELD in Lisp_Cons.
4326 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4328 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
4329 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
4330 name since all xname users are fixed long time ago. Do not
4332 (set_symbol_name, set_symbol_function, set_symbol_plist):
4333 (set_symbol_next, set_overlay_plist): New function.
4334 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
4335 (struct Lisp_Overlay): Likewise.
4336 (CVAR, MVAR, SVAR): Remove.
4337 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
4338 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
4339 * xterm.c: Adjust users.
4340 * .gdbinit: Change to use name field of struct Lisp_Symbol
4343 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4345 Basic functions to set Lisp_Object and pointer slots of intervals.
4346 * intervals.h (interval_set_parent, interval_set_object):
4347 (interval_set_left, interval_set_right, interval_set_plist):
4348 (interval_copy_parent): New function.
4349 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
4350 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
4352 (INTERVAL_SIZE): Remove. Adjust users.
4353 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
4355 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4357 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
4358 * process.h (PGET): Remove.
4359 (struct Lisp_Process): Do not use INTERNAL_FIELD.
4360 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
4362 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4364 Drop WGET and revert read access to Lisp_Objects slots of struct window.
4365 * window.h (WGET): Remove.
4366 (struct window): Do not use INTERNAL_FIELD.
4367 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4368 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4369 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
4370 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
4371 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
4374 2012-08-07 Chong Yidong <cyd@gnu.org>
4376 * window.c (Fwindow_edges, Fwindow_pixel_edges)
4377 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
4378 (Fdelete_window_internal): Signal an error if the window is not on
4379 a live frame (Bug#12025).
4381 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4383 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
4384 * frame.h (FGET): Remove.
4385 (struct frame): Do not use INTERNAL_FIELD.
4386 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4387 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4388 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4389 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4391 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
4393 * w32.c: Silence compiler warnings.
4394 (map_w32_filename): Remove unused variable `is_fat'.
4395 (chase_symlinks): Add parentheses around expression.
4397 2012-08-06 Glenn Morris <rgm@gnu.org>
4399 * sysdep.c: Respect BROKEN_GETWD.
4401 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
4402 Let configure handle it.
4403 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
4405 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4407 Use GCALIGNMENT where appropriate.
4408 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
4409 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
4410 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
4412 2012-08-06 Eli Zaretskii <eliz@gnu.org>
4414 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
4415 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
4417 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
4419 * buffer.h (struct buffer): Revert `indirections' to a simple int;
4420 that should be sufficient for everyone.
4422 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4424 * keyboard.c (timer_check_2): Add break so timer_check returns next
4427 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4429 Fix Windows build errors introduced after converting to WGET and WSET.
4430 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
4431 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4433 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4435 * nsterm.m (ns_frame_rehighlight): Use FSET.
4437 * nsmenu.m (ns_update_menubar): Use FSET.
4439 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4441 Separate read and write access to Lisp_Object slots of Lisp_Process.
4442 * process.h (PGET, PSET): New macros similar to AREF and ASET.
4443 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
4445 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4447 Separate read and write access to Lisp_Object slots of struct window.
4448 * window.h (WGET, WSET): New macros similar to AREF and ASET.
4449 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4450 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4451 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
4452 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
4453 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
4456 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4458 Fix Windows build errors introduced after converting to FGET and FSET.
4459 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
4460 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
4461 (w32_judge_scroll_bars): Change to use FSET.
4462 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4464 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4466 Fix replacement typo.
4467 * window.c (replace_window): Set root_window instead of
4468 selected_window. This fixes a total window subsystem
4469 malfunction reported by Bastien Guerry <bzg@gnu.org>.
4471 2012-08-06 Glenn Morris <rgm@gnu.org>
4473 * lisp.mk (lisp): Add language/persian.elc.
4475 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4477 Separate read and write access to Lisp_Object slots of struct frame.
4478 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
4479 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4480 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4481 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4482 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4484 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
4486 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
4488 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
4490 Generalize common compile-time constants.
4491 * lisp.h (header_size, bool_header_size, word_size): Now here.
4492 (struct Lisp_Vector): Add comment.
4493 (struct Lisp_Bool_Vector): Move up to define handy constants.
4494 (VECSIZE, PSEUDOVECSIZE): Simplify.
4495 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
4496 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
4497 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
4498 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
4499 * xfont.c, xmenu.c: Use word_size where appropriate.
4501 2012-08-05 Lawrence Mitchell <wence@gmx.li>
4503 * search.c (Freplace_match): Treat \? in the replacement text
4504 literally (Bug#8161).
4506 2012-08-05 Chong Yidong <cyd@gnu.org>
4508 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
4509 * frame.c (Vdelete_frame_functions):
4510 * emacs.c (Vkill_emacs_hook): Doc fix.
4512 2012-08-04 Eli Zaretskii <eliz@gnu.org>
4514 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
4515 --with-x-toolkit=no builds.
4516 Reported by Carsten Mattner <carstenmattner@gmail.com>.
4518 2012-08-04 Chong Yidong <cyd@gnu.org>
4520 * syntax.c (Fmodify_syntax_entry): Doc fix.
4522 2012-08-04 Eli Zaretskii <eliz@gnu.org>
4524 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
4525 * w32.c (init_environment): Change the default values of many
4526 environment variables in dflt_envvars[] to NULL, to avoid pushing
4527 them into environment when they were not already defined.
4528 Remove the code that deletes site-lisp subdirectories from the default
4529 value of EMACSLOADPATH, as it is no longer needed.
4530 (check_windows_init_file): Now external, not static.
4531 Use Vload_path as is, without adding anything, as this function is now
4532 called when Vload_path is already set up.
4534 * w32.h (check_windows_init_file): Add prototype.
4536 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
4537 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
4538 compatibility with Posix platforms.
4539 (main): Move the call to check_windows_init_file to here from
4541 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
4542 any, in the DEFALT argument into the root of the Emacs build or
4543 installation tree, as appropriate.
4545 * callproc.c (init_callproc_1): Call decode_env_path instead of
4546 doing its equivalent by hand.
4547 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
4548 the code that sets Vexec_path run on MS-Windows.
4550 * lread.c (init_lread): Add comments to #ifdef's.
4552 * msdos.c (dos_set_window_size, IT_update_begin)
4553 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
4554 instead of direct references.
4556 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
4558 Export DEFAULT_REHASH_* to GDB.
4559 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
4560 Now constants, not macros.
4562 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
4564 Remove unnecessary casts involving pointers.
4565 These casts are no longer needed now that we assume C89 or later,
4566 since they involve casting to or from void *.
4567 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
4568 (make_pure_float, make_pure_vector):
4569 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
4570 * macros.c (Fstart_kbd_macro):
4571 * menu.c (find_and_return_menu_selection):
4572 * minibuf.c (read_minibuf_noninteractive):
4573 * sysdep.c (closedir):
4574 * xdisp.c (x_produce_glyphs):
4575 * xfaces.c (compare_fonts_by_sort_order):
4576 * xfns.c (x_real_positions, select_visual):
4577 * xselect.c (x_stop_queuing_selection_requests)
4578 (x_get_window_property, x_get_window_property_as_lisp_data):
4579 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
4580 Remove unnecessary pointer casts.
4581 * alloc.c (record_xmalloc): New function.
4582 * lisp.h (record_xmalloc): New decl.
4583 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
4584 more like a function. This is because the pointer cast is not
4585 needed. All uses changed.
4586 * print.c (print_string, print_error_message): Avoid length recalc.
4588 Improve fix for macroexp crash with debugging (Bug#12118).
4589 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
4590 ARRAY_MARK_FLAG when checking subscripts, because ASET is
4591 not supposed to be invoked from the garbage collector.
4592 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
4593 (gc_aset): New function, which is like ASET but can be
4594 used in the garbage collector.
4595 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4596 (set_hash_index): Use it instead of ASET.
4598 2012-08-03 Eli Zaretskii <eliz@gnu.org>
4600 Support symlinks on latest versions of MS-Windows.
4601 * w32.c: Include winioctl.h and aclapi.h.
4602 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
4603 (revert_to_self): Forward declarations of static functions.
4604 <static BOOL g_b_init_get_security_info>:
4605 <g_b_init_create_symbolic_link>: New static flags.
4606 (globals_of_w32): Initialize them to zero.
4607 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
4608 (map_w32_filename): Improve commentary. Simplify switch.
4609 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
4610 headers (most versions of MinGW w32api don't).
4611 (get_security_info, create_symbolic_link)
4612 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
4614 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
4615 in the argument file name.
4616 (sys_access): Call unc_volume_file_attributes only if
4617 GetFileAttributes fails with network-related error codes.
4618 (sys_rename): Diagnose renaming of a symlink when the user doesn't
4619 have the required privileges.
4620 (get_file_security_desc_by_name): Rename from
4621 get_file_security_desc.
4622 (stat_worker): New function, with most of the guts of 'stat', and
4623 with addition of handling of symlinks and support for 'lstat'.
4624 If possible, get file's attributes and security information by
4625 handle, not by name. Produce S_IFLNK bit for symlinks, when
4626 called from 'lstat'.
4627 (stat, lstat): New functions, call 'stat_worker'.
4628 (symlink, readlink, careadlinkat): Rewritten to create and resolve
4629 symlinks when the underlying filesystem supports them.
4631 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4633 Fix macroexp crash on Windows with debugging (Bug#12118).
4634 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
4635 checking subscripts; problem introduced with the recent
4636 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
4637 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
4638 since it's used in non-static inline functions now.
4640 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
4641 Don't assume buffer size fits in 'int'. Remove unused local.
4643 Use C99-style 'extern inline' if available.
4644 * buffer.h (BUFFER_INLINE):
4645 * category.h (CATEGORY_INLINE):
4646 * character.h (CHARACTER_INLINE):
4647 * charset.h (CHARSET_INLINE):
4648 * composite.h (COMPOSITE_INLINE):
4649 * dispextern.h (DISPEXTERN_INLINE):
4650 * lisp.h (LISP_INLINE):
4651 * systime.h (SYSTIME_INLINE):
4652 New macro, replacing 'static inline' in this header.
4653 * buffer.h, category.h, character.h, charset.h, composite.h:
4654 * dispextern.h, lisp.h, systime.h:
4655 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4656 * alloc.c (LISP_INLINE):
4657 * buffer.c (BUFFER_INLINE):
4658 * category.c (CATEGORY_INLINE):
4659 * character.c (CHARACTER_INLINE):
4660 * charset.c (CHARSET_INLINE):
4661 * composite.c (COMPOSITE_INLINE):
4662 * dispnew.c (DISPEXTERN_INLINE):
4663 * sysdep.c (SYSTIME_INLINE):
4664 Define to EXTERN_INLINE, so that the corresponding functions
4665 are compiled into code.
4666 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
4667 (INLINE_HEADER_END): New macros.
4668 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
4669 since it's used in non-static inline functions now.
4670 (VALMASK) [!USE_LSB_TAG]: Likewise.
4672 2012-08-02 Glenn Morris <rgm@gnu.org>
4674 * s/: Remove empty directory.
4676 * s/ms-w32.h: Move to ../nt/inc.
4677 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
4678 Update for new ms-w32.h location.
4680 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4683 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
4685 2012-08-02 Glenn Morris <rgm@gnu.org>
4687 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
4688 hard-coding the path separator.
4690 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4692 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
4693 This how ASET and AREF are supposed to work, and makes
4694 it easier to think about future improvements. See
4695 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
4696 * charset.h (set_charset_attr): New function.
4697 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
4698 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
4699 (aref_addr): New function. All uses of &AREF(...) changed.
4700 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4701 (set_hash_index): New functions. All lvalue-style uses of
4702 HASH_KEY etc. changed.
4703 * keyboard.c (set_prop): New function. All lvalue-style uses
4706 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
4708 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
4709 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
4710 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
4711 * nsfns.m (ns_set_name_as_filename): Likewise.
4712 * nsmenu.m (ns_update_menubar): Likewise.
4713 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
4715 2012-08-01 Eli Zaretskii <eliz@gnu.org>
4717 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
4718 Adapt to latest changes in field names of the corresponding Lisp
4721 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
4723 2012-08-01 Glenn Morris <rgm@gnu.org>
4725 * s/msdos.h: Remove file.
4726 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
4727 * Makefile.in (S_FILE): Remove.
4728 (config_h): Remove S_FILE.
4730 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
4732 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
4733 Remove; moved to nt/config.nt.
4735 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4737 Use INTERNAL_FIELD for conses and overlays.
4738 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
4739 Remove obsolete comment.
4741 (struct Lisp_Overlay): Use INTERNAL_FIELD.
4742 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
4744 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4746 Use INTERNAL_FIELD for symbols.
4747 * lisp.h (SVAR): New macro. Adjust users.
4748 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
4749 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
4751 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4753 Use INTERNAL_FIELD for processes.
4754 * process.h (PVAR): New macro. Adjust style.
4755 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
4756 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
4758 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4760 Use INTERNAL_FIELD for windows.
4761 * window.h (WVAR): New macro.
4762 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
4763 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4764 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4765 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
4766 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
4767 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4769 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4771 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
4773 2012-08-01 Glenn Morris <rgm@gnu.org>
4775 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
4776 Move to configure.ac.
4778 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
4780 * makefile.w32-in (CONFIG_H): Update dependencies.
4781 (CONF_POST_H): New macro.
4783 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
4785 2012-07-31 Glenn Morris <rgm@gnu.org>
4787 * Makefile.in (S_FILE): No longer set by configure.
4789 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
4791 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
4793 * process.h (NULL_DEVICE):
4794 * emacs.c (SEPCHAR):
4795 * editfns.c (USER_FULL_NAME): Let configure set them.
4797 * s/README, s/template.h: Remove files.
4799 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
4801 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
4802 Move to configure.ac.
4804 2012-07-31 Eli Zaretskii <eliz@gnu.org>
4806 * .gdbinit (xframe): Adapt to introduction of FVAR and the
4807 resulting renaming of 'struct frame' members.
4809 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
4811 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
4812 after introduction of FVAR.
4814 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4816 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
4818 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
4819 instead of compositeToPoint.
4820 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
4822 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
4824 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4826 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
4827 * lisp.h (INTERNAL_FIELD): New macro.
4828 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
4829 (BVAR): Change to use INTERNAL_FIELD.
4830 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
4831 (KVAR): Change to use INTERNAL_FIELD.
4832 * frame.h (FVAR): New macro.
4833 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
4834 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
4835 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
4836 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4837 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4839 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4841 Miscellaneous fixes for non-default X toolkits.
4842 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
4843 * xterm.c (x_frame_of_widget): Remove redundant prototype.
4844 Move under #ifdef USE_LUCID.
4845 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
4846 definition and usage to avoid warnings.
4848 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4850 * nsterm.m (openFiles): Fix previous checkin.
4852 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
4854 * indent.c (compute_motion): Remove unused local.
4856 2012-07-31 Glenn Morris <rgm@gnu.org>
4858 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
4860 * conf_post.h [USG5_4]:
4861 Move remaining contents of s/usg5-4-common.h here.
4862 * s/usg5-4-common.h: Remove file.
4864 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
4865 * s/irix6-5.h: Remove file.
4867 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
4868 * s/darwin.h: Remove file.
4870 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
4871 * s/hpux10-20.h: Remove file, which is now empty.
4873 2012-07-30 Glenn Morris <rgm@gnu.org>
4875 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
4876 * Makefile.in (config_h): Add conf_post.h.
4877 * makefile.w32-in (CONFIG_H): Add conf_post.h.
4879 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
4881 * nsterm.m (ns_do_open_file): New variable.
4882 (ns_term_init): Set ns_do_open_file to YES after run returns.
4883 (openFile, openTempFile, openFileWithoutUI, openFiles):
4884 Open files only if ns_do_open_file.
4886 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4888 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
4889 This no-op macro hasn't been needed for many years.
4890 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
4892 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
4893 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
4894 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
4895 gdb_make_enums_visible.
4896 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
4897 (DIRECTORY_SEP): Now a constant, not a macro.
4899 2012-07-30 Eli Zaretskii <eliz@gnu.org>
4901 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
4902 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
4904 * w32term.c <w32_keyboard_codepage>: Renamed from
4905 keyboard_codepage and now external. All users changed.
4907 * w32term.h: Add declaration of w32_keyboard_codepage.
4909 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
4910 the codepage to translate keys to Unicode. If this argument is
4911 -1, use the value returned by GetConsoleCP. All callers changed.
4913 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4915 Update .PHONY listings in makefiles.
4916 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
4917 bootstrap-clean, distclean, maintainer-clean, versioclean,
4920 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
4921 This is a bit clearer. Fix some commentary typos.
4923 2012-07-30 Glenn Morris <rgm@gnu.org>
4925 * s/netbsd.h: Let configure include signal.h if needed.
4926 Remove file, which is now empty.
4928 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
4929 Let configure set them.
4930 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
4931 No more need to undefine.
4933 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
4935 * keymap.c (Fkey_description): Don't remove 0x80 bit from
4936 non-single-byte char when adding meta modifier. (Bug#12090)
4938 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4940 Convert safe_call to use variable number of arguments.
4941 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
4942 (safe_call2): Fix comment.
4943 * lisp.h (safe_call): Adjust prototype.
4944 * coding.c (encode_coding_object): Change to use safe_call2.
4945 * xfaces.c (merge_face_heights): Change to use safe_call1.
4947 2012-07-30 Glenn Morris <rgm@gnu.org>
4949 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
4950 does that unconditionally. Remove file, which is now empty.
4952 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
4955 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
4957 Export to GDB most of lisp.h's remaining object-like macros.
4958 * lisp.h (min, max): Move earlier, because they're used earlier now.
4959 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
4960 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
4961 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
4962 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
4963 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
4964 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
4965 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
4966 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
4967 Now constants, for GDB. They need not be macros.
4968 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
4969 Now constants, for GDB, as well as macros, for static initializers.
4970 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
4971 Move to after the definition of struct Lisp_Char_Table,
4972 since the former now needs that type defined.
4973 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
4974 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
4975 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
4976 New enums, for gdb_make_enums_visible.
4977 (GLYPH_MODE_LINE_FACE): Remove; unused.
4978 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
4979 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
4980 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
4981 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
4982 enum maxargs, enum MAX_ALLOCA.
4983 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
4984 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
4985 no longer needed, now that they are done in lisp.h.
4987 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
4989 Cleanup string bytes checking.
4990 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
4991 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
4992 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
4993 (check_sblock, compact_small_strings): Simplify.
4995 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
4997 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
4998 These macros are confusing and no longer need to be defined, as
4999 the enum values now suffice. All uses replaced with definiens.
5000 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
5002 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
5004 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
5005 ($(BLD)/w32console.$(O)): Update dependencies.
5007 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
5009 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
5010 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
5012 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
5014 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
5016 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
5017 setting sitelisp (Bug#12010).
5019 2012-07-29 Eli Zaretskii <eliz@gnu.org>
5021 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
5023 * w32heap.c (cache_system_info):
5024 * w32.c (sys_rename):
5025 * w32proc.c (find_child_console, sys_kill): All users changed.
5027 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
5029 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
5031 2012-07-29 Eli Zaretskii <eliz@gnu.org>
5033 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
5035 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
5037 Cleanup statistics calculation in Fgarbage_collect.
5038 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
5039 Fix zombies percentage calculation. Simplify elapsed time calculation.
5041 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
5043 Generalize marker debugging code under MARKER_DEBUG and use eassert.
5044 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
5045 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
5046 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
5047 (replace_range, replace_range_2, del_range_2): Change to eassert.
5048 * marker.c (byte_char_debug_check): Adjust style.
5050 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
5052 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
5053 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
5054 long-ago-commented-out code that talks about "WIN32".
5055 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
5058 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
5060 Use Gnulib stdalign module (Bug#9772, Bug#9960).
5061 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
5062 Simplify by using alignof.
5063 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
5064 * lisp.h: Include <stdalign.h>.
5065 (GCALIGNMENT): New macro and constant.
5066 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
5067 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
5068 (stdalign): New macro, if not already defined.
5070 2012-07-28 Eli Zaretskii <eliz@gnu.org>
5072 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
5073 * w32inevt.c: Include w32inevt.h.
5074 (w32_read_console_input): New inline function, calls either
5075 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
5076 w32_console_unicode_input.
5077 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
5078 (w32_kbd_patch_key, key_event): Use the codepage returned by
5079 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
5080 (key_event): use uChar.UnicodeChar only if
5081 w32_console_unicode_input is non-zero.
5083 * w32console.c: Include w32heap.h.
5084 <w32_console_unicode_input>: New global variable.
5085 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
5086 family of Windows, zero otherwise.
5088 * w32inevt.h: Declare w32_console_unicode_input.
5090 * xdisp.c (init_iterator): Don't reference tip_frame in a build
5091 --without-x. (Bug#11742)
5093 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
5095 Adjust GDB to reflect pvec_type changes (Bug#12036).
5096 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
5097 2012-07-04 changes to pseudovector representation.
5098 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
5100 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
5102 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
5104 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
5106 2012-07-27 Eli Zaretskii <eliz@gnu.org>
5108 * alloc.c (listn): Fix the order the arguments are consed onto the
5111 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
5112 enumeration constants, as PURE and HEAP are too general, and clash
5113 with other headers and sources, such as gmalloc.c and the
5114 MS-Windows system headers. All users changed.
5116 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5118 Revert last save_excursion_save and save_excursion_restore changes.
5119 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
5120 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
5122 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5124 Fix recently-introduced typos in Windows port.
5125 Reported by Martin Rudalics <rudalics@gmx.at>.
5126 * w32.c (init_environment): Replace comma with semicolon.
5127 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
5129 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
5131 Improve GDB symbol export (Bug#12036).
5132 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
5133 arms of an 'if', not using conditional expressions; otherwise GDB
5134 complains about the types in the unevaluated arm when the argument
5135 is an integer literal.
5136 (xgetint): Simplify expression.
5137 * alloc.c (gdb_make_enums_visible): New constant. This ports to
5138 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
5139 Zaretskii in <http://bugs.gnu.org/12036#13>.
5140 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
5141 needed now that we have gdb_make_enums_visible.
5142 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
5143 (enum enum_USE_LSB_TAG):
5144 New enum types, packaging up enums that need to be exported to GDB.
5146 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5148 Utility function to make a list from specified amount of objects.
5149 * lisp.h (enum constype): New datatype.
5150 (listn): New prototype.
5151 * alloc.c (listn): New function.
5152 (Fmemory_use_count, syms_of_alloc): Use it.
5153 * buffer.c (syms_of_buffer): Likewise.
5154 * callint.c (syms_of_callint): Likewise.
5155 * charset.c (define_charset_internal): Likewise.
5156 * coding.c (syms_of_coding): Likewise.
5157 * keymap.c (syms_of_keymap): Likewise.
5158 * search.c (syms_of_search): Likewise.
5159 * syntax.c (syms_of_syntax): Likewise.
5160 * w32.c (init_environment): Likewise.
5161 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
5162 * xdisp.c (syms_of_xdisp): Likewise.
5163 * xfns.c (syms_of_xfns): Likewise.
5165 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5167 Fast save_excursion_save and save_excursion_restore.
5168 * lisp.h (struct Lisp_Excursion): New data type.
5169 (PVEC_EXCURSION): New pseudovector type.
5170 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
5171 to deal with it. Adjust comments.
5172 (init_marker, attach_marker): New prototype.
5173 (unchain_marker): Adjust prototype.
5174 * marker.c (attach_marker): Change to global.
5175 (init_marker): New function.
5176 * alloc.c (Fmake_marker, build_marker): Use it.
5177 (build_marker): More easserts.
5178 (mark_object): Handle struct Lisp_Excursion.
5179 * editfns.c (save_excursion_save, save_excursion_restore):
5180 Reimplement to use struct Lisp_Excursion. Add comments.
5182 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
5184 Fix export of symbols to GDB (Bug#12036).
5185 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
5186 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
5187 emacs.c, as this is a more-suitable home. Had this been done earlier
5188 the fix for 12036 would have avoided some of the problems noted in
5189 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
5190 would have been more obvious.
5191 * emacs.c: Do not include <verify.h>; no longer needed.
5192 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
5193 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
5194 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
5195 Remove; now done in lisp.h.
5196 * lisp.h (PUBLISH_TO_GDB): New macro.
5197 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
5198 (DATA_SEG_BITS): Use it.
5199 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
5200 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
5201 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
5202 not be usable in #if. This simplifies things.
5204 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
5206 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
5208 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
5210 Simplify export of symbols to GDB (Bug#12036).
5211 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
5212 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
5213 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
5214 Adjust to changes in lisp.h and emacs.c, by using
5215 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
5216 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
5217 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
5218 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
5219 instead of gdb_valbits.
5220 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
5221 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
5222 instead of gdb_array_mark_flag.
5223 (xboolvector): Get size from $->size, not $->header.size.
5224 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
5225 (xreload, hook-run, hookpost-run): Remove.
5226 * emacs.c: Include <verify.h>.
5227 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
5228 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
5230 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
5231 (gdb_USE_LSB_TAG): New enum constants.
5232 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
5233 Also define these as enum constants, so they're visible to GDB.
5234 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
5235 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
5236 as constants, so they're visible to GDB.
5237 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
5238 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
5239 Now enum constants, not macros, so they're visible to GDB.
5240 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
5241 more convenient now. All uses changed.
5242 (VALMASK) [USE_LSB_TAG]: Also define in this case.
5243 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
5245 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
5247 Explicitly free restriction data that are not needed anymore.
5248 * editfns.c (save_restriction_restore): Free restriction data.
5250 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
5252 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
5253 add argument, tune behavior, and adjust all callers.
5255 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
5257 Use typedef for EMACS_INT, EMACS_UINT.
5258 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
5259 than macros. This simplifies debugging in the usual case, since
5260 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
5261 and it allows expressions involving EMACS_INT casts.
5262 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
5264 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
5266 * nsterm.m (ns_read_socket): Return early if there is a modal
5269 2012-07-25 Martin Rudalics <rudalics@gmx.at>
5271 * frame.c (Fredirect_frame_focus): In doc-string don't mention
5272 that FOCUS-FRAME can be omitted.
5274 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
5276 Adjust buffer text indirection counters at the end of Fkill_buffer.
5277 * buffer.c (Fkill_buffer): Adjust indirection counters when the
5278 buffer is definitely dead. This should really fix an issue reported
5279 by Christoph Scholtes again. (Bug#12007).
5280 (init_buffer_once): Initialize indirection counters of
5281 buffer_defaults and buffer_local_symbols (for sanity and safety).
5283 2012-07-24 Eli Zaretskii <eliz@gnu.org>
5285 * xdisp.c (init_iterator): Don't compute dimensions of truncation
5286 and continuation glyphs on tooltip frames, leave them at zero.
5287 Avoids continued lines in tooltips. (Bug#11832)
5289 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
5291 Simplify copy_overlay.
5292 * buffer.c (copy_overlay): Simplify. Use build_marker.
5293 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
5295 2012-07-23 Eli Zaretskii <eliz@gnu.org>
5297 * print.c (print_object): Don't crash when a frame's name is nil
5298 or invalid. (Bug#12025)
5300 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
5301 it signals an error when a tooltip frame is being created.
5303 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
5305 Cleanup miscellaneous objects allocation and initialization.
5306 * alloc.c (allocate_misc): Change to static. Add argument to
5307 specify the subtype. Adjust comment and users.
5308 (build_overlay): New function.
5309 * buffer.c (copy_overlays, Fmake_overlay): Use it.
5310 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
5311 (allocate_misc): Remove prototype.
5312 (build_overlay): Add prototype.
5314 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
5316 Swap buffer text indirection counters in Fbuffer_swap_text.
5317 * buffer.c (Fbuffer_swap_text): Swap indirections too.
5318 This avoids crash reported by Christoph Scholtes at
5319 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
5321 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
5323 * nsmenu.m (Popdown_data): New struct.
5324 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
5326 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
5327 (initWithContentRect): Make imgView and contentView non-static
5328 and autorelease them. Also autorelease img and matrix (Bug#12005).
5329 (dealloc): Remove (Bug#12005).
5331 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
5333 Adjust consing_since_gc when objects are explicitly freed.
5334 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
5335 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
5336 (free_cons, free_misc): Subtract object size from consing_since_gc.
5338 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
5340 Simplify and cleanup markers positioning code.
5341 * marker.c (attach_marker): More useful eassert.
5342 (live_buffer, set_marker_internal): New function.
5343 (Fset_marker, set_marker_restricted): Use set_marker_internal.
5344 (set_marker_both, set_marker_restricted_both): Use live_buffer.
5346 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
5348 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
5349 as it's limited by the amount of memory, not by INT_MAX.
5351 2012-07-21 Eli Zaretskii <eliz@gnu.org>
5353 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
5354 in special-event-map. See the discussion at
5355 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
5358 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
5359 info.dwItemData. Fixes crashes on 64-bit Windows.
5360 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
5362 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
5364 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
5365 (conversationIdentifier): Return value is NSInteger.
5366 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
5368 2012-07-21 Chong Yidong <cyd@gnu.org>
5370 * window.c (decode_any_window): Signal an error if the window is
5371 on a dead frame (Bug#11984).
5373 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5375 Add indirection counting to speed up Fkill_buffer.
5376 * buffer.h (struct buffer): New member.
5377 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
5378 (Fmake_indirect_buffer): Set indirection counter to -1, increment
5379 base buffer indirection counter.
5380 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
5381 (Fkill_buffer): Adjust indirection counters as needed, don't walk
5382 through buffer list if indirection counter is 0.
5384 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5386 Extend the value returned by Fgarbage_collect with heap statistics.
5387 * alloc.c (Qheap): New symbol.
5388 (syms_of_alloc): DEFSYM it.
5389 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
5390 (Fmemory_free): Remove.
5391 (syms_of_alloc): Don't defsubr it.
5392 * buffer.c (Fcompact_buffer): Remove.
5393 (syms_of_buffer): Don't defsubr it.
5395 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5397 Make maybe_gc inline.
5398 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
5399 * lisp.h (consing_since_gc, gc_relative_threshold)
5400 (memory_full_cons_threshold): Revert declaration.
5401 (maybe_gc): Remove prototype, define as inline.
5402 * alloc.c: Remove old commented-out code.
5403 (consing_since_gc, gc_relative_threshold)
5404 (memory_full_cons_threshold): Revert to global.
5407 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5409 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
5410 * lisp.h (build_unibyte_string): New function.
5411 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
5412 * sysdep.c, w32fns.c, xfns.c: Use it.
5413 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
5414 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
5415 Adjust users accordingly.
5416 * font.h (font_open_by_name): Adjust prototype.
5418 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5420 Cleanup calls to Fgarbage_collect.
5421 * lisp.h (maybe_gc): New prototype.
5422 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5423 Remove declarations.
5424 * alloc.c (maybe_gc): New function.
5425 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5427 * bytecode.c (MAYBE_GC): Use maybe_gc.
5428 * eval.c (eval_sub, Ffuncall): Likewise.
5429 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
5430 to avoid dependency from auto-save feature.
5432 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
5434 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
5435 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
5436 'for_each_per_buffer_object_at'.
5437 All uses changed. It's better to use upper-case for macros that
5438 cannot be implemented as functions, to give the reader a clue
5439 that they're special.
5441 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
5443 * alloc.c (Fgarbage_collect): Tweak docstring.
5445 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5447 Tweak the value returned from Fgarbage_collect again.
5448 * alloc.c (Fgarbage_collect): New return value, as confirmed in
5449 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
5450 Adjust documentation.
5451 (total_vector_bytes): Rename to total_vector_slots, adjust
5453 (total_free_vector_bytes): Rename to total_free_vector_slots,
5455 (Qstring_bytes, Qvector_slots): New symbols.
5456 (syms_of_alloc): DEFSYM them.
5458 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5460 Buffer compaction primitive which may be used from Lisp.
5461 * buffer.c (compact_buffer, Fcompact_buffer): New function.
5462 (syms_of_buffer): Register Fcompact_buffer.
5463 * alloc.c (Fgarbage_collect): Use compact_buffer.
5464 * buffer.h (compact_buffer): New prototype.
5465 (struct buffer_text): New member.
5467 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5469 New macro to iterate over all buffers, miscellaneous cleanups.
5470 * lisp.h (all_buffers): Remove declaration.
5471 * buffer.h (all_buffers): Add declaration, with comment.
5472 (for_each_buffer): New macro.
5473 * alloc.c (Fgarbage_collect, mark_object): Use it.
5474 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
5475 (init_buffer): Likewise.
5476 * data.c (Fset_default): Likewise.
5477 * coding.c (code_conversion_restore): Remove redundant check
5479 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
5481 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5483 Fix bug that created negative-length intervals.
5484 * intervals.c (merge_interval_right, merge_interval_left):
5485 Do not zero out this interval if it is absorbed by its children,
5486 as this interval's total length doesn't change in that case. See
5487 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
5489 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
5491 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
5492 when invoking (make-bool-vector N t) and N is a positive
5493 multiple of 8 -- the last 8 bits were mistakenly cleared.
5495 Remove some struct layout assumptions in bool vectors.
5496 * alloc.c (bool_header_size): New constant.
5497 (header_size, word_size): Move earlier, as they're now used earlier.
5498 Use 'word_size' in a few more places, where it's appropriate.
5499 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
5500 padding before the data member of a bool vector.
5501 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
5502 than doing the check by hand with an abort ().
5504 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
5506 * eval.c (Fdefvar): Don't check constants since we only set the var if
5507 it's not yet defined anyway (bug#11904).
5509 * lisp.h (last_undo_boundary): Declare new var.
5510 * keyboard.c (command_loop_1): Set it.
5511 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
5512 were auto-added by the command loop (bug#11774).
5514 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5516 * w32font.c (Qsymbol): Remove local definition.
5517 (syms_of_w32font): Don't DEFSYM it.
5519 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5521 Fix sweep_vectors to handle large bool vectors correctly.
5522 * alloc.c (sweep_vectors): Account total_vector_bytes for
5523 bool vectors larger than VBLOCK_BYTES_MAX.
5525 2012-07-18 Chong Yidong <cyd@gnu.org>
5527 * frame.c (x_set_frame_parameters): Revert bogus change introduced
5528 in 2012-05-25 commit by Paul Eggert (Bug#11738).
5530 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5532 Return more descriptive data from Fgarbage_collect.
5533 Suggested by Stefan Monnier in
5534 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
5535 * alloc.c (bounded_number): New function.
5536 (total_buffers, total_vectors): New variable.
5537 (total_string_size): Rename to total_string_bytes, adjust users.
5538 (total_vector_size): Rename to total_vector_bytes, adjust users.
5539 (sweep_vectors): Account total_vectors and total_vector_bytes.
5540 (Fgarbage_collect): New return value. Adjust documentation.
5541 (gc_sweep): Account total_buffers.
5542 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
5543 (VECTOR_SIZE): Remove.
5544 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
5545 (Qinterval, Qmisc): New symbols.
5546 (syms_of_data): Initialize them.
5547 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
5548 (Qcons, Qbuffer): New declarations.
5550 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5552 * alloc.c (Fmemory_free): Account for memory-free's own storage.
5553 Round up, not down. Improve doc.
5555 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5557 Restore old code in allocate_string_data to avoid Faset breakage.
5558 Reported by Julien Danjou <julien@danjou.info> in
5559 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
5560 * alloc.c (allocate_string_data): Restore old code with minor
5561 adjustments, fix comment to explain this subtle issue.
5563 2012-07-17 Eli Zaretskii <eliz@gnu.org>
5565 Remove FILE_SYSTEM_CASE.
5566 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
5568 * fileio.c (FILE_SYSTEM_CASE): Don't define.
5569 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
5570 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
5571 call-process-region passes it through expand-file-name.
5573 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
5575 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5577 Fix crash when creating indirect buffer (Bug#11917)
5578 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
5579 Don't handle unbound variables specially if non-zero.
5580 (Fbuffer_local_variables): Pass zero.
5581 (clone_per_buffer_values): Pass non-zero.
5583 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5585 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
5586 to make the loop interruptible.
5588 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5590 * gnutls.c (emacs_gnutls_handshake): Only retry if
5591 GNUTLS_E_INTERRUPTED.
5593 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5595 Cleanup and convert miscellaneous checks to eassert.
5596 * alloc.c (mark_interval): Fix comment, partially rephrase
5597 old comment from intervals.h (see below).
5598 * intervals.c (find_interval, adjust_intervals_for_insertion)
5599 (delete_interval, adjust_intervals_for_deletion)
5600 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
5602 (adjust_intervals_for_insertion, make_new_interval):
5603 Remove obsolete and unused code.
5604 * intervals.h (struct interval): Remove obsolete comment.
5605 * textprotp.c (erase_properties): Remove unused code.
5606 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
5607 (Fremove_list_of_text_properties): Convert to eassert.
5609 2012-07-17 Chong Yidong <cyd@gnu.org>
5611 * editfns.c (Finsert_char): Doc fix.
5613 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5615 Fix previous change to make Fmemory_free always accurate.
5616 * alloc.c (make_interval): Update total_free_intervals.
5617 (make_float): Likewise for total_free_floats.
5618 (free_cons, Fcons): Likewise for total_free_conses.
5619 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
5620 Likewise for total_free_vector_bytes.
5621 (Fmake_symbol): Likewise for total_free_symbols.
5622 (bytes_free): Remove.
5624 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5626 Simple free memory accounting feature.
5627 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
5628 (sweep_vectors): Accumulate size of free vectors.
5629 (Fgarbage_collect): Setup bytes_free.
5630 (Fmemory_free): New function.
5631 (syms_of_alloc): Register it.
5633 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5635 Cleanup overlays checking.
5636 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
5637 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
5638 eassert and OVERLAYP.
5639 (sort_overlays): Change to use OVERLAYP.
5641 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
5643 * editfns.c (Finsert_char): Make it interactive, and make the
5644 second arg optional. Copy interactive spec and docstring from
5647 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5649 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
5650 Unlike the other wrapped functions, fabs has an unspecified
5653 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
5655 * nsterm.m (keyDown): Interpret flags without left/right bits
5656 as the left key (Bug#11670).
5658 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5660 Remove empty and useless init functions.
5661 * lisp.h (init_character_once, init_fns, init_image)
5662 (init_filelock, init_sound): Remove prototype.
5663 * character.c (init_character_once): Remove.
5664 * filelock.c (init_filelock): Likewise.
5665 * fns.c (init_fns): Likewise.
5666 * image.c (init_image): Likewise.
5667 * sound.c (init_sound): Likewise.
5668 * emacs.c (main): Adjust accordingly.
5670 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5672 * gtkutil.h: Tiny cleanups.
5673 (use_old_gtk_file_dialog): Remove useless declaration.
5674 (xg_uses_old_file_dialog): Add suggested const attribute.
5676 2012-07-15 Eli Zaretskii <eliz@gnu.org>
5678 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
5679 (bidi_paragraph_init): Use it to limit search forward for a strong
5680 directional character in abnormally large paragraphs full of
5681 neutral or weak characters. (Bug#11943)
5683 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
5685 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
5686 the toolbar (Bug#9451).
5687 (xg_make_tool_item): Give the widget event box a transparent
5690 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5692 Cleanup basic allocation variables and functions.
5693 * alloc.c (ignore_warnings, init_intervals, init_float)
5694 (init_cons, init_symbol, init_marker): Remove.
5695 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
5696 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
5697 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
5698 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
5699 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
5700 (staticidx, init_alloc_once, init_strings, free_ablock):
5701 Remove redundant initialization.
5702 * fns.c (init_weak_hash_tables): Remove.
5703 * lisp.h (init_weak_hash_tables): Remove prototype.
5705 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5707 Use zero_vector where appropriate.
5708 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
5710 * lisp.h (zero_vector): New declaration.
5711 * font.c (null_vector): Remove.
5712 (syms_of_font): Remove initialization and staticpro.
5713 (font_list_entities, font_find_for_lface): Change to use zero_vector.
5714 * keymap.c (Faccessible_keymaps): Likewise.
5716 2012-07-15 Leo Liu <sdl.web@gmail.com>
5718 * fringe.c: Fix typo in comments.
5720 2012-07-14 Leo Liu <sdl.web@gmail.com>
5722 * fringe.c: Add a new bitmap exclamation-mark.
5724 2012-07-14 Eli Zaretskii <eliz@gnu.org>
5726 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
5728 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
5729 (HAVE_MENUS): Don't define, defined by editing config.in with
5731 (GMALLOC_INHIBIT_VALLOC): Don't define.
5732 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
5734 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
5736 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
5738 2012-07-14 Glenn Morris <rgm@gnu.org>
5740 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
5741 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
5742 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
5744 2012-07-13 Glenn Morris <rgm@gnu.org>
5746 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
5748 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
5749 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
5751 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
5753 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
5754 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
5755 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
5756 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
5758 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
5759 as boolean expression.
5760 (x_set_window_size): Remove unused variable toolbar.
5761 (ns_get_color_default, ns_mod_to_lisp): Remove.
5762 (ns_mouse_position): Remove unused variables xchar and ychar.
5763 (ns_compute_glyph_string_overhangs): Remove unused variable face.
5764 (ns_set_vertical_scroll_bar): Remove unused variable count.
5765 (ns_delete_terminal): Remove unused variable i.
5766 (ns_term_init): Remove unused variables r, g and b.
5767 (mouseDown): Remove unused variable window.
5768 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
5769 (initFrameFromEmacs): Remove unused variable vbextra.
5770 (mouseEntered): Remove unused variables p and dpyinfo.
5771 (mouseExited): Remove unused variables p and r.
5772 (ns_define_frame_cursor, ns_clear_frame_area)
5773 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
5774 (menuDown): Assign [sender tag] to variable and cast the variable.
5776 * nsterm.h (menuDown): Add id as type to argument sender.
5777 (ns_display_info_for_name): Add Lisp_Object argument.
5778 (ns_term_init): Add Lisp_Object argument.
5779 (ns_map_event_to_object): Add void argument.
5780 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
5781 prototype with arguments and only declare if __OBJC__.
5782 (nxatoms_of_nsselect): Add void argument.
5783 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
5784 (ns_alloc_autorelease_pool): Add void argument.
5785 (ns_release_autorelease_pool): Add void* argument.
5786 (ns_get_defaults_value): Add const char* argument.
5788 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
5789 (initFromContents): Use SSDATA where appropriate.
5790 (ns_update_menubar): Add braces to ambigous if-else.
5791 (initWithTitle): Put () around assignment in if statement.
5792 (ns_menu_show): Remove unused variables window and keymap.
5793 (update_frame_tool_bar): Remove unused variable selected_p.
5794 (initWithContentRect): Remove unused variable this_cmd_name.
5796 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
5798 (setXBMColor): Remove unused variable len.
5799 (setPixmapData): Put () around assignment in loop statement.
5801 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
5802 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
5804 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
5805 around assignment in loop statement.
5806 (nsfont_open): Remove unused variable i.
5807 (nsfont_open): Remove unused variable len.
5808 (nsfont_draw): Remove unused variable cs.
5810 * nsfns.m (x_set_icon_name, ns_set_name_internal)
5811 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
5812 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
5813 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
5814 (Fns_font_name, Fns_perform_service)
5815 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
5816 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
5817 (ns_set_name): Remove unused variable view.
5818 (x_set_menu_bar_lines): Remove unused variable olines.
5819 (x_set_tool_bar_lines): Remove unused variable root_window.
5820 (Fns_list_colors): Put () around assignment in while statement.
5821 (Fns_perform_service): Remove unused variable len.
5822 (Fns_display_usable_bounds): Remove unused variable top.
5823 (syms_of_nsfns): Remove unused variable i.
5825 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
5828 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
5830 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
5831 and free it with DestroyExceptionInfo (Bug#11558).
5833 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
5835 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
5836 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
5837 Set here, not in nt/config.nt.
5839 2012-07-13 Eli Zaretskii <eliz@gnu.org>
5841 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
5842 cursor overflow into the last glyph on display line when the right
5843 fringe is off. (Bug#11832)
5845 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
5847 * xdisp.c (produce_special_glyphs): Now static.
5848 * dispextern.h (produce_special_glyphs): Remove decl.
5850 2012-07-13 Glenn Morris <rgm@gnu.org>
5852 * s/bsd-common.h, s/cygwin.h: Remove empty files.
5853 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
5855 * s/usg5-4-common.h (USG, USG5):
5856 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
5857 * s/sol2-6.h (SOLARIS2):
5858 * s/irix6-5.h (IRIX6_5):
5859 * s/hpux10-20.h (USG, USG5, HPUX):
5860 * s/gnu-linux.h (USG, GNU_LINUX):
5861 * s/freebsd.h (BSD_SYSTEM):
5862 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
5863 * s/cygwin.h (CYGWIN):
5864 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
5865 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
5867 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
5869 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
5871 2012-07-13 Glenn Morris <rgm@gnu.org>
5873 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
5875 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
5877 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
5878 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
5880 2012-07-12 Glenn Morris <rgm@gnu.org>
5882 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
5884 * process.c (init_process_emacs): Rename from init_process.
5885 The old name is also the name of a Mach system call.
5886 * lisp.h, emacs.c: Update for this name change.
5887 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
5890 2012-07-12 Eli Zaretskii <eliz@gnu.org>
5892 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
5893 memmove call that removes glyphs covered by the left truncation
5894 glyph. Improve commentary.
5895 (display_line): Fix display of continuation glyphs on GUI frames
5896 when the right fringe is turned off and variable-size fonts are
5897 used in the window. Move the code that appends a stretch glyph to
5898 produce_special_glyphs, so that it could be used for truncation
5899 and continuation glyphs alike.
5900 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
5901 glyph of a suitably computed width, to align the special glyphs at
5902 the window margin. Code moved from display_line. (Bug#11832)
5904 2012-07-12 Glenn Morris <rgm@gnu.org>
5906 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
5908 * s/gnu-linux.h, s/hpux10-20.h:
5909 Do not unconditionally define HAVE_XRMSETDATABASE.
5911 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
5913 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
5915 Fix typos that broke OS X build.
5916 Reported by Randal L. Schwartz in
5917 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
5918 * nsterm.m (ns_timeout): Add missing local decl.
5919 (ns_get_color): snprintf -> sprintf, to fix typo.
5921 2012-07-12 Glenn Morris <rgm@gnu.org>
5923 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
5924 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
5925 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
5926 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
5928 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
5929 Move PTY_OPEN to configure.
5931 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5932 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
5933 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
5935 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
5937 Use empty_unibyte_string where applicable.
5938 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
5939 * lread.c (read1): Likewise.
5940 * xsettings.c (syms_of_xsettings): Likewise.
5942 2012-07-12 Glenn Morris <rgm@gnu.org>
5944 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
5945 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
5946 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
5947 * s/hpux10-20.h (RUN_TIME_REMAP):
5948 * s/bsd-common.h (TABDLY): Move to configure.
5950 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
5952 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
5954 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
5955 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
5957 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
5959 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
5960 * s/template.h: Move NARROWPROTO to configure.
5962 2012-07-11 Glenn Morris <rgm@gnu.org>
5964 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
5965 unused since 2011-01-17 change to systty.h.
5967 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
5968 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
5969 Move HAVE_PTYS and HAVE_SOCKETS to configure.
5971 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
5973 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
5975 2012-07-11 Glenn Morris <rgm@gnu.org>
5977 * s/darwin.h, s/gnu-linux.h, s/template.h:
5978 Move INTERRUPT_INPUT to configure.
5980 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
5982 Minor adjustments to interning code.
5983 * lisp.h (intern, intern_c_string): Redefine as static inline
5984 wrappers for intern_1 and intern_c_string_1, respectively.
5985 (intern_1, intern_c_string_1): Rename prototypes.
5986 * lread.c (intern_1, intern_c_string_1, oblookup):
5987 Simplify Vobarray checking.
5988 * font.c (font_intern_prop): Likewise. Adjust comment.
5989 * w32font.c (intern_font_name): Likewise.
5991 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
5993 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
5995 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
5996 of Fcar/Fcdr if possible.
5997 * font.c (check_otf_features): Likewise.
5998 * fontset.c (Fnew_fontset): Likewise.
5999 * gnutls.c (Fgnutls_boot): Likewise.
6000 * minibuf.c (read_minibuf): Likewise.
6001 * msdos.c (IT_set_frame_parameters): Likewise.
6002 * xmenu.c (Fx_popup_dialog): Likewise.
6003 * w32menu.c (Fx_popup_dialog): Likewise.
6005 2012-07-11 Glenn Morris <rgm@gnu.org>
6007 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
6008 since nothing has defined it on these platforms.
6010 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
6011 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
6013 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
6014 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
6015 Move CLASH_DETECTION to configure.
6017 * s/gnu.h: Remove file, which is now empty.
6019 * s/gnu.h, s/gnu-linux.h:
6020 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
6022 2012-07-11 John Wiegley <johnw@newartisans.com>
6024 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
6025 function attribute, so we only use it if it exists in the
6028 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
6030 Avoid call to strlen in fast_c_string_match_ignore_case.
6031 * search.c (fast_c_string_match_ignore_case): Change to use
6032 length argument. Adjust users accordingly.
6033 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
6035 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
6037 Assume mkdir, rmdir.
6038 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
6039 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
6042 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
6045 * s/hpux10-20.h (HAVE_PERROR): Remove.
6046 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
6047 Remove dummy definition, as this problem was obsolete long ago.
6050 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
6052 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
6054 Avoid calls to strlen in font processing functions.
6055 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
6056 (font_open_by_name): Change to use length argument.
6057 Adjust users accordingly.
6058 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
6060 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
6061 Change to return ptrdiff_t.
6062 (xfont_list_pattern, xfont_match): Use length returned by
6063 xfont_decode_coding_xlfd.
6064 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
6066 2012-07-11 Glenn Morris <rgm@gnu.org>
6068 * s/darwin.h, s/freebsd.h, s/netbsd.h:
6069 Move DONT_REOPEN_PTY to configure.
6071 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
6072 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
6074 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
6076 Remove "#define unix" that is no longer needed (Bug#11905).
6077 * s/aix4-2.h (unix): Remove; no longer needed.
6079 EMACS_TIME simplification (Bug#11875).
6080 This replaces macros (which typically do not work in GDB)
6081 with functions, typedefs and enums, making the code easier to debug.
6082 The functional style also makes code easier to read and maintain.
6083 * systime.h: Include <sys/time.h> on all hosts, not just if
6084 WINDOWSNT, since 'struct timeval' is needed in general.
6085 (EMACS_TIME): Now a typedef, not a macro.
6086 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
6088 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
6089 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
6090 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
6091 (EMACS_TIME_LE): Now functions, not macros.
6092 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
6093 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
6094 which are not functions. All uses rewritten to use:
6095 (make_emacs_time): New function.
6096 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
6097 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
6098 not functions. All uses rewritten to use the following, respectively:
6099 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
6100 (add_emacs_time, sub_emacs_time): New functions.
6101 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
6102 * fileio.c (Fcopy_file):
6103 * xterm.c (XTflash): Get the current time closer to when it's used.
6104 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
6106 * bytecode.c (targets): Suppress -Woverride-init warnings.
6108 Simplify by avoiding confusing use of strncpy etc.
6109 * doc.c (Fsnarf_documentation):
6110 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
6111 * frame.c (Fmake_terminal_frame):
6112 * gtkutil.c (get_utf8_string):
6114 * nsmenu.m (ns_update_menubar):
6115 * regex.c (regerror):
6116 Prefer memcpy to strncpy and strncat when either will do.
6117 * fileio.c (Fsubstitute_in_file_name):
6118 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
6119 (menu_separator_name_p):
6120 * nsmenu.m (ns_update_menubar):
6121 Prefer memcmp to strncmp when either will do.
6122 * nsterm.m: Include <ftoastr.h>.
6124 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
6125 Prefer snprintf to strncpy.
6126 * nsterm.m (ns_term_init):
6127 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
6128 * nsterm.m (ns_term_init):
6129 Avoid the need for strncpy, by using build_string or
6130 make_unibyte_string directly. Use dtoastr, not snprintf.
6131 * process.c (Fmake_network_process): Diagnose service names that
6132 are too long, rather than silently truncating them or creating
6133 non-null-terminated names.
6134 (Fnetwork_interface_info): Likewise, for interface names.
6135 * sysdep.c (system_process_attributes) [GNU_LINUX]:
6136 Prefer sprintf to strncat.
6137 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
6138 Prefer vsnprintf to vsprintf + strncpy.
6140 2012-07-10 Glenn Morris <rgm@gnu.org>
6142 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
6143 Clarify fallback case.
6145 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6147 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
6148 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
6149 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
6150 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
6151 where argument type is known to be a Lisp_Cons.
6153 2012-07-10 Tom Tromey <tromey@redhat.com>
6155 * bytecode.c (BYTE_CODE_THREADED): New macro.
6156 (BYTE_CODES): New macro. Replaces all old byte-code defines.
6157 (enum byte_code_op): New type.
6158 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
6159 (exec_byte_code): Use them. Use token threading when applicable.
6161 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6163 Optimize pure C strings initialization.
6164 * lisp.h (make_pure_string): Fix prototype.
6165 (build_pure_c_string): New function, defined as static inline. This
6166 provides a better opportunity to optimize away calls to strlen when
6167 the function is called with compile-time constant argument.
6168 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
6169 argument, adjust users accordingly. Use build_pure_c_string where
6171 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
6172 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
6173 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
6175 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6177 Avoid calls to strlen in miscellaneous functions.
6178 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
6179 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
6180 * lread.c (openp): Likewise.
6182 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6184 Avoid calls to strlen in path processing functions.
6185 * fileio.c (file_name_as_directory): Add comment. Change to add
6186 srclen argument and return the length of result. Adjust users
6188 (directory_file_name): Fix comment. Change to add srclen argument,
6189 swap 1st and 2nd arguments to obey the common convention.
6190 Adjust users accordingly.
6191 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
6193 2012-07-10 Glenn Morris <rgm@gnu.org>
6195 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
6196 Move PENDING_OUTPUT_COUNT definition to configure.
6198 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
6199 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
6200 * s/gnu.h (DATA_START): Move definitions to configure.
6202 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
6203 We include usg5-4-common.h, which defines them both.
6205 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
6206 O_RDONLY already includes it).
6208 Stop ns builds setting the EMACSLOADPATH environment variable.
6209 * nsterm.m (ns_load_path): Rename from ns_init_paths.
6210 Now it does not set EMACSLOADPATH, just returns the load-path string.
6211 * nsterm.h: Update accordingly.
6212 * lread.c [HAVE_NS]: Include nsterm.h.
6213 (init_lread) [HAVE_NS]: Use ns_load_path.
6214 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
6216 2012-07-09 Glenn Morris <rgm@gnu.org>
6218 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
6219 since the included bsd-common.h does so.
6221 Stop ns builds setting the EMACSPATH environment variable.
6222 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
6223 (ns_init_paths): Do not set EMACSPATH.
6224 * nsterm.h (ns_exec_path): Add it.
6225 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
6228 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
6230 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
6232 * process.c (wait_reading_process_output): 'waitchannels' was unset
6233 when read_kbd || !NILP (wait_for_cell); fix this.
6235 Add GCC-style 'const' attribute to functions that can use it.
6236 * character.h (char_resolve_modifier_mask):
6237 * keyboard.h (make_ctrl_char):
6238 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
6239 (init_character_once, next_almost_prime, init_fns, init_image)
6240 (flush_pending_output, init_sound):
6241 * mem-limits.h (start_of_data):
6242 * menu.h (finish_menu_items):
6243 Add ATTRIBUTE_CONST.
6244 * emacs.c (DEFINE_DUMMY_FUNCTION):
6245 Declare the dummy function with ATTRIBUTE_CONST.
6246 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
6247 Add decls with ATTRIBUTE_CONST.
6249 Minor improvements to make_formatted_string.
6250 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
6251 where int is good enough, as vsprintf returns an int.
6252 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
6254 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
6256 Use make_formatted_string to avoid double length calculation.
6257 * lisp.h (make_formatted_string): New prototype.
6258 * alloc.c (make_formatted_string): New function.
6259 * buffer.c (Fgenerate_new_buffer_name): Use it.
6260 * dbusbind.c (syms_of_dbusbind): Likewise.
6261 * editfns.c (Fcurrent_time_zone): Likewise.
6262 * filelock.c (get_boot_time): Likewise.
6263 * frame.c (make_terminal_frame, set_term_frame_name)
6264 (x_report_frame_params): Likewise.
6265 * image.c (gs_load): Likewise.
6266 * minibuf.c (get_minibuffer): Likewise.
6267 * msdos.c (dos_set_window_size): Likewise.
6268 * process.c (make_process): Likewise.
6269 * xdisp.c (ensure_echo_area_buffers): Likewise.
6270 * xsettings.c (apply_xft_settings): Likewise.
6272 2012-07-09 Glenn Morris <rgm@gnu.org>
6274 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
6275 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
6276 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
6277 * nsterm.h (ns_etc_directory): Add it.
6278 * callproc.c [HAVE_NS]: Include nsterm.h.
6279 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
6281 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
6283 Move marker debugging code under MARKER_DEBUG.
6284 * marker.c (MARKER_DEBUG): Move marker debugging code under
6285 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
6286 for bootstrap with --enable-checking (~3x slowdown reported
6287 by Juanma Barranquero <lekktu@gmail.com>).
6288 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
6290 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
6292 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
6293 See <http://bugs.gnu.org/11825#29>.
6295 2012-07-08 Eli Zaretskii <eliz@gnu.org>
6297 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
6298 has no font, use the frame's font. (Bug#11813)
6299 (display_line): Add commentary about displaying truncation glyphs
6301 (produce_special_glyphs): Move here from term.c.
6303 * term.c (produce_special_glyphs): Move to xdisp.c.
6305 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
6308 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
6310 * xdisp.c (display_line): Avoid warning about implicit declaration
6313 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
6315 * lisp.h: Remove empty conditional.
6317 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
6319 * lread.c (load_path_check): Now static.
6321 Fix some minor --with-ns problems found by static checking.
6322 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
6323 (x_set_font) [!HAVE_X_WINDOWS]:
6324 * image.c (xpm_load_image) [HAVE_NS]:
6325 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
6326 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
6327 Remove unused local.
6328 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
6329 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
6330 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
6331 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
6332 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
6333 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
6334 Fix pointer signedness problem.
6335 * xfaces.c (FRAME_X_FONT_TABLE):
6336 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
6338 2012-07-07 Glenn Morris <rgm@gnu.org>
6340 * lread.c (load_path_check): New function, split from init_lread.
6341 (init_lread): Reorganize. Motivation:
6342 If EMACSLOADPATH is set, check/warn about that rather than the
6343 defaults, which we are not going to use. Hence we can remove
6344 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
6345 Don't warn if site-lisp directories are missing.
6346 If not installed, start from a blank load-path, since
6347 PATH_LOADSEARCH refers to the eventual installation directories.
6349 2012-07-07 Eli Zaretskii <eliz@gnu.org>
6351 Support truncation and continuation glyphs on GUI frames, when
6352 fringes are disabled. (Bug#11832)
6353 * xdisp.c (init_iterator): Get dimensions of truncation and
6354 continuation glyphs even if on GUI frames.
6355 Adjust it->last_visible_x on GUI frames when the left or right fringes,
6356 or both, are absent.
6357 (start_display, move_it_in_display_line_to): Handle the case of a
6358 GUI frame without a fringe to display continuation or truncation
6360 (insert_left_trunc_glyphs): Support GUI frames: make sure
6361 truncation glyphs overwrite enough glyphs from the current line to
6362 have sufficient space in pixels.
6363 (display_line): Support truncation and continuation glyphs on GUI
6364 frames. If some spare pixels are left on the line after inserting
6365 the truncation glyphs, fill that space with a stretch glyph of a
6366 suitably computed width.
6368 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
6369 produce_glyphs, to support GUI sessions.
6371 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
6373 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
6375 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
6377 Do not require float-time's arg to fit in time_t (Bug#11825).
6378 This works better on hosts where time_t is unsigned, and where
6379 float-time is applied to the (negative) difference between two times.
6380 * editfns.c (decode_time_components): Last arg is now double *,
6381 not int *, and means to store all the result as a double, without
6382 worrying about whether the seconds part fits in time_t.
6383 All callers changed.
6384 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
6385 All callers changed.
6386 (Ffloat_time): Do not fail merely because the specified time falls
6387 outside of time_t range.
6389 2012-07-07 Glenn Morris <rgm@gnu.org>
6391 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
6392 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
6393 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
6395 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
6397 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
6398 Update dependencies.
6400 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
6402 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6404 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
6405 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
6406 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
6407 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
6408 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
6409 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
6411 * xfont.c (compare_font_names): Redo to omit the need for casts.
6413 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
6415 * xfns.c (Fx_change_window_property): Doc fix.
6416 * w32fns.c (Fx_change_window_property): Doc fix.
6418 * w32fns.c (Fx_window_property): Accept the same arguments as the
6419 X Windows version. Doc fix.
6420 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
6422 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
6423 Eli Zaretskii <eliz@gnu.org>
6425 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
6426 Windows-specific code from nt/config.nt moved here.
6427 Obsolete settings removed.
6429 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6431 * process.c: Avoid unnecessary calls to gettime.
6432 (wait_reading_process_output): Don't get the time of day
6433 when gobbling data immediately and not waiting, as there's no need
6434 for it in that case. This removes a FIXME.
6436 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
6438 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
6439 is defined (Bug#11768).
6441 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6443 Fix marker debugging code.
6444 * marker.c (byte_char_debug_check): Do not perform the check
6445 if buffer is not multibyte.
6446 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6447 Call byte_char_debug_check with correct arguments.
6449 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6451 Compile marker debugging code only if ENABLE_CHECKING is defined.
6452 * marker.c (byte_char_debug_check, count_markers):
6453 Use only if ENABLE_CHECKING is defined.
6454 (byte_debug_flag): Remove.
6455 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6456 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
6458 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6460 Avoid code repetition in marker-related functions.
6461 * marker.c (attach_marker): New function.
6462 (Fset_marker, set_marker_restricted, set_marker_both)
6463 (set_marker_restricted_both): Use it.
6464 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
6465 Consistently rename charno to charpos.
6466 (marker_position): Add eassert.
6467 (marker_byte_position): Convert to eassert.
6469 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6471 Simplify list operations in unchain_overlay and unchain_marker.
6472 * buffer.c (unchain_overlay): Simplify. Add comment.
6473 * marker.c (unchain_marker): Simplify. Fix comments.
6475 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6477 Introduce fast path for the widely used marker operation.
6478 * alloc.c (build_marker): New function.
6479 * lisp.h (build_marker): New prototype.
6480 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
6481 * composite.c (autocmp_chars): Likewise.
6482 * editfns.c (buildmark): Remove.
6483 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
6484 (save_restriction_save): Use build_marker.
6485 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
6486 * window.c (save_window_save): Likewise.
6488 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6490 Do not use Fdelete_overlay in delete_all_overlays
6491 to avoid redundant calls to unchain_overlay.
6492 * buffer.c (drop_overlay): New function.
6493 (delete_all_overlays, Fdelete_overlay): Use it.
6494 * minibuf.c (get_minibuffer): Fix comment.
6496 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6498 Port to OpenBSD 5.1 amd64.
6499 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
6500 This is needed for OpenBSD, and should be harmless on all BSD systems.
6501 Also, include <sys/sysctl.h>, as it should be available on all
6502 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
6503 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
6504 use p_pid member, not kp_proc.pid.
6506 2012-07-06 Glenn Morris <rgm@gnu.org>
6508 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
6510 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6512 More xmalloc and related cleanup.
6513 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
6514 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
6515 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
6516 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
6517 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
6518 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
6519 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
6520 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
6521 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
6523 Omit needless casts involving void * pointers and allocation.
6524 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
6525 as the former is more robust if P's type is changed.
6526 Prefer xzalloc to xmalloc + memset 0.
6527 Simplify malloc-or-realloc to realloc.
6528 Don't worry about xmalloc returning a null pointer.
6529 Prefer xstrdup to xmalloc + strcpy.
6530 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
6532 * keyboard.c (apply_modifiers_uncached): Prefer local array to
6533 alloca of a constant.
6535 2012-07-05 Eli Zaretskii <eliz@gnu.org>
6537 * xdisp.c (display_line): Fix horizontal pixel coordinates when
6538 hscroll is larger than the line width. Fixes long and futile
6539 looping inside extend_face_to_end_of_line (on a TTY) producing
6540 glyphs that are not needed and thrown away.
6542 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6544 * marker.c (set_marker_restricted_both): Simplify by using
6547 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6549 * editfns.c (region_limit): Simplify by using clip_to_bounds.
6551 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
6553 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
6554 not defined (Bug#11768).
6555 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
6556 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
6557 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
6558 followed by gtk_box_set_homogeneous (Bug#11768).
6559 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
6560 (update_theme_scrollbar_width, xg_create_scroll_bar):
6561 Use gtk_scrollbar_new (Bug#11768).
6562 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
6563 (is_box_type): New function (Bug#11768).
6564 (xg_tool_item_stale_p): Call is_box_type.
6565 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
6566 with default display (Bug#11768).
6568 2012-07-05 Eli Zaretskii <eliz@gnu.org>
6570 * xdisp.c (window_hscroll_limited): New function.
6571 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
6572 coordinates when window's hscroll is set to insanely large
6575 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
6577 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
6578 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
6580 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6583 * lisp.h (xzalloc): New prototype. Omit needless casts.
6584 * alloc.c (xzalloc): New function. Omit needless casts.
6585 * charset.c: Omit needless casts. Convert all calls to
6586 xmalloc with following memset to xzalloc.
6587 * dispnew.c: Likewise.
6588 * fringe.c: Likewise.
6589 * image.c: Likewise.
6590 * sound.c: Likewise.
6592 * w32fns.c: Likewise.
6593 * w32font.c: Likewise.
6594 * w32term.c: Likewise.
6595 * xfaces.c: Likewise.
6597 * xterm.c: Likewise.
6598 * atimer.c: Omit needless casts.
6599 * buffer.c: Likewise.
6600 * callproc.c: Likewise.
6602 * coding.c: Likewise.
6603 * composite.c: Likewise.
6605 * doprnt.c: Likewise.
6606 * editfns.c: Likewise.
6607 * emacs.c: Likewise.
6609 * filelock.c: Likewise.
6611 * gtkutil.c: Likewise.
6612 * keyboard.c: Likewise.
6614 * lread.c: Likewise.
6615 * minibuf.c: Likewise.
6616 * msdos.c: Likewise.
6617 * print.c: Likewise.
6618 * process.c: Likewise.
6619 * region-cache.c: Likewise.
6620 * search.c: Likewise.
6621 * sysdep.c: Likewise.
6622 * termcap.c: Likewise.
6623 * terminal.c: Likewise.
6624 * tparam.c: Likewise.
6625 * w16select.c: Likewise.
6627 * w32reg.c: Likewise.
6628 * w32select.c: Likewise.
6629 * w32uniscribe.c: Likewise.
6630 * widget.c: Likewise.
6631 * xdisp.c: Likewise.
6632 * xmenu.c: Likewise.
6634 * xselect.c: Likewise.
6636 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6638 * fileio.c (time_error_value): Check the right error number.
6639 Problem reported by Troels Nielsen in
6640 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
6642 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6644 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
6645 This should be fixed in a better way; see Eli Zaretskii in
6646 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
6647 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
6649 * fileio.c (time_error_value): Rename from special_mtime.
6650 The old name's problems were noted by Eli Zaretskii in
6651 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
6653 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
6654 This variable's comment says Emacs needs at least one GDB-visible
6655 symbol of type enum pvec_type, to work around GDB problems.
6656 The symbol's value doesn't matter.
6658 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
6659 that causes compilation to fail on pre-C99 compilers.
6661 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
6663 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
6664 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
6666 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6668 * buffer.c (init_buffer_once): Fix initialization of
6669 headers for buffer_defaults and buffer_local_symbols.
6670 Reported by Juanma Barranquero <lekktu@gmail.com>.
6672 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
6674 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
6675 * lisp.h (enum pvec_type): Use fewer bits.
6676 (PSEUDOVECTOR_SIZE_BITS): New constant.
6677 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
6678 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
6679 change in pvec_type.
6680 (PSEUDOVECTOR_TYPEP): New macro.
6681 (TYPED_PSEUDOVECTORP): Use it.
6682 * fns.c (internal_equal): Adapt code to extract pvectype.
6683 * emacs.c (gdb_pvec_type): Update type.
6684 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
6685 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
6686 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
6687 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
6688 (sweep_vectors): Use it. Use local var `total_bytes' instead of
6689 abusing vector->header.next.nbytes.
6690 (live_vector_p): Use PVEC_TYPE.
6691 (mark_object): Adapt code to extract pvectype. Use switch.
6693 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6695 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
6696 Tighten new eassert a bit.
6698 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6700 Fix compilation with --enable-gcc-warnings and -O1
6702 * doprnt.c (doprnt): Change type of tem to int, initialize
6703 to avoid compiler warning. Add eassert.
6704 * search.c (simple_search): Initialize match_byte to avoid
6705 compiler warning. Add eassert.
6707 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6709 Avoid weird behavior with large horizontal scrolls.
6710 Without this change, for example, large hscroll values would
6711 mess up Emacs's display on Fedora 15 x86, presumably due to
6712 overflows in int calculations in the display code.
6713 Also, if buffers had long lines, Emacs would freeze.
6714 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
6715 (set_window_hscroll): New function, containing the old guts of
6716 Fset_window_hscroll. Return the clipped value.
6717 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
6718 This avoids the need to check against PTRDIFF_MAX.
6720 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
6722 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6724 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
6726 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6728 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
6729 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
6730 since GCC 4.4.6 issues a bogus warning for them.
6732 Fix bugs in file timestamp newness comparisons.
6733 * fileio.c (Ffile_newer_than_file_p):
6734 * lread.c (Fload): Use full timestamp resolution of files,
6735 not just the 1-second resolution, so that files that are only
6736 slightly newer still count as newer.
6737 * fileio.c (Ffile_newer_than_file_p): Don't assume file
6738 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
6740 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
6742 * fileio.c: Improve handling of file time marker. (Bug#11852)
6743 (special_mtime): New function.
6744 (Finsert_file_contents, Fverify_visited_file_modtime):
6745 Use it to set special mtime values consistently.
6747 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
6749 * fileio.c (Finsert_file_contents): Properly handle st_mtime
6750 marker for non-existing file. (Bug#11852)
6752 2012-07-03 Glenn Morris <rgm@gnu.org>
6754 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
6755 and did not make it into globals.h).
6757 2012-07-03 Tom Tromey <tromey@redhat.com>
6759 * window.c (Fset_window_margins, Fset_window_fringes)
6760 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
6761 * textprop.c (Fprevious_property_change): No longer static.
6762 * syntax.c (Fsyntax_table_p): No longer static.
6763 * process.c (Fget_process, Fprocess_datagram_address): No longer
6765 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
6766 * keyboard.c (Fcommand_execute): No longer static.
6768 * insdel.c (Fcombine_after_change_execute): No longer static.
6769 * image.c (Finit_image_library): No longer static.
6770 * fileio.c (Fmake_symbolic_link): No longer static.
6771 * eval.c (Ffetch_bytecode): No longer static.
6772 * editfns.c (Fuser_full_name): No longer static.
6773 * doc.c (Fdocumentation_property, Fsnarf_documentation):
6775 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
6777 * dired.c (Ffile_attributes): No longer static.
6778 * composite.c (Fcomposition_get_gstring): No longer static.
6779 * callproc.c (Fgetenv_internal): No longer static.
6781 * ccl.h: Remove EXFUNs.
6782 * buffer.h: Remove EXFUNs.
6783 * dispextern.h: Remove EXFUNs.
6784 * intervals.h: Remove EXFUNs.
6785 * fontset.h: Remove EXFUN.
6786 * font.h: Remove EXFUNs.
6787 * dosfns.c (system_process_attributes): Remove EXFUN.
6788 * keymap.h: Remove EXFUNs.
6789 * lisp.h: Remove EXFUNs.
6790 * w32term.h: Remove EXFUNs.
6791 * window.h: Remove EXFUNs.
6792 * xsettings.h: Remove EXFUN.
6793 * xterm.h: Remove EXFUN.
6795 2012-07-03 Glenn Morris <rgm@gnu.org>
6797 * lisp.h (Frandom): Make it visible to C.
6798 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
6799 buffer for invisible buffers. (Bug#1229)
6801 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6803 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
6804 values which aren't power of 2.
6805 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
6806 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
6809 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
6811 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
6813 * alloc.c (mark_object): Revert part of last patch to use `switch'.
6815 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6817 * alloc.c (allocate_vector_block): Remove redundant
6818 calls to mallopt if DOUG_LEA_MALLOC is defined.
6819 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
6820 avoid calls to mallopt if zero_vector is returned.
6822 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6824 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
6825 is enabled, avoid dereferencing NULL current_sblock if
6828 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6830 Cleanup basic buffer management.
6831 * buffer.h (struct buffer): Change layout to use generic vector
6832 marking code. Fix some comments. Change type of 'clip_changed'
6833 to bitfield. Remove unused #ifndef old.
6834 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
6835 (GET_OVERLAYS_AT): Fix indentation.
6836 (for_each_per_buffer_object_at): New macro.
6837 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
6838 (Fbuffer_local_variables): Use it.
6839 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
6840 * alloc.c (allocate_buffer): Adjust to match new layout of
6841 struct buffer. Fix comment.
6842 (mark_overlay): New function.
6843 (mark_buffer): Use it. Use mark_vectorlike to mark normal
6844 Lisp area of struct buffer.
6845 (mark_object): Use it. Adjust marking of misc objects
6846 and related comments.
6848 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
6850 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
6851 wrapper that is not needed because the wrapped code is a no-op (zero
6852 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
6853 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
6855 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
6857 * alloc.c (mark_buffer): Simplify. Remove prototype.
6858 (mark_object): Add comment. Reorganize marking of vector-like
6859 objects. Use CHECK_LIVE for all vector-like objects except buffers
6860 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
6861 Avoid redundant calls to mark_vectorlike for bool vectors.
6863 2012-06-30 Glenn Morris <rgm@gnu.org>
6865 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
6867 * epaths.in (PATH_SITELOADSEARCH): New.
6868 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
6869 This is rather than relying on --enable-locallisppath elements
6870 having "site-lisp" in their names. (Bug#10208#25, 11658)
6872 2012-06-30 Eli Zaretskii <eliz@gnu.org>
6874 * w32proc.c (sys_select): Accept and ignore one more argument.
6876 * w32.c (emacs_gnutls_pull): Call select with one more argument.
6878 * sysselect.h [DOS_NT]: Don't include sys/select.h.
6879 (pselect) [!MS_DOS]: Redirect to sys_select.
6881 * sysdep.c: Don't include dos.h and dosfns.h.
6883 * process.c (sys_select):
6884 * msdos.c (sys_select): Accept one more argument and ignore it.
6886 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
6887 adapt data types and code to that.
6890 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
6891 which clashes with the gnulib function of the same name.
6893 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
6895 * font.c (font_style_to_value, font_style_symbolic)
6896 (font_prop_validate_style): Add type checks for values in
6899 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
6901 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
6904 2012-06-29 Eli Zaretskii <eliz@gnu.org>
6906 * xdisp.c (try_window_id): Undo last change.
6908 * w32.c (getwd): Adjust commentary about startup_dir.
6909 (init_environment): Always call sys_access, even in non-MSVC
6910 builds. Don't chdir to the directory of the Emacs executable.
6911 This undoes code from 1997 which was justified by the need to
6912 "avoid conflicts when removing and renaming directories". But its
6913 downside was that every relative file name was being interpreted
6914 relative to the directory of the Emacs executable, which can never
6915 be TRT. In particular, it broke sys_access when called with
6916 relative file names.
6917 (sys_access): Map GetLastError to errno.
6919 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6921 * window.h (struct window): Change type of 'fringes_outside_margins'
6922 to bitfield. Fix comment. Adjust users accordingly.
6923 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
6925 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
6928 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
6930 * gnutls.c (emacs_gnutls_handshake):
6931 Add QUIT to make the loop interruptible.
6933 2012-06-29 Glenn Morris <rgm@gnu.org>
6935 * charset.c (init_charset): Make lack of etc/charsets fatal.
6937 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6939 * editfns.c (region_limit): Fix type mismatch.
6941 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
6943 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
6944 undefined. Convert from xassert to eassert.
6945 * nsmenu.m: Convert from xassert to eassert.
6946 * nsterm.m: Likewise.
6948 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
6950 * editfns.c (region_limit): Clip to narrowing (bug#11770).
6952 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
6954 Avoid integer overflow on scroll-left and scroll-right.
6955 * window.c (HSCROLL_MAX): New macro.
6956 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
6957 overflow when requested scroll falls outside ptrdiff_t range.
6959 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6961 * window.h (struct window): Change type of 'hscroll',
6962 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
6963 'last_modified' and 'last_overlay_modified' to EMACS_INT.
6964 Adjust users accordingly.
6965 * xdisp.c (try_cursor_movement): Replace type check with eassert.
6966 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
6967 from EMACS_INT to ptrdiff_t.
6968 (make_window): Omit redundant initialization.
6970 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
6972 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
6974 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6976 * window.h (struct window): Change type of 'use_time' and
6977 'sequence_number' from Lisp_Object to int.
6978 * frame.c (make_frame): Adjust users accordingly.
6979 * print.c (print_object): Likewise.
6980 * window.c (select_window, Fwindow_use_time, make_parent_window)
6981 (make_window): Likewise.
6983 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
6985 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
6986 enabled with --enable-checking=[all,glyphs] configure option.
6987 Fix GLYPH_DEBUG usage assuming that it may be undefined,
6988 adjust comments accordingly.
6989 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
6990 undefined, adjust comments accordingly.
6991 * image.c: Likewise.
6992 * scroll.c: Likewise.
6993 * w32fns.c: Likewise.
6994 * w32term.c: Likewise.
6995 * xdisp.c: Likewise.
6996 * xfaces.c: Likewise.
6998 * xterm.c: Likewise.
7000 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
7002 Generalize run-time debugging checks.
7003 * dispextern.h (XASSERTS): Remove.
7004 * fontset.c (xassert): Remove.
7005 Convert from xassert to eassert.
7006 * alloc.c: Convert from xassert to eassert.
7008 * dispnew.c: Likewise.
7010 * fringe.c: Likewise.
7011 * ftfont.c: Likewise.
7012 * gtkutil.c: Likewise.
7013 * image.c: Likewise.
7014 * keyboard.c: Likewise.
7016 * process.c: Likewise.
7017 * scroll.c: Likewise.
7018 * sound.c: Likewise.
7020 * w32console.c: Likewise.
7021 * w32fns.c: Likewise.
7022 * w32term.c: Likewise.
7023 * window.c: Likewise.
7024 * xdisp.c: Likewise.
7025 * xfaces.c: Likewise.
7027 * xselect.c: Likewise.
7028 * xterm.c: Likewise.
7030 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
7032 * fns.c (maybe_resize_hash_table): Output message when growing the
7035 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
7037 * alloc.c (allocate_string_data): Remove dead code.
7038 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
7039 avoid GCC warning about unused macro.
7041 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
7043 * alloc.c (allocate_string): Omit intervals initialization.
7044 * alloc.c (make_uninit_multibyte_string): Initialize intervals
7045 as in make_pure_string and make_pure_c_string.
7047 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
7049 * alloc.c (allocate_string): Fix last change.
7051 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
7053 * alloc.c (allocate_string): Remove two redundant calls
7054 to memset, add explicit initialization where appropriate.
7056 2012-06-27 Glenn Morris <rgm@gnu.org>
7058 * lisp.mk (lisp): Remove paths.elc.
7060 2012-06-27 Chong Yidong <cyd@gnu.org>
7062 * doc.c (Fsubstitute_command_keys): Fix punctuation.
7064 2012-06-26 John Wiegley <johnw@newartisans.com>
7066 * unexmacosx.c (copy_data_segment): Add two section names used
7067 on Mac OS X Lion: __mod_init_func and __mod_term_func.
7069 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
7070 when building with Clang.
7072 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
7074 * eval.c (Fapply): Allow calling it with a single argument.
7076 2012-06-26 Eli Zaretskii <eliz@gnu.org>
7078 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
7079 _stricmp and _strnicmp.
7080 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
7082 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
7084 * alloc.c (allocate_window): Zero out non-Lisp part of newly
7086 (allocate_process): Likewise for new process.
7087 (allocate_terminal): Change to use offsetof.
7088 (allocate_frame): Likewise.
7089 * frame.c (make_frame): Omit redundant initialization.
7090 * window.c (make_parent_window): Use memset.
7091 (make_window): Omit redundant initialization.
7092 * process.c (make_process): Omit redundant initialization.
7093 * terminal.c (create_terminal): Likewise.
7095 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
7097 * term.c (delete_tty): Remove redundant call to memset.
7099 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
7101 * alloc.c: Remove build_string.
7102 * lisp.h: Define build_string as static inline. This provides
7103 a better opportunity to optimize away calls to strlen when the
7104 function is called with compile-time constant argument.
7105 * image.c (imagemagick_error): Convert to build_string.
7106 * w32proc.c (sys_spawnve): Likewise.
7107 * xterm.c (x_term_init): Likewise.
7109 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
7111 Use sprintf return value instead of invoking strlen on result.
7112 In the old days this wasn't portable, since some sprintf
7113 implementations returned char *. But they died out years ago and
7114 Emacs already assumes sprintf returns int.
7115 Similarly for float_to_string.
7116 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
7117 * ccl.c (ccl_driver):
7118 * character.c (string_escape_byte8):
7119 * data.c (Fnumber_to_string):
7120 * doprnt.c (doprnt):
7121 * print.c (print_object):
7122 * xdisp.c (message_dolog):
7123 * xfns.c (syms_of_xfns):
7124 Use sprintf or float_to_string result to avoid need to call strlen.
7125 * data.c (Fnumber_to_string):
7126 Use make_unibyte_string, since the string must be ASCII.
7127 * lisp.h, print.c (float_to_string): Now returns int length.
7128 * term.c (produce_glyphless_glyph):
7129 Use sprintf result rather than recomputing it.
7131 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
7132 * Makefile.in (ALL_CFLAGS):
7133 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
7134 * gmalloc.c, regex.c: Include <config.h> unconditionally.
7136 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
7138 * dispextern.h (xstrcasecmp): Define to library function
7139 strcasecmp if available.
7140 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
7142 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
7144 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
7145 Avoid comma operator.
7146 * menu.c (push_submenu_start, push_submenu_end)
7147 (push_left_right_boundary, push_menu_pane): Likewise.
7148 * msdos.c (dos_rawgetc): Likewise.
7150 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
7152 * xfns.c (xic_create_fontsetname): Remove redundant calls
7155 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
7157 * gtkutil.c (get_utf8_string): Remove redundant assignment.
7158 sprintf already null-terminates its output.
7160 * xfns.c (x_window): Remove redundant cast.
7162 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
7164 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
7165 `const char *' to `char *' to avoid compiler warning.
7167 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
7169 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
7170 instead of truncating it to 63 (admittedly a generous limit).
7172 * process.c: Fix spelling and caps in comments.
7174 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
7176 * emacs.c (setpgrp): Remove definition, unused.
7177 * sysdep.c (setpgrp): Remove definition, not used in this file.
7179 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
7181 * makefile.w32-in: Update dependencies.
7183 2012-06-24 Eli Zaretskii <eliz@gnu.org>
7185 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
7186 (SYSTIME_H): Add nt/inc/sys/time.h.
7188 * systime.h [WINDOWSNT]: Include sys/time.h.
7190 * s/ms-w32.h (struct timespec): Definition moved from
7191 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
7193 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
7195 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
7196 * buffer.h (buffer_slot_type_mismatch):
7197 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
7198 * eval.c (unwind_to_catch):
7199 * image.c (my_png_error, my_error_exit):
7200 * keyboard.c (quit_throw_to_read_char, user_error)
7201 (Fexit_recursive_edit, Fabort_recursive_edit):
7202 * lisp.h (die, args_out_of_range, args_out_of_range_3)
7203 (wrong_type_argument, buffer_overflow, __executable_start)
7204 (memory_full, buffer_memory_full, string_overflow, Fthrow)
7205 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
7206 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
7208 (child_setup) [!DOS_NT]:
7209 * lread.c (end_of_file_error, invalid_syntax):
7210 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
7211 * puresize.h (pure_write_error):
7212 * search.c (matcher_overflow):
7213 * sound.c (sound_perror, alsa_sound_perror):
7214 * sysdep.c, syssignal.h (croak):
7215 * term.c (maybe_fatal, vfatal):
7216 * textprop.c (text_read_only):
7217 * undo.c (user_error):
7218 * unexmacosx.c (unexec_error):
7219 * xterm.c (x_ins_del_lines, x_delete_glyphs):
7220 Use _Noreturn rather than NO_RETURN.
7221 No need for separate decl merely because of _Noreturn.
7222 * sound.c (sound_warning, parse_sound):
7223 Remove unnecessary forward decls.
7225 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
7227 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
7228 * lisp.h (WAIT_READING_MAX): New macro.
7229 * dispnew.c (Fsleep_for, sit_for):
7230 * keyboard.c (kbd_buffer_get_event):
7231 * process.c (Faccept_process_output):
7232 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
7233 This improves on the previous patch, which introduced a bug
7234 when time_t is unsigned and as wide as intmax_t.
7235 See <http://bugs.gnu.org/9000#51>.
7237 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7239 * dispnew.c (sit_for, Fsleep_for):
7240 * keyboard.c (kbd_buffer_get_event):
7241 * process.c (Faccept_process_output): Avoid compiler warnings when
7242 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
7244 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
7246 * makefile.w32-in: Update dependencies.
7248 * w32.c (ltime): Add return type and declare static.
7249 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
7251 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
7253 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
7254 Privately reported by Herbert J. Skuhra.
7255 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
7257 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
7258 not make_lisp_timeval, when the argument is of type EMACS_TIME.
7260 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7262 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
7263 last argument of make_unibyte_string.
7265 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
7266 language ID in the event parameters.
7268 * w32term.c (w32_read_socket): Put the new keyboard codepage into
7269 event.code, not the obscure "character set ID".
7271 2012-06-23 Chong Yidong <cyd@gnu.org>
7273 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
7275 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7277 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
7278 * w32.c (fdutimens): New function.
7280 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
7282 * s/ms-w32.h (pselect): Redirect to sys_select.
7284 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
7286 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
7287 in the logic of incrementing and decrementing the value of
7288 use_relocatable_buffers.
7290 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
7292 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
7293 Privately reported by Herbert J. Skuhra.
7294 [__FreeBSD__]: Remove "*/" typo after "#include".
7295 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
7296 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
7297 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
7298 Don't assume EMACS_TIME and struct timeval are the same type.
7300 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
7302 Support higher-resolution time stamps (Bug#9000).
7303 The time stamps are only nanosecond-resolution at the C level,
7304 since that's the best that any real-world system supports now.
7305 But they are picosecond-resolution at the Lisp level, as that's
7306 easy, and leaves room for future OS improvements.
7308 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
7311 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
7312 Don't get current time unless it's needed.
7314 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
7315 now provides it if it's absent.
7316 (start_atimer): Port to higher-res time stamps.
7317 Check for time stamp overflow. Don't get current time more
7318 often than is needed.
7320 * buffer.h (struct buffer): Buffer modtime now has high resolution.
7321 Include systime.h, not time.h.
7322 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
7324 * dired.c: Include stat-time.h.
7325 (Ffile-attributes): File times now have higher resolution.
7327 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
7328 (struct image): Timestamp now has higher resolution.
7330 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
7331 has at least microseconds now. All uses removed.
7332 (update_frame, update_single_window, update_window, update_frame_1)
7333 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
7334 (duration_to_sec_usec): Remove; no longer needed.
7336 * editfns.c (time_overflow): Now extern.
7337 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
7338 (float-time, Fformat_time_string, Fcurrent_time_string)
7339 (Fcurrent_time_zone): Accept and generate higher-resolution
7341 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
7342 (decode_time_components, lisp_seconds_argument): New functions.
7343 (make_time): Now static.
7344 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
7345 Report an error if the time is invalid, rather than having the caller
7348 * fileio.c: Include <stat-time.h>
7349 (Fcopy_file): Copy higher-resolution time stamps.
7350 Prefer to set the time stamp via a file descriptor if that works.
7351 (Fset_file_times, Finsert_file_contents, Fwrite_region)
7352 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
7353 (Fvisited_file_modtime, Fset_visited_file_modtime):
7354 Support higher-resolution time stamps.
7356 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
7358 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
7360 * image.c (prepare_image_for_display, clear_image_cache)
7361 (lookup_image): Port to higer-resolution time stamps.
7363 * keyboard.c (start_polling, bind_polling_period):
7364 Check for time stamp overflow.
7365 (read_char, kbd_buffer_get_event, timer_start_idle)
7366 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
7367 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
7368 Port to higher-resolution time stamps. Do not assume time_t is signed.
7369 (decode_timer): New function. Timers are now vectors of length 9,
7370 not 8, to accommodate the picosecond component.
7371 (timer_check_2): Use it.
7373 * nsterm.m (select_timeout, timeval_subtract): Remove.
7374 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
7375 as they're a bit more accurate and handle overflow better.
7376 (ns_select): Change prototype to be compatible with pselect.
7377 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
7378 * nsterm.h (ns_select): Adjust prototype.
7380 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
7381 us-resolution time stamps.
7382 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
7384 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
7386 * lisp.h (time_overflow): New decl.
7387 (wait_reading_process_output): First arg is now intmax_t, not int,
7388 to accommodate larger waits.
7390 * process.h (struct Lisp_Process.read_output_delay):
7391 Now counts nanoseconds, not microseconds.
7392 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
7394 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
7395 (wait_reading_process_output):
7396 Port to ns-resolution time stamps.
7397 (Faccept_process_output, wait_reading_process_output):
7398 Check for time stamp overflow. Do not assume time_t is signed.
7399 (select_wrapper): Remove; we now use pselect.
7400 (Fprocess_attributes): Now generates ns-resolution time stamps.
7402 * sysdep.c: Include utimens.h. Don't include utime.h
7403 or worry about struct utimbuf; gnulib does that for us now.
7404 (gettimeofday): Remove; gnulib provides a substitute.
7405 (make_timeval): New function.
7406 (set_file_times): Now sets ns-resolution time stamps.
7407 New arg FD; all uses changed.
7408 (time_from_jiffies, ltime_from_jiffies, get_up_time)
7409 (system_process_attributes):
7410 Now returns ns-resolution time stamp. All uses changed.
7411 Check for time stamp overflow.
7413 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
7414 provides a substitute now.
7416 * systime.h: Include timespec.h rather than sys/time.h and time.h,
7417 since it guarantees struct timespec.
7418 (EMACS_TIME): Now struct timespec, so that we can support
7419 ns-resolution time stamps.
7420 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
7421 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
7422 (EMACS_USECS): Remove.
7423 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
7424 so multiply the arg by 1000 before storing it.
7425 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
7427 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
7428 Port to ns-resolution time stamps.
7429 (EMACS_TIME_NEG_P): Remove; replaced by....
7430 (EMACS_TIME_SIGN): New macro.
7431 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
7432 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
7433 (set_file_times, make_time, lisp_time_argument): Adjust signature.
7434 (make_timeval, make_lisp_time, decode_time_components): New decls.
7435 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
7436 that it mishandled time_t overflow. You can't compare by subtracting!
7437 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
7438 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
7440 * term.c: Include <sys/time.h>.
7441 (timeval_to_Time): New function, for proper overflow wraparound.
7442 (term_mouse_position, term_mouse_click): Use it.
7444 * undo.c (record_first_change): Support higher-resolution time stamps
7446 (Fprimitive_undo): Use them when restoring time stamps.
7448 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
7449 (w32_get_internal_run_time):
7450 Port to higher-resolution Emacs time stamps.
7451 (ltime): Now accepts single 64-bit integer, as that's more convenient
7454 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
7456 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
7457 for compatibility with pselect. Support ns-resolution time stamps.
7459 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
7461 * xselect.c (wait_for_property_change, x_get_foreign_selection):
7462 Check for time stamp overflow, and support ns-resolution time stamps.
7464 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
7465 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
7466 (timeval_subtract): Remove; no longer needed.
7467 (XTflash, XTring_bell, x_wait_for_event):
7468 Port to ns-resolution time stamps. Don't assume time_t is signed.
7470 2012-06-22 Chong Yidong <cyd@gnu.org>
7472 * xdisp.c (x_consider_frame_title): Revert last change.
7474 2012-06-22 Eli Zaretskii <eliz@gnu.org>
7476 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
7477 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
7478 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
7479 staticidx goes up to 1597 out of 1600 = 0x640.)
7481 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
7483 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
7484 Otherwise, the umask might be mistakenly 0 while handling input signals.
7486 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
7488 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
7490 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
7492 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
7493 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
7494 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
7495 access to `contents' member of Lisp_Vector objects with AREF and ASET
7498 2012-06-19 Chong Yidong <cyd@gnu.org>
7500 * frame.c (delete_frame): When selecting a frame on a different
7501 text terminal, do not alter the terminal's top-frame.
7503 * xdisp.c (format_mode_line_unwind_data): Record the target
7504 frame's selected window and its terminal's top-frame.
7505 (unwind_format_mode_line): Restore them.
7506 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
7508 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
7509 since tty frames can be explicitly named.
7510 (prepare_menu_bars): Likewise.
7512 * term.c (Ftty_top_frame): New function.
7514 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7516 Port byte-code-meter to modern targets.
7517 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
7518 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
7519 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
7520 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
7521 (METER_1, METER_2): Simplify.
7523 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
7525 * data.c (Fdefalias): Return `symbol' (bug#11686).
7527 2012-06-18 Martin Rudalics <rudalics@gmx.at>
7529 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
7530 gets killed during executing of this function (Bug#11665).
7531 Try to always return Qt when the buffer has been actually killed.
7532 (Vkill_buffer_query_functions): In doc-string say that functions
7533 run by this hook should not change the current buffer.
7535 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7537 Fix recently-introduced process.c problems found by static checking.
7538 * process.c (write_queue_push, write_queue_pop, send_process):
7539 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
7540 (write_queue_pop): Fix pointer signedness problem.
7541 (send_process): Remove unused local.
7543 2012-06-17 Chong Yidong <cyd@gnu.org>
7545 * xdisp.c (redisplay_internal): No need to redisplay terminal
7546 frames that are not on top.
7548 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
7550 * process.c (make_process): Initialize write_queue.
7551 (write_queue_push, write_queue_pop): New functions.
7552 (send_process): Use them to maintain correct ordering of process
7555 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
7557 * lisp.h (eassert): Assume C89 or later.
7558 This removes the need for CHECK.
7559 (CHECK): Remove. Its comments about always evaluating its
7560 argument were confusing, as 'eassert' typically does not evaluate
7563 * coding.c (produce_chars): Use ptrdiff_t, not int.
7565 * xterm.c (x_draw_underwave): Check for integer overflow.
7566 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
7568 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
7570 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
7571 referenced (Bug#11583).
7573 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
7575 Implement wave-style variant of underlining.
7576 * dispextern.h (face_underline_type): New enum.
7577 (face): Add field for underline type.
7578 * nsterm.m (ns_draw_underwave): New function.
7579 (ns_draw_text_decoration): Use it.
7580 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
7582 (x_draw_glyph_string): Use them.
7583 * xfaces.c (Qline, Qwave): New Lisp objects.
7584 (check_lface_attrs, merge_face_ref)
7585 (Finternal_set_lisp_face_attribute, realize_x_face):
7586 Handle wave-style underline face attributes.
7587 * xterm.c (x_draw_underwave): New function.
7588 (x_draw_glyph_string): Use it.
7590 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
7592 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
7593 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
7594 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
7595 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
7596 ($(BLD)/w32select.$(O)): Update dependencies.
7598 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7600 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
7601 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
7602 * character.c (_fetch_multibyte_char_p): Remove.
7603 * alloc.c: Include "character.h" before "buffer.h".
7605 * buffer.c: Likewise.
7606 * bytecode.c: Likewise.
7607 * callint.c: Likewise.
7608 * callproc.c: Likewise.
7609 * casefiddle.c: Likewise.
7610 * casetab.c: Likewise.
7611 * category.c: Likewise.
7613 * coding.c: Likewise.
7614 * composite.c: Likewise.
7615 * dired.c: Likewise.
7616 * dispnew.c: Likewise.
7618 * dosfns.c: Likewise.
7619 * editfns.c: Likewise.
7620 * emacs.c: Likewise.
7621 * fileio.c: Likewise.
7622 * filelock.c: Likewise.
7624 * fontset.c: Likewise.
7625 * fringe.c: Likewise.
7626 * indent.c: Likewise.
7627 * insdel.c: Likewise.
7628 * intervals.c: Likewise.
7629 * keyboard.c: Likewise.
7630 * keymap.c: Likewise.
7631 * lread.c: Likewise.
7632 * macros.c: Likewise.
7633 * marker.c: Likewise.
7634 * minibuf.c: Likewise.
7635 * nsfns.m: Likewise.
7636 * nsmenu.m: Likewise.
7637 * print.c: Likewise.
7638 * process.c: Likewise.
7639 * regex.c: Likewise.
7640 * region-cache.c: Likewise.
7641 * search.c: Likewise.
7642 * syntax.c: Likewise.
7644 * textprop.c: Likewise.
7646 * unexsol.c: Likewise.
7647 * w16select.c: Likewise.
7648 * w32fns.c: Likewise.
7649 * w32menu.c: Likewise.
7650 * window.c: Likewise.
7651 * xdisp.c: Likewise.
7653 * xmenu.c: Likewise.
7655 * xselect.c: Likewise.
7657 2012-06-16 Eli Zaretskii <eliz@gnu.org>
7659 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
7660 If all the glyphs of the glyph row came from strings, and we have no
7661 cursor positioning clues, put the cursor on the first glyph of the
7663 (handle_face_prop): Use chunk-relative overlay string index when
7664 indexing into it->string_overlays array. (Bug#11653)
7665 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
7666 the rightmost. (Bug#11720)
7668 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7670 * category.h (CHAR_HAS_CATEGORY): Define as inline.
7671 (CATEGORY_MEMBER): Enforce 1/0 value.
7672 * category.c (_temp_category_set): Remove.
7674 2012-06-16 Eli Zaretskii <eliz@gnu.org>
7676 * window.c (Fdelete_other_windows_internal)
7677 (Fdelete_window_internal): Don't access frame's mouse highlight
7678 info of the initial frame. (Bug#11677)
7680 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
7682 * .gdbinit (xgetint): Fix recently-introduced paren typo.
7683 Assume USE_2_TAGS_FOR_INTS.
7684 (xreload): Adjust $tagmask width to match recent lisp.h change.
7686 Simplify lisp.h in minor ways that should not affect code.
7687 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
7688 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
7689 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
7690 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
7691 (INTTYPEBITS): New macro, for clarity.
7692 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
7693 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
7694 Simplify now that USE_LSB_TAG is always defined.
7695 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
7696 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
7698 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
7700 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
7702 2012-06-13 Glenn Morris <rgm@gnu.org>
7704 * s/bsd-common.h (BSD4_3):
7705 * s/usg5-4-common.h (USG5_4): No longer define; unused.
7707 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
7709 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
7712 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
7714 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
7715 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
7716 * alloc.c (widen_to_Lisp_Object): Remove.
7717 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
7718 * frame.c (delete_frame): Remove outdated comment.
7719 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
7720 USE_LISP_UNION_TYPE.
7721 (Fw32_unregister_hot_key): Likewise.
7722 (Fw32_toggle_lock_key): Likewise.
7723 * w32menu.c (add_menu_item): Likewise.
7724 (w32_menu_display_help): Use XIL instead of checking
7725 USE_LISP_UNION_TYPE.
7726 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
7727 (init_heap): Likewise.
7728 * w32term.c (w32_read_socket): Update comment.
7730 2012-06-13 Glenn Morris <rgm@gnu.org>
7732 * s/usg5-4-common.h, src/s/unixware.h:
7733 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
7735 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
7737 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
7739 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
7740 * alloc.c (make_number) [!defined make_number]:
7741 Remove, as lisp.h always defines this now.
7742 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
7743 (roundup_size): Verify that it is a power of 2.
7744 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
7745 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
7746 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
7747 -DUSE_LSB_TAG=0, to override the automatically-selected default.
7748 USE_LSB_TAG now is always defined to be either 0 or 1.
7750 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
7751 code works fine either way, and efficiency is not a concern here,
7752 as the union type is for debugging, not for production.
7753 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
7754 Use an inline function on all platforms when using the union type,
7755 since this is simpler and 'static inline' can be used portably
7757 (LISP_INITIALLY_ZERO): New macro.
7758 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
7759 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
7761 2012-06-12 Glenn Morris <rgm@gnu.org>
7763 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
7765 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
7767 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
7768 Move BROKEN_SIGIO to configure.
7770 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
7771 Move NO_TERMIO to configure.
7773 2012-06-12 Chong Yidong <cyd@gnu.org>
7775 * image.c (imagemagick_load_image): Use MagickFlattenImage if
7776 MagickMergeImageLayers is undefined. Use pixel pusher loop if
7777 MagickExportImagePixels is undefined.
7779 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
7781 * image.c (imagemagick_load_image): Remove unused label.
7783 2012-06-11 Glenn Morris <rgm@gnu.org>
7785 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7786 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
7787 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
7788 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
7790 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
7792 * alloc.c (make_byte_code): New function.
7793 (Fmake_byte_code): Use it. Don't purify here.
7794 * lread.c (read1): Use it as well to avoid extra allocation.
7796 2012-06-11 Chong Yidong <cyd@gnu.org>
7798 * image.c (imagemagick_load_image): Implement transparency.
7800 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
7802 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
7803 account for preceding backslashes. (Bug#11663)
7805 2012-06-09 Chong Yidong <cyd@gnu.org>
7807 * term.c: Support italics in capable terminals (Bug#9652).
7808 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
7809 (turn_on_face): Output using TS_enter_italic_mode if available.
7810 Don't handle unused blinking and alt-charset cases.
7811 (turn_off_face): Handle italic case; discard unused tty_blinking_p
7812 and tty_alt_charset_p cases.
7813 (tty_capable_p, init_tty): Support italics.
7815 * termchar.h (struct tty_display_info): Add field for italics.
7816 Remove unused blink field.
7818 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
7821 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
7822 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
7823 tty_alt_charset_p. Add tty_italic_p.
7825 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
7827 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
7828 dbus_type_is_basic if available.
7829 (xd_extract_signed, xd_extract_unsigned): Rename from
7830 extract_signed and extract_unsigned, respectively. Adapt callers.
7832 2012-06-09 Chong Yidong <cyd@gnu.org>
7834 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
7836 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
7839 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
7841 * xdisp.c (vmessage): Treat frame message as multibyte.
7842 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
7843 would generate the diagnostic "Making \302\247 buffer-local while
7846 2012-06-08 Eli Zaretskii <eliz@gnu.org>
7848 * dispnew.c (showing_window_margins_p): Undo last change, which
7849 was done due to an inadvertent commit.
7850 (adjust_frame_glyphs_for_frame_redisplay): Do call
7851 showing_window_margins_p.
7853 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7855 * eval.c (Fmake_var_non_special): New primitive.
7856 (syms_of_eval): Defsubr it.
7857 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
7859 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
7861 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
7862 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
7864 2012-06-08 Eli Zaretskii <eliz@gnu.org>
7866 * alloc.c (allocate_vectorlike): Fix last change.
7868 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
7870 Block-based vector allocation of small vectors.
7871 * lisp.h (struct vectorlike_header): New field `nbytes',
7872 adjust comment accordingly.
7873 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
7874 to denote vector blocks. Adjust users (live_vector_p,
7875 mark_maybe_pointer, valid_lisp_object_p) accordingly.
7876 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
7877 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
7878 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
7879 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
7880 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
7881 (roundup_size): New constant.
7882 (struct vector_block): New data type.
7883 (vector_blocks, vector_free_lists, zero_vector): New variables.
7884 (all_vectors): Rename to `large_vectors'.
7885 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
7886 (sweep_vectors): New functions.
7887 (allocate_vectorlike): Return `zero_vector' as the only vector of
7888 0 items. Allocate new vector from block if vector size is less than
7889 or equal to VBLOCK_BYTES_MAX.
7890 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
7891 (init_alloc_once): Add call to init_vectors.
7893 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7895 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
7897 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
7899 * doprnt.c (doprnt): Truncate multibyte char correctly.
7900 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
7901 would mishandle a string argument "Xc" if X was a multibyte
7902 character of length 2: it would truncate after X's first byte
7903 rather than including all of X.
7905 2012-06-06 Chong Yidong <cyd@gnu.org>
7907 * buffer.c (word_wrap): Doc fix.
7909 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
7911 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
7913 2012-06-03 Glenn Morris <rgm@gnu.org>
7915 * xdisp.c (tool-bar-style): Doc fix.
7917 2012-06-03 Ulrich Müller <ulm@gentoo.org>
7919 * Makefile.in (PAXCTL): Define.
7920 (temacs$(EXEEXT)): Disable memory randomization for the temacs
7921 binary via PaX flags if the paxctl utility is available.
7922 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
7923 Restore PaX flags to their default. (Bug#11398)
7925 2012-06-03 Chong Yidong <cyd@gnu.org>
7927 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
7930 2012-06-03 Chong Yidong <cyd@gnu.org>
7932 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
7933 (note_mode_line_or_margin_highlight): If there is no help echo,
7934 use mode-line-default-help-echo. Handle the case where the mouse
7935 position is past the end of the mode line string.
7937 * buffer.c (buffer_local_value_1): New function, split from
7938 Fbuffer_local_value; can return Qunbound.
7939 (Fbuffer_local_value): Use it.
7940 (Vmode_line_format): Docstring tweaks.
7942 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7944 * sysdep.c (system_process_attributes): Improve comment.
7946 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
7948 * keyboard.c: Export real-this-command to Elisp.
7949 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
7950 and DEFVAR it. Update all users.
7952 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
7954 * minibuf.c (Fassoc_string): Remove duplicate declaration.
7956 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
7957 Convert pctcpu and pctmem to Lisp float properly.
7958 Let the compiler fold better, as 100.0/0x8000 is exact.
7960 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
7962 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
7965 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
7967 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
7969 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
7971 For a 'struct window', replace some Lisp_Object fields to
7972 bitfields where appropriate, remove unused fields.
7973 * window.h (struct window): Remove unused 'last_mark_x' and
7974 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
7975 change its type from Lisp_Object to bitfield.
7976 Change type of 'force_start', 'optional_new_start',
7977 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
7978 fields from Lisp_Object to bitfield. Adjust users accordingly.
7980 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
7982 Pacify gcc -Wdouble-precision when using Xaw.
7983 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
7984 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
7985 Use 'float' consistently, rather than 'float' in most places
7986 and 'double' in a couple of places.
7988 2012-05-31 Eli Zaretskii <eliz@gnu.org>
7990 * xdisp.c (handle_stop): Detect whether we have overlay strings
7991 loaded by testing it->current.overlay_string_index to be
7992 non-negative, instead of checking whether n_overlay_strings is
7993 positive. (Bug#11587)
7995 2012-05-31 Chong Yidong <cyd@gnu.org>
7997 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
7999 * doc.c (Fsubstitute_command_keys): Doc fix.
8001 2012-05-31 Eli Zaretskii <eliz@gnu.org>
8003 * search.c (search_buffer): Remove calls to
8004 r_alloc_inhibit_buffer_relocation, as it is now called by
8005 maybe_unify_char, which was the cause of relocation of buffer text
8008 2012-05-31 Eli Zaretskii <eliz@gnu.org>
8010 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
8011 for the duration of call to load_charset, to avoid problems with
8012 callers of maybe_unify_char that access buffer text through C
8015 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
8016 decrement the inhibition flag, instead of just setting or
8019 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
8021 Remove obsolete '#define static' cruft.
8022 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
8023 This #undef was "temporary" in 2000; it is no longer needed
8024 now that '#define static' has gone away.
8025 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
8026 (gray_bitmap_bits): Remove; no longer needed.
8027 All uses replaced with definiens.
8028 * xterm.c: Include "bitmaps/gray.xbm".
8030 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
8032 Clean up __executable_start, monstartup when --enable-profiling.
8033 The following changes affect the code only when profiling.
8034 * dispnew.c (__executable_start): Rename from safe_bcopy.
8035 Define only on platforms that need it.
8036 * emacs.c: Include <sys/gmon.h> when profiling.
8037 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
8038 (__executable_start): Remove decl, since lisp.h does it now.
8039 (safe_bcopy): Remove decl; no longer has that name.
8040 (main): Coalesce #if into single bit of code, for simplicity.
8041 Cast pointers to uintptr_t, since standard libraries want integers
8043 * lisp.h (__executable_start): New decl.
8045 2012-05-31 Glenn Morris <rgm@gnu.org>
8047 * image.c (Fimagemagick_types): Doc fix.
8049 2012-05-30 Jim Meyering <meyering@redhat.com>
8051 * callproc.c (Fcall_process_region): Include directory component
8052 in mkstemp error message (Bug#11586).
8054 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
8056 * alloc.c, lisp.h (make_pure_vector): Now static.
8058 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
8060 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
8061 Move to byte-run.el.
8062 (Fautoload): Do the hash-doc more carefully.
8063 * data.c (Fdefalias): Purify definition, except for keymaps.
8064 (Qdefun): Move from eval.c.
8065 * lisp.h (Qdefun): Remove.
8066 * lread.c (read1): Tiny simplification.
8068 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
8070 Do not create empty overlays with the evaporate property (Bug#9642).
8071 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
8072 Bug#9642, but explicitly check that the buffer the overlay would
8073 be moved to is live and rearrange lines to make sure that errors
8074 will not put the overlay in an inconsistent state.
8075 (Fdelete_overlay): Cosmetics.
8077 2012-05-28 Eli Zaretskii <eliz@gnu.org>
8079 * w32term.c (my_bring_window_to_top): New function.
8080 (x_raise_frame): Use handle returned by DeferWindowPos, which
8081 could be different from the original one.
8082 Call my_bring_window_to_top instead of my_set_foreground_window.
8085 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
8086 by calling BringWindowToTop.
8088 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
8089 (WM_EMACS_END): Increase by one.
8091 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
8093 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
8094 This avoids undefined behavior that might cause the eassert
8095 to not catch an out-of-range value.
8097 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
8099 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
8100 Update dependencies.
8102 2012-05-27 Eli Zaretskii <eliz@gnu.org>
8104 * bidi.c (bidi_mirror_char): Fix last change.
8106 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
8108 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
8109 when referring to sectname field in printf format.
8111 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
8113 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
8114 Only r_alloc_inhibit_buffer_relocation needed to be added;
8115 the others were already declared.
8117 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
8118 before checking whether it's out of range. Put the check inside
8120 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
8122 2012-05-27 Ken Brown <kbrown@cornell.edu>
8124 * callproc.c (Fcall_process): Restore a line that was accidentally
8125 commented out in the 2011-02-13 change (bug#11547).
8127 2012-05-27 Eli Zaretskii <eliz@gnu.org>
8129 * lisp.h [REL_ALLOC]: Add prototypes for external functions
8130 defined on ralloc.c.
8132 * buffer.c [REL_ALLOC]: Remove prototypes of
8133 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
8134 they are now on lisp.h.
8136 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
8138 * search.c (search_buffer): Use it to inhibit relocation of buffer
8139 text while re_search_2 is doing its job, because re_search_2 is
8140 passed C pointers to buffer text. (Bug#11519)
8142 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
8145 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
8146 state after an additional call to move_it_in_display_line_to, keep
8147 the values of it->max_ascent and it->max_descent found for the
8149 (pos_visible_p): Revert the comparison against bottom_y to what it
8150 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
8153 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
8155 Fix coding-related core dumps with gcc -ftrapv.
8156 The code was computing A - B, where A and B are pointers, and B is
8157 random garbage. This can lead to core dumps on platforms that
8158 have special pointer registers, and it also leads to core dumps on
8159 x86-64 when compiled with gcc -ftrapv. The fix is to compute
8160 A - B only when B is initialized properly.
8161 * coding.c (coding_set_source, coding_set_destination): Return void.
8162 (coding_change_source, coding_change_destinations): New functions,
8163 with the old behaviors of coding_set_source and coding_set_destination.
8164 All callers that need an offset changed to use these new functions.
8166 2012-05-26 Glenn Morris <rgm@gnu.org>
8168 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
8170 2012-05-26 Eli Zaretskii <eliz@gnu.org>
8172 Extend mouse support on W32 text-mode console.
8173 * xdisp.c (draw_row_with_mouse_face):
8174 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
8176 * w32console.c: Include window.h.
8177 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
8179 (initialize_w32_display): Initialize mouse-highlight data.
8181 * w32inevt.c: Include termchar.h and window.h.
8182 (do_mouse_event): Support mouse-autoselect-window. When the mouse
8183 moves, call note_mouse_highlight. If help_echo changed, call
8184 gen_help_event to produce help-echo message in the echo area.
8185 Call clear_mouse_face if mouse_face_hidden is set in the mouse
8188 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
8190 * lread.c (read1): Simplify slightly to avoid an overflow warning
8191 with GCC 4.7.0 on x86-64.
8193 2012-05-26 Eli Zaretskii <eliz@gnu.org>
8195 * bidi.c (bidi_mirror_char): Revert last change: an int is
8196 definitely wide enough here.
8198 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
8200 Fix integer width and related bugs (Bug#9874).
8201 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
8202 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
8203 (string_bytes, check_sblock, allocate_string_data):
8204 (compact_small_strings, Fmake_bool_vector, make_string)
8205 (make_unibyte_string, make_multibyte_string)
8206 (make_string_from_bytes, make_specified_string)
8207 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
8208 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
8210 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8211 (allocate_pseudovector):
8212 Use int, not EMACS_INT, where int is wide enough.
8213 (inhibit_garbage_collection, Fgarbage_collect):
8214 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8215 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
8216 int might not be wide enough.
8217 (bidi_cache_search, bidi_cache_find, bidi_init_it)
8218 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
8219 (bidi_at_paragraph_end, bidi_find_paragraph_start)
8220 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
8221 (bidi_level_of_next_char, bidi_move_to_visually_next):
8222 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8223 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
8224 (Fkill_buffer, Fset_buffer_major_mode)
8225 (advance_to_char_boundary, Fbuffer_swap_text)
8226 (Fset_buffer_multibyte, overlays_at, overlays_in)
8227 (overlay_touches_p, struct sortvec, record_overlay_string)
8228 (overlay_strings, recenter_overlay_lists)
8229 (adjust_overlays_for_insert, adjust_overlays_for_delete)
8230 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
8231 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
8232 (Foverlay_recenter, last_overlay_modification_hooks_used)
8233 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
8234 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8235 (validate_region): Omit unnecessary test for b <= e,
8236 since that's guaranteed by the previous test.
8237 (adjust_overlays_for_delete): Avoid pos + length overflow.
8238 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
8239 (report_overlay_modification):
8240 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8241 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
8242 Omit pointer cast, which isn't needed anyway, and doesn't work
8243 after the EMACS_INT -> ptrdiff_t change.
8244 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
8245 * buffer.h: Adjust decls to match defn changes elsewhere.
8246 (struct buffer_text, struct buffer):
8247 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8248 Use EMACS_INT, not int, where int might not be wide enough.
8249 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
8250 not int, to avoid needless 32-bit limit on 64-bit hosts.
8251 (exec_byte_code): Use tighter memory-full test, one that checks
8252 for alloca overflow. Don't compute the address of the object just
8253 before an array, as that's not portable. Use EMACS_INT, not
8254 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
8255 * callint.c (Fcall_interactively):
8256 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8257 * callproc.c (call_process_kill, Fcall_process):
8258 Don't assume pid_t fits into an Emacs fixnum.
8259 (call_process_cleanup, Fcall_process, child_setup):
8260 Don't assume pid_t fits into int.
8261 (call_process_cleanup, Fcall_process, delete_temp_file)
8262 (Fcall_process_region):
8263 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8264 (Fcall_process): Simplify handling of volatile integers.
8265 Use int, not EMACS_INT, where int will do.
8266 * casefiddle.c (casify_object, casify_region, operate_on_word)
8267 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
8268 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8269 (casify_object): Avoid integer overflow when overallocating buffer.
8270 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
8271 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
8272 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
8273 * category.h (CATEGORYP): Don't assume arg is nonnegative.
8274 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
8275 integers are now checked earlier. All uses replaced with XINT.
8277 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8278 For CCL_MapSingle, check that content and value are in int range.
8279 (ccl_driver, Fregister_code_conversion_map):
8280 Check that Vcode_version_map_vector is a vector.
8281 (resolve_symbol_ccl_program): Check that vector header is in range.
8282 Always copy the vector, so that we can check its contents reliably
8283 now rather than having to recheck each instruction as it's being
8284 executed. Check that vector words fit in 'int'.
8285 (ccl_get_compiled_code, Fregister_ccl_program)
8286 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
8287 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
8288 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
8289 contents are in range.
8290 (Fccl_execute_on_string): Check that status is in range.
8291 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
8292 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
8293 Accept and return EMACS_INT, not int, because callers can pass values
8295 (c_string_width, strwidth, lisp_string_width, chars_in_text)
8296 (multibyte_chars_in_text, parse_str_as_multibyte)
8297 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
8298 (str_as_unibyte, str_to_unibyte, string_count_byte8)
8299 (string_escape_byte8, Fget_byte):
8300 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8301 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
8302 avoid mishandling large integers.
8303 * character.h: Adjust decls to match defn changes elsewhere.
8304 * charset.c (load_charset_map_from_file, find_charsets_in_text)
8305 (Ffind_charset_region):
8306 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8307 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
8308 (load_charset_map_from_vector, Fdefine_charset_internal):
8309 Don't assume fixnum fits in int.
8310 (load_charset_map_from_vector, Fmap_charset_chars):
8311 Remove now-unnecessary CHECK_NATNUMs.
8312 (Fdefine_charset_internal): Check ranges here, more carefully.
8313 Don't rely on undefined behavior with signed left shift overflow.
8314 Don't assume unsigned int fits into fixnum, or that fixnum fits
8315 into unsigned int. Don't require max_code to be a valid fixnum;
8316 that's not true for gb10830 4-byte on a 32-bit host. Allow
8317 invalid_code to be a cons, for the same reason. Require code_offset
8318 to be a character. Avoid int overflow if max_char is close
8320 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
8321 this is intended anyway and avoids some undefined behavior.
8322 (load_charset_map): Pass unsigned, not int, as 2nd arg of
8323 INDEX_TO_CODE_POINT, as that's what it expects.
8324 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
8325 * charset.h (DECODE_CHAR): Return int, not unsigned;
8326 this is what was intended anyway, and it avoids undefined behavior.
8327 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
8328 integer-overflow issues.
8329 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
8330 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
8331 where the argument is EMACS_INT, and this behavior is not intended.
8332 * chartab.c (Fmake_char_table, Fset_char_table_range)
8333 (uniprop_get_decoder, uniprop_get_encoder):
8334 Don't assume fixnum fits in int.
8335 * cmds.c (move_point): New function, that does the gist of
8336 Fforward_char and Fbackward_char, but does so while checking
8337 for integer overflow more accurately.
8338 (Fforward_char, Fbackward_char): Use it.
8339 (Fforward_line, Fend_of_line, internal_self_insert)
8340 (internal_self_insert):
8341 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8342 Fix a FIXME, by checking for integer overflow when calculating
8343 target_clm and actual_clm.
8344 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
8345 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
8346 (ASSURE_DESTINATION, coding_alloc_by_realloc)
8347 (coding_alloc_by_making_gap, alloc_destination)
8348 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
8349 (encode_coding_utf_16, detect_coding_emacs_mule)
8350 (decode_coding_emacs_mule, encode_coding_emacs_mule)
8351 (detect_coding_iso_2022, decode_coding_iso_2022)
8352 (encode_invocation_designation, encode_designation_at_bol)
8353 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
8354 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
8355 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
8356 (encode_coding_ccl, encode_coding_raw_text)
8357 (detect_coding_charset, decode_coding_charset)
8358 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
8359 (produce_composition, produce_charset, produce_annotation)
8360 (decode_coding, handle_composition_annotation)
8361 (handle_charset_annotation, consume_chars, decode_coding_gap)
8362 (decode_coding_object, encode_coding_object, detect_coding_system)
8363 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
8364 (code_convert_region, code_convert_string)
8365 (Fdefine_coding_system_internal)
8366 (coding_set_source, coding_set_destination):
8367 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8368 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
8369 (Fdefine_coding_system_internal):
8370 Don't assume fixnums fit in int.
8371 (decode_coding_gap, decode_coding_object, encode_coding_object)
8372 (Fread_coding_system, Fdetect_coding_region)
8373 (Funencodable_char_position, Fcheck_coding_systems_region)
8374 (get_translation, handle_composition_annotation, consume_chars):
8375 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8376 (consume_chars): Rewrite to not calculate an address outside buffer.
8377 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
8378 Don't access memory outside of the args array.
8379 (Fdefine_coding_system_internal): Check for charset-id overflow.
8380 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
8381 result of ENCODE_CHAR.
8382 * coding.h: Adjust decls to match defn changes elsewhere.
8383 (struct coding_system):
8384 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8385 * composite.c (get_composition_id, find_composition)
8386 (run_composition_function, update_compositions)
8387 (compose_text, composition_gstring_put_cache)
8388 (composition_gstring_p, composition_gstring_width)
8389 (fill_gstring_header, fill_gstring_body, autocmp_chars)
8390 (composition_compute_stop_pos, composition_reseat_it)
8391 (composition_update_it, struct position_record)
8392 (find_automatic_composition, composition_adjust_point)
8393 (Fcomposition_get_gstring, Ffind_composition_internal):
8394 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8395 (update_compositions):
8396 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8397 * composite.h: Adjust decls to match defn changes elsewhere.
8398 (struct composition):
8399 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8400 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
8401 Do not attempt to compute the address of the object just before a
8402 buffer; this is not portable.
8404 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8405 (Faset): Use int, not EMACS_INT, where int is wide enough.
8406 (Fstring_to_number): Don't assume fixnums fit in int.
8407 (Frem): Don't assume arg is nonnegative.
8408 * dbusbind.c (xd_append_arg): Check for integers out of range.
8409 (Fdbus_call_method): Don't overflow the timeout int.
8410 (extract_signed, extract_unsigned): New functions.
8411 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
8412 (xd_get_connection_references): Return ptrdiff_t, not int.
8414 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
8415 (xd_read_message_1):
8416 Use int, not unsigned, where the dbus API uses int.
8417 (Fdbus_message_internal): Don't overflow mtype.
8418 (syms_of_dbusbind): Allocate right-sized buffer for integers.
8419 * dired.c (directory_files_internal, file_name_completion, scmp)
8420 (file_name_completion_stat):
8421 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8422 (file_name_completion): Don't overflow matchcount.
8423 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
8424 * dispextern.h: Adjust decls to match defn changes elsewhere.
8425 (struct text_pos, struct glyph, struct bidi_saved_info)
8426 (struct bidi_string_data, struct bidi_it, struct composition_it)
8428 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8429 (struct display_pos, struct composition_it, struct it):
8430 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8431 * dispnew.c (increment_matrix_positions)
8432 (increment_row_positions, mode_line_string)
8433 (marginal_area_string):
8434 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8435 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
8436 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8437 (duration_to_sec_usec): New function, to check for overflow better.
8438 (Fsleep_for, sit_for): Use it.
8439 * doc.c (get_doc_string, store_function_docstring):
8440 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8441 (get_doc_string, Fsnarf_documentation):
8442 Use int, not EMACS_INT, where int is wide enough.
8444 Use SAFE_ALLOCA, not alloca.
8445 Check for overflow when converting EMACS_INT to off_t.
8446 * doprnt.c (doprnt):
8447 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8448 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
8449 Don't assume uid_t fits into fixnum.
8450 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
8451 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
8452 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
8453 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
8454 (general_insert_function)
8455 (Finsert_char, make_buffer_string, make_buffer_string_both)
8456 (update_buffer_properties, Fbuffer_substring)
8457 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
8458 (Fsubst_char_in_region, check_translation)
8459 (Ftranslate_region_internal, save_restriction_restore, Fformat)
8460 (transpose_markers, Ftranspose_regions):
8461 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8462 (clip_to_bounds): Move to lisp.h as an inline function).
8463 (Fconstrain_to_field): Don't assume integers are nonnegative.
8464 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
8465 (Fsubst_char_in_region, Fsave_restriction):
8466 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8467 (Femacs_pid): Don't assume pid_t fits into fixnum.
8468 (lo_time): Use int, not EMACS_INT, when int suffices.
8469 (lisp_time_argument): Check for usec out of range.
8470 (Fencode_time): Don't assume fixnum fits in int.
8471 (Fuser_login_name, Fuser_full_name): Signal an error
8472 if a uid argument is out of range, rather than relying on
8474 (Fformat_time_string): Remove now-unnecessary check.
8475 lisp_time_argument checks for out-of-range usec now.
8476 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
8477 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
8478 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
8479 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
8480 (init_cmdargs, Fdump_emacs):
8481 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8482 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
8483 the bottom (typically) 32 bits of the fixnum.
8484 * eval.c (specpdl_size, call_debugger):
8485 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8486 (when_entered_debugger, Fbacktrace_debug):
8487 Don't assume fixnum can fit in int.
8488 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
8489 the object just before a buffer; this is not portable.
8490 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
8491 (grow_specpdl, unbind_to):
8492 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8493 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
8494 (grow_specpdl): Simplify allocation by using xpalloc.
8495 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
8496 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
8497 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
8498 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8499 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
8501 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8502 (Fcopy_file, non_regular_nbytes, read_non_regular)
8503 (Finsert_file_contents):
8504 Use int, not EMACS_INT, where int is wide enough.
8505 (READ_BUF_SIZE): Verify that it fits in int.
8506 (Finsert_file_contents): Check that counts are in proper range,
8507 rather than assuming fixnums fit into ptrdiff_t etc.
8508 Don't assume fixnums fit into int.
8509 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
8510 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
8511 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
8512 (string_char_to_byte, string_byte_to_char)
8513 (string_make_multibyte, string_to_multibyte)
8514 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
8515 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
8516 (substring_both, Fdelete, internal_equal, Ffillarray)
8517 (Fclear_string, mapcar1)
8518 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
8519 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
8520 (larger_vector, make_hash_table, maybe_resize_hash_table)
8521 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
8522 (Fmaphash, secure_hash):
8523 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8524 (concat): Check for string index and length overflow.
8525 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
8527 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8528 (larger_vector): New API (vec, incr_min, size_max) replaces old
8529 one (vec, new_size, init). This catches size overflow.
8530 INIT was removed because it was always Qnil.
8531 All callers changed.
8532 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
8533 the upper bound on a hash table index size.
8534 (make_hash_table, maybe_resize_hash_table): Use it.
8535 (secure_hash): Computer start_byte and end_byte only after
8536 they're known to be in ptrdiff_t range.
8537 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
8538 (Ffont_get_glyphs, Ffont_at):
8539 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8540 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
8541 (Flist_fonts, Fopen_font):
8542 Don't assume fixnum can fit in int.
8543 (check_gstring): Don't assume index can fit in int.
8544 (font_match_p): Check that fixnum is a character, not a nonnegative
8545 fixnum, since the later code needs to stuff it into an int.
8546 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
8547 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
8548 conversion overflow issues.
8549 (Fopen_font): Check for integer out of range.
8550 (Ffont_get_glyphs): Don't assume index can fit in int.
8551 * font.h: Adjust decls to match defn changes elsewhere.
8552 * fontset.c (reorder_font_vector): Redo score calculation to avoid
8554 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
8555 printmax_t, where ptrdiff_t is wide enough.
8556 (Finternal_char_font):
8557 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8558 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
8559 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
8560 (Fset_frame_position, x_set_frame_parameters)
8561 (x_set_line_spacing, x_set_border_width)
8562 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
8563 Check that fixnums are in proper range for system types.
8564 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
8565 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8566 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
8567 Use SAFE_ALLOCA_LISP, not alloca.
8568 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
8569 intptr_t is wide enough.
8570 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
8571 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
8572 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
8573 Check for fixnum out of range.
8574 * ftfont.c (ftfont_list): Don't assume index fits in int.
8575 Check that fixnums are in proper range for system types.
8576 (ftfont_shape_by_flt):
8577 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8578 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
8579 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8580 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
8581 Check that fixnums are in proper range for system types.
8582 * gnutls.h: Adjust decls to match defn changes elsewhere.
8583 * gtkutil.c (xg_dialog_run):
8584 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8585 (update_frame_tool_bar):
8586 Check that fixnums are in proper range for system types.
8587 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
8588 (lookup_image): Check that fixnums are in range for system types.
8589 * indent.c (last_known_column, last_known_column_point):
8590 (current_column_bol_cache):
8591 (skip_invisible, current_column, check_display_width):
8592 (check_display_width, scan_for_column, current_column_1)
8593 (Findent_to, Fcurrent_indentation, position_indentation)
8594 (indented_beyond_p, Fmove_to_column, compute_motion):
8595 (Fcompute_motion, Fvertical_motion):
8596 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8597 (last_known_column_modified): Use EMACS_INT, not int.
8598 (check_display_width):
8600 Check that fixnums and floats are in proper range for system types.
8601 (compute_motion): Don't assume index or fixnum fits in int.
8602 (compute_motion, Fcompute_motion):
8603 Use int, not EMACS_INT, when it is wide enough.
8604 (vmotion): Omit local var start_hpos that is always 0; that way
8605 we don't need to worry about overflow in expressions involving it.
8606 * indent.h: Adjust decls to match defn changes elsewhere.
8608 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8609 Use int, not EMACS_INT, where int is wide enough.
8610 Remove unused members ovstring_chars_done and tab_offset;
8612 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
8613 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
8614 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
8615 (make_gap, copy_text, insert, insert_and_inherit)
8616 (insert_before_markers, insert_before_markers_and_inherit)
8617 (insert_1, count_combining_before, count_combining_after)
8618 (insert_1_both, insert_from_string)
8619 (insert_from_string_before_markers, insert_from_string_1)
8620 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
8621 (adjust_after_replace, adjust_after_insert, replace_range)
8622 (replace_range_2, del_range, del_range_1, del_range_byte)
8623 (del_range_both, del_range_2, modify_region)
8624 (prepare_to_modify_buffer, signal_before_change)
8625 (signal_after_change, Fcombine_after_change_execute):
8626 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8627 * intervals.c (traverse_intervals, rotate_right, rotate_left)
8628 (balance_an_interval, split_interval_right, split_interval_left)
8629 (find_interval, next_interval, update_interval)
8630 (adjust_intervals_for_insertion, delete_node, delete_interval)
8631 (interval_deletion_adjustment, adjust_intervals_for_deletion)
8632 (static_offset_intervals, offset_intervals)
8633 (merge_interval_right, merge_interval_left, make_new_interval)
8634 (graft_intervals_into_buffer, temp_set_point_both)
8635 (temp_set_point, set_point, adjust_for_invis_intang)
8636 (set_point_both, move_if_not_intangible, get_property_and_range)
8637 (get_local_map, copy_intervals, copy_intervals_to_string)
8638 (compare_string_intervals, set_intervals_multibyte_1):
8639 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8640 * intervals.h: Adjust decls to match defn changes elsewhere.
8642 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8643 * keyboard.c (this_command_key_count, this_single_command_key_start)
8644 (before_command_key_count, before_command_echo_length, echo_now)
8645 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
8646 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
8647 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
8648 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
8649 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8650 (last_non_minibuf_size, last_point_position, echo_truncate)
8651 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
8652 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
8653 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
8654 (stuff_buffered_input):
8655 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8656 (last_auto_save, command_loop_1, read_char):
8657 Use EMACS_INT, not int, to avoid integer overflow.
8658 (record_char): Avoid overflow in total_keys computation.
8659 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
8660 * keyboard.h: Adjust decls to match defn changes elsewhere.
8661 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
8662 (Fkey_description, Fdescribe_vector, Flookup_key):
8663 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8664 (click_position): New function, to check that positions are in range.
8665 (Fcurrent_active_maps):
8667 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8668 (Faccessible_keymaps, Fkey_description):
8669 (preferred_sequence_p):
8670 Don't assume fixnum can fit into int.
8671 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
8672 Check for integer overflow in size calculations.
8673 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
8674 avoid mishandling large integers.
8675 * lisp.h: Adjust decls to match defn changes elsewhere.
8676 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
8677 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
8678 (struct Lisp_Marker):
8679 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8680 (clip_to_bounds): Now an inline function, moved here from editfns.c.
8681 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
8682 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
8683 All callers changed.
8684 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
8685 Assume the arg has valid form, since it always does.
8686 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
8687 unsigned integer system type.
8688 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
8689 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
8690 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8691 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
8692 (duration_to_sec_usec): New decl.
8693 * lread.c (read_from_string_index, read_from_string_index_byte)
8694 (read_from_string_limit, readchar, unreadchar, openp)
8695 (read_internal_start, read1, oblookup):
8696 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8697 (Fload, readevalloop, Feval_buffer, Feval_region):
8698 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8699 (openp): Check for out-of-range argument to 'access'.
8700 (read1): Use int, not EMACS_INT, where int is wide enough.
8701 Don't assume fixnum fits into int.
8702 Fix off-by-one error that can read outside a buffer.
8703 (read_filtered_event): Use duration_to_sec_usec
8704 to do proper overflow checking on durations.
8705 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
8706 in size calculation.
8707 (Fexecute_kbd_macro):
8708 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8709 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
8710 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
8711 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
8712 (set_marker_both, set_marker_restricted_both, marker_position)
8713 (marker_byte_position, Fbuffer_has_markers_at):
8714 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8715 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
8716 * menu.c (ensure_menu_items): Rename from grow_menu_items.
8717 It now merely ensures that the menu is large enough, without
8718 necessarily growing it, as this avoids some integer overflow issues.
8719 All callers changed.
8720 (keymap_panes, parse_single_submenu, Fx_popup_menu):
8721 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8722 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
8723 Use SAFE_ALLOCA_LISP, not alloca.
8724 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
8725 to EMACS_INT. Check that fixnums are in proper range for system types.
8726 * minibuf.c (minibuf_prompt_width, string_to_object)
8727 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
8728 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
8729 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8730 (get_minibuffer, read_minibuf_unwind):
8731 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8732 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
8733 this simplifies overflow checking. All callers changed.
8734 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
8736 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8737 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
8738 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
8739 Check that fixnums are in proper range for system types.
8740 (Fx_create_frame, Fx_show_tip):
8741 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8742 * nsfont.m (ns_findfonts, nsfont_list_family):
8743 Don't assume fixnum fits in long.
8744 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
8745 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8746 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
8748 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
8749 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8750 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
8751 (PRINTDECLARE, PRINTPREPARE):
8752 (strout, print_string):
8753 (print, print_preprocess, print_check_string_charset_prop)
8755 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8757 (temp_output_buffer_setup, Fprin1_to_string, print_object):
8758 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8759 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
8760 (printchar, strout): Use xpalloc to catch size calculation overflow.
8761 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
8762 (print_error_message): Use SAFE_ALLOCA, not alloca.
8763 (print_object): Use int, not EMACS_INT, where int is wide enough.
8764 (print_depth, new_backquote_output, print_number_index):
8765 Use ptrdiff_t, not int, where int might not be wide enough.
8766 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
8767 (Fset_process_window_size, Fformat_network_address)
8768 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
8770 Check that fixnums are in proper range for system types.
8771 (Fsignal_process): Simplify by avoiding a goto.
8772 Check for process-ids out of pid_t range rather than relying on
8774 (process_tick, update_tick): Use EMACS_INT, not int.
8775 (Fformat_network_address, read_process_output, send_process)
8776 (Fprocess_send_region, status_notify):
8777 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8778 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
8779 (wait_reading_process_output, read_process_output, exec_sentinel):
8780 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8781 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
8782 (Faccept_process_output): Use duration_to_sec_usec to do proper
8783 overflow checking on durations.
8784 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
8785 Don't assume pid_t fits in int.
8786 * process.h (struct Lisp_Process): Members tick and update_tick
8787 are now of type EMACS_INT, not int.
8788 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
8789 configured --with-wide-int.
8790 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
8791 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
8792 * search.c (looking_at_1, string_match_1):
8793 (fast_string_match, fast_c_string_match_ignore_case)
8794 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
8795 (scan_newline, find_before_next_newline, search_command)
8796 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
8797 (set_search_regs, wordify):
8800 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8801 (string_match_1, search_buffer, set_search_regs):
8803 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8804 (wordify): Check for overflow in size calculation.
8805 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
8806 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
8807 Check that fixnums are in proper range for system types.
8808 * sound.c (struct sound_device)
8809 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
8810 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8811 (Fplay_sound_internal):
8812 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8813 * syntax.c (struct lisp_parse_state, find_start_modiff)
8814 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
8815 (Fparse_partial_sexp):
8816 Don't assume fixnums can fit in int.
8817 (struct lisp_parse_state, find_start_pos, find_start_value)
8818 (find_start_value_byte, find_start_begv)
8819 (update_syntax_table, char_quoted, dec_bytepos)
8820 (find_defun_start, prev_char_comend_first, back_comment):
8821 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
8822 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
8823 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8824 (Finternal_describe_syntax_value): Check that match_lisp is a
8825 character, not an integer, since the code stuffs it into int.
8826 (scan_words, scan_sexps_forward):
8827 Check that fixnums are in proper range for system types.
8829 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8830 (scan_sexps_forward):
8831 Use CHARACTERP, not INTEGERP, since the value must fit into int.
8832 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
8833 * syntax.h: Adjust decls to match defn changes elsewhere.
8834 (struct gl_state_s):
8835 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8836 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
8837 MOST_POSITIVE_FIXNUM.
8838 * sysdep.c (wait_for_termination_1, wait_for_termination)
8839 (interruptible_wait_for_termination, mkdir):
8840 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
8841 (emacs_read, emacs_write):
8842 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8843 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
8844 and double all fit in int.
8845 * term.c (set_tty_color_mode):
8846 Check that fixnums are in proper range for system types.
8847 * termhooks.h (struct input_event):
8848 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8849 * textprop.c (validate_interval_range, interval_of)
8850 (Fadd_text_properties, set_text_properties_1)
8851 (Fremove_text_properties, Fremove_list_of_text_properties)
8852 (Ftext_property_any, Ftext_property_not_all)
8853 (copy_text_properties, text_property_list, extend_property_ranges)
8854 (verify_interval_modification):
8855 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8856 (Fnext_single_char_property_change)
8857 (Fprevious_single_char_property_change):
8858 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8859 (copy_text_properties):
8860 Check for integer overflow in index calculation.
8861 * undo.c (last_boundary_position, record_point, record_insert)
8862 (record_delete, record_marker_adjustment, record_change)
8863 (record_property_change):
8864 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8865 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
8866 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8867 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8868 (Fx_hide_tip, Fx_file_dialog):
8869 * w32menu.c (set_frame_menubar):
8870 Use ptrdiff_t, not int, for consistency with rest of code.
8871 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
8872 (select_window, Fdelete_other_windows_internal)
8873 (window_scroll_pixel_based, window_scroll_line_based)
8874 (Frecenter, Fset_window_configuration):
8875 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8876 (Fset_window_hscroll, run_window_configuration_change_hook)
8877 (set_window_buffer, temp_output_buffer_show, scroll_command)
8878 (Fscroll_other_window, Frecenter):
8879 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8880 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
8881 Don't assume fixnum fits in int.
8882 (Fset_window_scroll_bars):
8883 Check that fixnums are in proper range for system types.
8884 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
8885 (string_pos, c_string_pos, number_of_chars, init_iterator)
8886 (in_ellipses_for_invisible_text_p, init_from_display_pos)
8887 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
8888 (compute_display_string_end, handle_face_prop)
8889 (face_before_or_after_it_pos, handle_invisible_prop)
8890 (handle_display_prop, handle_display_spec, handle_single_display_spec)
8891 (display_prop_intangible_p, string_buffer_position_lim)
8892 (string_buffer_position, handle_composition_prop, load_overlay_strings)
8893 (get_overlay_strings_1, get_overlay_strings)
8894 (iterate_out_of_display_property, forward_to_next_line_start)
8895 (back_to_previous_visible_line_start, reseat, reseat_to_string)
8896 (get_next_display_element, set_iterator_to_next)
8897 (get_visually_first_element, compute_stop_pos_backwards)
8898 (handle_stop_backwards, next_element_from_buffer)
8899 (move_it_in_display_line_to, move_it_in_display_line)
8900 (move_it_to, move_it_vertically_backward, move_it_by_lines)
8901 (add_to_log, message_dolog, message_log_check_duplicate)
8902 (message2, message2_nolog, message3, message3_nolog
8903 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
8904 (current_message_1, truncate_echo_area, truncate_message_1)
8905 (set_message, set_message_1, store_mode_line_noprop)
8906 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
8907 (text_outside_line_unchanged_p, check_point_in_composition)
8908 (reconsider_clip_changes)
8909 (redisplay_internal, set_cursor_from_row, try_scrolling)
8910 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
8911 (redisplay_window, find_last_unchanged_at_beg_row)
8912 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
8913 (trailing_whitespace_p, find_row_edges, display_line)
8914 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
8915 (display_mode_element, store_mode_line_string)
8916 (pint2str, pint2hrstr, decode_mode_spec)
8917 (display_count_lines, display_string, draw_glyphs)
8918 (x_produce_glyphs, x_insert_glyphs)
8919 (rows_from_pos_range, mouse_face_from_buffer_pos)
8920 (fast_find_string_pos, mouse_face_from_string_pos)
8921 (note_mode_line_or_margin_highlight, note_mouse_highlight):
8922 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8923 (safe_call, init_from_display_pos, handle_fontified_prop)
8924 (handle_single_display_spec, load_overlay_strings)
8925 (with_echo_area_buffer, setup_echo_area_for_printing)
8926 (display_echo_area, echo_area_display)
8927 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
8928 (update_tool_bar, hscroll_window_tree, redisplay_internal)
8929 (redisplay_window, dump_glyph_row, display_mode_line)
8930 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
8931 (handle_display_spec, display_prop_string_p):
8932 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8933 (handle_single_display_spec, build_desired_tool_bar_string)
8934 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
8935 (get_specified_cursor_type):
8936 Check that fixnums are in proper range for system types.
8937 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
8938 (Flookup_image_map):
8939 Don't assume fixnums fit in int.
8940 (compare_overlay_entries):
8941 Avoid mishandling comparisons due to subtraction overflow.
8942 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
8943 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
8944 (handle_tool_bar_click):
8945 Use int, not unsigned, since we prefer signed and the signedness
8946 doesn't matter here.
8947 (get_next_display_element, next_element_from_display_vector):
8948 Use int, not EMACS_INT, when int is wide enough.
8949 (start_hourglass): Use duration_to_sec_usec to do proper
8950 overflow checking on durations.
8951 * xfaces.c (Fbitmap_spec_p):
8952 Check that fixnums are in proper range for system types.
8953 (compare_fonts_by_sort_order):
8954 Avoid mishandling comparisons due to subtraction overflow.
8955 (Fx_family_fonts, realize_basic_faces):
8956 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8958 Don't assume fixnum fits in int.
8959 Use SAFE_ALLOCA_LISP, not alloca.
8960 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
8961 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
8962 (face_at_buffer_position, face_for_overlay_string)
8963 (face_at_string_position):
8964 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8965 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
8966 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
8968 Check that fixnums are in proper range for system types.
8969 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8970 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
8971 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8972 (Fx_change_window_property): Don't assume fixnums fit in int.
8973 * xfont.c (xfont_chars_supported):
8974 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8975 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
8976 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
8977 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8978 * xml.c (parse_region):
8979 * xrdb.c (magic_file_p):
8980 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8981 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
8982 (x_get_local_selection, x_reply_selection_request)
8983 (x_handle_selection_request, wait_for_property_change):
8984 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8985 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
8986 short is wide enough.
8987 (x_send_client_event): Don't assume fixnum fits in int.
8988 * xterm.c (x_x_to_emacs_modifiers):
8989 Don't assume EMACS_INT overflows nicely into int.
8990 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
8992 (handle_one_xevent): NATNUMP can eval its arg twice.
8993 (x_connection_closed):
8994 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8995 * xterm.h: Adjust decls to match defn changes elsewhere.
8996 (struct scroll_bar): Use struct vectorlike_header
8997 rather than rolling our own approximation.
8998 (SCROLL_BAR_VEC_SIZE): Remove; not used.
9000 2012-05-25 Glenn Morris <rgm@gnu.org>
9002 * lisp.mk (lisp): Update for more files being compiled now.
9004 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
9006 * lread.c: Remove `read_pure' which makes no difference.
9007 (read_pure): Remove var.
9008 (unreadpure): Remove function.
9009 (readevalloop): Don't call read_list with -1 flag.
9010 (read1, read_vector): Don't test read_pure any more.
9011 (read_list): Simplify.
9013 * fileio.c, character.h: Minor style tweaks.
9015 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
9017 * window.h (clip_changed): Remove useless declaration.
9019 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
9021 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
9022 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
9024 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
9027 This directory predates autoconf and is no longer needed nowadays.
9028 Move its few remaining bits of functionality to where they're needed.
9029 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
9030 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
9031 * m/template.h: Remove.
9032 * Makefile.in (M_FILE): Remove. All uses removed.
9033 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
9034 * lisp.h (USE_LSB_TAG):
9035 * mem-limits.h (EXCEEDS_LISP_PTR):
9036 Use VAL_MAX, not VALBITS, in #if.
9037 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
9038 (EMACS_UINT): Define unconditionally now.
9039 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
9040 (BITS_PER_EMACS_INT): New constants, replacing
9041 what used to be in config.h, but not useful in #if.
9042 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
9043 define them any more.
9044 (VAL_MAX): New macro.
9046 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
9047 BITS_PER_EMACS_INT, in #if.
9048 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
9049 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
9050 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
9051 * s/ms-w32.h (DATA_START):
9052 Move here from removed file m/intel386.h.
9053 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
9054 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
9056 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
9058 Assume C89 or later.
9059 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
9060 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
9062 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
9063 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
9064 * textprop.c, tparam.c (NULL): Remove.
9065 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
9066 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
9067 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
9068 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
9069 * xterm.c (input_signal_count): Assume volatile works.
9071 2012-05-21 Ken Brown <kbrown@cornell.edu>
9073 * xgselect.c (xg_select): Fix first argument in call to 'select'
9076 2012-05-20 Ken Brown <kbrown@cornell.edu>
9078 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
9079 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
9081 2012-05-19 Ken Brown <kbrown@cornell.edu>
9083 * xfns.c (x_in_use): Remove `static' qualifier.
9084 * xterm.h (x_in_use): Declare.
9085 * xgselect.c: Include xterm.h.
9086 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
9087 and `display_arg' (bug#9754).
9089 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
9091 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
9093 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
9094 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
9096 2012-05-18 Eli Zaretskii <eliz@gnu.org>
9098 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
9100 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
9101 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
9103 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
9104 reference to image_cache->refcount.
9105 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
9107 2012-05-17 Juri Linkov <juri@jurta.org>
9109 * search.c (Fword_search_regexp, Fword_search_backward)
9110 (Fword_search_forward, Fword_search_backward_lax)
9111 (Fword_search_forward_lax): Move functions to isearch.el
9112 (bug#10145, bug#11381).
9114 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
9116 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
9118 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
9120 * lread.c (init_obarray): Declare Qt and Qnil as special.
9122 2012-05-14 Glenn Morris <rgm@gnu.org>
9124 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
9125 Put "libexec" before "bin", for the sake of init_callproc_1.
9127 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
9129 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
9131 * unexaix.c: Port to more-recent AIX compilers.
9132 (report_error, report_error_1, make_hdr, copy_sym)
9133 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
9134 Make arguments const char *, not char *, to avoid violations of C
9135 standard and to fix some AIX warnings reported by Gilles Pion.
9137 2012-05-14 Eli Zaretskii <eliz@gnu.org>
9139 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
9140 already have overlays loaded.
9141 (handle_single_display_spec): Before returning without displaying
9142 fringe bitmap, synchronize the bidi iterator with the main display
9143 iterator, by calling iterate_out_of_display_property.
9144 (iterate_out_of_display_property): Detect buffer iteration by
9145 testing that it->string is a Lisp string.
9146 (get_next_display_element): When the current object is exhausted,
9147 and there's something on it->stack, call set_iterator_to_next to
9148 proceed with what's on the stack, instead of returning zero.
9149 (set_iterator_to_next): If called at the end of a Lisp string,
9150 proceed to consider_string_end without incrementing string
9151 position. Don't increment display vector index past the end of
9152 the display vector. (Bug#11417)
9153 (pos_visible_p): Don't report a position visible when move_it_to
9154 stopped at the last line of window, which happens to be scanned
9155 backwards by the bidi iteration. (Bug#11464)
9157 2012-05-14 Eli Zaretskii <eliz@gnu.org>
9159 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
9160 and right-margin display specs even if the spec is invalid or we
9161 are on a TTY, and thus unable to display on the fringes.
9162 That's because the text with the property will not be displayed anyway,
9163 so we need to signal to the caller that this is a "replacing"
9164 display spec. This fixes display when the spec is invalid or we
9167 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
9169 * unexaix.c (make_hdr): Fix typo in prototype.
9170 This bug broke the build on AIX. Problem reported by Gilles Pion.
9172 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
9174 * keyboard.c (kbd_buffer_get_event): Read special events also in
9175 batch mode. (Bug#11415)
9177 2012-05-12 Glenn Morris <rgm@gnu.org>
9179 * ns.mk: Update for ns_appbindir no longer having trailing "/".
9181 2012-05-12 Eli Zaretskii <eliz@gnu.org>
9183 * lisp.mk (lisp): Add newcomment.elc.
9185 2012-05-12 Glenn Morris <rgm@gnu.org>
9187 * Makefile.in (MKDIR_P): New, set by configure.
9188 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
9190 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
9192 Remove unused function hourglass_started.
9193 * dispextern.h (hourglass_started):
9194 * w32fns.c (hourglass_started):
9195 * xdisp.c (hourglass_started): Remove.
9197 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
9199 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
9200 Update dependencies.
9202 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
9204 * xgselect.c (xg_select): Put maxfds+1 into a var.
9205 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
9207 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
9209 2012-05-10 Dave Abrahams <dave@boostpro.com>
9211 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
9212 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
9214 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
9216 * dbusbind.c (xd_registered_buses): New internal Lisp object.
9217 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
9218 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
9219 Initialize xd_registered_buses.
9221 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
9223 Untag more efficiently if USE_LSB_TAG.
9224 This is based on a proposal by YAMAMOTO Mitsuharu in
9225 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
9226 For an admittedly artificial (nth 8000 longlist) benchmark on
9227 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
9228 Emacs's overall text size by 1%.
9229 * lisp.h (XUNTAG): New macro.
9230 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
9231 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
9232 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
9233 * eval.c (Fautoload):
9234 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
9235 * frame.h (XFRAME): Use XUNTAG.
9237 Port recent dbusbind.c changes to 32-bit --with-wide-int.
9238 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
9239 Remove unportable assumptions about print widths of types like
9241 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
9242 intptr_t when converting between pointer and integer, to avoid GCC
9243 warnings about wrong width.
9245 2012-05-09 Eli Zaretskii <eliz@gnu.org>
9247 * w32proc.c (new_child): Force Windows to reserve only 64KB of
9248 stack for each reader_thread, instead of defaulting to 8MB
9249 determined by the linker. This avoids failures in creating
9250 subprocesses on Windows 7, see the discussion in this thread:
9251 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
9253 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
9255 Fix up display of the *Minibuf-0* buffer in the mini window.
9256 * keyboard.c (read_char): Don't clear the echo area if there's no
9258 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
9259 contents of *Minibuf-0*) if there's no message displayed in its stead.
9261 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
9263 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
9266 2012-05-06 Chong Yidong <cyd@gnu.org>
9268 * lisp.mk (lisp): Update.
9270 2012-05-05 Jim Meyering <meyering@redhat.com>
9272 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
9274 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
9276 * data.c (PUT_ERROR): New macro.
9277 (syms_of_data): Use it. Add new error type `user-error'.
9278 * undo.c (user_error): New function.
9279 (Fprimitive_undo): Use it.
9280 * print.c (print_error_message): Adjust print style for `user-error'.
9281 * keyboard.c (user_error): New function.
9282 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
9284 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
9286 Do not limit current-time-string to years 1000..9999.
9287 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
9288 (Fcurrent_time_string): Support any year that is supported by the
9289 underlying localtime representation. Don't use asctime, as it
9290 has undefined behavior for years outside the range -999..9999.
9292 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
9294 Fix race conditions involving setenv, gmtime, localtime, asctime.
9295 Without this fix, interrupts could mess up code that uses these
9296 nonreentrant functions, since setting TZ invalidates existing
9297 tm_zone or tzname values, and since most of these functions return
9298 pointers to static storage.
9299 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
9300 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
9301 Grow the critical sections to include not just invoking
9302 localtime/gmtime, but also accessing these functions' results
9303 including their tm_zone values if any, and any related TZ setting.
9304 (format_time_string): Last arg is now struct tm *, not struct tm **,
9305 so that the struct tm is saved in the critical section.
9306 All callers changed. Simplify allocation of initial buffer, partly
9307 motivated by the fact that memory allocation needs to be outside
9308 the critical section.
9310 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
9312 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
9313 with RESET_INTERVAL.
9315 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
9316 Remove duplicated buffer name initialization.
9318 2012-05-02 Jim Meyering <jim@meyering.net>
9320 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
9322 * xfns.c (x_window): Use xstrdup (Bug#11375).
9324 2012-05-02 Eli Zaretskii <eliz@gnu.org>
9326 * xdisp.c (pos_visible_p): If already at a newline from the
9327 display string before the 'while' loop, don't walk back the glyphs
9328 from it3.glyph_row. Solves assertion violation when the display
9329 string begins with a newline (egg.el). (Bug#11367)
9331 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
9333 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
9336 2012-05-01 Glenn Morris <rgm@gnu.org>
9338 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
9339 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
9340 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
9341 All were removed before 23.1.
9343 * dispnew.c: Remove HAVE_LIBNCURSES test;
9344 it is always true on relevant platforms.
9346 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
9347 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
9349 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
9351 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
9353 * .gdbinit (xpr): Remove checks for no longer existing misc types.
9354 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
9357 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
9359 Do not avoid creating empty evaporating overlays (Bug#9642).
9360 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
9361 That is, do not delete an evaporating overlay if it becomes
9362 empty after its bounds are adjusted to fit within its buffer.
9363 This fix caused other problems, and I'm reverting it until we get
9364 to the bottom of them.
9366 2012-04-27 Chong Yidong <cyd@gnu.org>
9368 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
9370 2012-04-27 Eli Zaretskii <eliz@gnu.org>
9372 * xdisp.c (pos_visible_p): If the window start position is beyond
9373 ZV, start the display from buffer beginning. Prevents assertion
9374 violation in init_iterator when the minibuffer window is scrolled
9377 * window.c (window_scroll_pixel_based): Likewise.
9379 2012-04-27 Chong Yidong <cyd@gnu.org>
9381 * keymap.c (where_is_internal): Doc fix (Bug#10872).
9383 2012-04-27 Glenn Morris <rgm@gnu.org>
9385 * fileio.c (Fcopy_file, Fset_file_selinux_context):
9386 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
9388 2012-04-27 Eli Zaretskii <eliz@gnu.org>
9390 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
9391 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
9393 2012-04-26 Eli Zaretskii <eliz@gnu.org>
9395 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
9396 display element, check also the underlying string or buffer
9397 character. (Bug#11341)
9399 * w32menu.c: Include w32heap.h.
9400 (add_menu_item): If the call to AppendMenuW (via
9401 unicode_append_menu) fails, disable Unicode menus only if we are
9402 running on Windows 9X/Me.
9404 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
9406 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
9407 (xgetint): Add missing shift for LSB tags.
9409 2012-04-24 Martin Rudalics <rudalics@gmx.at>
9411 * keyboard.c (read_char): Don't wipe echo area for select window
9412 events: These might get delayed via `mouse-autoselect-window'
9415 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
9417 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
9418 manipulation of :loaded-from data.
9420 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
9422 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
9423 now a cons (bug#11311).
9425 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
9427 Do not create empty overlays with the evaporate property (Bug#9642).
9428 * buffer.c (Fmove_overlay): Delete an evaporating overlay
9429 if it becomes empty after its bounds are adjusted to fit within
9430 its buffer. Without this fix, in a nonempty buffer (let ((o
9431 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
9432 yields an empty overlay that has the evaporate property, which is
9433 not supposed to happen.
9435 Fix minor GTK3 problems found by static checking.
9436 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9437 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9438 (struct _EmacsFixedClass, emacs_fixed_get_type):
9439 Move decls here from emacsgtkfixed.h, since they needn't be public.
9440 (emacs_fixed_get_type): Now static.
9441 (emacs_fixed_class_init): Omit unused local.
9442 (emacs_fixed_child_type): Remove; unused.
9443 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9444 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9445 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
9446 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
9447 (EMACS_FIXED_GET_CLASS): Remove; unused.
9448 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
9450 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
9451 Problem reported by Juanma Barranquero for Windows -Wunused-function.
9453 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9455 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
9456 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
9457 (__malloc_size_t, __malloc_ptrdiff_t):
9458 Remove. All uses removed, replaced by the definiens if needed,
9459 since we can assume C89 or better now.
9460 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
9461 (protect_malloc_state, align, get_contiguous_space)
9462 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
9463 (malloc_atfork_handler_child, malloc_enable_thread)
9464 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
9465 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
9466 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
9467 (special_realloc, _realloc_internal_nolock, _realloc_internal)
9468 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
9469 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
9470 Define using prototypes, not old style.
9471 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
9472 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
9473 (align): Don't assume that signed integer overflow wraps around.
9474 Omit unused local var.
9475 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
9476 (_free_internal_nolock, memalign, mallochook, reallochook):
9477 Omit no-longer-needed casts.
9478 (valloc): Use getpagesize, not __getpagesize.
9479 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
9480 (struct hdr): The 'magic' member is now size_t, not unsigned long.
9482 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
9484 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
9486 Move functions from C to Lisp. Make non-blocking method calls
9487 the default. Implement further D-Bus standard interfaces.
9489 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
9490 (QCdbus_request_name_allow_replacement)
9491 (QCdbus_request_name_replace_existing)
9492 (QCdbus_request_name_do_not_queue)
9493 (QCdbus_request_name_reply_primary_owner)
9494 (QCdbus_request_name_reply_in_queue)
9495 (QCdbus_request_name_reply_exists)
9496 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
9497 (QCdbus_registered_serial, QCdbus_registered_method)
9498 (QCdbus_registered_signal): New Lisp objects.
9499 (XD_DEBUG_MESSAGE): Use sizeof.
9500 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
9501 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
9502 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
9503 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
9504 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
9505 (xd_signature, xd_append_arg): Allow float for integer types.
9506 (xd_get_connection_references): New function.
9507 (xd_get_connection_address): Rename from xd_initialize.
9508 Return cached address.
9509 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
9510 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
9512 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
9513 Return number of refcounts.
9514 (Fdbus_get_unique_name): Make stronger parameter check.
9515 (Fdbus_message_internal): New defun.
9516 (Fdbus_call_method, Fdbus_call_method_asynchronously)
9517 (Fdbus_method_return_internal, Fdbus_method_error_internal)
9518 (Fdbus_send_signal, Fdbus_register_service)
9519 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
9520 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
9521 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
9522 (Vdbus_compiled_version, Vdbus_runtime_version)
9523 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
9524 (Vdbus_message_type_method_return, Vdbus_message_type_error)
9525 (Vdbus_message_type_signal): New defvars.
9526 (Vdbus_registered_buses, Vdbus_registered_objects_table):
9529 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9531 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
9532 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
9533 Do not assume ptrdiff_t is the same width as 'int'.
9535 * alloc.c: Handle unusual debugging option combinations.
9536 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
9537 since the two debugging options are incompatible.
9538 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
9540 (mem_init, mem_insert, mem_insert_fixup):
9541 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
9542 (NEED_MEM_INSERT): Remove; no longer needed.
9544 2012-04-22 Leo Liu <sdl.web@gmail.com>
9546 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
9548 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9550 * sysdep.c [__FreeBSD__]: Minor cleanups.
9551 (list_system_processes, system_process_attributes) [__FreeBSD__]:
9552 Use Emacs indenting style more consistently. Avoid some casts.
9553 Use 'double' consistently rather than mixing 'float' and 'double'.
9555 2012-04-21 Eduard Wiebe <usenet@pusto.de>
9557 * sysdep.c (list_system_processes, system_process_attributes):
9558 Add implementation for FreeBSD (Bug#5243).
9560 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
9562 * lisp.mk (lisp): Update.
9564 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
9566 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
9567 It is never used otherwise.
9569 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
9571 * print.c (print_preprocess): Only check print_depth if print-circle
9573 (print_object): Check for cycles even when print-circle is nil and
9574 print-gensym is t, but only check print_depth if print-circle is nil.
9576 2012-04-20 Chong Yidong <cyd@gnu.org>
9578 * process.c (wait_reading_process_output): If EIO occurs on a pty,
9579 set the status to "failed" and ensure that sentinel is run.
9581 2012-04-20 Glenn Morris <rgm@gnu.org>
9583 * process.c (Fset_process_inherit_coding_system_flag)
9584 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
9585 (Fmake_network_process, Fmake_serial_process): Doc fix.
9587 2012-04-20 Eli Zaretskii <eliz@gnu.org>
9589 * xdisp.c (string_buffer_position_lim): Limit starting position to
9591 (set_cursor_from_row): If called for a mode-line or header-line
9592 row, return zero immediately.
9593 (try_cursor_movement): If inside continuation line, don't back up
9594 farther than the first row after the header line, if any.
9595 Don't consider the header-line row as "partially visible", even if
9596 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
9598 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
9600 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
9603 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
9604 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
9606 configure: new option --enable-gcc-warnings (Bug#11207)
9607 * Makefile.in (C_WARNINGS_SWITCH): Remove.
9608 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
9609 (ALL_CFLAGS): Use new macros rather than old.
9610 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
9611 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
9612 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
9613 -Wunused-result, -Wunused-variable. This should go away once
9614 the Emacs and Gnulib regex code is merged.
9615 (xmalloc, xrealloc): Now static.
9617 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
9619 * dired.c (Fsystem_groups): Remove unused local.
9621 2012-04-17 Glenn Morris <rgm@gnu.org>
9623 * dired.c (Fsystem_users): Doc fix.
9625 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
9627 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
9628 (syms_of_dired): Add them.
9630 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
9632 Fix minor alloc.c problems found by static checking.
9633 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
9634 New extern decls, to avoid calling undeclared functions.
9635 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
9636 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
9637 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
9638 (NEED_MEM_INSERT): New macro.
9639 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
9640 Remove one incorrect comment and fix another.
9642 Fix minor ralloc.c problems found by static checking.
9643 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9644 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
9645 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
9646 (r_alloc_sbrk): Now static.
9648 Improve ralloc.c interface checking.
9649 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9650 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
9651 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
9652 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
9653 [REL_ALLOC]: ... to here, to check interface.
9654 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
9655 Remove decls. This fixes an "It stinks!".
9657 * alloc.c (which_symbols): Fix alignment issue / type clash.
9659 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
9661 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
9662 (struct Lisp_Misc_Any): Likewise.
9663 (struct Lisp_Free): Likewise.
9664 * alloc.c (union aligned_Lisp_Symbol): Define.
9665 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
9666 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
9667 (union aligned_Lisp_Misc): Define.
9668 (MARKER_BLOCK_SIZE, struct marker_block): Use union
9669 aligned_Lisp_Misc instead of union Lisp_Misc.
9670 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
9672 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
9674 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
9675 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
9676 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
9677 * s/netbsd.h, s/sol2-6.h:
9678 Remove definition of GC_MARK_STACK, since the default now works.
9679 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
9680 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
9681 no longer the default.
9682 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
9684 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
9686 * lread.c (lisp_file_lexically_bound_p):
9687 Fix hang at ";-*-\n" (bug#11238).
9689 2012-04-14 Eli Zaretskii <eliz@gnu.org>
9691 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
9692 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
9694 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
9696 * nsterm.m (constrainFrameRect): Always constrain when there is only
9697 one screen (Bug#10962).
9699 2012-04-13 Ken Brown <kbrown@cornell.edu>
9701 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
9703 2012-04-13 Reuben Thomas <rrt@sc3d.org>
9705 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
9707 2012-04-11 Daniel Colascione <dancol@dancol.org>
9709 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
9710 against is gone. It's better to use vfork now so that when Cygwin
9711 gains a new, working vfork, we use it automatically (bug#10398).
9713 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9715 * window.c (save_window_save): Obey window-point-insertion-type.
9717 2012-04-11 Glenn Morris <rgm@gnu.org>
9719 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
9721 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9723 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
9725 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
9727 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
9728 (force_quit_count): New var.
9729 (handle_interrupt): Use it.
9731 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
9733 * w32.c (w32_delayed_load): Record the full path of the library
9734 being loaded (bug#10424).
9736 2012-04-09 Glenn Morris <rgm@gnu.org>
9738 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
9739 not just in the obarray, before snarfing them. (Bug#11036)
9741 * Makefile.in ($(leimdir)/leim-list.el):
9742 Pass EMACS rather than BUILT_EMACS.
9744 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
9746 * process.c (make_process):
9747 * process.h: Add integer `gnutls_handshakes_tried' member to
9750 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
9751 Add convenience `GNUTLS_LOG2i' macro.
9753 * gnutls.c (gnutls_log_function2i): Convenience log function.
9754 (emacs_gnutls_read): Use new log functions,
9755 `gnutls_handshakes_tried' process member, and
9756 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
9757 attempts per process (connection).
9759 2012-04-09 Chong Yidong <cyd@gnu.org>
9761 * eval.c (Fuser_variable_p, user_variable_p_eh)
9762 (lisp_indirect_variable): Functions deleted.
9763 (Fdefvar): Caller changed.
9765 * callint.c (Finteractive, Fcall_interactively):
9766 * minibuf.c (Fread_variable): Callers changed.
9768 2012-04-09 Eli Zaretskii <eliz@gnu.org>
9770 * xdisp.c (set_cursor_from_row): If the display string appears in
9771 the buffer at position that is closer to point than the position
9772 after the display string, display the cursor on the first glyph of
9773 the display string. Fixes cursor display when a 'display' text
9774 property immediately follows invisible text. (Bug#11094)
9776 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
9778 composite.c: use 'double' consistently
9779 * composite.c (get_composition_id): Use 'double' consistently
9780 instead of converting 'float' to 'double' and vice versa; this is
9781 easier to understand and avoids a GCC warning.
9783 2012-04-09 Glenn Morris <rgm@gnu.org>
9785 * Makefile.in: Generate leim-list with bootstrap-emacs, in
9786 preparation for dumping it with emacs. (Bug#4789)
9787 (leimdir): New variable.
9788 ($(leimdir)/leim-list.el): New rule.
9789 (emacs$(EXEEXT)): Depend on leim-list.el.
9791 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
9792 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
9793 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
9795 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
9797 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
9800 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
9802 * xml.c (init_libxml2_functions) [WINDOWSNT]:
9803 Remove unused local variable.
9805 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9807 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
9808 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
9809 (mark_memory): Mark Lisp_Objects only if pointers might hide in
9810 objects, as mark_maybe_pointer will catch them otherwise.
9811 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
9812 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
9814 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9816 Fix typo that broke non-Windows builds.
9817 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
9819 2012-04-07 Eli Zaretskii <eliz@gnu.org>
9821 Support building on MS-Windows with libxml2.
9823 * makefile.w32-in (OBJ2): Add xml.$(O).
9824 (GLOBAL_SOURCES): Add xml.c.
9825 ($(BLD)/xml.$(O)): New dependency list.
9827 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
9828 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
9829 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
9830 [!WINDOWSNT]: New macros.
9831 (init_libxml2_functions, libxml2_loaded_p): New functions.
9832 (parse_region): Call fn_xmlCheckVersion instead of using the macro
9833 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
9834 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
9835 Calls xmlCleanupParser only if libxml2 was loaded (or statically
9837 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
9838 Call init_libxml2_functions before calling libxml2 functions.
9839 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
9841 * emacs.c: Don't include libxml/parser.h.
9842 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
9843 xmlCleanupParser directly.
9845 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
9847 2012-04-07 Eli Zaretskii <eliz@gnu.org>
9849 * indent.c (Fvertical_motion): If there is a display string at
9850 point, use it.vpos to compute how many lines to backtrack after
9851 move_it_to point. (Bug#11133)
9853 2012-04-06 Eli Zaretskii <eliz@gnu.org>
9855 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
9856 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
9857 about subtle differences between FETCH_CHAR* and STRING_CHAR*
9858 macros related to unification of CJK characters. For the details,
9859 see the discussion following the message here:
9860 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
9862 2012-04-04 Chong Yidong <cyd@gnu.org>
9864 * keyboard.c (Vdelayed_warnings_list): Doc fix.
9866 2012-04-01 Eli Zaretskii <eliz@gnu.org>
9868 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
9869 instead of alloca. (Bug#11138)
9871 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
9873 * w32menu.c (is_simple_dialog): Properly check lisp types.
9876 2012-03-31 Eli Zaretskii <eliz@gnu.org>
9878 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
9879 position we get to after a call to move_it_to fails the
9880 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
9881 only if we wind up in a string from display property. (Bug#11063)
9883 * window.c (Fdelete_other_windows_internal): Invalidate the row
9884 and column information about mouse highlight, so that redisplay
9885 restores it after reallocating the glyph matrices. (Bug#7464)
9887 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
9888 string comes from a `display' text property, use the buffer
9889 position of that property as if we actually saw that position in
9891 (move_it_by_lines): Remove the assertion that
9892 "it->current_x == 0 && it->hpos == 0" which can be legitimately
9893 violated when there's a before-string at the beginning of a line.
9896 2012-03-30 Eli Zaretskii <eliz@gnu.org>
9898 * xdisp.c (append_space_for_newline): If the default face was
9899 remapped, use the remapped face for the appended newline.
9900 (extend_face_to_end_of_line): Use the remapped default face for
9901 extending the face to the end of the line.
9902 (display_line): Call extend_face_to_end_of_line when the default
9903 face was remapped. (Bug#11068)
9905 2012-03-29 Eli Zaretskii <eliz@gnu.org>
9907 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
9909 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
9911 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
9913 2012-03-27 Glenn Morris <rgm@gnu.org>
9915 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
9918 2012-03-26 Kenichi Handa <handa@m17n.org>
9920 * dispextern.h (struct glyph): Fix previous change. Change the
9921 bit length of glyphless.ch to 25 (Bug#11082).
9923 2012-03-26 Chong Yidong <cyd@gnu.org>
9925 * keyboard.c (Vselection_inhibit_update_commands): New variable.
9926 (command_loop_1): Use it; inhibit selection update for
9927 handle-select-window too (Bug#8996).
9929 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
9931 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
9933 2012-03-25 Kenichi Handa <handa@m17n.org>
9935 * dispextern.h (struct glyph): Change the bit length of
9936 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
9938 2012-03-24 Eli Zaretskii <eliz@gnu.org>
9940 * s/ms-w32.h (tzname): Include time.h before redirecting to
9941 _tzname. Fixes the MSVC build. (Bug#9960)
9943 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
9945 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
9948 * xterm.c (XTread_socket): Only modify handling_signal if
9949 !SYNC_INPUT. (Bug#11080)
9951 2012-03-23 Eli Zaretskii <eliz@gnu.org>
9953 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
9954 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
9955 when fetching a multibyte character consumes more bytes than
9956 CHAR_BYTES returns, due to unification of CJK characters in
9957 string_char. (Bug#11073)
9959 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
9961 * process.c (wait_reading_process_output): Handle pty disconnect
9962 by refraining from sending oneself a SIGCHLD (bug#10933).
9964 2012-03-22 Chong Yidong <cyd@gnu.org>
9966 * dispextern.h (struct it): New member string_from_prefix_prop_p.
9968 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
9969 Mark string as coming from a prefix property.
9970 (handle_face_prop): Use default face for prefix strings (Bug#4281).
9971 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
9973 2012-03-21 Chong Yidong <cyd@gnu.org>
9975 * xfaces.c (Vface_remapping_alist): Doc fix.
9977 2012-03-20 Eli Zaretskii <eliz@gnu.org>
9979 * w32proc.c (Fw32_set_console_codepage)
9980 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
9983 2012-03-20 Chong Yidong <cyd@gnu.org>
9985 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
9986 to reflect default non-nil value of redisplay-dont-pause.
9988 2012-03-19 Kenichi Handa <handa@m17n.org>
9990 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
9991 it fit in a valid range (Bug#11003).
9993 2012-03-18 Eli Zaretskii <eliz@gnu.org>
9995 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
9996 that is not from display property, accept the row as a "cursor
9997 row" if one of the string's character has a non-nil `cursor'
9998 property. Fixes cursor positioning when there are newlines in
9999 overlay strings, e.g. in icomplete.el. (Bug#11035)
10001 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
10003 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
10005 2012-03-12 Chong Yidong <cyd@gnu.org>
10007 * eval.c (inhibit_lisp_code): Rename from
10008 inhibit_window_configuration_change_hook; move from window.c.
10010 * xfns.c (unwind_create_frame_1, Fx_create_frame):
10011 * window.c (run_window_configuration_change_hook)
10012 (syms_of_window): Callers changed.
10014 2012-03-11 Chong Yidong <cyd@gnu.org>
10016 * keymap.c (Fkey_description): Doc fix (Bug#9700).
10018 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
10020 2012-03-10 Chong Yidong <cyd@gnu.org>
10022 * frame.c (other_visible_frames): Don't assume the selected frame
10023 is visible (Bug#10955).
10025 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
10027 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
10029 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
10031 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
10032 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
10035 2012-03-03 Glenn Morris <rgm@gnu.org>
10037 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
10039 2012-03-02 Eli Zaretskii <eliz@gnu.org>
10041 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
10042 position past the first glyph_row that ends at ZV. (Bug#10902)
10043 (redisplay_window, next_element_from_string): Fix typos in
10045 (redisplay_window): Pass to move_it_vertically the margin in
10046 pixels, not in screen lines.
10048 2012-03-02 Glenn Morris <rgm@gnu.org>
10050 * buffer.c (buffer-list-update-hook): Doc fix.
10052 2012-02-29 Eli Zaretskii <eliz@gnu.org>
10054 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
10055 push_it before setting up the iterator for the first overlay
10056 string, even if we have an empty string loaded.
10057 (next_overlay_string): If there's an empty string on the iterator
10058 stack, pop the stack. (Bug#10903)
10060 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
10062 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
10063 Suggested by Stefan Monnier in
10064 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
10065 * alloc.c (widen_to_Lisp_Object): New static function.
10066 (mark_memory): Also mark Lisp_Objects by fetching pointer words
10067 and widening them to Lisp_Objects. This would work even if
10068 USE_LSB_TAG is defined and wide integers are used, which might
10069 happen in a future version of Emacs.
10071 2012-02-25 Chong Yidong <cyd@gnu.org>
10073 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
10076 * xselect.c (Fx_selection_exists_p): Doc fix.
10077 (x_clipboard_manager_save_all): Print an informative message
10078 before saving to clipboard manager.
10080 2012-02-24 Chong Yidong <cyd@gnu.org>
10082 * keyboard.c (process_special_events): Handle all X selection
10083 requests in kbd_buffer, not just the next one (Bug#8869).
10085 2012-02-23 Chong Yidong <cyd@gnu.org>
10087 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
10088 call when setting menu-bar-lines and tool-bar-lines parameters.
10089 (unwind_create_frame_1): New helper function.
10091 * window.c (inhibit_window_configuration_change_hook): New var.
10092 (run_window_configuration_change_hook): Obey it.
10093 (syms_of_window): Initialize it.
10095 2012-02-22 Chong Yidong <cyd@gnu.org>
10097 * xterm.c (x_draw_image_relief): Add missing type check for
10098 Vtool_bar_button_margin (Bug#10743).
10100 2012-02-21 Chong Yidong <cyd@gnu.org>
10102 * fileio.c (Vfile_name_handler_alist): Doc fix.
10104 * buffer.c (Fget_file_buffer): Protect against invalid file
10105 handler return value.
10107 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
10109 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
10110 when computing $valmask.
10112 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
10113 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
10114 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
10115 It's useless in that case, and it can cause problems on hosts
10116 that allocate halves of EMACS_INT values separately.
10117 Reported by Dan Horák. Diagnosed by Andreas Schwab in
10118 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
10119 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
10120 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
10121 it avoids undefined behavior on hosts where shifting right by more
10122 than the word width has undefined behavior.
10124 2012-02-19 Chong Yidong <cyd@gnu.org>
10126 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
10127 (Funhandled_file_name_directory, Ffile_name_as_directory)
10128 (Fdirectory_file_name, Fexpand_file_name)
10129 (Fsubstitute_in_file_name): Protect against invalid file handler
10130 return values (Bug#10845).
10132 2012-02-18 Eli Zaretskii <eliz@gnu.org>
10134 * .gdbinit (pitx): Fix incorrect references to fields of the
10137 2012-02-17 Chong Yidong <cyd@gnu.org>
10139 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
10141 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
10143 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
10144 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
10146 2012-02-15 Chong Yidong <cyd@gnu.org>
10148 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
10149 marked as special. Also, starting docstrings with * is obsolete.
10151 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
10153 * gnutls.c (emacs_gnutls_write): Fix last change.
10155 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
10157 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
10160 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
10162 * keymap.c (Fsingle_key_description): Handle char ranges.
10164 2012-02-12 Chong Yidong <cyd@gnu.org>
10166 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
10167 as that creates a dangerous corner case.
10169 * window.c (Fdelete_window_internal): Invalidate the mouse
10170 highlight (Bug#9904).
10172 2012-02-12 Glenn Morris <rgm@gnu.org>
10174 * xselect.c (Fx_own_selection_internal)
10175 (Fx_get_selection_internal, Fx_disown_selection_internal)
10176 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
10177 * nsselect.m (Fx_own_selection_internal)
10178 (Fx_disown_selection_internal, Fx_selection_exists_p)
10179 (Fx_selection_owner_p, Fx_get_selection_internal):
10180 Sync docs and argument specs with the xselect.c versions.
10182 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
10184 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
10186 2012-02-11 Eli Zaretskii <eliz@gnu.org>
10188 * w32select.c (Fx_selection_exists_p): Sync doc string and
10189 argument list with xselect.c. (Bug#10783)
10191 * w16select.c (Fx_selection_exists_p): Sync doc string and
10192 argument list with xselect.c. (Bug#10783)
10194 2012-02-10 Glenn Morris <rgm@gnu.org>
10196 * fns.c (Fsecure_hash): Doc fix.
10198 2012-02-09 Kenichi Handa <handa@m17n.org>
10200 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
10202 2012-02-07 Chong Yidong <cyd@gnu.org>
10204 * buffer.c (Fbuffer_local_variables)
10205 (buffer_lisp_local_variables): Handle unbound vars correctly;
10206 don't let Qunbound leak into Lisp.
10208 2012-02-07 Glenn Morris <rgm@gnu.org>
10210 * image.c (Fimagemagick_types): Doc fix.
10212 * image.c (imagemagick-render-type): Change it from a lisp object
10213 to an integer. Move the doc here from the lisp manual.
10214 Treat all values not equal to 0 the same.
10216 2012-02-06 Chong Yidong <cyd@gnu.org>
10218 * doc.c (store_function_docstring): Avoid applying docstring of
10219 alias to base function (Bug#2603).
10221 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
10223 * .gdbinit (pp1, pv1): Remove redundant defines.
10226 2012-02-04 Chong Yidong <cyd@gnu.org>
10228 * nsterm.m: Declare a global (Bug#10694).
10230 2012-02-04 Eli Zaretskii <eliz@gnu.org>
10232 * w32.c (get_emacs_configuration_options):
10233 Include --enable-checking, if specified, in the return value.
10235 2012-02-04 Martin Rudalics <rudalics@gmx.at>
10237 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
10238 after rounding frame sizes. (Bug#9723)
10240 2012-02-04 Eli Zaretskii <eliz@gnu.org>
10242 * keyboard.c (adjust_point_for_property): Don't position point
10243 before BEGV. (Bug#10696)
10245 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
10247 Handle overflow when computing char display width (Bug#9496).
10248 * character.c (char_width): Return EMACS_INT, not int.
10249 (char_width, c_string_width): Check for overflow when
10250 computing the width; this is possible now that individual
10251 characters can have unbounded width. Problem introduced
10252 by merge from Emacs 23 on 2012-01-19.
10254 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
10256 * dbusbind.c (Fdbus_register_method): Mention the return value
10257 :ignore in the docstring.
10259 2012-02-02 Glenn Morris <rgm@gnu.org>
10261 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
10263 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10264 Unconditionally set to t. (Bug#10673)
10265 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10266 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
10267 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
10269 2012-02-02 Kenichi Handa <handa@m17n.org>
10271 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
10272 0, do not call append_composite_glyph.
10274 2012-02-02 Kenichi Handa <handa@m17n.org>
10276 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
10278 (x_produce_glyphs): If the component of a composition is a null
10279 string, set it->pixel_width to 1 to avoid zero-width glyph.
10281 2012-02-01 Eli Zaretskii <eliz@gnu.org>
10283 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
10284 first 2 arguments are identical. This makes inserting large
10285 output from a subprocess an order of magnitude faster on
10286 MS-Windows, where all sbrk'ed memory is always contiguous.
10288 2012-01-31 Glenn Morris <rgm@gnu.org>
10290 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10291 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
10292 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
10294 2012-01-29 Glenn Morris <rgm@gnu.org>
10296 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
10298 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
10300 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
10302 2012-01-28 Chong Yidong <cyd@gnu.org>
10304 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
10306 2012-01-26 Chong Yidong <cyd@gnu.org>
10308 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
10310 * search.c (Fsearch_forward, Fsearch_backward): Document negative
10311 repeat counts (Bug#10507).
10313 2012-01-26 Glenn Morris <rgm@gnu.org>
10315 * lread.c (syms_of_lread): Doc fix.
10317 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
10319 * coding.c (encode_designation_at_bol): Change return value to
10322 2012-01-25 Chong Yidong <cyd@gnu.org>
10324 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
10326 2012-01-21 Chong Yidong <cyd@gnu.org>
10328 * floatfns.c (Fcopysign): Make the second argument non-optional,
10329 since nil is not allowed anyway.
10331 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
10333 * process.c (read_process_output): Use p instead of XPROCESS (proc).
10334 (send_process): Likewise.
10336 2012-01-19 Martin Rudalics <rudalics@gmx.at>
10338 * window.c (save_window_save, Fcurrent_window_configuration)
10339 (Vwindow_persistent_parameters): Do not use Qstate.
10340 Rewrite doc-strings.
10342 2012-01-19 Kenichi Handa <handa@m17n.org>
10344 * character.c (char_width): New function.
10345 (Fchar_width, c_string_width, lisp_string_width):
10346 Use char_width (Bug#9496).
10348 2012-01-16 Martin Rudalics <rudalics@gmx.at>
10350 * window.c (Vwindow_persistent_parameters): New variable.
10351 (Fset_window_configuration, save_window_save): Handle persistent
10354 2012-01-14 Eli Zaretskii <eliz@gnu.org>
10356 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
10357 thrashing the stack of the thread. (Bug#9087)
10359 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
10361 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
10363 2012-01-11 Eli Zaretskii <eliz@gnu.org>
10365 * xdisp.c (rows_from_pos_range): Handle the case where the
10366 highlight ends on a newline. (Bug#10464)
10367 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
10368 he end column for display of highlight that ends on a newline
10371 2012-01-11 Glenn Morris <rgm@gnu.org>
10373 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
10374 from load-path also when installation-directory is nil. (Bug#10208)
10376 2012-01-10 Glenn Morris <rgm@gnu.org>
10378 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
10380 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
10381 Update template values to be closer to their typical values these days.
10383 2012-01-09 Eli Zaretskii <eliz@gnu.org>
10385 * xdisp.c (rows_from_pos_range): Accept additional argument
10386 DISP_STRING, and accept any glyph in a row whose object is that
10387 string as eligible for mouse highlight. Fixes mouse highlight of
10388 display strings from overlays. (Bug#10464)
10390 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
10392 emacs: fix an auto-save permissions race condition (Bug#10400)
10393 * fileio.c (auto_saving_dir_umask): New static var.
10394 (Fmake_directory_internal): Use it.
10395 (do_auto_save_make_dir): Set it, instead of invoking chmod after
10396 creating the directory. The old code temporarily assigns
10397 too-generous permissions to the directory.
10398 (do_auto_save_eh): Clear it.
10399 (Fdo_auto_save): Catch all errors, not just file errors, so
10400 that the var is always cleared.
10402 2012-01-07 Eli Zaretskii <eliz@gnu.org>
10404 * search.c (scan_buffer): Pass character positions to
10405 know_region_cache, not byte positions. (Bug#6540)
10407 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
10409 * w32.c (sys_rename): Report EXDEV when rename of a directory
10410 fails because the target is on another logical disk. (Bug#10284)
10412 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
10414 * xterm.c (x_embed_request_focus): New function.
10416 * xterm.h: Add prototype.
10418 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
10420 2012-01-05 Glenn Morris <rgm@gnu.org>
10422 * emacs.c (emacs_copyright): Update short copyright year to 2012.
10424 2012-01-01 Eli Zaretskii <eliz@gnu.org>
10426 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
10427 Load gnutls_transport_set_lowat only if GnuTLS version is below
10429 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
10430 GnuTLS versions below 2.11.1.
10432 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
10434 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
10435 to the doc string advising against its use for altering the way
10436 windows are scrolled.
10438 2011-12-28 Kenichi Handa <handa@m17n.org>
10440 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
10441 coding-system ASCII compatible only when it does not produce BOM
10442 on encoding (Bug#10383).
10444 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
10446 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
10448 (create_and_show_popup_menu): Always use menu_position_func for
10451 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
10453 * callint.c (Fcall_interactively): Don't truncate prompt string.
10455 2011-12-23 Eli Zaretskii <eliz@gnu.org>
10457 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
10458 property that ends at ZV, so that the bidi iteration could be
10459 resumed from there (after widening). (Bug#10360)
10461 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
10463 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
10465 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
10467 * nsterm.m (x_free_frame_resources):
10468 Release f->output_data.ns->miniimage.
10469 (ns_index_color): Fix indentation. Do not retain
10470 color_table->colors[i].
10472 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
10475 * nsfns.m (x_set_background_color): Assign return value from
10476 ns_index_color to face-background instead of NSColor*.
10477 (ns_implicitly_set_icon_type): Fix indentation.
10478 Change assignment in for loop to comparison.
10480 * emacs.c (ns_pool): New variable.
10481 (main): Assign ns_pool.
10482 (Fkill_emacs): Call ns_release_autorelease_pool.
10484 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
10485 autorelease fdesc, release fdAttrs and tdict.
10486 (ns_get_covering_families): Release charset.
10487 (ns_findfonts): Release NSFontDescriptor created with new.
10488 (ns_uni_to_glyphs): Fix indentation.
10489 (setString): Release attrStr before assigning new value.
10491 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
10493 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
10495 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
10496 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
10498 2011-12-18 David Reitter <reitter@cmu.edu>
10500 * nsterm.m (ns_term_init): Subscribe for notifications
10501 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
10502 to method trackingNotification in EmacsMenu.
10504 * nsmenu.m (trackingMenu): New variable.
10505 (trackingNotification): New method (from Aquamacs).
10506 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
10507 from Aquamacs (Bug#7030).
10509 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
10511 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
10512 (symbol_to_nsstring): Fix indentation.
10513 (ns_symbol_to_pb): New function.
10514 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
10515 (Fns_rotate_cut_buffers_internal): Remove.
10516 (Fns_store_selection_internal): Rename from
10517 Fns_store_cut_buffer_internal.
10518 (ns_get_foreign_selection, Fx_own_selection_internal)
10519 (Fx_disown_selection_internal, Fx_selection_exists_p)
10520 (Fns_get_selection_internal, Fns_store_selection_internal):
10521 Use ns_symbol_to_pb and check if return value is nil.
10522 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
10523 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
10524 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
10525 renamed to Sns_store_selection_internal.
10526 (ns_handle_selection_request): Move code to Fx_own_selection_internal
10527 and remove this function.
10528 (ns_handle_selection_clear): Remove, never used.
10529 (Fx_own_selection_internal): Move code from ns_handle_selection_request
10532 2011-12-17 Ken Brown <kbrown@cornell.edu>
10534 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
10535 GID is unknown (Bug#10257).
10537 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
10539 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
10540 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
10541 which caused a build failure on GNU/Linux IA-64. This problem was
10542 introduced by my 2011-10-07 patch.
10544 2011-12-15 Juri Linkov <juri@jurta.org>
10546 * image.c (imagemagick_error): New function. (Bug#10112)
10547 (imagemagick_load_image): Comment out `MagickSetResolution' call.
10548 Use `imagemagick_error' where ImageMagick functions return
10550 (Fimagemagick_types): Add `Fnreverse' to return the list in the
10553 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10555 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
10556 fill background (Bug#8992).
10558 2011-12-13 Martin Rudalics <rudalics@gmx.at>
10560 * window.c (Vwindow_combination_resize)
10561 (Vwindow_combination_limit): Use t instead of non-nil in
10563 (Vrecenter_redisplay): Add first sentence of doc-string on
10565 (Frecenter): Fix doc-string typo.
10567 2011-12-11 Kenichi Handa <handa@m17n.org>
10569 * coding.c (Funencodable_char_position): Pay attention to the
10570 buffer text relocation (Bug#9389).
10572 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
10574 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
10575 gtk_init (Bug#10100).
10577 2011-12-10 Eli Zaretskii <eliz@gnu.org>
10579 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
10580 IT->string is nil. (Bug#10263)
10582 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
10584 * nsterm.h (x_free_frame_resources): Declare.
10586 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
10587 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
10589 * nsterm.h (ns_get_defaults_value): Declare.
10591 * nsterm.m (ns_default): Call ns_get_defaults_value.
10593 2011-12-09 Eli Zaretskii <eliz@gnu.org>
10595 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
10598 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10600 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
10601 that where the value of an _OBJC_* symbol points to is in the .bss
10602 section (Bug#10240).
10604 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10606 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
10607 after the loop to call ccl_driver at least once (Bug#8619).
10609 2011-12-08 Kenichi Handa <handa@m17n.org>
10611 * ftfont.c (get_adstyle_property): Fix previous change
10614 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
10616 * w32.c (init_environment): If no_site_lisp, remove site-lisp
10617 dirs from the default value of EMACSLOADPATH (bug#10208).
10619 2011-12-07 Glenn Morris <rgm@gnu.org>
10621 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
10622 installation and source directories as well. (Bug#10208)
10624 2011-12-06 Chong Yidong <cyd@gnu.org>
10626 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
10628 2011-12-06 Glenn Morris <rgm@gnu.org>
10630 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
10631 as an error, not just -1. (Bug#10217)
10633 2011-12-05 Chong Yidong <cyd@gnu.org>
10635 * keyboard.c (process_special_events): New function.
10636 (swallow_events, Finput_pending_p): Use it (Bug#10195).
10638 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
10640 * coding.c (encode_designation_at_bol): Don't use uninitialized
10641 local variable (Bug#9318).
10643 2011-12-05 Kenichi Handa <handa@m17n.org>
10645 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
10646 return Qnil (Bug#8046, Bug#10193).
10648 2011-12-05 Kenichi Handa <handa@m17n.org>
10650 * coding.c (encode_designation_at_bol): New args charbuf_end and
10651 dst. Return the number of produced bytes. Callers changed.
10652 (coding_set_source): Return how many bytes coding->source was
10654 (coding_set_destination): Return how many bytes
10655 coding->destination was relocated.
10656 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
10657 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
10659 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10661 * coding.c (CODING_CHAR_CHARSET_P): New macro.
10662 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
10665 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
10667 The following changes are to fix Bug#9318.
10669 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
10670 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
10671 (encode_coding_iso_2022, encode_coding_sjis)
10672 (encode_coding_big5, encode_coding_charset): Use the above macros.
10674 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
10676 * lisp.h (process_quit_flag): Fix external declaration.
10678 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
10680 Don't macro-inline non-performance-critical code.
10681 * eval.c (process_quit_flag): New function.
10682 * lisp.h (QUIT): Use it.
10684 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
10686 * nsfns.m (get_geometry_from_preferences): New function.
10687 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
10689 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
10691 * emacs.c (Qkill_emacs): Define.
10692 (syms_of_emacs): Initialize it.
10693 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
10694 Qquit_flag to `kill-emacs' instead.
10695 (quit_throw_to_read_char): Add parameter `from_signal'.
10696 All callers changed. Call Fkill_emacs if requested and safe.
10697 * lisp.h (QUIT): Call Fkill_emacs if requested.
10699 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
10701 * widget.c (update_wm_hints): Return if wmshell is null.
10702 (widget_update_wm_size_hints): New function.
10704 * widget.h (widget_update_wm_size_hints): Declare.
10706 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
10707 widget_update_wm_size_hints (Bug#10104).
10709 2011-12-03 Eli Zaretskii <eliz@gnu.org>
10711 * xdisp.c (handle_invisible_prop): If the invisible text ends just
10712 before a newline, prepare the bidi iterator for consuming the
10713 newline, and keep the current paragraph direction. (Bug#10183)
10714 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
10716 2011-12-02 Juri Linkov <juri@jurta.org>
10718 * search.c (Fword_search_regexp): New Lisp function created from
10719 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
10720 (Fword_search_backward, Fword_search_forward)
10721 (Fword_search_backward_lax, Fword_search_forward_lax):
10722 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
10723 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
10725 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
10727 * fileio.c (Finsert_file_contents): Move after-change-function call
10728 to before the "handled:" label, since all "goto handled" appear in
10729 cases where the *-change-functions have already been properly called
10732 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
10734 * keyboard.c (interrupt_signal): Don't call kill-emacs when
10735 waiting for input. (Bug#10169)
10737 2011-11-30 Eli Zaretskii <eliz@gnu.org>
10739 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
10740 verifies glyph row's hash code--we have just reallocated the
10741 glyphs, so their contents can be complete garbage. (Bug#10164)
10743 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
10745 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
10747 2011-11-30 Eli Zaretskii <eliz@gnu.org>
10749 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
10750 attributes are tested _before_ calling verify_row_hash, to protect
10751 against GCC re-ordering of the tests. (Bug#10164)
10753 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
10755 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
10757 * xterm.c (handle_one_xevent): Only set async_visible and friends
10758 if net_wm_state_hidden_seen is non-zero (Bug#10002)
10759 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
10760 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
10762 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
10764 Remove GCPRO-related macros that exist only to avoid shadowing locals.
10765 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
10766 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
10767 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10768 All uses changed to use GCPRO1 etc.
10769 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
10770 Revert to old implementation (i.e., before 2011-03-11).
10772 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10774 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
10775 of scroll runs so as to avoid assigning disabled bogus rows and
10776 unnecessary graphics copy operations.
10778 2011-11-27 Eli Zaretskii <eliz@gnu.org>
10780 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
10781 (snprintf) [_MSC_VER]: Redirect to _snprintf.
10782 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
10783 (malloc, free, realloc, calloc): Redirect to e_* only when
10786 * lisp.h (GCTYPEBITS): Move before first use.
10787 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
10788 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
10789 this macro definition.
10791 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
10794 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
10796 * gtkutil.c (xg_create_frame_widgets):
10797 Call gtk_window_set_has_resize_grip (FALSE) if that function is
10798 present with Gtk+ 2.0.
10800 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10802 * fileio.c (Finsert_file_contents): Undo previous change; see
10803 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10805 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10807 Rename locals to avoid shadowing.
10808 * fileio.c (Finsert_file_contents):
10809 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
10810 * process.c (wait_reading_process_output):
10811 Rename inner 'proc' to 'p' to avoid shadowing.
10812 Indent for consistency with usual Emacs style.
10814 2011-11-25 Eli Zaretskii <eliz@gnu.org>
10816 * xdisp.c (redisplay_window): If cursor row is not fully visible
10817 after recentering, and scroll-conservatively is set to a large
10818 number, scroll window by a few more lines to make the cursor fully
10819 visible and out of scroll-margin. (Bug#10105)
10820 (start_display): Don't move to the next line if the display should
10821 start at a newline that is part of a display vector or an overlay
10822 string. (Bug#10119)
10824 2011-11-24 Juri Linkov <juri@jurta.org>
10826 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
10827 after the `MagickPingImage' call. (Bug#10112)
10829 2011-11-23 Chong Yidong <cyd@gnu.org>
10831 * window.c (Fcoordinates_in_window_p): Accept only live windows.
10833 2011-11-23 Martin Rudalics <rudalics@gmx.at>
10835 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
10836 making another buffer current. (Bug#10114)
10838 2011-11-23 Glenn Morris <rgm@gnu.org>
10840 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
10842 2011-11-23 Chong Yidong <cyd@gnu.org>
10844 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
10845 using it (Bug#5984).
10847 2011-11-22 Eli Zaretskii <eliz@gnu.org>
10849 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
10850 and header-lines, as they don't have one computed for them.
10853 * .gdbinit (prow): Make displayed values more self-explaining.
10854 Add row's hash code.
10856 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
10858 * process.c (wait_reading_process_output): Fix asynchrounous
10859 GnuTLS socket handling on some versions of the GnuTLS library.
10860 (wait_reading_process_output): Add comment and URL.
10862 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
10864 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
10866 2011-11-21 Chong Yidong <cyd@gnu.org>
10868 * window.c (Fnext_window, Fprevious_window): Doc fix.
10870 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10872 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
10874 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
10876 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
10878 2011-11-20 Martin Rudalics <rudalics@gmx.at>
10880 * window.c (Fset_window_combination_limit): Rename argument
10882 (Vwindow_combination_limit): Remove "status" from doc-string.
10884 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
10886 * m/ibms390.h: Remove.
10887 * m/ibms390x.h: Don't include "ibms390.h".
10889 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10891 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
10892 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
10894 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
10896 * casetab.c (Fset_case_table):
10897 * charset.c (Fcharset_after): Fix typos.
10899 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
10901 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
10902 Otherwise, valgrind does not work on some platforms.
10903 Problem reported by Andreas Schwab in
10904 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
10905 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
10906 is set, removing the need for VIRT_ADDRESS_VARIES.
10907 (PURE_P): Use a more-efficient implementation that needs just one
10908 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
10909 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
10910 to 4 (xorl, subq, cmpq, setbe).
10911 * alloc.c (pure): Always extern now, since that's the
10912 VIRT_ADDR_VARIES behavior.
10913 (PURE_POINTER_P): Use a single comparison, not two, for
10914 consistency with the new puresize.h.
10915 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
10916 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
10917 Remove VIRT_ADDR_VARIES no longer needed.
10919 2011-11-19 Eli Zaretskii <eliz@gnu.org>
10921 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
10922 (erase_phys_cursor, update_window_cursor, show_mouse_face)
10923 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
10924 behave as if the cursor position were at the window margin.
10926 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
10927 and the cursor position is out of bounds, behave as if the cursor
10928 position were at the window margin. (Bug#10075)
10930 2011-11-18 Chong Yidong <cyd@gnu.org>
10932 * window.c (Fwindow_combination_limit): Make first argument
10933 non-optional, since it is meaningless for live windows like the
10936 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
10938 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
10940 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
10942 * intervals.c: Fix grafting over the whole buffer (bug#10071).
10943 (graft_intervals_into_buffer): Simplify.
10945 2011-11-18 Eli Zaretskii <eliz@gnu.org>
10947 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
10948 hash values of the two rows.
10949 (copy_row_except_pointers): Preserve the used[] arrays and the
10950 hash values of the two rows. (Bug#10035)
10951 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
10953 * xdisp.c (row_hash): New function, body extracted from
10954 compute_line_metrics.
10955 (compute_line_metrics): Call row_hash, instead of computing the
10958 * dispnew.c (verify_row_hash): Call row_hash for computing the
10959 hash code of a row, instead of duplicating code from xdisp.c.
10961 * dispextern.h (row_hash): Add prototype.
10963 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
10965 * frame.c (delete_frame): Don't delete the terminal when the last
10966 X frame is closed if emacs is built with GTK toolkit.
10968 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
10970 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
10972 2011-11-17 Martin Rudalics <rudalics@gmx.at>
10974 * window.c (Vwindow_splits): Rename to
10975 Vwindow_combination_resize. Suggested by Juri Linkov.
10976 (Fsplit_window_internal): Use Vwindow_combination_resize instead
10979 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
10981 * nsfns.m (Fns_font_name):
10982 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
10984 2011-11-16 Martin Rudalics <rudalics@gmx.at>
10986 * window.h (window): Rename slot "nest" to "combination_limit".
10987 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
10988 (Fset_window_nest): Rename to Fset_window_combination_limit.
10989 (Vwindow_nest): Rename to Vwindow_combination_limit.
10990 (recombine_windows, make_parent_window, make_window)
10991 (Fsplit_window_internal, saved_window)
10992 (Fset_window_configuration, save_window_save): Rename all
10993 occurrences of window_nest to window_combination_limit.
10995 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
10997 * image.c (imagemagick_load_image): Fix typo.
10999 2011-11-14 Eli Zaretskii <eliz@gnu.org>
11001 * xdisp.c (display_line): Move the call to
11002 highlight_trailing_whitespace before the call to
11003 compute_line_metrics, since the latter needs to see the final
11004 faces of all the glyphs to compute ROW's hash value.
11005 Fixes assertion violations in row_equal_p. (Bug#10035)
11007 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
11009 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
11010 just return (bug#10044).
11012 2011-11-12 Eli Zaretskii <eliz@gnu.org>
11014 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
11015 with user-defined heap size. Bump the default size of the temacs
11016 heap to 27MB, to avoid memory warning when running temacs.
11017 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
11019 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
11020 current_matrix and desired_matrix. (Bug#9990)
11021 (verify_row_hash) [XASSERTS]: New function.
11022 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
11023 that the hash value of glyph rows is correct.
11025 2011-11-12 Martin Rudalics <rudalics@gmx.at>
11027 * window.h (window): Remove splits slot.
11028 * window.c (Fwindow_splits, Fset_window_splits): Remove.
11029 (Fdelete_other_windows_internal, make_parent_window)
11030 (make_window, Fsplit_window_internal, Fdelete_window_internal)
11031 (Fset_window_configuration, save_window_save): Don't deal with
11032 split status of windows.
11033 (saved_window): Remove splits slot.
11034 (Vwindow_splits): Rewrite doc-string.
11036 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
11038 * xfns.c (unwind_create_frame):
11039 * nsfns.m (unwind_create_frame):
11040 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
11041 Vframe_list (Bug#9999).
11043 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
11045 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
11047 2011-11-11 Kenichi Handa <handa@m17n.org>
11049 * callproc.c (Fcall_process): Set the member dst_multibyte of
11052 2011-11-11 Johan Bockgård <bojohan@gnu.org>
11054 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
11055 avoid a crash (bug#9496).
11057 2011-11-09 Chong Yidong <cyd@gnu.org>
11059 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
11060 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
11062 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
11064 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
11066 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
11068 Avoid some portability problems by eschewing 'extern inline' functions.
11069 The trivial performance wins aren't worth the portability hassles; see
11070 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
11072 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
11073 (window_box_width, window_box_left, window_box_left_offset)
11074 (window_box_right, window_box_right_offset): Undo previous change,
11075 by removing the "extern"s.
11076 * intervals.c (adjust_intervals_for_insertion)
11077 (adjust_intervals_for_deletion): Undo previous change,
11078 making these static again.
11079 (offset_intervals, temp_set_point_both, temp_set_point)
11080 (copy_intervals_to_string): No longer inline.
11081 * xdisp.c (window_text_bottom_y, window_box_width)
11082 (window_box_height, window_box_left_offset)
11083 (window_box_right_offset, window_box_left, window_box_right)
11084 (window_box): No longer inline.
11086 2011-11-08 Chong Yidong <cyd@gnu.org>
11088 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
11089 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
11090 Signal an error if not a live window.
11091 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
11092 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
11094 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
11096 * lisp.h (syms_of_abbrev): Remove declaration.
11097 Reported by CHENG Gao <chenggao@royau.me>.
11099 2011-11-07 Eli Zaretskii <eliz@gnu.org>
11101 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
11102 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
11103 of temacs in GUI mode.
11105 2011-11-07 Martin Rudalics <rudalics@gmx.at>
11107 * window.h: Declare delete_all_child_windows instead of
11108 delete_all_subwindows.
11109 * window.c (Fwindow_nest, Fset_window_nest)
11110 (Fset_window_new_total, Fset_window_new_normal)
11111 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
11112 (delete_all_subwindows): Rename to delete_all_child_windows.
11113 (Fdelete_other_windows_internal, Fset_window_configuration):
11114 Call delete_all_child_windows instead of delete_all_subwindows.
11115 * frame.c (delete_frame): Call delete_all_child_windows instead
11116 of delete_all_subwindows.
11118 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
11120 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
11121 This is also needed for porting to any host where GC_MARK_STACK is
11122 not GC_MAKE_GCPROS_NOOPS.
11123 (which_symbols): Use it.
11125 2011-11-07 Kenichi Handa <handa@m17n.org>
11127 * coding.c (coding_set_destination): Check coding->src_pos only
11128 when coding->src_object is a buffer (bug#9910).
11130 * process.c (send_process): Set the member src_multibyte of coding
11131 to 0 (bug#9911) when sending a unibyte text.
11133 * callproc.c (Fcall_process): Set the member src_multibyte of
11134 process_coding to 0 (bug#9912).
11136 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11138 * xmenu.c (cleanup_widget_value_tree): New function.
11139 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
11140 calling free_menubar_widget_value_tree directly (Bug#9830).
11142 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
11144 Fix some portability problems with 'inline'.
11145 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
11146 (window_box_width, window_box_left, window_box_left_offset)
11147 (window_box_right, window_box_right_offset): Declare extern.
11148 Otherwise, these inline functions do not conform to C99 and
11149 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
11150 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
11151 * intervals.c (adjust_intervals_for_insertion)
11152 (adjust_intervals_for_deletion): Now extern, because otherwise the
11153 extern inline functions 'offset_intervals' couldn't refer to it.
11154 (static_offset_intervals): Remove.
11155 (offset_intervals): Rewrite using the old contents of
11156 static_offset_intervals. The old version didn't conform to C99
11157 because an extern inline function contained a reference to an
11158 identifier with static linkage.
11160 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
11162 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
11165 2011-11-06 Eli Zaretskii <eliz@gnu.org>
11167 * xdisp.c (init_iterator, reseat_to_string): Don't set the
11168 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
11169 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
11170 return Qleft_to_right.
11172 2011-11-06 Chong Yidong <cyd@gnu.org>
11174 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
11175 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
11176 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
11177 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
11178 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
11179 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
11180 (Fwindow_vscroll): Doc fix.
11181 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
11182 argument, since it makes no sense to pass a live window and for
11183 consistency with window-child.
11185 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
11187 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
11190 2011-11-05 Jason Rumney <jasonr@gnu.org>
11192 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
11193 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
11195 (add_font_entity_to_list): Fix logic errors in mixed boolean and
11196 bitwise arithmetic preventing use of unicode-sip and non-truetype
11199 2011-11-05 Eli Zaretskii <eliz@gnu.org>
11201 * s/ms-w32.h (fstat, stat, utime): Move redirections to
11204 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
11205 initialization code to keep similarity to xfns.c after changes
11208 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
11210 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
11211 (unwind_create_frame): New function (Bug#9943).
11212 (Fx_create_frame): Restructure code to be more similar to the one in
11213 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
11214 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
11215 Move terminal->reference_count++ just before making the frame official
11218 * nsterm.m (x_free_frame_resources): New function.
11219 (x_destroy_window): Move code to x_free_frame_resources.
11221 * xfns.c (unwind_create_frame): Fix comment.
11222 (Fx_create_frame, x_create_tip_frame):
11223 Move terminal->reference_count++ just before making the frame
11224 official. Move initialization of image_cache_refcount and
11225 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
11227 2011-11-05 Eli Zaretskii <eliz@gnu.org>
11229 Support MSVC build with newer versions of Visual Studio.
11230 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
11231 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
11234 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
11235 which are not supported by MSVC.
11236 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
11237 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
11239 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
11240 types in bitfields.
11241 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
11243 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
11245 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
11247 Support MSVC build with newer versions of Visual Studio.
11248 * w32.c: Don't include w32api.h for MSVC.
11249 (init_environment) [_MSC_VER]: Call sys_access, not _access.
11251 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
11252 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
11253 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
11254 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
11256 (alloca) [_MSC_VER]: Define to _alloca.
11258 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
11260 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
11262 2011-11-04 Eli Zaretskii <eliz@gnu.org>
11264 * xdisp.c (note_mouse_highlight): If either of
11265 previous/next-single-property-change returns nil, treat that as
11266 the beginning or the end of the buffer. (Bug#9955)
11268 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
11270 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
11271 label is not null (Bug#9951).
11272 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
11275 2011-11-04 Eli Zaretskii <eliz@gnu.org>
11277 * window.c (Fwindow_body_size): Mention in the doc string that the
11278 return value is in frame's canonical units. (Bug#9949)
11280 2011-11-03 Eli Zaretskii <eliz@gnu.org>
11282 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
11284 * w32fns.c (unwind_create_frame): If needed, free the glyph
11285 matrices of the partially constructed frame. (Bug#9943)
11286 * xfns.c (unwind_create_frame): Likewise.
11288 2011-11-01 Eli Zaretskii <eliz@gnu.org>
11290 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
11291 Don't stop backward scan on the continuation glyph, even though
11292 its CHARPOS is positive.
11293 (mouse_face_from_buffer_pos, note_mouse_highlight):
11294 Rename cover_string to disp_string.
11296 2011-11-01 Martin Rudalics <rudalics@gmx.at>
11298 * window.c (temp_output_buffer_show): Don't use
11299 Vtemp_buffer_show_specifiers.
11300 (Vtemp_buffer_show_specifiers): Remove unused variable.
11302 2011-10-30 Eli Zaretskii <eliz@gnu.org>
11304 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
11305 past the beginning of the current glyph matrix.
11307 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
11309 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
11310 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
11311 HAVE_GTK3 (Bug#9869).
11313 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
11314 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
11316 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
11318 * xterm.c: Declare x_handle_net_wm_state to return int.
11319 (handle_one_xevent): Check if we are iconified but don't have
11320 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
11321 (get_current_wm_state): Return non-zero if not hidden,
11322 check for _NET_WM_STATE_HIDDEN (Bug#9893).
11323 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
11324 (x_handle_net_wm_state): Return what get_current_wm_state returns.
11325 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
11327 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
11329 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
11330 so that this new function doesn't get optimized away by a
11331 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
11333 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
11335 * frame.h (MOUSE_HL_INFO): Remove excess parens.
11337 2011-10-29 Eli Zaretskii <eliz@gnu.org>
11339 Fix the `xbytecode' command.
11340 * .gdbinit (xprintbytestr): New command.
11341 (xwhichsymbols): Rename from `which'; all callers changed.
11342 (xbytecode): Print the byte-code string as well.
11344 2011-10-29 Kim Storm <storm@cua.dk>
11346 * alloc.c (which_symbols): New function.
11348 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
11350 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
11353 2011-10-29 Glenn Morris <rgm@gnu.org>
11355 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
11356 Not clear what it was for, and it causes various bugs. (Bug#9839)
11358 2011-10-28 Eli Zaretskii <eliz@gnu.org>
11360 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
11361 possible random value that matches one of those tested as
11362 condition to clear the mouse face.
11364 2011-10-28 Chong Yidong <cyd@gnu.org>
11366 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
11368 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
11370 * window.c (make_window): Initialize phys_cursor_on_p.
11372 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
11374 * lisp.h (struct Lisp_Symbol): Update comments.
11376 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
11378 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
11380 2011-10-28 Eli Zaretskii <eliz@gnu.org>
11382 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
11383 <oslsachem@gmail.com> for helping to debug this.
11385 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
11386 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
11387 (g_b_init_get_glyph_outline_w): New static variables.
11388 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
11389 (GetGlyphOutlineW_Proc): New typedefs.
11390 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
11391 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
11393 (w32font_open_internal, compute_metrics):
11394 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
11395 instead of calling the "wide" APIs directly.
11397 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
11399 * w32.h (syms_of_w32font): Add prototype.
11401 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
11403 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
11404 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
11405 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
11406 (Fmove_to_window_line): Doc fix.
11408 2011-10-27 Chong Yidong <cyd@gnu.org>
11410 * process.c (make_process): Set gnutls_state to NULL.
11412 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
11413 non-NULL, regardless of GNUTLS_INITSTAGE.
11414 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
11415 an error. Set process slots as soon as we allocate them.
11417 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
11419 2011-10-27 Chong Yidong <cyd@gnu.org>
11421 * gnutls.c (emacs_gnutls_deinit): New function.
11422 Deallocate credentials structures as well as calling gnutls_deinit.
11423 (Fgnutls_deinit, Fgnutls_boot): Use it.
11425 * process.c (make_process): Initialize GnuTLS credentials to NULL.
11426 (deactivate_process): Call emacs_gnutls_deinit.
11428 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
11430 * image.c (x_create_x_image_and_pixmap):
11431 * w32.c (sys_rename, w32_delayed_load):
11432 * w32font.c (fill_in_logfont):
11433 * w32reg.c (x_get_string_resource): Silence compiler warnings.
11435 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
11437 * w32fns.c (w32_default_color_map): New function,
11438 extracted from Fw32_default_color_map.
11439 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
11441 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
11443 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
11445 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
11447 * keyboard.c (test_undefined): New function (bug#9751).
11448 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
11450 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
11452 * sysdep.c (init_sys_modes): Fix the check for the controlling
11453 terminal (Bug#6649).
11455 2011-10-20 Eli Zaretskii <eliz@gnu.org>
11457 * dispextern.h (struct bidi_it): New member next_en_type.
11459 * bidi.c (bidi_line_init): Initialize the next_en_type member.
11460 (bidi_resolve_explicit_1): When next_en_pos is valid for the
11461 current character, check also for next_en_type being WEAK_EN.
11462 (bidi_resolve_weak): Don't enter the expensive loop if the current
11463 position is before next_en_pos. Record the bidi type of the first
11464 non-ET, non-BN character we find, in addition to its position.
11465 (bidi_level_of_next_char): Invalidate next_en_type when
11466 next_en_pos is over-stepped.
11468 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
11470 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
11471 * editfns.c: Rewrite current-time-zone so that it invokes
11472 the equivalent of (format-time-string "%Z") to get the time zone name.
11473 This fixes a bug when the time zone name contains characters that
11474 need converting from the system time locale to Emacs internal format.
11475 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
11476 that patch fixed format-time-string to do the conversion, but
11477 I forgot to fix current-time-zone.
11478 (format_time_string): New function, containing most of
11479 what Fformat_time_string used to contain.
11480 (Fformat_time_string): Rewrite in terms of format_time_string.
11481 This doesn't change this function's behavior.
11482 (current-time-zone): Rewrite to use format_time_string.
11483 This fixes the bug reported by Michael Schierl in
11484 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
11485 Jason Rumney's 2007-06-07 change worked around this bug, but
11487 * systime.h (tzname, timezone): Remove no-longer-used declarations.
11489 2011-10-19 Eli Zaretskii <eliz@gnu.org>
11491 * xdisp.c (start_display): If the character at POS is displayed
11492 via a display vector, reset IT->current.dpvec_index to zero.
11493 (try_window_reusing_current_matrix): If a line ends in a display
11494 vector or the next line starts in a display vector, continue
11495 redrawing the window even though the character position of
11496 start_row was reached.
11499 2011-10-18 Chong Yidong <cyd@gnu.org>
11501 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
11502 with nobreak-char-display too.
11504 2011-10-18 Eli Zaretskii <eliz@gnu.org>
11506 Fix part 3 of bug#9771.
11507 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
11508 (bidi_resolve_neutral): Don't enter the expensive loop looking for
11509 non-neutral characters if the current character is a paragraph
11510 separator (a.k.a. Newline). This avoids running the same
11511 expensive loop twice, once when we consume the preceding newline
11512 and the other time when the line actually needs to be displayed.
11513 Avoid the loop when we see neutrals on the base embedding level
11514 following a character whose directionality is the same as the
11515 paragraph's. This avoids running the expensive loop when a line
11516 ends in a long sequence of neutrals, like control characters.
11517 Add assertion against STRONG_AL type. Slightly rearrange code
11518 that determines the type of a neutral given the first non-neutral
11520 (bidi_level_of_next_char): Set next_en_pos to zero when
11521 invalidating its info.
11523 2011-10-17 Eli Zaretskii <eliz@gnu.org>
11525 * xdisp.c (push_display_prop): Determine whether to record string
11526 or buffer position by IT->string, not by IT->method. Allow
11527 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
11528 (move_it_vertically_backward): Don't look for character position
11529 immediately after the newline when in a continuation line.
11532 2011-10-15 Martin Rudalics <rudalics@gmx.at>
11534 * window.c (coordinates_in_window): Rewrite and delabelize
11535 vertical border check. (Bug#5357) (Bug#9618)
11537 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
11539 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
11540 errors in XSetWindowBorder (bug#9310).
11542 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
11544 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
11545 avoid crash when xmalloc overrun checking is enabled.
11547 2011-10-13 Eli Zaretskii <eliz@gnu.org>
11549 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
11550 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
11551 cursor motion with <left> and <right> arrow keys.
11553 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
11554 some callers set that themselves.
11556 2011-10-12 Eli Zaretskii <eliz@gnu.org>
11558 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
11559 display string and the previous row comes from the same string and
11560 is empty. (Bug#9739) (Bug#9738)
11562 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
11564 * doc.c (get_doc_string): Encode file name (bug#9735).
11566 2011-10-12 Eli Zaretskii <eliz@gnu.org>
11568 * bidi.c (bidi_level_of_next_char):
11569 * xdisp.c (get_visually_first_element): Remove old incorrect
11570 comments regarding the Unicode Line Separator character.
11572 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
11574 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
11576 * alloc.c (Fgc_status): Do not access beyond zombies array
11577 boundary if nzombies > MAX_ZOMBIES.
11578 * alloc.c (dump_zombies): Add missing format specifier.
11580 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
11582 * xdisp.c (set_cursor_from_row): Simplify conditionals,
11583 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
11585 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
11586 Some packages use them to denote characters with modifiers.
11588 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
11590 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
11591 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
11592 matching a pp-number. Rename parameter var to var1.
11594 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
11596 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
11598 2011-10-08 Glenn Morris <rgm@gnu.org>
11600 * callint.c (Fcall_interactively): Give a more explicit error for the
11601 'c' case with a non-character input. (Bug#8479)
11603 2011-10-08 Eli Zaretskii <eliz@gnu.org>
11605 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
11607 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
11608 lines that are hscrolled on the left.
11610 * dispnew.c (buffer_posn_from_coords): Account for a possible
11611 presence of header-line. (Bug#4426)
11613 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
11615 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
11616 Don't advertise functionality which we discourage or doesn't work.
11618 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
11620 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
11621 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
11622 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
11623 this makes Emacs dump core during garbage collection on rare
11624 occasions. sizeof is obviously inferior to offsetof here, so
11625 stick with offsetof.
11626 (GC_POINTER_ALIGNMENT): New macro.
11627 (mark_memory): Omit 3rd (offset) arg; caller changed.
11628 Don't assume EMACS_INT alignment is the same as pointer alignment.
11630 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
11632 * keyboard.c (read_key_sequence_remapped): New var.
11633 (read_key_sequence): Compute remapping in the right buffer.
11634 (command_loop_1): Use read_key_sequence's remapping directly.
11636 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
11638 * dired.c (file_name_completion): Don't expand file name.
11639 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
11640 before checking file name handler.
11642 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
11643 they've been requested explicitly (bug#9591).
11645 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
11647 * keymap.c (Fsingle_key_description): Use make_specified_string
11648 instead of build_string to build string from push_key_description.
11651 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11653 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
11654 This fixes a Y2038 bug on 64-bit hosts.
11655 * buffer.c (reset_buffer):
11656 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
11657 (Fclear_buffer_auto_save_failure):
11658 Use 0, not -1, to represent an unset failure time, since time_t
11659 might not be signed.
11661 Remove dependency on glibc malloc internals.
11662 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11663 Move back here from lisp.h, but with their new implementations.
11664 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11665 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
11666 * charset.c (charset_table_init): New static var.
11667 (syms_of_charset): Use it instead of xmalloc. This removes a
11668 dependency on glibc malloc internals. See Eli Zaretskii's comment in
11669 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
11670 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11671 Move back to alloc.c.
11672 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11673 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
11675 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
11677 * nsterm.m (windowDidResize): Call x_set_window_size only when
11678 ns_in_resize is true. Otherwise set pixelwidth/height and
11679 call change_frame_size (Bug#9628).
11681 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11683 Port --enable-checking=all to Fedora 14 x86-64.
11684 * charset.c (syms_of_charset): Also account for glibc malloc's
11685 internal overhead when calculating the initial malloc maximum.
11687 Port --enable-checking=all to Fedora 14 x86.
11688 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11690 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
11691 (overrun_check_realloc, overrun_check_free):
11692 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
11693 That way, xmalloc returns a properly-aligned pointer even if
11694 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
11695 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
11696 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
11697 into account when calculating the initial malloc maximum.
11698 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11699 Move here from alloc.c, so that charset.c can use it too.
11700 Properly align; the old code wasn't right for common 32-bit hosts
11701 when configured with --enable-checking=all.
11702 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11703 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
11705 2011-09-29 Eli Zaretskii <eliz@gnu.org>
11707 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
11710 2011-09-28 Eli Zaretskii <eliz@gnu.org>
11712 * xdisp.c (compute_display_string_end): If there's no display
11713 string at CHARPOS, return -1.
11715 * bidi.c (bidi_fetch_char): When compute_display_string_end
11716 returns a negative value, treat the character as a normal
11717 character not covered by a display string. (Bug#9624)
11719 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
11721 * lread.c (Fread_from_string): Fix typo in docstring.
11723 2011-09-27 Eli Zaretskii <eliz@gnu.org>
11725 * xdisp.c (handle_invisible_prop): If invisible text ends on a
11726 newline, reseat the iterator instead of bidi-iterating there one
11727 character at a time. (Bug#9610)
11728 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
11729 TO_CHARPOS if the bidi iterator is at base embedding level.
11731 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
11733 * lread.c (readevalloop): Use correct code for NBSP.
11734 (read1): Likewise. (Bug#9608)
11736 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
11738 * dbusbind.c (Fdbus_register_signal): When service is not
11739 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
11741 2011-09-25 Glenn Morris <rgm@gnu.org>
11743 * buffer.c (truncate-lines): Doc fix.
11745 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
11747 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
11748 (Fset_window_next_buffers): Doc fix.
11750 2011-09-24 Glenn Morris <rgm@gnu.org>
11752 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
11754 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
11756 Fix minor problems found by static checking.
11757 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
11758 * indent.c (Fvertical_motion): Fix == vs = typo.
11760 2011-09-24 Eli Zaretskii <eliz@gnu.org>
11762 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
11763 Default value is now t. Doc fix.
11765 * indent.c (Fvertical_motion): Compute and apply the overshoot
11766 logic when moving up, not only when moving down. Fix the
11767 confusing name and values of the it_overshoot_expected variable;
11768 logic changes accordingly. (Bug#9254) (Bug#9549)
11770 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
11771 CHARPOS is covered by a display string which includes newlines.
11772 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
11773 is covered by a display string with embedded newlines.
11775 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
11777 * dbusbind.c (Fdbus_register_signal): Add match rule to
11778 Vdbus_registered_objects_table. (Bug#9581)
11779 (Fdbus_register_method, Vdbus_registered_objects_table):
11782 2011-09-24 Jim Meyering <meyering@redhat.com>
11784 do not ignore write error for any output size
11785 The previous change was incomplete.
11786 While it makes emacs --batch detect the vast majority of stdout
11787 write failures, errors were still ignored whenever the output size is
11788 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
11789 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
11790 && echo FAIL: ignored write error
11791 FAIL: ignored write error
11792 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
11793 && echo FAIL: ignored write error
11794 FAIL: ignored write error
11795 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
11797 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
11799 * emacs.c (Fkill_emacs): In noninteractive mode exit
11800 non-successfully if a write error occurred on stdout. (Bug#9574)
11802 2011-09-21 Eli Zaretskii <eliz@gnu.org>
11804 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
11807 * dispextern.h (struct it): Update the comment documenting what
11810 2011-09-20 Eli Zaretskii <eliz@gnu.org>
11812 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
11813 a display string, extend search for cursor position to end of row.
11814 (find_row_edges): If the row ends in a newline from a display
11815 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
11816 Handle the case of a display string with multiple newlines.
11817 (Fcurrent_bidi_paragraph_direction): Fix search for previous
11818 non-empty line. Fixes confusing cursor motion with arrow keys at
11819 the beginning of a line that starts with whitespace.
11821 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11823 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
11826 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
11828 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
11829 boolean (Bug#9154).
11831 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11833 * xdisp.c (display_line): Record maximum and minimum buffer
11834 positions even if no glyphs were produced (e.g., by a zero-width
11835 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
11836 buffer positions that will be removed from the glyph row because
11838 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
11839 column is beyond frame width: don't subtract 1 "pixel" when
11840 computing width of the stretch.
11841 (reseat_at_next_visible_line_start): Undo the change made on
11842 2011-09-17 that saved paragraph information and restored it after
11843 the call to `reseat'. (Bug#9545)
11845 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11847 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
11848 and turn window cursor on if cleared (Bug#9415).
11850 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
11852 * search.c (boyer_moore): Take unibyte characters from pattern
11853 literally. (Bug#9458)
11855 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11857 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
11859 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
11861 Fix minor problem found by static checking.
11862 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
11863 initialized, to pacify gcc -Wuninitialized.
11865 * fileio.c: Report proper errno when syscall falls.
11866 (Finsert_file_contents): Save and restore errno,
11867 so that report_file_error outputs the correct diagnostic.
11868 (Fwrite_region) [CLASH_DETECTION]: Likewise.
11870 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11872 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
11874 2011-09-17 Eli Zaretskii <eliz@gnu.org>
11876 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
11877 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
11879 2011-09-17 Eli Zaretskii <eliz@gnu.org>
11881 * xdisp.c (reseat_at_next_visible_line_start): Keep information
11882 about the current paragraph and restore it after the call to reseat.
11884 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
11885 (bidi_find_paragraph_start): Search back for paragraph beginning
11886 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
11887 (bidi_move_to_visually_next): Only trigger paragraph-related
11888 computations when the last character is a newline or at EOB, not
11889 just any NEUTRAL_B. (Bug#9470)
11891 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
11892 truncated lines if point is covered by a display string. (Bug#9524)
11894 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
11896 * xselect.c: Relax test for outgoing X longs (Bug#9498).
11897 (cons_to_x_long): New function.
11898 (lisp_data_to_selection_data): Use it. Correct the test for
11899 short-versus-long data; it was negated. Break out of vector
11900 loop, for efficiency, when a long datum is discovered.
11902 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
11904 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
11906 2011-09-16 Eli Zaretskii <eliz@gnu.org>
11908 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
11909 GCC PR/17406) by declaring this function with external scope.
11911 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11913 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
11914 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
11916 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
11918 * editfns.c (Fformat): Correctly handle text properties on "%%".
11920 2011-09-15 Eli Zaretskii <eliz@gnu.org>
11922 * xterm.c (x_draw_composite_glyph_string_foreground):
11923 * w32term.c (x_draw_composite_glyph_string_foreground):
11924 * term.c (encode_terminal_code):
11925 * composite.c (composition_update_it, get_composition_id):
11926 * xdisp.c (get_next_display_element)
11927 (fill_composite_glyph_string): Add comments about special meaning
11928 of TAB characters in a composition.
11930 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
11932 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
11933 This occurs when processing a multibyte format.
11934 Problem reported by Wolfgang Jenker.
11936 2011-09-15 Johan Bockgård <bojohan@gnu.org>
11938 * xdisp.c (try_cursor_movement): Only check for exact match if
11939 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
11941 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11943 Remove unused external symbols.
11944 * dispextern.h (calc_pixel_width_or_height): Remove decl.
11945 * xdisp.c (calc_pixel_width_or_height): Now static.
11946 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
11947 * indent.c (check_display_width):
11948 * w32term.c: Fix comment to match code.
11949 * xterm.c, xterm.h (x_catching_errors): Remove.
11951 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
11953 * xselect.c: Use signed conversions more consistently (Bug#9498).
11954 (selection_data_to_lisp_data): Assume incoming selection data are
11955 signed integers, not unsigned. This is to be consistent with
11956 outgoing selection data, which was modified to use signed integers
11957 in as part of the fix to Bug#9196 in response to Jan D.'s comment
11958 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
11959 expects long, not unsigned long.
11961 2011-09-14 Eli Zaretskii <eliz@gnu.org>
11963 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
11964 computation of loop end. Reported by Johan Bockgård
11967 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
11969 * frame.c (Fother_visible_frames_p): Function deleted.
11971 2011-09-12 Eli Zaretskii <eliz@gnu.org>
11973 * indent.c (compute_motion): Process display vector front to back
11974 rather than the other way around. (Bug#2496)
11976 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
11978 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
11980 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
11982 * minibuf.c (Fread_from_minibuffer): Doc fix.
11984 2011-09-11 Eli Zaretskii <eliz@gnu.org>
11986 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
11987 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
11989 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
11991 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
11992 value for non-existent files.
11994 2011-09-11 Eli Zaretskii <eliz@gnu.org>
11996 * fileio.c (Finsert_file_contents): If the file cannot be opened,
11997 set its "size" to -1. This will set the modtime_size field of
11998 the corresponding buffer to -1, which is what
11999 verify-visited-file-modtime expects for files that do not exist.
12002 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
12004 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
12006 * lisp.h: ... from here. push_key_description is no longer
12007 defined in keyboard.c, so its declaration should not be in
12008 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
12009 logically belongs with push_key_description.
12011 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
12013 * buffer.h: Include <sys/types.h> instead of <time.h>.
12014 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
12015 Problem reported by Herbert J. Skuhra.
12017 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
12019 * xml.c (parse_region): Make the parsing work for
12020 non-comment-starting XML files again (bug#9144).
12022 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
12024 * image.c (gif_load): Fix calculation of bottom and right corner.
12027 2011-09-10 Eli Zaretskii <eliz@gnu.org>
12029 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
12030 redisplay in small windows.
12032 2011-09-09 Eli Zaretskii <eliz@gnu.org>
12034 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
12036 2011-09-08 Martin Rudalics <rudalics@gmx.at>
12038 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
12039 Operate on live windows only.
12041 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
12043 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
12045 2011-09-07 Eli Zaretskii <eliz@gnu.org>
12047 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
12048 only under bidi iteration.
12050 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
12052 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
12054 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
12056 isnan: Fix porting problem to Solaris 10 with bundled gcc.
12057 Without this fix, the command to link temacs failed due to an
12058 undefined symbol __builtin_isnan. This is because
12059 /usr/include/iso/math_c99.h #defines isnan(x) to
12060 __builtin_isnan(x), but the bundled gcc, which identifies itself
12061 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
12063 * floatfns.c (isnan): #undef, and then #define to a clone of
12065 (Fisnan): Always define, since it's always available now.
12066 (syms_of_floatfns): Always define isnan at the Lisp level.
12068 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
12070 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
12072 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
12074 * fileio.c: Fix bugs with large file offsets (Bug#9428).
12075 The previous code assumed that file offsets (off_t values) fit in
12076 EMACS_INT variables, which is not true on typical 32-bit hosts.
12077 The code messed up by falsely reporting buffer overflow in cases
12078 such as (insert-file-contents "big" nil 1 2) into an empty buffer
12079 when "big" contains more than 2**29 bytes, even though this
12080 inserts just one byte and does not overflow the buffer.
12081 (Finsert_file_contents): Store file offsets as off_t
12082 values, not as EMACS_INT values. Check for overflow when
12083 converting between EMACS_INT and off_t. When checking for
12084 buffer overflow or for overlap, take the offsets into account.
12085 Don't use EMACS_INT for small values where int suffices.
12086 When checking for overlap, fix a typo: ZV was used where
12087 ZV_BYTE was intended.
12088 (Fwrite_region): Don't assume off_t fits into 'long'.
12089 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
12091 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
12093 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
12095 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
12097 sprintf-related integer and memory overflow issues (Bug#9412).
12099 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
12100 (esprintf, exprintf, evxprintf): New functions.
12101 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
12102 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
12103 (modify_event_symbol): Do not assume that the length of
12104 name_alist_or_stem is safe to alloca and fits in int.
12105 (Fexecute_extended_command): Likewise for function name and binding.
12106 (Frecursion_depth): Wrap around reliably on integer overflow.
12107 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
12108 since some callers pass EMACS_INT values.
12109 (Fsingle_key_description): Don't crash if symbol name contains more
12110 than MAX_ALLOCA bytes.
12111 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
12112 (get_minibuffer): Arg is now EMACS_INT, not int.
12113 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
12114 (esprintf, exprintf, evxprintf): New decls.
12115 * window.h (command_loop_level, minibuf_level): Reflect API changes.
12117 * dbusbind.c (signature_cat): New function.
12118 (xd_signature, Fdbus_register_signal):
12119 Do not overrun buffer; instead, report string overflow.
12121 * dispnew.c (add_window_display_history): Don't overrun buffer.
12122 Truncate instead; this is OK since it's just a log.
12124 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
12125 even if the time zone offset is outlandishly large.
12126 Don't mishandle offset == INT_MIN.
12128 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
12129 when creating daemon; the previous buffer-overflow check was incorrect.
12131 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
12132 which has the guts of the old verror function.
12134 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
12135 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
12137 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
12138 (font_unparse_xlfd): Don't blindly alloca long strings.
12139 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
12140 fits in int, when using sprintf. Use single snprintf to count
12141 length of string rather than counting it via multiple sprintfs;
12142 that's simpler and more reliable.
12143 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
12144 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
12145 sprintf, in case result does not fit in int.
12147 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
12148 (fontset_from_font): Print it.
12150 * frame.c (tty_frame_count): Now printmax_t, not int.
12151 (make_terminal_frame, set_term_frame_name): Print it.
12152 (x_report_frame_params): In X, window IDs are unsigned long,
12153 not signed long, so print them as unsigned.
12154 (validate_x_resource_name): Check for implausibly long names,
12155 and don't assume name length fits in 'int'.
12156 (x_get_resource_string): Don't blindly alloca invocation name;
12157 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
12160 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
12161 (xg_check_special_colors, xg_set_geometry):
12162 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
12164 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
12165 Use esprintf, not sprintf, in case result does not fit in int.
12167 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
12168 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
12169 it as a large positive number.
12170 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
12171 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
12173 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
12174 in case result does not fit in int.
12176 * print.c (float_to_string): Detect width overflow more reliably.
12177 (print_object): Make sprintf buffer a bit bigger, to avoid potential
12178 buffer overrun. Don't assume list length fits in 'int'. Treat
12179 print length of 0 as 0, not as infinity; to be consistent with other
12180 uses of print length in this function. Don't overflow print length
12181 index. Don't assume hash table size fits in 'long', or that
12182 vectorlike size fits in 'unsigned long'.
12184 * process.c (make_process): Use printmax_t, not int, to format
12185 process-name gensyms.
12187 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
12189 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
12190 to avoid potential buffer overrun.
12192 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
12193 if X resource line is longer than 512 bytes.
12195 * xfns.c (x_window): Make sprintf buffer a bit bigger
12196 to avoid potential buffer overrun.
12198 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
12200 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
12202 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
12204 Integer overflow fixes for scrolling, etc.
12205 Without these, Emacs silently mishandles large integers sometimes.
12206 For example, "C-u 4294967297 M-x recenter" was treated as if
12207 it were "C-u 1 M-x recenter" on a typical 64-bit host.
12209 * xdisp.c (try_window_id): Check Emacs fixnum range before
12210 converting to 'int'.
12212 * window.c (window_scroll_line_based, Frecenter):
12213 Check that an Emacs fixnum is in range before assigning it to 'int'.
12214 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
12215 values converted from Emacs fixnums.
12216 (Frecenter): Don't wrap around a line count if it is out of 'int'
12217 range; instead, treat it as an extreme value.
12218 (Fset_window_configuration, compare_window_configurations):
12219 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
12221 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
12222 that can exceed INT_MAX. Check that EMACS_INT value is in range
12223 before assigning it to the (possibly-narrower) index.
12224 (match_limit): Don't assume that a fixnum can fit in 'int'.
12226 * print.c (print_object): Use ptrdiff_t, not int, for index that can
12229 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
12230 (Fvertical_motion): Don't wrap around LINES values that don't fit
12231 in 'int'. Instead, treat them as extreme values. This is good
12232 enough for windows, which can't have more than INT_MAX lines anyway.
12234 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
12236 * Require libxml/parser.h to avoid compilation warning.
12238 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
12240 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
12241 since this reportedly can destroy thread storage.
12243 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
12245 * syntax.c (find_defun_start): Update all cache variables if
12246 exiting early (Bug#9401).
12248 2011-08-30 Eli Zaretskii <eliz@gnu.org>
12250 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
12252 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
12253 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
12254 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
12256 * term.c (tty_append_glyph): New function.
12257 (produce_stretch_glyph): Static function and its prototype deleted.
12259 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
12262 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
12264 * image.c (parse_image_spec): Check for nonnegative, not for positive,
12265 when checking :margin (Bug#9390).
12266 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
12267 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
12268 so that the name doesn't mislead. All uses changed.
12270 2011-08-28 Johan Bockgård <bojohan@gnu.org>
12272 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
12275 2011-08-27 Eli Zaretskii <eliz@gnu.org>
12277 * xdisp.c (move_it_to): Don't bail out early when reaching
12278 position beyond to_charpos, if we are scanning backwards.
12279 (move_it_vertically_backward): When DY == 0, make sure we get to
12280 the first character in the line after the newline.
12282 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
12284 * ccl.c: Improve and simplify overflow checking (Bug#9196).
12285 (ccl_driver): Do not generate an out-of-range pointer.
12286 (Fccl_execute_on_string): Remove unnecessary check for
12287 integer overflow, noted by Stefan Monnier in
12288 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
12289 Remove a FIXME that didn't need fixing.
12290 Simplify the newly-introduced buffer reallocation code.
12292 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
12294 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
12296 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
12298 Integer and memory overflow issues (Bug#9196).
12300 * doc.c (get_doc_string): Rework so that
12301 get_doc_string_buffer_size is the actual buffer size, rather than
12302 being 1 less than the actual buffer size; this makes xpalloc more
12305 * image.c (x_allocate_bitmap_record, cache_image):
12306 * xselect.c (Fx_register_dnd_atom):
12307 Simplify previous changes by using xpalloc.
12309 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
12310 since either will do and ptrdiff_t is convenient with xpalloc.
12312 * charset.c (charset_table_size)
12313 (struct charset_sort_data.priority): Now ptrdiff_t.
12314 (charset_compare): Don't overflow if priorities differ greatly.
12315 (Fsort_charsets): Don't assume list length fits in int.
12316 Check for size-calculation overflow when allocating sort data.
12317 (syms_of_charset): Allocate an initial charset table that is
12318 just under 64 KiB, to avoid problems with glibc malloc and mmap.
12320 * cmds.c (internal_self_insert): Check for size-calculation overflow.
12322 * composite.h (struct composition.glyph_len): Now int, not unsigned.
12323 The actual value is always <= INT_MAX, and leaving it unsigned made
12324 overflow checking harder.
12326 * dispextern.h (struct glyph_matrix.rows_allocated)
12327 (struct face_cache.size): Now ptrdiff_t, for convenience in use
12328 with xpalloc. The values are still always <= INT_MAX.
12330 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
12332 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
12333 (SAFE_NALLOCA): New macro.
12335 * region-cache.c (struct boundary.pos, find_cache_boundary)
12336 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
12337 (set_cache_region, invalidate_region_cache)
12338 (revalidate_region_cache, know_region_cache, region_cache_forward)
12339 (region_cache_backward, pp_cache):
12340 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
12341 so that ptrdiff_t * can be passed to xpalloc.
12342 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
12343 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
12344 (pp_cache): Don't assume cache_len fits in int.
12345 * region-cache.h: Adjust extern decls to match.
12347 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
12348 EMACS_INT, since either will do, for xpalloc.
12350 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
12351 (xnmalloc, xnrealloc, xpalloc): New functions.
12353 * bidi.c (bidi_shelve_header_size): New constant.
12354 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
12355 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
12357 * bidi.c (bidi_cache_shrink):
12358 * buffer.c (overlays_at, overlays_in, record_overlay_string)
12360 Don't update size of array until after memory allocation succeeds,
12361 because xmalloc/xrealloc may not return.
12362 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
12363 now that we have proper integer overflow checking.
12364 (record_overlay_string, overlay_strings): Catch overflows when
12365 calculating size of overlay_str_buf.
12367 * callproc.c (Fcall_process): Check for size overflow when
12368 calculating size of args2.
12369 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
12370 Normally we prefer signed values, but sticking with ptrdiff_t would
12371 require adding more-complicated checks.
12373 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
12374 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
12375 Redo buffer-overflow calculations to avoid integer overflow.
12376 Add a FIXME comment where memory seems to be over-allocated.
12378 * character.c (Fstring): Check for size-calculation overflow.
12380 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
12381 unnecessary integer overflow. Check for size overflow.
12382 (encode_coding_object): Don't update size until xmalloc succeeds.
12384 * composite.c (get_composition_id): Check for overflow in glyph
12385 length calculations.
12387 Integer and memory overflow fixes for display code.
12388 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
12389 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
12390 (scrolling_window): Check for overflow in size calculations.
12391 (line_draw_cost, realloc_glyph_pool, add_row_entry):
12392 Don't assume glyph table len fits in int.
12393 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
12394 (row_table_size): Now ptrdiff_t, not int.
12395 (scrolling_window): Avoid overflow in size calculations.
12396 Don't update size until allocation succeeds.
12397 * fns.c (concat): Check for overflow in size calculations.
12398 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
12399 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12400 (NEXT_ALMOST_PRIME_LIMIT): New constant.
12402 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
12403 (get_doc_string): Check for size calculation overflow.
12404 Don't update size until allocation succeeds.
12405 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
12406 EMACS_INT, where ptrdiff_t will do.
12407 (Fsubstitute_command_keys): Check for string overflow.
12409 * editfns.c (set_time_zone_rule): Don't assume environment length
12411 (message_length): Now ptrdiff_t, not int.
12412 (Fmessage_box): Don't update size until allocation succeeds.
12413 Don't assume message length fits in int.
12414 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
12416 * emacs.c (main): Do not reallocate argv, since there is a null at
12417 the end that can be overwritten, and this way there's no need to
12418 worry about size-calculation overflow.
12419 (sort_args): Check for size-calculation overflow.
12421 * eval.c (init_eval_once, grow_specpdl): Don't update size until
12423 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
12425 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
12426 (x_set_scroll_bar_width, x_figure_window_size):
12427 Check for integer overflow.
12428 (x_set_alpha): Do not assume XINT fits in int.
12430 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
12431 This is for the members text_lines, text_cols, total_lines, total_cols,
12432 where the system imposes an 'int' limit.
12434 * fringe.c (Fdefine_fringe_bitmap):
12435 Don't update size until alloc works.
12437 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
12438 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
12440 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
12441 Check for size-calculation overflow.
12442 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
12443 do, as we prefer signed integers.
12444 (id_to_widget.max_size, id_to_widget.used)
12445 (xg_store_widget_in_map, xg_remove_widget_from_map)
12446 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
12447 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
12448 Use and return ptrdiff_t, not int.
12449 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
12450 * gtkutil.h: Change prototypes to match the above.
12452 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
12453 are duplicate now that they've been promoted to lisp.h.
12454 (x_allocate_bitmap_record, x_alloc_image_color)
12455 (make_image_cache, cache_image, xpm_load):
12456 Don't update size until alloc is done.
12457 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
12459 Check for size calculation overflow.
12460 (ct_colors_allocated_max): New constant.
12461 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
12464 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
12465 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
12466 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
12467 Use ptrdiff_t, not int, to count maps.
12468 (read_char_minibuf_menu_prompt): Check for overflow in size
12469 calculations. Don't update size until allocation succeeds.
12470 Redo calculations to avoid overflow.
12471 * keyboard.h: Change prototypes to match the above.
12473 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
12475 (current_minor_maps): Check for size calculation overflow.
12476 * keymap.h: Change prototypes to match the above.
12478 * lread.c (read1, init_obarray): Don't update size until alloc done.
12480 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
12481 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
12483 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
12484 Now ptrdiff_t, not int.
12485 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
12486 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
12488 * process.c (Fnetwork_interface_list): Check for overflow
12489 in size calculation.
12491 * region-cache.c (move_cache_gap): Check for size calculation overflow.
12493 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
12494 overflow. Don't bother calling xmalloc when xrealloc will do.
12496 * search.c (Freplace_match): Check for size calculation overflow.
12497 (Fset_match_data): Don't assume list lengths fit in 'int'.
12499 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
12500 for command line length. Do not attempt to address one before the
12501 beginning of an array, as that's not portable.
12503 * term.c (max_frame_lines): Remove; unused.
12504 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
12506 (encode_terminal_code, calculate_costs): Check for size
12507 calculation overflow.
12508 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
12509 table lengths and related sizes. Don't update size until alloc
12510 done. Redo calculations to avoid overflow.
12511 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
12513 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
12514 subtracting pointers.
12515 (gobble_line): Check for overflow more carefully. Don't update size
12518 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
12519 Don't update size until alloc done.
12520 Redo size calculations to avoid overflow.
12521 Check for size calculation overflow.
12522 (main) [DEBUG]: Fix typo in invoking tparam1.
12524 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
12525 Use ptrdiff_t, not int, for sizes.
12526 (store_mode_line_noprop_char): Don't update size until alloc done.
12528 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
12529 Use ptrdiff_t, not int, for sizes.
12530 (Finternal_make_lisp_face, cache_face):
12531 Check for size calculation overflow.
12532 (cache_face): Treat size calculation overflows as if they were
12533 memory exhaustion (the usual treatment), rather than aborting.
12535 * xfns.c (x_encode_text, x_set_name_internal)
12536 (Fx_change_window_property): Use ptrdiff_t, not int, to count
12537 sizes, since they can exceed INT_MAX in size. Check for size
12538 calculation overflow.
12540 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
12541 (xg_select): Check for size calculation overflow.
12542 Don't update size until alloc done.
12544 * xrdb.c (get_environ_db): Don't assume path length fits in int,
12545 as sprintf is limited to int lengths.
12547 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
12548 (X_LONG_MIN): New macros.
12549 Use them to make the following changes clearer.
12550 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
12551 This change doesn't affect the value now, but it may help remind
12552 future maintainers not to raise the value too much later.
12553 (SELECTION_QUANTUM): Remove, replacing with ...
12554 (selection_quantum): ... new function, which avoids overflow.
12556 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
12557 assumption that selection length fits in 'int'.
12558 (x_reply_selection_request, x_handle_selection_request)
12559 (x_get_window_property, receive_incremental_selection)
12560 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
12561 (lisp_data_to_selection_data, clean_local_selection_data):
12562 Use ptrdiff_t, not int, to record length of selection.
12563 (x_reply_selection_request, x_get_window_property)
12564 (receive_incremental_selection, x_property_data_to_lisp):
12565 Redo calculations to avoid overflow.
12566 (x_reply_selection_request): When sending hint, ceiling it at
12567 X_LONG_MAX rather than relying on wraparound overflow to send
12569 (x_get_window_property, receive_incremental_selection)
12570 (lisp_data_to_selection_data, x_property_data_to_lisp):
12571 Check for size-calculation overflow.
12572 (x_get_window_property, receive_incremental_selection)
12573 (lisp_data_to_selection_data, Fx_register_dnd_atom):
12574 Don't store size until memory allocation succeeds.
12575 (x_get_window_property): Plug memory leak on memory exhaustion.
12576 Don't double-block input; malloc is safe here. Don't assume 2**34
12577 - 4 fits in unsigned long. Add an xassert to check
12578 XGetWindowProperty overflow. Be more careful about overflow
12579 calculations, and distinguish size from memory overflow better.
12580 (receive_incremental_selection): When tracing, don't assume
12581 unsigned int is less than INT_MAX.
12582 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
12583 harmful) conversions of unsigned short to int.
12584 (lisp_data_to_selection_data): Don't assume that integers
12585 in the range -65535 through -1 fit in an X unsigned short.
12586 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
12587 result parameters unless successful. Rely on cons_to_unsigned
12588 to report problems with elements; the old code wasn't right anyway.
12589 (x_check_property_data): Check for int overflow; we cannot use
12590 a wider type due to X limits.
12591 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
12593 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
12595 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
12596 (x_term_init): Check for size calculation overflow.
12597 (x_color_cells): Don't store size until memory allocation succeeds.
12598 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
12599 Don't assume alloca size is less than MAX_ALLOCA.
12600 (x_term_init): Don't assume length fits in int (sprintf is limited
12603 Use ptrdiff_t for composition IDs.
12604 * character.c (lisp_string_width):
12605 * composite.c (composition_table_size, n_compositions)
12606 (get_composition_id, composition_gstring_from_id):
12607 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
12608 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
12609 * window.c (Frecenter):
12610 Use ptrdiff_t, not int, for composition IDs.
12611 * composite.c (get_composition_id): Check for integer overflow.
12612 * composite.h: Adjust prototypes to match the above changes.
12614 Use ptrdiff_t for hash table indexes.
12615 * category.c (hash_get_category_set):
12616 * ccl.c (ccl_driver):
12617 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
12618 * coding.c (coding_system_charset_list, detect_coding_system):
12619 * coding.h (struct coding_system.id):
12620 * composite.c (get_composition_id, gstring_lookup_cache):
12621 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
12622 * image.c (xpm_get_color_table_h):
12623 * lisp.h (hash_lookup, hash_put):
12624 * minibuf.c (Ftest_completion):
12625 Use ptrdiff_t for hash table indexes, not int (which is too
12626 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
12627 32-bit --with-wide-int hosts).
12629 * charset.c (Fdefine_charset_internal): Check for integer overflow.
12630 Add a FIXME comment about memory leaks.
12631 (syms_of_charset): Don't assume xmalloc returns.
12633 Don't assume that stated character widths fit in int.
12634 * character.c (Fchar_width, c_string_width, lisp_string_width):
12635 * character.h (CHAR_WIDTH):
12636 * indent.c (MULTIBYTE_BYTES_WIDTH):
12637 Use sanitize_char_width to avoid undefined and/or bad behavior
12638 with outlandish widths.
12639 * character.h (sanitize_tab_width): Rename from sanitize_width,
12640 now that we have two such functions. All uses changed.
12641 (sanitize_char_width): New inline function.
12643 Don't assume that tab-width fits in int.
12644 * character.h (sanitize_width): New inline function.
12645 (SANE_TAB_WIDTH): New macro.
12646 (ASCII_CHAR_WIDTH): Use it.
12647 * indent.c (sane_tab_width): Remove. All uses replaced by
12648 SANE_TAB_WIDTH (current_buffer).
12649 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
12651 * fileio.c: Integer overflow issues with file modes.
12652 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
12654 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
12655 Remove unreachable code.
12656 (read_hex, load_charset_map_from_file): Check for integer overflow.
12658 * xterm.c: Don't go over XClientMessageEvent limit.
12659 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
12660 (x_send_scroll_bar_event): Likewise. Check that the size does not
12661 exceed limits imposed by XClientMessageEvent, as well as the usual
12662 ptrdiff_t and size_t limits.
12664 * keyboard.c: Overflow, signedness and related fixes.
12665 (make_lispy_movement): Use same integer type in forward decl
12666 that is used in the definition.
12667 (read_key_sequence, keyremap_step):
12668 Change bufsize argument back to int, undoing my 2011-03-30 change.
12669 We prefer signed types, and int is wide enough here.
12670 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
12671 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
12672 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
12673 length, not size_t. Use ptrdiff_t for index, not int.
12674 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
12675 possibility of integer overflow.
12677 Overflow, signedness and related fixes for images.
12679 * dispextern.h (struct it.stack[0].u.image.image_id)
12680 (struct_it.image_id, struct image.id, struct image_cache.size)
12681 (struct image_cache.used, struct image_cache.ref_count):
12682 * gtkutil.c (update_frame_tool_bar):
12683 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
12684 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
12685 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
12686 * nsmenu.m (update_frame_tool_bar):
12687 * xdisp.c (calc_pixel_width_or_height):
12688 * xfns.c (image_cache_refcount):
12689 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
12690 on typical 64-bit hosts.
12692 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12693 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
12694 Omit unnecessary casts to int.
12695 (parse_image_spec): Check that integers fall into 'int' range
12696 when the callers expect that.
12697 (image_ascent): Redo ascent calculation to avoid int overflow.
12698 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
12699 (lookup_image): Remove unnecessary tests.
12700 (xbm_image_p): Locals are now of int, not EMACS_INT,
12701 since parse_image_check makes sure they fit into int.
12702 (png_load, gif_load, svg_load_image):
12703 Prefer int to unsigned where either will do.
12704 (tiff_handler): New function, combining the cores of the
12705 old tiff_error_handler and tiff_warning_handler.
12706 This function is rewritten to use vsnprintf and thereby avoid
12707 stack buffer overflows. It uses only the features of vsnprintf
12708 that are common to both POSIX and native Microsoft.
12709 (tiff_error_handler, tiff_warning_handler): Use it.
12710 (tiff_load, gif_load, imagemagick_load_image):
12711 Don't assume :index value fits in 'int'.
12712 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
12713 (imagemagick_load_image): Check that crop parameters fit into
12714 the integer types that MagickCropImage accepts. Don't assume
12715 Vimagemagick_render_type has a nonnegative value. Don't assume
12716 size_t fits in 'long'.
12717 (gs_load): Use printmax_t to print the widest integers possible.
12718 Check for integer overflow when computing image height and width.
12720 2011-08-26 Eli Zaretskii <eliz@gnu.org>
12722 * xdisp.c (redisplay_window): Don't force window start if point
12723 will be invisible in the resulting window. (Bug#9324)
12725 2011-08-25 Eli Zaretskii <eliz@gnu.org>
12727 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
12728 the display spec is of the form `(space ...)'.
12729 (handle_display_spec): Return the value returned by
12730 handle_single_display_spec, not just 1 or zero.
12731 (handle_single_display_spec): If the display spec is of the form
12732 `(space ...)', and specifies display in the text area, return 2
12734 (try_cursor_movement): Check for the need to scroll more
12735 accurately, and prefer exact match for point under bidi.
12736 Don't advance `row' beyond the last row of the window.
12738 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
12739 into disp_prop; all users changed.
12741 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
12742 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
12743 for the text covered by the display property.
12745 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
12747 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
12748 Change return value to nil.
12749 (Frecord_buffer): Delete unused function.
12751 2011-08-24 Eli Zaretskii <eliz@gnu.org>
12753 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
12754 buffers, return left-to-right.
12755 (set_cursor_from_row): Consider candidate row a win if its glyph
12756 represents a newline and point is on that newline. Fixes cursor
12757 positioning on the newline at EOL of R2L text within L2R
12758 paragraph, and vice versa.
12759 (try_cursor_movement): Check continued rows, in addition to
12760 continuation rows. Fixes unwarranted scroll when point enters a
12761 continued line of R2L text within an L2R paragraph, or vice versa.
12762 (cursor_row_p): Consider the case of point being equal to
12763 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
12764 from the end of a short line to the beginning of a continued line
12765 of R2L text within L2R paragraph.
12766 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
12767 composed characters.
12769 * bidi.c (bidi_check_type): Use xassert.
12770 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
12773 2011-08-23 Eli Zaretskii <eliz@gnu.org>
12775 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
12778 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
12780 * nsfont.m (ns_otf_to_script): Fix typo.
12782 2011-08-22 Kenichi Handa <handa@m17n.org>
12784 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
12785 extra slot even if the purpose is char-code-property-table.
12787 2011-08-23 Eli Zaretskii <eliz@gnu.org>
12789 * xdisp.c (redisplay_window): When computing centering_position,
12790 account for the height of the header line. (Bug#8874)
12792 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
12793 instead of CHAR_TO_BYTE. Fixes a crash when a completion
12794 candidate is selected by the mouse, and that candidate has a
12795 composed character under the mouse.
12797 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
12798 coordinates reported by pos-visible-in-window-p for a composed
12799 character in column zero.
12801 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
12803 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
12805 2011-08-22 Eli Zaretskii <eliz@gnu.org>
12807 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
12808 consider it a hit if to_charpos is anywhere in the range of the
12809 composed buffer positions.
12811 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
12813 * image.c (gif_load): Don't assume that each subimage has the same
12814 dimensions as the base image. Handle disposal method that is
12815 "undefined" by the gif spec (Bug#9335).
12817 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
12819 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
12820 (Fcondition_case): Document `debug' symbol in error handler.
12822 2011-08-19 Eli Zaretskii <eliz@gnu.org>
12824 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
12825 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
12826 from an Org mode buffer to a Speedbar frame.
12828 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
12829 a composition, take its buffer position from IT->cmp_it.charpos.
12830 Fixes cursor positioning at the beginning of a line that begins
12831 with a composed character.
12833 2011-08-18 Eli Zaretskii <eliz@gnu.org>
12835 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
12836 character bidirectional type, use STRONG_L instead. Fixes crashes
12837 in a buffer produced by `describe-categories'.
12839 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
12840 members before the level stack, so they would be saved and
12841 restored when copying iterator state. Fixes incorrect reordering
12842 around TABs covered by display properties.
12844 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
12846 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
12848 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
12850 * eval.c (internal_condition_case, internal_condition_case_1)
12851 (internal_condition_case_2, internal_condition_case_n):
12852 Remove unnecessary aborts (Bug#9081).
12854 2011-08-17 Eli Zaretskii <eliz@gnu.org>
12856 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
12857 has no `load' handler, try opening the file locally. (Bug#9311)
12859 2011-08-16 Ken Brown <kbrown@cornell.edu>
12861 * gmalloc.c: Expand comment.
12863 2011-08-16 Eli Zaretskii <eliz@gnu.org>
12865 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
12866 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
12868 2011-08-16 Ken Brown <kbrown@cornell.edu>
12870 Fix memory allocation problems in Cygwin build (Bug#9273).
12872 * unexcw.c ( __malloc_initialized): Declare external variable.
12873 (fixup_executable): Force the dumped emacs to reinitialize malloc.
12875 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
12877 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
12879 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
12880 in the static heap.
12881 [CYGWIN] (special_realloc): New function.
12882 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
12883 requests to realloc storage in the static heap.
12885 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
12887 * bidi.c (bidi_initialize): Remove unused local.
12889 2011-08-15 Eli Zaretskii <eliz@gnu.org>
12892 * biditype.h: Remove file.
12893 * makefile.w32-in ($(BLD)/bidi.$(O)):
12894 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
12896 * dispextern.h: Fix a typo in the comment to bidi_type_t.
12898 * chartab.c: Improve commentary for the uniprop_table API.
12900 * bidi.c (bidi_paragraph_init): Support zero value of
12901 bidi_ignore_explicit_marks_for_paragraph_level.
12902 (bidi_initialize): Use uniprop_table instead of including
12903 biditype.h and bidimirror.h.
12905 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
12906 coordinates of the iterator when restoring from ppos_it.
12909 2011-08-14 Kenichi Handa <handa@m17n.org>
12911 * process.c (create_process): Call setup_process_coding_systems
12912 after the pid of the process is set to -1 (Bug#8162).
12914 2011-08-14 Eli Zaretskii <eliz@gnu.org>
12916 * xdisp.c (move_it_in_display_line_to): Don't invoke
12917 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
12918 ppos_it. Fixes vertical cursor motion when line beginning is
12919 covered by an image. (Bug#9296)
12921 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
12923 * nsterm.h (ns_run_ascript): Declare.
12924 (NSAPP_DATA2_RUNASSCRIPT): Define.
12926 * nsfns.m (as_script, as_result, as_status): New static variables.
12927 (ns_run_ascript): New function.
12928 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
12929 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
12930 the event loop. Get status from as_status (Bug#7276).
12932 * nsterm.m (sendEvent): If event is NSApplicationDefined and
12933 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
12934 the event loop (Bug#7276).
12936 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
12938 * gnutls.c (QCgnutls_bootprop_priority)
12939 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
12940 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
12941 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
12942 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
12943 (QCgnutls_bootprop_verify_hostname_error)
12944 (QCgnutls_bootprop_callbacks_verify): Rename from
12945 Qgnutls_bootprop_..., all uses changed.
12947 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
12950 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
12952 * xfaces.c (Qframe_set_background_mode): Now static.
12953 * dispextern.h (Qframe_set_background_mode): Remove decl.
12955 * process.c (Fnetwork_interface_info): Declare local only if needed.
12957 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
12959 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
12960 (Fnetwork_interface_list): Allocate in increments of bytes instead
12961 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
12962 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
12964 (struct ifflag_def): notrailers is smart on OSX.
12965 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
12966 Get hardware address with getifaddrs if available.
12968 2011-08-12 Eli Zaretskii <eliz@gnu.org>
12970 * xdisp.c (iterate_out_of_display_property): xassert that
12971 IT->position is set to within IT->object's boundaries. Break from
12972 the loop as soon as EOB is reached; avoids infloops in redisplay
12973 when IT->position is set up wrongly due to some bug.
12974 Set IT->current to match the bidi iterator unconditionally.
12975 (push_display_prop): Allow GET_FROM_STRING as IT->method on
12976 entry. Force push_it to save on the stack the current
12977 buffer/string position, to be restored by pop_it. Fix flags in
12978 the iterator structure wrt the object coming from a display
12979 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
12980 properties. (Bug#9284)
12982 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
12984 * fontset.c (fontset_get_font_group): Add proper type checks.
12987 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12989 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
12990 and LC_VERSION_MIN_MACOSX.
12991 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
12992 (dump_it) [LC_FUNCTION_STARTS]: Use it.
12994 2011-08-08 Eli Zaretskii <eliz@gnu.org>
12996 * xdisp.c (forward_to_next_line_start): Allow to use the
12997 no-display-properties-and-no-overlays under bidi display.
12998 Set disp_pos in the bidi iterator to avoid searches for display
12999 properties and overlays.
13001 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
13003 * editfns.c (Fset_time_zone_rule): Document relationship with the
13006 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
13007 the font entity extracted from the cache (Bug#8109).
13009 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
13011 * composite.c (autocmp_chars): Don't reset point. That is done by
13012 restore_point_unwind (Bug#5984).
13014 2011-08-07 Juri Linkov <juri@jurta.org>
13016 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
13017 to show the arg `TIME' instead of `TIMEVAL'.
13019 2011-08-06 Eli Zaretskii <eliz@gnu.org>
13021 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
13022 display property strides EOL and includes a newline, as in
13023 longlines-mode. (Bug#9254)
13024 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
13025 word-wrap under bidirectional display. (Bug#9224)
13027 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
13028 is non-zero, even if the data buffer is NULL. Fixes a crash in
13029 vertical-motion with longlines-mode. (Bug#9254)
13031 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13033 * bidi.c <bidi_cache_total_alloc>: Now static.
13034 (bidi_initialize): Initialize bidi_cache_total_alloc.
13036 * xdisp.c (display_line): Release buffer allocated for shelved bidi
13039 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
13040 amount allocated this far in `bidi_cache_total_alloc'.
13041 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
13042 non-zero, only free the data buffer without restoring the cache
13043 contents. All callers changed.
13045 * dispextern.h (bidi_unshelve_cache): Update prototype.
13047 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
13048 (move_it_in_display_line, move_it_to)
13049 (move_it_vertically_backward, move_it_by_lines): Replace the call
13050 to xfree to an equivalent call to bidi_unshelve_cache.
13051 (move_it_in_display_line_to): Fix logic of returning
13052 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
13054 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13056 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
13057 came from a string character with a `cursor' property. (Bug#9229)
13059 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
13061 * Makefile.in (LIB_PTHREAD): New variable.
13062 (LIBES): Add LIB_PTHREAD (Bug#9216).
13064 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
13065 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
13067 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
13069 * regex.c (re_iswctype): Remove some redundant boolean conversions.
13071 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
13073 * xterm.c (x_find_topmost_parent): New function.
13074 (x_set_frame_alpha): Find topmost parent window with
13075 x_find_topmost_parent and set the property there also (bug#9181).
13076 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
13078 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
13080 * callproc.c (Fcall_process): Avoid vfork clobbering
13081 the local vars buffer, coding_systems, current_dir.
13083 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
13085 * keymap.c (Fmake_composed_keymap): Move to subr.el.
13087 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
13089 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
13090 so that it is not optimized away.
13092 * xdisp.c (compute_display_string_pos): Remove unused local.
13094 2011-08-02 Eli Zaretskii <eliz@gnu.org>
13096 Fix slow cursor motion and scrolling in large buffers with
13097 selective display, like Org Mode buffers. (Bug#9218)
13099 * dispextern.h (struct bidi_it): New member disp_prop_p.
13101 * xdisp.c: Remove one-slot cache of display string positions.
13102 (compute_display_string_pos): Accept an additional argument
13103 DISP_PROP_P; callers changed. Scan at most 5K characters forward
13104 for a display string or property. If found, set DISP_PROP_P
13107 * bidi.c (bidi_fetch_char): Accept an additional argument
13108 DISP_PROP_P, and pass it to compute_display_string_pos.
13109 Only handle text covered by a display string if DISP_PROP_P is returned
13110 non-zero. All callers of bidi_fetch_char changed.
13112 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
13114 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
13116 2010-12-03 Don March <don@ohspite.net>
13118 * keymap.c (Fdefine_key): Fix non-prefix key error message when
13119 last character M-[char] is translated to ESC [char] (bug#7541).
13121 2011-08-02 Kenichi Handa <handa@m17n.org>
13123 * lisp.h (uniprop_table): Extern it.
13125 * chartab.c (uniprop_table): Make it non-static.
13127 2011-08-01 Eli Zaretskii <eliz@gnu.org>
13129 * xdisp.c (forward_to_next_line_start): Accept additional argument
13130 BIDI_IT_PREV, and store into it the state of the bidi iterator had
13132 (reseat_at_next_visible_line_start): Use the bidi iterator state
13133 returned by forward_to_next_line_start to restore the state of
13134 it->bidi_it after backing up to previous newline. (Bug#9212)
13136 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
13138 * regex.c (re_comp): Protoize.
13139 (re_exec): Fix return type.
13140 (regexec): Fix type of `ret'. (Bug#9203)
13142 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13144 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
13145 This is needed if max-image-size is a floating-point number.
13147 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
13149 * print.c (print_object): Print empty symbol as ##.
13151 * lread.c (read1): Read ## as empty symbol.
13153 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
13155 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
13156 setting frame foreground color (Bug#9175).
13157 (x_set_background_color): Likewise.
13159 * nsmenu.m (-setText): Size tooltip dimensions precisely to
13160 contents (Bug#9176).
13161 (EmacsTooltip -init): Remove bezels and add shadows to
13164 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
13165 or scroll bar (Bug#8470).
13167 * nsfont.m (nsfont_open): Remove assignment to voffset and
13168 unnecessary vars hshink, expand, hd, full_height, min_height.
13169 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
13171 * nsterm.h (nsfont_info): Remove voffset field.
13173 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
13175 Implement strike-through and overline on NextStep (Bug#8863).
13177 * nsfont.m (nsfont_open): Use underline position provided by font,
13178 instead of hard-coded value of 2.
13179 (nsfont_draw): Call ns_draw_text_decoration instead.
13181 * nsterm.h: Add declaration for ns_draw_text_decoration.
13183 * nsterm.m (ns_draw_text_decoration): New function for drawing
13184 underline, overline, and strike-through.
13185 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
13186 ns_draw_text_decoration. Change treatment of cursor drawing to
13187 accommodate underlining, etc.
13189 2011-07-28 Eli Zaretskii <eliz@gnu.org>
13191 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
13194 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13196 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
13197 Without this fix, if a signal arrives just after memory fills up,
13198 'malloc' might be invoked reentrantly.
13200 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
13201 In other words, assume that every image size is allowed, on non-X
13202 hosts. This assumption is probably wrong, but it lets Emacs compile.
13204 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
13206 * regex.c (re_iswctype): Convert return values to boolean.
13208 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
13210 * xdisp.c (compute_display_string_pos): Don't use cached display
13211 string position if the buffer had its restriction changed.
13214 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13216 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
13218 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13220 Integer signedness and overflow and related fixes. (Bug#9079)
13222 * bidi.c: Integer size and overflow fixes.
13223 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
13224 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
13225 (bidi_cache_find_level_change, bidi_cache_ensure_space)
13226 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
13227 (bidi_find_other_level_edge):
13228 Use ptrdiff_t instead of EMACS_INT where either will do.
13229 This works better on 32-bit hosts configured --with-wide-int.
13230 (bidi_cache_ensure_space): Check for size-calculation overflow.
13231 Use % rather than repeated addition, for better worst-case speed.
13232 Don't set bidi_cache_size until after xrealloc returns, because it
13234 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
13235 (bidi_cache_ensure_space): Also check that the bidi cache size
13236 does not exceed that of the largest Lisp string or buffer. See Eli
13237 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
13239 * alloc.c (__malloc_size_t): Remove.
13240 All uses replaced by size_t. See Andreas Schwab's note
13241 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
13243 * image.c: Improve checking for integer overflow.
13244 (check_image_size): Assume that f is nonnull, since
13245 it is always nonnull in practice. This is one less thing to
13246 worry about when checking for integer overflow later.
13247 (x_check_image_size): New function, which checks for integer
13248 overflow issues inside X.
13249 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
13250 This removes the need for a memory_full check.
13251 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
13252 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
13253 (xbm_read_bitmap_data): Change locals back to 'int', since
13254 their values must fit in 'int'.
13255 (xpm_load_image, png_load, tiff_load):
13256 Invoke x_create_x_image_and_pixmap earlier,
13257 to avoid much needless work if the image is too large.
13258 (tiff_load): Treat overly large images as if
13259 x_create_x_image_and_pixmap failed, not as malloc failures.
13260 (gs_load): Use x_check_image_size.
13262 * gtkutil.c: Omit integer casts.
13263 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
13264 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
13266 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
13268 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
13269 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
13270 would wrongly return t on a 64-bit host.
13272 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
13273 The plain *_OVERFLOW macros run afoul of GCC bug 49705
13274 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
13275 and therefore cause GCC to emit a bogus diagnostic in some cases.
13277 * image.c: Integer signedness and overflow and related fixes.
13278 This is not an exhaustive set of fixes, but it's time to
13279 record what I've got.
13280 (lookup_pixel_color, check_image_size): Remove redundant decls.
13281 (check_image_size): Don't assume that arbitrary EMACS_INT values
13282 fit in 'int', or that arbitrary 'double' values fit in 'int'.
13283 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
13284 (tiff_load, imagemagick_load_image):
13285 Check for overflow in size calculations.
13286 (x_create_x_image_and_pixmap): Remove unnecessary test for
13287 xmalloc returning NULL; that can't happen.
13288 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
13289 (xpm_color_bucket): Use better integer hashing function.
13290 (xpm_cache_color): Don't possibly over-allocate memory.
13291 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
13292 (gif_memory_source):
13293 Use ptrdiff_t, not int or size_t, to record sizes.
13294 (png_load): Don't assume values greater than 2**31 fit in 'int'.
13295 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
13296 either works, as we prefer signed integers.
13297 (tiff_read_from_memory, tiff_write_from_memory):
13298 Return tsize_t, not size_t, since that's what the TIFF API wants.
13299 (tiff_read_from_memory): Don't fail simply because the read would
13300 go past EOF; instead, return a short read.
13301 (tiff_load): Omit no-longer-needed casts.
13302 (Fimagemagick_types): Don't assume size fits into 'int'.
13304 Improve hashing quality when configured --with-wide-int.
13305 * fns.c (hash_string): New function, taken from sxhash_string.
13306 Do not discard information about ASCII character case; this
13307 discarding is no longer needed.
13308 (sxhash-string): Use it. Change sig to match it. Caller changed.
13309 * lisp.h: Declare it.
13310 * lread.c (hash_string): Remove, since we now use fns.c's version.
13311 The fns.c version returns a wider integer if --with-wide-int is
13312 specified, so this should help the quality of the hashing a bit.
13314 * emacs.c: Integer overflow minor fix.
13315 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
13316 Define only if GNU_LINUX.
13317 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
13319 * dispnew.c: Integer signedness and overflow fixes.
13320 Remove unnecessary forward decls, that were a maintenance hassle.
13321 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
13323 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
13324 (scrolling_window): Use ptrdiff_t, not int, for byte count.
13325 (prepare_desired_row, line_draw_cost):
13326 Use int, not unsigned, where either works.
13327 (save_current_matrix, restore_current_matrix):
13328 Use ptrdiff_t, not size_t, where either works.
13329 (init_display): Check for overflow more accurately, and without
13330 relying on undefined behavior.
13332 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
13333 Remove, replacing with the new symbols in lisp.h. All uses changed.
13334 * fileio.c (make_temp_name):
13335 * filelock.c (lock_file_1, lock_file):
13336 * xdisp.c (message_dolog):
13337 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
13338 Use pMd etc. instead.
13339 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
13340 replacing the pWIDE etc. symbols removed from editfns.c.
13342 * keyboard.h (num_input_events): Now uintmax_t.
13343 This is (very slightly) less likely to mess up due to wraparound.
13346 * buffer.c: Integer signedness fixes.
13347 (alloc_buffer_text, enlarge_buffer_text):
13348 Use ptrdiff_t rather than size_t when either will do, as we prefer
13351 * alloc.c: Integer signedness and overflow fixes.
13352 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
13353 (__malloc_size_t): Default to size_t, not to int.
13354 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
13355 (Fgarbage_collect, mark_object_loop_halt, mark_object):
13356 Prefer ptrdiff_t to size_t when either would do, as we prefer
13358 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
13359 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
13360 Now const. Initialize with values that are in range even if char
13362 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
13363 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
13364 These functions do the right thing with sizes > 2**32.
13365 (check_depth): Now ptrdiff_t, not int.
13366 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
13367 Adjust to new way of storing sizes. Check for size overflow bugs
13369 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
13370 slightly wrong anyway, as it missed one instance of
13371 XMALLOC_OVERRUN_CHECK_OVERHEAD.
13372 (refill_memory_reserve): Omit needless cast to size_t.
13373 (mark_object_loop_halt): Mark as externally visible.
13375 * xselect.c: Integer signedness and overflow fixes.
13376 (Fx_register_dnd_atom, x_handle_dnd_message):
13377 Use ptrdiff_t, not size_t, since we prefer signed.
13378 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
13379 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
13380 x_dnd_atoms_size and x_dnd_atoms_length.
13382 * doprnt.c: Prefer signed to unsigned when either works.
13384 * doprnt.c (doprnt):
13386 * xdisp.c (vmessage):
13387 Use ptrdiff_t, not size_t, when using or implementing doprnt,
13388 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
13389 prefer signed arithmetic to avoid comparison confusion.
13390 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
13391 but is a bit tricky.
13393 Assume freestanding C89 headers, string.h, stdlib.h.
13394 * data.c, doprnt.c, floatfns.c, print.c:
13395 Include float.h unconditionally.
13396 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
13397 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
13398 * regex.c: Likewise for stddef.h, string.h.
13399 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
13400 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
13401 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
13402 (STDC_HEADERS): Remove obsolete defines.
13403 * sysdep.c: Include limits.h unconditionally.
13405 Assume support for memcmp, memcpy, memmove, memset.
13406 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
13407 * regex.c (memcmp, memcpy):
13408 Remove; we assume C89 now.
13410 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
13411 (__malloc_safe_bcopy): Remove; no longer needed.
13413 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
13414 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
13415 well either way, and we prefer signed to unsigned.
13417 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
13419 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
13420 closes the connection while we're reading (bug#9182).
13422 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
13424 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
13425 are specified (Bug#9168).
13427 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
13429 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
13430 Found by GCC static checking and --with-wide-int on a 32-bit host.
13432 2011-07-25 Eli Zaretskii <eliz@gnu.org>
13434 * xdisp.c (compute_display_string_pos): Fix logic of caching
13435 previous display string position. Initialize cached_prev_pos to
13436 -1. Fixes slow-down at the beginning of a buffer.
13438 2011-07-24 Eli Zaretskii <eliz@gnu.org>
13440 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
13441 for attrs[LFACE_FONTSET_INDEX].
13443 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
13445 * xml.c (parse_region): Remove unused local
13446 that was recently introduced.
13448 2011-07-23 Eli Zaretskii <eliz@gnu.org>
13450 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
13451 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
13453 * xdisp.c (move_it_in_display_line_to): Record the best matching
13454 position for TO_CHARPOS while scanning the line, and restore it on
13455 exit if none of the characters scanned was an exact match.
13456 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
13457 when exact match is impossible due to invisible text, and the
13458 lines are truncated.
13460 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
13462 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
13465 2011-07-22 Eli Zaretskii <eliz@gnu.org>
13467 Fix a significant slow-down of cursor motion with C-n, C-p,
13468 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
13469 auto-repeat under bidi redisplay in fontified buffers.
13470 * xdisp.c (compute_stop_pos_backwards): New function.
13471 (next_element_from_buffer): Call compute_stop_pos_backwards to
13472 find a suitable prev_stop when we find ourselves before
13474 (reseat): Don't look for prev_stop, as that could mean a very long
13476 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
13477 <cached_disp_overlay_modiff>: Cache for last found display string
13479 (compute_display_string_pos): Return the cached position if asked
13480 about the same buffer in the same area of character positions, and
13481 the buffer wasn't changed since the time the display string
13482 position was cached.
13484 2011-07-22 Eli Zaretskii <eliz@gnu.org>
13486 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
13487 is an integer, which is important for empty lines. (Bug#9149)
13489 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
13491 * frame.c (Fmodify_frame_parameters): In tty case, update the
13492 default face if necessary (Bug#4238).
13494 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
13496 * editfns.c (Fstring_to_char): No need to explain what a character
13497 is in the docstring (Bug#6576).
13499 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13501 * xml.c (parse_region): Make sure we always return a tree.
13503 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
13505 * xml.c (parse_region): If a document contains only comments,
13508 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13510 * xml.c (make_dom): Return comments, too.
13512 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
13515 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
13516 and the surrounding thread.
13517 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
13518 rather than fgets, and retry after EINTR. Otherwise, 'emacs
13519 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
13521 * s/openbsd.h (BROKEN_SIGIO): Define.
13522 * unexelf.c (unexec) [__OpenBSD__]:
13523 Don't update the .mdebug section of the Alpha COFF symbol table.
13525 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
13527 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
13530 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
13532 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
13533 This fixes some race conditions on the permissions of any newly
13536 * alloc.c (valid_pointer_p): Use pipe, not open.
13537 This fixes some permissions issues when debugging.
13539 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
13540 If fchown fails to set both uid and gid, try to set just gid,
13541 as that is sometimes allowed. Adjust the file's mode to eliminate
13542 setuid or setgid bits that are inappropriate if fchown fails.
13544 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
13546 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
13547 to compare Lisp_Objects.
13548 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
13549 global_gnutls_log_level, don't mistake it for a Lisp_Object.
13550 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
13552 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
13554 * lread.c (read_integer): Unread even EOF character.
13555 (read1): Likewise. Properly record start position of symbol.
13557 * lread.c (read1): Read `#:' as empty uninterned symbol if no
13558 symbol character follows.
13560 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
13562 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
13563 This works around a problem with the previous change to Fcopy_file.
13564 Recent glibc declares fchown with __attribute__((warn_unused_result)),
13565 and without this change, GCC might complain about discarding
13566 fchown's return value.
13568 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
13570 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
13572 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
13574 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
13576 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
13578 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
13579 it's used from the C level.
13581 * process.c: Use the same condition for POLL_FOR_INPUT in both
13582 keyboard.c and process.c (bug#1858).
13584 2011-07-09 Lawrence Mitchell <wence@gmx.li>
13586 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
13587 (Fgnutls_boot): Use it.
13589 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
13591 * doc.c (Fsubstitute_command_keys): Revert last change.
13593 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
13595 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
13596 quotes the next character, and doesn't affect other longer
13597 sequences (bug#8935).
13599 * lread.c (syms_of_lread): Clarify that is isn't only
13600 `eval-buffer' and `eval-defun' that's affected by
13601 `lexical-binding' (bug#8460).
13603 2011-07-15 Eli Zaretskii <eliz@gnu.org>
13605 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
13606 bidi redisplay when a line includes both an image and is truncated.
13608 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
13610 Fix minor problems found by static checking.
13611 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
13612 (elsz): Now a signed constant, not a size_t var. We prefer signed
13613 types to unsigned, to avoid integer comparison confusion. Without
13614 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
13615 "cannot optimize loop, the loop counter may overflow", a symptom
13617 * indent.c (Fvertical_motion): Mark locals as initialized.
13618 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
13620 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13622 * search.c (Fre_search_backward): Mention `case-fold-search' in
13623 all the re_search_* functions (bug#8138).
13625 * keyboard.c (Fopen_dribble_file): Document when the file is
13628 2011-07-14 Eli Zaretskii <eliz@gnu.org>
13630 * bidi.c (bidi_dump_cached_states): Fix format of displaying
13633 Support bidi reordering of display and overlay strings.
13634 * xdisp.c (compute_display_string_pos)
13635 (compute_display_string_end): Accept additional argument STRING.
13636 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
13637 (reseat_to_string): Initialize bidi_it->string.s and
13638 bidi_it->string.schars.
13639 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
13640 NULL (avoids a crash in bidi_paragraph_init).
13641 Initialize itb.string.lstring.
13642 (init_iterator): Call bidi_init_it only of a valid
13643 buffer position was specified. Initialize paragraph_embedding to
13645 (reseat_to_string): Initialize the bidi iterator.
13646 (display_string): If we need to ignore text properties of
13647 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
13648 original value of -1 will not work with bidi.)
13649 (compute_display_string_pos): First arg is now struct
13650 `text_pos *'; all callers changed. Support display properties on
13652 (compute_display_string_end): Support display properties on Lisp
13654 (init_iterator, reseat_1, reseat_to_string): Initialize the
13655 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
13656 when iterating on a string not from display properties).
13657 (compute_display_string_pos, compute_display_string_end):
13658 Fix calculation of the object to scan. Fixes an error when using
13660 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
13661 base_level_stop; instead, set base_level_stop to BEGV.
13662 Fixes crashes in vertical-motion.
13663 (next_element_from_buffer): Improve commentary for when
13664 the iterator is before prev_stop.
13665 (init_iterator): Initialize bidi_p from the default value of
13666 bidi-display-reordering, not from buffer-local value. Use the
13667 buffer-local value only if initializing for buffer iteration.
13668 (handle_invisible_prop): Support invisible properties on strings
13669 that are being bidi-reordered.
13670 (set_iterator_to_next): Support bidi reordering of C strings and
13672 (next_element_from_string): Support bidi reordering of Lisp
13674 (handle_stop_backwards): Support Lisp strings as well.
13675 (display_string): Support display of R2L glyph rows.
13676 Use IT_STRING_CHARPOS when displaying from a Lisp string.
13677 (init_iterator): Don't initialize it->bidi_p for strings
13679 (reseat_to_string): Initialize it->bidi_p for strings here.
13680 (next_element_from_string, next_element_from_c_string)
13681 (next_element_from_buffer): Add xassert's for correspondence
13682 between IT's object being iterated and it->bidi_it.string
13684 (face_before_or_after_it_pos): Support bidi iteration.
13685 (next_element_from_c_string): Handle the case of the first string
13686 character that is not the first one in the visual order.
13687 (get_visually_first_element): New function, refactored from common
13688 parts of next_element_from_buffer, next_element_from_string, and
13689 next_element_from_c_string.
13690 (tool_bar_lines_needed, redisplay_tool_bar)
13691 (display_menu_bar): Force left-to-right direction. Add a FIXME
13692 comment for making that be controlled by a user option.
13693 (push_it, pop_it): Save and restore the state of the
13694 bidi iterator. Save and restore the bidi_p flag.
13695 (pop_it): Iterate out of display property for string iteration as
13697 (iterate_out_of_display_property): Support iteration over strings.
13698 (handle_single_display_spec): Set up it->bidi_it for iteration
13699 over a display string, and call bidi_init_it.
13700 (handle_single_display_spec, next_overlay_string)
13701 (get_overlay_strings_1, push_display_prop): Set up the bidi
13702 iterator for displaying display or overlay strings.
13703 (forward_to_next_line_start): Don't use the shortcut if
13705 (back_to_previous_visible_line_start): If handle_display_prop
13706 pushed the iterator stack, restore the internal state of the bidi
13707 iterator by calling bidi_pop_it same number of times.
13708 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
13709 and we are bidi-iterating, don't decrement the iterator position;
13710 instead, set the first_elt flag in the bidi iterator, to produce
13712 (reseat_1): Remove redundant setting of string_from_display_prop_p.
13713 (push_display_prop): xassert that we are iterating a buffer.
13714 (push_it, pop_it): Save and restore paragraph_embedding member.
13715 (handle_single_display_spec, next_overlay_string)
13716 (get_overlay_strings_1, reseat_1, reseat_to_string)
13717 (push_display_prop): Set up the `unibyte' member of bidi_it.string
13718 correctly. Don't assume unibyte strings are not bidi-reordered.
13719 (compute_display_string_pos)
13720 (compute_display_string_end): Fix handling the case of C string.
13721 (push_it, pop_it): Save and restore from_disp_prop_p.
13722 (handle_single_display_spec, push_display_prop): Set the
13723 from_disp_prop_p flag.
13724 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
13725 (pop_it): Call iterate_out_of_display_property only if we are
13726 popping after iteration over a string that came from a display
13727 property. Fix a typo in popping stretch info. Add an assertion
13728 for verifying that the iterator position is in sync with the bidi
13730 (handle_single_display_spec, get_overlay_strings_1)
13731 (push_display_prop): Fix initialization of paragraph direction for
13732 string when that of the parent object is not yet determined.
13733 (reseat_1): Call bidi_init_it to resync the bidi
13734 iterator with IT's position. (Bug#7616)
13735 (find_row_edges): If ROW->start.pos gives position
13736 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
13737 (handle_stop, back_to_previous_visible_line_start, reseat_1):
13738 Reset the from_disp_prop_p flag.
13739 (SAVE_IT, RESTORE_IT): New macros.
13740 (pos_visible_p, face_before_or_after_it_pos)
13741 (back_to_previous_visible_line_start)
13742 (move_it_in_display_line_to, move_it_in_display_line)
13743 (move_it_to, move_it_vertically_backward, move_it_by_lines)
13744 (try_scrolling, redisplay_window, display_line): Use them when
13745 saving a temporary copy of the iterator and restoring it back.
13746 (back_to_previous_visible_line_start, reseat_1)
13747 (init_iterator): Empty the bidi cache "stack".
13748 (move_it_in_display_line_to): If iterator ended up at
13749 EOL, but we never saw any buffer positions smaller than
13750 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
13751 motion in bidi-reordered lines.
13752 (move_it_in_display_line_to): Record prev_method and prev_pos
13753 immediately before the call to set_iterator_to_next. Fixes cursor
13754 motion in bidi-reordered lines with stretch glyphs and strings
13755 displayed in margins. (Bug#8133) (Bug#8867)
13756 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
13758 (pos_visible_p): Support positions in bidi-reordered lines.
13759 Save and restore bidi cache.
13761 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
13762 (bidi_paragraph_info): Delete unused struct.
13763 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
13764 (bidi_cache_start): New variable.
13765 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
13767 (bidi_cache_fetch_state, bidi_cache_search)
13768 (bidi_cache_find_level_change, bidi_cache_iterator_state)
13769 (bidi_cache_find, bidi_peek_at_next_level)
13770 (bidi_level_of_next_char, bidi_find_other_level_edge)
13771 (bidi_move_to_visually_next): Compare cache index with
13772 bidi_cache_start rather than with zero.
13773 (bidi_fetch_char): Accept new argument STRING; all callers
13774 changed. Support iteration over a string. Support strings with
13775 display properties. Support unibyte strings. Fix the type of
13776 `len' according to what STRING_CHAR_AND_LENGTH expects.
13777 (bidi_paragraph_init, bidi_resolve_explicit_1)
13778 (bidi_resolve_explicit, bidi_resolve_weak)
13779 (bidi_level_of_next_char, bidi_move_to_visually_next):
13780 Support iteration over a string.
13781 (bidi_set_sor_type, bidi_resolve_explicit_1)
13782 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
13783 can now be zero (for strings); special values 0 and -1 were
13784 changed to -1 and -2, respectively.
13785 (bidi_char_at_pos): New function.
13786 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
13787 Call it instead of FETCH_MULTIBYTE_CHAR.
13788 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
13789 initialized to valid values.
13790 (bidi_init_it): Don't initialize charpos and bytepos with invalid
13792 (bidi_level_of_next_char): Allow the sentinel "position" to pass
13793 the test for valid cached positions. Fix the logic for looking up
13794 the sentinel state in the cache. GCPRO the Lisp string we are
13796 (bidi_push_it, bidi_pop_it): New functions.
13797 (bidi_initialize): Initialize the bidi cache start stack pointer.
13798 (bidi_cache_ensure_space): New function, refactored from part of
13799 bidi_cache_iterator_state. Don't assume the required size is just
13800 one BIDI_CACHE_CHUNK away.
13801 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
13802 (bidi_count_bytes, bidi_char_at_pos): New functions.
13803 (bidi_cache_search): Don't assume bidi_cache_last_idx is
13804 always valid if bidi_cache_idx is valid.
13805 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
13806 is valid if it's going to be used.
13807 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
13808 (bidi_cache_fetch_state, bidi_cache_search)
13809 (bidi_cache_find_level_change, bidi_cache_ensure_space)
13810 (bidi_cache_iterator_state, bidi_cache_find)
13811 (bidi_find_other_level_edge, bidi_cache_start_stack):
13812 All variables related to cache indices are now EMACS_INT.
13814 * dispextern.h (struct bidi_string_data): New structure.
13815 (struct bidi_it): New member `string'. Make flag members be 1-bit
13816 fields, and put them last in the struct.
13817 (compute_display_string_pos, compute_display_string_end):
13819 (bidi_push_it, bidi_pop_it): Add prototypes.
13820 (struct iterator_stack_entry): New members bidi_p,
13821 paragraph_embedding, and from_disp_prop_p.
13822 (struct it): Member bidi_p is now a bit field 1 bit wide.
13823 (bidi_shelve_cache, bidi_unshelve_cache):
13824 Declare prototypes.
13826 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
13827 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
13828 and vector-like objects.
13830 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
13831 cache around display iteration.
13833 * window.c (Fwindow_end, window_scroll_pixel_based)
13834 (displayed_window_lines, Frecenter): Save and restore the bidi
13835 cache around display iteration.
13837 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13839 * editfns.c (Fdelete_region): Clarify the use of the named
13840 parameters (bug#6788).
13842 2011-07-14 Martin Rudalics <rudalics@gmx.at>
13844 * indent.c (Fvertical_motion): Set and restore w->pointm when
13845 saving and restoring the window's buffer (Bug#9006).
13847 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
13849 * editfns.c (Fstring_to_char): Clarify just what is returned
13850 (bug#6576). Text by Eli Zaretskii.
13852 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
13854 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
13856 2011-07-13 Eli Zaretskii <eliz@gnu.org>
13858 * buffer.c (mmap_find): Fix a typo.
13860 2011-07-13 Johan Bockgård <bojohan@gnu.org>
13862 Fix execution of x selection hooks.
13863 * xselect.c (Qx_lost_selection_functions)
13864 (Qx_sent_selection_functions): New vars.
13865 (syms_of_xselect): DEFSYM them.
13866 (x_handle_selection_request): Pass Qx_sent_selection_functions
13867 rather than Vx_sent_selection_functions to Frun_hook_with_args.
13868 (x_handle_selection_clear,x_clear_frame_selections):
13869 Pass Qx_lost_selection_functions rather than
13870 Vx_lost_selection_functions to Frun_hook_with_args.
13872 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
13874 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
13875 The old code sometimes used this field without initializing it.
13877 * alloc.c (gc_sweep): Don't read past end of array.
13878 In theory, the old code could also have corrupted Emacs internals,
13879 though it'd be very unlikely.
13881 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
13883 * character.c (Fcharacterp): Don't advertise optional ignored
13884 argument. (Bug#4026)
13886 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
13888 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
13891 * window.c (Fset_window_start): Doc fix (bug#4199).
13892 (Fset_window_hscroll): Ditto.
13894 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
13896 Fix minor new problems caught by GCC 4.6.1.
13897 * term.c (init_tty): Remove unused local.
13898 * xsettings.c (store_monospaced_changed): Define this function only
13899 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
13900 not used otherwise.
13902 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
13904 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
13906 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
13908 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
13909 are the mini-buffer and the echo area (bug#3320).
13911 * term.c (init_tty): Remove support for supdup, c10 and perq
13912 terminals, which are no longer supported (bug#1482).
13914 2011-07-10 Johan Bockgård <bojohan@gnu.org>
13916 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
13918 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
13920 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
13921 for non-popups (Bug#3642).
13923 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
13925 * alloc.c (reset_malloc_hooks): Protoize.
13926 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
13927 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
13928 * cm.c (losecursor): Likewise.
13929 * data.c (fmod): Likewise.
13930 * dispnew.c (swap_glyphs_in_rows): Likewise.
13931 * emacs.c (memory_warning_signal): Likewise.
13932 * floatfns.c (float_error): Likewise.
13933 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
13934 (otf_open, font_otf_capability, generate_otf_features)
13935 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
13937 * image.c (pbm_read_file): Likewise.
13938 * indent.c (string_display_width): Likewise.
13939 * intervals.c (check_for_interval, search_for_interval)
13940 (inc_interval_count, count_intervals, root_interval)
13941 (adjust_intervals_for_insertion, make_new_interval): Likewise.
13942 * lread.c (defalias): Likewise.
13943 * ralloc.c (r_alloc_check): Likewise.
13944 * regex.c (set_image_of_range_1, set_image_of_range)
13945 (regex_grow_registers): Likewise.
13946 * sysdep.c (strerror): Likewise.
13947 * termcap.c (valid_filename_p, tprint, main): Likewise.
13948 * tparam.c (main): Likewise.
13949 * unexhp9k800.c (run_time_remap, save_data_space)
13950 (update_file_ptrs, read_header, write_header, calculate_checksum)
13951 (copy_file, copy_rest, display_header): Likewise.
13952 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
13954 * xdisp.c (check_it): Likewise.
13955 * xfaces.c (register_color, unregister_color, unregister_colors):
13957 * xfns.c (print_fontset_result): Likewise.
13958 * xrdb.c (member, fatal, main): Likewise.
13960 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
13962 Fix minor problems found by static checking (Bug#9031).
13963 * chartab.c (char_table_set_range, map_sub_char_table):
13964 Remove unused locals.
13965 (uniprop_table): Now static.
13966 * composite.c (_work_char): Remove unused static var.
13968 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
13970 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
13972 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
13974 * gtkutil.c (qttip_cb): Remove code without function.
13976 2011-07-09 Eli Zaretskii <eliz@gnu.org>
13978 * w32.c (pthread_sigmask): New stub.
13980 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
13982 Use pthread_sigmask, not sigprocmask (Bug#9010).
13983 sigprocmask is portable only for single-threaded applications, and
13984 Emacs can be multi-threaded when it uses GTK.
13985 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
13987 * callproc.c (Fcall_process):
13988 * process.c (create_process):
13989 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
13990 Use pthread_sigmask, not sigprocmask.
13992 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
13994 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
13995 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
13998 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
14000 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
14001 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
14002 (xg_hide_tooltip): Fix comment.
14004 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
14005 in registerServicesMenuSendTypes.
14006 (validRequestorForSendType): Don't check ns_return_types.
14008 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
14011 2011-07-08 Jason Rumney <jasonr@gnu.org>
14013 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
14014 SH_SHOW for hidden windows (Bug#5482).
14016 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
14017 frame struct members of non-existent frames (Bug#6284).
14019 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
14021 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
14022 variable firstTime not needed on OSX >= 10.6.
14023 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
14024 >= 10.5. Use setKnobProportion, setDoubleValue.
14026 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
14027 (MAC_OS_X_VERSION_10_5): Define if not defined.
14028 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
14029 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
14030 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
14032 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
14033 cString and lossyCString on OSX >= 10.4.
14035 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
14036 sizeToFit on OSX >= 10.2.
14038 * nsimage.m (allocInitFromFile): Don't use deprecated method
14039 bestRepresentationForDevice on OSX >= 10.6.
14041 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
14044 * emacs.c: Declare unexec_init_emacs_zone.
14046 * nsgui.h: Fix compiler warning about gnulib redefining verify.
14048 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
14050 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
14051 on svcsMenu (Bug#8842).
14053 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
14055 (Fns_list_services): Just return Qnil on 10.6, code not working there.
14057 * nsterm.m (QUTF8_STRING): Declare.
14058 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
14059 (validRequestorForSendType): Return type is (id).
14060 Change indexOfObjectIdenticalTo to indexOfObject.
14061 Check if we have local selection before returning self (Bug#8842).
14062 (writeSelectionToPasteboard): Put local selection into paste board
14063 if we have a local selection (Bug#8842).
14064 (syms_of_nsterm): DEFSYM QUTF8_STRING.
14066 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
14067 (ns_get_local_selection): Declare.
14069 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
14071 * keymap.c (describe_map_tree): Don't insert a double newline at
14072 the end of the buffer (bug#1169) and return whether we inserted
14075 * callint.c (Fcall_interactively): Change "reading args" to
14076 "providing args" to try to clarify what it does (bug#1010).
14078 2011-07-07 Kenichi Handa <handa@m17n.org>
14080 * composite.c (composition_compute_stop_pos): Ignore a static
14081 composition starting before CHARPOS (Bug#8915).
14083 * xdisp.c (handle_composition_prop): Likewise.
14085 2011-07-07 Eli Zaretskii <eliz@gnu.org>
14087 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
14090 2011-07-07 Kenichi Handa <handa@m17n.org>
14092 * character.h (unicode_category_t): New enum type.
14094 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
14095 (Qchar_code_property_table): New variable.
14096 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
14097 (UNIPROP_COMPRESSED_FORM_P): New macros.
14098 (char_table_ascii): Uncompress the compressed values.
14099 (sub_char_table_ref): New arg is_uniprop. Callers changed.
14100 Uncompress the compressed values.
14101 (sub_char_table_ref_and_range): Likewise.
14102 (char_table_ref_and_range): Uncompress the compressed values.
14103 (sub_char_table_set): New arg is_uniprop. Callers changed.
14104 Uncompress the compressed values.
14105 (sub_char_table_set_range): Args changed. Callers changed.
14106 (char_table_set_range): Adjuted for the above change.
14107 (map_sub_char_table): Delete args default_val and parent. Add arg
14108 top. Give decoded values to a Lisp function.
14109 (map_char_table): Adjust for the above change. Give decoded
14110 values to a Lisp function. Gcpro more variables.
14111 (uniprop_table_uncompress)
14112 (uniprop_decode_value_run_length): New functions.
14113 (uniprop_decoder, uniprop_decoder_count): New variables.
14114 (uniprop_get_decoder, uniprop_encode_value_character)
14115 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
14117 (uniprop_encoder, uniprop_encoder_count): New variables.
14118 (uniprop_get_encoder, uniprop_table)
14119 (Funicode_property_table_internal, Fget_unicode_property_internal)
14120 (Fput_unicode_property_internal): New functions.
14121 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
14122 Sunicode_property_table_internal, Sget_unicode_property_internal,
14123 and Sput_unicode_property_internal. Defvar_lisp
14124 char-code-property-alist.
14126 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
14127 Vunicode_category_table.
14129 * font.c (font_range): Adjust for the change of
14130 Vunicode_category_table.
14132 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
14134 * m/iris4d.h: Remove file, move contents ...
14135 * s/irix6-5.h: ... here.
14137 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
14139 Remove unportable assumption about struct layout (Bug#8884).
14140 * alloc.c (mark_buffer):
14141 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
14142 (clone_per_buffer_values): Don't assume that
14143 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
14144 This isn't true in general, and it's particularly not true
14145 if Emacs is configured with --with-wide-int.
14146 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
14147 New macros, used in the buffer.c change.
14149 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
14151 * xsettings.c: Use both GConf and GSettings if both are available.
14152 (store_config_changed_event): Add comment.
14153 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
14154 (store_tool_bar_style_changed): New functions.
14155 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
14156 (struct xsettings): Move font inside HAVE_XFT.
14157 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
14158 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
14159 Move inside HAVE_XFT.
14160 (something_changed_gsettingsCB): Rename from something_changedCB.
14161 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
14163 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
14164 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
14165 (something_changed_gconfCB): Rename from something_changedCB.
14166 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
14167 (parse_settings): Move check for font inside HAVE_XFT.
14168 (read_settings, apply_xft_settings): Add comment.
14169 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
14170 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
14171 call store_font_name_changed.
14172 (xft_settings_event): Add comment.
14173 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
14174 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
14175 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
14176 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
14177 (xsettings_initialize): Call init_gsettings last.
14178 (xsettings_get_system_font, xsettings_get_system_normal_font):
14181 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
14183 Random fixes. E.g., (random) never returned negative values.
14184 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
14185 subseconds part to the entropy, as that's a bit more random.
14186 Prefer signed to unsigned, since the signedness doesn't matter and
14187 in general we prefer signed. When given a limit, use a
14188 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
14189 latter isn't right if USE_2_TAGS_FOR_INTS.
14190 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
14191 not 0..VALMASK. Don't discard "excess" bits that random () returns.
14193 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
14195 * textprop.c (text_property_stickiness):
14196 Obey Vtext_property_default_nonsticky.
14197 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
14198 * w32fns.c (syms_of_w32fns):
14199 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
14201 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
14203 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
14204 This is more efficient than Ffile_directory_p and avoids a minor race.
14206 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
14208 * buffer.c (Foverlay_put): Say what the return value is
14211 * fileio.c (barf_or_query_if_file_exists): Check first if the file
14212 is a directory before asking whether to use the file name
14214 (barf_or_query_if_file_exists): Make the "File is a directory"
14215 error be more correct.
14217 * fns.c (Frequire): Remove the mention of the .gz files, since
14218 that's installation-specific, but keep the mention of
14219 `get-load-suffixes'.
14221 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
14223 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
14224 Report string overflow if the output is too long.
14226 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
14228 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
14229 (syms_of_gnutls): Remove duplicate DEFSYM for
14230 Qgnutls_bootprop_verify_hostname_error, an error for
14231 Qgnutls_bootprop_verify_error (which is no longer used).
14233 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
14234 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
14235 Also (re)move comments that are misplaced or no longer relevant.
14237 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
14239 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
14241 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
14243 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
14244 and background color parameters if they have been changed.
14246 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
14248 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
14250 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
14252 * xsettings.c (SYSTEM_FONT): Define only when used.
14253 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
14255 * keymap.c (access_keymap_1): Now static.
14257 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
14259 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
14260 leave any prefix arg for the up event (Bug#1586).
14262 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
14264 * lread.c (syms_of_lread): Mention single symbols defined by
14265 `defvar' or `defconst' (bug#7154).
14267 * fns.c (Frequire): Mention .el.gz files (bug#7314).
14268 (Frequire): Mention get-load-suffixes.
14270 2011-07-02 Martin Rudalics <rudalics@gmx.at>
14272 * window.h (window): Remove clone_number slot.
14273 * window.c (Fwindow_clone_number, Fset_window_clone_number):
14275 (make_parent_window, make_window, saved_window)
14276 (Fset_window_configuration, save_window_save): Don't deal with
14278 * buffer.c (Qclone_number): Remove declaration.
14279 (sort_overlays, overlay_strings): Don't deal with clone numbers.
14281 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
14283 Add multiple inheritance to keymaps.
14284 * keymap.c (Fmake_composed_keymap): New function.
14285 (Fset_keymap_parent): Simplify.
14286 (fix_submap_inheritance): Remove.
14287 (access_keymap_1): New function extracted from access_keymap to handle
14288 embedded parents and handle lists of maps.
14289 (access_keymap): Use it.
14290 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
14291 (Fcopy_keymap): Handle embedded parents.
14292 (Fcommand_remapping, define_as_prefix): Simplify.
14293 (Fkey_binding): Simplify.
14294 (syms_of_keymap): Move minibuffer-local-completion-map,
14295 minibuffer-local-filename-completion-map,
14296 minibuffer-local-must-match-map, and
14297 minibuffer-local-filename-must-match-map to Elisp.
14298 (syms_of_keymap): Defsubr make-composed-keymap.
14299 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
14300 (parse_menu_item): Trivial simplification.
14302 2011-07-01 Glenn Morris <rgm@gnu.org>
14304 * Makefile.in (SETTINGS_LIBS): Fix typo.
14306 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
14308 * coding.c (Fencode_coding_string): Record the last coding system
14309 used, as the function doc string says (bug#8738).
14311 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
14313 * xsettings.c (store_monospaced_changed): Take new font as arg and
14314 check for change against current_mono_font.
14315 (EMACS_TYPE_SETTINGS): Remove this and related defines.
14316 (emacs_settings_constructor, emacs_settings_get_property)
14317 (emacs_settings_set_property, emacs_settings_class_init)
14318 (emacs_settings_init, gsettings_obj): Remove.
14319 (something_changedCB): New function for HAVE_GSETTINGS.
14320 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
14321 with value as argument.
14322 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
14323 g_settings_new (Bug#8967). Do not create gsettings_obj.
14324 Remove calls to g_settings_bind. Connect something_changedCB to
14327 * xgselect.c: Add defined (HAVE_GSETTINGS).
14328 (xgselect_initialize): Ditto.
14330 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
14331 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
14334 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
14336 * eval.c (struct backtrace): Simplify and port the data structure.
14337 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
14338 signed bit field, as this assumption is not portable and it makes
14339 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
14340 "char debug_on_exit : 1" as this is not portable either; instead,
14341 use the portable "unsigned int debug_on_exit : 1". Remove unused
14342 member evalargs. Remove obsolete comments about cc bombing out.
14344 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
14346 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
14347 Let HAVE_GSETTINGS override HAVE_GCONF.
14348 (store_monospaced_changed): New function.
14349 (EMACS_SETTINGS): A new type derived from GObject to handle
14350 GSettings notifications.
14351 (emacs_settings_constructor, emacs_settings_get_property)
14352 (emacs_settings_set_property, emacs_settings_class_init):
14354 (gsettings_client, gsettings_obj): New variables.
14355 (GSETTINGS_SCHEMA): New define.
14356 (something_changedCB): Call store_monospaced_changed.
14357 (init_gsettings): New function.
14358 (xsettings_initialize): Call init_gsettings.
14359 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
14362 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
14365 2011-06-29 Martin Rudalics <rudalics@gmx.at>
14367 * window.c (resize_root_window, grow_mini_window)
14368 (shrink_mini_window): Rename Qresize_root_window to
14369 Qwindow_resize_root_window and Qresize_root_window_vertically to
14370 Qwindow_resize_root_window_vertically.
14372 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
14374 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
14376 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
14378 * makefile.w32-in: Redesign dependencies so they reflect more
14379 clearly which files are directly included by each source file,
14380 and not through other includes.
14382 2011-06-27 Martin Rudalics <rudalics@gmx.at>
14384 * buffer.c (Qclone_number): Declare static and DEFSYM it.
14385 (sort_overlays, overlay_strings): When an overlay's clone number
14386 matches the window's clone number process the overlay even if
14387 the overlay's window property doesn't match the current window.
14389 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
14390 (Fwindow_hchild): Rename to Fwindow_left_child.
14391 (Fwindow_next): Rename to Fwindow_next_sibling.
14392 (Fwindow_prev): Rename to Fwindow_prev_sibling.
14393 (resize_window_check): Rename to window_resize_check.
14394 (resize_window_apply): Rename to window_resize_apply.
14395 (Fresize_window_apply): Rename to Fwindow_resize_apply.
14396 (Fdelete_other_windows_internal, resize_frame_windows)
14397 (Fsplit_window_internal, Fdelete_window_internal)
14398 (grow_mini_window, shrink_mini_window)
14399 (Fresize_mini_window_internal): Fix callers accordingly.
14401 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
14403 * emacsgtkfixed.h: State that this is only used with Gtk+3.
14404 (emacs_fixed_set_min_size): Remove.
14405 (emacs_fixed_new): Take frame as argument.
14407 * emacsgtkfixed.c: State that this is only used with Gtk+3.
14408 (_EmacsFixedPrivate): Remove minwidth/height.
14409 Add struct frame *f.
14410 (emacs_fixed_init): Initialize priv->f.
14411 (get_parent_class, emacs_fixed_set_min_size): Remove.
14412 (emacs_fixed_new): Set priv->f to argument.
14413 (emacs_fixed_get_preferred_width)
14414 (emacs_fixed_get_preferred_height): Use min_width/height from
14415 frames size_hint to set minimum and natural (Bug#8919).
14416 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
14417 and use min_width/height from frames size_hint to set
14418 min_width/height (Bug#8919).
14420 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
14421 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
14424 2011-06-26 Eli Zaretskii <eliz@gnu.org>
14426 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
14427 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
14430 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
14432 * process.c (wait_reading_process_output): Bypass select if
14433 waiting for a cell while ignoring keyboard input, and input is
14434 pending. Suggested by Jan Djärv (Bug#8869).
14436 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
14438 Use gnulib's dup2 module instead of rolling our own.
14439 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
14441 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14443 * dispnew.c (scrolling_window): Before scrolling, turn off a
14444 mouse-highlight in the window being scrolled.
14446 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
14448 Move DEFSYM to lisp.h and use everywhere.
14450 * character.h (DEFSYM): Move declaration...
14451 * lisp.h (DEFSYM): ...here.
14457 * w32select.c: Don't include character.h.
14459 * alloc.c (syms_of_alloc):
14460 * buffer.c (syms_of_buffer):
14461 * bytecode.c (syms_of_bytecode):
14462 * callint.c (syms_of_callint):
14463 * casefiddle.c (syms_of_casefiddle):
14464 * casetab.c (init_casetab_once):
14465 * category.c (init_category_once, syms_of_category):
14466 * ccl.c (syms_of_ccl):
14467 * cmds.c (syms_of_cmds):
14468 * composite.c (syms_of_composite):
14469 * dbusbind.c (syms_of_dbusbind):
14470 * dired.c (syms_of_dired):
14471 * dispnew.c (syms_of_display):
14472 * doc.c (syms_of_doc):
14473 * editfns.c (syms_of_editfns):
14474 * emacs.c (syms_of_emacs):
14475 * eval.c (syms_of_eval):
14476 * fileio.c (syms_of_fileio):
14477 * fns.c (syms_of_fns):
14478 * frame.c (syms_of_frame):
14479 * fringe.c (syms_of_fringe):
14480 * insdel.c (syms_of_insdel):
14481 * keymap.c (syms_of_keymap):
14482 * lread.c (init_obarray, syms_of_lread):
14483 * macros.c (syms_of_macros):
14484 * msdos.c (syms_of_msdos):
14485 * print.c (syms_of_print):
14486 * process.c (syms_of_process):
14487 * search.c (syms_of_search):
14488 * sound.c (syms_of_sound):
14489 * syntax.c (init_syntax_once, syms_of_syntax):
14490 * terminal.c (syms_of_terminal):
14491 * textprop.c (syms_of_textprop):
14492 * undo.c (syms_of_undo):
14493 * w32.c (globals_of_w32):
14494 * window.c (syms_of_window):
14495 * xdisp.c (syms_of_xdisp):
14496 * xfaces.c (syms_of_xfaces):
14497 * xfns.c (syms_of_xfns):
14498 * xmenu.c (syms_of_xmenu):
14499 * xsettings.c (syms_of_xsettings):
14500 * xterm.c (syms_of_xterm): Use DEFSYM.
14502 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
14504 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
14506 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
14508 Integer and buffer overflow fixes (Bug#8873).
14510 * print.c (printchar, strout): Check for string overflow.
14511 (PRINTPREPARE, printchar, strout):
14512 Don't set size unless allocation succeeds.
14514 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
14515 for sizes. Check for string overflow more accurately.
14516 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
14518 * macros.c: Integer and buffer overflow fixes.
14519 * keyboard.h (struct keyboard.kbd_macro_bufsize):
14520 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
14521 Use ptrdiff_t, not int, for sizes.
14522 Don't increment bufsize until after realloc succeeds.
14523 Check for size-calculation overflow.
14524 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
14526 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
14528 * lread.c: Integer overflow fixes.
14529 (read_integer): Radix is now EMACS_INT, not int,
14530 to improve quality of diagnostics for out-of-range radices.
14531 Calculate buffer size correctly for out-of-range radices.
14532 (read1): Check for integer overflow in radices, and in
14533 read-circle numbers.
14534 (read_escape): Avoid int overflow.
14535 (Fload, openp, read_buffer_size, read1)
14536 (substitute_object_recurse, read_vector, read_list, map_obarray):
14537 Use ptrdiff_t, not int, for sizes.
14538 (read1): Use EMACS_INT, not int, for sizes.
14539 Check for size overflow.
14541 * image.c (cache_image): Check for size arithmetic overflow.
14543 * lread.c: Integer overflow issues.
14544 (saved_doc_string_size, saved_doc_string_length)
14545 (prev_saved_doc_string_size, prev_saved_doc_string_length):
14546 Now ptrdiff_t, not int.
14547 (read1): Don't assume doc string length fits in int. Check for
14548 out-of-range doc string lengths.
14549 (read_list): Don't assume file position fits in int.
14550 (read_escape): Check for hex character overflow.
14552 2011-06-22 Leo Liu <sdl.web@gmail.com>
14554 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
14555 Move to minibuffer.el.
14557 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14559 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
14560 The following patches are for when GLYPH_DEBUG && !XASSERT.
14561 * dispextern.h (trace_redisplay_p, dump_glyph_string):
14562 * dispnew.c (flush_stdout):
14563 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
14564 Mark as externally visible.
14565 * dispnew.c (check_window_matrix_pointers): Now static.
14566 * dispnew.c (window_to_frame_vpos):
14567 * xfns.c (unwind_create_frame):
14568 * xterm.c (x_check_font): Remove unused local.
14569 * scroll.c (CHECK_BOUNDS):
14570 * xfaces.c (cache_fache): Rename local to avoid shadowing.
14571 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
14572 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
14573 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
14574 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
14576 (debug_method_add): Use va_list and vsprintf rather than relying
14577 on undefined behavior with wrong number of arguments.
14578 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
14579 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
14580 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
14581 since we're not interested in debugging glyphs with old libraries.
14582 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
14583 GCC 4.6.0's static checking.
14585 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14587 Integer overflow and signedness fixes (Bug#8873).
14588 A few related buffer overrun fixes, too.
14590 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
14592 * dispextern.h (struct face.stipple):
14593 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
14594 (x_bitmap_mask, x_allocate_bitmap_record)
14595 (x_create_bitmap_from_data, x_create_bitmap_from_file)
14596 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
14597 (x_create_bitmap_from_xpm_data):
14598 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
14599 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
14601 * xfaces.c (load_pixmap):
14602 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
14603 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
14604 (.bitmaps_last, struct x_output.icon_bitmap):
14605 Use ptrdiff_t, not int, for bitmap indexes.
14606 (x_allocate_bitmap_record): Check for size overflow.
14607 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
14609 Use ptrdiff_t, not int, for overlay counts.
14610 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
14611 * editfns.c (overlays_around, get_pos_property):
14612 * textprop.c (get_char_property_and_overlay):
14613 * xdisp.c (next_overlay_change, note_mouse_highlight):
14614 * xfaces.c (face_at_buffer_position):
14615 * buffer.c (OVERLAY_COUNT_MAX): New macro.
14616 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
14617 (Fnext_overlay_change, Fprevious_overlay_change)
14618 (mouse_face_overlay_overlaps, Foverlays_in):
14619 Use ptrdiff_t, not int, for sizes.
14620 (overlays_at, overlays_in): Check for size-calculation overflow.
14622 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
14624 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
14625 (x_session_initialize): Do not assume string length fits in int.
14627 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
14628 This is unlikely, but can occur if DPI is outlandish.
14630 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
14631 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
14633 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
14634 * xrdb.c (magic_file_p, search_magic_path):
14635 Omit last arg SUFFIX; it was always 0. All callers changed.
14636 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
14638 * xfont.c (xfont_match): Avoid need for strlen.
14640 * xfns.c: Don't assume strlen fits in int.
14641 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
14643 * xdisp.c (message_log_check_duplicate): Return intmax_t,
14644 not unsigned long, as we prefer signed integers. All callers changed.
14645 Detect integer overflow in repeat count.
14646 (message_dolog): Don't assume print length fits in 39 bytes.
14647 (display_mode_element): Don't assume strlen fits in int.
14649 * termcap.c: Don't assume sizes fit in int and never overflow.
14650 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
14651 (gobble_line): Check for size-calculation overflow.
14653 * minibuf.c (Fread_buffer):
14654 * lread.c (intern, intern_c_string):
14655 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
14656 Don't assume string length fits in int.
14658 * keyboard.c (parse_tool_bar_item):
14659 * gtkutil.c (style_changed_cb): Avoid need for strlen.
14661 * font.c: Don't assume string length fits in int.
14662 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
14663 Use ptrdiff_t, not int.
14664 (font_intern_prop): Don't assume string length fits in int.
14665 Don't assume integer property fits in fixnum.
14666 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
14668 * filelock.c: Fix some buffer overrun and integer overflow issues.
14669 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
14670 Reformulate so as not to need the command string.
14671 Invoke gzip -cd rather than gunzip, as it's more portable.
14672 (lock_info_type, lock_file_1, lock_file):
14673 Don't assume pid_t and time_t fit in unsigned long.
14674 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
14675 (current_lock_owner): Prefer signed type for sizes.
14676 Use memcpy, not strncpy, where memcpy is what is really wanted.
14677 Don't assume (via atoi) that time_t and pid_t fit in int.
14678 Check for time_t and/or pid_t out of range, e.g., via a network share.
14679 Don't alloca where an auto var works fine.
14681 * fileio.c: Fix some integer overflow issues.
14682 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
14683 Don't assume string length fits in int.
14684 (directory_file_name): Don't assume string length fits in long.
14685 (make_temp_name): Don't assume pid fits in int, or that its print
14686 length is less than 20.
14688 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
14690 * coding.c (make_subsidiaries): Don't assume string length fits in int.
14692 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
14694 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
14695 We prefer signed integers, even for size calculations.
14697 * emacs.c: Don't assume string length fits in 'int'.
14698 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
14699 (main): Don't invoke strlen when not needed.
14701 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
14702 (XD_DEBUG_MESSAGE): Don't waste a byte.
14704 * callproc.c (getenv_internal_1, getenv_internal)
14705 (Fgetenv_internal):
14706 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
14708 * lread.c (invalid_syntax): Omit length argument.
14709 All uses changed. This doesn't fix a bug, but it simplifies the
14710 code away from its former Hollerith-constant appearance, and it's
14711 one less 'int' to worry about when looking at integer-overflow issues.
14712 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
14714 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
14715 This didn't break anything, but it didn't help either.
14716 It's confusing to put a bogus integer in a place where the actual
14717 value does not matter.
14718 (LIST_END_P): Remove unused macro and its bogus comment.
14719 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
14721 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
14722 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
14724 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
14725 We prefer signed types, and the value cannot exceed the EMACS_INT
14726 range anyway (because otherwise the length would not be representable).
14727 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
14728 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
14729 This avoids a GCC warning when WIDE_EMACS_INT.
14731 * indent.c (sane_tab_width): New function.
14732 (current_column, scan_for_column, Findent_to, position_indentation)
14733 (compute_motion): Use it. This is just for clarity.
14734 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
14736 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
14738 * lisp.h (lint_assume): New macro.
14739 * composite.c (composition_gstring_put_cache):
14740 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
14742 * editfns.c, insdel.c:
14743 Omit unnecessary forward decls, to simplify future changes.
14745 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
14747 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
14749 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
14750 Use much-faster test for byte-length change.
14751 Don't assume string byte-length fits in 'int'.
14752 Check that character arg fits in 'int'.
14753 (mapcar1): Declare byte as byte, for clarity.
14755 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
14757 * fns.c (concat): Catch string overflow earlier.
14758 Do not rely on integer wraparound.
14760 * dispextern.h (struct it.overlay_strings_charpos)
14761 (struct it.selective): Now EMACS_INT, not int.
14762 * xdisp.c (forward_to_next_line_start)
14763 (back_to_previous_visible_line_start)
14764 (reseat_at_next_visible_line_start, next_element_from_buffer):
14765 Don't arbitrarily truncate the value of 'selective' to int.
14767 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
14769 * composite.c: Don't truncate sizes to 'int'.
14770 (composition_gstring_p, composition_reseat_it)
14771 (composition_adjust_point): Use EMACS_INT, not int.
14772 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
14773 not EMACS_UINT, for indexes.
14775 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
14777 * buffer.c: Include <verify.h>.
14778 (struct sortvec.priority, struct sortstr.priority):
14779 Now EMACS_INT, not int.
14780 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
14781 (struct sortstr.size, record_overlay_string)
14782 (struct sortstrlist.size, struct sortlist.used):
14783 Don't truncate size to int.
14784 (record_overlay_string): Check for size-calculation overflow.
14785 (init_buffer_once): Check at compile-time, not run-time.
14787 2011-06-22 Jim Meyering <meyering@redhat.com>
14789 Don't leak an XBM-image-sized buffer
14790 * image.c (xbm_load): Free the image buffer after using it.
14792 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
14795 * composite.c (find_automatic_composition): Omit needless 'return 0;'
14796 that Sun C diagnosed.
14797 * fns.c (secure_hash): Fix pointer signedness issue.
14798 * intervals.c (static_offset_intervals): New function.
14799 (offset_intervals): Use it.
14801 2011-06-21 Leo Liu <sdl.web@gmail.com>
14804 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
14807 * fns.c (secure_hash): Rename from crypto_hash_function and change
14808 the first arg to accept symbols.
14809 (Fsecure_hash): New primitive.
14810 (syms_of_fns): New symbols.
14812 2011-06-20 Deniz Dogan <deniz@dogan.se>
14814 * process.c (Fset_process_buffer): Clarify return value in
14817 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
14819 * dispnew.c (add_window_display_history): Use BVAR.
14821 * xdisp.c (debug_method_add): Use BVAR.
14822 (check_window_end, dump_glyph_matrix, dump_glyph)
14823 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
14825 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
14828 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
14829 check till after the cache is created in init_frame_faces.
14831 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
14833 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
14835 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
14837 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
14838 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
14839 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
14841 Improve buffer-overflow checking (Bug#8873).
14842 * fileio.c (Finsert_file_contents):
14843 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
14844 Remove the old (too-loose) buffer overflow checks.
14845 They weren't needed, since make_gap checks for buffer overflow.
14846 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
14847 The old code merely checked for Emacs fixnum overflow, and relied
14848 on undefined (wraparound) behavior. The new code avoids undefined
14849 behavior, and also checks for ptrdiff_t and/or size_t overflow.
14851 * editfns.c (Finsert_char): Don't dump core with very negative counts.
14852 Tune. Don't use wider integers than needed. Don't use alloca.
14853 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
14855 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
14857 * insdel.c, lisp.h (buffer_overflow): New function.
14858 (insert_from_buffer_1, replace_range, replace_range_2):
14859 * insdel.c (make_gap_larger):
14860 * editfns.c (Finsert_char):
14861 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
14863 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
14865 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
14867 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
14869 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
14870 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
14872 * fileio.c: Don't assume EMACS_INT fits in off_t.
14873 (emacs_lseek): New static function.
14874 (Finsert_file_contents, Fwrite_region): Use it.
14875 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
14877 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
14879 * fns.c: Don't overflow int when computing a list length.
14880 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
14881 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
14882 truncation on 64-bit hosts. Check for QUIT every
14883 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
14884 faster and is responsive enough.
14885 (Flength): Report an error instead of overflowing an integer.
14886 (Fsafe_length): Return a float if the value is not representable
14887 as a fixnum. This shouldn't happen except in contrived situations.
14888 (Fnthcdr, Fsort): Don't assume list length fits in int.
14889 (Fcopy_sequence): Don't assume vector length fits in int.
14891 * alloc.c: Check that resized vectors' lengths fit in fixnums.
14892 (header_size, word_size): New constants.
14893 (allocate_vectorlike): Don't check size overflow here.
14894 (allocate_vector): Check it here instead, since this is the only
14895 caller of allocate_vectorlike that could cause overflow.
14896 Check that the new vector's length is representable as a fixnum.
14898 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
14899 The previous code was bogus. For example, next_almost_prime (32)
14900 returned 39, which is undesirable as it is a multiple of 3; and
14901 next_almost_prime (24) returned 25, which is a multiple of 5 so
14902 why was the code bothering to check for multiples of 7?
14904 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
14906 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
14908 Variadic C functions now count arguments with ptrdiff_t.
14909 This partly undoes my 2011-03-30 change, which replaced int with size_t.
14910 Back then I didn't know that the Emacs coding style prefers signed int.
14911 Also, in the meantime I found a few more instances where arguments
14912 were being counted with int, which may truncate counts on 64-bit
14913 machines, or EMACS_INT, which may be unnecessarily wide.
14914 * lisp.h (struct Lisp_Subr.function.aMANY)
14915 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
14916 Arg counts are now ptrdiff_t, not size_t.
14917 All variadic functions and their callers changed accordingly.
14918 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
14919 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
14920 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
14921 * callint.c (Fcall_interactively): Check arg count for overflow,
14922 to avoid potential buffer overrun. Use signed char, not 'int',
14923 for 'varies' array, so that we needn't bother to check its size
14924 calculation for overflow.
14925 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
14926 * eval.c (apply_lambda):
14927 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
14928 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
14929 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
14931 * callint.c (Fcall_interactively): Don't use index var as event count.
14933 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
14934 * mem-limits.h (SIZE): Remove; no longer used.
14936 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
14938 Remove unnecessary casts.
14939 * xterm.c (x_term_init):
14940 * xfns.c (x_set_border_pixel):
14941 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
14942 These aren't needed now that we assume ANSI C.
14944 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
14945 It's more likely to cause problems (due to unsigned overflow)
14948 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
14950 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
14952 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
14954 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
14956 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
14958 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
14960 GLYPH_CODE_FACE returns EMACS_INT, not int.
14961 * dispextern.h (merge_faces):
14962 * xfaces.c (merge_faces):
14963 * xdisp.c (get_next_display_element, next_element_from_display_vector):
14964 Don't assume EMACS_INT fits in int.
14966 * character.h (CHAR_VALID_P): Remove unused parameter.
14967 * fontset.c, lisp.h, xdisp.c: All uses changed.
14969 * editfns.c (Ftranslate_region_internal): Omit redundant test.
14971 * fns.c (concat): Minor tuning based on overflow analysis.
14972 This doesn't fix any bugs. Use int to hold character, instead
14973 of constantly refetching from Emacs object. Use XFASTINT, not
14974 XINT, for value known to be a character. Don't bother comparing
14975 a single byte to 0400, as it's always less.
14977 * floatfns.c (Fexpt):
14978 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
14980 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
14983 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
14985 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
14986 Without this fix, on a 64-bit host (aset S 0 4294967386) would
14987 incorrectly succeed when S was a string, because 4294967386 was
14988 truncated before it was used.
14990 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
14991 Otherwise, an out-of-range integer could cause undefined behavior
14994 * composite.c: Use int, not EMACS_INT, for characters.
14995 (fill_gstring_body, composition_compute_stop_pos): Use int, not
14996 EMACS_INT, for values that are known to be in character range.
14997 This doesn't fix any bugs but is the usual style inside Emacs and
14998 may generate better code on 32-bit machines.
15000 Make sure a 64-bit char is never passed to ENCODE_CHAR.
15001 This is for reasons similar to the recent CHAR_STRING fix.
15002 * charset.c (Fencode_char): Check that character arg is actually
15003 a character. Pass an int to ENCODE_CHAR.
15004 * charset.h (ENCODE_CHAR): Verify that the character argument is no
15005 wider than 'int', as a compile-time check to prevent future regressions
15008 * character.c (char_string): Remove unnecessary casts.
15010 Make sure a 64-bit char is never passed to CHAR_STRING.
15011 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
15012 by silently ignoring the top 32 bits, allowing some values
15013 that were far too large to be valid characters.
15014 * character.h: Include <verify.h>.
15015 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
15016 arguments are no wider than unsigned, as a compile-time check
15017 to prevent future regressions in this area.
15019 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
15020 (Fsubst_char_in_region):
15022 * xdisp.c (decode_mode_spec_coding):
15023 Adjust to CHAR_STRING's new requirement.
15024 * editfns.c (Finsert_char, Fsubst_char_in_region):
15025 * fns.c (concat): Check that character args are actually
15026 characters. Without this test, these functions did the wrong
15027 thing with wildly out-of-range values on 64-bit hosts.
15029 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
15030 These casts should not be needed on 32-bit hosts, either.
15031 * keyboard.c (read_char):
15032 * lread.c (Fload): Remove casts to unsigned.
15034 * lisp.h (UNSIGNED_CMP): New macro.
15035 This fixes comparison bugs on 64-bit hosts.
15036 (ASCII_CHAR_P): Use it.
15037 * casefiddle.c (casify_object):
15038 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
15039 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
15040 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
15041 * dispextern.h (FACE_FROM_ID):
15042 * keyboard.c (read_char): Use UNSIGNED_CMP.
15044 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
15045 not to EMACS_INT, to avoid GCC warning.
15047 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
15049 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
15050 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
15051 isn't needed on 32-bit machines.
15053 * buffer.c (Fgenerate_new_buffer_name):
15054 Use EMACS_INT for count, not int.
15055 (advance_to_char_boundary): Return EMACS_INT, not int.
15057 * data.c (Qcompiled_function): Now static.
15059 * window.c (window_body_lines): Now static.
15061 * image.c (gif_load): Rename local to avoid shadowing.
15063 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
15064 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
15065 * alloc.c (make_save_value): Integer argument is now of type
15066 ptrdiff_t, not int.
15067 (mark_object): Use ptrdiff_t, not int.
15068 * lisp.h (pD): New macro.
15069 * print.c (print_object): Use it.
15071 * alloc.c: Use EMACS_INT, not int, to count objects.
15072 (total_conses, total_markers, total_symbols, total_vector_size)
15073 (total_free_conses, total_free_markers, total_free_symbols)
15074 (total_free_floats, total_floats, total_free_intervals)
15075 (total_intervals, total_strings, total_free_strings):
15076 Now EMACS_INT, not int. All uses changed.
15077 (Fgarbage_collect): Compute overall total using a double, so that
15078 integer overflow is less likely to be a problem. Check for overflow
15079 when converting back to an integer.
15080 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
15081 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
15082 These were 'int' variables that could overflow on 64-bit hosts;
15083 they were never used, so remove them instead of repairing them.
15084 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
15085 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
15086 Previously, this ceilinged at INT_MAX, but that doesn't work on
15088 (allocate_pseudovector): Don't use EMACS_INT when int would do.
15090 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
15091 (allocate_vectorlike): Check for ptrdiff_t overflow.
15092 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
15093 when a (possibly-narrower) signed value would do just as well.
15094 We prefer using signed arithmetic, to avoid comparison confusion.
15096 * alloc.c: Catch some string size overflows that we were missing.
15097 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
15098 for convenience in STRING_BYTES_MAX.
15099 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
15100 The definition here is exact; the one in lisp.h was approximate.
15101 (allocate_string_data): Check for string overflow. This catches
15102 some instances we weren't catching before. Also, it catches
15103 size_t overflow on (unusual) hosts where SIZE_MAX <= min
15104 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
15105 and ptrdiff_t and EMACS_INT are both 64 bits.
15107 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
15108 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
15109 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
15111 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
15113 * alloc.c (Fmake_string): Check for out-of-range init.
15115 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
15117 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
15119 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
15121 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
15122 xg_get_default_scrollbar_width.
15124 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
15125 (int_gtk_range_get_value): Move to the scroll bar part of the file.
15126 (style_changed_cb): Call update_theme_scrollbar_width and call
15127 x_set_scroll_bar_default_width and xg_frame_set_char_size for
15128 all frames (Bug#8505).
15129 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
15130 Call gtk_window_set_resizable if HAVE_GTK3.
15131 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
15132 and height if HAVE_GTK3 (Bug#8505).
15133 (scroll_bar_width_for_theme): New variable.
15134 (update_theme_scrollbar_width): New function.
15135 (xg_get_default_scrollbar_width): Move code to
15136 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
15137 (xg_initialize): Call update_theme_scrollbar_width.
15139 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
15141 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
15143 2011-06-12 Martin Rudalics <rudalics@gmx.at>
15145 * frame.c (make_frame): Call other_buffer_safely instead of
15148 * window.c (temp_output_buffer_show): Call display_buffer with
15149 second argument Vtemp_buffer_show_specifiers and reset latter
15150 immediately after the call.
15151 (Vtemp_buffer_show_specifiers): New variable.
15152 (auto_window_vscroll_p, next_screen_context_lines)
15153 (Vscroll_preserve_screen_position): Remove leading asterisks from
15156 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
15158 Fix minor problems found by GCC 4.6.0 static checking.
15159 * buffer.c (Qclone_number): Remove for now, as it's unused.
15160 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
15161 (record_buffer): Remove unused local.
15162 * frame.c (other_visible_frames, frame_buffer_list): Now static.
15163 (set_frame_buffer_list): Remove; unused.
15164 * frame.h (other_visible_frames): Remove decl.
15165 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
15166 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
15167 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
15169 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
15170 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
15171 Define only if HAVE_GPM.
15172 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
15173 (update_hints_inhibit): Remove; never set. All uses removed.
15174 * widgetprv.h (emacsFrameClassRec): Remove decl.
15175 * window.c (delete_deletable_window): Now returns void, since it
15176 wasn't returning anything.
15177 (compare_window_configurations): Remove unused locals.
15178 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
15179 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
15180 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
15181 the same widths as pointers. This follows up on the 2011-05-06 patch.
15182 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
15183 * xterm.h: Likewise.
15184 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
15186 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
15188 * makefile.w32-in: Update dependencies.
15189 (LISP_H): Add lib/intprops.h.
15191 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
15193 * image.c (gif_load): Add animation frame delay to the metadata.
15194 (syms_of_image): Use DEFSYM. New symbol `delay'.
15196 2011-06-11 Martin Rudalics <rudalics@gmx.at>
15198 * window.c (delete_deletable_window): Re-add.
15199 (Fset_window_configuration): Rewrite to handle dead buffers and
15200 consequently deletable windows.
15201 (window_tree, Fwindow_tree): Remove. Supply functionality in
15203 (compare_window_configurations): Simplify code.
15205 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
15207 * image.c (imagemagick_load_image): Fix type mismatch.
15208 (Fimagemagick_types): Likewise.
15210 * window.h (replace_buffer_in_windows): Declare.
15212 2011-06-11 Martin Rudalics <rudalics@gmx.at>
15214 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
15215 Qclone_number. Remove external declaration of Qdelete_window.
15216 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
15218 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
15219 Run Qbuffer_list_update_hook if allowed.
15220 (Fother_buffer): Rewrite doc-string. Major rewrite for new
15221 buffer list implementation.
15222 (other_buffer_safely): New function.
15223 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
15224 calls to replace_buffer_in_windows and
15225 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
15227 (record_buffer): Inhibit quitting and rewrite using quittable
15228 functions. Run Qbuffer_list_update_hook if allowed.
15229 (Frecord_buffer, Funrecord_buffer): New functions.
15230 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
15231 Move switch-to-buffer to window.el.
15232 (bury-buffer): Move to window.el.
15233 (Vbuffer_list_update_hook): New variable.
15235 * lisp.h (other_buffer_safely): Add prototype in buffer.c
15238 * window.h (resize_frame_windows): Move up in code.
15239 (Fwindow_frame): Remove EXFUN.
15240 (replace_buffer_in_all_windows): Remove prototype.
15241 (replace_buffer_in_windows_safely): Add prototype.
15243 * window.c: Declare Qdelete_window static again. Move down
15244 declaration of select_count.
15245 (Fnext_window, Fprevious_window): Rewrite doc-strings.
15246 (Fother_window): Move to window.el.
15247 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
15248 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
15249 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
15251 (replace_buffer_in_windows): Implement by calling
15252 Qreplace_buffer_in_windows.
15253 (replace_buffer_in_all_windows): Remove with some functionality
15254 moved into replace_buffer_in_windows_safely.
15255 (replace_buffer_in_windows_safely): New function.
15256 (select_window_norecord, select_frame_norecord): Move in front
15257 of run_window_configuration_change_hook. Remove now obsolete
15259 (Fset_window_buffer): Rewrite doc-string.
15260 Call Qrecord_window_buffer.
15261 (keys_of_window): Move binding for other-window to window.el.
15263 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
15265 * dispextern.h (struct image): Replace data member, whose int_val
15266 and ptr_val fields were not used by anything, with a single
15269 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
15270 (gif_clear_image, gif_load, imagemagick_load_image)
15271 (gs_clear_image, gs_load): Callers changed.
15273 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
15275 * buffer.h: Include <time.h>, for time_t.
15276 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
15278 Fix minor problems found by static checking.
15280 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
15282 Make identifiers static if they are not used in other modules.
15283 * data.c (Qcompiled_function, Qframe, Qvector):
15284 * image.c (QimageMagick, Qsvg):
15285 * minibuf.c (Qmetadata):
15286 * window.c (resize_window_check, resize_root_window): Now static.
15287 * window.h (resize_window_check, resize_root_window): Remove decls.
15289 * window.c (window_deletion_count, delete_deletable_window):
15291 (window_body_lines): Now static.
15292 (Fdelete_other_windows_internal): Mark vars as initialized.
15293 Make sure 'resize_failed' is initialized.
15294 (run_window_configuration_change_hook): Rename local to avoid shadowing.
15295 (resize_window_apply): Remove unused local.
15296 * window.h (delete_deletable_window): Remove decl.
15298 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
15299 (imagemagick_load_image): Fix pointer signedness problem by changing
15300 last arg from unsigned char * to char *. All uses changed.
15301 Also, fix a local for similar reasons.
15302 Remove unused locals. Remove locals to avoid shadowing.
15303 (fn_rsvg_handle_free): Remove; unused.
15304 (svg_load, svg_load_image): Fix pointer signedness problem.
15305 (imagemagick_load_image): Don't use garbage pointer image_wand.
15307 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
15309 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
15311 * image.c (gif_load): Fix omitted cast error introduced by
15314 2011-06-10 Martin Rudalics <rudalics@gmx.at>
15316 * window.h (resize_proportionally, orig_total_lines)
15317 (orig_top_line): Remove from window structure.
15318 (set_window_height, set_window_width, change_window_heights)
15319 (Fdelete_window): Remove prototypes.
15320 (resize_frame_windows): Remove duplicate declaration.
15322 2011-06-10 Eli Zaretskii <eliz@gnu.org>
15324 * window.h (resize_frame_windows, resize_window_check)
15325 (delete_deletable_window, resize_root_window)
15326 (resize_frame_windows): Declare prototypes.
15328 * window.c (resize_window_apply): Make definition be "static" to
15329 match the prototype.
15331 2011-06-10 Martin Rudalics <rudalics@gmx.at>
15333 * window.c: Remove declarations of Qwindow_size_fixed,
15334 window_min_size_1, window_min_size_2, window_min_size,
15335 size_window, window_fixed_size_p, enlarge_window, delete_window.
15336 Remove static from declaration of Qdelete_window, it's
15337 temporarily needed by Fbury_buffer.
15338 (replace_window): Don't assign orig_top_line and
15340 (Fdelete_window, delete_window): Remove. Window deletion is
15341 handled by window.el.
15342 (window_loop): Remove DELETE_OTHER_WINDOWS case.
15343 Replace Fdelete_window calls with calls to Qdelete_window.
15344 (Fdelete_other_windows): Remove. Deleting other windows is
15345 handled by window.el.
15346 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
15347 handled in window.el.
15348 (window_min_size_2, window_min_size_1, window_min_size): Remove.
15349 Window minimum sizes are handled in window.el.
15350 (shrink_windows, size_window, set_window_height)
15351 (set_window_width, change_window_heights, window_height)
15352 (window_width, CURBEG, CURSIZE, enlarge_window)
15353 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
15354 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
15355 handled in window.el.
15356 (make_dummy_parent): Rename to make_parent_window and give it a
15357 second argument horflag.
15358 (make_window): Don't set resize_proportionally any more.
15359 (Fsplit_window): Remove. Windows are split in window.el.
15360 (save_restore_action, save_restore_orig_size)
15361 (shrink_window_lowest_first, save_restore_orig_size): Remove.
15362 Resize mini windows in window.el.
15363 (grow_mini_window, shrink_mini_window): Implement by calling
15364 Qresize_root_window_vertically, resize_window_check and
15365 resize_window_apply.
15366 (saved_window, Fset_window_configuration, save_window_save):
15367 Do not handle orig_top_line, orig_total_lines, and
15368 resize_proportionally.
15369 (window_min_height, window_min_width): Move to window.el.
15370 (keys_of_window): Move bindings for delete-other-windows,
15371 split-window, delete-window and enlarge-window to window.el.
15373 * buffer.c: Temporarily extern Qdelete_window.
15374 (Fbury_buffer): Temporarily call Qdelete_window instead of
15375 Fdelete_window (Fbury_buffer will move to window.el soon).
15377 * frame.c (set_menu_bar_lines_1): Remove code handling
15378 orig_top_line and orig_total_lines.
15380 * dispnew.c (adjust_frame_glyphs_initially): Don't use
15381 set_window_height but set heights directly.
15382 (change_frame_size_1): Use resize_frame_windows.
15384 * xdisp.c (init_xdisp): Don't use set_window_height but set
15387 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
15388 Use resize_frame_windows instead of change_window_heights and run
15389 run_window_configuration_change_hook.
15391 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
15392 instead of change_window_heights and run
15393 run_window_configuration_change_hook.
15395 2011-06-09 Martin Rudalics <rudalics@gmx.at>
15397 * window.c (replace_window): Rename second argument REPLACEMENT to
15398 NEW. New third argument SETFLAG. Rewrite.
15399 (delete_window, make_dummy_parent): Call replace_window with
15401 (window_list_1): Move down in code.
15402 (run_window_configuration_change_hook): Move set_buffer part
15403 before select_frame_norecord part in order to unwind correctly.
15404 Rename count1 to count.
15405 (recombine_windows, delete_deletable_window, resize_root_window)
15406 (Fdelete_other_windows_internal)
15407 (Frun_window_configuration_change_hook, make_parent_window)
15408 (resize_window_check, resize_window_apply, Fresize_window_apply)
15409 (resize_frame_windows, Fsplit_window_internal)
15410 (Fdelete_window_internal, Fresize_mini_window_internal):
15412 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
15414 2011-06-08 Martin Rudalics <rudalics@gmx.at>
15416 * window.h (window): Add some new members to window structure -
15417 normal_lines, normal_cols, new_total, new_normal, clone_number,
15418 splits, nest, prev_buffers, next_buffers.
15419 (WINDOW_TOTAL_SIZE): Move here from window.c.
15420 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
15422 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
15424 (make_dummy_parent): Set new members of windows structure.
15425 (make_window): Move down in code. Handle new members of window
15427 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
15428 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
15429 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
15430 (Fset_window_prev_buffers, Fwindow_next_buffers)
15431 (Fset_window_next_buffers, Fset_window_clone_number):
15433 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
15434 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
15436 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
15437 Argument WINDOW can be now internal window too.
15438 (Fwindow_use_time): Move up in code.
15439 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
15440 Rewrite doc-string.
15441 (Fset_window_configuration, saved_window)
15442 (Fcurrent_window_configuration, save_window_save): Handle new
15443 members of window structure.
15444 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
15445 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
15446 (syms_of_window): New Lisp objects Qrecord_window_buffer,
15447 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
15448 Qget_mru_window, Qresize_root_window,
15449 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
15450 Qauto_buffer_name; staticpro them.
15452 2011-06-07 Martin Rudalics <rudalics@gmx.at>
15454 * window.c (Fwindow_total_size, Fwindow_left_column)
15455 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
15456 (Fwindow_list_1): New functions.
15457 (window_box_text_cols): Replace with window_body_cols.
15458 (Fwindow_width, Fscroll_left, Fscroll_right):
15459 Use window_body_cols instead of window_box_text_cols.
15460 (delete_window, Fset_window_configuration):
15461 Call delete_all_subwindows with window as argument.
15462 (delete_all_subwindows): Take a window as argument and not a
15463 structure. Rewrite.
15464 (window_loop): Remove handling of GET_LRU_WINDOW and
15465 GET_LARGEST_WINDOW.
15466 (Fget_lru_window, Fget_largest_window): Move to window.el.
15468 * window.h: Extern window_body_cols instead of
15469 window_box_text_cols. delete_all_subwindows now takes a
15470 Lisp_Object as argument.
15472 * indent.c (compute_motion, Fcompute_motion):
15473 Use window_body_cols instead of window_box_text_cols.
15475 * frame.c (delete_frame): Call delete_all_subwindows with root
15476 window as argument.
15478 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
15480 * fns.c (Fputhash): Document return value.
15482 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
15484 * image.c (gif_load): Implement gif89a spec "no disposal" method.
15486 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15488 Cons<->int and similar integer overflow fixes (Bug#8794).
15490 Check for overflow when converting integer to cons and back.
15491 * charset.c (Fdefine_charset_internal, Fdecode_char):
15492 Use cons_to_unsigned to catch overflow.
15493 (Fencode_char): Use INTEGER_TO_CONS.
15494 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
15495 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
15496 * data.c (long_to_cons, cons_to_long): Remove.
15497 (cons_to_unsigned, cons_to_signed): New functions.
15498 These signal an error for invalid or out-of-range values.
15499 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
15500 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
15501 * font.c (Ffont_variation_glyphs):
15502 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
15503 * lisp.h: Include <intprops.h>.
15504 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
15505 (cons_to_signed, cons_to_unsigned): New decls.
15506 (long_to_cons, cons_to_long): Remove decls.
15507 * undo.c (record_first_change): Use INTEGER_TO_CONS.
15508 (Fprimitive_undo): Use CONS_TO_INTEGER.
15509 * xfns.c (Fx_window_property): Likewise.
15510 * xselect.c: Include <limits.h>.
15511 (x_own_selection, selection_data_to_lisp_data):
15512 Use INTEGER_TO_CONS.
15513 (x_handle_selection_request, x_handle_selection_clear)
15514 (x_get_foreign_selection, Fx_disown_selection_internal)
15515 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
15516 (lisp_data_to_selection_data): Use cons_to_unsigned.
15517 (x_fill_property_data): Use cons_to_signed.
15518 Report values out of range.
15520 Check for buffer and string overflow more precisely.
15521 * buffer.h (BUF_BYTES_MAX): New macro.
15522 * lisp.h (STRING_BYTES_MAX): New macro.
15523 * alloc.c (Fmake_string):
15524 * character.c (string_escape_byte8):
15525 * coding.c (coding_alloc_by_realloc):
15526 * doprnt.c (doprnt):
15527 * editfns.c (Fformat):
15529 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
15530 since they may not be the same number.
15531 * editfns.c (Finsert_char):
15532 * fileio.c (Finsert_file_contents):
15533 Likewise for BUF_BYTES_MAX.
15535 * image.c: Use ptrdiff_t, not int, for sizes.
15536 (slurp_file): Switch from int to ptrdiff_t.
15538 (slurp_file): Check that file size fits in both size_t (for
15539 malloc) and ptrdiff_t (for sanity and safety).
15541 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
15542 if b->modtime has its maximal value.
15544 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
15546 Don't assume time_t can fit into int.
15547 * buffer.h (struct buffer.modtime): Now time_t, not int.
15548 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
15549 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
15551 Minor fixes for signed vs unsigned integers.
15552 * character.h (MAYBE_UNIFY_CHAR):
15553 * charset.c (maybe_unify_char):
15554 * keyboard.c (read_char, reorder_modifiers):
15555 XINT -> XFASTINT, since the integer must be nonnegative.
15556 * ftfont.c (ftfont_spec_pattern):
15557 * keymap.c (access_keymap, silly_event_symbol_error):
15558 XUINT -> XFASTINT, since the integer must be nonnegative.
15559 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
15560 since it makes no difference and we prefer signed.
15561 * keyboard.c (record_char): Use XUINT when all the neighbors do.
15562 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
15565 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
15567 * window.h (Fwindow_frame): Declare.
15569 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15571 * alloc.c: Simplify handling of large-request failures (Bug#8800).
15572 (SPARE_MEMORY): Always define.
15573 (LARGE_REQUEST): Remove.
15574 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
15576 2011-06-06 Martin Rudalics <rudalics@gmx.at>
15578 * lisp.h: Move EXFUNS for Fframe_root_window,
15579 Fframe_first_window and Fset_frame_selected_window to window.h.
15581 * window.h: Move EXFUNS for Fframe_root_window,
15582 Fframe_first_window and Fset_frame_selected_window here from
15585 * frame.c (Fwindow_frame, Fframe_first_window)
15586 (Fframe_root_window, Fframe_selected_window)
15587 (Fset_frame_selected_window): Move to window.c.
15588 (Factive_minibuffer_window): Move to minibuf.c.
15589 (Fother_visible_frames_p): New function.
15591 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
15593 * window.c (decode_window, decode_any_window): Move up in code.
15594 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
15595 (inhibit_frame_unsplittable): Remove unused variable.
15596 (Fwindow_buffer): Move up and rewrite doc-string.
15597 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
15598 (Fwindow_prev): New functions.
15599 (Fwindow_frame): Move here from frame.c. Accept any window as
15601 (Fframe_root_window, Fframe_first_window)
15602 (Fframe_selected_window): Move here from frame.c. Accept frame
15603 or arbitrary window as argument. Update doc-strings.
15604 (Fminibuffer_window): Move up in code.
15605 (Fwindow_minibuffer_p): Move up in code and simplify.
15606 (Fset_frame_selected_window): Move here from frame.c.
15608 (Fselected_window, select_window, Fselect_window): Move up in
15609 code. Minor doc-string fixes.
15611 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15613 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
15614 Do not assume that spare memory exists; that assumption is valid
15615 only if SYSTEM_MALLOC.
15616 (LARGE_REQUEST): New macro, so that the issue of large requests
15617 is separated from the issue of spare memory.
15619 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
15621 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
15624 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
15626 * xfns.c (x_set_scroll_bar_default_width): Move declarations
15629 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
15631 * gtkutil.c (xg_get_default_scrollbar_width): New function.
15633 * gtkutil.h: Declare xg_get_default_scrollbar_width.
15635 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
15636 min width by calling x_set_scroll_bar_default_width (Bug#8505).
15638 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
15640 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
15642 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
15644 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
15645 (x_clipboard_manager_save): Add return value.
15646 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
15647 New error handlers.
15648 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
15649 Obey Vx_select_enable_clipboard_manager. Catch errors in
15650 x_clipboard_manager_save (Bug#8779).
15651 (Vx_select_enable_clipboard_manager): New variable.
15652 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
15654 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
15656 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
15658 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15660 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
15661 in the current matrix if keep_current_p is non-zero.
15663 2011-06-04 Eli Zaretskii <eliz@gnu.org>
15665 * bidi.c (bidi_level_of_next_char): Fix last change.
15667 2011-06-03 Eli Zaretskii <eliz@gnu.org>
15669 Support bidi reordering of text covered by display properties.
15671 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
15672 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
15673 (bidi_cache_search, bidi_cache_iterator_state)
15674 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
15675 (bidi_level_of_next_char, bidi_move_to_visually_next):
15676 Support character positions inside a run of characters covered by a
15678 (bidi_paragraph_init, bidi_resolve_explicit_1)
15679 (bidi_level_of_next_char): Call bidi_fetch_char and
15680 bidi_fetch_char_advance instead of FETCH_CHAR and
15681 FETCH_CHAR_ADVANCE.
15682 (bidi_init_it): Initialize new members.
15683 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
15685 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
15686 instead of using explicit *_CHAR codes.
15687 (bidi_resolve_explicit, bidi_resolve_weak):
15688 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
15689 bidirectional text is supported only in multibyte buffers.
15690 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
15691 it to initialize the frame_window_p member of struct bidi_it.
15692 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
15693 (bidi_resolve_explicit, bidi_resolve_weak)
15694 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
15695 bidi_it->nchars is non-positive.
15696 (bidi_level_of_next_char): Don't try to lookup the cache for the
15697 next/previous character if nothing is cached there yet, or if we
15698 were just reseat()'ed to a new position.
15700 * xdisp.c (set_cursor_from_row): Set start and stop points
15701 according to the row's direction when priming the loop that looks
15702 for the glyph on which to display cursor.
15703 (single_display_spec_intangible_p): Function deleted.
15704 (display_prop_intangible_p): Reimplement to call
15705 handle_display_spec instead of single_display_spec_intangible_p.
15706 Accept 3 additional arguments needed by handle_display_spec.
15707 This fixes incorrect cursor motion across display property with complex
15708 values: lists, `(when COND...)' forms, etc.
15709 (single_display_spec_string_p): Support property values that are
15710 lists with the argument STRING its top-level element.
15711 (display_prop_string_p): Fix the condition for processing a
15712 property that is a list to be consistent with handle_display_spec.
15713 (handle_display_spec): New function, refactored from the
15714 last portion of handle_display_prop.
15715 (compute_display_string_pos): Accept additional argument
15716 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
15717 value of a `display' property is a "replacing spec".
15718 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
15719 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
15720 the display property, but just return a value indicating whether
15721 the display property will replace the characters it covers.
15722 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
15723 frame_window_p members of struct bidi_it.
15724 (compute_display_string_pos, compute_display_string_end):
15726 (push_it): Accept second argument POSITION, where pop_it should
15727 jump to continue iteration.
15728 (reseat_1): Initialize bidi_it.disp_pos.
15730 * keyboard.c (adjust_point_for_property): Adjust the call to
15731 display_prop_intangible_p to its new signature.
15733 * dispextern.h (struct bidi_it): New member frame_window_p.
15734 (bidi_init_it): Update prototypes.
15735 (display_prop_intangible_p): Update prototype.
15736 (compute_display_string_pos, compute_display_string_end):
15737 Declare prototypes.
15738 (struct bidi_it): New members nchars and disp_pos. ch_len is now
15741 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
15743 Malloc failure behavior now depends on size of allocation.
15744 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
15745 * lisp.h: Change signatures accordingly.
15746 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
15747 All callers changed. (Bug#8762)
15749 * gnutls.c: Use Emacs's memory allocators.
15750 Without this change, the gnutls library would invoke malloc etc.
15751 directly, which causes problems on non-SYNC_INPUT hosts, and which
15752 runs afoul of improving memory_full behavior. (Bug#8761)
15753 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
15754 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
15755 xfree instead of the default malloc, realloc, free.
15756 (Fgnutls_boot): No need to check for memory allocation failure,
15757 since xmalloc does that for us.
15759 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
15760 * category.c (hash_get_category_set):
15761 * ccl.c (ccl_driver):
15762 * charset.c (Fdefine_charset_internal):
15763 * charset.h (struct charset.hash_index):
15764 * composite.c (get_composition_id, gstring_lookup_cache)
15765 (composition_gstring_put_cache):
15766 * composite.h (struct composition.hash_index):
15767 * dispextern.h (struct image.hash):
15768 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
15769 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
15770 (hashfn_equal, hashfn_user_defined, make_hash_table)
15771 (maybe_resize_hash_table, hash_lookup, hash_put)
15772 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
15773 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
15774 (Fsxhash, Fgethash, Fputhash, Fmaphash):
15775 * image.c (make_image, search_image_cache, lookup_image)
15776 (xpm_put_color_table_h):
15777 * lisp.h (struct Lisp_Hash_Table):
15778 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
15779 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
15780 for hashes and hash indexes, instead of 'unsigned' and 'int'.
15781 * alloc.c (allocate_vectorlike):
15782 Check for overflow in vector size calculations.
15783 * ccl.c (ccl_driver):
15784 Check for overflow when converting EMACS_INT to int.
15785 * fns.c, image.c: Remove unnecessary static decls that would otherwise
15786 need to be updated by these changes.
15787 * fns.c (make_hash_table, maybe_resize_hash_table):
15788 Check for integer overflow with large hash tables.
15789 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
15790 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
15791 (SXHASH_REDUCE): New macro.
15792 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
15793 Use it instead of discarding useful hash info with large hash values.
15794 (sxhash_float): New function.
15795 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
15796 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
15797 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
15798 Rewrite to use FIXNUM_BITS, as this simplifies things.
15799 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
15800 Adjust signatures to match updated version of code.
15801 (consing_since_gc): Now EMACS_INT, since a single hash table can
15802 use more than INT_MAX bytes.
15804 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
15806 Make it possible to build with GCC-4.6+ -O2 -flto.
15808 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
15810 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
15812 * minibuf.c (get_minibuffer, read_minibuf_unwind):
15813 Call minibuffer-inactive-mode.
15815 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
15817 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
15818 Update dependencies.
15820 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15822 * data.c (init_data): Remove code for UTS, this system is not
15825 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15827 Don't force ./temacs to start in terminal mode.
15829 * frame.c (make_initial_frame): Initialize faces in all cases, not
15830 only when CANNOT_DUMP is defined.
15831 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
15833 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15835 * dispnew.c (add_window_display_history): Use const for the string
15836 pointer. Remove declaration, not needed.
15838 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15840 Use 'inline', not 'INLINE'.
15841 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
15842 * alloc.c, fontset.c (INLINE): Remove.
15843 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
15844 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
15845 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
15846 * gmalloc.c (register_heapinfo): Use inline unconditionally.
15847 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
15849 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15851 Make it possible to run ./temacs.
15853 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
15854 syms_of_callproc does the same thing. Remove test for
15855 "initialized", do it in the caller.
15856 * emacs.c (main): Avoid calling set_initial_environment when dumping.
15858 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
15860 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
15861 (read_minibuf): Use get_minibuffer.
15862 (syms_of_minibuf): Use DEFSYM.
15863 (Qmetadata): New var.
15864 * data.c (Qbuffer): Don't make it static.
15865 (syms_of_data): Use DEFSYM.
15867 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15869 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
15870 (CCL_CODE_MIN): New macro.
15872 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
15874 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
15876 * eval.c (Qdebug): Now static.
15877 * lisp.h (Qdebug): Remove decl. This reverts a part of the
15878 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
15879 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
15881 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
15883 * image.c: Various fixes to ImageMagick code comments.
15884 (Fimagemagick_types): Doc fix.
15886 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
15888 Minor fixes prompted by GCC 4.6.0 warnings.
15890 * xselect.c (converted_selections, conversion_fail_tag): Now static.
15892 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
15893 (x_clipboard_manager_save_all): Move extern decl to ...
15894 * xterm.h: ... here, so that it can be checked for consistency.
15896 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
15898 * xselect.c (x_clipboard_manager_save_frame)
15899 (x_clipboard_manager_save_all): New functions.
15900 (Fx_clipboard_manager_save): Lisp function deleted.
15902 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
15903 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
15905 * xterm.h: Update prototype.
15907 2011-05-28 William Xu <william.xwl@gmail.com>
15909 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
15910 exiting (Bug#8239).
15912 2011-05-28 Jim Meyering <meyering@redhat.com>
15914 Avoid a sign-extension bug in crypto_hash_function.
15915 * fns.c (to_uchar): Define.
15916 (crypto_hash_function): Use it to convert some newly-signed
15917 variables to unsigned, to avoid sign-extension bugs. For example,
15918 without this change, (md5 "truc") would evaluate to
15919 45723a2aff78ff4fff7fff1114760e62 rather than the expected
15920 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
15921 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
15923 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
15925 Integer overflow fixes.
15927 * dbusbind.c: Serial number integer overflow fixes.
15928 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
15929 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
15930 to hold a serial number that is too large for a fixnum.
15931 (Fdbus_method_return_internal, Fdbus_method_error_internal):
15932 Check for serial numbers out of range. Decode any serial number
15933 that was so large that it became a float. (Bug#8722)
15935 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
15936 (Fdbus_call_method, Fdbus_call_method_asynchronously):
15937 Use XFASTINT rather than XUINT when numbers are nonnegative.
15938 (xd_append_arg, Fdbus_method_return_internal):
15939 (Fdbus_method_error_internal): Likewise. Also, for unsigned
15940 arguments, check that Lisp number is nonnegative, rather than
15941 silently wrapping negative numbers around. (Bug#8722)
15942 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
15945 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
15947 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
15949 ccl: Add integer overflow checks.
15950 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
15951 (IN_INT_RANGE): New macros.
15952 (ccl_driver): Use them to check for integer overflow when
15953 decoding a CCL program. Many of the new checks are whether XINT (x)
15954 fits in int; it doesn't always, on 64-bit hosts. The new version
15955 doesn't catch all possible integer overflows, but it's an
15956 improvement. (Bug#8719)
15958 * alloc.c (make_event_array): Use XINT, not XUINT.
15959 There's no need for unsigned here.
15961 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
15962 This follows up to the 2011-05-06 change that substituted uintptr_t
15963 for EMACS_INT. This case wasn't caught back then.
15965 Rework Fformat to avoid integer overflow issues.
15966 * editfns.c: Include <float.h> unconditionally, as it's everywhere
15967 now (part of C89). Include <verify.h>.
15968 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
15969 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
15970 (Fformat): Avoid the prepass trying to compute sizes; it was only
15971 approximate and thus did not catch overflow reliably. Instead, walk
15972 through the format just once, formatting and computing sizes as we go,
15973 checking for integer overflow at every step, and allocating a larger
15974 buffer as needed. Keep track separately whether the format is
15975 multibyte. Keep only the most-recently calculated precision, rather
15976 than them all. Record whether each argument has been converted to
15977 string. Use EMACS_INT, not int, for byte and char and arg counts.
15978 Support field widths and precisions larger than INT_MAX. Avoid
15979 sprintf's undefined behavior with conversion specifications such as %#d
15980 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
15981 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
15982 formatting out-of-range floating point numbers with int
15983 formats. (Bug#8668)
15985 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
15987 * data.c: Avoid integer truncation in expressions involving floats.
15988 * data.c: Include <intprops.h>.
15989 (arith_driver): When there's an integer overflow in an expression
15990 involving floating point, convert the integers to floating point
15991 so that the resulting value does not suffer from catastrophic
15992 integer truncation. For example, on a 64-bit host (* 4
15993 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
15994 Do not rely on undefined behavior after integer overflow.
15996 merge count_size_as_multibyte, parse_str_to_multibyte
15997 * character.c, character.h (count_size_as_multibyte):
15998 Rename from parse_str_to_multibyte; all uses changed.
15999 Check for integer overflow.
16000 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
16001 since it's now a duplicate of the other. This is more of
16002 a character than a buffer op, so better that it's in character.c.
16003 * fns.c, print.c: Adjust to above changes.
16005 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
16007 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
16009 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
16011 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
16012 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
16013 (x_clipboard_manager_save): Now static.
16014 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
16016 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
16017 (crypto_hash_function): Now static.
16018 Fix pointer signedness problems. Avoid unnecessary initializations.
16020 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
16022 * termhooks.h (Vselection_alist): Make it terminal-local.
16024 * terminal.c (create_terminal): Initialize it.
16026 * xselect.c: Support for clipboard managers.
16027 (Vselection_alist): Move to termhooks.h as terminal-local var.
16028 (LOCAL_SELECTION): New macro.
16029 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
16030 (symbol_to_x_atom): Remove gratuitous arg.
16031 (x_handle_selection_request, lisp_data_to_selection_data)
16032 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
16033 (x_own_selection, x_get_local_selection, x_convert_selection):
16034 New arg, specifying work frame. Use terminal-local Vselection_alist.
16035 (some_frame_on_display): Delete unused function.
16036 (Fx_own_selection_internal, Fx_get_selection_internal)
16037 (Fx_disown_selection_internal, Fx_selection_owner_p)
16038 (Fx_selection_exists_p): New optional frame arg.
16039 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
16040 (x_handle_selection_clear): Don't treat other terminals with the
16041 same keyboard specially. Use the terminal-local Vselection_alist.
16042 (x_clear_frame_selections): Use Frun_hook_with_args.
16044 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
16046 * xterm.h: Add support for those atoms.
16048 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
16050 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
16051 (converted_selections, conversion_fail_tag): New global variables.
16052 (x_selection_request_lisp_error): Free the above.
16053 (x_get_local_selection): Remove unnecessary code.
16054 (x_reply_selection_request): Args changed; handle arbitrary array
16055 of converted selections stored in converted_selections.
16056 Separate the XChangeProperty and SelectionNotify steps.
16057 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
16058 (x_convert_selection): New function.
16059 (x_handle_selection_event): Simplify.
16060 (x_get_foreign_selection): Don't ignore incoming requests while
16061 waiting for an answer; this will fail when we implement
16062 SAVE_TARGETS, and seems unnecessary anyway.
16063 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
16064 (Vx_sent_selection_functions): Doc fix.
16066 2011-05-26 Leo Liu <sdl.web@gmail.com>
16068 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
16070 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16072 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
16074 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
16075 for fringe update if it has periodic bitmap.
16076 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
16077 and fringe_bitmap_periodic_p.
16079 * fringe.c (get_fringe_bitmap_data): New function.
16080 (draw_fringe_bitmap_1, update_window_fringes): Use it.
16081 (update_window_fringes): Record periodicity of fringe bitmap in glyph
16082 row. Mark glyph row for fringe update if periodicity changed.
16084 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
16085 for fringe update unless it has periodic bitmap.
16087 2011-05-25 Kenichi Handa <handa@m17n.org>
16089 * xdisp.c (get_next_display_element): Set correct it->face_id for
16090 a static composition.
16092 2011-05-24 Leo Liu <sdl.web@gmail.com>
16095 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
16097 * fns.c (crypto_hash_function, Fsha1): New function.
16098 (Fmd5): Use crypto_hash_function.
16099 (syms_of_fns): Add Ssha1.
16101 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
16103 * gnutls.c: Remove unused macros.
16104 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
16105 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
16106 Remove macros that are defined and never used.
16107 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
16109 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
16111 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
16112 (Fx_get_selection_internal): Minor cleanup.
16113 (Fx_own_selection_internal): Rename arguments for consistency with
16116 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
16118 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
16120 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
16122 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
16124 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16126 * dispnew.c (scrolling_window): Don't exclude the case that the
16127 last enabled row in the desired matrix touches the bottom boundary.
16129 2011-05-21 Glenn Morris <rgm@gnu.org>
16131 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
16132 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
16133 and add some more files.
16135 2011-05-20 Eli Zaretskii <eliz@gnu.org>
16137 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
16138 report_file_error introduced by the change from 2011-05-07.
16140 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
16142 * systime.h (Time): Define only if emacs is defined.
16143 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
16144 where the include path doesn't have X11/X.h by default. See
16145 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
16147 2011-05-20 Kenichi Handa <handa@m17n.org>
16149 * composite.c (find_automatic_composition): Fix previous change.
16151 2011-05-20 Glenn Morris <rgm@gnu.org>
16153 * lisp.mk: New file, split from Makefile.in.
16154 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
16155 (shortlisp): Remove.
16156 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
16158 2011-05-19 Glenn Morris <rgm@gnu.org>
16160 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
16161 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
16162 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
16163 (lisp): Set the order to that of loadup.el.
16164 (shortlisp): Make it a copy of $lisp.
16165 (SOME_MACHINE_LISP): Remove.
16166 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
16167 Use just $shortlisp, not $SOME_MACHINE_LISP too.
16169 2011-05-18 Kenichi Handa <handa@m17n.org>
16171 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
16172 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
16173 (find_automatic_composition): Mostly rewrite for efficiency.
16175 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
16177 * makefile.w32-in: Update dependencies.
16179 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
16181 * menu.c: Include limits.h (fixes the MS-Windows build broken by
16182 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
16184 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
16186 Fix some integer overflow issues, such as string length overflow.
16188 * insdel.c (count_size_as_multibyte): Check for string overflow.
16190 * character.c (lisp_string_width): Check for string overflow.
16191 Use EMACS_INT, not int, for string indexes and lengths; in
16192 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
16193 the resulting string length overflows an EMACS_INT; instead,
16194 report a string overflow if no precision given. When checking for
16195 precision exhaustion, use a check that cannot possibly have
16196 integer overflow. (Bug#8675)
16197 * character.h (lisp_string_width): Adjust to new signature.
16199 * alloc.c (string_overflow): New function.
16200 (Fmake_string): Use it. This doesn't change behavior, but saves
16201 a few bytes and will simplify future changes.
16202 * character.c (string_escape_byte8): Likewise.
16203 * lisp.h (string_overflow): New decl.
16205 Fixups, following up to the user-interface timestamp change.
16206 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
16207 for UI timestamps, instead of unsigned long.
16208 * msdos.c (mouse_get_pos): Likewise.
16209 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
16210 * w32gui.h (Time): Define by including "systime.h" rather than by
16211 declaring it ourselves. (Bug#8664)
16213 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
16214 * image.c (clear_image_cache): Likewise.
16216 * term.c (term_mouse_position): Don't assume time_t wraparound.
16218 Be more systematic about user-interface timestamps.
16219 Before, the code sometimes used 'Time', sometimes 'unsigned long',
16220 and sometimes 'EMACS_UINT', to represent these timestamps.
16221 This change causes it to use 'Time' uniformly, as that's what X uses.
16222 This makes the code easier to follow, and makes it easier to catch
16223 integer overflow bugs such as Bug#8664.
16224 * frame.c (Fmouse_position, Fmouse_pixel_position):
16225 Use Time, not unsigned long, for user-interface timestamps.
16226 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
16227 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
16228 * keyboard.h (last_event_timestamp): Likewise.
16229 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
16230 * menu.h (xmenu_show): Likewise.
16231 * term.c (term_mouse_position): Likewise.
16232 * termhooks.h (struct input_event.timestamp): Likewise.
16233 (struct terminal.mouse_position_hook): Likewise.
16234 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
16235 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
16236 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
16237 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
16238 what it was before.
16239 * menu.h, termhooks.h: Include "systime.h", for Time.
16241 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
16242 Don't assume that the difference between two unsigned long values
16243 can fit into an integer. At this point, we know button_down_time
16244 <= event->timestamp, so the difference must be nonnegative, so
16245 there's no need to cast the result if double-click-time is
16246 nonnegative, as it should be; check that it's nonnegative, just in
16247 case. This bug is triggered when events are more than 2**31 ms
16248 apart (about 25 days). (Bug#8664)
16250 * xselect.c (last_event_timestamp): Remove duplicate decl.
16251 (x_own_selection): Remove needless cast to unsigned long.
16253 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
16254 that always fit in int. Use a sentinel instead of a counter, to
16255 avoid a temp and to allay GCC's concerns about possible int overflow.
16256 * frame.h (struct frame): Use int for menu_bar_items_used
16257 instead of EMACS_INT, since it always fits in int.
16259 * menu.c (grow_menu_items): Check for int overflow.
16261 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
16263 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
16264 Before, the code was not consistent. These values cannot exceed
16265 2**31 - 1 so there's no need to make them unsigned.
16266 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
16267 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
16268 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
16270 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
16272 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
16273 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
16274 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
16275 presumably because the widths might not match.
16277 * window.c (size_window): Avoid needless test at loop start.
16279 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
16281 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
16283 2011-05-12 Drew Adams <drew.adams@oracle.com>
16285 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
16287 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16289 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
16290 `width' to `bar_area_x' and `bar_area_width', respectively.
16291 (x_scroll_run): Take account of fringe background extension.
16293 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
16294 Rename local vars `left' and `width' to `bar_area_x' and
16295 `bar_area_width', respectively.
16296 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
16297 background extension.
16299 2011-05-10 Jim Meyering <meyering@redhat.com>
16301 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
16303 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
16305 * image.c (Finit_image_library): Return t for built-in image types,
16306 like pbm and xbm. (Bug#8640)
16308 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
16310 * w32menu.c (set_frame_menubar): Fix submenu allocation.
16312 2011-05-07 Eli Zaretskii <eliz@gnu.org>
16314 * w32console.c (Fset_screen_color): Doc fix.
16315 (Fget_screen_color): New function.
16316 (syms_of_ntterm): Defsubr it.
16318 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
16319 unlink the temporary file if Fcall_process didn't create it in the
16321 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
16322 child process will be redirected to a file specified with `:file'.
16323 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
16324 cue to call_process_cleanup not to close that handle.
16326 2011-05-07 Ben Key <bkey76@gmail.com>
16328 * makefile.w32-in: The bootstrap-temacs rule now makes use of
16329 one of two shell specific rules, either bootstrap-temacs-CMD or
16330 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
16331 to the previous implementation of the bootstrap-temacs rule.
16332 The bootstrap-temacs-CMD rule is similar to the previous
16333 implementation of the bootstrap-temacs rule except that it
16334 makes use of the ESC_CFLAGS variable instead of the CFLAGS
16337 These changes, along with some changes to nt/configure.bat,
16338 nt/gmake.defs, and nt/nmake.defs, are required to extend my
16339 earlier fix to add support for --cflags and --ldflags options
16340 that include quotes so that it works whether make uses cmd or
16343 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
16345 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
16346 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
16348 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
16349 a string. Handle both cases.
16350 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
16351 (Fdbus_register_method): Use Qinvalid_function.
16353 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
16355 * makefile.w32-in: Update dependencies.
16356 (LISP_H): Add inttypes.h and stdin.h.
16357 (PROCESS_H): Add unistd.h.
16359 2011-05-06 Eli Zaretskii <eliz@gnu.org>
16361 * lread.c: Include limits.h (fixes the MS-Windows build broken by
16362 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
16364 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
16366 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
16368 * term.c (vfatal): Remove stray call to va_end.
16369 It's not needed and the C Standard doesn't allow it here anyway.
16371 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
16372 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
16374 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
16377 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
16379 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
16381 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
16383 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
16385 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
16387 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
16388 * charset.c (Fdefine_charset_internal): Don't initialize
16389 charset.code_space[15]. The value was garbage, on hosts with
16390 32-bit int (Bug#8600).
16392 * lread.c (read_integer): Be more consistent with string-to-number.
16393 Use string_to_number to do the actual conversion; this avoids
16394 rounding errors and fixes some other screwups. Without this fix,
16395 for example, #x1fffffffffffffff was misread as -2305843009213693952.
16396 (digit_to_number): Move earlier, for benefit of read_integer.
16397 Return -1 if the digit is out of range for the base, -2 if it is
16398 not a digit in any supported base. (Bug#8602)
16400 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
16402 * dispnew.c (scrolling_window): Return 1 if we scrolled,
16403 to match comment at start of function. This also removes a
16404 GCC warning about overflow in a 32+64-bit port.
16406 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
16408 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
16409 Reported by Stefan Monnier in
16410 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
16411 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16412 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
16414 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
16415 (EMACS_UINTPTR): Likewise, with uintptr_t.
16417 * lisp.h: Prefer 64-bit EMACS_INT if available.
16418 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
16419 on 32-bit hosts that have 64-bit int, so that they can access
16421 However, temporarily disable this change unless the temporary
16422 symbol WIDE_EMACS_INT is defined.
16424 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
16426 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
16427 This removes an assumption that EMACS_INT and long are the same
16428 width as pointers. The assumption is true for Emacs porting targets
16429 now, but we want to make other targets possible.
16430 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
16431 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
16432 In the rest of the code, change types of integers that hold casted
16433 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
16434 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
16435 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
16436 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
16437 No need to cast type when ORing.
16438 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
16439 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
16440 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
16441 assume EMACS_INT is the same width as char *.
16442 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
16443 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
16444 Remove no-longer-needed casts.
16445 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
16446 (xg_tool_bar_help_callback, xg_make_tool_item):
16447 Use EMACS_INTPTR to hold an integer
16448 that will be cast to void *; this can avoid a GCC warning
16449 if EMACS_INT is not the same width as void *.
16450 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
16451 * xdisp.c (display_echo_area_1, resize_mini_window_1):
16452 (current_message_1, set_message_1):
16453 Use a local to convert to proper width without a cast.
16454 * xmenu.c (dialog_selection_callback): Likewise.
16456 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
16457 Also, don't assume VALBITS / RAND_BITS is less than 5,
16458 and don't rely on undefined behavior when shifting a 1 left into
16460 * lisp.h (get_random): Change signature to match.
16462 * lread.c (hash_string): Use size_t, not int, for hash computation.
16463 Normally we prefer signed values; but hashing is special, because
16464 it's better to use unsigned division on hash table sizes so that
16465 the remainder is nonnegative. Also, size_t is the natural width
16466 for hashing into memory. The previous code used 'int', which doesn't
16467 retain enough info to hash well into very large tables.
16468 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
16470 * dbusbind.c: Don't possibly lose pointer info when converting.
16471 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16472 Use XPNTR rather than XHASH, so that the high-order bits of
16473 the pointer aren't lost when converting through void *.
16475 * eval.c (Fautoload): Don't double-shift a pointer.
16477 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
16479 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
16481 * gnutls.c (DEF_GNUTLS_FN):
16482 * image.c (DEF_IMGLIB_FN): Make function pointers static.
16484 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
16486 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
16489 2011-05-05 Eli Zaretskii <eliz@gnu.org>
16491 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
16492 New version that can reserve upto 2GB of heap space.
16494 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
16496 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
16498 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
16500 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
16501 `gnutls_certificate_set_x509_key_file'.
16503 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
16505 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
16506 Update dependencies.
16508 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16510 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
16511 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
16512 Remove unused parameter `fildes'.
16513 * process.c (read_process_output, send_process): Don't pass it.
16515 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16517 Fix previous change: the library cache is defined in w32.c.
16518 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
16519 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
16521 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16523 Implement dynamic loading of GnuTLS on Windows.
16525 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
16526 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
16527 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16530 * gnutls.c (Qgnutls_dll): Define.
16531 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
16532 (gnutls_*): Declare function pointers.
16533 (init_gnutls_functions): New function to initialize function pointers.
16534 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
16535 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
16536 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16537 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
16538 (emacs_gnutls_write, emacs_gnutls_read)
16539 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
16540 (Fgnutls_available_p): New function.
16541 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
16542 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
16543 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
16545 * image.c: Include w32.h.
16546 (Vimage_type_cache): Delete.
16547 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
16548 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
16549 (w32_delayed_load): Move to w32.c.
16551 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
16553 * w32.c (QCloaded_from, Vlibrary_cache): Define.
16554 (w32_delayed_load): Move from image.c. When loading a library, record
16555 its filename in the :loaded-from property of the library id.
16556 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
16557 Initialize and staticpro them.
16558 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
16560 * process.c: Include lisp.h before w32.h, not after.
16561 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
16562 instead of gnutls_record_check_pending.
16564 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
16566 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
16568 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
16569 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
16572 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
16574 * xterm.c (x_set_frame_alpha): Do not set property on anything
16575 else than FRAME_X_OUTER_WINDOW (Bug#8608).
16577 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
16579 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
16581 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
16583 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
16584 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
16585 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
16586 (gnutls_global_initialized, Qgnutls_bootprop_priority)
16587 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
16588 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
16589 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
16590 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
16591 (Qgnutls_bootprop_callbacks_verify): Make static.
16593 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
16595 * callproc.c: Indentation fixup.
16597 * sysdep.c (wait_for_termination_1): Make static.
16598 (wait_for_termination, interruptible_wait_for_termination):
16599 Move after wait_for_termination_1.
16601 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
16603 * sysdep.c (interruptible_wait_for_termination): New function
16604 which is like wait_for_termination, but allows keyboard
16607 * callproc.c (Fcall_process): Add (:file "file") as an option for
16609 (Fcall_process_region): Ditto.
16611 2011-04-30 Eli Zaretskii <eliz@gnu.org>
16613 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
16614 rather than `XVECTOR (FOO)->size'.
16616 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
16617 inttypes.h, as a gnulib replacement is used if it not available in
16620 2011-04-21 Eli Zaretskii <eliz@gnu.org>
16622 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
16623 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
16624 of MOST_POSITIVE_FIXNUM. (Bug#8528)
16626 * coding.c (coding_alloc_by_realloc): Error out if destination
16627 will grow beyond MOST_POSITIVE_FIXNUM.
16628 (decode_coding_emacs_mule): Abort if there isn't enough place in
16629 charbuf for the composition carryover bytes. Reserve an extra
16630 space for up to 2 characters produced in a loop.
16631 (decode_coding_iso_2022): Abort if there isn't enough place in
16632 charbuf for the composition carryover bytes.
16634 2011-04-21 Eli Zaretskii <eliz@gnu.org>
16636 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
16637 aborting when %lld or %lll format is passed.
16638 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
16639 %llo or %llx format is passed. (Bug#8545)
16641 * window.c (window_scroll_line_based): Use a marker instead of
16642 simple variables to record original value of point. (Bug#7952)
16644 * doprnt.c (doprnt): Fix the case where a multibyte sequence
16645 produced by %s or %c overflows available buffer space. (Bug#8545)
16647 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
16649 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
16650 (SIZE_MAX): Move defn after all includes, as they might #define it.
16652 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16654 * w32.c (init_environment): Warn about defaulting HOME to C:\.
16656 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16658 * keyboard.c (Qdelayed_warnings_hook): Define.
16659 (command_loop_1): Run `delayed-warnings-hook'
16660 if Vdelayed_warnings_list is non-nil.
16661 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
16662 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
16664 2011-04-28 Eli Zaretskii <eliz@gnu.org>
16666 * doprnt.c (doprnt): Don't return value smaller than the buffer
16667 size if the message was truncated. (Bug#8545).
16669 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16671 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
16672 (Fx_window_property): #if-0 the whole functions, not just the bodies.
16674 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16676 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
16678 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
16680 * makefile.w32-in: Update dependencies.
16682 2011-04-27 Eli Zaretskii <eliz@gnu.org>
16684 Improve `doprnt' and its usage. (Bug#8545)
16685 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
16686 `format_end'. Remove support for %l as a conversion specifier.
16687 Don't use xrealloc. Improve diagnostics when the %l size modifier
16688 is used. Update the commentary.
16690 * eval.c (verror): Simplify calculation of size_t.
16692 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
16695 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
16697 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
16700 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16702 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
16703 This makes this file independent of the recent pseudovector change.
16705 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
16707 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
16709 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
16710 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
16711 Remove unused local.
16712 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
16714 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
16715 GCC 4.6.0 optimizes based on type-based alias analysis.
16716 For example, if b is of type struct buffer * and v of type struct
16717 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
16718 != &v->size, and therefore "v->size = 1; b->size = 2; return
16719 v->size;" must therefore return 1. This assumption is incorrect
16720 for Emacs, since it type-puns struct Lisp_Vector * with many other
16721 types. To fix this problem, this patch adds a new type struct
16722 vectorlike_header that documents the constraints on layout of vectors
16723 and pseudovectors, and helps optimizing compilers not get fooled
16724 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
16725 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
16726 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
16728 (XSETPVECTYPE): Rewrite in terms of new macro.
16729 (XSETPVECTYPESIZE): New macro, specifying both type and size.
16730 This is a bit clearer, and further avoids the possibility of
16731 undesirable aliasing.
16732 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
16733 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
16734 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
16735 since Lisp_Subr is a special case (no "next" field).
16736 (ASIZE): Now uses header.size rather than size.
16737 All previous uses of XVECTOR (foo)->size replaced to use this macro,
16738 to avoid the hassle of writing XVECTOR (foo)->header.size.
16739 (struct vectorlike_header): New type.
16740 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
16741 object, to help avoid aliasing.
16742 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
16743 (SUBRP): Likewise, since Lisp_Subr is a special case.
16744 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
16745 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
16746 (struct Lisp_Hash_Table): Combine first two members into a single
16747 struct vectorlike_header member. All uses of "size" and "next" members
16748 changed to be "header.size" and "header.next".
16749 * buffer.h (struct buffer): Likewise.
16750 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
16751 * frame.h (struct frame): Likewise.
16752 * process.h (struct Lisp_Process): Likewise.
16753 * termhooks.h (struct terminal): Likewise.
16754 * window.c (struct save_window_data, struct saved_window): Likewise.
16755 * window.h (struct window): Likewise.
16756 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
16757 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
16758 * buffer.c (init_buffer_once): Likewise.
16759 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
16761 * process.c (Fformat_network_address): Use local var for size,
16764 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
16766 Make the Lisp reader and string-to-float more consistent (Bug#8525)
16767 * data.c (atof): Remove decl; no longer used or needed.
16768 (digit_to_number): Move to lread.c.
16769 (Fstring_to_number): Use new string_to_number function, to be
16770 consistent with how the Lisp reader treats infinities and NaNs.
16771 Do not assume that floating-point numbers represent EMACS_INT
16772 without losing information; this is not true on most 64-bit hosts.
16773 Avoid double-rounding errors, by insisting on integers when
16774 parsing non-base-10 numbers, as the documentation specifies.
16775 * lisp.h (string_to_number): New decl, replacing ...
16776 (isfloat_string): Remove.
16777 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
16778 (read1): Do not accept +. and -. as integers; this
16779 appears to have been a coding error. Similarly, do not accept
16780 strings like +-1e0 as floating point numbers. Do not report
16781 overflow for integer overflows unless the base is not 10 which
16782 means we have no simple and reliable way to continue.
16783 Break out the floating-point parsing into a new
16784 function string_to_number, so that Fstring_to_number parses
16785 floating point numbers consistently with the Lisp reader.
16786 (digit_to_number): Move here from data.c. Make it static inline.
16787 (E_CHAR, EXP_INT): Remove, replacing with ...
16788 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
16789 (string_to_number): New function, replacing isfloat_string.
16790 This function checks for valid syntax and produces the resulting
16791 Lisp float number too. Rework it so that string-to-number
16792 no longer mishandles examples like "1.0e+". Use strtoumax,
16793 so that overflow for non-base-10 numbers is reported only when
16794 there's no portable and simple way to convert to floating point.
16796 * textprop.c (set_text_properties_1): Rewrite for clarity,
16797 and to avoid GCC warning about integer overflow.
16799 * intervals.h (struct interval): Use EMACS_INT for members
16800 where EMACS_UINT might cause problems. See
16801 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
16802 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
16803 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
16805 (offset_intervals): Tell GCC not to worry about length overflow
16806 when negating a negative length.
16808 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
16809 (overrun_check_free): Likewise.
16811 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
16812 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
16815 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16816 (gnutls_make_error): Rename local to avoid shadowing.
16817 (gnutls_emacs_global_deinit): ifdef out; not used.
16818 (Fgnutls_boot): Use const for pointer to readonly storage.
16819 Comment out unused local. Fix pointer signedness problems.
16821 * lread.c (openp): Don't stuff size_t into an 'int'.
16822 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
16823 about possible signed overflow.
16825 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16826 (GDK_KEY_g): Don't define if already defined.
16827 (xg_prepare_tooltip): Avoid pointer signedness problem.
16828 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
16830 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
16831 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
16833 * xfns.c (Fx_window_property): Simplify a bit,
16834 to make a bit faster and to avoid GCC 4.6.0 warning.
16835 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
16837 * fns.c (internal_equal): Don't assume size_t fits in int.
16839 * alloc.c (compact_small_strings): Tighten assertion a little.
16841 Replace pEd with more-general pI, and fix some printf arg casts.
16842 * lisp.h (pI): New macro, generalizing old pEd macro to other
16843 conversion specifiers. For example, use "...%"pI"d..." rather
16844 than "...%"pEd"...".
16845 (pEd): Remove. All uses replaced with similar uses of pI.
16846 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
16847 * alloc.c (check_pure_size): Don't overflow by converting size to int.
16848 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
16849 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
16850 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
16851 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
16852 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
16854 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
16855 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
16856 * print.c (safe_debug_print, print_object): Likewise.
16857 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
16859 Use pI instead of if-then-else-abort. Use %p to avoid casts,
16860 avoiding the 0 flag, which is not portable.
16861 * process.c (Fmake_network_process): Use pI to avoid cast.
16862 * region-cache.c (pp_cache): Likewise.
16863 * xdisp.c (decode_mode_spec): Likewise.
16864 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
16865 behavior on 64-bit hosts with printf arg.
16866 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
16867 (x_stop_queuing_selection_requests): Likewise.
16868 (x_get_window_property): Don't truncate byte count to an 'int'
16871 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
16872 here, since it parses constructs like leading '-' and spaces,
16873 which are not wanted; and it overflows with large numbers.
16874 Instead, simply match F[0-9]+, which is what is wanted anyway.
16876 * alloc.c: Remove unportable assumptions about struct layout.
16877 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
16878 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
16879 (allocate_vectorlike, make_pure_vector): Use the new macros,
16880 plus offsetof, to remove unportable assumptions about struct layout.
16881 These assumptions hold on all porting targets that I know of, but
16882 they are not guaranteed, they're easy to remove, and removing them
16883 makes further changes easier.
16885 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
16886 This doesn't fix a bug but makes the code clearer.
16887 (string_overrun_cookie): Now const. Use initializers that
16888 don't formally overflow signed char, to avoid warnings.
16889 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
16890 can cause Emacs to crash when string overrun checking is enabled.
16891 (allocate_buffer): Don't assume sizeof (struct buffer) is a
16892 multiple of sizeof (EMACS_INT); it need not be, if
16893 alignof(EMACS_INT) < sizeof (EMACS_INT).
16894 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
16896 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
16898 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
16900 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
16902 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
16903 supposed to be handshaking. (Bug#8556)
16904 Reported by Paul Eggert <eggert@cs.ucla.edu>.
16906 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
16908 * lisp.h (Qdebug): List symbol.
16909 * eval.c (Qdebug): Restore global linkage.
16910 * keyboard.c (debug-on-event): New variable.
16911 (handle_user_signal): Break into debugger when debug-on-event
16912 matches the current signal symbol.
16914 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
16916 * alloc.c (check_sblock, check_string_bytes)
16917 (check_string_free_list): Convert to standard C.
16919 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
16921 * w32.c (emacs_gnutls_push): Fix typo.
16923 2011-04-25 Eli Zaretskii <eliz@gnu.org>
16925 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
16926 "cast to pointer from integer of different size".
16928 Improve doprnt and its use in verror. (Bug#8545)
16929 * doprnt.c (doprnt): Document the set of format control sequences
16930 supported by the function. Use SAFE_ALLOCA instead of always
16933 * eval.c (verror): Don't limit the buffer size at size_max-1, that
16934 is one byte too soon. Don't use xrealloc; instead xfree and
16937 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
16939 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
16942 * gnutls.c: Renamed global_initialized to
16943 gnutls_global_initialized. Added internals for the
16944 :verify-hostname-error, :verify-error, and :verify-flags
16945 parameters of `gnutls-boot' and documented those parameters in the
16946 docstring. Start callback support.
16947 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
16948 unless a fatal error occurred. Call gnutls_alert_send_appropriate
16949 on error. Return error code.
16950 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
16951 (emacs_gnutls_read): Likewise.
16952 (Fgnutls_boot): Return handshake error code.
16953 (emacs_gnutls_handle_error): New function.
16954 (wsaerror_to_errno): Likewise.
16956 * w32.h (emacs_gnutls_pull): Add prototype.
16957 (emacs_gnutls_push): Likewise.
16959 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
16960 (emacs_gnutls_push): Likewise.
16962 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
16964 * process.c (wait_reading_process_output): Check if GnuTLS
16965 buffered some data internally if no FDs are set for TLS
16968 * makefile.w32-in (OBJ2): Add gnutls.$(O).
16969 (LIBS): Link to USER_LIBS.
16970 ($(BLD)/gnutls.$(0)): New target.
16972 2011-04-24 Eli Zaretskii <eliz@gnu.org>
16974 * xdisp.c (handle_single_display_spec): Rename the
16975 display_replaced_before_p argument into display_replaced_p, to
16976 make it consistent with the commentary. Fix typos in the
16979 * textprop.c (syms_of_textprop): Remove dead code.
16980 (copy_text_properties): Delete obsolete commentary about an
16981 interface that was deleted long ago. Fix typos in the description
16984 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
16985 to changes in oldXMenu/XMenu.h from 2011-04-16.
16986 <menu_help_message, prev_menu_help_message>: Constify.
16987 (IT_menu_make_room): menu->help_text is now `const char **';
16990 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
16991 to changes in oldXMenu/XMenu.h from 2011-04-16.
16992 (struct XMenu): Declare `help_text' `const char **'.
16994 * xfaces.c <Qunspecified>: Make extern again.
16996 * syntax.c: Include sys/types.h before including regex.h, as
16999 * doc.c (get_doc_string): Improve the format passed to `error'.
17001 * doprnt.c (doprnt): Improve commentary.
17003 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
17005 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
17008 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
17009 changes in globals.h immediately force recompilation.
17010 (TAGS): Depend on $(CURDIR)/m/intel386.h and
17011 $(CURDIR)/s/ms-w32.h.
17012 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
17014 * character.c (Fchar_direction): Function deleted.
17015 (syms_of_character): Don't defsubr it.
17016 <char-direction-table>: Deleted.
17018 2011-04-23 Eli Zaretskii <eliz@gnu.org>
17020 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
17021 * doprnt.c: Include limits.h.
17022 (SIZE_MAX): New macro.
17023 (doprnt): Return a size_t value. 2nd arg is now size_t.
17024 Many local variables are now size_t instead of int or unsigned.
17025 Improve overflow protection. Support `l' modifier for integer
17026 conversions. Support %l conversion. Don't assume an EMACS_INT
17027 argument for integer conversions and for %c.
17029 * lisp.h (doprnt): Restore prototype.
17031 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
17032 $(SRC)/character.h.
17034 * Makefile.in (base_obj): Add back doprnt.o.
17036 * deps.mk (doprnt.o): Add back prerequisites.
17037 (callint.o): Depend on character.h.
17039 * eval.c (internal_lisp_condition_case): Include the handler
17040 representation in the error message.
17041 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
17042 when breaking from the loop.
17044 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
17046 * callint.c (Fcall_interactively): When displaying error message
17047 about invalid control letter, pass the character's codepoint, not
17048 a pointer to its multibyte form. Improve display of the character
17049 in octal and display also its hex code.
17051 * character.c (char_string): Use %x to display the (unsigned)
17052 codepoint of an invalid character, to avoid displaying a bogus
17055 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
17056 `error', not SYMBOL_NAME itself.
17058 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
17059 character arguments to `error'.
17061 * charset.c (check_iso_charset_parameter): Fix incorrect argument
17062 to `error' in error message about FINAL_CHAR argument. Make sure
17063 FINAL_CHAR is a character, and use %c when it is passed as
17064 argument to `error'.
17066 2011-04-23 Eli Zaretskii <eliz@gnu.org>
17068 * s/ms-w32.h (localtime): Redirect to sys_localtime.
17070 * w32.c: Include <time.h>.
17071 (sys_localtime): New function.
17073 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
17075 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
17077 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
17079 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
17081 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
17082 zombies (Bug#8467).
17084 2011-04-19 Eli Zaretskii <eliz@gnu.org>
17086 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
17087 gl_state.e_property when gl_state.object is Qt.
17089 * insdel.c (make_gap_larger): Remove limitation of buffer size
17092 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
17094 * xdisp.c (lookup_glyphless_char_display)
17095 (produce_glyphless_glyph): Handle cons cell entry in
17096 glyphless-char-display.
17097 (Vglyphless_char_display): Document it.
17099 * term.c (produce_glyphless_glyph): Handle cons cell entry in
17100 glyphless-char-display.
17102 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
17104 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
17106 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
17108 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
17109 definition for no-X builds.
17111 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
17113 Static checks with GCC 4.6.0 and non-default toolkits.
17115 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
17117 * process.c (keyboard_bit_set): Define only if SIGIO.
17118 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
17119 (send_process): Repair possible setjmp clobbering.
17121 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
17123 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
17125 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
17127 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
17128 Define only if needed.
17130 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
17131 by pacifying GCC about it. Maybe it's time to retire it?
17132 * xfaces.c (USG, __TIMEVAL__): Likewise.
17134 * dispextern.h (struct redisplay_interface): Rename param
17135 to avoid shadowing.
17136 * termhooks.h (struct terminal): Likewise.
17137 * xterm.c (xembed_send_message): Likewise.
17139 * insdel.c (make_gap_smaller): Define only if
17140 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
17142 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
17145 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
17146 so that we aren't warned about unused symbols.
17148 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
17150 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
17152 * xfns.c (x_real_positions): Mark locals as initialized.
17154 * xmenu.c (xmenu_show): Don't use uninitialized vars.
17156 * xterm.c: Fix problems found by static analysis with other toolkits.
17157 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
17158 (x_dispatch_event): Declare static if USE_GTK, and
17159 define if USE_GTK || USE_X_TOOLKIT.
17160 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
17161 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
17162 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
17163 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
17165 * xmenu.c (menu_help_callback): Pointer type fixes.
17166 Use const pointers when pointing at readonly data. Avoid pointer
17167 signedness clashes.
17168 (FALSE): Remove unused macro.
17169 (update_frame_menubar): Remove unused decl.
17171 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
17173 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
17174 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
17175 (single_menu_item): Rename local to avoid shadowing.
17177 * keyboard.c (make_lispy_event): Remove unused local var.
17179 * frame.c, frame.h (x_get_resource_string): Bring this back, but
17180 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
17182 * bitmaps: Change bitmaps from unsigned char back to the X11
17183 compatible char. Avoid the old compiler warnings about
17184 out-of-range initializers by using, for example, '\xab' rather
17187 * xgselect.c (xgselect_initialize): Check vs interface
17188 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
17190 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
17192 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
17193 to read-only memory.
17195 * fns.c (vector): Remove; this old hack is no longer needed.
17197 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
17199 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
17201 * xrdb.c (x_load_resources): Omit unused local.
17203 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
17204 (x_window): Rename locals to avoid shadowing.
17205 (USG): Use the kludged USG macro, to pacify gcc.
17207 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
17208 (x_term_init): Remove local to avoid shadowing.
17210 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
17212 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
17213 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
17215 2011-04-16 Eli Zaretskii <eliz@gnu.org>
17217 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
17219 Fix regex.c, syntax.c and friends for buffers > 2GB.
17220 * syntax.h (struct gl_state_s): Declare character position members
17223 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
17225 * textprop.c (verify_interval_modification, interval_of):
17226 Declare arguments EMACS_INT.
17228 * intervals.c (adjust_intervals_for_insertion): Declare arguments
17231 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
17233 * indent.c (Fvertical_motion): Local variable it_start is now
17236 * regex.c (re_match, re_match_2, re_match_2_internal)
17237 (bcmp_translate, regcomp, regexec, print_double_string)
17238 (group_in_compile_stack, re_search, re_search_2, regex_compile)
17239 (re_compile_pattern, re_exec): Declare arguments and local
17240 variables `size_t' and `ssize_t' and return values `regoff_t', as
17242 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
17243 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
17244 <compile_stack_type>: `size' and `avail' are now `size_t'.
17246 * regex.h <regoff_t>: Use ssize_t, not int.
17247 (re_search, re_search_2, re_match, re_match_2): Arguments that
17248 specify buffer/string position and length are now ssize_t and
17249 size_t. Return type is regoff_t.
17251 2011-04-16 Ben Key <bkey76@gmail.com>
17253 * nsfont.m: Fixed bugs in ns_get_family and
17254 ns_descriptor_to_entity that were caused by using free to
17255 deallocate memory blocks that were allocated by xmalloc (via
17256 xstrdup). This caused Emacs to crash when compiled with
17257 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
17258 --enable-checking=xmallocoverrun). xfree is now used to
17259 deallocate these memory blocks.
17261 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
17263 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
17265 emacs_write: Accept and return EMACS_INT for sizes.
17266 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
17268 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
17269 Accept and return EMACS_INT.
17270 (emacs_gnutls_write): Return the number of bytes written on
17272 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
17273 (emacs_read, emacs_write): Remove check for negative size, as the
17274 Emacs source code has been audited now.
17275 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
17276 (emacs_read, emacs_write): Use it.
17277 * process.c (send_process): Adjust to the new signatures of
17278 emacs_write and emacs_gnutls_write. Do not attempt to store
17279 a byte offset into an 'int'; it might overflow.
17280 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
17282 * sound.c: Don't assume sizes fit in 'int'.
17283 (struct sound_device.period_size, alsa_period_size):
17284 Return EMACS_INT, not int.
17285 (struct sound_device.write, vox_write, alsa_write):
17286 Accept EMACS_INT, not int.
17287 (wav_play, au_play): Use EMACS_INT to store sizes and to
17288 record read return values.
17290 2011-04-15 Ben Key <bkey76@gmail.com>
17292 * keyboard.c (Qundefined): Don't declare static since it is used
17294 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
17295 static since they are used in nsfont.m.
17297 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
17299 * process.c (Qprocessp): Don't declare static.
17300 * lisp.h (Qprocessp): Declare again.
17302 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
17304 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
17306 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
17308 Improve C-level modularity by making more things 'static'.
17310 Don't publish debugger-only interfaces to other modules.
17311 * lisp.h (safe_debug_print, debug_output_compilation_hack):
17312 (verify_bytepos, count_markers): Move decls to the only modules
17314 * region-cache.h (pp_cache): Likewise.
17315 * window.h (check_all_windows): Likewise.
17316 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
17318 * sysdep.c (croak): Now static, if
17319 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
17320 * syssignal.h (croak): Declare only if not static.
17322 * alloc.c (refill_memory_reserve): Now static if
17323 !defined REL_ALLOC || defined SYSTEM_MALLOC.
17324 * lisp.h (refill_memory_reserve): Declare only if not static.
17326 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
17327 Define only if USE_LUCID.
17329 * xrdb.c (x_customization_string, x_rm_string): Now static.
17331 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
17332 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
17334 * xdisp.c (draw_row_with_mouse_face): Now static.
17335 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
17337 * window.h (check_all_windows): Mark externally visible.
17339 * window.c (window_deletion_count): Now static.
17341 * undo.c: Make symbols static if they're not exported.
17342 (last_undo_buffer, last_boundary_position, pending_boundary):
17345 * textprop.c (interval_insert_behind_hooks): Now static.
17346 (interval_insert_in_front_hooks): Likewise.
17348 * term.c: Make symbols static if they're not exported.
17349 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
17350 (max_frame_lines, tty_set_terminal_modes):
17351 (tty_reset_terminal_modes, tty_turn_off_highlight):
17352 (get_tty_terminal): Now static.
17353 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
17354 * termhooks.h (term_mouse_moveto): Do not declare if
17355 HAVE_WINDOW_SYSTEM.
17356 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
17357 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
17359 * sysdep.c: Make symbols static if they're not exported.
17360 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
17362 (sigprocmask_set, full_mask): Remove; unused.
17363 (wait_debugging): Mark as visible.
17364 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
17365 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
17367 * syntax.c (syntax_temp): Define only if !__GNUC__.
17369 * sound.c (current_sound_device, current_sound): Now static.
17371 * search.c (searchbufs, searchbuf_head): Now static.
17373 * scroll.c (scroll_cost): Remove; unused.
17374 * dispextern.h (scroll_cost): Remove decl.
17376 * region-cache.h (pp_cache): Mark as externally visible.
17378 * process.c: Make symbols static if they're not exported.
17379 (process_tick, update_tick, create_process, chan_process):
17380 (Vprocess_alist, proc_buffered_char, datagram_access):
17381 (fd_callback_data, send_process_frame, process_sent_to): Now static.
17382 (deactivate_process): Mark defn as static, as well as decl.
17383 * lisp.h (create_process): Remove decl.
17384 * process.h (chan_process, Vprocess_alist): Remove decls.
17386 * print.c: Make symbols static if they're not exported.
17387 (print_depth, new_backquote_output, being_printed, print_buffer):
17388 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
17389 (print_interval, print_number_index, initial_stderr_stream):
17391 * lisp.h (Fprinc): Remove decl.
17392 (debug_output_compilation_hack): Mark as externally visible.
17394 * sysdep.c (croak): Move decl from here to syssignal.h.
17395 * syssignal.h (croak): Put it here, so the API can be checked when
17396 'croak' is called from dissociate_if_controlling_tty.
17398 * minibuf.c: Make symbols static if they're not exported.
17399 (minibuf_save_list, choose_minibuf_frame): Now static.
17400 * lisp.h (choose_minibuf_frame): Remove decl.
17402 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
17404 * lread.c: Make symbols static if they're not exported.
17405 (read_objects, initial_obarray, oblookup_last_bucket_number):
17407 (make_symbol): Remove; unused.
17408 * lisp.h (initial_obarray, make_symbol): Remove decls.
17410 * keyboard.c: Make symbols static if they're not exported.
17411 (single_kboard, recent_keys_index, total_keys, recent_keys):
17412 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
17413 (this_single_command_key_start, echoing, last_auto_save):
17414 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
17415 (command_loop, echo_now, keyboard_init_hook, help_char_p):
17416 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
17417 (Vlispy_mouse_stem, double_click_count):
17419 (force_auto_save_soon): Define only if SIGDANGER.
17420 (ignore_mouse_drag_p): Now static if
17421 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
17422 (print_help): Remove; unused.
17423 (stop_character, last_timer_event): Mark as externally visible.
17424 * keyboard.h (ignore_mouse_drag_p): Declare only if
17425 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
17426 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
17427 * lisp.h (echoing): Remove decl.
17428 (force_auto_save_soon): Declare only if SIGDANGER.
17429 * xdisp.c (redisplay_window): Simplify code, to make it more
17430 obvious that ignore_mouse_drag_p is not accessed if !defined
17431 USE_GTK && !defined HAVE_NS.
17433 * intervals.c: Make symbols static if they're not exported.
17434 (merge_properties_sticky, merge_interval_right, delete_interval):
17436 * intervals.h (merge_interval_right, delete_interval): Remove decls.
17438 * insdel.c: Make symbols static if they're not exported.
17439 However, leave prepare_to_modify_buffer alone. It's never
17440 called from outside this function, but that appears to be a bug.
17441 (combine_after_change_list, combine_after_change_buffer):
17442 (adjust_after_replace, signal_before_change): Now static.
17443 (adjust_after_replace_noundo): Remove; unused.
17444 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
17445 (signal_before_change): Remove decls.
17447 * indent.c (val_compute_motion, val_vmotion): Now static.
17449 * image.c: Make symbols static if they're not exported.
17450 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
17452 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
17453 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
17455 * fringe.c (standard_bitmaps): Now static.
17456 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
17458 * frame.c: Make symbols static if they're not exported.
17459 (x_report_frame_params, make_terminal_frame): Now static.
17460 (get_frame_param): Now static, unless HAVE_NS.
17461 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
17462 (x_get_resource_string): Remove; not used.
17463 * frame.h (make_terminal_frame, x_report_frame_params):
17464 (x_get_resource_string); Remove decls.
17465 (x_fullscreen_adjust): Declare only if WINDOWSNT.
17466 * lisp.h (get_frame_param): Declare only if HAVE_NS.
17468 * font.c, fontset.c: Make symbols static if they're not exported.
17469 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
17470 (FACE_SUITABLE_FOR_CHAR_P): Use it.
17471 * font.c (font_close_object): Now static.
17472 * font.h (font_close_object): Remove.
17473 * fontset.c (FONTSET_OBJLIST): Remove.
17474 (free_realized_fontset) #if-0 the body, which does nothing.
17475 (face_suitable_for_char_p): #if-0, as it's never called.
17476 * fontset.h (face_suitable_for_char_p): Remove decl.
17477 * xfaces.c (face_at_string_position):
17478 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
17479 since 0 is always ASCII.
17481 * fns.c (weak_hash_tables): Now static.
17483 * fileio.c: Make symbols static if they're not exported.
17484 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
17485 (Vwrite_region_annotation_buffers): Now static.
17487 * eval.c: Make symbols static if they're not exported.
17488 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
17489 * lisp.h (backtrace_list): Remove decl.
17491 * emacs.c: Make symbols static if they're not exported.
17492 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
17493 (fatal_error_code, fatal_error_signal_hook, standard_args):
17495 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
17496 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
17497 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
17498 * lisp.h (fatal_error_signal_hook): Remove decl.
17499 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
17501 * editfns.c: Move a (normally-unused) function to its only use.
17502 * editfns.c, lisp.h (get_operating_system_release): Remove.
17503 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
17504 worth the hassle of breaking this out.
17506 * xterm.c: Make symbols static if they're not exported.
17507 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
17508 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
17509 (x_destroy_window, x_delete_display):
17511 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
17512 (x_mouse_leave): Remove; unused.
17513 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
17514 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
17515 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
17517 (x_mouse_leave): Declare only if WINDOWSNT.
17518 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
17519 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
17522 * ftxfont.c: Make symbols static if they're not exported.
17523 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
17525 * font.h (ftxfont_driver): Likewise.
17527 * xfns.c: Make symbols static if they're not exported.
17528 (x_last_font_name, x_display_info_for_name):
17529 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
17530 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
17531 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
17532 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
17533 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
17534 (last_show_tip_args): Now static.
17535 (xic_defaut_fontset, xic_create_fontsetname): Define only if
17536 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
17537 (x_screen_planes): Remove; unused.
17538 * dispextern.h (x_screen_planes): Remove decl.
17540 * dispnew.c: Make symbols static if they're not exported.
17541 * dispextern.h (redraw_garbaged_frames, scrolling):
17542 (increment_row_positions): Remove.
17543 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
17544 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
17546 (redraw_garbaged_frames): Remove; unused.
17548 * xfaces.c: Make symbols static if they're not exported.
17549 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
17551 * xterm.h (defined_color): Remove decls.
17552 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
17553 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
17554 (menu_face_changed_default, defined_color, free_realized_face):
17555 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
17556 (ascii_face_of_lisp_face): Remove; unused.
17558 * xdisp.c: Make symbols static if they're not exported.
17559 * dispextern.h (scratch_glyph_row, window_box_edges):
17560 (glyph_to_pixel_coords, set_cursor_from_row):
17561 (get_next_display_element, set_iterator_to_next):
17562 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
17563 (show_mouse_face): Remove decls
17564 * frame.h (message_buf_print): Likewise.
17565 * lisp.h (pop_message, set_message, check_point_in_composition):
17567 * xterm.h (set_vertical_scroll_bar): Likewise.
17568 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
17569 (message_buf_print, scratch_glyph_row, displayed_buffer):
17570 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
17571 (get_next_display_element, show_mouse_face, window_box_edges):
17572 (frame_to_window_pixel_xy, check_point_in_composition):
17573 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
17574 (glyph_to_pixel_coords): Remove; unused.
17576 * dired.c (file_name_completion): Now static.
17578 * dbusbind.c (xd_in_read_queued_messages): Now static.
17580 * lisp.h (circular_list_error, FOREACH): Remove; unused.
17581 * data.c (circular_list_error): Remove.
17583 * commands.h (last_point_position, last_point_position_buffer):
17584 (last_point_position_window): Remove decls.
17585 * keyboard.c: Make these variables static.
17587 * coding.h (coding, code_convert_region, encode_coding_gap):
17589 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
17590 (iso_code_class, detect_coding, code_convert_region): Now static.
17591 (encode_coding_gap): Remove; unused.
17593 * chartab.c (chartab_chars, chartab_bits): Now static.
17595 * charset.h (charset_iso_8859_1): Remove decl.
17596 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
17599 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
17600 * ccl.c (Vccl_program_table): Now static.
17601 (check_ccl_update): Remove; unused.
17603 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
17604 * category.h: ... from here.
17605 * category.c (check_category_table, set_category_set): Now static.
17607 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
17608 * lisp.h: Remove these decls.
17610 * buffer.c (buffer_count): Remove unused var.
17612 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
17613 so that it's not optimized away.
17614 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
17615 * dispextern.h (bidi_dump_cached_states): Remove, since it's
17616 exported only to the debugger.
17618 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
17619 * atimer.h (run_all_atimers): Remove; not exported.
17621 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
17622 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
17623 was inaccessible from Lisp.
17624 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
17625 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
17627 alloc.c: Import and export fewer symbols, and remove unused items.
17628 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
17630 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
17631 it's not optimized away by whole-program optimization.
17632 (message_enable_multibyte, free_misc): Remove.
17633 (catchlist, handlerlist, mark_backtrace):
17634 Declare only if BYTE_MARK_STACK.
17635 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
17636 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
17637 (message_enable_multibyte): Remove decl.
17638 (free_misc, interval_free_list, float_block, float_block_index):
17639 (n_float_blocks, float_free_list, cons_block, cons_block_index):
17640 (cons_free_list, last_marked_index):
17642 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
17643 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
17644 (mark_backtrace): Define only if BYTE_MARK_STACK.
17645 * xdisp.c (message_enable_multibyte): Now static.
17647 Declare Lisp_Object Q* variables to be 'static' if not exported.
17648 This makes it easier for human readers (and static analyzers)
17649 to see whether these variables are used from other modules.
17650 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
17651 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
17652 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
17653 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
17654 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
17655 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
17656 * xmenu.c, xselect.c:
17657 Declare Q* vars static if they are not used in other modules.
17658 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
17659 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
17660 Remove decls of unexported vars.
17661 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
17663 * lisp.h (DEFINE_FUNC): Make sname 'static'.
17665 Make Emacs functions such as Fatom 'static' by default.
17666 This makes it easier for human readers (and static analyzers)
17667 to see whether these functions can be called from other modules.
17668 DEFUN now defines a static function. To make the function external
17669 so that it can be used in other C modules, use the new macro DEFUE.
17670 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
17671 (Finit_image_library):
17672 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
17673 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
17674 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
17675 Remove decls, since these functions are now static.
17676 (Funintern, Fget_internal_run_time): New decls, since these functions
17677 were already external.
17679 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
17680 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
17681 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
17682 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
17683 * keyboard.c, keymap.c, lread.c:
17684 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
17685 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
17686 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
17687 Mark functions with DEFUE instead of DEFUN,
17688 if they are used in other modules.
17689 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
17690 decls for now-static functions.
17691 * buffer.h (Fdelete_overlay): Remove decl.
17692 * callproc.c (Fgetenv_internal): Mark as internal.
17693 * composite.c (Fremove_list_of_text_properties): Remove decl.
17694 (Fcomposition_get_gstring): New forward static decl.
17695 * composite.h (Fcomposite_get_gstring): Remove decl.
17696 * dired.c (Ffile_attributes): New forward static decl.
17697 * doc.c (Fdocumntation_property): New forward static decl.
17698 * eval.c (Ffetch_bytecode): New forward static decl.
17699 (Funintern): Remove extern decl; now in .h file where it belongs.
17700 * fileio.c (Fmake_symbolic_link): New forward static decl.
17701 * image.c (Finit_image_library): New forward static decl.
17702 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
17703 * intervals.h (Fprevious_property_change):
17704 (Fremove_list_of_text_properties): Remove decls.
17705 * keyboard.c (Fthis_command_keys): Remove decl.
17706 (Fcommand_execute): New forward static decl.
17707 * keymap.c (Flookup_key): New forward static decl.
17708 (Fcopy_keymap): Now static.
17709 * keymap.h (Flookup_key): Remove decl.
17710 * process.c (Fget_process): New forward static decl.
17711 (Fprocess_datagram_address): Mark as internal.
17712 * syntax.c (Fsyntax_table_p): New forward static decl.
17713 (skip_chars): Remove duplicate decl.
17714 * textprop.c (Fprevious_property_change): New forward static decl.
17715 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
17717 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
17718 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
17720 * editfns.c (Fformat): Remove unreachable code.
17722 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
17724 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
17727 2011-04-13 Eli Zaretskii <eliz@gnu.org>
17729 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
17730 when at ZV. (Bug#8487)
17732 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
17734 * charset.c (Fclear_charset_maps): Use xfree instead of free.
17736 * keyboard.c (parse_tool_bar_item): Likewise.
17737 * sound.c (sound_cleanup, alsa_close): Likewise.
17738 * termcap.c (tgetent): Likewise.
17739 * xfns.c (x_default_font_parameter): Likewise.
17740 * xsettings.c (read_and_apply_settings): Likewise.
17742 * alloc.c (overrun_check_malloc, overrun_check_realloc)
17743 (overrun_check_free): Protoize.
17745 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
17747 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
17748 since callers should never pass a negative size.
17749 Change the signature to match that of plain 'read' and 'write'; see
17750 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
17751 * lisp.h: Update prototypes of emacs_write and emacs_read.
17753 2011-04-11 Eli Zaretskii <eliz@gnu.org>
17755 * xdisp.c (redisplay_window): Don't try to determine the character
17756 position of the scroll margin if the window start point w->startp
17757 is outside the buffer's accessible region. (Bug#8468)
17759 2011-04-10 Eli Zaretskii <eliz@gnu.org>
17761 Fix write-region and its subroutines for buffers > 2GB.
17762 * fileio.c (a_write, e_write): Modify declaration of arguments and
17763 local variables to support buffers larger than 2GB.
17764 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
17766 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
17767 argument, local variables, and return value.
17769 * lisp.h: Update prototypes of emacs_write and emacs_read.
17771 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
17773 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
17775 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
17777 Fix more problems found by GCC 4.6.0's static checks.
17779 * xdisp.c (vmessage): Use a better test for character truncation.
17781 * charset.c (load_charset_map): <, not <=, for optimization,
17782 and to avoid potential problems with integer overflow.
17783 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
17784 * casetab.c (set_identity, shuffle): Likewise.
17785 * editfns.c (Fformat): Likewise.
17786 * syntax.c (skip_chars): Likewise.
17788 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
17789 This also lets GCC 4.6.0 generate slightly better loop code.
17791 * callint.c (Fcall_interactively): <, not <=, for optimization.
17792 (Fcall_interactively): Count the number of arguments produced,
17793 not the number of arguments given. This is simpler and lets GCC
17794 4.6.0 generate slightly better code.
17796 * ftfont.c: Distingish more carefully between FcChar8 and char.
17797 The previous code passed unsigned char * to a functions like
17798 strlen and xstrcasecmp that expect char *, which does not
17799 conform to the C standard.
17800 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
17801 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
17802 char * when the C standard requires it.
17804 * keyboard.c (read_char): Remove unused var.
17806 * eval.c: Port to Windows vsnprintf (Bug#8435).
17807 Include <limits.h>.
17808 (SIZE_MAX): Define if the headers do not.
17809 (verror): Do not give up if vsnprintf returns a negative count.
17810 Instead, grow the buffer. This ports to Windows vsnprintf, which
17811 does not conform to C99. Problem reported by Eli Zaretskii.
17812 Also, simplify the allocation scheme, by avoiding the need for
17813 calling realloc, and removing the ALLOCATED variable.
17815 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
17817 Remove invocations of doprnt, as Emacs now uses vsnprintf.
17818 But keep the doprint source code for now, as we might revamp it
17819 and use it again (Bug#8435).
17820 * lisp.h (doprnt): Remove.
17821 * Makefile.in (base_obj): Remove doprnt.o.
17822 * deps.mk (doprnt.o): Remove.
17824 error: Print 32- and 64-bit integers portably (Bug#8435).
17825 Without this change, on typical 64-bit hosts error ("...%d...", N)
17826 was used to print both 32- and 64-bit integers N, which relied on
17827 undefined behavior.
17828 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
17829 * lisp.h (error, verror): Mark as printf-like functions.
17830 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
17831 Report overflow in size calculations when allocating printf buffer.
17832 Do not truncate output string at its first null byte.
17833 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
17834 Truncate the output at a character boundary, since vsnprintf does not
17836 * charset.c (check_iso_charset_parameter): Convert internal
17837 character to string before calling 'error', since %c now has the
17839 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
17840 overflow when computing char to be passed to 'error'. Do not
17841 pass Lisp_Object to 'error'; pass the integer instead.
17842 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
17843 formatted with plain %d.
17845 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
17847 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
17849 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
17851 * xterm.c (x_catch_errors): Remove duplicate declaration.
17853 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
17855 * xdisp.c, lisp.h (message_nolog): Remove; unused.
17857 2011-04-10 Jim Meyering <meyering@redhat.com>
17859 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
17860 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
17861 return ssize_t not "int", and use size_t as the buffer length.
17862 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
17863 * gnutls.h: Update declarations.
17864 * process.c (read_process_output): Use ssize_t, to match.
17865 (send_process): Likewise.
17867 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
17869 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
17871 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
17873 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
17874 Use unsigned char, to match FcChar8 type definition.
17876 * xterm.c (handle_one_xevent):
17877 * xmenu.c (create_and_show_popup_menu):
17878 * xselect.c (x_decline_selection_request)
17879 (x_reply_selection_request): Avoid type-punned deref of X events.
17881 2011-04-09 Eli Zaretskii <eliz@gnu.org>
17883 Fix some uses of `int' instead of EMACS_INT.
17884 * search.c (string_match_1, fast_string_match)
17885 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
17886 (scan_buffer, find_next_newline_no_quit)
17887 (find_before_next_newline, search_command, Freplace_match)
17888 (Fmatch_data): Make some `int' variables be EMACS_INT.
17890 * xdisp.c (display_count_lines): 3rd argument and return value now
17891 EMACS_INT. All callers changed.
17892 (pint2hrstr): Last argument is now EMACS_INT.
17894 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
17895 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
17896 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
17897 (decode_coding_utf_16, decode_coding_emacs_mule)
17898 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
17899 (decode_coding_ccl, decode_coding_charset)
17900 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
17901 (decode_coding_iso_2022, decode_coding_emacs_mule)
17902 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
17903 <char_offset, last_offset>: Declare EMACS_INT.
17904 (encode_coding_utf_8, encode_coding_utf_16)
17905 (encode_coding_emacs_mule, encode_invocation_designation)
17906 (encode_designation_at_bol, encode_coding_iso_2022)
17907 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
17908 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
17910 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
17911 (encode_invocation_designation): Last argument P_NCHARS is now
17913 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
17914 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
17916 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
17919 * ccl.c (Fccl_execute_on_string): Declare some variables
17922 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
17924 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
17926 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
17928 * process.c (Fformat_network_address): Doc fix.
17930 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
17932 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
17934 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
17936 * keyboard.c (read_char): Call Lisp function help-form-show,
17937 instead of using internal_with_output_to_temp_buffer.
17938 (Qhelp_form_show): New var.
17939 (syms_of_keyboard): Use DEFSYM macro.
17941 * print.c (internal_with_output_to_temp_buffer): Function deleted.
17943 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
17945 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
17947 * process.c (Flist_processes): Remove to Lisp.
17948 (list_processes_1): Delete.
17950 2011-04-06 Eli Zaretskii <eliz@gnu.org>
17952 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
17954 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
17956 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
17958 Fix more problems found by GCC 4.6.0's static checks.
17960 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
17962 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
17964 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
17966 * xdisp.c (vmessage): Mark as a printf-like function.
17968 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
17970 * sound.c (sound_warning): Don't crash if arg contains a printf format.
17972 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
17973 printf-like functions.
17974 (tiff_load): Add casts to remove these marks before passing them
17975 to system-supplied API.
17977 * eval.c (Fsignal): Remove excess argument to 'fatal'.
17979 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
17980 This avoids several warnings with gcc -Wstrict-overflow.
17981 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
17982 directly, rather than having caller test rule sign. This avoids
17983 some unnecessary tests.
17984 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
17985 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
17986 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
17988 * xfont.c (xfont_text_extents): Remove var that was set but not used.
17989 (xfont_open): Avoid unnecessary tests.
17991 * composite.c (composition_gstring_put_cache): Use unsigned integer.
17993 * composite.h, composite.c (composition_gstring_put_cache):
17994 Use EMACS_INT, not int, for length.
17996 * composite.h (COMPOSITION_DECODE_REFS): New macro,
17997 breaking out part of COMPOSITION_DECODE_RULE.
17998 (COMPOSITION_DECODE_RULE): Use it.
17999 * composite.c (get_composition_id): Remove unused local vars,
18000 by using the new macro.
18002 * textprop.c (set_text_properties_1): Change while to do-while,
18003 since the condition is always true at first.
18005 * intervals.c (graft_intervals_into_buffer): Mark var as used.
18006 (interval_deletion_adjustment): Return unsigned value.
18009 * process.c (list_processes_1, create_pty, read_process_output):
18010 (exec_sentinel): Remove vars that were set but not used.
18011 (create_pty): Remove unnecessary "volatile"s.
18012 (Fnetwork_interface_info): Avoid possibility of int overflow.
18013 (read_process_output): Do adaptive read buffering even if carryover.
18014 (read_process_output): Simplify nbytes computation if buffered.
18016 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
18018 * syntax.c (scan_words): Remove var that was set but not used.
18019 (update_syntax_table): Use unsigned instead of int.
18021 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
18022 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
18023 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
18025 * print.c (print_error_message): Avoid int overflow.
18027 * font.c (font_list_entities): Redo for clarity,
18028 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
18030 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
18031 (font_score): Avoid potential overflow in diff calculation.
18033 * fns.c (substring_both): Remove var that is set but not used.
18034 (sxhash): Redo loop for clarity and to avoid wraparound warning.
18036 * eval.c (funcall_lambda): Rename local to avoid shadowing.
18038 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
18039 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
18040 can always succeed if overflow has undefined behavior.
18042 * search.c (boyer_moore, wordify): Remove vars set but not used.
18043 (wordify): Omit three unnecessary tests.
18045 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
18046 All callers changed. This avoids the need for an unused var.
18048 * casefiddle.c (casify_region): Remove var that is set but not used.
18050 * dired.c (file_name_completion): Remove var that is set but not used.
18052 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
18054 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
18055 (Finsert_file_contents): Remove unnecessary code checking fd.
18057 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
18058 Check for integer overflow on size calculations.
18060 * buffer.c (Fprevious_overlay_change): Remove var that is set
18063 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
18064 Remove vars that are set but not used.
18065 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
18066 (timer_check_2): Mark vars as initialized.
18068 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
18070 * image.c (lookup_image): Remove var that is set but not used.
18071 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
18073 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
18074 that are set but not used.
18076 * xfns.c (make_invisible_cursor): Don't return garbage
18077 if XCreateBitmapFromData fails (Bug#8410).
18079 * xselect.c (x_get_local_selection, x_handle_property_notify):
18080 Remove vars that are set but not used.
18082 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
18083 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
18085 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
18086 Remove var that is set but not used.
18087 (scroll_bar_windows_size): Now size_t, not int.
18088 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
18089 Check for overflow.
18091 * xfaces.c (realize_named_face): Remove vars that are set but not used.
18092 (map_tty_color) [!defined MSDOS]: Likewise.
18094 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
18096 * coding.c: Remove vars that are set but not used.
18097 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
18098 All callers changed.
18099 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
18100 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
18101 (decode_coding_charset): Remove vars that are set but not used.
18103 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
18104 that is set but not used.
18106 * print.c (print_object): Remove var that is set but not used.
18108 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
18109 The gnulib version avoids calling malloc in the usual case,
18110 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
18111 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
18112 * filelock.c (current_lock_owner): Likewise.
18113 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
18114 * sysdep.c: Include allocator.h, careadlinkat.h.
18115 (emacs_no_realloc_allocator): New static constant.
18116 (emacs_readlink): New function.
18117 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
18118 ../lib/careadlinkat.h.
18120 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
18122 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
18123 first non-nil return value).
18125 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
18127 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
18128 if not defined (Bug#8403).
18130 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
18132 * xdisp.c (display_count_lines): Remove parameter `start',
18133 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
18134 (get_char_face_and_encoding): Remove parameter `multibyte_p',
18135 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
18136 (fill_stretch_glyph_string): Remove parameters `row' and `area',
18137 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
18138 and thereabouts. All callers changed.
18139 (get_per_char_metric): Remove parameter `f', unused since
18140 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
18142 2011-04-02 Jim Meyering <meyering@redhat.com>
18144 do not dereference NULL upon failed strdup
18145 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
18146 (ns_get_family): Likewise.
18148 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
18150 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
18152 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
18154 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
18157 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
18159 Add lexical binding.
18161 * window.c (Ftemp_output_buffer_show): New fun.
18162 (Fsave_window_excursion):
18163 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
18165 * lread.c (lisp_file_lexically_bound_p): New function.
18166 (Fload): Bind Qlexical_binding.
18167 (readevalloop): Remove `evalfun' arg.
18168 Bind Qinternal_interpreter_environment.
18169 (Feval_buffer): Bind Qlexical_binding.
18170 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
18172 (syms_of_lread): Declare `lexical-binding'.
18174 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
18176 * keyboard.c (eval_dyn): New fun.
18177 (menu_item_eval_property): Use it.
18179 * image.c (parse_image_spec): Use Ffunctionp.
18181 * fns.c (concat, mapcar1): Accept byte-code-functions.
18183 * eval.c (Fsetq): Handle lexical vars.
18184 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
18185 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
18186 (FletX, Flet): Obey lexical binding.
18187 (Fcommandp): Handle closures.
18188 (Feval): New `lexical' arg.
18189 (eval_sub): New function extracted from Feval. Use it almost
18190 everywhere where Feval was used. Look up vars in lexical env.
18192 (Ffunctionp): Move from subr.el.
18193 (Ffuncall): Handle closures.
18194 (apply_lambda): Remove `eval_flags'.
18195 (funcall_lambda): Handle closures and new byte-code-functions.
18196 (Fspecial_variable_p): New function.
18197 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
18198 but without exporting it to Lisp.
18200 * doc.c (Fdocumentation, store_function_docstring):
18201 * data.c (Finteractive_form): Handle closures.
18203 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
18206 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
18208 (exec_byte_code): New function extracted from Fbyte_code to handle new
18209 calling convention for byte-code-functions. Add new byte-codes.
18211 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
18213 * alloc.c (Fmake_symbol): Init new `declared_special' field.
18215 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
18217 * xdisp.c (redisplay_internal): Fix prototype.
18219 2011-03-31 Eli Zaretskii <eliz@gnu.org>
18221 * xdisp.c (SCROLL_LIMIT): New macro.
18222 (try_scrolling): Use it when setting scroll_limit.
18223 Limit scrolling to 100 screen lines.
18224 (redisplay_window): Even when falling back on "recentering",
18225 position point in the window according to scroll-conservatively,
18226 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
18228 (try_scrolling): When point is above the window, allow searching
18229 as far as scroll_max, or one screenful, to compute vertical
18230 distance from PT to the scroll margin position. This prevents
18231 try_scrolling from unnecessarily failing when
18232 scroll-conservatively is set to a value slightly larger than the
18233 window height. Clean up the case of PT below the margin at bottom
18234 of window: scroll_max can no longer be INT_MAX. When aggressive
18235 scrolling is in use, don't let point enter the opposite scroll
18236 margin as result of the scroll.
18237 (syms_of_xdisp) <scroll-conservatively>: Document the
18238 threshold of 100 lines for never-recentering scrolling.
18240 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
18242 * dispextern.h (move_it_by_lines):
18243 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
18244 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
18245 (message_log_check_duplicate): Remove parameters `prev_bol' and
18246 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
18247 (redisplay_internal): Remove parameter `preserve_echo_area',
18248 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
18250 * indent.c (Fvertical_motion):
18251 * window.c (window_scroll_pixel_based, Frecenter):
18252 Don't pass `need_y_p' to `move_it_by_lines'.
18254 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
18256 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
18257 steal a few bits to be more compact.
18258 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
18259 Remove unneeded casts.
18261 * bytecode.c (Fbyte_code): CAR and CDR can GC.
18263 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
18265 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
18266 binding" message (bug#7967).
18268 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
18270 Fix more problems found by GCC 4.6.0's static checks.
18272 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
18273 Remove unused local var.
18275 * editfns.c (Fmessage_box): Remove unused local var.
18277 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
18278 (note_mode_line_or_margin_highlight, note_mouse_highlight):
18279 Omit unused local vars.
18280 * window.c (shrink_windows): Omit unused local var.
18281 * menu.c (digest_single_submenu): Omit unused local var.
18282 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
18283 Omit unused local var.
18285 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
18286 Don't assume string length fits in int.
18287 (keyremap_step, read_key_sequence): Use size_t for sizes.
18288 (read_key_sequence): Don't check last_real_key_start redundantly.
18290 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
18291 instead of alloca (Bug#8344).
18293 * eval.c (Fbacktrace): Don't assume nargs fits in int.
18294 (Fbacktrace_frame): Don't assume nframes fits in int.
18296 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
18298 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
18301 * term.c (produce_glyphless_glyph): Remove unnecessary test.
18303 * cm.c (calccost): Turn while-do into do-while, for clarity.
18305 * keyboard.c (syms_of_keyboard): Use the same style as later
18306 in this function when indexing through an array. This also
18307 works around GCC bug 48267.
18309 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
18311 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
18313 * chartab.c (sub_char_table_ref_and_range): Redo for slight
18314 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
18316 * keyboard.c, keyboard.h (num_input_events): Now size_t.
18317 This avoids undefined behavior on integer overflow, and is a bit
18318 more convenient anyway since it is compared to a size_t variable.
18320 Variadic C functions now count arguments with size_t, not int.
18321 This avoids an unnecessary limitation on 64-bit machines, which
18322 caused (substring ...) to crash on large vectors (Bug#8344).
18323 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
18324 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
18325 All variadic functions and their callers changed accordingly.
18326 (struct gcpro.nvars): Now size_t, not int. All uses changed.
18327 * data.c (arith_driver, float_arith_driver): Likewise.
18328 * editfns.c (general_insert_function): Likewise.
18329 * eval.c (struct backtrace.nargs, interactive_p)
18330 (internal_condition_case_n, run_hook_with_args, apply_lambda)
18331 (funcall_lambda, mark_backtrace): Likewise.
18332 * fns.c (concat): Likewise.
18333 * frame.c (x_set_frame_parameters): Likewise.
18334 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
18335 0 if not found, not -1. All callers changed.
18337 * alloc.c (garbage_collect): Don't assume stack size fits in int.
18338 (stack_copy_size): Now size_t, not int.
18339 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
18341 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
18343 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
18344 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
18345 All callers changed.
18347 * lisp.h (multibyte_char_to_unibyte):
18348 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
18349 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
18350 * character.h (CHAR_TO_BYTE8):
18351 * cmds.c (internal_self_insert):
18352 * editfns.c (general_insert_function):
18353 * keymap.c (push_key_description):
18354 * search.c (Freplace_match):
18355 * xdisp.c (message_dolog, set_message_1): All callers changed.
18357 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
18359 * keyboard.c (safe_run_hook_funcall): New function.
18360 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
18361 don't set the hook to nil, but remove the offending function instead.
18362 (Qcommand_hook_internal): Remove, unused.
18363 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
18364 Vcommand_hook_internal.
18366 * eval.c (enum run_hooks_condition): Remove.
18367 (funcall_nil, funcall_not): New functions.
18368 (run_hook_with_args): Call each function through a `funcall' argument.
18369 Remove `cond' argument, now redundant.
18370 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
18371 (Frun_hook_with_args_until_failure): Adjust accordingly.
18372 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
18374 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
18376 * dispextern.h (string_buffer_position): Remove declaration.
18378 * print.c (strout): Remove parameter `multibyte', unused since
18379 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
18381 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
18382 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
18383 All callers changed.
18385 * w32.c (_wsa_errlist): Use braces for struct initializers.
18387 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
18388 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
18389 All callers changed.
18390 (string_buffer_position): Likewise. Also, make static (it's never
18391 used outside xdisp.c).
18392 (cursor_row_p): Remove parameter `w', unused since
18393 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
18394 (decode_mode_spec): Remove parameter `precision', introduced during
18395 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
18396 All callers changed.
18398 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
18400 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
18402 2011-03-27 Anders Lindgren <andlind@gmail.com>
18404 * nsterm.m (ns_menu_bar_is_hidden): New variable.
18405 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
18406 (ns_update_auto_hide_menu_bar): New functions.
18407 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
18408 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
18409 ns_constrain_all_frames.
18410 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
18411 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
18413 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
18415 * nsmenu.m (runDialogAt): Remove argument to timer_check.
18417 2011-03-27 Glenn Morris <rgm@gnu.org>
18419 * syssignal.h: Replace RETSIGTYPE with void.
18420 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
18421 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
18422 Replace SIGTYPE with void everywhere.
18423 * s/usg5-4-common.h (SIGTYPE): Remove definition.
18424 * s/template.h (SIGTYPE): Remove commented out definition.
18426 2011-03-26 Eli Zaretskii <eliz@gnu.org>
18428 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
18429 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
18431 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
18433 * w32.c (read_unc_volume): Use parameter `henum', instead of
18434 global variable `wget_enum_handle'.
18436 * keymap.c (describe_vector): Remove parameters `indices' and
18437 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
18438 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
18440 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
18442 * keyboard.c (timer_check): Remove parameter `do_it_now',
18443 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
18444 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
18445 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
18447 * keyboard.c (read_char):
18448 * w32menu.c (w32_menu_display_help):
18449 * xmenu.c (show_help_event, menu_help_callback):
18450 Adjust calls to `show_help_echo'.
18452 * gtkutil.c (xg_maybe_add_timer):
18453 * keyboard.c (readable_events):
18454 * process.c (wait_reading_process_output):
18455 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
18457 * insdel.c (adjust_markers_gap_motion):
18458 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
18459 (gap_left, gap_right): Don't call it.
18461 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
18463 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
18464 incurred during fontification.
18466 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
18468 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
18469 (DEFVAR_PER_BUFFER): Don't pass it.
18471 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
18472 (scrolling_window): Don't pass it.
18474 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
18476 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
18478 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
18480 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
18481 of variables specific to SELinux and computation of `encoded_absname'.
18483 * image.c (XPutPixel): Remove unused variable `height'.
18485 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
18487 * unexw32.c (get_section_info): Remove unused variable `section'.
18489 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
18490 (system_process_attributes): Remove unused variable `sess'.
18491 (sys_read): Remove unused variable `err'.
18493 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
18494 (w32_wnd_proc): Remove unused variable `isdead'.
18495 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
18496 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
18497 (x_create_tip_frame): Remove unused variable `tem'.
18499 * w32inevt.c (w32_console_read_socket):
18500 Remove unused variable `no_events'.
18502 * w32term.c (x_draw_composite_glyph_string_foreground):
18503 Remove unused variable `width'.
18505 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
18507 * w32term.c (x_set_glyph_string_clipping):
18508 Don't pass uninitialized region to CombineRgn.
18510 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
18512 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
18513 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
18514 (Fx_close_connection): Remove unused variable `i'.
18516 * w32font.c (w32font_draw): Return number of glyphs.
18517 (w32font_open_internal): Remove unused variable `i'.
18518 (w32font_driver): Add missing initializer.
18520 * w32menu.c (utf8to16): Remove unused variable `utf16'.
18521 (fill_in_menu): Remove unused variable `items_added'.
18523 * w32term.c (last_mouse_press_frame): Remove static global variable.
18524 (w32_clip_to_row): Remove unused variable `f'.
18525 (x_delete_terminal): Remove unused variable `i'.
18527 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
18528 (NOTHING): Remove unused static global variable.
18529 (uniscribe_check_otf): Remove unused variable `table'.
18530 (uniscribe_font_driver): Add missing initializers.
18532 2011-03-23 Julien Danjou <julien@danjou.info>
18534 * term.c (Fsuspend_tty, Fresume_tty):
18535 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
18536 * window.c (temp_output_buffer_show):
18537 * insdel.c (signal_before_change):
18538 * frame.c (Fhandle_switch_frame):
18539 * fileio.c (Fdo_auto_save):
18540 * emacs.c (Fkill_emacs):
18541 * editfns.c (save_excursion_restore):
18542 * cmds.c (internal_self_insert):
18543 * callint.c (Fcall_interactively):
18544 * buffer.c (Fkill_all_local_variables):
18545 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
18547 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
18548 unconditionally since it does the check itself.
18550 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
18552 Fix more problems found by GCC 4.5.2's static checks.
18554 * coding.c (encode_coding_raw_text): Avoid unnecessary test
18555 the first time through the loop, since we know p0 < p1 then.
18556 This also avoids a gcc -Wstrict-overflow warning.
18558 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
18559 leading to a memory leak, possible in functions like
18560 load_charset_map_from_file that can allocate an unbounded number
18561 of objects (Bug#8318).
18563 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
18564 that could (at least in theory) be that large.
18566 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
18567 This is less likely to overflow, and avoids undefined behavior if
18568 overflow does occur. All callers changed. Use strtoul to scan
18569 for the unsigned long integer.
18570 (pint2hrstr): Simplify and tune code slightly.
18571 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
18573 * scroll.c (do_scrolling): Work around GCC bug 48228.
18574 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
18576 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
18577 This also avoids a warning with gcc -Wstrict-overflow.
18578 (validate_x_resource_name): Simplify count usage.
18579 This also avoids a warning with gcc -Wstrict-overflow.
18581 * fileio.c (Fcopy_file): Report error if fchown or fchmod
18584 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
18586 * process.c (Fmake_network_process): Use socklen_t, not int,
18587 where POSIX says socklen_t is required in portable programs.
18588 This fixes a porting bug on hosts like 64-bit HP-UX, where
18589 socklen_t is wider than int (Bug#8277).
18590 (Fmake_network_process, server_accept_connection):
18591 (wait_reading_process_output, read_process_output):
18594 * process.c: Rename or move locals to avoid shadowing.
18595 (list_processes_1, Fmake_network_process):
18596 (read_process_output_error_handler, exec_sentinel_error_handler):
18597 Rename or move locals.
18598 (Fmake_network_process): Define label "retry_connect" only if needed.
18599 (Fnetwork_interface_info): Fix pointer signedness.
18600 (process_send_signal): Add cast to avoid pointer signedness problem.
18601 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
18602 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
18604 Make tparam.h and terminfo.c consistent.
18605 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
18606 Include tparam.h instead, since it declares them.
18607 * cm.h (PC): Remove extern decl; tparam.h now does this.
18608 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
18609 * terminfo.c: Include tparam.h, to check interfaces.
18610 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
18611 (tparam): Adjust signature to match interface in tparam.h;
18612 this removes some undefined behavior. Check that outstring and len
18613 are zero, which they always are with Emacs.
18614 * tparam.h (PC, BC, UP): New extern decls.
18616 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
18617 (xftfont_open): Rename locals to avoid shadowing.
18619 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
18620 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
18621 (OTF_TAG_SYM): Omit macro if not needed.
18622 (ftfont_list): Remove unused local.
18623 (get_adstyle_property, ftfont_pattern_entity):
18624 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
18625 Rename locals to avoid shadowing.
18627 * xfont.c (xfont_list_family): Mark var as initialized.
18629 * xml.c (make_dom): Now static.
18631 * composite.c (composition_compute_stop_pos): Rename local to
18633 (composition_reseat_it): Remove unused locals.
18634 (find_automatic_composition, composition_adjust_point): Likewise.
18635 (composition_update_it): Mark var as initialized.
18636 (find_automatic_composition): Mark vars as initialized,
18637 with a FIXME (Bug#8290).
18639 character.h: Rename locals to avoid shadowing.
18640 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
18641 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
18642 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
18643 (BUF_DEC_POS): Be more systematic about renaming local temporaries
18644 to avoid shadowing.
18646 * textprop.c (property_change_between_p): Remove; unused.
18648 * intervals.c (interval_start_pos): Now static.
18650 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
18652 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
18653 Rename locals to avoid shadowing.
18655 * sound.c (wav_play, au_play, Fplay_sound_internal):
18656 Fix pointer signedness.
18657 (alsa_choose_format): Remove unused local var.
18658 (wav_play): Initialize a variable to 0, to prevent undefined
18659 behavior (Bug#8278).
18661 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
18663 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
18665 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
18666 clobbering (Bug#8298).
18667 * sysdep.c (sys_subshell): Likewise.
18668 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
18670 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
18671 This should get cleaned up, so that child_setup has the
18672 same signature on all platforms.
18674 * callproc.c (call_process_cleanup): Now static.
18675 (relocate_fd): Rename locals to avoid shadowing.
18677 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
18679 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
18680 not to be necessary, and produces flickering.
18682 2011-03-20 Glenn Morris <rgm@gnu.org>
18684 * config.in: Remove file.
18686 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
18688 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
18689 are now in src/globals.h.
18690 (syms_of_minibuf): Remove spurious & from previous change.
18692 2011-03-20 Leo Liu <sdl.web@gmail.com>
18694 * minibuf.c (completing-read-function): New variable.
18695 (completing-read-default): Rename from completing-read.
18696 (completing-read): Call completing-read-function.
18698 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
18700 * xfaces.c (Fx_load_color_file):
18701 Read color file from absolute filename (bug#8250).
18703 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
18705 * makefile.w32-in: Update dependencies.
18707 2011-03-17 Eli Zaretskii <eliz@gnu.org>
18709 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
18711 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
18713 Fix more problems found by GCC 4.5.2's static checks.
18715 * process.c (make_serial_process_unwind, send_process_trap):
18716 (sigchld_handler): Now static.
18718 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
18719 That way, the code declares only the vars that it needs.
18720 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
18721 * s/cygwin.h (PTY_ITERATION): Likewise.
18722 * s/darwin.h (PTY_ITERATION): Likewise.
18723 * s/gnu-linux.h (PTY_ITERATION): Likewise.
18725 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
18726 * process.c (allocate_pty): Don't declare stb unless it's needed.
18728 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
18729 (CONSTANTLIM): Remove; unused.
18730 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
18731 Define only if needed.
18733 * unexelf.c (unexec): Name an expression,
18734 to avoid gcc -Wbad-function-cast warning.
18735 Use a different way to cause a compilation error if anyone uses
18736 n rather than nn, a way that does not involve shadowing.
18737 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
18739 * deps.mk (unexalpha.o): Remove; unused.
18741 New file unexec.h, the (simple) interface for unexec (Bug#8267).
18742 * unexec.h: New file.
18743 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
18744 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
18745 Depend on unexec.h.
18746 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
18747 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
18748 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
18749 Change as necessary to match prototype in unexec.h.
18751 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
18753 (back_comment, skip_chars): Mark vars as initialized.
18755 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
18756 Rename locals to avoid shadowing.
18758 * lread.c (read1): Rewrite so as not to use empty "else".
18759 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
18761 * print.c (Fredirect_debugging_output): Fix pointer signedess.
18763 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
18764 warning when compiling print.c.
18766 * font.c (font_unparse_fcname): Abort in an "impossible" situation
18767 instead of using an uninitialized var.
18768 (font_sort_entities): Mark var as initialized.
18770 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
18772 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
18773 pointers to constants.
18774 (font_parse_fcname): Remove unused vars.
18775 (font_delete_unmatched): Now static.
18776 (font_get_spec): Remove; unused.
18777 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
18778 (font_update_drivers, Ffont_get_glyphs, font_add_log):
18779 Rename or move locals to avoid shadowing.
18781 * fns.c (require_nesting_list, require_unwind): Now static.
18782 (Ffillarray): Rename locals to avoid shadowing.
18784 * floatfns.c (domain_error2): Define only if needed.
18785 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
18787 * alloc.c (mark_backtrace): Move decl from here ...
18788 * lisp.h: ... to here, so that it can be checked.
18790 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
18791 (Fdefvar): Rewrite so as not to use empty "else".
18792 (lisp_indirect_variable): Name an expression,
18793 to avoid gcc -Wbad-function-cast warning.
18794 (Fdefvar): Rename locals to avoid shadowing.
18796 * callint.c (quotify_arg, quotify_args): Now static.
18797 (Fcall_interactively): Rename locals to avoid shadowing.
18798 Use const pointer when appropriate.
18800 * lisp.h (get_system_name, get_operating_system_release):
18801 Move decls here, to check interfaces.
18802 * process.c (get_operating_system_release): Move decl to lisp.h.
18803 * xrdb.c (get_system_name): Likewise.
18804 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
18805 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
18806 some of which prompt warnings from gcc -Wbad-function-cast.
18807 (Fformat_time_string, Fencode_time, Finsert_char):
18808 (Ftranslate_region_internal, Fformat):
18809 Rename or remove local vars to avoid shadowing.
18810 (Ftranslate_region_internal): Mark var as initialized.
18812 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
18815 * lisp.h (eassert): Check that the argument compiles, even if
18816 ENABLE_CHECKING is not defined.
18818 * data.c (Findirect_variable): Name an expression, to avoid
18819 gcc -Wbad-function-cast warning.
18820 (default_value, arithcompare, arith_driver, arith_error): Now static.
18821 (store_symval_forwarding): Rename local to avoid shadowing.
18822 (Fmake_variable_buffer_local, Fmake_local_variable):
18823 Mark variables as initialized.
18824 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
18826 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
18827 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
18828 Rename locals to avoid shadowing.
18829 (mark_stack): Move local variables into the #ifdef region where
18831 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
18832 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
18834 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
18835 (GC_STRING_CHARS): Remove; not used.
18836 (Fmemory_limit): Cast sbrk's returned value to char *.
18838 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
18839 avoids undefined behavior in theory.
18841 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
18843 Use functions, not macros, for up- and down-casing (Bug#8254).
18844 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18845 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
18846 to use the following functions instead of these macros.
18847 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
18848 EMACS_INT, since callers assume the returned value fits in int.
18849 (upcase1): Likewise, for UPCASE_TABLE.
18850 (uppercasep, lowercasep, upcase): New static inline functions.
18851 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
18852 the race-condition problem in the old DOWNCASE.
18854 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
18855 Rename locals to avoid shadowing.
18856 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
18857 (regex_compile, re_search_2, re_match_2_internal):
18858 Remove unused local vars.
18859 (FREE_VAR): Rewrite so as not to use empty "else",
18860 which gcc can warn about.
18861 (regex_compile, re_match_2_internal): Mark locals as initialized.
18862 (RETALLOC_IF): Define only if needed.
18863 (WORDCHAR_P): Likewise. This one is never needed, but is used
18864 only in a comment talking about a compiler bug, so put inside
18865 the #if 0 of that comment.
18866 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
18867 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
18870 * search.c (boyer_moore): Rename locals to avoid shadowing.
18871 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
18872 (PREV_CHAR_BOUNDARY): Likewise.
18874 * search.c (simple_search): Remove unused var.
18876 * dired.c (compile_pattern): Move decl from here ...
18877 * lisp.h: ... to here, so that it can be checked.
18878 (struct re_registers): New forward decl.
18880 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
18882 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
18884 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
18885 Rename locals to avoid shadowing.
18886 (Fvertical_motion): Mark locals as initialized.
18888 * casefiddle.c (casify_object, casify_region): Now static.
18889 (casify_region): Mark local as initialized.
18891 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
18893 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
18894 New macros, so that the caller can use some names other than
18895 gcpro1, gcpro2, etc.
18896 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
18898 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
18899 argument, for consistency with GCPRO2_VAR, etc: it is now the
18900 prefix of the variable, not the variable itself. All uses
18902 * dired.c (directory_files_internal, file_name_completion):
18903 Rename locals to avoid shadowing.
18905 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
18906 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
18907 dired.c's scmp function, had undefined behavior.
18908 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18909 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
18910 * buffer.h: ... to here, because these macros use current_buffer,
18911 and the new implementation with inline functions needs to have
18912 current_buffer in scope now, rather than later when the macros
18914 (downcase, upcase1): New static inline functions.
18915 (DOWNCASE, UPCASE1): Reimplement using these functions.
18916 This avoids undefined behavior in expressions like
18917 DOWNCASE (x) == DOWNCASE (y), which previously suffered
18918 from race conditions in accessing the global variables
18919 case_temp1 and case_temp2.
18920 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
18921 * lisp.h (case_temp1, case_temp2): Remove their decls.
18922 * character.h (ASCII_CHAR_P): Move from here ...
18923 * lisp.h: ... to here, so that the inline functions mentioned
18924 above can use them.
18926 * dired.c (directory_files_internal_unwind): Now static.
18928 * fileio.c (file_name_as_directory, directory_file_name):
18929 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
18931 (file_name_as_directory): Use const pointers when appropriate.
18932 (Fexpand_file_name): Likewise. In particular, newdir might
18933 point at constant storage, so make it a const pointer.
18934 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
18935 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
18937 (Fset_file_times, Finsert_file_contents, auto_save_error):
18938 Rename locals to avoid shadowing.
18940 * minibuf.c (choose_minibuf_frame_1): Now static.
18941 (Ftry_completion, Fall_completions): Rename or remove locals
18942 to avoid shadowing.
18944 * marker.c (bytepos_to_charpos): Remove; unused.
18946 * lisp.h (verify_bytepos, count_markers): New decls,
18947 so that gcc does not warn that these functions aren't declared.
18949 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
18950 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
18951 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
18952 (copy_text): Remove unused local var.
18954 * filelock.c (within_one_second): Now static.
18955 (lock_file_1): Rename local to avoid shadowing.
18957 * buffer.c (fix_overlays_before): Mark locals as initialized.
18958 (fix_start_end_in_overlays): Likewise. This function should be
18959 simplified by using pointers-to-pointers, but that's a different
18961 (switch_to_buffer_1): Now static.
18962 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
18963 (report_overlay_modification): Rename locals to avoid shadowing.
18965 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
18966 Fix pointer signedness issue.
18967 (sys_subshell): Mark local as volatile if checking for lint,
18968 to suppress a gcc -Wclobbered warning that does not seem to be right.
18969 (MAXPATHLEN): Define only if needed.
18971 * process.c (serial_open, serial_configure): Move decls from here ...
18972 * systty.h: ... to here, so that they can be checked.
18974 * fns.c (get_random, seed_random): Move extern decls from here ...
18975 * lisp.h: ... to here, so that they can be checked.
18977 * sysdep.c (reset_io): Now static.
18978 (wait_for_termination_signal): Remove; unused.
18980 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
18981 (copy_keymap_item, append_key, push_text_char_description):
18983 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
18984 (DENSE_TABLE_SIZE): Remove; unused.
18985 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
18986 (describe_map_tree):
18987 Rename locals to avoid shadowing.
18989 * keyboard.c: Declare functions static if they are not used elsewhere.
18990 (echo_char, echo_dash, cmd_error, top_level_2):
18991 (poll_for_input, handle_async_input): Now static.
18992 (read_char, kbd_buffer_get_event, make_lispy_position):
18993 (make_lispy_event, make_lispy_movement, apply_modifiers):
18994 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
18995 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
18996 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
18997 (read_key_sequence, read_char): Mark locals as initialized.
18998 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
19000 * keyboard.h (make_ctrl_char): New decl.
19001 (mark_kboards): Move decl here ...
19002 * alloc.c (mark_kboards): ... from here.
19004 * lisp.h (force_auto_save_soon): New decl.
19006 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
19007 (DEFINE_DUMMY_FUNCTION): New macro.
19008 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
19010 (main): Add casts to avoid warnings
19011 if GCC considers string literals to be constants.
19013 * lisp.h (fatal_error_signal): Add decl, since it's exported.
19015 * dbusbind.c: Pointer signedness fixes.
19016 (xd_signature, xd_append_arg, xd_initialize):
19017 (Fdbus_call_method, Fdbus_call_method_asynchronously):
19018 (Fdbus_method_return_internal, Fdbus_method_error_internal):
19019 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
19020 (Fdbus_register_signal): Use SSDATA when the context wants char *.
19022 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
19023 if GCC considers string literals to be constants.
19024 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
19026 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
19028 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
19029 (print_preprocess, print_object): New macro to fix last change.
19031 * print.c (print_preprocess): Don't forget font objects.
19033 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
19035 * emacs.c (USAGE3): Doc fixes.
19037 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
19039 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
19042 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
19044 * lisp.h (VWindow_system, Qfile_name_history):
19045 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
19046 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
19047 (w32_system_caret_x, w32_system_caret_y): Declare extern.
19049 * w32select.c: Don't #include "keyboard.h".
19050 (run_protected): Add extern declaration for waiting_for_input.
19052 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
19053 * w32console.c (detect_input_pending, read_input_pending)
19054 (encode_terminal_code):
19055 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
19056 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
19057 (w32_system_caret_y, Qfile_name_history):
19058 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
19059 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
19060 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
19061 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
19062 * w32proc.c (Qlocal, report_file_error):
19063 * w32term.c (Vwindow_system, updating_frame):
19064 * w32uniscribe.c (initialized, uniscribe_font_driver):
19065 Remove unneeded extern declarations.
19067 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
19069 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
19071 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
19073 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
19074 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
19075 These macros can no longer be used for assignment.
19077 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
19078 Assign struct members directly, instead of using BUF_BEGV etc.
19079 (record_buffer_markers, fetch_buffer_markers): New functions for
19080 recording and fetching special buffer markers.
19081 (set_buffer_internal_1, set_buffer_temp): Use them.
19083 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
19085 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
19087 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
19088 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
19090 * xdisp.c (hscroll_window_tree):
19091 (reconsider_clip_changes): Use PT instead of BUF_PT.
19093 2011-03-13 Eli Zaretskii <eliz@gnu.org>
19095 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
19096 $(EMACS_ROOT)/lib/intprops.h.
19098 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
19100 Fix more problems found by GCC 4.5.2's static checks.
19102 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
19103 to unsigned char * to avoid compiler diagnostic.
19104 (xg_free_frame_widgets): Make it clear that a local variable is
19105 needed only if USE_GTK_TOOLTIP.
19106 (gdk_window_get_screen): Make it clear that this macro is needed
19107 only if USE_GTK_TOOLTIP.
19108 (int_gtk_range_get_value): New function, which avoids a diagnostic
19109 from gcc -Wbad-function-cast.
19110 (xg_set_toolkit_scroll_bar_thumb): Use it.
19111 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
19112 diagnostic from gcc -Wbad-function-cast.
19113 (get_utf8_string, xg_get_file_with_chooser):
19114 Rename locals to avoid shadowing.
19115 (create_dialog): Move locals to avoid shadowing.
19117 * xgselect.c (xg_select): Remove unused var.
19119 * image.c (four_corners_best): Mark locals as initialized.
19120 (gif_load): Initialize transparent_p to zero (Bug#8238).
19121 Mark another local as initialized.
19122 (my_png_error, my_error_exit): Mark with NO_RETURN.
19124 * image.c (clear_image_cache): Now static.
19125 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
19126 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
19127 (x_edge_detection): Remove unnecessary cast that
19128 gcc -Wbad-function-cast diagnoses.
19129 (gif_load): Fix pointer signedness.
19130 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
19131 (jpeg_load, gif_load): Rename locals to avoid shadowing.
19133 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
19135 Improve quality of tests for time stamp overflow.
19136 For example, without this patch (encode-time 0 0 0 1 1
19137 1152921504606846976) returns the obviously-bogus value (-948597
19138 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
19139 reports time overflow. See
19140 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
19141 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
19142 * editfns.c: Include limits.h and intprops.h.
19143 (TIME_T_MIN, TIME_T_MAX): New macros.
19144 (time_overflow): Move earlier, to before first use.
19145 (hi_time, lo_time): New functions, for an accurate test for
19146 out-of-range times.
19147 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
19148 (Fget_internal_run_time): Don't assume time_t fits in int.
19149 (make_time): Use list2 instead of Fcons twice.
19150 (Fdecode_time): More accurate test for out-of-range times.
19151 (check_tm_member): New function.
19152 (Fencode_time): Use it, to test for out-of-range times.
19153 (lisp_time_argument): Don't rely on undefined left-shift and
19154 right-shift behavior when checking for time stamp overflow.
19156 * editfns.c (time_overflow): New function, refactoring common code.
19157 (Fformat_time_string, Fdecode_time, Fencode_time):
19158 (Fcurrent_time_string): Use it.
19160 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
19161 * dired.c (make_time): Move to ...
19162 * editfns.c (make_time): ... here.
19163 * systime.h: Note the move.
19165 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
19167 * fringe.c (update_window_fringes): Remove unused variables.
19169 * unexmacosx.c (copy_data_segment): Also copy __got section.
19172 2011-03-12 Eli Zaretskii <eliz@gnu.org>
19174 * termcap.c [MSDOS]: Include "msdos.h".
19175 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
19176 Constify `char *' arguments and their references according to
19177 prototypes in tparam.h.
19179 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
19181 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
19182 Adapt all references accordingly.
19184 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
19186 2011-03-11 Tom Tromey <tromey@redhat.com>
19188 * buffer.c (syms_of_buffer): Remove obsolete comment.
19190 2011-03-11 Eli Zaretskii <eliz@gnu.org>
19192 * termhooks.h (encode_terminal_code): Declare prototype.
19194 * msdos.c (encode_terminal_code): Don't declare prototype.
19196 * term.c (encode_terminal_code): Now external again, used by
19197 w32console.c and msdos.c.
19199 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
19200 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
19202 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
19204 Fix some minor problems found by GCC 4.5.2's static checks.
19206 * fringe.c (update_window_fringes): Mark locals as initialized
19208 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
19210 * alloc.c (mark_fringe_data): Move decl from here ...
19211 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
19212 to check its interface.
19213 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
19215 * fontset.c (free_realized_fontset): Now static.
19216 (Fset_fontset_font): Rename local to avoid shadowing.
19217 (fontset_font): Mark local as initialized.
19218 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
19220 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
19222 * xselect.c (x_disown_buffer_selections): Remove; not used.
19223 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
19224 (x_own_selection, Fx_disown_selection_internal): Rename locals
19225 to avoid shadowing.
19226 (x_handle_dnd_message): Remove local to avoid shadowing.
19228 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
19229 so that the caller can use some name other than gcpro1.
19230 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
19231 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
19232 (Fx_backspace_delete_keys_p):
19233 Use them to avoid shadowing, and rename vars to avoid shadowing.
19234 (x_decode_color, x_set_name, x_window): Now static.
19235 (Fx_create_frame): Add braces to silence GCC warning.
19236 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
19237 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
19238 Remove unused locals.
19239 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
19240 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
19241 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
19244 * xterm.h (x_mouse_leave): New decl.
19246 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
19247 Remove unused functions.
19248 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
19249 (x_calc_absolute_position): Now static.
19250 (XTread_socket): Don't define label "out" unless it's used.
19251 Don't declare local "event" unless it's used.
19252 (x_iconify_frame, x_free_frame_resources): Don't declare locals
19253 unless they are used.
19254 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
19255 (x_fatal_error_signal): Remove; not used.
19256 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
19257 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
19258 (x_error_catcher, x_connection_closed, x_error_handler):
19259 (x_error_quitter, xembed_send_message, x_iconify_frame):
19260 (my_log_handler): Rename locals to avoid shadowing.
19261 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
19262 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
19264 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
19265 Rename or move locals to avoid shadowing.
19266 (tty_defined_color, merge_face_heights): Now static.
19267 (free_realized_faces_for_fontset): Remove; not used.
19268 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
19269 does not deduce is never used uninitialized.
19270 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
19271 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
19273 * terminal.c (store_terminal_param): Now static.
19275 * xmenu.c (menu_highlight_callback): Now static.
19276 (set_frame_menubar): Remove unused local.
19277 (xmenu_show): Rename parameter to avoid shadowing.
19278 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
19279 since they might point to immutable storage.
19280 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
19281 since it's unused otherwise.
19283 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
19284 Add a FIXME, since the code still doesn't look right. (Bug#8215)
19285 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
19286 avoids a gcc -Wuninitialized diagnostic.
19287 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
19288 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
19289 does not deduce are never used uninitialized.
19291 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
19293 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
19294 * window.c (window_loop, size_window):
19295 (run_window_configuration_change_hook, enlarge_window): Likewise.
19297 * window.c (display_buffer): Now static.
19298 (size_window): Mark variables that gcc -Wuninitialized
19299 does not deduce are never used uninitialized.
19300 * window.h (check_all_windows): New decl, to forestall
19301 gcc -Wmissing-prototypes diagnostic.
19302 * dispextern.h (bidi_dump_cached_states): Likewise.
19304 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
19306 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
19307 Include <limits.h>.
19308 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
19309 and to avoid gcc -Wuninitialized warning.
19310 (load_charset_map): Mark variables that gcc -Wuninitialized
19311 does not deduce are never used uninitialized.
19312 (load_charset): Abort instead of using uninitialized var (Bug#8229).
19314 * coding.c (coding_set_source, coding_set_destination):
19315 Use "else { /* comment */ }" rather than "else /* comment */;"
19316 for clarity, and to avoid gcc -Wempty-body warning.
19317 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
19318 a block, when the outer 'i' will do.
19319 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
19320 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
19321 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
19322 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
19323 (Fdecode_sjis_char, Fdefine_coding_system_internal):
19324 Rename locals to avoid shadowing.
19325 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
19326 * coding.c (emacs_mule_char, encode_invocation_designation):
19327 Now static, since they're not used elsewhere.
19328 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
19329 (decode_coding_object, encode_coding_object, detect_coding_system):
19330 (decode_coding_emacs_mule): Mark variables that gcc
19331 -Wuninitialized does not deduce are never used uninitialized.
19332 (detect_coding_iso_2022): Initialize a local variable that might
19333 be used uninitialized. Leave a FIXME because it's not clear that
19334 this initialization is needed. (Bug#8211)
19335 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
19336 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
19337 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
19338 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
19339 Remove unused macros.
19341 * category.c (hash_get_category_set): Remove unused local var.
19342 (copy_category_table): Now static, since it's not used elsewhere.
19343 * character.c (string_count_byte8): Likewise.
19345 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
19346 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
19348 * chartab.c (copy_sub_char_table): Now static, since it's not used
19350 (sub_char_table_ref_and_range, char_table_ref_and_range):
19351 Rename locals to avoid shadowing.
19352 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
19354 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
19355 (BIDI_BOB): Remove unused macro.
19357 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
19358 deduce are never used uninitialized.
19359 * term.c (encode_terminal_code): Likewise.
19361 * term.c (encode_terminal_code): Now static. Remove unused local.
19363 * tparam.h: New file.
19364 * term.c, tparam.h: Include it.
19365 * deps.mk (term.o, tparam.o): Depend on tparam.h.
19366 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
19367 Move these decls to tparam.h, and make them agree with what
19368 is actually in tparam.c. The previous trick of using incompatible
19369 decls in different modules does not conform to the C standard.
19370 All callers of tparam changed to use tparam's actual API.
19371 * tparam.c (tparam1, tparam, tgoto):
19372 Use const pointers where appropriate.
19374 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
19375 * cm.h (struct cm): Likewise.
19376 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
19377 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
19378 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
19379 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
19380 (turn_on_face, init_tty): Likewise.
19381 * termchar.h (struct tty_display_info): Likewise.
19383 * term.c (term_mouse_position): Rename local to avoid shadowing.
19385 * alloc.c (mark_ttys): Move decl from here ...
19386 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
19388 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
19390 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
19392 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
19394 * search.c (compile_pattern_1): Remove argument regp, unused since
19395 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
19396 (compile_pattern): Don't pass it.
19398 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
19400 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
19401 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
19403 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
19405 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
19407 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
19408 gdk_window_get_screen, gdk_window_get_geometry,
19409 gdk_x11_window_lookup_for_display and GDK_KEY_g.
19410 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
19411 (xg_get_pixbuf_from_pixmap): New function.
19412 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
19413 to Pixmap, take frame as parameter, remove GdkColormap parameter.
19414 Call xg_get_pixbuf_from_pixmap instead of
19415 gdk_pixbuf_get_from_drawable.
19416 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
19417 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
19418 (xg_check_special_colors): Use GtkStyleContext and its functions
19420 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
19421 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
19422 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
19423 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
19424 Call gtk_widget_get_preferred_size.
19425 (xg_frame_resized): gdk_window_get_geometry only takes 5
19427 (xg_win_to_widget, xg_event_is_for_menubar):
19428 Call gdk_x11_window_lookup_for_display.
19429 (xg_set_widget_bg): New function.
19430 (delete_cb): New function.
19431 (xg_create_frame_widgets): Connect delete-event to delete_cb.
19432 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
19433 (xg_set_background_color): Call xg_set_widget_bg.
19434 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
19435 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
19436 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
19437 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
19439 (update_frame_tool_bar): Call gtk_widget_hide.
19440 (xg_initialize): Use GDK_KEY_g.
19442 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
19444 (x_session_initialize): Call gdk_x11_set_sm_client_id.
19446 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
19447 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
19448 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
19450 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
19452 * w32xfns.c (select_palette): Check success of RealizePalette against
19453 GDI_ERROR, not zero.
19455 See ChangeLog.11 for earlier changes.
19457 ;; Local Variables:
19461 Copyright (C) 2011-2012 Free Software Foundation, Inc.
19463 This file is part of GNU Emacs.
19465 GNU Emacs is free software: you can redistribute it and/or modify
19466 it under the terms of the GNU General Public License as published by
19467 the Free Software Foundation, either version 3 of the License, or
19468 (at your option) any later version.
19470 GNU Emacs is distributed in the hope that it will be useful,
19471 but WITHOUT ANY WARRANTY; without even the implied warranty of
19472 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19473 GNU General Public License for more details.
19475 You should have received a copy of the GNU General Public License
19476 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.