1 2012-12-05 Eli Zaretskii <eliz@gnu.org>
3 * callproc.c (Fcall_process_region) [!HAVE_MKSTEMP]: If mktemp
4 fails, signal an error instead of continuing with an empty
6 Encode expanded temp file pattern before passing it to mkstemp or
9 2012-12-04 Eli Zaretskii <eliz@gnu.org>
11 * fileio.c (file_name_as_directory, directory_file_name) [DOS_NT]:
12 Encode the file name before passing it to dostounix_filename, in
13 case it will downcase it (under w32-downcase-file-names).
16 2012-12-01 Chong Yidong <cyd@gnu.org>
18 * fileio.c (Vauto_save_list_file_name): Doc fix.
20 2012-11-30 Fabrice Popineau <fabrice.popineau@gmail.com>
22 * w32fns.c: Remove prototype of atof.
23 (syspage_mask): Declared DWORD_PTR, for compatibility with 64-bit
25 (file_dialog_callback): Declared UINT_PTR.
27 * w32common.h (syspage_mask): Declare DWORD_PTR, for compatibility
30 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
31 (FILE_ANY_ACCESS, CTL_CODE) [_MSC_VER]: Define only if not already
34 2012-11-27 Glenn Morris <rgm@gnu.org>
36 * data.c (Fboundp, Fsymbol_value): Doc fix re lexical-binding.
38 2012-11-26 Eli Zaretskii <eliz@gnu.org>
40 * fontset.c (Finternal_char_font): Return nil on non-GUI frames.
43 2012-11-24 Paul Eggert <eggert@cs.ucla.edu>
45 Revert recent change for Bug#8855.
46 As reported by Harald Hanche-Olsen in
47 <http://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00445.html>
48 the change introduces a further bug, of creating lots of zombie
49 processes in some cases. Further work is needed to come up with a
50 better fix for Bug#8855.
52 2012-11-24 Eli Zaretskii <eliz@gnu.org>
54 * xdisp.c (draw_glyphs): Don't draw in mouse face if mouse
55 highlighting on the frame was cleared. Prevents assertion
56 violations when repeatedly clicking on the "Top" link of the
57 "bread-crumbs" in Info buffers.
59 2012-11-23 Paul Eggert <eggert@cs.ucla.edu>
60 Eli Zaretskii <eliz@gnu.org>
62 Fix a race condition with glib (Bug#8855).
63 The symptom is a diagnostic "GLib-WARNING **: In call to
64 g_spawn_sync(), exit status of a child process was requested but
65 SIGCHLD action was set to SIG_IGN and ECHILD was received by
66 waitpid(), so exit status can't be returned." The diagnostic
67 is partly wrong, as the SIGCHLD action is not set to SIG_IGN.
68 The real bug is a race condition between Emacs and glib: Emacs
69 does a waitpid (-1, ...) and reaps glib's subprocess by mistake,
70 so that glib can't find it. Work around the bug by invoking
71 waitpid only on subprocesses that Emacs itself creates.
73 This is a backport from the trunk, consisting of:
75 * w32proc.c (create_child): Don't clip the PID of the child
76 process to fit into an Emacs integer, as this is no longer a
78 (waitpid): Rename from sys_wait. Emulate a Posix 'waitpid' by
79 reaping only the process specified by PID argument, if that is
80 positive. Use PID instead of dead_child to know which process to
81 reap. Wait for the child to die only if WNOHANG is not in
83 (sys_select): Don't set dead_child.
85 * sysdep.c (wait_for_termination_1): Remove the WINDOWSNT portion,
86 as it is no longer needed.
88 * process.c (waitpid, WUNTRACED) [!WNOHANG]: Remove definitions,
90 (create_process, record_child_status_change): Don't use special
91 value -1 in pid field, as the caller now must know the pid rather
92 than having the callee infer it. The inference was sometimes
93 incorrect anyway, due to another race.
94 (create_process): Set new 'alive' member if child is created.
95 (process_status_retrieved): New function.
96 (record_child_status_change): Use it.
97 Accept negative 1st argument, which means to wait for the
98 processes that Emacs already knows about. Move special-case code
99 for DOS_NT (which lacks WNOHANG) here, from caller. Keep track of
100 processes that have already been waited for, by testing and
101 clearing new 'alive' member. Remove the setting of
102 record_at_most_one_child for the !WNOHANG case.
103 (CAN_HANDLE_MULTIPLE_CHILDREN): Remove, as record_child_status_change
104 now does this internally.
105 (handle_child_signal): Let record_child_status_change do all
106 the work, since we do not want to reap all exited child processes,
107 only the child processes that Emacs itself created.
108 * process.h (Lisp_Process): New boolean member 'alive'.
110 2012-11-23 Eli Zaretskii <eliz@gnu.org>
112 * xdisp.c (set_cursor_from_row): Skip step 2 only if point is not
113 between bpos_covered and bpos_max. This fixes cursor display when
114 several display strings follow each other.
116 * .gdbinit (pgx): If the glyph's object is a string, display the
117 pointer to string data, rather than the value of the string object
118 itself (which barfs under CHECK_LISP_OBJECT_TYPE).
120 2012-11-21 Eli Zaretskii <eliz@gnu.org>
122 * indent.c (Fvertical_motion): If the starting position is covered
123 by a display string, return to one position before that, to avoid
124 overshooting it inside move_it_to. (Bug#12930)
126 2012-11-20 Daniel Colascione <dancol@dancol.org>
128 * w32fns.c (Fx_file_dialog):
129 (Fx_file_dialog): Accomodate rename of cygwin_convert_path* to
130 cygwin_convert_file_name*.
132 * cygw32.c (Fcygwin_convert_path_to_windows, syms_of_cygw32):
133 Rename cygwin_convert_path* to cygwin_convert_file_name*.
135 2012-11-20 Ken Brown <kbrown@cornell.edu>
137 * emacs.c (main): Set the G_SLICE environment variable for all
138 Cygwin builds, not just GTK builds. See
139 https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00368.html.
141 2012-11-19 Eli Zaretskii <eliz@gnu.org>
143 * xdisp.c (start_hourglass) [HAVE_NTGUI]: Don't mix declaration of
144 w32_note_current_window with code. (Backport from trunk.)
146 * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
147 (FILE_ANY_ACCESS, CTL_CODE, FSCTL_GET_REPARSE_POINT) [_MSC_VER]:
148 Define for the MSVC compiler.
150 * w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing
153 2012-11-18 Eli Zaretskii <eliz@gnu.org>
155 * fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
156 (Fexpand_file_name) [DOS_NT]: Pass encoded file name to
157 dostounix_filename. Prevents crashes down the road, because
158 dostounix_filename assumes it gets a unibyte string. Reported by
159 Michel de Ruiter <michel@sentient.nl>, see
160 http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html
162 2012-11-17 Eli Zaretskii <eliz@gnu.org>
164 * w32select.c: Include w32common.h before w32term.h, so that
165 windows.h gets included before w32term.h uses some of its
168 * w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]: New
170 (EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]: New
172 (EnumSystemLocales) [_MSC_VER]: Define if undefined. (Bug#12878)
174 2012-11-17 Jan Djärv <jan.h.d@swipnet.se>
176 * nsterm.m (hold_event): Set send_appdefined to YES (Bug#12834).
177 (ns_select): Return at once if events are held (Bug#12834).
179 2012-11-16 enami tsugutomo <tsugutomo.enami@jp.sony.com>
181 * unexelf.c (ELFSIZE) [__NetBSD__ && _LP64]: Set to 64.
182 Needed following 2012-10-20 change. (Bug#12902)
184 2012-11-16 Glenn Morris <rgm@gnu.org>
186 * editfns.c (Fmessage): Mention message-log-max. (Bug#12849)
188 2012-11-15 Stefan Monnier <monnier@iro.umontreal.ca>
190 * eval.c (Finteractive_p): Revert lexbind-merge mishap.
192 2012-11-14 Eli Zaretskii <eliz@gnu.org>
194 * w32proc.c (timer_loop): Make sure SuspendThread and ResumeThread
195 use the same value of thread handle.
196 (start_timer_thread): If the timer thread exited (due to error),
197 clean up by closing the two handles it used. Duplicate the caller
198 thread's handle here, so it gets duplicated only once, when
199 launching the timer thread. Set priority of the timer thread, not
201 (getitimer): Don't duplicate the caller thread's handle here.
204 2012-11-13 Jan Djärv <jan.h.d@swipnet.se>
206 * nsterm.m (hold_event): Send SIGIO to make sure ns_read_socket is
209 2012-11-12 Eli Zaretskii <eliz@gnu.org>
211 * xdisp.c (decode_mode_spec): Limit the value of WIDTH argument
212 passed to pint2str and pint2hrstr to be at most the size of the
213 frame's decode_mode_spec_buffer. This avoids crashes with very
214 large values of FIELD_WIDTH argument to decode_mode_spec.
217 2012-11-07 Martin Rudalics <rudalics@gmx.at>
219 * window.c (Fsplit_window_internal): Set combination limit of
220 new parent window to t iff Vwindow_combination_limit is t;
221 fixing a regression introduced with the change from 2012-09-22.
222 (Fwindow_combination_limit, Fset_window_combination_limit):
225 2012-11-06 Eli Zaretskii <eliz@gnu.org>
227 * xdisp.c (try_scrolling): Fix correction of aggressive-scroll
228 amount when the scroll margins are too large. When scrolling
229 backwards in the buffer, give up if cannot reach point or the
230 scroll margin within a reasonable number of screen lines.
231 Fixes point position in window under scroll-up/down-aggressively when
232 point is positioned many lines beyond the window top/bottom.
235 2012-11-05 Eli Zaretskii <eliz@gnu.org>
237 * ralloc.c (relinquish): If real_morecore fails to return memory
238 to the system, don't crash; instead, leave the last heap
239 unchanged and return. (Bug#12774)
241 2012-11-03 Eli Zaretskii <eliz@gnu.org>
243 * lisp.mk: Adjust comments to the fact that term/internal is now
244 loaded from loadup.el.
246 * msdos.c (msdos_abort): Rename from emacs_abort, and make static.
247 (msdos_fatal_signal): New function.
248 (XMenuActivate): Adjust the call to kbd_buffer_events_waiting to
251 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Define to "inline"
252 for GCC versions before 4.
253 (emacs_raise): Define to call msdos_fatal_signal.
255 * xdisp.c (init_from_display_pos): Fix initialization of the bidi
256 iterator when starting in the middle of a display or overlay
259 2012-11-03 Jan Djärv <jan.h.d@swipnet.se>
261 * widget.c (resize_cb): New function.
262 (EmacsFrameRealize): Add resize_cb as event handler (Bug#12733).
263 (EmacsFrameResize): Check if all is up to date before changing frame
266 2012-11-01 Eli Zaretskii <eliz@gnu.org>
268 * w32proc.c (getpgrp, setpgid): New functions. (Bug#12776)
270 2012-10-31 Paul Eggert <eggert@cs.ucla.edu>
272 Fix crash when using Emacs as commit editor for git (Bug#12697).
273 * callproc.c (setpgrp): Remove macro, as we now use setpgid
274 and it is configured in conf_post.h.
275 (Fcall_process): Don't invoke both setsid and setpgid; the former
276 is enough, if it exists.
277 * callproc.c (Fcall_process, child_setup):
278 * process.c (create_process): Use setpgid.
279 * conf_post.h (setpgid) [!HAVE_SETPGID]: New macro, which substitutes
281 * dispnew.c (init_display): Initialize the foreground group
282 if we are running a tty display.
283 * emacs.c (main): Do not worry about setpgrp; init_display does it now.
284 * lisp.h (init_foreground_group): New decl.
285 * sysdep.c (inherited_pgroup): New static var.
286 (init_foreground_group, tcsetpgrp_without_stopping)
287 (narrow_foreground_group, widen_foreground_group): New functions.
288 (init_sys_modes): Narrow foreground group.
289 (reset_sys_modes): Widen foreground group.
291 2012-10-31 Michael Albinus <michael.albinus@gmx.de>
293 * dbusbind.c: Fix cut'n'waste error. Use HAVE_DBUS_VALIDATE_INTERFACE.
295 2012-10-31 Martin Rudalics <rudalics@gmx.at>
297 * minibuf.c (read_minibuf): Restore current buffer since
298 choose_minibuf_frame calling Fset_frame_selected_window may
299 change it (Bug#12766).
301 2012-10-30 Jan Djärv <jan.h.d@swipnet.se>
303 * frame.c (Fframe_pixel_height): Fix documentation (Bug#12733).
305 2012-10-30 Kenichi Handa <handa@gnu.org>
307 * font.c (Ffont_at): If WINDOW is specified and it is not
308 displaying the current buffer, signal an error.
310 2012-10-29 Daniel Colascione <dancol@dancol.org>
312 * cygw32.h, cygw32.c (Qutf_16le, from_unicode, to_unicode):
313 In preparation for fixing bug#12739, move these functions from
316 * coding.h, coding.c: ... to here, and compile them only when
317 WINDOWSNT or CYGWIN. Moving these functions out of cygw32 proper
318 lets us write cygw32-agnostic code for the HAVE_NTGUI case.
320 2012-10-28 Eli Zaretskii <eliz@gnu.org>
322 * w32proc.c (TIMER_TICKS_PER_SEC): New macro.
323 (timer_loop, getitimer, setitimer): Use it instead of
324 CLOCKS_PER_SEC, which is no longer pertinent, since we don't use
326 (w32_get_timer_time): Use 10*TIMER_TICKS_PER_SEC instead of a
329 2012-10-28 Jan Djärv <jan.h.d@swipnet.se>
331 * nsterm.m (NO_APPDEFINED_DATA): New define.
332 (last_appdefined_event_data): New variable
333 (last_appdefined_event): Remove.
334 (ns_select): Initialize t from last_appdefined_event_data instead
335 of [last_appdefined_event data1].
336 (sendEvent:): Save [theEvent data1] to last_appdefined_event_data,
337 remove last_appdefined_event (Bug#12698).
339 2012-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
341 * frame.c (x_set_font): Catch internal error.
343 2012-10-27 Eli Zaretskii <eliz@gnu.org>
345 Avoid overflow in w32 implementation of interval timers.
346 When possible, for ITIMER_PROF count only times the main thread
348 * w32proc.c <struct itimer_data>: 'expire' and 'reload' are now
349 'volatile ULONGLONG' types. All the other data which was
350 previously clock_t is now ULONGLONG. 'terminate' is 'volatile int'.
351 (GetThreadTimes_Proc): New typedef.
352 (w32_get_timer_time): New function, returns a suitable time value
354 (timer_loop): Enter critical section when accessing ULONGLONG
355 values of the itimer_data struct, as these accesses are no longer
356 atomic. Call 'w32_get_timer_time' instead of 'clock'.
357 Remove unused variable.
358 (init_timers): Initialize s_pfn_Get_Thread_Times.
359 (start_timer_thread): Don't assign itimer->caller_thread here.
360 (getitimer): Assign itimer->caller_thread here.
361 (setitimer): Always call getitimer to get the value of ticks_now.
362 (sys_spawnve): Avoid compiler warning about format mismatch.
364 2012-10-26 Eli Zaretskii <eliz@gnu.org>
366 * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Don't enable tracking of
367 mouse movement events if the menu bar is active. This avoids
368 producing a busy "hour-glass" cursor by Windows if the mouse
369 pointer is positioned over a tooltip shown for some menu item.
371 2012-10-25 Paul Eggert <eggert@cs.ucla.edu>
373 Don't assume process IDs fit in int.
374 * emacs.c (shut_down_emacs) [!DOS_NT]:
375 * sysdep.c (sys_suspend) [SIGTSTP && !MSDOS]:
376 * term.c (dissociate_if_controlling_tty) [!DOS_NT]:
377 Use pid_t, not int, to store process IDs, as 'int'
378 is not wide enough on a few platforms (e.g., AIX and IRIX).
380 2012-10-23 Kenichi Handa <handa@gnu.org>
382 The following change is to make face-font-rescale-alist work
383 correctly for non-ASCII fonts.
385 * font.c (font_open_entity): Don't handle Vface_font_rescale_alist.
386 (font_open_for_lface): Handle Vface_font_rescale_alist.
388 2012-10-23 Chong Yidong <cyd@gnu.org>
390 * xfaces.c (Vfont_list_limit): Move unused variable to faces.el.
392 2012-10-21 Jan Djärv <jan.h.d@swipnet.se>
394 * nsfont.m (nsfont_open, ns_glyph_metrics): Force integer advancement
396 (nsfont_draw): Turn off LCD-smoothing (Bug#11484).
398 * xterm.c (x_focus_changed): Check if daemonp when sending focus in
401 2012-10-21 Glenn Morris <rgm@gnu.org>
403 * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
405 2012-10-20 Paul Eggert <eggert@cs.ucla.edu>
408 * frame.c (Fmouse_position, Fmouse_pixel_position):
409 * xdisp.c (produce_stretch_glyph):
410 Declare local vars only when they're needed.
411 This is clearer and avoids a warning on OpenBSD about unused vars.
412 * frame.h (FRAME_WINDOW_P): Always evaluate its argument.
413 This is safer, and avoids OpenBSD warnings about unused vars.
414 * keyboard.c (record_menu_key): Remove unnecessary decl.
415 (poll_timer): Define only if POLL_FOR_INPUT is defined.
416 * unexelf.c (ELFSIZE) [!ElfW]: Do not define if already defined,
417 as our definition clashes with OpenBSD's.
418 * xfaces.c (load_face_colors, check_lface_attrs)
419 (get_lface_attributes_no_remap, get_lface_attributes)
420 (lface_fully_specified_p, x_supports_face_attributes_p)
421 (tty_supports_face_attributes_p, face_fontset, realize_face)
422 (realize_x_face, realize_tty_face):
423 Declare parameters to be Lisp_Object[LFACE_VECTOR_SIZE], not
424 merely Lisp_Object *. This is more informative and avoids
425 a warning on OpenBSD about accessing beyond an object's size.
427 2012-10-20 Chong Yidong <cyd@gnu.org>
429 * lread.c (Fload): Doc fix (Bug#12592).
431 2012-10-19 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
433 * font.c (Ffont_at): Fix previous change.
435 2012-10-19 Eli Zaretskii <eliz@gnu.org>
437 * puresize.h (BASE_PURESIZE): Bump the base value to 1700000.
438 See http://lists.gnu.org/archive/html/emacs-devel/2012-10/msg00593.html
441 * alloc.c (NSTATICS): Decrease to 0x800.
443 2012-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
445 * fns.c (Fnreverse): Include the problem element when signalling an
448 2012-10-18 Jan Djärv <jan.h.d@swipnet.se>
450 * nsterm.m (ns_select): Check writefds before call to
451 FD_ISSET (Bug#12668).
453 2012-10-18 Daniel Colascione <dancol@dancol.org>
455 * alloc.c (NSTATICS): Increase from 0x650 to 0x1000
456 (staticpro): If we run out of staticpro slots, die with an
457 informative error instead of just calling emacs_abort.
459 2012-10-18 Martin Rudalics <rudalics@gmx.at>
461 Fix two flaws reported by Dmitry Antipov.
462 * window.c (Ftemp_output_buffer_show): Remove.
463 (Fwindow_vscroll, Fset_window_vscroll): Use decode_live_window.
464 (syms_of_window): Remove defsubr for Stemp_output_buffer_show.
466 2012-10-17 Eli Zaretskii <eliz@gnu.org>
468 * makefile.w32-in ($(BLD)/w32.$(O)):
469 ($(BLD)/vm-limit.$(O)):
471 ($(BLD)/unexw32.$(O)):
472 ($(BLD)/fileio.$(O)):
473 ($(BLD)/dispnew.$(O)): Update dependencies.
475 * w32term.h (w32_initialize_display_info, initialize_w32_display):
478 * w32proc.c: Include ctype.h.
480 * w32.h (init_environment, check_windows_init_file)
481 (syms_of_ntproc, syms_of_ntterm, dostounix_filename)
482 (unixtodos_filename, init_winsock, srandom, random, sys_pipe)
483 (set_process_dir, sys_spawnve, register_child, sys_sleep, getwd)
484 (sys_link): Add prototypes.
486 * w32.c: Include w32select.h.
487 (sys_access, e_malloc, sys_select): Add prototypes.
488 (emacs_gnutls_pull): 'timeout' is now EMACS_TIME, not struct timeval.
490 * vm-limit.c [WINDOWSNT]: Include w32heap.h.
492 * unexw32.c: Include lisp.h and w32.h.
494 * term.c [WINDOWSNT]: Include w32term.h.
496 * process.c [WINDOWSNT]: Add prototype of sys_select.
498 * fileio.c [WINDOWSNT]: Include w32.h.
500 * dispnew.c [WINDOWSNT]: Include w32.h.
502 * cygw32.c (Fcygwin_convert_path_to_windows)
503 (Fcygwin_convert_path_from_windows): Use EQ to compare 2
504 Lisp_Object values. (Bug#12661)
506 * w32fns.c (w32_msg_pump): Use XIL instead of casting an integer
507 to Lisp_Object. (Bug#12661)
509 2012-10-17 Kenichi Handa <handa@gnu.org>
511 * xdisp.c (reseat_1): Make the information stored in it->cmp_it
514 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
516 * buffer.c (Fkill_buffer): When unchaining the marker,
517 reset its buffer pointer to NULL (Bug#12652).
519 2012-10-17 Dmitry Antipov <dmantipov@yandex.ru>
521 Do not verify indirection counters of killed buffers (Bug#12579).
522 * buffer.h (BUFFER_CHECK_INDIRECTION): New macro.
523 * buffer.c (compact_buffer, set_buffer_internal_1): Use it.
525 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
527 * alloc.c (Fmake_byte_code): Fix typo in comment.
528 * print.c (print_interval): Define as static to match prototype.
529 * indent.c (disptab_matches_widthtab, recompute_width_table):
532 2012-10-16 Dmitry Antipov <dmantipov@yandex.ru>
534 * editfns.c (get_system_name): Remove.
535 * lisp.h (get_system_name): Remove prototype.
536 * xrdb.c (getenv, getpwuid, getpwnam): Remove prototypes.
537 (get_environ_db): Use Vsystem_name. Avoid call to strlen.
539 2012-10-15 Daniel Colascione <dancol@dancol.org>
541 * dbusbind.c: Add comment explaining reason for previous change.
543 2012-10-15 Martin Rudalics <rudalics@gmx.at>
545 * window.c (Fwindow_end): Rewrite check whether cached position
546 can be used (Bug#12600).
547 (resize_frame_windows, grow_mini_window, shrink_mini_window):
548 Set windows_or_buffers_changed.
550 2012-10-15 Daniel Colascione <dancol@dancol.org>
552 * dbusbind.c: Fix cygw32 build break when compiling with dbus
553 enabled by undefining the symbol "interface", which the platform
554 headers define to something incompatible.
556 2012-10-14 Daniel Colascione <dancol@dancol.org>
558 * image.c (init_tiff_functions, init_imagemagick_functions)
559 (init_svg_functions): Fix cygw32 build break by using these
560 functions only when WINDOWSNT _and_ HAVE_NTGUI.
562 2012-10-14 Jan Djärv <jan.h.d@swipnet.se>
564 * nsterm.m (ns_select): Count fd:s in writefs also (Bug#12422).
566 2012-10-13 Jan Djärv <jan.h.d@swipnet.se>
568 * gtkutil.c (xg_set_widget_bg): Divide by 65535 (Bug#12612).
570 2012-10-13 HANATAKA, Shinya <bogytech@gmail.com> (tiny change)
572 * coding.c (detect_coding): Set coding->id before calling
575 2012-10-13 Andreas Schwab <schwab@linux-m68k.org>
577 * fileio.c: Formatting fixes.
579 2012-10-13 Paul Eggert <eggert@cs.ucla.edu>
581 Fix some stat-related races.
582 * fileio.c (Fwrite_region): Avoid race condition if a file is
583 removed or renamed by some other process immediately after Emacs
584 writes it but before Emacs stats it. Do not assume that stat (or
586 * image.c (slurp_file): Resolve the file name with fopen + fstat
587 rather than stat + fopen.
588 (pbm_read_file) [0]: Remove unused code with stat race.
589 * process.c (allocate_pty) [HAVE_PTYS && !PTY_ITERATION && !PTY_OPEN]:
590 Remove ineffective code with stat race.
592 2012-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
594 * doc.c (get_doc_string): Don't signal an error if the file is missing.
596 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
598 * nsterm.m (hold_event_q): New static variable.
599 (EV_TRAILER, sendScrollEventAtLoc:fromEvent:): Call hold_event if
601 (hold_event): New function.
602 (ns_read_socket): If hold_event_q have events, store them and
604 (setPosition:portion:whole:): Send SIGIO to ourselves if apploopnr
607 2012-10-12 Juanma Barranquero <lekktu@gmail.com>
609 * makefile.w32-in ($(BLD)/w32select.$(O)): Update dependencies.
611 2012-10-12 Eli Zaretskii <eliz@gnu.org>
613 * makefile.w32-in ($(BLD)/fileio.$(O)): Add sys/file.h.
615 * fileio.c (check_existing): New function.
616 (make_temp_name, Ffile_exists_p, Ffile_writable_p): Call it
617 instead of calling 'stat', when what's needed is to check whether
618 a file exists. This avoids expensive system calls on MS-Windows.
621 * w32.c (init_environment): Call 'check_existing' instead of 'stat'.
623 * lread.c (openp) [WINDOWSNT]: Call 'access' instead of 'stat' to
624 determine whether a file exists and is not a directory.
626 * lisp.h (check_existing): Add prototype.
628 2012-10-12 Jan Djärv <jan.h.d@swipnet.se>
630 * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
632 2012-10-12 Glenn Morris <rgm@gnu.org>
634 * buffer.c (Fset_buffer): Doc fix. (Bug#12624)
636 2012-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
638 * buffer.c (Fkill_buffer): Null out the overlay list(s) as well.
640 * eval.c (Fautoload): Remember previous autoload status in load-history.
642 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
644 lread.c, macros.c, marker.c, menu.c, minibuf.c: Use bool for booleans.
645 * lread.c (load_each_byte, new_backquote_flag, readchar)
646 (read_filtered_event, lisp_file_lexically_bound_p)
647 (safe_to_load_version, Fload, complete_filename_p, openp)
648 (build_load_history, readevalloop, read_escape, read1)
649 (string_to_number, read_vector, read_list):
650 * macros.c (Fstart_kbd_macro):
651 * marker.c (CONSIDER):
652 * menu.c (parse_single_submenu, digest_single_submenu)
653 (find_and_return_menu_selection, Fx_popup_menu):
654 * minibuf.c (read_minibuf_noninteractive, read_minibuf)
656 * nsmenu.m (ns_update_menubar, runMenuAt:forFrame:keymaps:):
658 * xmenu.c (set_frame_menubar, create_and_show_popup_menu)
659 (xmenu_show, xdialog_show):
660 Use bool for booleans.
661 * lread.c (safe_to_load_version): Rename from safe_to_load_p,
662 as it's not a predicate. All uses changed. Omit unnecessary
665 2012-10-11 Dmitry Antipov <dmantipov@yandex.ru>
667 * editfns.c (save_excursion_save): Use nil if mark points to nowhere.
668 (save_excursion_restore): Do not restore mark if it was not saved.
670 2012-10-11 Paul Eggert <eggert@cs.ucla.edu>
672 * marker.c (cached_modiff): EMACS_INT, not int.
674 * w32select.c (waiting_for_input): Declare by including "keyboard.h"
675 instead of having a wrong decl.
676 * nsmenu.m (waiting_for_input): Remove wrong decl.
678 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
680 keyboard.c, keymap.c: Use bool for booleans.
681 * dispnew.c (sit_for): Distinguish between 3-way display_option
682 and boolean do_display.
683 * keyboard.c (single_kboard, this_command_key_count_reset)
684 (waiting_for_input, echoing, immediate_quit, input_pending)
685 (interrupt_input, interrupts_deferred, pop_kboard)
686 (temporarily_switch_to_single_kboard, ignore_mouse_drag_p)
687 (command_loop_1, adjust_point_for_property)
688 (safe_run_hooks_error, input_polling_used, read_char):
689 (help_char_p, readable_events, kbd_buffer_events_waiting)
690 (kbd_buffer_get_event, timer_check_2, make_lispy_event)
691 (lucid_event_type_list_p, get_input_pending):
692 (gobble_input, menu_separator_name_p, menu_bar_item)
693 (parse_menu_item, parse_tool_bar_item, read_char_x_menu_prompt)
694 (read_char_minibuf_menu_prompt, access_keymap_keyremap)
695 (keyremap_step, test_undefined, read_key_sequence)
696 (detect_input_pending, detect_input_pending_ignore_squeezables)
697 (detect_input_pending_run_timers, requeued_events_pending_p)
698 (quit_throw_to_read_char, Fset_input_interrupt_mode):
699 * keymap.c (get_keymap, keymap_parent, keymap_memberp)
700 (access_keymap_1, access_keymap, map_keymap, get_keyelt)
701 (Fdefine_key, Flookup_key, struct accessible_keymaps_data)
702 (accessible_keymaps_1, Fkey_description, push_key_description):
703 (shadow_lookup, struct where_is_internal_data)
704 (where_is_internal, Fwhere_is_internal, where_is_internal_1)
705 (Fdescribe_buffer_bindings, describe_map_tree, struct describe_map_elt)
706 (describe_map, describe_vector):
707 * menu.c (single_menu_item):
708 * nsmenu.m (ns_update_menubar):
709 * process.c (wait_reading_process_output):
710 * search.c (scan_buffer, scan_newline):
711 Use bool for boolean.
712 * keyboard.c (timers_run, swallow_events)
713 (detect_input_pending_run_timers):
714 * process.c (wait_reading_process_output):
715 Use unsigned for counter where wraparound-on-overflow is desired,
716 since unsigned is guaranteed to have that behavior and signed is not.
717 (read_char): Use ptrdiff_t for string length.
718 (get_input_pending): Remove first argument, since it was always
719 the same pointer-to-int (now pointer-to-boolean) &input_pending,
720 and behave as if it had that value. Return new value of
721 input_pending. All callers changed.
722 * keyboard.h (struct kboard): Use unsigned : 1 for boolean member
723 immediate_echo. Use ptrdiff_t for echo_after_prompt, since it's
725 * keymap.c (push_key_description): Omit last arg, which was always 1.
728 * regex.c (immediate_quit) [emacs]: Remove duplicate decl.
730 2012-10-10 Juanma Barranquero <lekktu@gmail.com>
732 * makefile.w32-in ($(BLD)/dispnew.$(O), $(BLD)/indent.$(O))
733 ($(BLD)/term.$(O)): Update dependencies.
735 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
737 * alloc.c (mark_object): Use meaningful PVEC_NORMAL_VECTOR.
738 * lisp.h (enum pvec_type): Adjust comments and omit explicit
739 initializer for PVEC_NORMAL_VECTOR.
741 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
743 Clean out old termopts cruft.
744 * termopts.h (flow_control, meta_key): Remove unused decls.
745 * dispnew.c, indent.c, nsterm.m, term.c, xsettings.c, xsmfns.c:
746 Don't include termopts.h.
748 2012-10-10 Dmitry Antipov <dmantipov@yandex.ru>
750 * alloc.c (gc_sweep): Use pointer-to-a-pointer loop for buffers.
752 2012-10-10 Paul Eggert <eggert@cs.ucla.edu>
754 * commands.h (immediate_quit): Remove duplicate decl.
756 2012-10-09 Jan Djärv <jan.h.d@swipnet.se>
758 * nsfont.m (Vfonts_in_cache): Remove, not needed as font.c handles
760 (nsfont_open): Remove setting of Vfonts_in_cache.
761 (syms_of_nsfont): Remove initialization of Vfonts_in_cache.
763 2012-10-09 Eli Zaretskii <eliz@gnu.org>
765 * w32fns.c (w32_last_error): Change the return value to DWORD, to
766 match what GetLastError returns. Explain why the function is
769 * frame.c (delete_frame): Rename local variable 'tooltip_frame' to
770 'is_tooltip_frame', to avoid confusion with its global namesake.
772 2012-10-08 Daniel Colascione <dancol@dancol.org>
774 * xdisp.c (start_hourglass): Call w32_note_current_window when
775 HAVE_NTGUI, not just WINDOWSNT, resolving a problem in the cygw32
776 build that caused Emacs to display the hourglass cursor forever.
778 * w32fns.c (Fx_display_color_cells): Instead of using NCOLORS,
779 which is broken under remote desktop, calculate the number of
780 colors available for a display based on the display's number of
781 planes and number of bits per pixel per plane. (bug#10397).
783 2012-10-08 Jan Djärv <jan.h.d@swipnet.se>
785 * nsfont.m (Vfonts_in_cache): New variable.
786 (nsfont_open): Use unsignedLongLongValue for cache in case wide ints
787 are used. Add cached fonts to Vfonts_in_cache.
788 (syms_of_nsfont): Initialize and staticpro Vfonts_in_cache.
790 2012-10-08 Juanma Barranquero <lekktu@gmail.com>
792 * makefile.w32-in (LOCAL_FLAGS): Don't define HAVE_NTGUI, it's now
794 (FONT_H): Define after FRAME_H.
795 ($(BLD)/emacs.$(O), $(BLD)/process.$(O), $(BLD)/w32heap.$(O)):
798 * w32term.c: Remove leftover declaration of keyboard_codepage.
800 2012-10-08 Eli Zaretskii <eliz@gnu.org>
802 * makefile.w32-in (FONT_H): Add $(FRAME_H).
803 (W32TERM_H): Add $(ATIMER_H) and $(FRAME_H).
804 ($(BLD)/emacs.$(O), $(BLD)/w32console.$(O)): Update dependencies.
805 (GLOBAL_SOURCES): Add cygw32.c.
806 ($(BLD)/unexw32.$(O)):
808 ($(BLD)/w32console.$(O)):
809 ($(BLD)/w32fns.$(O)):
810 ($(BLD)/w32heap.$(O)):
811 ($(BLD)/w32menu.$(O)):
812 ($(BLD)/w32proc.$(O)): Add w32common.h.
814 * w32fns.c (w32_color_map_lookup, x_to_w32_color): Argument is now
816 (x_to_w32_color): Don't modify the argument, modify a copy instead.
818 2012-10-08 Daniel Colascione <dancol@dancol.org>
820 * w32term.h (WM_EMACS_BRINGTOTOP, WM_EMACS_INPUT_READY)
821 (WM_EMACS_END): Change WM_EMACS_BRINGTOTOP from 22 to 21 to close
822 accidental message numbering hole. Change other messages to
825 * w32select.h (HAVE_W32SELECT): Remove.
827 * w32select.c, w32proc.c, w32menu.c, w32console.c, w32.c: Include
828 w32common.h instead of w32heap.h.
830 * w32heap.h (ROUND_UP, ROUND_DOWN, get_page_size)
831 (get_allocation_unit, get_processor_type, get_w32_major_version)
832 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
833 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
834 (OS_NT, os_subtype, cache_system_info): Move declarations to
837 * w32heap.c: Include w32common.h.
838 (sysinfo_cache, syspage_mask, osinfo_cache, w32_major_version)
839 (w32_minor_version, w32_build_number, w32_subtype):
840 Remove duplicate definitions.
842 * w32fns.c: Include w32common.h; include w32heap.h only in
845 (Fx_file_dialog): Clarify comment on GetOpenFileName structure.
846 Use `report_file_error' instead of `error' in order to better
847 inform users of what went wrong. Increase NTGUI_UNICODE file
848 dialog box file name length to 32k, the maximum allowed by the NT
851 * w32common.h: New file.
852 (ROUND_UP, ROUND_DOWN, get_page_size)
853 (get_allocation_unit, get_processor_type, get_w32_major_version)
854 (get_w32_minor_version, sysinfo_cache, osinfo_cache)
855 (w32_major_version, w32_minor_version, w32_build_number, OS_9X)
856 (OS_NT, os_subtype, cache_system_info): Move here.
858 * unexw32.c, unexcw.c: Include w32common.h.
860 * emacs.c (main): Use (defined (WINDOWSNT) || defined
861 HAVE_NTGUI) instead of removed HAVE_W32SELECT to decide whether
862 to call syms_of_w32select.
864 * cygw32.h: Remove obsolete EXFUN declarations.
866 * cygw32.c (Qutf_16_le): Rename to Qutf_16le.
868 * Makefile.in (SOME_MACHINE_OBJECTS): Reverse accidental removal
869 of w32inevt.o from SOME_MACHINE_OBJECTS.
871 2012-10-08 Daniel Colascione <dancol@dancol.org>
873 * image.c: Permanent fix for JPEG compilation issue --- limit
874 jpeglib `boolean' redefinition to Cygwin builds.
876 2012-10-08 Eli Zaretskii <eliz@gnu.org>
878 * image.c (CHECK_LIB_AVAILABLE): Remove, no longer used.
880 * emacs.c (DAEMON_MUST_EXEC) [HAVE_NTGUI]: Define this only on
883 2012-10-08 Daniel Colascione <dancol@dancol.org>
885 * xfaces.c, xdisp.c, window.c, w32xfns.c, w32term.h, w32term.c,
886 w32select.h w32select.c, w32proc.c, w32menu.c, w32inevt.c,
887 w32help.c, w32font.c, w32font.c, w32fns.c, w32console.c, w32.h,
888 w32.c, unexw32.c, termhooks.h, process.c, menu.c, keyboard.h,
889 keyboard.c, image.c, frame.h, frame.c, fontset.c, font.h, font.c,
890 emacs.c, dispextern.h, cygw32.h, cygw32.c, conf_post.h,
891 Makefile.in: use HAVE_NTGUI for W32 GUI and WINDOWSNT for the
892 operating system. defined(HAVE_NTGUI) && !defined(WINDOWSNT) is
893 now a supported configuration.
895 * Makefile.in: consolidate image variables into LIBIMAGE; add
896 W32_OBJ and W32_LIBS. Compile new files.
899 (_DebPrint) declare tracing facility for W32 debugging. We need
900 to unify tracing later.
902 (NTGUI_UNICODE) Define when compiling for Cygwin to allow the
903 unconditional use of W32 Unicode functions. Cygwin runs only on
904 100% Unicode operating systems.
906 * cygw32.c: New file. Define Cygwin-specific facilities.
907 (Fcygwin_convert_path_to_windows)
908 (Fcygwin_convert_path_from_windows): New user functions for
909 accessing Cygwin path-munging routines.
911 * cygw32.h: New file.
912 (WCSDATA, to_unicode, from_unicode): Define facilities for storing
913 UTF-16LE strings temporarily inside non-Lisp-visible string
916 (w32_strerror): Just what it says on the tin.
918 * emacs.c: Make the NS fork-then-exec code for daemon-launching
919 also run for Cygwin; both systems have the same problem with using
920 GUI facilities in a forked child. Also call syms_of_cygw32,
921 syms_of_w32select in correct places.
923 (DAEMON_MUST_EXEC): new macro defined to signal that a platform
924 needs fork-then-exec for daemon launching.
926 * font.h: Include frame.h.
928 * image.c: Use the image library cache machinery only when we're
929 compiling for native WINDOWSNT; Cygwin can use shared libraries
930 like any other Unixlike system.
932 * keyboard.c: Clarify a comment regarding the input loop.
934 * menu.c: When NTGUI_UNICODE is defined, use Unicode menu
935 functions directly instead of trying to detect at runtime that our
936 host operating system supports them. We make this change for two
937 reasons: Cygwin lacks support for the multibyte character
938 conversion functions used by the legacy menu code, and Cygwin
939 never needs to rely on non-Unicode APIs.
941 * unexw32.c (hinst): Declare extern.
943 * w32.c: Change header order;
944 (w32_strerror): Move to w32fns.c because we need it for
945 non-WINDOWSNT builds.
947 * w32.h: Add #error macro to make sure we don't include w32.h for
948 Cygwin builds. Remove w32select declarations.
950 * w32console.c (w32_sys_ring_bell, Fset_message_beep): Move to
951 w32fns.c. w32console.c is WINDOWSNT-only.
953 * w32fns.c: Include cygw32.h or w32.h depending on CYGWIN; more
954 NTGUI_UNICODE tweaks. (See above.) Change _snprintf to the more
956 (faked_key, sysinfo_cache, osinfo_cahce, syspage_mask)
957 (w32_major_version, w32_minor_version, w32_build_number)
958 (os_subtype, sound_type): Define here
959 (w32_defined_color): Make color parameter const for consistency
960 with other _defined_color functions.
961 (w32_createwindow): Unconditionally call w32_init_class instead of
962 doing so only when hprevinst is non-NULL. Plumbing hprevinst
963 through the code is complex and unnecessary because class
964 registration is practically free.
965 (w32_name_of_message): New EMACSDEBUG-only function.
966 (Fset_message_beep): Move here
967 (Fx_open_connection): Require that the display name for Windows be
968 "w32" for consistency, emacsclient disambiguation, and maybe, one
969 day, multi-window-system support.
970 (file_dialog_callback): NTGUI_UNICODE changes; encode and decode
971 Cygwin files for W32 GUI facilities, since these clearly don't
974 (w32_strerror, w32_console_toggle_lock_key, w32_kbd_mods_to_emacs)
975 (w32_kbd_patch_key, w32_sys_ring_bell): Move here.
976 (Ssystem_move_file_to_trash): Define only for native WINDOWSNT.
977 (w32_last_error): Remove.
979 * w32font.c: Define _strlwr to strlwr for non-WINDOWSNT builds.
981 * w32heap.c (syspage_mask): Declare here.
982 (cache_system_info): Remove.
984 * w32inevt.c (faked_key): Define globally, not statically.
985 (w32_kbd_mods_to_emacs, w32_kbd_patch_key, faked_key)
986 (w32_console_toggle_lock_key): Move to w32fns.c.
988 * w32menu.c: Include setjmp.h. NTGUI_UNICODE changes throughout.
990 * w32proc.c (_DebPrint): Move to w32fns.c.
991 * w32select.c: Include string.h, stdio.h for Cygwin.
992 * w32select.h: New File.
994 * w32term.c: Include io.h for non-CYGWIN builds; needed for
996 (w32_message_fd): New variable. Under Cygwin, holds the file
997 descriptor the system used to tell us about pending thread
1000 (w32_init_term): Remove incorrect calls to fcntl and init_sigio
1001 that prevented compilation under non-WINDOWSNT systems.
1003 (w32_initialize): Open /dev/windows and assign it to
1004 w32_message_fd. Provide w32 feature.
1006 * w32term.h: Include frame.h, atimer.h. Declare various frame functions.
1007 (WM_EMACS_INPUT_READY): add.
1008 (prepend_msg, w32_message_fd): Declare globally.
1011 (keyboard_handle): Use only when WINDOWSNT.
1012 (notify_msg_ready): New function. Posts a message to the main
1013 thread's message queue under CYGWIN, which wakes up the main
1014 thread from select(2) by making the /dev/windows file descriptor
1015 ready. Under WINDOWSNT, it sets an event the same way the old
1018 (post, prepend_msg): Actually call notify_msg_ready instead of
1019 setting the input event directly.
1021 2012-10-07 Eli Zaretskii <eliz@gnu.org>
1023 * ralloc.c (relinquish): If a heap is ready to be relinquished,
1024 but it still has blocs in it, don't return it to the system,
1025 instead of aborting. (Bug#12402)
1027 2012-10-07 Jan Djärv <jan.h.d@swipnet.se>
1029 * nsterm.m (ns_dumpglyphs_image): Only draw slice of image (Bug#12506).
1031 * nsterm.m (ns_update_auto_hide_menu_bar): Remove defintion of
1032 MAC_OS_X_VERSION_10_6.
1033 (syms_of_nsterm): Remove comment about Panther and above for
1035 * nsterm.h (MAC_OS_X_VERSION_10_3, onTiger): Remove.
1036 (EmacsApp): Remove check for >= MAC_OS_X_VERSION_10_4.
1037 (struct nsfont_info): Remove check for >= MAC_OS_X_VERSION_10_3.
1039 * nsselect.m (ns_string_from_pasteboard): Remove check for >=
1040 MAC_OS_X_VERSION_10_4.
1042 * nsmenu.m (fillWithWidgetValue:): Remove code for <
1043 MAC_OS_X_VERSION_10_2.
1045 * nsimage.m (setPixmapData, getPixelAtX, setAlphaAtX): Remove onTiger.
1047 * nsfns.m (Fns_list_services): Remove comment and check for OSX < 10.4.
1048 (ns_do_applescript): Remove check for >= MAC_OS_X_VERSION_10_4.
1050 * nsterm.m (ns_in_resize): Remove (Bug#12479).
1051 (ns_resize_handle_rect, mouseDown, mouseUp, mouseDragged): Remove.
1052 (ns_clear_frame, sendEvent, windowDidResize, drawRect:):
1053 Remove ns_in_resize check.
1054 (ns_clear_frame_area): Remove resize handle code.
1056 * nsfns.m (ns_in_resize): Remove.
1057 (x_set_icon_name, ns_set_name, ns_set_name_as_filename):
1058 Remove ns_in_resize check.
1060 2012-10-07 Paul Eggert <eggert@cs.ucla.edu>
1062 Improve sys_siglist detection.
1063 * sysdep.c (sys_siglist, init_signals): Use _sys_siglist if it's
1064 defined as a macro, as is done in Solaris.
1065 (sys_siglist_entries): New macro.
1066 (save_strsignal): Use it.
1067 * syssignal.h (safe_strsignal): Now ATTRIBUTE_CONST, to pacify
1068 GCC 4.7.2 on Fedora 17 with the fixed sys_siglist detection.
1070 2012-10-06 Jan Djärv <jan.h.d@swipnet.se>
1072 * nsfns.m (Fx_create_frame): Call x_default_parameter with
1073 fullscreen/Fullscreen.
1075 * nsterm.h (EmacsView): Rename tbar_height to tibar_height.
1076 tobar_height is new.
1078 * nsterm.m (x_make_frame_visible): Check for fullscreen.
1079 (ns_fullscreen_hook): Activate old style fullscreen with a timer.
1080 (ns_term_init): Set activateIgnoringOtherApps if old style fullscreen.
1081 (windowDidResize:): Check for correct window if old style fullscreen.
1082 Capitalize word in comment. Remove incorrect comment.
1083 (initFrameFromEmacs:): tbar_height renamed tibar_height.
1084 (windowDidEnterFullScreen:): Toggle toolbar for fullscreen to fix
1085 error in drawing background.
1086 (toggleFullScreen:): Remove comment. Rearrange calls.
1087 Set toolbar values to zero, save old height in tobar_height.
1088 Restore tool bar height when leaving fullscreen.
1089 (canBecomeMainWindow): New function.
1091 2012-10-06 Paul Eggert <eggert@cs.ucla.edu>
1093 * keyboard.c (read_char): Remove unnecessary 'volatile's and label.
1095 2012-10-05 Eli Zaretskii <eliz@gnu.org>
1097 * w32proc.c (stop_timer_thread): Fix declaration of 'err'.
1099 * w32.c (utime): Open the file with FILE_FLAG_BACKUP_SEMANTICS, so
1100 that time stamps of directories could also be changed.
1101 Don't request the too broad GENERIC_WRITE, only the more restrictive
1102 FILE_WRITE_ATTRIBUTES access rights.
1104 * fileio.c (Fset_file_times): Special-case ignoring errors for
1105 directories only on MSDOS, not on MS-Windows.
1107 2012-10-05 Ikumi Keita <ikumi@ikumi.que.jp> (tiny change)
1109 * minibuf.c (Fcompleting_read): Doc fix. (Bug#12555)
1111 2012-10-04 Eli Zaretskii <eliz@gnu.org>
1113 * w32.c (utime): Test for INVALID_HANDLE_VALUE, not for NULL, to
1114 see whether CreateFile failed.
1116 2012-10-04 Paul Eggert <eggert@cs.ucla.edu>
1118 * profiler.c (handle_profiler_signal): Inhibit pending signals too,
1119 to avoid similar races.
1120 * keyboard.c (pending_signals): Now bool, not int.
1122 Port timers to OpenBSD, plus check for timer failures.
1123 OpenBSD problem reported by Han Boetes.
1124 * profiler.c (setup_cpu_timer): Check for failure of timer_settime
1126 (Fprofiler_cpu_stop): Don't assume HAVE_SETITIMER.
1127 * syssignal.h (HAVE_ITIMERSPEC): New macro. This is for platforms
1128 like OpenBSD, which has timer_settime but does not declare it.
1129 OpenBSD does not define SIGEV_SIGNAL, so use that when deciding
1130 whether to use itimerspec-related primitives. All uses of
1131 HAVE_TIMER_SETTIME replaced with HAVE_ITIMERSPEC.
1133 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
1135 * profiler.c (handle_profiler_signal): Fix a malloc race
1136 that caused Emacs to hang on Fedora 17 when profiling Lisp.
1138 2012-10-02 Jan Djärv <jan.h.d@swipnet.se>
1140 * nsterm.m (windowDidEnterFullScreen): Remove fprintf.
1142 2012-10-02 Eli Zaretskii <eliz@gnu.org>
1144 * w32proc.c (sys_wait): Declare 'signame' 'const char *', to be
1145 consistent with the change in return value of 'safe_strsignal'.
1147 2012-10-02 Paul Eggert <eggert@cs.ucla.edu>
1149 Prefer plain 'static' to 'static inline' (Bug#12541).
1150 * bidi.c (bidi_get_type, bidi_check_type, bidi_get_category)
1151 (bidi_set_sor_type, bidi_push_embedding_level)
1152 (bidi_pop_embedding_level, bidi_remember_char, bidi_copy_it)
1153 (bidi_cache_reset, bidi_cache_shrink, bidi_cache_fetch_state)
1154 (bidi_cache_search, bidi_cache_ensure_space)
1155 (bidi_cache_iterator_state, bidi_cache_find)
1156 (bidi_peek_at_next_level, bidi_set_paragraph_end)
1157 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
1158 (bidi_explicit_dir_char, bidi_resolve_neutral_1):
1159 Now 'static', not 'static inline'.
1161 Count overruns when profiling; change units to ns.
1162 * profiler.c (handle_profiler_signal): Count sampling intervals, not ms.
1163 Give extra weight to samples after overruns, to attempt to count
1164 the time more accurately.
1165 (setup_cpu_timer): Change sampling interval units from ms to ns, since
1166 the underlying primitives nominally do ns.
1167 (Fprofiler_cpu_start): Document the change. Mention that
1168 the sampling intervals are only approximate.
1170 2012-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
1172 * frame.c (Fmake_terminal_frame): Prefer safer CONSP over !NILP.
1174 * coding.h (ENCODE_FILE, DECODE_FILE, DECODE_SYSTEM): Remove special
1175 case for the special 0 coding-system.
1177 * buffer.c (Fset_buffer_multibyte): Signal an error instead of widening.
1178 (Fmake_overlay): Remove redundant tests.
1179 (fix_start_end_in_overlays): Remove redundant recentering.
1181 2012-10-02 Juanma Barranquero <lekktu@gmail.com>
1183 * makefile.w32-in ($(BLD)/alloc.$(O), $(BLD)/gmalloc.$(O)):
1184 Update dependencies.
1186 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
1188 Fix a malloc race condition involving strsignal.
1189 A signal can arrive in the middle of a malloc, and Emacs's signal
1190 handler can invoke strsignal, which can invoke malloc, which is
1191 not portable. This race condition bug makes Emacs hang on GNU/Linux.
1192 Fix it by altering the signal handler so that it does not invoke
1194 * emacs.c (shut_down_emacs): Use safe_strsignal, not strsignal.
1195 * process.c (status_message): Use const pointer, in case strsignal
1196 is #defined to safe_strsignal.
1197 * sysdep.c (sys_siglist, init_signals): Always define and
1198 initialize a substitute sys_siglist if the system does not define
1199 one, even if HAVE_STRSIGNAL.
1200 (safe_strsignal): Rename from strsignal. Always define,
1201 using sys_siglist. Return a const pointer.
1202 * syssignal.h (safe_strsignal): New decl.
1203 (strsignal) [!HAVE_STRSIGNAL]: Define in terms of safe_strsignal.
1205 2012-10-01 Eli Zaretskii <eliz@gnu.org>
1207 * w32proc.c (timer_loop): Fix code that waits for timer
1208 expiration, to avoid high CPU usage.
1210 2012-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
1212 * fns.c (check_hash_table, get_key_arg, maybe_resize_hash_table)
1213 (sweep_weak_table): Remove redundant prototypes.
1215 2012-10-01 Fabrice Popineau <fabrice.popineau@gmail.com>
1217 * emacs.c: Move the inclusion of TERM_HEADER after including
1218 windows.h on WINDOWSNT. This avoids compilation problems with
1221 2012-10-01 Eli Zaretskii <eliz@gnu.org>
1223 * unexw32.c (OFFSET_TO_RVA, RVA_TO_OFFSET)
1224 (RVA_TO_SECTION_OFFSET): Encode all macro arguments in parentheses.
1225 (RVA_TO_PTR): Cast the result of RVA_TO_OFFSET to 'unsigned char *',
1226 as the previous version used 'void *'.
1228 * ralloc.c (ROUNDUP): Fix last change.
1229 (MEM_ROUNDUP): Don't cast MEM_ALIGN, it is already of type
1232 * w32proc.c <disable_itimers>: New static flag.
1233 (init_timers): Initialize it to zero, after creating the critical
1234 sections used by the timer threads.
1235 (term_timers): Set to 1 before deleting the critical sections.
1236 (getitimer, setitimer): If disable_itimers is non-zero, return an
1237 error indication without doing anything. Reported by Fabrice
1238 Popineau <fabrice.popineau@supelec.fr> as part of bug#12544.
1239 (alarm) [HAVE_SETITIMER]: Be more conformant to the expected
1241 [!HAVE_SETITIMER]: Behave as the previous version that didn't
1244 * emacs.c (shut_down_emacs) [WINDOWSNT]: Move the call to
1245 term_ntproc after all the other bookkeeping, to get timers working
1246 as long as possible.
1248 2012-10-01 Paul Eggert <eggert@cs.ucla.edu>
1250 * xdisp.c (syms_of_xdisp): Default message-log-max to 1000, not 100.
1251 Suggested by Juri Linkov in
1252 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00821.html>.
1254 Prefer plain 'static' to 'static inline' (Bug#12541).
1255 With static functions, modern compilers inline pretty well by
1256 themselves; advice from programmers often hurts as much as it helps.
1257 On my host (x86-64, Fedora 17, GCC 4.7.2, default 'configure'),
1258 this change shrinks the text size of the Emacs executable by 1.1%
1259 without affecting CPU significantly in my benchmark.
1260 * alloc.c (mem_find, live_string_p, live_cons_p, live_symbol_p)
1261 (live_float_p, live_misc_p, live_vector_p, live_buffer_p)
1262 (mark_maybe_object, mark_maybe_pointer, bounded_number):
1263 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
1264 (bset_auto_fill_function, bset_auto_save_file_format)
1265 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
1266 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
1267 (bset_cache_long_line_scans, bset_case_fold_search)
1268 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
1269 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
1270 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
1271 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
1272 (bset_header_line_format, bset_indicate_buffer_boundaries)
1273 (bset_indicate_empty_lines, bset_invisibility_spec)
1274 (bset_left_fringe_width, bset_major_mode, bset_mark)
1275 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
1276 (bset_name, bset_overwrite_mode, bset_pt_marker)
1277 (bset_right_fringe_width, bset_save_length)
1278 (bset_scroll_bar_width, bset_scroll_down_aggressively)
1279 (bset_scroll_up_aggressively, bset_selective_display)
1280 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
1281 (bset_word_wrap, bset_zv_marker, set_buffer_overlays_before)
1282 (set_buffer_overlays_after):
1283 * category.c (bset_category_table):
1284 * charset.c (read_hex):
1285 * coding.c (produce_composition, produce_charset)
1286 (handle_composition_annotation, handle_charset_annotation)
1288 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers)
1289 (assign_row, set_frame_matrix_frame, make_current)
1291 * eval.c (set_specpdl_symbol, set_specpdl_old_value):
1292 * fns.c (maybe_resize_hash_table):
1293 * frame.c (fset_buffer_predicate, fset_minibuffer_window):
1294 * gmalloc.c (register_heapinfo):
1295 * image.c (lookup_image_type):
1296 * intervals.c (set_interval_object, set_interval_left)
1297 (set_interval_right, copy_interval_parent, rotate_right)
1298 (rotate_left, balance_possible_root_interval):
1299 * keyboard.c (kset_echo_string, kset_kbd_queue)
1300 (kset_keyboard_translate_table, kset_last_prefix_arg)
1301 (kset_last_repeatable_command, kset_local_function_key_map)
1302 (kset_overriding_terminal_local_map, kset_real_last_command)
1303 (kset_system_key_syms, clear_event, set_prop):
1304 * lread.c (digit_to_number):
1305 * marker.c (attach_marker, live_buffer, set_marker_internal):
1306 * nsterm.m (ns_compute_glyph_string_overhangs):
1307 * process.c (pset_buffer, pset_command)
1308 (pset_decode_coding_system, pset_decoding_buf)
1309 (pset_encode_coding_system, pset_encoding_buf, pset_filter)
1310 (pset_log, pset_mark, pset_name, pset_plist, pset_sentinel)
1311 (pset_status, pset_tty_name, pset_type, pset_write_queue):
1312 * syntax.c (bset_syntax_table, dec_bytepos):
1313 * terminal.c (tset_param_alist):
1314 * textprop.c (interval_has_some_properties)
1315 (interval_has_some_properties_list):
1316 * window.c (wset_combination_limit, wset_dedicated)
1317 (wset_display_table, wset_hchild, wset_left_fringe_width)
1318 (wset_left_margin_cols, wset_new_normal, wset_new_total)
1319 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
1320 (wset_right_fringe_width, wset_right_margin_cols)
1321 (wset_scroll_bar_width, wset_start, wset_temslot, wset_vchild)
1322 (wset_vertical_scroll_bar_type, wset_window_parameters):
1323 * xdisp.c (wset_base_line_number, wset_base_line_pos)
1324 (wset_column_number_displayed, wset_region_showing)
1325 (window_box_edges, run_window_scroll_functions)
1326 (append_glyph_string_lists, prepend_glyph_string_lists)
1327 (append_glyph_string, set_glyph_string_background_width)
1328 (append_glyph, append_composite_glyph)
1329 (take_vertical_position_into_account):
1330 * xfaces.c (x_create_gc, x_free_gc, merge_face_vectors)
1331 (face_attr_equal_p, lface_equal_p, hash_string_case_insensitive)
1332 (lface_hash, lface_same_font_attributes_p, lookup_face):
1333 * xml.c (libxml2_loaded_p):
1334 * xterm.c (x_set_mode_line_face_gc, x_set_glyph_string_gc)
1335 (x_set_glyph_string_clipping, x_clear_glyph_string_rect):
1336 Now 'static', not 'static inline'.
1339 (bidi_copy_it): Do the whole copy with a single memcpy.
1340 (bidi_char_at_pos): Merge the two STRING_CHAR calls into one.
1342 Revert the FOLLOW-SYMLINKS change for file-attributes.
1343 Doing it right would require several changes to Tramp, and there's
1344 not enough time to get that tested before the freeze today.
1345 * dired.c (directory_files_internal, Ffile_attributes):
1348 * frame.c (x_report_frame_params): Port better to wider ints.
1349 Do not assume that EMACS_UINT is the same width as uprintmax_t,
1350 or that pointers can be printed in 15 decimal digits.
1351 Avoid GCC warnings if EMACS_UINT is wider than a pointer.
1353 2012-09-30 Fabrice Popineau <fabrice.popineau@supelec.fr>
1355 Support x64 build on MS-Windows.
1356 * w32term.h (SCROLL_BAR_PACK, SCROLL_BAR_UNPACK): Define for x64.
1357 (SET_SCROLL_BAR_W32_WINDOW): Cast ID to intptr_t, for
1358 compatibility with x64.
1359 (x_get_focus_frame): Add prototype.
1361 * w32term.c (w32_draw_underwave): Don't use GCC extensions for
1362 defining an XRectangle structure.
1364 * w32proc.c (RVA_TO_PTR, w32_executable_type): Fix pointer
1365 arithmetics for compatibility with x64.
1367 * w32menu.c (add_menu_item): Use UINT_PTR instead of UINT, for
1368 compatibility with x64.
1370 * w32heap.h: Adjust prototypes and declarations.
1372 * w32heap.c (RVA_TO_PTR, allocate_heap, sbrk, init_heap)
1373 (round_heap): Use DWORD_PTR, ptrdiff_t and size_t instead of
1374 DWORD, long, and unsigned long, for compatibility with x64.
1375 (allocate_heap) [_WIN64]: Reserve 32GB of memory.
1376 (sbrk): Argument is now of type ptrdiff_t.
1378 * w32fns.c (HMONITOR): Condition declaration on _WIN32_WINNT being
1380 (w32_msg_pump): Use WPARAM type for 'result'.
1382 * w32.c (init_environment, get_emacs_configuration): Support AMD64
1384 (init_ntproc): Cast arguments of _open_osfhandle to intptr_t, for
1385 compatibility with x64.
1387 * vm-limit.c (lim_data): Now size_t.
1388 (check_memory_limits): Adjust prototypes of real_morecore and
1389 __morecore to receive argument of type ptrdiff_t. Use size_t for
1390 five_percent and data_size.
1392 * unexw32.c: Use DWORD_PTR instead of DWORD for file-scope
1393 variables, for compatibility with x64.
1394 (rva_to_section, offset_to_section, relocate_offset)
1395 (OFFSET_TO_RVA, RVA_TO_OFFSET, RVA_TO_SECTION_OFFSET)
1396 (PTR_TO_RVA, RVA_TO_PTR, OFFSET_TO_PTR, get_section_info)
1397 (copy_executable_and_dump_data): Use DWORD_PTR instead of DWORD
1398 for compatibility with x64.
1400 * sysdep.c (STDERR_FILENO): Define if not already defined.
1402 * ralloc.c (real_morecore): Argument type is now ptrdiff_t.
1403 (__morecore): Argument type is now ptrdiff_t.
1404 (ROUNDUP, MEM_ROUNDUP): Use size_t instead of 'unsigned long'.
1405 (relinquish): Use ptrdiff_t type for 'excess'.
1406 (r_alloc_sbrk): Argument type is now ptrdiff_t.
1408 * makefile.w32-in (HEAPSIZE): Get value from EMACS_HEAPSIZE.
1409 (bootstrap-temacs-CMD, bootstrap-temacs-SH): Use $(EMACS_PURESIZE)
1410 instead of a literal number.
1412 * gmalloc.c [WINDOWSNT]: Include w32heap.h.
1413 (min): Define only if not already defined.
1415 * frame.c (x_report_frame_params): Use EMACS_UINT for the return
1416 value of FRAME_X_WINDOW, to fit a 64-bit pointer on 64-bit Windows
1419 * image.c (x_bitmap_pixmap): Return ptrdiff_t, not int, since
1420 'bitmaps' is a pointer.
1422 * dispextern.h (x_bitmap_pixmap): Adjust prototype.
1424 * alloc.c (gdb_make_enums_visible): Now conditional on __GNUC__.
1426 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1428 file-attributes has a new optional arg FOLLOW-SYMLINKS.
1429 * dired.c (directory_files_internal, Ffile_attributes):
1430 New arg follow_symlinks. All uses changed.
1432 2012-09-30 Stefan Monnier <monnier@iro.umontreal.ca>
1434 * .gdbinit (xbacktrace): Adjust to recent "struct backtrace" change.
1436 2012-09-30 Eli Zaretskii <eliz@gnu.org>
1438 Support atimers and CPU profiler via profile.c on MS-Windows.
1439 * w32proc.c (sig_mask, crit_sig): New static variables.
1440 (sys_signal): Support SIGALRM and SIGPROF.
1441 (sigemptyset, sigaddset, sigfillset, sigprocmask)
1442 (pthread_sigmask, setpgrp): Move here from w32.c. sigaddset,
1443 sigfillset, and sigprocmask are no longer no-ops.
1444 (sigismember): New function.
1445 (struct itimer_data): New definition.
1446 (ticks_now, real_itimer, prof_itimer, clocks_min, crit_real)
1447 (crit_prof): New static variables.
1448 (MAX_SINGLE_SLEEP): New definition.
1449 (timer_loop, stop_timer_thread, term_timers, init_timers)
1450 (start_timer_thread, getitimer, setitimer): New functions.
1451 (alarm): No longer a no-op, calls setitimer.
1453 * w32.c (term_ntproc): Call term_timers.
1454 (init_ntproc): Make sure all signals are unblocked at startup, to
1455 erase any traces of dumping. Call init_timers.
1457 * w32fns.c (hourglass_timer, HOURGLASS_ID): Remove.
1458 Windows-specific code to display the hourglass mouse pointer is no
1460 (w32_wnd_proc): Remove code that handled the WM_TIMER message due
1461 to hourglass timer expiration.
1462 (start_hourglass, cancel_hourglass, DEFAULT_HOURGLASS_DELAY):
1463 Remove, no longer used.
1464 (w32_note_current_window, show_hourglass, hide_hourglass):
1465 New functions, in support of hourglass cursor display similar to other
1467 (syms_of_w32fns): Don't initialize hourglass_timer.
1469 * xdisp.c (start_hourglass, cancel_hourglass): Now used on
1471 (start_hourglass) [WINDOWSNT]: Call w32_note_current_window.
1473 * w32.h (init_timers, term_timers): Add prototypes.
1475 2012-09-30 Kenichi Handa <handa@gnu.org>
1477 * coding.c (decode_coding_ccl, encode_coding_ccl): Pay attention
1478 to the buffer relocation which may be caused by ccl_driver.
1480 2012-09-30 Jan Djärv <jan.h.d@swipnet.se>
1482 * xfns.c (Fx_file_dialog): Update comment.
1484 * w32fns.c (Fx_file_dialog): Update comment.
1486 * nsfns.m (Fns_read_file_name): Add argument DIR_ONLY_P.
1487 Initialize panel name field if OSX >= 10.6.
1489 * fileio.c (Fnext_read_file_uses_dialog_p): Add HAVE_NS.
1491 * nsfns.m (ns_frame_parm_handlers): Add x_set_fullscreen.
1493 * nsterm.m (NEW_STYLE_FS): New define.
1494 (ns_fullscreen_hook, windowWillEnterFullScreen)
1495 (windowDidEnterFullScreen, windowWillExitFullScreen)
1496 (windowDidExitFullScreen, toggleFullScreen, handleFS)
1497 (setFSValue): New functions.
1498 (EmacsFSWindow): New implementation.
1499 (canBecomeKeyWindow): New function for EmacsFSWindow.
1500 (ns_create_terminal): Set fullscreen_hook to ns_fullscreen_hook.
1501 (dealloc): Release nonfs_window if in fullscreen.
1502 (updateFrameSize:): Call windowDidMove to update top/left.
1503 (windowWillResize:toSize:): Check if frame is still maximized.
1504 (initFrameFromEmacs:): Initialize fs_state, fs_before_fs,
1505 next_maximized, maximized_width, maximized_height and nonfs_window.
1506 Call setCollectionBehavior if NEW_STYLE_FS. Initialize bwidth and
1508 (windowWillUseStandardFrame:defaultFrame:): Update frame parameter
1509 fullscreen. Set maximized_width/height. Act on next_maximized.
1511 * nsterm.h (MAC_OS_X_VERSION_10_7, MAC_OS_X_VERSION_10_8): New.
1512 (EmacsView): Add variables for fullscreen.
1513 (handleFS, setFSValue, toggleFullScreen): New in EmacsView.
1514 (EmacsFSWindow): New interface for fullscreen.
1516 2012-09-30 Juanma Barranquero <lekktu@gmail.com>
1518 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1520 2012-09-30 Chong Yidong <cyd@gnu.org>
1522 * fns.c (Frandom): Doc fix.
1524 2012-09-30 Martin Rudalics <rudalics@gmx.at>
1526 * window.c (Vwindow_combination_limit): New default value.
1527 (Qwindow_size): New symbol replacing Qtemp_buffer_resize.
1529 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1531 * syssignal.h (PROFILER_CPU_SUPPORT): Don't define if PROFILING.
1532 Suggested by Eli Zaretskii in
1533 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00811.html>.
1535 2012-09-30 Eli Zaretskii <eliz@gnu.org>
1537 * profiler.c (Fprofiler_cpu_stop): Use timer_settime only if
1538 HAVE_TIMER_SETTIME is defined.
1540 2012-09-30 Paul Eggert <eggert@cs.ucla.edu>
1542 Profiler improvements: more-accurate timers, overflow checks.
1543 * profiler.c: Don't include stdio.h, limits.h, sys/time.h,
1544 signal.h, setjmp.h. Include systime.h instead.
1545 (saturated_add): New function.
1546 (record_backtrace, current_sample_interval): Use EMACS_INT, not size_t.
1547 (record_backtrace, handle_profiler_signal): Saturate on fixnum overflow.
1548 (profiler_timer, profiler_timer_ok) [HAVE_TIMER_SETTIME]:
1550 (enum profiler_cpu_running): New enum.
1551 (profiler_cpu_running): Now of that enum type, not bool.
1552 All uses changed to store the new value.
1553 (handle_profiler_signal): Rename from sigprof_handler_1,
1554 for consistency with other handlers. Do not check whether
1555 cpu_log is a hash-table if garbage collecting, since it
1556 doesn't matter in that case.
1557 (deliver_profiler_signal): Rename from sigprof_handler,
1558 for consistency with other handlers.
1559 (setup_cpu_timer): New function, with much of what used to be in
1560 Fprofiler_cpu_start. Check for out-of-range argument.
1561 Prefer timer_settime if available, and prefer
1562 thread cputime clocks, then process cputime clocks, then
1563 monotonic clocks, to the old realtime clock. Use make_timeval
1564 to round more-correctly when falling back to setitimer.
1565 (Fprofiler_cpu_start): Use it.
1566 (Fprofiler_cpu_stop): Prefer timer_settime if available.
1567 Don't assume that passing NULL as the 2nd argument of setitimer
1568 is the same as passing a pointer to all-zero storage.
1569 Ignore SIGPROF afterwards.
1570 (malloc_probe): Saturate at MOST_POSITIVE_FIXNUM.
1571 * sysdep.c (emacs_sigaction_init): Also mask out SIGPROF in
1572 non-fatal signal handlers. Ignore SIGPROF on startup.
1573 * syssignal.h (PROFILER_CPU_SUPPORT): Define this macro here, not
1574 in profiler.c, since sysdep.c now uses it.
1576 * sysdep.c (handle_fatal_signal): Bump backtrace size to 40.
1577 Suggested by Eli Zaretskii in
1578 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.
1580 2012-09-29 Juanma Barranquero <lekktu@gmail.com>
1582 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1584 2012-09-29 Stefan Monnier <monnier@iro.umontreal.ca>
1586 * lisp.h (struct backtrace): Remove indirection for `function' field.
1587 * xdisp.c (redisplay_internal):
1588 * profiler.c (record_backtrace, sigprof_handler_1):
1589 * alloc.c (Fgarbage_collect):
1590 * eval.c (interactive_p, Fsignal, eval_sub, Ffuncall, Fbacktrace)
1591 (Fbacktrace_frame): Adjust accordingly.
1593 2012-09-28 Glenn Morris <rgm@gnu.org>
1595 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
1596 (Frun_hook_with_args_until_failure): Doc fixes.
1598 2012-09-28 Eli Zaretskii <eliz@gnu.org>
1600 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
1601 Qautomatic_redisplay and change the symbol name. All users changed.
1603 2012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
1605 * profiler.c (sigprof_handler): Fix race condition.
1607 2012-09-28 Glenn Morris <rgm@gnu.org>
1609 * lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
1611 2012-09-27 Paul Eggert <eggert@cs.ucla.edu>
1613 Check more robustly for timer_settime.
1614 * Makefile.in (LIB_TIMER_TIME): New macro.
1616 * atimer.c (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
1617 Use HAVE_TIMER_SETTIME, not SIGEV_SIGNAL, to decide whether to
1620 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1622 * profiler.c (Fprofiler_cpu_start): Remove unnecessary flag SA_SIGINFO.
1624 2012-09-26 Juanma Barranquero <lekktu@gmail.com>
1626 * makefile.w32-in ($(BLD)/profiler.$(O)): Update dependencies.
1628 2012-09-26 Paul Eggert <eggert@cs.ucla.edu>
1630 * character.h (MAYBE_UNIFY_CHAR): Remove.
1631 * charset.c, charset.h (maybe_unify_char): Now static.
1632 * charset.c (decode_char): Use maybe_unify_char, not MAYBE_UNIFY_CHAR.
1633 Since this stuff is now private to charset.c, there's no need for
1634 a public macro and no need to inline by hand.
1636 2012-09-26 Tomohiro Matsuyama <tomo@cx4a.org>
1637 Stefan Monnier <monnier@iro.umontreal.ca>
1638 Juanma Barranquero <lekktu@gmail.com>
1640 * profiler.c: New file.
1641 * Makefile.in (base_obj): Add profiler.o.
1642 * makefile.w32-in (OBJ2, GLOBAL_SOURCES): Add profiler.c.
1643 ($(BLD)/profiler.$(O)): New target.
1644 * emacs.c (main): Call syms_of_profiler.
1645 * alloc.c (Qautomatic_gc): New constant.
1646 (MALLOC_PROBE): New macro.
1647 (xmalloc, xzalloc, xrealloc, lisp_malloc, lisp_align_malloc): Use it.
1648 (total_bytes_of_live_objects): New function.
1649 (Fgarbage_collect): Use it. Record itself in backtrace_list.
1650 Call malloc_probe for the memory profiler.
1651 (syms_of_alloc): Define Qautomatic_gc.
1652 * eval.c (eval_sub, Ffuncall): Reorder assignments to avoid
1654 (struct backtrace): Move definition...
1655 * lisp.h (struct backtrace): ..here.
1656 (Qautomatic_gc, profiler_memory_running): Declare vars.
1657 (malloc_probe, syms_of_profiler): Declare functions.
1658 * xdisp.c (Qautomatic_redisplay): New constant.
1659 (redisplay_internal): Record itself in backtrace_list.
1660 (syms_of_xdisp): Define Qautomatic_redisplay.
1662 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1663 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
1665 * makefile.w32-in ($(BLD)/callproc.$(O)): Update dependencies.
1667 2012-09-25 Paul Eggert <eggert@cs.ucla.edu>
1669 Prefer POSIX timers if available.
1670 They avoid a race if the timer is too close to the current time.
1671 * atimer.c (alarm_timer, alarm_timer_ok) [SIGEV_SIGNAL]: New static vars.
1672 (set_alarm) [SIGEV_SIGNAL]: Use POSIX timers if available.
1673 (init_atimer) [SIGEV_SIGNAL]: Initialize them.
1675 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1677 * coding.c (CHAR_STRING_ADVANCE_NO_UNIFY): Make it an alias of
1678 CHAR_STRING_ADVANCE.
1679 (STRING_CHAR_ADVANCE_NO_UNIFY): Make it an alias of
1680 STRING_CHAR_ADVANCE.
1682 2012-09-25 Juanma Barranquero <lekktu@gmail.com>
1684 Move Vlibrary_cache to emacs.c and reset before dumping.
1686 * lisp.h (reset_image_types): Declare.
1687 [WINDOWSNT] (Vlibrary_cache): Declare.
1689 * image.c (reset_image_types): New function.
1691 * emacs.c [WINDOWSNT] (Vlibrary_cache): Move from w32.c.
1692 (syms_of_emacs) [WINDOWSNT] <Vlibrary_cache>: Initialize and staticpro.
1693 (Fdump_emacs): Reset Vlibrary_cache and image_types.
1695 * w32.c (Vlibrary_cache): Do not define; moved to emacs.c
1696 (globals_of_w32) <Vlibrary_cache>: Do not initialize.
1698 * w32.h (Vlibrary_cache): Do not declare.
1700 2012-09-25 Eli Zaretskii <eliz@gnu.org>
1702 * w32proc.c (sys_signal): Handle all signals defined by the
1703 MS-Windows runtime, not just SIGCHLD. Actually install the signal
1704 handlers for signals supported by Windows. Don't override
1705 term_ntproc as the handler for SIGABRT.
1706 (sigaction): Rewrite to call sys_signal instead of duplicating its
1708 (sys_kill): Improve commentary.
1710 * w32.c (term_ntproc): Accept (and ignore) one argument, for
1711 consistency with a signature of a signal handler. All callers
1713 (init_ntproc): Accept an argument DUMPING. If dumping, don't
1714 install term_ntproc as a signal handler for SIGABRT, as that
1715 should be done by the dumped Emacs.
1717 * w32.h (init_ntproc, term_ntproc): Adjust prototypes.
1719 * w32select.c (term_w32select): Protect against repeated
1720 invocation by setting clipboard_owner to NULL after calling
1723 * emacs.c (shut_down_emacs, main): Adapt the calls to init_ntproc
1724 and term_ntproc to their modified signatures.
1726 * character.c (char_string, string_char): Remove calls to
1727 MAYBE_UNIFY_CHAR. See the discussion starting at
1728 http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00433.html
1731 2012-09-25 Chong Yidong <cyd@gnu.org>
1733 * xdisp.c (mode_line_inverse_video): Delete obsolete variable.
1735 2012-09-24 Stefan Monnier <monnier@iro.umontreal.ca>
1737 * bytecode.c (exec_byte_code): Signal an error instead of aborting,
1738 when encountering an unknown bytecode.
1740 2012-09-24 Paul Eggert <eggert@cs.ucla.edu>
1742 image.c, indent.c: Use bool for booleans.
1743 * dispextern.h (struct image_type): Members valid_p, load, init
1744 now return bool, not int. All uses changed.
1745 * image.c: Omit unnecessary static decls.
1746 (x_create_bitmap_mask, x_build_heuristic_mask):
1747 Return void, not int, since callers don't care about the return value.
1748 (x_create_bitmap_mask, define_image_type, valid_image_p)
1749 (struct image_keyword, parse_image_spec, image_spec_value)
1750 (check_image_size, image_background)
1751 (image_background_transparent, x_clear_image_1)
1752 (postprocess_image, lookup_image, x_check_image_size)
1753 (x_create_x_image_and_pixmap, xbm_image_p)
1754 (Create_Pixmap_From_Bitmap_Data, xbm_read_bitmap_data)
1755 (xbm_load_image, xbm_file_p, xbm_load, xpm_lookup_color)
1756 (init_xpm_functions, xpm_valid_color_symbols_p, xpm_image_p)
1757 (xpm_load, xpm_load_image, lookup_rgb_color, lookup_pixel_color)
1758 (x_to_xcolors, x_build_heuristic_mask, pbm_image_p, pbm_load)
1759 (png_image_p, init_png_functions, png_load_body, png_load)
1760 (jpeg_image_p, init_jpeg_functions, jpeg_load_body, jpeg_load)
1761 (tiff_image_p, init_tiff_functions, tiff_load, gif_image_p)
1762 (init_gif_functions, gif_load, imagemagick_image_p)
1763 (imagemagick_load_image, imagemagick_load, svg_image_p)
1764 (init_svg_functions, svg_load, svg_load_image, gs_image_p)
1766 * nsimage.m (ns_load_image):
1767 * nsterm.m (ns_defined_color):
1768 * xfaces.c (tty_lookup_color, tty_defined_color, defined_color):
1769 * xfns.c (x_defined_color):
1770 * xterm.c (x_alloc_lighter_color_for_widget)
1771 (x_alloc_nearest_color_1, x_alloc_nearest_color)
1772 (x_alloc_lighter_color):
1773 * indent.c (disptab_matches_widthtab, current_column)
1774 (scan_for_column, string_display_width, indented_beyond_p)
1775 (compute_motion, vmotion, Fvertical_motion):
1776 Use bool for booleans.
1778 2012-09-24 Chong Yidong <cyd@gnu.org>
1780 * chartab.c (Fset_char_table_default): Obsolete function removed.
1782 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1784 Move pid_t related decls out of lisp.h.
1785 * lisp.h, syswait.h (record_child_status_change, wait_for_termination)
1786 (interruptible_wait_for_termination):
1787 Move these decls from lisp.h to syswait.h, since they use pid_t.
1788 Needed on FreeBSD; see Herbert J. Skuhra in
1789 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00571.html>.
1790 * callproc.c: Include syswait.h.
1792 gnutls.c, gtkutil.c: Use bool for boolean.
1793 * gnutls.c (gnutls_global_initialized, init_gnutls_functions)
1794 (emacs_gnutls_handle_error):
1795 * gtkutil.c (xg_check_special_colors, xg_prepare_tooltip)
1796 (xg_hide_tooltip, xg_create_frame_widgets)
1797 (create_dialog, xg_uses_old_file_dialog)
1798 (xg_get_file_with_chooser, xg_get_file_with_selection)
1799 (xg_get_file_name, xg_have_tear_offs, create_menus, xg_create_widget)
1800 (xg_item_label_same_p, xg_update_menubar)
1801 (xg_modify_menubar_widgets, xg_event_is_for_menubar)
1802 (xg_ignore_gtk_scrollbar, xg_set_toolkit_scroll_bar_thumb)
1803 (xg_event_is_for_scrollbar, xg_pack_tool_bar, xg_make_tool_item)
1804 (is_box_type, xg_tool_item_stale_p, xg_update_tool_bar_sizes)
1805 (update_frame_tool_bar, free_frame_tool_bar):
1806 * gtkutil.c, w32term.c, xterm.c (x_wm_set_size_hint):
1807 * nsmenu.m (ns_update_menubar):
1808 * nsmenu.m, w32menu.c, xmenu.c (set_frame_menubar):
1809 * xfns.c (Fx_show_tip) [USE_GTK]:
1810 Use bool for boolean.
1811 * gtkutil.c (xg_update_frame_menubar):
1812 * xmenu.c (update_frame_menubar):
1813 Return void, not int, since caller ignores return value.
1814 * gtkutil.c (xg_change_toolbar_position):
1817 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
1819 * makefile.w32-in (BLOCKINPUT_H): Remove.
1820 (SYSSIGNAL_H): New macro.
1821 ($(BLD)/alloc.$(O), $(BLD)/atimer.$(O), $(BLD)/buffer.$(O))
1822 ($(BLD)/callproc.$(O), $(BLD)/data.$(O), $(BLD)/dired.$(O))
1823 ($(BLD)/dispnew.$(O), $(BLD)/editfns.$(O), $(BLD)/emacs.$(O))
1824 ($(BLD)/eval.$(O), $(BLD)/fileio.$(O), $(BLD)/floatfns.$(O))
1825 ($(BLD)/fns.$(O), $(BLD)/fontset.$(O), $(BLD)/frame.$(O))
1826 ($(BLD)/fringe.$(O), $(BLD)/image.$(O), $(BLD)/insdel.$(O))
1827 ($(BLD)/keyboard.$(O), $(BLD)/keymap.$(O), $(BLD)/lread.$(O))
1828 ($(BLD)/menu.$(O), $(BLD)/w32inevt.$(O), $(BLD)/w32proc.$(O))
1829 ($(BLD)/print.$(O), $(BLD)/process.$(O), $(BLD)/ralloc.$(O))
1830 ($(BLD)/search.$(O), $(BLD)/sound.$(O), $(BLD)/sysdep.$(O))
1831 ($(BLD)/term.$(O), $(BLD)/window.$(O), $(BLD)/xdisp.$(O))
1832 ($(BLD)/xfaces.$(O), $(BLD)/w32fns.$(O), $(BLD)/w32menu.$(O))
1833 ($(BLD)/w32term.$(O), $(BLD)/w32select.$(O), $(BLD)/w32reg.$(O))
1834 ($(BLD)/w32xfns.$(O)): Update dependencies.
1836 2012-09-23 Eli Zaretskii <eliz@gnu.org>
1838 * .gdbinit: Set breakpoint on terminate_due_to_signal, not on
1839 fatal_error_backtrace.
1841 * w32proc.c (sys_kill): Undo last change: don't do anything when
1842 invoked to deliver SIGABRT to our own process. This is now
1843 handled by emacs_raise.
1845 2012-09-23 Juanma Barranquero <lekktu@gmail.com>
1847 * w32term.c (w32_read_socket): Remove leftover reference to
1848 interrupt_input_pending.
1850 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1852 Do not use SA_NODEFER.
1853 Problem reported by Dani Moncayo in
1854 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00557.html>.
1856 * sysdep.c (emacs_abort): Do not reset signal handler.
1857 * emacs.c (terminate_due_to_signal): Reset signal handler here.
1858 * sysdep.c (init_signals): Do not use SA_NODEFER. It wasn't
1859 wanted even on POSIXish hosts, and it doesn't work on Windows.
1861 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
1863 * xterm.c (x_term_init): Call fixup_locale before and after calling
1864 gtk_init (Bug#12392).
1866 2012-09-23 Chong Yidong <cyd@gnu.org>
1868 * w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
1869 Vdynamic_library_alist.
1871 * gnutls.c (init_gnutls_functions): Caller changed; remove arg.
1872 (Fgnutls_available_p): Caller changed.
1874 * xml.c (init_libxml2_functions, Flibxml_parse_html_region)
1875 (Flibxml_parse_xml_region): Likewise.
1877 * dispextern.h (struct image_type): Remove arg from init function.
1879 * image.c (Finit_image_library, lookup_image_type)
1880 (define_image_type): Remove now-unneeded second arg.
1881 (init_xpm_functions, init_png_functions, init_jpeg_functions)
1882 (init_tiff_functions, init_gif_functions, init_svg_functions):
1883 Arglist and w32_delayed_load calling convention changed.
1884 (gs_type): Remove init_gs_functions; there is no such function.
1885 (valid_image_p, make_image): Fix caller to lookup_image_type.
1887 2012-09-23 Paul Eggert <eggert@cs.ucla.edu>
1889 Simplify and avoid signal-handling races (Bug#12471).
1891 * sysdep.c (emacs_abort) [HAVE_NTGUI]:
1892 Avoid recursive loop if there's a fatal error in the function itself.
1893 * atimer.c (pending_atimers):
1894 * blockinput.h: Don't include "atimer.h"; no longer needed.
1895 (interrupt_input_pending): Remove. All uses removed.
1896 pending_signals now counts both atimers and ordinary interrupts.
1897 This is less racy than having three separate pending-signal flags.
1898 (block_input, unblock_input, totally_unblock_input, unblock_input_to)
1900 Rename from their upper-case counterparts BLOCK_INPUT,
1901 UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_TO,
1902 INPUT_BLOCKED_P, and turn into functions. All uses changed.
1903 This makes it easier to access volatile variables more accurately.
1904 (BLOCK_INPUT_RESIGNAL): Remove. All uses replaced by unblock_input ().
1905 (input_blocked_p): Prefer this to 'interrupt_input_blocked', as
1906 that's more reliable if the code is buggy and sets
1907 interrupt_input_blocked to a negative value. All uses changed.
1908 * atimer.c (deliver_alarm_signal):
1909 Remove. No need to deliver this to the parent; any thread can
1910 handle this signal now. All uses replaced by underlying handler.
1911 * atimer.c (turn_on_atimers):
1912 * dispnew.c (handle_window_change_signal):
1913 * emacs.c (handle_danger_signal):
1914 * keyboard.c (kbd_buffer_get_event):
1915 Don't reestablish signal handler; not needed with sigaction.
1916 * blockinput.h (UNBLOCK_INPUT_TO, TOTALLY_UNBLOCK_INPUT)
1918 Rework to avoid unnecessary accesses to volatile variables.
1919 (UNBLOCK_INPUT_TO): Now a function.
1920 (totally_unblock_input, unblock_input): New decls.
1921 * data.c (handle_arith_signal, deliver_arith_signal): Move to sysdep.c
1922 (init_data): Remove. Necessary stuff now done in init_signal.
1923 * emacs.c, xdisp.c: Include "atimer.h", since we invoke atimer functions.
1924 * emacs.c (handle_fatal_signal, deliver_fatal_signal): Move to sysdep.c.
1925 (fatal_error_code): Remove; no longer needed.
1926 (terminate_due_to_signal): Rename from fatal_error_backtrace, since
1927 it doesn't always backtrace. All uses changed. No need to reset
1928 signal to default, since sigaction and/or die does that for us now.
1929 Use emacs_raise (FOO), not kill (getpid (), FOO).
1930 (main): Check more-accurately whether we're dumping.
1931 Move fatal-error setup to sysdep.c
1932 * floatfns.c: Do not include "syssignal.h"; no longer needed.
1933 * gtkutil.c (xg_get_file_name, xg_get_font):
1934 Remove no-longer-needed signal-mask manipulation.
1935 * keyboard.c, process.c (POLL_FOR_INPUT):
1936 Don't depend on USE_ASYNC_EVENTS, a symbol that is never defined.
1937 * keyboard.c (read_avail_input): Remove.
1938 All uses replaced by gobble_input.
1939 (Ftop_level): Use TOTALLY_UNBLOCK_INPUT rather than open code.
1940 (kbd_buffer_store_event_hold, gobble_input):
1941 (record_asynch_buffer_change) [USABLE_SIGIO]:
1942 (store_user_signal_events):
1943 No need to mess with signal mask.
1944 (gobble_input): If blocking input and there are terminals, simply
1945 set pending_signals to 1 and return. All hooks changed to not
1946 worry about whether input is blocked.
1947 (process_pending_signals): Clear pending_signals before processing
1948 them, in case a signal comes in while we're processing.
1949 By convention callers now test pending_signals before calling us.
1950 (UNBLOCK_INPUT_TO, unblock_input, totally_unblock_input):
1951 New functions, to support changes to blockinput.h.
1952 (handle_input_available_signal): Now extern.
1953 (reinvoke_input_signal): Remove. All uses replaced by
1955 (quit_count): Now volatile, since a signal handler uses it.
1956 (handle_interrupt): Now takes bool IN_SIGNAL_HANDLER as arg.
1957 All callers changed. Block SIGINT only if not already blocked.
1958 Clear sigmask reliably, even if Fsignal returns, which it can.
1959 Omit unnecessary accesses to volatile var.
1960 (quit_throw_to_read_char): No need to restore sigmask.
1961 * keyboard.c (gobble_input, handle_user_signal):
1962 * process.c (wait_reading_process_output):
1963 Call signal-handling code rather than killing ourselves.
1964 * lisp.h: Include <float.h>, for...
1965 (IEEE_FLOATING_POINT): New macro, moved here to avoid duplication.
1966 (pending_signals): Now volatile.
1967 (syms_of_data): Now const if IEEE floating point.
1968 (handle_input_available_signal) [USABLE_SIGIO]:
1969 (terminate_due_to_signal, record_child_status_change): New decls.
1970 * process.c (create_process): Avoid disaster if memory is exhausted
1971 while we're processing a vfork, by tightening the critical section
1973 (send_process_frame, process_sent_to, handle_pipe_signal)
1974 (deliver_pipe_signal): Remove. No longer needed, as Emacs now
1976 (send_process): No need for setjmp/longjmp any more, since the
1977 SIGPIPE stuff is now gone. Instead, report an error if errno
1979 (record_child_status_change): Now extern. PID and W are now args.
1980 Return void, not bool. All callers changed.
1981 * sysdep.c (wait_debugging) [(BSD_SYSTEM || HPUX) && !defined (__GNU__)]:
1982 Remove. All uses removed. This bug should be fixed now in a
1984 (wait_for_termination_1): Use waitpid rather than sigsuspend,
1985 and record the child status change directly. This avoids the
1986 need to futz with the signal mask.
1987 (process_fatal_action): Move here from emacs.c.
1988 (emacs_sigaction_flags): New function, containing
1989 much of what used to be in emacs_sigaction_init.
1990 (emacs_sigaction_init): Use it. Block nonfatal system signals that are
1991 caught by emacs, to make races less likely.
1992 (deliver_process_signal): Rename from handle_on_main_thread.
1994 (BACKTRACE_LIMIT_MAX): Now at top level.
1995 (thread_backtrace_buffer, threadback_backtrace_pointers):
1997 (deliver_thread_signal, deliver_fatal_thread_signal):
1998 New functions, for more-accurate delivery of thread-specific signals.
1999 (handle_fatal_signal, deliver_fatal_signal): Move here from emacs.c.
2000 (deliver_arith_signal): Handle in this thread, not
2001 in the main thread, since it's triggered by this thread.
2002 (maybe_fatal_sig): New function.
2003 (init_signals): New arg DUMPING so that we can be more accurate
2004 about whether we're dumping. Caller changed.
2005 Treat thread-specific signals differently from process-general signals.
2006 Block all signals while handling fatal error; that's safer.
2007 xsignal from SIGFPE only on non-IEEE hosts, treating it as fatal
2009 When batch, ignore SIGHUP, SIGINT, SIGTERM if they were already ignored.
2010 Ignore SIGPIPE unless batch.
2011 (emacs_backtrace): Output backtrace for the appropriate thread,
2012 which is not necessarily the main thread.
2013 * syssignal.h: Include <stdbool.h>.
2014 (emacs_raise): New macro.
2015 * xterm.c (x_connection_signal): Remove; no longer needed
2016 now that we use sigaction.
2017 (x_connection_closed): No need to mess with sigmask now.
2018 (x_initialize): No need to reset SIGPIPE handler here, since
2019 init_signals does this for us now.
2021 2012-09-23 Jan Djärv <jan.h.d@swipnet.se>
2023 * nsterm.m (ns_dumpglyphs_image): dr is a new rect to draw image into,
2024 background rect may be larger (Bug#12245).
2026 2012-09-23 Chong Yidong <cyd@gnu.org>
2028 * keyboard.c (timer_check): Avoid quitting during Fcopy_sequence.
2030 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
2032 * .gdbinit: Just stop at fatal_error_backtrace.
2033 See Stefan Monnier's request in
2034 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00549.html>.
2035 Remove no-longer-used query of system type.
2037 2012-09-22 Chong Yidong <cyd@gnu.org>
2039 * search.c (Freplace_match): Doc fix (Bug#12325).
2041 * minibuf.c (Finternal_complete_buffer): Doc fix (Bug#12391).
2043 * editfns.c (Fline_beginning_position): Doc fix (Bug#12416).
2044 (Fline_end_position): Doc fix.
2046 * cmds.c (Fforward_char, Fbackward_char): Doc fix (Bug#12414).
2048 2012-09-22 Chong Yidong <cyd@gnu.org>
2050 * dispextern.h (struct image_type): Add new slot, storing a type
2051 initialization function.
2053 * image.c (define_image_type): Call the image initializer function
2054 if it is defined. Arguments and return value changed.
2055 (valid_image_p, make_image): Callers changed.
2056 (xbm_type, xpm_type, pbm_type, png_type, jpeg_type, tiff_type)
2057 (gif_type, imagemagick_type, svg_type, gs_type):
2058 Add initialization functions.
2059 (Finit_image_library): Call lookup_image_type.
2060 (CHECK_LIB_AVAILABLE): Macro deleted.
2061 (lookup_image_type): Call define_image_type here, rather than via
2062 Finit_image_library, and without using CHECK_LIB_AVAILABLE.
2063 (syms_of_image): Move define_image_type calls for xbm_type and
2064 pbm_type to lookup_image_type.
2066 2012-09-22 Eli Zaretskii <eliz@gnu.org>
2068 * keyboard.c (timer_check_2): Move calculation of 'timers' and
2069 'idle_timers' from here ...
2070 (timer_check): ... to here. Use Fcopy_sequence to copy the timer
2071 lists, to avoid infloops when the timer does something stupid,
2072 like reinvoke itself with the same or smaller time-out.
2075 2012-09-22 Martin Rudalics <rudalics@gmx.at>
2077 * window.c (Fsplit_window_internal): Handle only Qt value of
2078 Vwindow_combination_limit separately.
2079 (Qtemp_buffer_resize): New symbol.
2080 (Vwindow_combination_limit): New default value.
2083 2012-09-22 Eli Zaretskii <eliz@gnu.org>
2085 * xdisp.c (next_overlay_string): Initialize it->end_charpos for
2086 the new overlay string. (Bug#10159)
2088 2012-09-22 Paul Eggert <eggert@cs.ucla.edu>
2090 * emacs.c (shut_down_emacs): Don't assume stderr is buffered,
2091 or that fprintf is async-signal-safe. POSIX doesn't require
2094 2012-09-22 Chong Yidong <cyd@gnu.org>
2096 * buffer.c (Fset_buffer_modified_p): Handle indirect buffers
2099 2012-09-22 Kenichi Handa <handa@gnu.org>
2101 * composite.c (composition_reseat_it): Handle the case that a
2102 grapheme cluster is not covered by a single font (Bug#12352).
2104 2012-09-21 Chong Yidong <cyd@gnu.org>
2106 * image.c (define_image_type): Avoid adding duplicate types to
2107 image_types (Bug#12463). Suggested by Jörg Walter.
2109 2012-09-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2111 * unexmacosx.c: Define LC_DATA_IN_CODE if not defined.
2112 (print_load_command_name): Add case LC_DATA_IN_CODE.
2113 (dump_it) [LC_DATA_IN_CODE]: Call copy_linkedit_data.
2115 2012-09-21 Glenn Morris <rgm@gnu.org>
2117 * eval.c (Frun_hook_with_args_until_success)
2118 (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393)
2120 2012-09-21 Andreas Schwab <schwab@linux-m68k.org>
2122 * fileio.c (Ffile_selinux_context): Only call freecon when
2123 lgetfilecon succeeded.
2124 (Fset_file_selinux_context): Likewise. (Bug#12444)
2126 2012-09-21 Eli Zaretskii <eliz@gnu.org>
2128 * xdisp.c (try_window_reusing_current_matrix): Under bidi
2129 reordering, locate the cursor by calling set_cursor_from_row; if
2130 that fails, clear the desired glyph matrix before returning a
2131 failure indication to the caller. Fixes leaving garbled display
2132 when fast scrolling with a down-key. (Bug#12403)
2133 (compute_stop_pos_backwards): Fix a typo that caused crashes while
2134 scrolling through multibyte text.
2136 2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
2138 * alloc.c (mark_object) <PVEC_WINDOW>: Mark prev/next_buffers *after*
2139 calling mark_vectorlike since that's the one that marks the window.
2140 (mark_discard_killed_buffers): Mark the final cdr.
2141 * window.h (struct window): Move prev/next_buffers to the
2142 non-standard fields.
2143 * window.c (make_window): Initialize prev/next_buffers manually.
2145 2012-09-20 Paul Eggert <eggert@cs.ucla.edu>
2147 Omit unused arg EXPECTED from socket hooks.
2148 * keyboard.c (gobble_input, read_avail_input, tty_read_avail_input):
2149 * nsterm.m (ns_term_init):
2150 * termhooks.h (struct terminal.read_socket_hook):
2151 * w32inevt.c (w32_console_read_socket):
2152 * w32term.c (w32_read_socket):
2153 * xterm.c (XTread_socket):
2154 Omit unused arg EXPECTED. All callers changed.
2155 (store_user_signal_events): Return void, not int, since callers no
2156 longer care about the return value. All uses changed.
2158 2012-09-20 Juanma Barranquero <lekktu@gmail.com>
2160 * w32gui.h (XParseGeometry): Do not declare.
2162 2012-09-19 Paul Eggert <eggert@cs.ucla.edu>
2164 * w32inevt.c (w32_console_read_socket): Return -1 on failure, not 0.
2165 Ignore 'expected'. See Eli Zaretskii in
2166 <http://bugs.gnu.org/12471#8> (last line).
2168 * frame.c (read_integer): Remove. All uses replaced by strtol/strtoul.
2169 (XParseGeometry): Now static. Substitute extremal values for
2170 values that are out of range.
2172 2012-09-19 Jan Djärv <jan.h.d@swipnet.se>
2174 * w32xfns.c (read_integer, XParseGeometry): Move to frame.c.
2176 * nsfns.m (XParseGeometry): Remove.
2177 (Fx_create_frame): Call x_set_offset to correctly interpret
2178 top_pos in geometry.
2180 * frame.c (read_integer, XParseGeometry): Move from w32xfns.c.
2181 (Fx_parse_geometry): If there is a space in string, call
2182 Qns_parse_geometry, otherwise do as on other terms (Bug#12368).
2184 2012-09-17 Eli Zaretskii <eliz@gnu.org>
2186 * search.c (scan_buffer): Use character positions in calls to
2187 region_cache_forward and region_cache_backward, not byte
2188 positions. (Bug#12196)
2190 * w32term.c (w32_read_socket): Set pending_signals to 1, like
2191 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
2193 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
2194 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
2195 emacs_blocked_malloc, now deleted.
2197 2012-09-17 Paul Eggert <eggert@cs.ucla.edu>
2199 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
2200 The workaround was for improving performance on Solaris 2.4, but
2201 is getting in the way now. Emacs will still work if someone is
2202 still running Solaris 2.4 in a museum somewhere; Sun dropped
2203 support for Solaris 2.4 in 2003.
2204 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
2205 * process.c (create_process) [HAVE_WORKING_VFORK]:
2206 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
2207 since Emacs no longer uses vfork on that platform.
2209 2012-09-17 Glenn Morris <rgm@gnu.org>
2211 * emacs.c: Use COPYRIGHT.
2213 2012-09-16 Paul Eggert <eggert@cs.ucla.edu>
2215 Remove configure's --without-sync-input option (Bug#12450).
2216 When auditing signal-handling in preparation for cleaning it up,
2217 I found that SYNC_INPUT has race conditions and would be a real
2218 pain to fix. Since it's an undocumented and deprecated
2219 configure-time option, now seems like a good time to remove it.
2220 Also see <http://bugs.gnu.org/11080#16>.
2221 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
2222 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
2223 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
2224 (malloc_hysteresis):
2225 (check_depth) [XMALLOC_OVERRUN_CHECK]:
2226 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
2227 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
2228 (dont_register_blocks, bytes_used_when_reconsidered)
2229 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
2230 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
2231 [!SYSTEM_MALLOC && !SYNC_INPUT]:
2232 Remove. All uses removed.
2233 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
2234 implementation, one that depends on whether the new macro
2235 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
2237 * atimer.c (run_timers, handle_alarm_signal):
2238 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
2239 (handle_async_input, process_pending_signals)
2240 (handle_input_available_signal, init_keyboard):
2241 * nsterm.m (ns_read_socket):
2242 * process.c (wait_reading_process_output):
2243 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
2244 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
2246 * xterm.c (XTread_socket):
2248 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
2249 * eval.c (handling_signal): Remove. All uses removed.
2250 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
2251 All uses replaced with the SYNC_INPUT version.
2252 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
2254 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2257 * font.c (Ffont_shape_gstring): Remove unused local.
2259 2012-09-16 Glenn Morris <rgm@gnu.org>
2261 * Makefile.in (clean): No longer run nextstep's clean.
2263 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
2265 (ns-app): Move here from ns.mk, and simplify.
2266 (clean): Simplify nextstep entry.
2267 * ns.mk: Remove file.
2269 2012-09-17 Kenichi Handa <handa@gnu.org>
2271 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
2272 not covert the last few charactes.
2274 2012-09-16 Kenichi Handa <handa@gnu.org>
2276 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
2277 here, but just check the validity of glyphs in the glyph-string.
2279 2012-09-16 Martin Rudalics <rudalics@gmx.at>
2281 * window.c (Fwindow_parameter, Fset_window_parameter):
2282 Accept any window as argument (Bug#12452).
2284 2012-09-16 Jan Djärv <jan.h.d@swipnet.se>
2286 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
2287 to ns_term_init to avoid memory leak.
2289 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
2290 explicit retain/release.
2291 (ns_term_init): Only allow one display. Initialize outerpool and
2294 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
2296 Port _setjmp fix to POSIXish hosts as well as Microsoft.
2297 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
2298 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
2299 the Microsoft problem in a different way, by altering ../nt/config.nt.
2301 2012-09-15 Eli Zaretskii <eliz@gnu.org>
2316 * w16select.c: Remove inclusion of setjmp.h, as it is now included
2317 by lisp.h. This completes removal of setjmp.h inclusion
2318 erroneously announced in the previous commit. (Bug#12446)
2320 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
2323 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
2324 not defined as a macro. The latter happens on MS-Windows.
2327 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
2329 Port better to POSIX hosts lacking _setjmp (Bug#12446).
2330 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
2331 Some instances of '#include <setjmp.h>' removed, if the
2332 only reason for the instance was because "lisp.h" was included.
2333 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
2334 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
2335 and _longjmp with the new symbols. Emacs already uses _setjmp if
2336 available, so this change affects only POSIXish hosts that have
2337 sigsetjmp but not _setjmp, such as some versions of Solaris and
2338 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
2339 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
2340 (png_load_body) [HAVE_PNG]:
2341 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
2342 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
2343 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
2344 since PNG requires jmp_buf. This is the only exception to the
2345 general rule that we now use sys_setjmp and sys_longjmp.
2346 This exception is OK since this code does not change the signal
2347 mask or longjmp out of a signal handler.
2349 2012-09-14 Paul Eggert <eggert@cs.ucla.edu>
2351 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
2352 Include "syssignal.h", for 'main_thread'.
2354 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
2356 Avoid out-of-range marker position (Bug#12426).
2357 * insdel.c (replace_range, replace_range_2):
2358 Adjust markers before overlays, as suggested by comments.
2359 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
2360 Remove redundant check before calling offset_intervals.
2362 2012-09-14 Martin Rudalics <rudalics@gmx.at>
2364 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
2365 current buffer (Bug#12387).
2367 2012-09-14 Juanma Barranquero <lekktu@gmail.com>
2369 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
2371 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
2373 Use a more backwards-compatible timer format (Bug#12430).
2374 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
2375 vector element, not from the 4th, since PSECS is now at the end.
2376 (Fcurrent_idle_time): Doc fix.
2378 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
2380 Function to mark objects and remove killed buffers at once.
2381 * alloc.c (discard_killed_buffers): Rename to ...
2382 (mark_discard_killed buffers) ... new name. Add marking
2383 of remaining objects. Fix comment. Adjust users.
2384 (mark_object): Do not touch frame buffer lists here.
2385 * frame.c (delete_frame): Reset frame buffer lists here.
2387 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
2389 Better workaround for GNOME bug when --enable-gcc-warnings.
2390 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
2391 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
2392 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
2394 Simplify SIGIO usage (Bug#12408).
2395 The code that dealt with SIGIO was crufty and confusing, e.g., it
2396 played tricks like "#undef SIGIO" but these tricks were not used
2397 consistently. Simplify mostly by not #undeffing standard symbols,
2398 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
2399 or not as we please) rather than "defined SIGIO" (standard symbol
2400 that we probably shouldn't #undef).
2401 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
2402 Modules that need it can include it.
2403 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
2404 * dispextern.h (ignore_sigio): New decl.
2405 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
2406 unconditionally, since it's now a no-op if !USABLE_SIGIO.
2407 * emacs.c (shut_down_emacs):
2408 * keyboard.c (kbd_buffer_store_event_hold):
2409 Use ignore_sigio rather than invoking 'signal' directly.
2410 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
2412 (FIONREAD, SIGIO): Do not #undef.
2413 (tty_read_avail_input): Use #error rather than a syntax error.
2414 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
2415 for I_PIPE, used by SETUP_SLAVE_PTY.
2416 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
2417 * sysdep.c (croak): Remove; no longer needed. This bit of
2418 temporary code, with Fred N. Fish's comment that it's temporary,
2419 has been in Emacs since at least 1992!
2420 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
2421 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
2422 * syssignal.h (croak): Remove decl.
2423 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
2424 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
2425 now that we're termios-only.
2426 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
2427 * term.c (dissociate_if_controlling_tty): Use #error rather than
2430 Work around GCC and GNOME bugs when --enable-gcc-warnings.
2431 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
2432 to work around GNOME bug 683906.
2433 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
2434 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
2435 This works around GCC bug 54561.
2437 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
2439 More fixes for 'volatile' and setjmp/longjmp.
2440 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
2441 * image.c (struct png_load_context) [HAVE_PNG]: New type.
2442 (png_load_body) [HAVE_PNG]:
2443 (jpeg_load_body) [HAVE_JPEG]:
2444 New function, with most of the old parent function's body.
2445 (png_load) [HAVE_PNG]:
2446 (jpeg_load) [HAVE_JPEG]:
2447 Invoke the new function, to avoid longjmp munging our locals.
2448 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
2449 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
2450 longjmp is passed 2, as the C standard doesn't guarantee this.
2451 Instead, store the failure code into mgr->failure_code.
2453 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2455 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
2456 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
2457 (syms_of_keyboard): Remove support for unread-command-char.
2459 2012-09-12 Eli Zaretskii <eliz@gnu.org>
2461 * w32proc.c (sys_kill): If PID is our process ID and the signal is
2462 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
2463 violation. (Bug#12426)
2465 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
2467 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
2469 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
2471 * eval.c: Add `inhibit-debugger'.
2472 (Qinhibit_debugger): New symbol.
2473 (call_debugger): Bind it instead of Qdebug_on_error.
2474 (maybe_call_debugger): Test Vinhibit_debugger.
2475 (syms_of_eval): Define inhibit-debugger.
2476 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
2477 (syms_of_xdisp): Remove inhibit-debug-on-message.
2479 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2481 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
2482 If a nonvolatile local variable is written before a _longjmp to
2483 the frame containing the variable, and is read after the _longjmp,
2484 the value read is indeterminate. Some local variables of type
2485 'struct handler' and 'struct catchtag' are used in this way, so
2486 mark each of their slots as volatile if the slot can be set before
2487 _longjmp and read afterwards.
2488 * lisp.h (struct handler): var and chosen_clause are now volatile.
2489 (struct catchtag): val, next, and pdlcount are now volatile.
2491 * bidi.c (bidi_push_it, bidi_pop_it):
2492 * fns.c (copy_hash_table):
2493 * image.c (define_image_type):
2494 * keyboard.c (kbd_buffer_store_event_hold):
2495 * process.c (Fprocess_send_eof):
2496 * xfaces.c (x_create_gc) [HAVE_NS]:
2497 * xgselect.c (xg_select):
2498 Prefer assignment to memcpy when either will do.
2500 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
2501 Use pointer-to-a-pointer to simplify and avoid a NILP check each
2502 time an item is removed. No need to mark this function 'inline';
2503 the compiler knows better than we do.
2505 2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
2507 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
2508 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
2509 to change_frame_size (Bug#12388).
2510 (windowDidResize:): Pass YES to updateFrameSize.
2512 * nsterm.h: Add delay parameter to updateFrameSize.
2514 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2516 Discard killed buffers from deleted window and frame objects.
2517 This reduces an amount of references to killed buffers and
2518 helps GC to reclaim them faster.
2519 * alloc.c (discard_killed_buffers): New function.
2520 (mark_object): Use it for deleted windows and frames.
2521 (mark_object): If symbol's value is set up for a killed buffer
2522 or deleted frame, restore its global binding.
2523 * data.c (swap_in_global_binding): Add GC notice.
2524 (swap_in_symval_forwarding): Use convenient set_blv_where.
2525 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
2526 * window.h: ... to here.
2528 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2530 Convenient macro to check whether the buffer is live.
2531 * buffer.h (BUFFER_LIVE_P): New macro.
2532 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
2533 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
2535 2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2537 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
2538 composition cases (Bug#12364).
2540 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
2541 overhang of succeeding glyphs overlapping box cursor.
2543 * w32term.c (x_draw_glyph_string): Likewise.
2545 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
2547 Simplify, document, and port floating-point (Bug#12381).
2548 The porting part of this patch fixes bugs on non-IEEE platforms
2549 with frexp, ldexp, logb.
2550 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
2552 * floatfns.c: Simplify discussion of functions that Emacs doesn't
2553 support, by removing commented-out code and briefly listing the
2554 C89 functions excluded. The commented-out stuff was confusing
2555 maintenance, e.g., we thought we needed cbrt but it was commented out.
2556 (logb): Remove decl; no longer needed.
2557 (isfinite): New macro, if not already supplied.
2558 (isnan): Don't replace any existing macro.
2559 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
2560 are present on all C89 platforms.
2561 (Ffrexp): Do not special-case zero, as frexp does the right thing
2563 (Flogb): Do not use logb, as it doesn't have the desired meaning
2564 on hosts that use non-base-2 floating point. Instead, stick with
2565 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
2566 frexp, to avoid getting an unspecified result.
2568 * xdisp.c (Qinhibit_debug_on_message): Now static.
2570 2012-09-10 Jan Djärv <jan.h.d@swipnet.se>
2572 * nsterm.m (ns_update_begin): Set clip path to whole view by using
2573 NSBezierPath (Bug#12131).
2575 2012-09-10 Chong Yidong <cyd@gnu.org>
2577 * fns.c (Fdelq, Fdelete): Doc fix.
2579 2012-09-10 Paul Eggert <eggert@cs.ucla.edu>
2581 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
2582 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
2584 2012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
2586 * lisp.h (make_lisp_ptr): New macro to replace XSET.
2587 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
2590 2012-09-09 Eli Zaretskii <eliz@gnu.org>
2592 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
2593 left fringe if the window has a left margin. This avoids leaving
2594 traces of the cursor because its leftmost pixel is not drawn over.
2596 * dispnew.c (update_window_line): When the left margin area of a
2597 screen line is updated, set the redraw_fringe_bitmaps_p flag of
2598 that screen line. (Bug#12277)
2600 2012-09-09 Paul Eggert <eggert@cs.ucla.edu>
2602 Assume C89 or later for math functions (Bug#12381).
2603 This simplifies the code, and makes it a bit smaller and faster,
2604 and (most important) makes it easier to clean up signal handling
2605 since we can stop worring about floating-point exceptions in
2606 library code. That was a problem before C89, but the problem
2607 went away many years ago on all practical Emacs targets.
2608 * data.c, image.c, lread.c, print.c:
2609 Don't include <math.h>; no longer needed.
2610 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
2611 might be autoconfigured, as that never happens.
2613 * doprnt.c (DBL_MAX_10_EXP):
2614 * print.c (DBL_DIG):
2615 Remove. C89 or later always defines these.
2616 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
2617 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
2618 (arith_error, domain_error, domain_error2):
2619 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
2620 no longer needed -- we simply return what C returns. All uses removed.
2621 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
2623 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
2624 Remove. All uses expanded, as these macros are no longer used
2625 more than once and are now more trouble than they're worth.
2626 (Ftan): Use tan, not sin / cos.
2627 (Flogb): Assume C89 frexp.
2628 (fmod_float): Assume C89 fmod.
2629 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
2630 (init_floatfns): Remove. All uses removed.
2632 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2634 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
2635 compositeToPoint for OSX < 10.6 (Bug#12390).
2637 2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
2639 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
2640 This produces more-accurate results.
2642 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2644 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
2645 changes (Bug#12088).
2647 2012-09-08 Chong Yidong <cyd@gnu.org>
2649 * syntax.c (Fstring_to_syntax): Doc fix.
2651 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
2653 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
2654 in the internal border.
2655 (x_set_window_size): Remove static variables and their usage.
2656 (ns_redraw_scroll_bars): Fix NSTRACE arg.
2657 (ns_after_update_window_line, ns_draw_fringe_bitmap):
2658 Remove fringe/internal border adjustment (Bug#11052).
2659 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
2660 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
2661 (ns_fix_rect_ibw): Remove.
2662 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
2663 (ns_dumpglyphs_box_or_relief): Ditto.
2664 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
2666 (ns_dumpglyphs_image): Ditto.
2667 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
2669 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
2670 their usage. Add fringe_extended_p and its use as in other terms.
2671 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
2672 scroll bar was removed.
2673 (updateFrameSize): New function.
2674 (windowDidResize): Move code to updateFrameSize and call it.
2676 * nsterm.h (EmacsView): Add updateFrameSize.
2678 2012-09-07 Chong Yidong <cyd@gnu.org>
2680 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
2682 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
2684 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2686 More signal-handler cleanup (Bug#12327).
2687 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
2688 Problem introduced when merging patches. Noted by Eli Zaretskii in
2689 <http://bugs.gnu.org/12327#67>.
2690 * floatfns.c: Comment fix.
2691 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
2692 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
2693 and anyway the declaration is harmless even if SIGDANGER is not defined.
2694 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
2695 defined BROKEN_FIONREAD). systty.h formerly did this, but other
2696 source files not surprisingly expected syssignal.h to define, or
2697 not define, SIGIO, and it's cleaner to do it that way, for consistency.
2698 Include <sys/ioctl.h>, for FIONREAD.
2699 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
2700 This eliminates a problem whereby other files mysteriously had
2701 to include "syssignal.h" before including "systty.h" if they
2702 wanted to use "#ifdef SIGIO".
2704 2012-09-07 Eli Zaretskii <eliz@gnu.org>
2706 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
2708 * w32.c (sigemptyset): Empty the set.
2709 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
2711 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
2713 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
2715 * alloc.c (mark_buffer): Revert unsafe marking optimization.
2716 (mark_object): Likewise for frame objects.
2718 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
2720 * syssignal.h (handle_on_main_thread): Always declare,
2721 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
2722 This ports to platforms without HAVE_PTHREAD.
2724 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2726 Signal-handler cleanup (Bug#12327).
2727 Emacs's signal handlers were written in the old 4.2BSD style with
2728 sigblock and sigmask and so forth, and this led to some
2729 inefficiencies and confusion. Rewrite these to use
2730 pthread_sigmask etc. without copying signal sets around. Also,
2731 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
2732 'signal', and instead use functions that do not attempt to take
2733 over the system name space. This patch causes Emacs's text
2734 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
2735 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
2736 Do not include <signal.h> or "syssignal.h", as these
2737 modules do not use signals.
2738 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
2739 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
2740 Do not include <signal.h>, as "syssignal.h" does that for us now.
2741 * atimer.c (sigmask_atimers): New function.
2742 (block_atimers, unblock_atimers): New functions,
2743 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
2745 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
2746 no longer needed here.
2747 * emacs.c (main): Inspect existing signal handler with sigaction,
2748 so that there's no need to block and unblock SIGHUP.
2749 * sysdep.c (struct save_signal): New member 'action', replacing
2750 old member 'handler'.
2751 (save_signal_handlers, restore_signal_handlers):
2752 Use sigaction instead of 'signal' to save and restore.
2753 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
2754 New function. All users of 'signal' modified to use set_sighandler
2755 if they're writeonly, and to use sys_signal if they're read+write.
2756 (emacs_sigaction_init, forwarded_signal): New functions.
2757 (sys_signal): Remove. All uses replaced by calls to sigaction
2758 and emacs_sigaction_init, or by direct calls to 'signal'.
2759 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
2760 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
2761 all uses replaced by pthread_sigmask etc. calls.
2762 * syssignal.h: Include <signal.h>.
2763 (emacs_sigaction_init, forwarded_signal): New decls.
2764 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
2765 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
2766 (sigmask, sys_sigmask): Remove; no longer needed.
2767 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
2768 (sigblock, sigunblock, sigfree):
2769 (sigsetmask) [!defined sigsetmask]:
2770 Remove. All uses replaced by pthread_sigmask.
2771 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
2772 no longer need to be replaced, and its typical old uses
2773 are now done via emacs_sigaction_init and sigaction.
2774 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
2775 (sys_sigdel): Remove; unused.
2776 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
2778 2012-09-06 Eli Zaretskii <eliz@gnu.org>
2780 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
2781 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
2783 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2785 Explicitly mark buffer_defaults and buffer_local_symbols.
2786 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
2787 mark_local_symbols here.
2788 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
2789 since special buffers aren't marked here any more.
2790 (allocate_buffer): Chain new buffer with all_buffers here...
2791 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
2793 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
2794 (syms_of_buffer): Remove staticpro of the above.
2795 (init_buffer_once): Set names for buffer_defaults and
2796 buffer_local_symbols.
2798 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
2800 Use bool for booleans in font-related modules.
2801 * font.c (font_intern_prop, font_style_to_value)
2802 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
2803 (generate_otf_features, font_check_otf_features, font_check_otf)
2804 (font_match_p, font_list_entities, font_at):
2805 * fontset.c (fontset_id_valid_p, reorder_font_vector
2806 (fontset_find_font, Fset_fontset_font)
2807 (face_suitable_for_char_p) [0]:
2808 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
2809 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
2810 (m17n_flt_initialized, ftfont_shape_by_flt):
2811 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
2812 * nsfont.m (nsfont_draw):
2813 * w32font.c (w32font_draw):
2814 * w32term.c (x_draw_glyphless_glyph_string_foreground):
2815 Use bool for booleans.
2816 * font.h: Adjust to above API changes.
2817 (struct font, struct font_driver, struct font_driver_list):
2818 Use bool for booleans.
2819 (struct font): Remove useless member encoding_type.
2821 * fontset.c, xftfont.c: Omit unnecessary static decls.
2823 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
2825 * alloc.c (mark_object): Revert window marking code
2826 since it's unsafe for the Fset_window_configuration.
2828 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2830 Fix race conditions with signal handlers and errno (Bug#12327).
2831 Be more systematic about preserving errno whenever a signal
2832 handler returns, even if it's not in the main thread. Do this by
2833 renaming signal handlers to distinguish between signal delivery
2834 and signal handling. All uses changed.
2835 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
2836 * data.c (deliver_arith_signal): Rename from arith_error.
2837 * dispnew.c (deliver_window_change_signal): Rename from
2838 window_change_signal.
2839 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
2840 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
2841 * keyboard.c (deliver_input_available_signal): Rename from
2842 input_available_signal.
2843 (deliver_user_signal): Rename from handle_user_signal.
2844 (deliver_interrupt_signal): Rename from interrupt_signal.
2845 * process.c (deliver_pipe_signal): Rename from send_process_trap.
2846 (deliver_child_signal): Rename from sigchld_handler.
2847 * atimer.c (handle_alarm_signal):
2848 * data.c (handle_arith_signal):
2849 * dispnew.c (handle_window_change_signal):
2850 * emacs.c (handle_fatal_signal, handle_danger_signal):
2851 * keyboard.c (handle_input_available_signal):
2852 * keyboard.c (handle_user_signal, handle_interrupt_signal):
2853 * process.c (handle_pipe_signal, handle_child_signal):
2854 New functions, with the actual signal-handling code taken from the
2855 original respective signal handlers, sans the sporadic attempts to
2856 preserve errno, since that's now done by handle_on_main_thread.
2857 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
2858 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
2859 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2861 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2862 Move initialization of main_thread to sysdep.c's init_signals.
2863 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
2864 our usage, and simplifies the mainline code.
2865 (record_child_status_change): New static function, as a helper
2866 for handle_child_signal, and with most of the old child handler's
2868 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
2869 (handle_child_signal): Use the above.
2870 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
2871 Moved here from emacs.c.
2872 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
2873 code moved here from emacs.c's main function.
2874 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
2875 replacing the old SIGNAL_THREAD_CHECK. All uses changed.
2876 This lets callers save and restore errno properly.
2878 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2880 Remove redundant or unused things here and there.
2881 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
2882 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
2883 * editfns.c (Fcompare_buffer_substrings): Likewise.
2884 * frame.h (struct terminal, struct font_driver_list):
2885 Remove redundant declarations.
2886 * window.h (Qleft, Qright): Likewise.
2888 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2890 Do not mark objects from deleted buffers, windows and frames.
2891 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
2892 (mark_object): Likewise for windows and frames.
2894 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
2896 * alloc.c (valid_lisp_object_p): Treat killed buffers,
2897 buffer_defaults and buffer_local_symbols as valid objects.
2898 Return special value to denote them.
2900 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
2902 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
2903 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
2904 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
2905 (file_name_absolute_p, Fsubstitute_in_file_name):
2906 (check_executable, check_writable, Ffile_accessible_directory_p)
2907 (Fset_file_selinux_context, Fdefault_file_modes)
2908 (Finsert_file_contents, choose_write_coding_system)
2909 (Fwrite_region, build_annotations, a_write, e_write)
2911 * filelock.c (boot_time_initialized, get_boot_time)
2912 (get_boot_time_1, lock_file_1, within_one_second):
2913 * floatfns.c (in_float):
2914 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
2915 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
2916 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
2917 * lisp.h (struct Lisp_Hash_Table.cmpfn):
2918 * window.c (compare_window_configurations):
2919 Use bool for booleans.
2920 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
2921 (Fdefault_file_modes): Now mode_t, not int, for modes.
2922 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
2923 (internal_delete_file): Now returns void, not a (boolean) int,
2924 since nobody was looking at the return value.
2925 * lisp.h, window.h: Adjust to above API changes.
2927 * xdisp.c (set_message): Simplify and reindent last change.
2929 2012-09-05 Juanma Barranquero <lekktu@gmail.com>
2931 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
2933 2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
2935 * eval.c (call_debugger): Make the function non-static so that we
2936 can call it from set_message.
2938 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
2939 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
2941 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2943 Give more-useful info on a fatal error (Bug#12328).
2944 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
2945 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
2946 of doing the work ourselves.
2947 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
2948 do most of the work.
2949 (fatal_error_backtrace): New function, taken from the guts
2950 of the old fatal_error_signal, but with a new option to output
2952 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
2953 info about the signal than just its number.
2954 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
2955 * sysdep.c: Include <execinfo.h>
2956 (emacs_backtrace): New function, taken partly from the previous
2957 code of the 'die' function.
2958 (emacs_abort): Call fatal_error_backtrace rather than abort.
2960 2012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
2962 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
2963 eager (load-time) macro-expansion.
2964 * lisp.mk (lisp): Add macroexp.
2966 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2968 Simplify redefinition of 'abort' (Bug#12316).
2969 Do not try to redefine the 'abort' function. Instead, redo
2970 the code so that it calls 'emacs_abort' rather than 'abort'.
2971 This removes the need for the NO_ABORT configure-time macro
2972 and makes it easier to change the abort code to do a backtrace.
2973 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
2974 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
2975 Remove; sysdep.c's emacs_abort now takes its place.
2976 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
2977 'abort' changed to use 'emacs_abort'.
2978 * msdos.c (dos_abort) [defined abort]: Remove; not used.
2979 (abort) [!defined abort]: Rename to ...
2980 (emacs_abort): ... new name.
2981 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
2982 the place of the old 'abort' in emacs.c.
2983 * w32.c, w32fns.c (abort): Do not #undef.
2984 * w32.c (emacs_abort): Rename from w32_abort.
2986 2012-09-04 Eli Zaretskii <eliz@gnu.org>
2988 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
2989 offsets[j].dv, since the y axis of the screen coordinates points
2990 down, while the y axis of the font definition coordinates points
2991 up. This fixes display of Arabic diacritics such as KASRA and
2992 KASRATAN. (Bug#11860)
2994 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
2996 Be more systematic about _setjmp vs setjmp.
2997 * alloc.c (test_setjmp, mark_stack):
2998 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
2999 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
3000 (png_load, my_error_exit, jpeg_load):
3001 * process.c (send_process_trap, send_process):
3002 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
3003 The underscored versions are up to 30x faster on some hosts.
3004 Formerly, the code used setjmp+longjmp sometimes and
3005 _setjmp+_longjmp at other times, with no particular reason to
3006 prefer setjmp+longjmp.
3008 2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
3010 Fix minor problem found by static checking.
3011 * buffer.c (Fdelete_all_overlays): Return nil.
3013 2012-09-03 Martin Rudalics <rudalics@gmx.at>
3015 * buffer.c (Fdelete_all_overlays): New function.
3017 2012-09-03 Chong Yidong <cyd@gnu.org>
3019 * gtkutil.c: Add extern decl for Qxft.
3021 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
3023 * emacs.c, eval.c: Use bool for boolean.
3024 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
3025 (malloc_using_checking) [DOUG_LEA_MALLOC]:
3026 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
3027 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
3028 (main, decode_env_path, Fdaemon_initialized):
3029 * eval.c (call_debugger, Finteractive_p, interactive_p):
3030 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
3031 (maybe_call_debugger, Fbacktrace):
3032 * process.c (read_process_output, exec_sentinel):
3033 Use bool for booleans.
3034 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
3035 All callers changed.
3036 * eval.c (interactive_p): Omit always-true boolean argument
3037 EXCLUDE_SUBRS_P. All callers changed.
3038 * dispextern.h, lisp.h: Reflect above API changes.
3039 * firstfile.c (dummy): Use the address of 'main', whose signature
3040 won't change, instead of the address of 'initialize', whose
3041 signature just changed from int to bool.
3042 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
3043 * msdos.c (fatal_error_in_progress): ... from here.
3044 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
3046 (redisplay_internal, unwind_redisplay): Simply clear
3047 REDISPLAYING_P when unwinding, instead of saving its previous,
3048 always-false value and then restoring it.
3050 Clean up some extern decls.
3051 Mostly, this hoists extern decls out of .c files and into .h files.
3052 That way, we're more likely to catch errors if the interfaces change.
3053 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
3054 declare xg_mark_data.
3055 * dispextern.h (x_frame_parm_handlers):
3057 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
3058 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
3059 (Qultra_bold, Qoblique, Qitalic):
3060 Move extern decl here from .c file.
3061 * alloc.c (xg_mark_data) [USE_GTK]:
3063 * eval.c (Qlexical_binding):
3064 * fns.c (time) [!HAVE_UNISTD_H]:
3065 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
3066 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
3067 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
3068 * lread.c (Qinternal_interpreter_environment):
3069 * minibuf.c (Qbuffer):
3070 * process.c (QCfamily, QCfilter):
3071 * widget.c (free_frame_faces):
3072 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
3073 * xfont.c (x_clear_errors):
3074 * xterm.c (x_frame_parm_handlers):
3075 Remove now-redundant extern decls.
3076 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
3077 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
3079 * xfaces.c: Remove unnecessary static decls.
3080 * xterm.c (updating_frame): Remove decl of nonexistent object.
3082 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
3083 when building globals.h, as the objects that are not built on
3084 this host are not needed to compile C files on this host.
3086 2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
3088 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
3090 * frame.h: Add missing prototype for x_wm_set_size_hint.
3092 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
3094 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
3095 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
3096 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
3097 (Fsubstitute_command_keys):
3098 * editfns.c (region_limit, find_field, Fconstrain_to_field)
3099 (save_excursion_save, save_excursion_restore)
3100 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
3101 (format_time_string, general_insert_function)
3102 (make_buffer_string, make_buffer_string_both)
3103 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
3104 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
3105 (copy_text, insert_1, insert_1_both, insert_from_string)
3106 (insert_from_string_before_markers, insert_from_string_1)
3107 (insert_from_buffer, insert_from_buffer_1, replace_range)
3108 (replace_range_2, del_range_1, del_range_byte, del_range_both)
3109 (del_range_2, modify_region):
3110 * intervals.c (intervals_equal, balance_possible_root_interval)
3111 (adjust_intervals_for_insertion, merge_properties_sticky)
3112 (graft_intervals_into_buffer, lookup_char_property)
3113 (adjust_for_invis_intang, set_point_both)
3114 (get_property_and_range, compare_string_intervals)
3115 (set_intervals_multibyte_1, set_intervals_multibyte):
3116 * keyboard.c (decode_timer):
3117 Use bool for boolean.
3118 * intervals.h, lisp.h, systime.h: Reflect above API changes.
3119 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
3121 2012-09-02 Chong Yidong <cyd@gnu.org>
3123 * keymap.c (push_key_description): Print M-TAB as C-M-i
3126 2012-09-02 Juanma Barranquero <lekktu@gmail.com>
3128 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
3129 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
3130 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
3131 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
3132 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
3133 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
3134 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
3136 2012-09-01 Eli Zaretskii <eliz@gnu.org>
3138 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
3139 more than one grapheme cluster passed to the shaper: compute the
3140 offset adjustment values separately for each cluster. (Bug#11860)
3142 * image.c: Restore mistakenly removed inclusion of w32.h. Without
3143 it, GCC doesn't see prototypes of w32_delayed_load, and complains
3144 about implicit conversions from integer to pointer.
3146 2012-09-01 Daniel Colascione <dancol@dancol.org>
3148 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
3149 system used too early.
3151 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
3153 Better seed support for (random).
3154 * emacs.c (main): Call init_random.
3155 * fns.c (Frandom): Set the seed from a string argument, if given.
3156 Remove long-obsolete Gentzel cruft.
3157 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
3158 (init_random): New function.
3160 2012-09-01 Daniel Colascione <dancol@dancol.org>
3162 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
3163 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
3164 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
3165 x_wm_set_size_hint, x_query_colors, x_real_positions,
3166 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
3167 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
3168 all of which have been moved to common code.
3170 * xfaces.c: Include TERM_HEADER instead of listing all possible
3171 window-system headers.
3173 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
3176 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
3177 directly accessing frame internals.
3179 * w32font.h: Include font.h. Define syms_of_w32font and
3182 * process.c: Include TERM_HEADER instead of listing all possible
3183 window-system headers.
3185 * nsterm.h: Remove declarations now in frame.h.
3186 Define FRAME_X_SCREEN, FRAME_X_VISUAL.
3188 * menu.c: Include TERM_HEADER instead of listing all possible
3189 window-system headers.
3191 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
3194 * keyboard.c: Include TERM_HEADER instead of listing all possible
3195 window-system headers.
3197 * image.c: Include TERM_HEADER instead of listing all possible
3198 window-system headers. Declare Vlibrary_cache when compiling for
3201 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
3202 window system declarations.
3204 * frame.h: Move common functions here: set_frame_menubar,
3205 x_set_window_size, x_sync, x_get_focus_frame,
3206 x_set_mouse_position, x_set_mouse_pixel_position,
3207 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
3208 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
3209 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
3210 x_activate_menubar, x_real_positions, x_bitmap_icon,
3211 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
3214 * frame.c: Include TERM_HEADER instead of listing all possible
3215 window-system headers.
3217 * font.c: Include TERM_HEADER instead of listing all possible
3218 window-system headers.
3220 * emacs.c: Include TERM_HEADER.
3222 * dispnew.c: Include TERM_HEADER instead of listing all possible
3223 window-system headers.
3225 * ccl.h: Include character.h.
3227 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
3228 the current window system; include in list of objects to link into
3231 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
3233 Remove mark_ttys function and fix tty_display_info initialization.
3234 * lisp.h (mark_ttys): Remove prototype.
3235 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
3236 to mark_ttys because all possible values of 'top_frame' slot are
3237 the frames which are reachable from Vframe_list.
3238 * term.c (mark_ttys): Remove.
3239 (init_tty): Safely initialize 'top_frame' slot with Qnil.
3241 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
3243 Change struct frame bitfields from unsigned char to unsigned.
3244 * frame.h (struct frame): Change type of 'display_preempted',
3245 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
3246 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
3247 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
3248 bitfields from unsigned char to unsigned.
3250 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
3252 Remove unused member of struct x_output and struct w32_output.
3253 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
3254 * w32term.h (struct w32_output): Likewise.
3256 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
3258 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
3259 does not become zero (Bug#12234).
3261 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
3263 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
3264 for GCC 4.7.1 x86-64.
3266 2012-08-30 Glenn Morris <rgm@gnu.org>
3268 * lread.c (init_lread): For out-of-tree builds, only add the
3269 source directory's site-lisp dir to the load-path if it exists,
3270 consistent with in-tree builds. (Bug#12302)
3272 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
3274 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
3275 button_values to NULL. Call setStykeMask so dialogs get a close button.
3276 (windowShouldClose:): Set window_closed.
3277 (dealloc): New member, free button_values.
3278 (process_dialog:): Make member function. Remove window argument,
3279 replace window with self. Count buttons and allocate and store values
3281 (addButton:value:row:): value is int with the name tag. Call setTag
3282 with tag. Remove return self, declare return value as void.
3283 (addString:row:): Remove return self, declare return value as void.
3284 (addSplit): Remove return self, declare return value as void.
3285 (clicked:): Remove return self, declare return value as void.
3286 Set dialog_return to button_values[seltag]. Code formatting change.
3287 (initFromContents:isQuestion:): Adjust call to process_dialog.
3288 Code formatting change.
3289 (timeout_handler:): Set timer_fired to YES.
3290 (runDialogAt:): Set timer_fired to NO.
3291 Handle click on close button as quit.
3293 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
3294 Add window_closed and button_values. Add void as return value for
3295 add(Button|String|Split). addButton takes int instead of Lisp_Object.
3296 Add process_dialog as new member.
3298 2012-08-28 Eli Zaretskii <eliz@gnu.org>
3300 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
3301 is not one of the heaps we manage. (Bug#12242)
3303 2012-08-28 Glenn Morris <rgm@gnu.org>
3305 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
3307 2012-08-28 Martin Rudalics <rudalics@gmx.at>
3309 * window.c (Fset_window_configuration): Remove handling of
3310 auto-buffer-name window parameter. Install revision of reverted
3313 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3315 Do not allow to set major mode for a dead buffer.
3316 * buffer.c (Fset_buffer_major_mode): Signal an error
3317 if the buffer is dead.
3318 (Fother_buffer, other_buffer_safely): Remove redundant
3321 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3323 Always use set_buffer_if_live to restore original buffer at unwind.
3324 * buffer.h (record_unwind_current_buffer): New function.
3325 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
3326 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
3327 * undo.c, window.c: Adjust users.
3328 * buffer.c (set_buffer_if_live): Fix comment.
3330 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
3332 Fix usage of set_buffer_internal.
3333 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
3334 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
3335 * coding.c (decode_coding): Omit redundant test.
3336 * fileio.c (decide_coding_unwind): Likewise.
3337 * fns.c (secure_hash): Likewise.
3338 * insdel.c (modify_region): Likewise.
3339 * keyboard.c (command_loop_1): Likewise.
3340 * print.c (PRINTFINISH): Likewise.
3341 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
3343 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
3345 * dispnew.c: Use bool for boolean.
3346 (frame_garbaged, display_completed, delayed_size_change)
3347 (fonts_changed_p, add_window_display_history)
3348 (add_frame_display_history, verify_row_hash)
3349 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
3350 (row_equal_p, realloc_glyph_pool)
3351 (allocate_matrices_for_frame_redisplay)
3352 (showing_window_margins_p)
3353 (adjust_frame_glyphs_for_frame_redisplay)
3354 (build_frame_matrix_from_leaf_window, make_current)
3355 (mirrored_line_dance, mirror_line_dance, update_frame)
3356 (update_window_tree, update_single_window)
3357 (check_current_matrix_flags, update_window, update_text_area)
3358 (update_window_line, set_window_update_flags, scrolling_window)
3359 (update_frame_1, scrolling, buffer_posn_from_coords)
3360 (do_pending_window_change, change_frame_size)
3361 (change_frame_size_1, sit_for):
3362 Use bool for boolean.
3363 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
3364 and remove last int (actually boolean) argument, which was always 0.
3365 All callers changed.
3366 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
3367 * dispextern.h (struct composition_it): Use bool for boolean.
3368 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
3369 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
3370 * dired.c (file_name_completion):
3371 Use bool for boolean. (This was missed in an earlier change.)
3373 2012-08-27 Martin Rudalics <rudalics@gmx.at>
3375 * window.c (Fset_window_configuration): Revert first part of
3378 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
3380 * nsterm.h (NSPanel): New class variable dialog_return.
3382 * nsmenu.m (initWithContentRect:styleMask:backing:defer:):
3383 Initialize dialog_return.
3384 (windowShouldClose:): Use stop instead of stopModalWithCode.
3385 (clicked:): Ditto, and also set dialog_return (Bug#12258).
3386 (timeout_handler:): Use stop instead of abortModal. Send a dummy
3388 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
3391 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
3393 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
3394 * composite.c (find_composition, composition_gstring_p)
3395 (composition_reseat_it, find_automatic_composition):
3396 * data.c (let_shadows_buffer_binding_p)
3397 (let_shadows_global_binding_p, set_internal, make_blv)
3398 (Fmake_variable_buffer_local, Fmake_local_variable)
3399 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
3400 (cons_to_signed, arith_driver):
3401 * dbusbind.c (xd_in_read_queued_messages):
3402 * dired.c (directory_files_internal, file_name_completion):
3403 Use bool for booleans.
3404 * dired.c (file_name_completion):
3405 * process.h (fd_callback):
3406 Omit int (actually boolean) argument. It wasn't being used.
3408 * composite.h, lisp.h: Reflect above API changes.
3410 * cmds.c, coding.c: Use bool for booleans.
3411 * cmds.c (move_point, Fself_insert_command):
3412 * coding.h (struct composition status, struct coding_system):
3413 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
3414 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
3415 (emacs_mule_char, decode_coding_emacs_mule)
3416 (encode_coding_emacs_mule, detect_coding_iso_2022)
3417 (decode_coding_iso_2022, encode_invocation_designation)
3418 (encode_designation_at_bol, encode_coding_iso_2022)
3419 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
3420 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
3421 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
3422 (encode_coding_raw_text, detect_coding_charset)
3423 (decode_coding_charset, encode_coding_charset, detect_eol)
3424 (detect_coding, get_translation_table, produce_chars)
3425 (consume_chars, reused_workbuf_in_use)
3426 (make_conversion_work_buffer, code_conversion_save)
3427 (decode_coding_object, encode_coding_object)
3428 (detect_coding_system, char_encodable_p)
3429 (Funencodable_char_position, code_convert_region)
3430 (code_convert_string, code_convert_string_norecord)
3431 (Fset_coding_system_priority):
3432 * fileio.c (Finsert_file_contents):
3433 Use bool for booleans.
3434 * coding.h, lisp.h: Reflect above API changes.
3435 * coding.c: Remove unnecessary static function decls.
3436 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
3437 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
3438 not a boolean 'int', since callers never look at the return value.
3439 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
3440 * coding.h (decoding_buffer_size, encoding_buffer_size)
3441 (emacs_mule_string_char): Remove unused extern decls.
3442 (struct iso_2022_spec, struct coding_system):
3443 Use 'unsigned int : 1' for boolean fields, since there's more than one.
3444 (struct emacs_mule_spec): Remove unused field 'full_support'.
3445 All initializations removed.
3446 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
3448 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3450 Fix spare memory change (Bug#12286).
3451 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
3452 (valid_lisp_object_p): Likewise.
3454 2012-08-27 Martin Rudalics <rudalics@gmx.at>
3456 * window.c (Fset_window_configuration): Record any window's old
3457 buffer if it's replaced (see Bug#8789). If the new current
3458 buffer doesn't appear in the selected window, go to its old
3461 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3463 Special MEM_TYPE_SPARE to denote reserved memory.
3464 * alloc.c (enum mem_type): New memory type.
3465 (refill_memory_reserve): Use new type for spare memory.
3466 This prevents live_cons_p and live_string_p from incorrect
3467 detection of uninitialized objects from spare memory as live.
3469 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
3472 * Makefile.in (.PHONY): versioclean -> versionclean.
3474 Remove unused external symbols.
3475 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
3476 * window.c (Qwindow_valid_p, decode_valid_window):
3477 Now static, not extern.
3478 * data.c (Qinterval): Remove; unused.
3479 (syms_of_data): Do not define 'interval'.
3480 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
3481 * window.h (decode_valid_window):
3484 * character.c, charset.c, chartab.c: Use bool for booleans.
3485 * character.c (lisp_string_width, string_count_byte8)
3486 (string_escape_byte8):
3487 * charset.c (charset_map_loaded, load_charset_map, read_hex):
3488 (load_charset_map_from_file, map_charset_chars)
3489 (Fdefine_charset_internal, define_charset_internal)
3490 (Fdeclare_equiv_charset, find_charsets_in_text)
3491 (Ffind_charset_region, char_charset, Fiso_charset):
3492 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
3493 (sub_char_table_set, sub_char_table_set_range)
3494 (char_table_set_range, optimize_sub_char_table)
3495 (map_sub_char_table):
3496 Use bool for boolean.
3497 * character.c (str_to_unibyte): Omit last boolean argument; it was
3498 always 0. All callers changed.
3499 * character.h, charset.h: Adjust to match previous changes.
3500 * character.h (char_printable_p): Remove decl of nonexistent function.
3501 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
3502 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
3503 are all boolean, so make them single-bit bitfields.
3505 * lisp.h (ASET): Remove attempt to detect side effects.
3506 It was meant to be temporary and it often doesn't work,
3507 because when IDX has side effects the behavior of IDX==IDX
3508 is undefined. See Stefan Monnier in
3509 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
3511 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
3513 * lisp.h (functionp): New function (extracted from Ffunctionp).
3514 (FUNCTIONP): Use it.
3515 * eval.c (Ffunctionp): Use it.
3517 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3519 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
3520 as that's faster and simpler than static storage. Don't bother
3521 with the g_main_context_query overhead if g_main_context_pending
3522 says no events are pending.
3523 (gfds, gfds_size): Remove these static vars.
3524 (xgselect_initialize): Remove; no longer needed.
3525 All uses and decls removed.
3527 * emacs.c (fatal_error_signal_hook): Remove.
3528 All uses removed. This leftover from old code was always 0.
3530 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
3531 * casefiddle.c (casify_object, casify_region):
3532 * casetab.c (set_case_table):
3533 * category.c, category.h (word_boundary_p):
3534 * category.h (CHAR_HAS_CATEGORY):
3535 Use bool for booleans, instead of int.
3537 2012-08-25 Eli Zaretskii <eliz@gnu.org>
3539 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
3541 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
3543 On assertion failure, print backtrace if available.
3544 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
3545 (die) [ENABLE_CHECKING]: Print a backtrace if available.
3546 * Makefile.in (LIB_EXECINFO): New macro.
3549 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
3550 * bytecode.c (exec_byte_code):
3551 * callint.c (check_mark, Fcall_interactively):
3552 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
3553 (getenv_internal, sync_process_alive, call_process_exited):
3554 * lisp.h (USE_SAFE_ALLOCA):
3555 Use bool for booleans, instead of int.
3556 * lisp.h, process.h: Adjust prototypes to match above changes.
3557 * callint.c (Fcall_interactively): Don't assume the mark's
3558 offset fits in 'int'.
3560 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
3562 * buffer.c, buffer.h: Use bool for boolean.
3563 * buffer.c (reset_buffer_local_variables)
3564 (buffer_lisp_local_variables, Fset_buffer_modified_p)
3565 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
3566 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
3567 (overlay_touches_p, overlay_strings, Foverlay_put)
3568 (report_overlay_modification, call_overlay_mod_hooks):
3569 (mmap_enlarge, mmap_set_vars):
3570 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
3571 Use bool for booleans, instead of int.
3572 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
3573 since the 1-or-0 return value is always ignored anyway.
3574 (mmap_initialized_p):
3575 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
3576 * buffer.h, lisp.h: Adjust prototypes to match above changes.
3578 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3580 * bidi.c: Use bool for boolean.
3581 This is a bit more readable, and makes the text segment of bidi.o
3582 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
3583 Presumably it's faster too.
3584 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
3586 (bidi_cache_find_level_change, bidi_cache_iterator_state)
3587 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
3588 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
3589 (bidi_explicit_dir_char, bidi_level_of_next_char)
3590 (bidi_find_other_level_edge, bidi_move_to_visually_next):
3591 Use bool for booleans, instead of int.
3592 * dispextern.h (bidi_init_it, bidi_paragraph_init)
3593 (bidi_unshelve_cache): Adjust decls to match code.
3595 2012-08-23 Martin Rudalics <rudalics@gmx.at>
3597 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
3600 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
3602 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
3603 * atimer.h: Include <stdbool.h>.
3605 2012-08-22 Dan Nicolaescu <dann@gnu.org>
3607 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
3608 compile time tests instead of run time tests on systems that do
3610 (FRAME_MAC_P): Remove leftover from deleted code.
3611 * frame.c (syms_of_frame): Remove leftover from deleted code.
3613 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
3615 * nsterm.m (insertText:): Don't clear modifiers if code is space.
3617 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
3619 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
3620 Otherwise, the compiler complains about (A?B:C) where B is void
3621 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
3622 (fontset_add): Return void, for FONTSET_ADD.
3624 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3626 * alloc.c: Use bool for booleans.
3627 (gc_in_progress, abort_on_gc)
3628 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3629 (dont_register_blocks) [GC_MALLOC_CHECK]:
3630 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
3631 (check_string_bytes, make_specified_string, memory_full)
3632 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
3633 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
3634 (mark_stack, valid_pointer_p, make_pure_string)
3635 (Fgarbage_collect, survives_gc_p, gc_sweep):
3636 Use bool for booleans, instead of int.
3637 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
3638 Remove unused local.
3639 * alloc.c (PURE_POINTER_P):
3640 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
3641 * editfns.c (Fformat):
3642 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
3644 * fns.c (sweep_weak_table):
3645 * lisp.h (suppress_checking, push_message, survives_gc_p)
3646 (make_pure_string, gc_in_progress, abort_on_gc):
3647 * lread.c (readchar, read1):
3648 * print.c (Fprin1_to_string):
3649 * xdisp.c (push_message):
3650 Use bool for booleans affected directly or indirectly by
3653 Make recently-introduced setters macros.
3654 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
3655 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
3656 (set_fontset_default, set_fontset_fallback): Rename from their
3657 upper-case counterparts, and make them functions rather than macros.
3658 This is more consistent with the other recently-introduced setters.
3659 These don't need to be inline, since they're local.
3661 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
3663 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
3664 the loop (Bug#12247).
3666 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3668 * lisp.h (vcopy): Use memcpy rather than our own loop.
3669 This fixes a performance regression introduced by the recent
3670 addition of vcopy. This means 'vcopy' will need to be modified
3671 for a copying collector, but that's OK. Also, tighten the
3672 checking in the assertion.
3674 2012-08-21 Eli Zaretskii <eliz@gnu.org>
3676 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
3677 components for RTL text (Bug#11860). Adjust X-OFFSET of each
3678 non-base glyph for the width of the base character, according to
3679 what x_draw_composite_glyph_string_foreground expects.
3680 Generate WADJUST value according to composition_gstring_width's
3681 expectations, to produce correct width of the composed character.
3682 Reverse the sign of the DU offset produced by ScriptPlace.
3684 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
3686 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
3688 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3690 Avoid direct writes to contents member of struct Lisp_Vector.
3691 * lisp.h (vcopy): New function to copy data into vector.
3692 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
3693 * fns.c (Ffillarray): Use ASET.
3694 * keyboard.c (timer_check_2): Use AREF and ASET.
3695 (append_tool_bar_item, Frecent_keys): Use vcopy.
3696 * lread.c (read_vector): Use ASET.
3697 * msdos.c (Frecent_doskeys): Use vcopy.
3698 * xface.c (Finternal_copy_lisp_face): Use vcopy.
3699 (Finternal_merge_in_global_face): Use ASET and vcopy.
3700 * xfont.c (xfont_list_pattern): Likewise.
3702 2012-08-21 Martin Rudalics <rudalics@gmx.at>
3704 * window.c (Fwindow_point): For the selected window always return
3705 the position of its buffer's point.
3706 (Fset_window_point): For the selected window always go in its
3707 buffer to the specified position.
3709 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
3711 Setter macros for fontsets.
3712 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
3713 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
3714 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
3717 2012-08-20 Glenn Morris <rgm@gnu.org>
3719 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
3720 Don't assume that `ln -f' works.
3722 2012-08-20 Eli Zaretskii <eliz@gnu.org>
3724 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
3725 and later about non-assignments with no effect. See discussion at
3726 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
3729 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3731 Inline setter functions for Lisp_Objects slots of struct specbinding.
3732 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
3735 2012-08-20 Martin Rudalics <rudalics@gmx.at>
3737 * window.c (select_window): Always make selected window's buffer
3740 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3742 Use AREF and ASET for docstrings of category tables.
3743 * category.h (CATEGORY_DOCSTRING): Use AREF.
3744 (SET_CATEGORY_DOCSTRING): Use ASET.
3745 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
3747 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3749 Inline setter functions for hash table members.
3750 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
3751 (set_hash_hash, set_hash_index): Rename with _slot suffix.
3752 (set_hash_key_and_value, set_hash_index, set_hash_next)
3753 (set_hash_hash): New functions.
3754 * charset.c, fns.c: Adjust users.
3756 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
3758 Inline getter and setter functions for per-buffer values.
3759 * buffer.h (per_buffer_default, set_per_buffer_default)
3760 (per_buffer_value, set_per_buffer_value): New functions.
3761 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
3762 * buffer.c, data.c: Adjust users.
3764 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
3766 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
3768 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
3770 Rely on <config.h> + <unistd.h> to declare 'environ',
3771 as gnulib does this if the system doesn't.
3772 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
3773 Remove declaration. MS-Windows declares it on stdlib.h which is
3774 included by conf_post.h.
3775 * emacs.c (environ) [DOUG_LEA_MALLOC]:
3776 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
3777 * vm-limit.c: Include <unistd.h>, for 'environ'.
3779 * unexaix.c, unexcoff.c: Include "mem-limits.h".
3780 (start_of_data): Remove decl; mem-limits.h provides it.
3782 * xdisp.c (handle_invisible_prop): Make it a bit faster
3783 and avoid a gcc -Wmaybe-uninitialized diagnostic.
3785 2012-08-19 Chong Yidong <cyd@gnu.org>
3787 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
3790 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
3792 * .gdbinit: Use call instead of set when calling a function in the
3795 * data.c (set_internal): Don't use set_blv_found.
3796 (Fkill_local_variable): Likewise.
3798 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
3800 * nsfont.m (ns_ascii_average_width): Ensure the string
3801 ascii_printable is initialized with a null-terminated character
3802 array. Otherwise, it can contain undesired extra characters.
3804 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3806 port new setting code to Sun C 5.8 2005/10/13
3807 * chartab.c, lisp.h (char_table_set, char_table_set_range):
3808 Return void, not Lisp_Object. Otherwise, the compiler
3809 complains about (A?B:C) where B is void and C is Lisp_Object
3810 when compiling CHAR_TABLE_SET, due to the recent change to
3811 the API of sub_char_table_set_contents.
3813 2012-08-18 Chong Yidong <cyd@gnu.org>
3815 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
3816 for the string case (Bug#3874).
3818 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
3820 * buffer.h (BSET): Remove (Bug#12215).
3821 Replace all uses with calls to new setter functions.
3822 (bset_bidi_paragraph_direction, bset_case_canon_table)
3823 (bset_case_eqv_table, bset_directory, bset_display_count)
3824 (bset_display_time, bset_downcase_table)
3825 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
3826 (bset_last_selected_window, bset_local_var_alist)
3827 (bset_mark_active, bset_point_before_scroll, bset_read_only)
3828 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
3830 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
3831 (bset_auto_fill_function, bset_auto_save_file_format)
3832 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
3833 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
3834 (bset_cache_long_line_scans, bset_case_fold_search)
3835 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
3836 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
3837 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
3838 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
3839 (bset_header_line_format, bset_indicate_buffer_boundaries)
3840 (bset_indicate_empty_lines, bset_invisibility_spec)
3841 (bset_left_fringe_width, bset_major_mode, bset_mark)
3842 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
3843 (bset_name, bset_overwrite_mode, bset_pt_marker)
3844 (bset_right_fringe_width, bset_save_length)
3845 (bset_scroll_bar_width, bset_scroll_down_aggressively)
3846 (bset_scroll_up_aggressively, bset_selective_display)
3847 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
3848 (bset_word_wrap, bset_zv_marker):
3849 * category.c (bset_category_table):
3850 * syntax.c (bset_syntax_table):
3851 New setter functions.
3853 * process.h (PSET): Remove (Bug#12215).
3854 Replace all uses with calls to new setter functions.
3855 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3856 (PROCESS_INLINE): New macro.
3857 (pset_childp): New setter function.
3858 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
3859 * process.c (PROCESS_INLINE):
3860 Define to EXTERN_INLINE, so that the corresponding functions
3861 are compiled into code.
3862 (pset_buffer, pset_command, pset_decode_coding_system)
3863 (pset_decoding_buf, pset_encode_coding_system)
3864 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
3865 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
3866 (pset_type, pset_write_queue): New setter functions.
3868 * window.h (WSET): Remove (Bug#12215).
3869 Replace all uses with calls to new setter functions.
3870 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3871 (WINDOW_INLINE): New macro.
3872 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
3873 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
3874 (wset_total_lines, wset_vertical_scroll_bar)
3875 (wset_window_end_pos, wset_window_end_valid)
3876 (wset_window_end_vpos): New setter functions.
3877 * window.c (WINDOW_INLINE):
3878 Define to EXTERN_INLINE, so that the corresponding functions
3879 are compiled into code.
3880 (wset_combination_limit, wset_dedicated, wset_display_table)
3881 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
3882 (wset_new_normal, wset_new_total, wset_next_buffers)
3883 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
3884 (wset_prev_buffers, wset_right_fringe_width)
3885 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
3886 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
3887 (wset_window_parameters):
3888 * xdisp.c (wset_base_line_number, wset_base_line_pos)
3889 (wset_column_number_displayed, wset_region_showing):
3890 New setter functions.
3892 * termhooks.h (TSET): Remove (Bug#12215).
3893 Replace all uses with calls to new setter functions.
3894 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3895 (TERMHOOKS_INLINE): New macro.
3896 (tset_charset_list, tset_selection_alist): New setter functions.
3897 * terminal.c (TERMHOOKS_INLINE):
3898 Define to EXTERN_INLINE, so that the corresponding functions
3899 are compiled into code.
3900 (tset_param_alist): New setter function.
3902 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3904 * keyboard.h (KSET): Remove (Bug#12215).
3905 Replace all uses with calls to new setter functions.
3906 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3907 (KEYBOARD_INLINE): New macro.
3908 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
3909 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
3910 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
3911 New setter functions.
3912 * keyboard.c (KEYBOARD_INLINE):
3913 Define to EXTERN_INLINE, so that the corresponding functions
3914 are compiled into code.
3915 (kset_echo_string, kset_kbd_queue)
3916 (kset_keyboard_translate_table, kset_last_prefix_arg)
3917 (kset_last_repeatable_command, kset_local_function_key_map)
3918 (kset_overriding_terminal_local_map, kset_real_last_command)
3919 (kset_system_key_syms): New setter functions.
3921 * frame.h (FSET): Remove (Bug#12215).
3922 Replace all uses with calls to new setter functions.
3923 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
3924 (FRAME_INLINE): New macro.
3925 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
3926 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
3927 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
3928 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
3929 (fset_param_alist, fset_root_window, fset_scroll_bars)
3930 (fset_selected_window, fset_title, fset_tool_bar_items)
3931 (fset_tool_bar_position, fset_tool_bar_window): New functions.
3932 * frame.c (FRAME_INLINE):
3933 Define to EXTERN_INLINE, so that the corresponding functions
3934 are compiled into code.
3935 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
3937 A few more naming-convention fixes for getters and setters.
3938 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
3939 and rename from buffer_overlays_set_before.
3940 (set_buffer_overlays_after): Move here from buffer.h, and rename
3941 from buffer_overlays_set_after.
3942 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
3944 (set_buffer_intervals): Rename from buffer_set_intervals.
3945 * intervals.c (set_interval_object): Move here from intervals.h,
3946 and rename from interval_set_object.
3947 (set_interval_left): Move here from intervals.h, and rename from
3949 (set_interval_right): Move here from intervals.h, and rename from
3951 (copy_interval_parent): Move here from intervals.h, and rename from
3952 interval_copy_parent.
3953 * intervals.h (set_interval_parent): Rename from interval_set_parent.
3954 (set_interval_plist): Rename from interval_set_plist.
3955 Return void, not Lisp_Object, since no caller uses the result.
3956 * lisp.h (string_intervals): Rename from string_get_intervals.
3957 (set_string_intervals): Rename from string_set_intervals.
3959 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
3960 (set_char_table_contents): Rename from char_table_set_contents.
3961 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
3962 All uses changed. See the end of
3963 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
3965 * lisp.h (CSET): Remove (Bug#12215).
3966 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
3967 (set_char_table_purpose): New functions,
3968 replacing CSET. All uses changed. For example, replace
3969 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
3970 "set_char_table_parent (char_table, parent);".
3971 The old version was confusing because it used the same name
3972 'parent' for two different things.
3974 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3976 Functions to get and set Lisp_Object fields of buffer-local variables.
3977 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
3978 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
3979 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
3980 * data.c, eval.c, frame.c: Adjust users.
3982 2012-08-17 Chong Yidong <cyd@gnu.org>
3984 * xfaces.c (merge_face_vectors): If the target font specfies a
3985 font spec, make the font's attributes take precedence over
3986 directly-specified attributes.
3987 (merge_face_ref): Recognize :font.
3989 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
3991 Do not use memcpy for copying intervals.
3992 * intervals.c (reproduce_interval): New function.
3993 (reproduce_tree, reproduce_tree_obj): Use it.
3994 (reproduce_tree_obj): Remove prototype.
3996 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
3998 * lisp.h (duration_to_sec_usec): Remove unused decl.
4000 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
4002 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
4003 to an allocated instance of NSString, not to the class itself.
4005 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
4007 * makefile.w32-in (C_CTYPE_H): New macro.
4008 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
4009 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
4010 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
4012 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
4014 Use ASCII tests for character types.
4015 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
4017 Don't include <ctype.h>; was not needed.
4018 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
4019 * sysdep.c, xfaces.c:
4020 Include <c-ctype.h> instead of <ctype.h>.
4021 * nsterm.m: Include <c-ctype.h>.
4022 * charset.c (read_hex):
4023 * doc.c (Fsnarf_documentation):
4024 * fileio.c (IS_DRIVE) [WINDOWSNT]:
4025 (DRIVE_LETTER) [DOS_NT]:
4026 (Ffile_name_directory, Fexpand_file_name)
4027 (Fsubstitute_in_file_name):
4028 * font.c (font_parse_xlfd, font_parse_fcname):
4029 * frame.c (x_set_font_backend):
4030 * gtkutil.c (xg_get_font):
4031 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
4032 * nsimage.m (hexchar):
4033 * nsterm.m (ns_xlfd_to_fontname):
4034 * sysdep.c (system_process_attributes):
4035 * xfaces.c (hash_string_case_insensitive):
4036 Use C-locale tests instead of locale-specific tests for character
4037 types, since we want the ASCII interpretation here, not the
4038 interpretation suitable for whatever happens to be the current locale.
4040 2012-08-16 Martin Rudalics <rudalics@gmx.at>
4042 Consistently check windows for validity/liveness
4043 (Bug#11984, Bug#12025, Bug#12026).
4044 * lisp.h (CHECK_VALID_WINDOW): New macro.
4045 * window.c (decode_window): Rename to decode_live_window.
4046 (decode_valid_window, Fwindow_valid_p): New functions.
4047 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
4048 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
4049 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
4050 (Fwindow_prev_sibling, Fwindow_combination_limit)
4051 (Fset_window_combination_limit, Fwindow_use_time)
4052 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
4053 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
4054 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
4055 (Fwindow_hscroll, Fset_window_hscroll)
4056 (Fwindow_redisplay_end_trigger)
4057 (Fset_window_redisplay_end_trigger, Fwindow_edges)
4058 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
4059 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
4060 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
4061 (Fwindow_end, Fset_window_point, Fset_window_start)
4062 (Fpos_visible_in_window_p, Fwindow_line_height)
4063 (Fwindow_dedicated_p, Fset_window_dedicated_p)
4064 (Fwindow_prev_buffers, Fset_window_prev_buffers)
4065 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
4066 (Fset_window_parameter, Fwindow_display_table)
4067 (Fset_window_display_table, Fdelete_other_windows_internal)
4068 (Fset_window_buffer, Fset_window_new_total)
4069 (Fset_window_new_normal, Fdelete_window_internal)
4070 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
4071 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
4072 (Fwindow_scroll_bars): Check whether argument window is a valid or
4073 live window. Update doc-strings.
4074 (syms_of_window): New symbol Qwindow_valid_p.
4075 * keyboard.c (Fposn_at_x_y): Check whether argument
4076 frame_or_window denotes a valid window.
4078 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
4080 Fix previous char table change.
4081 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
4082 * chartab.c (optimize_sub_char_table): Likewise.
4084 2012-08-16 Chong Yidong <cyd@gnu.org>
4086 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
4088 * xfont.c (xfont_open):
4089 * xftfont.c (xftfont_open): Set the font's max_width field.
4091 * nsfont.m (nsfont_open): Similar to the Xft backend, set
4092 min_width to space_width and average_width to the average over
4093 printable ASCII characters.
4094 (ns_char_width): Code cleanup.
4095 (ns_ascii_average_width): New utility function.
4097 * font.h (struct font): Update comments.
4099 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
4101 Simple interface to set Lisp_Object fields of character tables.
4102 * lisp.h (CSET): New macro.
4103 (char_table_set_extras, char_table_set_contents)
4104 (sub_char_table_set_contents): New function.
4105 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
4106 * syntax.c: Adjust users.
4108 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
4110 * eval.c (eval_sub): Bind lexical-binding.
4111 * lread.c (Qlexical_binding): Make non-static.
4113 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
4115 * nsmenu.m (popupSession): Remove.
4116 (pop_down_menu): Remove endModalSession.
4117 (timeout_handler:): New method.
4118 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
4119 Call runModalForWindow. Check timer_fired when it returns.
4120 If not set, cancel timer and break out of loop.
4121 Otherwise loop again, with a new timeout.
4123 * nsterm.m: Include fcntl.h if present.
4124 (fd_entry, t_readfds, inNsSelect): Remove.
4125 (select_writefds, select_valid, select_timeout, selfds)
4126 (select_mutex, apploopnr): Add.
4127 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
4128 Otherwise call kbd_buffer_store_event.
4129 (ns_send_appdefined): Remove release of fd_entry.
4130 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
4131 Increment and decrement apploopnr.
4132 (ns_select): If no file descriptors, just do a NSTimer.
4133 Otherwise copy read/write masks and start select thread (fd_handler).
4134 Start main loop and wait for application defined event.
4135 Inform select thread to stop selecting after main loop is exited.
4136 (ns_term_init): Create selfds pipe and set non-blocking.
4137 Initialize select_mutex. Start the select thread (fd_handler).
4138 (fd_handler:): Loop forever, wait for info from the main thread
4139 to either start or stop selecting. When select returns, send
4140 and appdefined event.
4141 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
4142 If not call kbd_buffer_store_event.
4144 * nsterm.h (EmacsApp): fd_handler takes id argument.
4145 (EmacsDialogPanel): Add timer_fired and timeout_handler.
4147 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
4149 2012-08-15 Eli Zaretskii <eliz@gnu.org>
4151 * region-cache.c (move_cache_gap): Update gap_len using the actual
4152 growth of the boundaries array. Do not change cache_len.
4155 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
4157 Generalize and cleanup font subsystem checks.
4158 * font.h (FONT_DEBUG, font_assert): Remove.
4159 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
4160 Change font_assert to eassert. Use eassert where appropriate.
4162 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
4164 * gtkutil.c (xg_get_font): Use pango_units_to_double.
4166 2012-08-15 Chong Yidong <cyd@gnu.org>
4168 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
4169 When using the new font chooser, use gtk_font_chooser_get_font_desc to
4170 extract the font descriptor instead of just the font name.
4171 In that case, return a font spec instead of a string.
4172 (x_last_font_name): Move to this file from xfns.c.
4174 * xfns.c (Fx_select_font): The return value can also be a font
4175 spec. Move x_last_font_name management to gtkutil.c.
4177 * xfaces.c: Make font weight and style symbols non-static.
4179 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
4181 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
4184 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
4186 * alloc.c (Fgarbage_collect): Use plural form consistently.
4188 2012-08-14 Eli Zaretskii <eliz@gnu.org>
4190 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
4191 iteration through the command loop. Fixes a problem whereby mouse
4192 movements are ignored until the first mouse click.
4194 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
4196 Use bool, not int, for Lisp booleans.
4197 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
4198 makes Emacs a bit smaller and presumably a bit faster.
4199 * lisp.h: Include <stdbool.h>.
4200 (struct Lisp_Boolfwd, defvar_bool):
4201 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
4202 * regex.c [!emacs]: Include <stdbool.h>.
4203 (false, true): Remove; <stdbool.h> does this for us now.
4205 2012-08-14 Chong Yidong <cyd@gnu.org>
4207 * character.c (Fcharacterp): Doc fix (Bug#12076).
4209 * data.c (Findirect_variable): Doc fix (Bug#11040).
4211 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
4213 * editfns.c (Fformat): Doc fix (Bug#12059).
4214 (Fsave_current_buffer): Doc fix (Bug#11542).
4216 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
4218 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
4221 2012-08-14 Martin Rudalics <rudalics@gmx.at>
4223 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
4224 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
4225 * minibuf.c (choose_minibuf_frame, read_minibuf):
4226 * w32fns.c (x_create_tip_frame):
4227 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
4228 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
4230 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
4232 * intervals.c (offset_intervals): Remove obsolete comment.
4234 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
4236 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
4238 2012-08-14 Gergely Risko <gergely@risko.hu>
4240 * coding.c (decode_coding): Record buffer modification before
4241 disabling undo_list (Bug#11773).
4243 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
4245 Revert and cleanup some recent overlay changes.
4246 * buffer.h (enum overlay_type): Remove.
4247 (buffer_get_overlays, buffer_set_overlays): Likewise.
4248 (buffer_set_overlays_before, buffer_set_overlays_after):
4249 New function. Adjust users.
4250 (unchain_both): Add eassert.
4252 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
4254 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
4256 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
4258 * gtkutil.c (xg_mark_data): Don't assume C99.
4260 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
4262 * gtkutil.c (xg_frame_tb_info): New struct.
4263 (TB_INFO_KEY): New define.
4264 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
4265 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
4266 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
4268 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
4269 is up to date. Otherwise store new data.
4270 (free_frame_tool_bar): Free xg_frame_tb_info if present.
4272 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
4274 Use KSET for write access to Lisp_Object members of struct kboard.
4275 * keyboard.h (KSET): New macro.
4276 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
4277 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
4278 * xterm.c: Adjust users.
4280 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
4282 Use BSET for write access to Lisp_Object members of struct buffer.
4283 * buffer.h (BSET): New macro.
4284 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
4285 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
4286 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
4287 * window.c, xdisp.c, xfns.c: Adjust users.
4289 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
4291 * lread.c (syms_of_lread): Initialize Vlexical_binding.
4293 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
4295 * nsterm.m (not_in_argv): New function.
4296 (application:openFile, application:openTempFile:):
4297 (application:openFileWithoutUI:, application:openFiles:): Open file
4298 if not_in_argv returns non-zero (bug#12171).
4300 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
4301 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
4302 Define for Gtk+ versions less than 3.2.
4303 (xg_get_font_name): Use those functions/macros here.
4304 Reported by Frans Oilinki <moilinki@gmail.com>.
4306 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
4308 * unexmacosx.c (copy_data_segment): Copy initialized data in
4309 statically linked libraries from input file rather than memory.
4311 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
4312 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
4313 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
4315 2012-08-10 Glenn Morris <rgm@gnu.org>
4317 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
4318 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
4320 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4322 Fix last change to allow compilation with low optimization levels.
4323 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
4324 Reported by Jan Djärv <jan.h.d@swipnet.se>.
4326 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4328 Use common inline syntax in intervals.h.
4329 * intervals.h (INTERVALS_INLINE): New macro.
4330 Change all users from LISP_INLINE.
4332 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4334 Define Qnone once for all platforms.
4335 * frame.c (Qnone): Define here.
4336 (syms_of_frame): DEFSYM it.
4337 * lisp.h (Qnone): New declaration.
4338 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
4339 * xfns.c: Remove duplication. Adjust users.
4341 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
4343 Remove unused macros from intervals.h.
4344 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
4345 * intervals.c: Adjust comment.
4347 2012-08-10 Eli Zaretskii <eliz@gnu.org>
4349 * w32fns.c <w32_unicode_gui>: New static variable.
4350 (globals_of_w32fns): Initialize it according to os_subtype.
4351 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
4354 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
4355 Eli Zaretskii <eliz@gnu.org>
4357 Fix bug #10299 with Unicode characters sent by customized
4358 keyboards created by MSKLC.
4359 * w32fns.c (INIT_WINDOW_CLASS): New macro.
4360 (w32_init_class): Use it to initialize the Emacs class with either
4361 ANSI or Unicode API calls.
4362 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
4364 (w32_wnd_proc): If the character code sent by WM_CHAR or
4365 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
4366 original message. Call DefWindowProcW on NT and later.
4368 2012-08-10 Glenn Morris <rgm@gnu.org>
4370 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
4372 * lisp.h (DIRECTORY_SEP): Let configure set it.
4374 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
4376 Use TSET for write access to Lisp_Object slots of struct terminal.
4377 * termhooks.h (TSET): New macro.
4378 * coding.c, terminal.c, xselect.c: Adjust users.
4380 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
4382 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
4383 the failing expression, include them in the error message.
4384 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
4385 * lisp.h (internal_condition_case_n): Update declaration.
4387 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4389 Inline functions to examine and change buffer overlays.
4390 * buffer.c (unchain_both): New function.
4391 * buffer.h (buffer_get_overlays, buffer_set_overlays):
4392 (buffer_has_overlays): New function.
4393 (enum overlay_type): New enum.
4394 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
4395 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
4397 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4399 Inline functions to examine and change buffer intervals.
4400 * alloc.c (mark_interval_tree): Remove.
4401 (MARK_INTERVAL_TREE): Simplify.
4402 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
4403 * intervals.c (buffer_balance_intervals): New function.
4404 (graft_intervals_into_buffer): Adjust indentation.
4405 (set_intervals_multibyte): Simplify.
4406 * buffer.h (BUF_INTERVALS): Remove.
4407 (buffer_get_intervals, buffer_set_intervals): New function.
4408 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
4409 * intervals.c, textprop.c: Adjust users.
4411 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4413 Inline functions to examine and change string intervals.
4414 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
4415 (string_get_intervals, string_set_intervals): New function.
4416 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
4417 * lread.c, print.c, textprop.c: Adjust users.
4419 2012-08-08 Glenn Morris <rgm@gnu.org>
4421 * lisp.mk (lisp): Remove language/persian.elc.
4423 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4426 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
4427 (NULL_INTERVAL_P): Likewise. Adjust users.
4428 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
4429 Adjust comment. Move under #if 0.
4430 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
4431 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
4433 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
4435 Check total length of intervals with eassert.
4436 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
4437 * intervals.c: Change all users to eassert.
4439 2012-08-07 Eli Zaretskii <eliz@gnu.org>
4441 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
4442 Rename fields to match removal of FGET and WGET and disuse of
4443 INTERNAL_FIELD in Lisp_Cons.
4445 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4447 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
4448 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
4449 name since all xname users are fixed long time ago. Do not
4451 (set_symbol_name, set_symbol_function, set_symbol_plist):
4452 (set_symbol_next, set_overlay_plist): New function.
4453 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
4454 (struct Lisp_Overlay): Likewise.
4455 (CVAR, MVAR, SVAR): Remove.
4456 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
4457 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
4458 * xterm.c: Adjust users.
4459 * .gdbinit: Change to use name field of struct Lisp_Symbol
4462 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4464 Basic functions to set Lisp_Object and pointer slots of intervals.
4465 * intervals.h (interval_set_parent, interval_set_object):
4466 (interval_set_left, interval_set_right, interval_set_plist):
4467 (interval_copy_parent): New function.
4468 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
4469 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
4471 (INTERVAL_SIZE): Remove. Adjust users.
4472 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
4474 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4476 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
4477 * process.h (PGET): Remove.
4478 (struct Lisp_Process): Do not use INTERNAL_FIELD.
4479 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
4481 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4483 Drop WGET and revert read access to Lisp_Objects slots of struct window.
4484 * window.h (WGET): Remove.
4485 (struct window): Do not use INTERNAL_FIELD.
4486 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4487 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4488 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
4489 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
4490 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
4493 2012-08-07 Chong Yidong <cyd@gnu.org>
4495 * window.c (Fwindow_edges, Fwindow_pixel_edges)
4496 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
4497 (Fdelete_window_internal): Signal an error if the window is not on
4498 a live frame (Bug#12025).
4500 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
4502 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
4503 * frame.h (FGET): Remove.
4504 (struct frame): Do not use INTERNAL_FIELD.
4505 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4506 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4507 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4508 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4510 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
4512 * w32.c: Silence compiler warnings.
4513 (map_w32_filename): Remove unused variable `is_fat'.
4514 (chase_symlinks): Add parentheses around expression.
4516 2012-08-06 Glenn Morris <rgm@gnu.org>
4518 * sysdep.c: Respect BROKEN_GETWD.
4520 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
4521 Let configure handle it.
4522 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
4524 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4526 Use GCALIGNMENT where appropriate.
4527 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
4528 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
4529 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
4531 2012-08-06 Eli Zaretskii <eliz@gnu.org>
4533 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
4534 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
4536 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
4538 * buffer.h (struct buffer): Revert `indirections' to a simple int;
4539 that should be sufficient for everyone.
4541 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4543 * keyboard.c (timer_check_2): Add break so timer_check returns next
4546 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4548 Fix Windows build errors introduced after converting to WGET and WSET.
4549 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
4550 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4552 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
4554 * nsterm.m (ns_frame_rehighlight): Use FSET.
4556 * nsmenu.m (ns_update_menubar): Use FSET.
4558 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4560 Separate read and write access to Lisp_Object slots of Lisp_Process.
4561 * process.h (PGET, PSET): New macros similar to AREF and ASET.
4562 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
4564 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4566 Separate read and write access to Lisp_Object slots of struct window.
4567 * window.h (WGET, WSET): New macros similar to AREF and ASET.
4568 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4569 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4570 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
4571 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
4572 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
4575 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4577 Fix Windows build errors introduced after converting to FGET and FSET.
4578 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
4579 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
4580 (w32_judge_scroll_bars): Change to use FSET.
4581 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
4583 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4585 Fix replacement typo.
4586 * window.c (replace_window): Set root_window instead of
4587 selected_window. This fixes a total window subsystem
4588 malfunction reported by Bastien Guerry <bzg@gnu.org>.
4590 2012-08-06 Glenn Morris <rgm@gnu.org>
4592 * lisp.mk (lisp): Add language/persian.elc.
4594 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
4596 Separate read and write access to Lisp_Object slots of struct frame.
4597 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
4598 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
4599 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
4600 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4601 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
4603 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
4605 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
4607 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
4609 Generalize common compile-time constants.
4610 * lisp.h (header_size, bool_header_size, word_size): Now here.
4611 (struct Lisp_Vector): Add comment.
4612 (struct Lisp_Bool_Vector): Move up to define handy constants.
4613 (VECSIZE, PSEUDOVECSIZE): Simplify.
4614 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
4615 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
4616 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
4617 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
4618 * xfont.c, xmenu.c: Use word_size where appropriate.
4620 2012-08-05 Lawrence Mitchell <wence@gmx.li>
4622 * search.c (Freplace_match): Treat \? in the replacement text
4623 literally (Bug#8161).
4625 2012-08-05 Chong Yidong <cyd@gnu.org>
4627 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
4628 * frame.c (Vdelete_frame_functions):
4629 * emacs.c (Vkill_emacs_hook): Doc fix.
4631 2012-08-04 Eli Zaretskii <eliz@gnu.org>
4633 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
4634 --with-x-toolkit=no builds.
4635 Reported by Carsten Mattner <carstenmattner@gmail.com>.
4637 2012-08-04 Chong Yidong <cyd@gnu.org>
4639 * syntax.c (Fmodify_syntax_entry): Doc fix.
4641 2012-08-04 Eli Zaretskii <eliz@gnu.org>
4643 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
4644 * w32.c (init_environment): Change the default values of many
4645 environment variables in dflt_envvars[] to NULL, to avoid pushing
4646 them into environment when they were not already defined.
4647 Remove the code that deletes site-lisp subdirectories from the default
4648 value of EMACSLOADPATH, as it is no longer needed.
4649 (check_windows_init_file): Now external, not static.
4650 Use Vload_path as is, without adding anything, as this function is now
4651 called when Vload_path is already set up.
4653 * w32.h (check_windows_init_file): Add prototype.
4655 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
4656 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
4657 compatibility with Posix platforms.
4658 (main): Move the call to check_windows_init_file to here from
4660 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
4661 any, in the DEFALT argument into the root of the Emacs build or
4662 installation tree, as appropriate.
4664 * callproc.c (init_callproc_1): Call decode_env_path instead of
4665 doing its equivalent by hand.
4666 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
4667 the code that sets Vexec_path run on MS-Windows.
4669 * lread.c (init_lread): Add comments to #ifdef's.
4671 * msdos.c (dos_set_window_size, IT_update_begin)
4672 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
4673 instead of direct references.
4675 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
4677 Export DEFAULT_REHASH_* to GDB.
4678 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
4679 Now constants, not macros.
4681 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
4683 Remove unnecessary casts involving pointers.
4684 These casts are no longer needed now that we assume C89 or later,
4685 since they involve casting to or from void *.
4686 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
4687 (make_pure_float, make_pure_vector):
4688 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
4689 * macros.c (Fstart_kbd_macro):
4690 * menu.c (find_and_return_menu_selection):
4691 * minibuf.c (read_minibuf_noninteractive):
4692 * sysdep.c (closedir):
4693 * xdisp.c (x_produce_glyphs):
4694 * xfaces.c (compare_fonts_by_sort_order):
4695 * xfns.c (x_real_positions, select_visual):
4696 * xselect.c (x_stop_queuing_selection_requests)
4697 (x_get_window_property, x_get_window_property_as_lisp_data):
4698 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
4699 Remove unnecessary pointer casts.
4700 * alloc.c (record_xmalloc): New function.
4701 * lisp.h (record_xmalloc): New decl.
4702 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
4703 more like a function. This is because the pointer cast is not
4704 needed. All uses changed.
4705 * print.c (print_string, print_error_message): Avoid length recalc.
4707 Improve fix for macroexp crash with debugging (Bug#12118).
4708 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
4709 ARRAY_MARK_FLAG when checking subscripts, because ASET is
4710 not supposed to be invoked from the garbage collector.
4711 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
4712 (gc_aset): New function, which is like ASET but can be
4713 used in the garbage collector.
4714 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4715 (set_hash_index): Use it instead of ASET.
4717 2012-08-03 Eli Zaretskii <eliz@gnu.org>
4719 Support symlinks on latest versions of MS-Windows.
4720 * w32.c: Include winioctl.h and aclapi.h.
4721 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
4722 (revert_to_self): Forward declarations of static functions.
4723 <static BOOL g_b_init_get_security_info>:
4724 <g_b_init_create_symbolic_link>: New static flags.
4725 (globals_of_w32): Initialize them to zero.
4726 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
4727 (map_w32_filename): Improve commentary. Simplify switch.
4728 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
4729 headers (most versions of MinGW w32api don't).
4730 (get_security_info, create_symbolic_link)
4731 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
4733 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
4734 in the argument file name.
4735 (sys_access): Call unc_volume_file_attributes only if
4736 GetFileAttributes fails with network-related error codes.
4737 (sys_rename): Diagnose renaming of a symlink when the user doesn't
4738 have the required privileges.
4739 (get_file_security_desc_by_name): Rename from
4740 get_file_security_desc.
4741 (stat_worker): New function, with most of the guts of 'stat', and
4742 with addition of handling of symlinks and support for 'lstat'.
4743 If possible, get file's attributes and security information by
4744 handle, not by name. Produce S_IFLNK bit for symlinks, when
4745 called from 'lstat'.
4746 (stat, lstat): New functions, call 'stat_worker'.
4747 (symlink, readlink, careadlinkat): Rewritten to create and resolve
4748 symlinks when the underlying filesystem supports them.
4750 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4752 Fix macroexp crash on Windows with debugging (Bug#12118).
4753 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
4754 checking subscripts; problem introduced with the recent
4755 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
4756 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
4757 since it's used in non-static inline functions now.
4759 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
4760 Don't assume buffer size fits in 'int'. Remove unused local.
4762 Use C99-style 'extern inline' if available.
4763 * buffer.h (BUFFER_INLINE):
4764 * category.h (CATEGORY_INLINE):
4765 * character.h (CHARACTER_INLINE):
4766 * charset.h (CHARSET_INLINE):
4767 * composite.h (COMPOSITE_INLINE):
4768 * dispextern.h (DISPEXTERN_INLINE):
4769 * lisp.h (LISP_INLINE):
4770 * systime.h (SYSTIME_INLINE):
4771 New macro, replacing 'static inline' in this header.
4772 * buffer.h, category.h, character.h, charset.h, composite.h:
4773 * dispextern.h, lisp.h, systime.h:
4774 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
4775 * alloc.c (LISP_INLINE):
4776 * buffer.c (BUFFER_INLINE):
4777 * category.c (CATEGORY_INLINE):
4778 * character.c (CHARACTER_INLINE):
4779 * charset.c (CHARSET_INLINE):
4780 * composite.c (COMPOSITE_INLINE):
4781 * dispnew.c (DISPEXTERN_INLINE):
4782 * sysdep.c (SYSTIME_INLINE):
4783 Define to EXTERN_INLINE, so that the corresponding functions
4784 are compiled into code.
4785 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
4786 (INLINE_HEADER_END): New macros.
4787 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
4788 since it's used in non-static inline functions now.
4789 (VALMASK) [!USE_LSB_TAG]: Likewise.
4791 2012-08-02 Glenn Morris <rgm@gnu.org>
4793 * s/: Remove empty directory.
4795 * s/ms-w32.h: Move to ../nt/inc.
4796 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
4797 Update for new ms-w32.h location.
4799 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
4802 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
4804 2012-08-02 Glenn Morris <rgm@gnu.org>
4806 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
4807 hard-coding the path separator.
4809 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4811 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
4812 This how ASET and AREF are supposed to work, and makes
4813 it easier to think about future improvements. See
4814 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
4815 * charset.h (set_charset_attr): New function.
4816 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
4817 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
4818 (aref_addr): New function. All uses of &AREF(...) changed.
4819 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
4820 (set_hash_index): New functions. All lvalue-style uses of
4821 HASH_KEY etc. changed.
4822 * keyboard.c (set_prop): New function. All lvalue-style uses
4825 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
4827 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
4828 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
4829 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
4830 * nsfns.m (ns_set_name_as_filename): Likewise.
4831 * nsmenu.m (ns_update_menubar): Likewise.
4832 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
4834 2012-08-01 Eli Zaretskii <eliz@gnu.org>
4836 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
4837 Adapt to latest changes in field names of the corresponding Lisp
4840 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
4842 2012-08-01 Glenn Morris <rgm@gnu.org>
4844 * s/msdos.h: Remove file.
4845 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
4846 * Makefile.in (S_FILE): Remove.
4847 (config_h): Remove S_FILE.
4849 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
4851 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
4852 Remove; moved to nt/config.nt.
4854 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4856 Use INTERNAL_FIELD for conses and overlays.
4857 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
4858 Remove obsolete comment.
4860 (struct Lisp_Overlay): Use INTERNAL_FIELD.
4861 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
4863 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4865 Use INTERNAL_FIELD for symbols.
4866 * lisp.h (SVAR): New macro. Adjust users.
4867 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
4868 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
4870 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4872 Use INTERNAL_FIELD for processes.
4873 * process.h (PVAR): New macro. Adjust style.
4874 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
4875 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
4877 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
4879 Use INTERNAL_FIELD for windows.
4880 * window.h (WVAR): New macro.
4881 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
4882 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
4883 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
4884 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
4885 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
4886 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4888 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
4890 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
4892 2012-08-01 Glenn Morris <rgm@gnu.org>
4894 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
4895 Move to configure.ac.
4897 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
4899 * makefile.w32-in (CONFIG_H): Update dependencies.
4900 (CONF_POST_H): New macro.
4902 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
4904 2012-07-31 Glenn Morris <rgm@gnu.org>
4906 * Makefile.in (S_FILE): No longer set by configure.
4908 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
4910 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
4912 * process.h (NULL_DEVICE):
4913 * emacs.c (SEPCHAR):
4914 * editfns.c (USER_FULL_NAME): Let configure set them.
4916 * s/README, s/template.h: Remove files.
4918 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
4920 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
4921 Move to configure.ac.
4923 2012-07-31 Eli Zaretskii <eliz@gnu.org>
4925 * .gdbinit (xframe): Adapt to introduction of FVAR and the
4926 resulting renaming of 'struct frame' members.
4928 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
4930 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
4931 after introduction of FVAR.
4933 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4935 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
4937 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
4938 instead of compositeToPoint.
4939 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
4941 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
4943 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4945 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
4946 * lisp.h (INTERNAL_FIELD): New macro.
4947 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
4948 (BVAR): Change to use INTERNAL_FIELD.
4949 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
4950 (KVAR): Change to use INTERNAL_FIELD.
4951 * frame.h (FVAR): New macro.
4952 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
4953 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
4954 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
4955 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
4956 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
4958 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
4960 Miscellaneous fixes for non-default X toolkits.
4961 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
4962 * xterm.c (x_frame_of_widget): Remove redundant prototype.
4963 Move under #ifdef USE_LUCID.
4964 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
4965 definition and usage to avoid warnings.
4967 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
4969 * nsterm.m (openFiles): Fix previous checkin.
4971 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
4973 * indent.c (compute_motion): Remove unused local.
4975 2012-07-31 Glenn Morris <rgm@gnu.org>
4977 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
4979 * conf_post.h [USG5_4]:
4980 Move remaining contents of s/usg5-4-common.h here.
4981 * s/usg5-4-common.h: Remove file.
4983 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
4984 * s/irix6-5.h: Remove file.
4986 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
4987 * s/darwin.h: Remove file.
4989 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
4990 * s/hpux10-20.h: Remove file, which is now empty.
4992 2012-07-30 Glenn Morris <rgm@gnu.org>
4994 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
4995 * Makefile.in (config_h): Add conf_post.h.
4996 * makefile.w32-in (CONFIG_H): Add conf_post.h.
4998 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
5000 * nsterm.m (ns_do_open_file): New variable.
5001 (ns_term_init): Set ns_do_open_file to YES after run returns.
5002 (openFile, openTempFile, openFileWithoutUI, openFiles):
5003 Open files only if ns_do_open_file.
5005 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
5007 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
5008 This no-op macro hasn't been needed for many years.
5009 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
5011 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
5012 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
5013 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
5014 gdb_make_enums_visible.
5015 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
5016 (DIRECTORY_SEP): Now a constant, not a macro.
5018 2012-07-30 Eli Zaretskii <eliz@gnu.org>
5020 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
5021 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
5023 * w32term.c <w32_keyboard_codepage>: Renamed from
5024 keyboard_codepage and now external. All users changed.
5026 * w32term.h: Add declaration of w32_keyboard_codepage.
5028 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
5029 the codepage to translate keys to Unicode. If this argument is
5030 -1, use the value returned by GetConsoleCP. All callers changed.
5032 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
5034 Update .PHONY listings in makefiles.
5035 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
5036 bootstrap-clean, distclean, maintainer-clean, versioclean,
5039 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
5040 This is a bit clearer. Fix some commentary typos.
5042 2012-07-30 Glenn Morris <rgm@gnu.org>
5044 * s/netbsd.h: Let configure include signal.h if needed.
5045 Remove file, which is now empty.
5047 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
5048 Let configure set them.
5049 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
5050 No more need to undefine.
5052 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
5054 * keymap.c (Fkey_description): Don't remove 0x80 bit from
5055 non-single-byte char when adding meta modifier. (Bug#12090)
5057 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
5059 Convert safe_call to use variable number of arguments.
5060 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
5061 (safe_call2): Fix comment.
5062 * lisp.h (safe_call): Adjust prototype.
5063 * coding.c (encode_coding_object): Change to use safe_call2.
5064 * xfaces.c (merge_face_heights): Change to use safe_call1.
5066 2012-07-30 Glenn Morris <rgm@gnu.org>
5068 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
5069 does that unconditionally. Remove file, which is now empty.
5071 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
5074 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
5076 Export to GDB most of lisp.h's remaining object-like macros.
5077 * lisp.h (min, max): Move earlier, because they're used earlier now.
5078 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
5079 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
5080 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
5081 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
5082 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
5083 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
5084 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
5085 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
5086 Now constants, for GDB. They need not be macros.
5087 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
5088 Now constants, for GDB, as well as macros, for static initializers.
5089 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
5090 Move to after the definition of struct Lisp_Char_Table,
5091 since the former now needs that type defined.
5092 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
5093 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
5094 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
5095 New enums, for gdb_make_enums_visible.
5096 (GLYPH_MODE_LINE_FACE): Remove; unused.
5097 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
5098 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
5099 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
5100 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
5101 enum maxargs, enum MAX_ALLOCA.
5102 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
5103 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
5104 no longer needed, now that they are done in lisp.h.
5106 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
5108 Cleanup string bytes checking.
5109 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
5110 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
5111 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
5112 (check_sblock, compact_small_strings): Simplify.
5114 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
5116 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
5117 These macros are confusing and no longer need to be defined, as
5118 the enum values now suffice. All uses replaced with definiens.
5119 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
5121 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
5123 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
5124 ($(BLD)/w32console.$(O)): Update dependencies.
5126 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
5128 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
5129 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
5131 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
5133 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
5135 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
5136 setting sitelisp (Bug#12010).
5138 2012-07-29 Eli Zaretskii <eliz@gnu.org>
5140 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
5142 * w32heap.c (cache_system_info):
5143 * w32.c (sys_rename):
5144 * w32proc.c (find_child_console, sys_kill): All users changed.
5146 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
5148 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
5150 2012-07-29 Eli Zaretskii <eliz@gnu.org>
5152 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
5154 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
5156 Cleanup statistics calculation in Fgarbage_collect.
5157 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
5158 Fix zombies percentage calculation. Simplify elapsed time calculation.
5160 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
5162 Generalize marker debugging code under MARKER_DEBUG and use eassert.
5163 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
5164 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
5165 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
5166 (replace_range, replace_range_2, del_range_2): Change to eassert.
5167 * marker.c (byte_char_debug_check): Adjust style.
5169 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
5171 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
5172 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
5173 long-ago-commented-out code that talks about "WIN32".
5174 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
5177 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
5179 Use Gnulib stdalign module (Bug#9772, Bug#9960).
5180 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
5181 Simplify by using alignof.
5182 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
5183 * lisp.h: Include <stdalign.h>.
5184 (GCALIGNMENT): New macro and constant.
5185 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
5186 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
5187 (stdalign): New macro, if not already defined.
5189 2012-07-28 Eli Zaretskii <eliz@gnu.org>
5191 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
5192 * w32inevt.c: Include w32inevt.h.
5193 (w32_read_console_input): New inline function, calls either
5194 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
5195 w32_console_unicode_input.
5196 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
5197 (w32_kbd_patch_key, key_event): Use the codepage returned by
5198 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
5199 (key_event): use uChar.UnicodeChar only if
5200 w32_console_unicode_input is non-zero.
5202 * w32console.c: Include w32heap.h.
5203 <w32_console_unicode_input>: New global variable.
5204 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
5205 family of Windows, zero otherwise.
5207 * w32inevt.h: Declare w32_console_unicode_input.
5209 * xdisp.c (init_iterator): Don't reference tip_frame in a build
5210 --without-x. (Bug#11742)
5212 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
5214 Adjust GDB to reflect pvec_type changes (Bug#12036).
5215 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
5216 2012-07-04 changes to pseudovector representation.
5217 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
5219 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
5221 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
5223 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
5225 2012-07-27 Eli Zaretskii <eliz@gnu.org>
5227 * alloc.c (listn): Fix the order the arguments are consed onto the
5230 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
5231 enumeration constants, as PURE and HEAP are too general, and clash
5232 with other headers and sources, such as gmalloc.c and the
5233 MS-Windows system headers. All users changed.
5235 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5237 Revert last save_excursion_save and save_excursion_restore changes.
5238 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
5239 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
5241 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5243 Fix recently-introduced typos in Windows port.
5244 Reported by Martin Rudalics <rudalics@gmx.at>.
5245 * w32.c (init_environment): Replace comma with semicolon.
5246 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
5248 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
5250 Improve GDB symbol export (Bug#12036).
5251 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
5252 arms of an 'if', not using conditional expressions; otherwise GDB
5253 complains about the types in the unevaluated arm when the argument
5254 is an integer literal.
5255 (xgetint): Simplify expression.
5256 * alloc.c (gdb_make_enums_visible): New constant. This ports to
5257 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
5258 Zaretskii in <http://bugs.gnu.org/12036#13>.
5259 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
5260 needed now that we have gdb_make_enums_visible.
5261 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
5262 (enum enum_USE_LSB_TAG):
5263 New enum types, packaging up enums that need to be exported to GDB.
5265 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5267 Utility function to make a list from specified amount of objects.
5268 * lisp.h (enum constype): New datatype.
5269 (listn): New prototype.
5270 * alloc.c (listn): New function.
5271 (Fmemory_use_count, syms_of_alloc): Use it.
5272 * buffer.c (syms_of_buffer): Likewise.
5273 * callint.c (syms_of_callint): Likewise.
5274 * charset.c (define_charset_internal): Likewise.
5275 * coding.c (syms_of_coding): Likewise.
5276 * keymap.c (syms_of_keymap): Likewise.
5277 * search.c (syms_of_search): Likewise.
5278 * syntax.c (syms_of_syntax): Likewise.
5279 * w32.c (init_environment): Likewise.
5280 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
5281 * xdisp.c (syms_of_xdisp): Likewise.
5282 * xfns.c (syms_of_xfns): Likewise.
5284 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
5286 Fast save_excursion_save and save_excursion_restore.
5287 * lisp.h (struct Lisp_Excursion): New data type.
5288 (PVEC_EXCURSION): New pseudovector type.
5289 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
5290 to deal with it. Adjust comments.
5291 (init_marker, attach_marker): New prototype.
5292 (unchain_marker): Adjust prototype.
5293 * marker.c (attach_marker): Change to global.
5294 (init_marker): New function.
5295 * alloc.c (Fmake_marker, build_marker): Use it.
5296 (build_marker): More easserts.
5297 (mark_object): Handle struct Lisp_Excursion.
5298 * editfns.c (save_excursion_save, save_excursion_restore):
5299 Reimplement to use struct Lisp_Excursion. Add comments.
5301 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
5303 Fix export of symbols to GDB (Bug#12036).
5304 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
5305 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
5306 emacs.c, as this is a more-suitable home. Had this been done earlier
5307 the fix for 12036 would have avoided some of the problems noted in
5308 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
5309 would have been more obvious.
5310 * emacs.c: Do not include <verify.h>; no longer needed.
5311 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
5312 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
5313 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
5314 Remove; now done in lisp.h.
5315 * lisp.h (PUBLISH_TO_GDB): New macro.
5316 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
5317 (DATA_SEG_BITS): Use it.
5318 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
5319 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
5320 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
5321 not be usable in #if. This simplifies things.
5323 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
5325 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
5327 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
5329 Simplify export of symbols to GDB (Bug#12036).
5330 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
5331 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
5332 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
5333 Adjust to changes in lisp.h and emacs.c, by using
5334 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
5335 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
5336 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
5337 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
5338 instead of gdb_valbits.
5339 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
5340 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
5341 instead of gdb_array_mark_flag.
5342 (xboolvector): Get size from $->size, not $->header.size.
5343 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
5344 (xreload, hook-run, hookpost-run): Remove.
5345 * emacs.c: Include <verify.h>.
5346 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
5347 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
5349 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
5350 (gdb_USE_LSB_TAG): New enum constants.
5351 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
5352 Also define these as enum constants, so they're visible to GDB.
5353 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
5354 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
5355 as constants, so they're visible to GDB.
5356 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
5357 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
5358 Now enum constants, not macros, so they're visible to GDB.
5359 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
5360 more convenient now. All uses changed.
5361 (VALMASK) [USE_LSB_TAG]: Also define in this case.
5362 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
5364 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
5366 Explicitly free restriction data that are not needed anymore.
5367 * editfns.c (save_restriction_restore): Free restriction data.
5369 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
5371 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
5372 add argument, tune behavior, and adjust all callers.
5374 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
5376 Use typedef for EMACS_INT, EMACS_UINT.
5377 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
5378 than macros. This simplifies debugging in the usual case, since
5379 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
5380 and it allows expressions involving EMACS_INT casts.
5381 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
5383 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
5385 * nsterm.m (ns_read_socket): Return early if there is a modal
5388 2012-07-25 Martin Rudalics <rudalics@gmx.at>
5390 * frame.c (Fredirect_frame_focus): In doc-string don't mention
5391 that FOCUS-FRAME can be omitted.
5393 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
5395 Adjust buffer text indirection counters at the end of Fkill_buffer.
5396 * buffer.c (Fkill_buffer): Adjust indirection counters when the
5397 buffer is definitely dead. This should really fix an issue reported
5398 by Christoph Scholtes again. (Bug#12007).
5399 (init_buffer_once): Initialize indirection counters of
5400 buffer_defaults and buffer_local_symbols (for sanity and safety).
5402 2012-07-24 Eli Zaretskii <eliz@gnu.org>
5404 * xdisp.c (init_iterator): Don't compute dimensions of truncation
5405 and continuation glyphs on tooltip frames, leave them at zero.
5406 Avoids continued lines in tooltips. (Bug#11832)
5408 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
5410 Simplify copy_overlay.
5411 * buffer.c (copy_overlay): Simplify. Use build_marker.
5412 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
5414 2012-07-23 Eli Zaretskii <eliz@gnu.org>
5416 * print.c (print_object): Don't crash when a frame's name is nil
5417 or invalid. (Bug#12025)
5419 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
5420 it signals an error when a tooltip frame is being created.
5422 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
5424 Cleanup miscellaneous objects allocation and initialization.
5425 * alloc.c (allocate_misc): Change to static. Add argument to
5426 specify the subtype. Adjust comment and users.
5427 (build_overlay): New function.
5428 * buffer.c (copy_overlays, Fmake_overlay): Use it.
5429 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
5430 (allocate_misc): Remove prototype.
5431 (build_overlay): Add prototype.
5433 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
5435 Swap buffer text indirection counters in Fbuffer_swap_text.
5436 * buffer.c (Fbuffer_swap_text): Swap indirections too.
5437 This avoids crash reported by Christoph Scholtes at
5438 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
5440 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
5442 * nsmenu.m (Popdown_data): New struct.
5443 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
5445 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
5446 (initWithContentRect): Make imgView and contentView non-static
5447 and autorelease them. Also autorelease img and matrix (Bug#12005).
5448 (dealloc): Remove (Bug#12005).
5450 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
5452 Adjust consing_since_gc when objects are explicitly freed.
5453 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
5454 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
5455 (free_cons, free_misc): Subtract object size from consing_since_gc.
5457 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
5459 Simplify and cleanup markers positioning code.
5460 * marker.c (attach_marker): More useful eassert.
5461 (live_buffer, set_marker_internal): New function.
5462 (Fset_marker, set_marker_restricted): Use set_marker_internal.
5463 (set_marker_both, set_marker_restricted_both): Use live_buffer.
5465 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
5467 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
5468 as it's limited by the amount of memory, not by INT_MAX.
5470 2012-07-21 Eli Zaretskii <eliz@gnu.org>
5472 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
5473 in special-event-map. See the discussion at
5474 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
5477 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
5478 info.dwItemData. Fixes crashes on 64-bit Windows.
5479 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
5481 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
5483 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
5484 (conversationIdentifier): Return value is NSInteger.
5485 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
5487 2012-07-21 Chong Yidong <cyd@gnu.org>
5489 * window.c (decode_any_window): Signal an error if the window is
5490 on a dead frame (Bug#11984).
5492 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5494 Add indirection counting to speed up Fkill_buffer.
5495 * buffer.h (struct buffer): New member.
5496 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
5497 (Fmake_indirect_buffer): Set indirection counter to -1, increment
5498 base buffer indirection counter.
5499 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
5500 (Fkill_buffer): Adjust indirection counters as needed, don't walk
5501 through buffer list if indirection counter is 0.
5503 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5505 Extend the value returned by Fgarbage_collect with heap statistics.
5506 * alloc.c (Qheap): New symbol.
5507 (syms_of_alloc): DEFSYM it.
5508 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
5509 (Fmemory_free): Remove.
5510 (syms_of_alloc): Don't defsubr it.
5511 * buffer.c (Fcompact_buffer): Remove.
5512 (syms_of_buffer): Don't defsubr it.
5514 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5516 Make maybe_gc inline.
5517 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
5518 * lisp.h (consing_since_gc, gc_relative_threshold)
5519 (memory_full_cons_threshold): Revert declaration.
5520 (maybe_gc): Remove prototype, define as inline.
5521 * alloc.c: Remove old commented-out code.
5522 (consing_since_gc, gc_relative_threshold)
5523 (memory_full_cons_threshold): Revert to global.
5526 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5528 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
5529 * lisp.h (build_unibyte_string): New function.
5530 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
5531 * sysdep.c, w32fns.c, xfns.c: Use it.
5532 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
5533 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
5534 Adjust users accordingly.
5535 * font.h (font_open_by_name): Adjust prototype.
5537 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
5539 Cleanup calls to Fgarbage_collect.
5540 * lisp.h (maybe_gc): New prototype.
5541 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5542 Remove declarations.
5543 * alloc.c (maybe_gc): New function.
5544 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
5546 * bytecode.c (MAYBE_GC): Use maybe_gc.
5547 * eval.c (eval_sub, Ffuncall): Likewise.
5548 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
5549 to avoid dependency from auto-save feature.
5551 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
5553 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
5554 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
5555 'for_each_per_buffer_object_at'.
5556 All uses changed. It's better to use upper-case for macros that
5557 cannot be implemented as functions, to give the reader a clue
5558 that they're special.
5560 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
5562 * alloc.c (Fgarbage_collect): Tweak docstring.
5564 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5566 Tweak the value returned from Fgarbage_collect again.
5567 * alloc.c (Fgarbage_collect): New return value, as confirmed in
5568 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
5569 Adjust documentation.
5570 (total_vector_bytes): Rename to total_vector_slots, adjust
5572 (total_free_vector_bytes): Rename to total_free_vector_slots,
5574 (Qstring_bytes, Qvector_slots): New symbols.
5575 (syms_of_alloc): DEFSYM them.
5577 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5579 Buffer compaction primitive which may be used from Lisp.
5580 * buffer.c (compact_buffer, Fcompact_buffer): New function.
5581 (syms_of_buffer): Register Fcompact_buffer.
5582 * alloc.c (Fgarbage_collect): Use compact_buffer.
5583 * buffer.h (compact_buffer): New prototype.
5584 (struct buffer_text): New member.
5586 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
5588 New macro to iterate over all buffers, miscellaneous cleanups.
5589 * lisp.h (all_buffers): Remove declaration.
5590 * buffer.h (all_buffers): Add declaration, with comment.
5591 (for_each_buffer): New macro.
5592 * alloc.c (Fgarbage_collect, mark_object): Use it.
5593 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
5594 (init_buffer): Likewise.
5595 * data.c (Fset_default): Likewise.
5596 * coding.c (code_conversion_restore): Remove redundant check
5598 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
5600 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5602 Fix bug that created negative-length intervals.
5603 * intervals.c (merge_interval_right, merge_interval_left):
5604 Do not zero out this interval if it is absorbed by its children,
5605 as this interval's total length doesn't change in that case. See
5606 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
5608 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
5610 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
5611 when invoking (make-bool-vector N t) and N is a positive
5612 multiple of 8 -- the last 8 bits were mistakenly cleared.
5614 Remove some struct layout assumptions in bool vectors.
5615 * alloc.c (bool_header_size): New constant.
5616 (header_size, word_size): Move earlier, as they're now used earlier.
5617 Use 'word_size' in a few more places, where it's appropriate.
5618 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
5619 padding before the data member of a bool vector.
5620 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
5621 than doing the check by hand with an abort ().
5623 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
5625 * eval.c (Fdefvar): Don't check constants since we only set the var if
5626 it's not yet defined anyway (bug#11904).
5628 * lisp.h (last_undo_boundary): Declare new var.
5629 * keyboard.c (command_loop_1): Set it.
5630 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
5631 were auto-added by the command loop (bug#11774).
5633 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
5635 * w32font.c (Qsymbol): Remove local definition.
5636 (syms_of_w32font): Don't DEFSYM it.
5638 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5640 Fix sweep_vectors to handle large bool vectors correctly.
5641 * alloc.c (sweep_vectors): Account total_vector_bytes for
5642 bool vectors larger than VBLOCK_BYTES_MAX.
5644 2012-07-18 Chong Yidong <cyd@gnu.org>
5646 * frame.c (x_set_frame_parameters): Revert bogus change introduced
5647 in 2012-05-25 commit by Paul Eggert (Bug#11738).
5649 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
5651 Return more descriptive data from Fgarbage_collect.
5652 Suggested by Stefan Monnier in
5653 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
5654 * alloc.c (bounded_number): New function.
5655 (total_buffers, total_vectors): New variable.
5656 (total_string_size): Rename to total_string_bytes, adjust users.
5657 (total_vector_size): Rename to total_vector_bytes, adjust users.
5658 (sweep_vectors): Account total_vectors and total_vector_bytes.
5659 (Fgarbage_collect): New return value. Adjust documentation.
5660 (gc_sweep): Account total_buffers.
5661 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
5662 (VECTOR_SIZE): Remove.
5663 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
5664 (Qinterval, Qmisc): New symbols.
5665 (syms_of_data): Initialize them.
5666 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
5667 (Qcons, Qbuffer): New declarations.
5669 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5671 * alloc.c (Fmemory_free): Account for memory-free's own storage.
5672 Round up, not down. Improve doc.
5674 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5676 Restore old code in allocate_string_data to avoid Faset breakage.
5677 Reported by Julien Danjou <julien@danjou.info> in
5678 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
5679 * alloc.c (allocate_string_data): Restore old code with minor
5680 adjustments, fix comment to explain this subtle issue.
5682 2012-07-17 Eli Zaretskii <eliz@gnu.org>
5684 Remove FILE_SYSTEM_CASE.
5685 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
5687 * fileio.c (FILE_SYSTEM_CASE): Don't define.
5688 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
5689 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
5690 call-process-region passes it through expand-file-name.
5692 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
5694 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5696 Fix crash when creating indirect buffer (Bug#11917)
5697 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
5698 Don't handle unbound variables specially if non-zero.
5699 (Fbuffer_local_variables): Pass zero.
5700 (clone_per_buffer_values): Pass non-zero.
5702 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5704 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
5705 to make the loop interruptible.
5707 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
5709 * gnutls.c (emacs_gnutls_handshake): Only retry if
5710 GNUTLS_E_INTERRUPTED.
5712 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5714 Cleanup and convert miscellaneous checks to eassert.
5715 * alloc.c (mark_interval): Fix comment, partially rephrase
5716 old comment from intervals.h (see below).
5717 * intervals.c (find_interval, adjust_intervals_for_insertion)
5718 (delete_interval, adjust_intervals_for_deletion)
5719 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
5721 (adjust_intervals_for_insertion, make_new_interval):
5722 Remove obsolete and unused code.
5723 * intervals.h (struct interval): Remove obsolete comment.
5724 * textprotp.c (erase_properties): Remove unused code.
5725 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
5726 (Fremove_list_of_text_properties): Convert to eassert.
5728 2012-07-17 Chong Yidong <cyd@gnu.org>
5730 * editfns.c (Finsert_char): Doc fix.
5732 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5734 Fix previous change to make Fmemory_free always accurate.
5735 * alloc.c (make_interval): Update total_free_intervals.
5736 (make_float): Likewise for total_free_floats.
5737 (free_cons, Fcons): Likewise for total_free_conses.
5738 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
5739 Likewise for total_free_vector_bytes.
5740 (Fmake_symbol): Likewise for total_free_symbols.
5741 (bytes_free): Remove.
5743 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5745 Simple free memory accounting feature.
5746 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
5747 (sweep_vectors): Accumulate size of free vectors.
5748 (Fgarbage_collect): Setup bytes_free.
5749 (Fmemory_free): New function.
5750 (syms_of_alloc): Register it.
5752 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
5754 Cleanup overlays checking.
5755 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
5756 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
5757 eassert and OVERLAYP.
5758 (sort_overlays): Change to use OVERLAYP.
5760 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
5762 * editfns.c (Finsert_char): Make it interactive, and make the
5763 second arg optional. Copy interactive spec and docstring from
5766 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
5768 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
5769 Unlike the other wrapped functions, fabs has an unspecified
5772 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
5774 * nsterm.m (keyDown): Interpret flags without left/right bits
5775 as the left key (Bug#11670).
5777 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5779 Remove empty and useless init functions.
5780 * lisp.h (init_character_once, init_fns, init_image)
5781 (init_filelock, init_sound): Remove prototype.
5782 * character.c (init_character_once): Remove.
5783 * filelock.c (init_filelock): Likewise.
5784 * fns.c (init_fns): Likewise.
5785 * image.c (init_image): Likewise.
5786 * sound.c (init_sound): Likewise.
5787 * emacs.c (main): Adjust accordingly.
5789 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
5791 * gtkutil.h: Tiny cleanups.
5792 (use_old_gtk_file_dialog): Remove useless declaration.
5793 (xg_uses_old_file_dialog): Add suggested const attribute.
5795 2012-07-15 Eli Zaretskii <eliz@gnu.org>
5797 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
5798 (bidi_paragraph_init): Use it to limit search forward for a strong
5799 directional character in abnormally large paragraphs full of
5800 neutral or weak characters. (Bug#11943)
5802 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
5804 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
5805 the toolbar (Bug#9451).
5806 (xg_make_tool_item): Give the widget event box a transparent
5809 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5811 Cleanup basic allocation variables and functions.
5812 * alloc.c (ignore_warnings, init_intervals, init_float)
5813 (init_cons, init_symbol, init_marker): Remove.
5814 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
5815 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
5816 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
5817 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
5818 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
5819 (staticidx, init_alloc_once, init_strings, free_ablock):
5820 Remove redundant initialization.
5821 * fns.c (init_weak_hash_tables): Remove.
5822 * lisp.h (init_weak_hash_tables): Remove prototype.
5824 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
5826 Use zero_vector where appropriate.
5827 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
5829 * lisp.h (zero_vector): New declaration.
5830 * font.c (null_vector): Remove.
5831 (syms_of_font): Remove initialization and staticpro.
5832 (font_list_entities, font_find_for_lface): Change to use zero_vector.
5833 * keymap.c (Faccessible_keymaps): Likewise.
5835 2012-07-15 Leo Liu <sdl.web@gmail.com>
5837 * fringe.c: Fix typo in comments.
5839 2012-07-14 Leo Liu <sdl.web@gmail.com>
5841 * fringe.c: Add a new bitmap exclamation-mark.
5843 2012-07-14 Eli Zaretskii <eliz@gnu.org>
5845 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
5847 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
5848 (HAVE_MENUS): Don't define, defined by editing config.in with
5850 (GMALLOC_INHIBIT_VALLOC): Don't define.
5851 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
5853 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
5855 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
5857 2012-07-14 Glenn Morris <rgm@gnu.org>
5859 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
5860 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
5861 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
5863 2012-07-13 Glenn Morris <rgm@gnu.org>
5865 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
5867 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
5868 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
5870 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
5872 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
5873 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
5874 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
5875 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
5877 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
5878 as boolean expression.
5879 (x_set_window_size): Remove unused variable toolbar.
5880 (ns_get_color_default, ns_mod_to_lisp): Remove.
5881 (ns_mouse_position): Remove unused variables xchar and ychar.
5882 (ns_compute_glyph_string_overhangs): Remove unused variable face.
5883 (ns_set_vertical_scroll_bar): Remove unused variable count.
5884 (ns_delete_terminal): Remove unused variable i.
5885 (ns_term_init): Remove unused variables r, g and b.
5886 (mouseDown): Remove unused variable window.
5887 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
5888 (initFrameFromEmacs): Remove unused variable vbextra.
5889 (mouseEntered): Remove unused variables p and dpyinfo.
5890 (mouseExited): Remove unused variables p and r.
5891 (ns_define_frame_cursor, ns_clear_frame_area)
5892 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
5893 (menuDown): Assign [sender tag] to variable and cast the variable.
5895 * nsterm.h (menuDown): Add id as type to argument sender.
5896 (ns_display_info_for_name): Add Lisp_Object argument.
5897 (ns_term_init): Add Lisp_Object argument.
5898 (ns_map_event_to_object): Add void argument.
5899 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
5900 prototype with arguments and only declare if __OBJC__.
5901 (nxatoms_of_nsselect): Add void argument.
5902 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
5903 (ns_alloc_autorelease_pool): Add void argument.
5904 (ns_release_autorelease_pool): Add void* argument.
5905 (ns_get_defaults_value): Add const char* argument.
5907 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
5908 (initFromContents): Use SSDATA where appropriate.
5909 (ns_update_menubar): Add braces to ambigous if-else.
5910 (initWithTitle): Put () around assignment in if statement.
5911 (ns_menu_show): Remove unused variables window and keymap.
5912 (update_frame_tool_bar): Remove unused variable selected_p.
5913 (initWithContentRect): Remove unused variable this_cmd_name.
5915 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
5917 (setXBMColor): Remove unused variable len.
5918 (setPixmapData): Put () around assignment in loop statement.
5920 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
5921 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
5923 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
5924 around assignment in loop statement.
5925 (nsfont_open): Remove unused variable i.
5926 (nsfont_open): Remove unused variable len.
5927 (nsfont_draw): Remove unused variable cs.
5929 * nsfns.m (x_set_icon_name, ns_set_name_internal)
5930 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
5931 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
5932 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
5933 (Fns_font_name, Fns_perform_service)
5934 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
5935 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
5936 (ns_set_name): Remove unused variable view.
5937 (x_set_menu_bar_lines): Remove unused variable olines.
5938 (x_set_tool_bar_lines): Remove unused variable root_window.
5939 (Fns_list_colors): Put () around assignment in while statement.
5940 (Fns_perform_service): Remove unused variable len.
5941 (Fns_display_usable_bounds): Remove unused variable top.
5942 (syms_of_nsfns): Remove unused variable i.
5944 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
5947 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
5949 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
5950 and free it with DestroyExceptionInfo (Bug#11558).
5952 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
5954 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
5955 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
5956 Set here, not in nt/config.nt.
5958 2012-07-13 Eli Zaretskii <eliz@gnu.org>
5960 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
5961 cursor overflow into the last glyph on display line when the right
5962 fringe is off. (Bug#11832)
5964 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
5966 * xdisp.c (produce_special_glyphs): Now static.
5967 * dispextern.h (produce_special_glyphs): Remove decl.
5969 2012-07-13 Glenn Morris <rgm@gnu.org>
5971 * s/bsd-common.h, s/cygwin.h: Remove empty files.
5972 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
5974 * s/usg5-4-common.h (USG, USG5):
5975 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
5976 * s/sol2-6.h (SOLARIS2):
5977 * s/irix6-5.h (IRIX6_5):
5978 * s/hpux10-20.h (USG, USG5, HPUX):
5979 * s/gnu-linux.h (USG, GNU_LINUX):
5980 * s/freebsd.h (BSD_SYSTEM):
5981 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
5982 * s/cygwin.h (CYGWIN):
5983 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
5984 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
5986 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
5988 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
5990 2012-07-13 Glenn Morris <rgm@gnu.org>
5992 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
5994 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
5996 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
5997 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
5999 2012-07-12 Glenn Morris <rgm@gnu.org>
6001 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
6003 * process.c (init_process_emacs): Rename from init_process.
6004 The old name is also the name of a Mach system call.
6005 * lisp.h, emacs.c: Update for this name change.
6006 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
6009 2012-07-12 Eli Zaretskii <eliz@gnu.org>
6011 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
6012 memmove call that removes glyphs covered by the left truncation
6013 glyph. Improve commentary.
6014 (display_line): Fix display of continuation glyphs on GUI frames
6015 when the right fringe is turned off and variable-size fonts are
6016 used in the window. Move the code that appends a stretch glyph to
6017 produce_special_glyphs, so that it could be used for truncation
6018 and continuation glyphs alike.
6019 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
6020 glyph of a suitably computed width, to align the special glyphs at
6021 the window margin. Code moved from display_line. (Bug#11832)
6023 2012-07-12 Glenn Morris <rgm@gnu.org>
6025 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
6027 * s/gnu-linux.h, s/hpux10-20.h:
6028 Do not unconditionally define HAVE_XRMSETDATABASE.
6030 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
6032 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
6034 Fix typos that broke OS X build.
6035 Reported by Randal L. Schwartz in
6036 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
6037 * nsterm.m (ns_timeout): Add missing local decl.
6038 (ns_get_color): snprintf -> sprintf, to fix typo.
6040 2012-07-12 Glenn Morris <rgm@gnu.org>
6042 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
6043 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
6044 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
6045 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
6047 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
6048 Move PTY_OPEN to configure.
6050 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
6051 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
6052 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
6054 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
6056 Use empty_unibyte_string where applicable.
6057 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
6058 * lread.c (read1): Likewise.
6059 * xsettings.c (syms_of_xsettings): Likewise.
6061 2012-07-12 Glenn Morris <rgm@gnu.org>
6063 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
6064 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
6065 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
6066 * s/hpux10-20.h (RUN_TIME_REMAP):
6067 * s/bsd-common.h (TABDLY): Move to configure.
6069 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
6071 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
6073 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
6074 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
6076 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
6078 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
6079 * s/template.h: Move NARROWPROTO to configure.
6081 2012-07-11 Glenn Morris <rgm@gnu.org>
6083 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
6084 unused since 2011-01-17 change to systty.h.
6086 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
6087 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
6088 Move HAVE_PTYS and HAVE_SOCKETS to configure.
6090 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
6092 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
6094 2012-07-11 Glenn Morris <rgm@gnu.org>
6096 * s/darwin.h, s/gnu-linux.h, s/template.h:
6097 Move INTERRUPT_INPUT to configure.
6099 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
6101 Minor adjustments to interning code.
6102 * lisp.h (intern, intern_c_string): Redefine as static inline
6103 wrappers for intern_1 and intern_c_string_1, respectively.
6104 (intern_1, intern_c_string_1): Rename prototypes.
6105 * lread.c (intern_1, intern_c_string_1, oblookup):
6106 Simplify Vobarray checking.
6107 * font.c (font_intern_prop): Likewise. Adjust comment.
6108 * w32font.c (intern_font_name): Likewise.
6110 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
6112 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
6114 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
6115 of Fcar/Fcdr if possible.
6116 * font.c (check_otf_features): Likewise.
6117 * fontset.c (Fnew_fontset): Likewise.
6118 * gnutls.c (Fgnutls_boot): Likewise.
6119 * minibuf.c (read_minibuf): Likewise.
6120 * msdos.c (IT_set_frame_parameters): Likewise.
6121 * xmenu.c (Fx_popup_dialog): Likewise.
6122 * w32menu.c (Fx_popup_dialog): Likewise.
6124 2012-07-11 Glenn Morris <rgm@gnu.org>
6126 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
6127 since nothing has defined it on these platforms.
6129 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
6130 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
6132 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
6133 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
6134 Move CLASH_DETECTION to configure.
6136 * s/gnu.h: Remove file, which is now empty.
6138 * s/gnu.h, s/gnu-linux.h:
6139 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
6141 2012-07-11 John Wiegley <johnw@newartisans.com>
6143 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
6144 function attribute, so we only use it if it exists in the
6147 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
6149 Avoid call to strlen in fast_c_string_match_ignore_case.
6150 * search.c (fast_c_string_match_ignore_case): Change to use
6151 length argument. Adjust users accordingly.
6152 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
6154 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
6156 Assume mkdir, rmdir.
6157 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
6158 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
6161 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
6164 * s/hpux10-20.h (HAVE_PERROR): Remove.
6165 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
6166 Remove dummy definition, as this problem was obsolete long ago.
6169 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
6171 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
6173 Avoid calls to strlen in font processing functions.
6174 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
6175 (font_open_by_name): Change to use length argument.
6176 Adjust users accordingly.
6177 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
6179 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
6180 Change to return ptrdiff_t.
6181 (xfont_list_pattern, xfont_match): Use length returned by
6182 xfont_decode_coding_xlfd.
6183 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
6185 2012-07-11 Glenn Morris <rgm@gnu.org>
6187 * s/darwin.h, s/freebsd.h, s/netbsd.h:
6188 Move DONT_REOPEN_PTY to configure.
6190 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
6191 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
6193 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
6195 Remove "#define unix" that is no longer needed (Bug#11905).
6196 * s/aix4-2.h (unix): Remove; no longer needed.
6198 EMACS_TIME simplification (Bug#11875).
6199 This replaces macros (which typically do not work in GDB)
6200 with functions, typedefs and enums, making the code easier to debug.
6201 The functional style also makes code easier to read and maintain.
6202 * systime.h: Include <sys/time.h> on all hosts, not just if
6203 WINDOWSNT, since 'struct timeval' is needed in general.
6204 (EMACS_TIME): Now a typedef, not a macro.
6205 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
6207 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
6208 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
6209 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
6210 (EMACS_TIME_LE): Now functions, not macros.
6211 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
6212 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
6213 which are not functions. All uses rewritten to use:
6214 (make_emacs_time): New function.
6215 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
6216 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
6217 not functions. All uses rewritten to use the following, respectively:
6218 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
6219 (add_emacs_time, sub_emacs_time): New functions.
6220 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
6221 * fileio.c (Fcopy_file):
6222 * xterm.c (XTflash): Get the current time closer to when it's used.
6223 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
6225 * bytecode.c (targets): Suppress -Woverride-init warnings.
6227 Simplify by avoiding confusing use of strncpy etc.
6228 * doc.c (Fsnarf_documentation):
6229 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
6230 * frame.c (Fmake_terminal_frame):
6231 * gtkutil.c (get_utf8_string):
6233 * nsmenu.m (ns_update_menubar):
6234 * regex.c (regerror):
6235 Prefer memcpy to strncpy and strncat when either will do.
6236 * fileio.c (Fsubstitute_in_file_name):
6237 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
6238 (menu_separator_name_p):
6239 * nsmenu.m (ns_update_menubar):
6240 Prefer memcmp to strncmp when either will do.
6241 * nsterm.m: Include <ftoastr.h>.
6243 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
6244 Prefer snprintf to strncpy.
6245 * nsterm.m (ns_term_init):
6246 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
6247 * nsterm.m (ns_term_init):
6248 Avoid the need for strncpy, by using build_string or
6249 make_unibyte_string directly. Use dtoastr, not snprintf.
6250 * process.c (Fmake_network_process): Diagnose service names that
6251 are too long, rather than silently truncating them or creating
6252 non-null-terminated names.
6253 (Fnetwork_interface_info): Likewise, for interface names.
6254 * sysdep.c (system_process_attributes) [GNU_LINUX]:
6255 Prefer sprintf to strncat.
6256 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
6257 Prefer vsnprintf to vsprintf + strncpy.
6259 2012-07-10 Glenn Morris <rgm@gnu.org>
6261 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
6262 Clarify fallback case.
6264 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6266 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
6267 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
6268 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
6269 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
6270 where argument type is known to be a Lisp_Cons.
6272 2012-07-10 Tom Tromey <tromey@redhat.com>
6274 * bytecode.c (BYTE_CODE_THREADED): New macro.
6275 (BYTE_CODES): New macro. Replaces all old byte-code defines.
6276 (enum byte_code_op): New type.
6277 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
6278 (exec_byte_code): Use them. Use token threading when applicable.
6280 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6282 Optimize pure C strings initialization.
6283 * lisp.h (make_pure_string): Fix prototype.
6284 (build_pure_c_string): New function, defined as static inline. This
6285 provides a better opportunity to optimize away calls to strlen when
6286 the function is called with compile-time constant argument.
6287 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
6288 argument, adjust users accordingly. Use build_pure_c_string where
6290 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
6291 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
6292 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
6294 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6296 Avoid calls to strlen in miscellaneous functions.
6297 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
6298 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
6299 * lread.c (openp): Likewise.
6301 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
6303 Avoid calls to strlen in path processing functions.
6304 * fileio.c (file_name_as_directory): Add comment. Change to add
6305 srclen argument and return the length of result. Adjust users
6307 (directory_file_name): Fix comment. Change to add srclen argument,
6308 swap 1st and 2nd arguments to obey the common convention.
6309 Adjust users accordingly.
6310 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
6312 2012-07-10 Glenn Morris <rgm@gnu.org>
6314 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
6315 Move PENDING_OUTPUT_COUNT definition to configure.
6317 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
6318 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
6319 * s/gnu.h (DATA_START): Move definitions to configure.
6321 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
6322 We include usg5-4-common.h, which defines them both.
6324 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
6325 O_RDONLY already includes it).
6327 Stop ns builds setting the EMACSLOADPATH environment variable.
6328 * nsterm.m (ns_load_path): Rename from ns_init_paths.
6329 Now it does not set EMACSLOADPATH, just returns the load-path string.
6330 * nsterm.h: Update accordingly.
6331 * lread.c [HAVE_NS]: Include nsterm.h.
6332 (init_lread) [HAVE_NS]: Use ns_load_path.
6333 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
6335 2012-07-09 Glenn Morris <rgm@gnu.org>
6337 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
6338 since the included bsd-common.h does so.
6340 Stop ns builds setting the EMACSPATH environment variable.
6341 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
6342 (ns_init_paths): Do not set EMACSPATH.
6343 * nsterm.h (ns_exec_path): Add it.
6344 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
6347 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
6349 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
6351 * process.c (wait_reading_process_output): 'waitchannels' was unset
6352 when read_kbd || !NILP (wait_for_cell); fix this.
6354 Add GCC-style 'const' attribute to functions that can use it.
6355 * character.h (char_resolve_modifier_mask):
6356 * keyboard.h (make_ctrl_char):
6357 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
6358 (init_character_once, next_almost_prime, init_fns, init_image)
6359 (flush_pending_output, init_sound):
6360 * mem-limits.h (start_of_data):
6361 * menu.h (finish_menu_items):
6362 Add ATTRIBUTE_CONST.
6363 * emacs.c (DEFINE_DUMMY_FUNCTION):
6364 Declare the dummy function with ATTRIBUTE_CONST.
6365 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
6366 Add decls with ATTRIBUTE_CONST.
6368 Minor improvements to make_formatted_string.
6369 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
6370 where int is good enough, as vsprintf returns an int.
6371 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
6373 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
6375 Use make_formatted_string to avoid double length calculation.
6376 * lisp.h (make_formatted_string): New prototype.
6377 * alloc.c (make_formatted_string): New function.
6378 * buffer.c (Fgenerate_new_buffer_name): Use it.
6379 * dbusbind.c (syms_of_dbusbind): Likewise.
6380 * editfns.c (Fcurrent_time_zone): Likewise.
6381 * filelock.c (get_boot_time): Likewise.
6382 * frame.c (make_terminal_frame, set_term_frame_name)
6383 (x_report_frame_params): Likewise.
6384 * image.c (gs_load): Likewise.
6385 * minibuf.c (get_minibuffer): Likewise.
6386 * msdos.c (dos_set_window_size): Likewise.
6387 * process.c (make_process): Likewise.
6388 * xdisp.c (ensure_echo_area_buffers): Likewise.
6389 * xsettings.c (apply_xft_settings): Likewise.
6391 2012-07-09 Glenn Morris <rgm@gnu.org>
6393 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
6394 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
6395 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
6396 * nsterm.h (ns_etc_directory): Add it.
6397 * callproc.c [HAVE_NS]: Include nsterm.h.
6398 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
6400 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
6402 Move marker debugging code under MARKER_DEBUG.
6403 * marker.c (MARKER_DEBUG): Move marker debugging code under
6404 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
6405 for bootstrap with --enable-checking (~3x slowdown reported
6406 by Juanma Barranquero <lekktu@gmail.com>).
6407 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
6409 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
6411 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
6412 See <http://bugs.gnu.org/11825#29>.
6414 2012-07-08 Eli Zaretskii <eliz@gnu.org>
6416 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
6417 has no font, use the frame's font. (Bug#11813)
6418 (display_line): Add commentary about displaying truncation glyphs
6420 (produce_special_glyphs): Move here from term.c.
6422 * term.c (produce_special_glyphs): Move to xdisp.c.
6424 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
6427 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
6429 * xdisp.c (display_line): Avoid warning about implicit declaration
6432 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
6434 * lisp.h: Remove empty conditional.
6436 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
6438 * lread.c (load_path_check): Now static.
6440 Fix some minor --with-ns problems found by static checking.
6441 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
6442 (x_set_font) [!HAVE_X_WINDOWS]:
6443 * image.c (xpm_load_image) [HAVE_NS]:
6444 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
6445 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
6446 Remove unused local.
6447 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
6448 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
6449 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
6450 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
6451 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
6452 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
6453 Fix pointer signedness problem.
6454 * xfaces.c (FRAME_X_FONT_TABLE):
6455 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
6457 2012-07-07 Glenn Morris <rgm@gnu.org>
6459 * lread.c (load_path_check): New function, split from init_lread.
6460 (init_lread): Reorganize. Motivation:
6461 If EMACSLOADPATH is set, check/warn about that rather than the
6462 defaults, which we are not going to use. Hence we can remove
6463 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
6464 Don't warn if site-lisp directories are missing.
6465 If not installed, start from a blank load-path, since
6466 PATH_LOADSEARCH refers to the eventual installation directories.
6468 2012-07-07 Eli Zaretskii <eliz@gnu.org>
6470 Support truncation and continuation glyphs on GUI frames, when
6471 fringes are disabled. (Bug#11832)
6472 * xdisp.c (init_iterator): Get dimensions of truncation and
6473 continuation glyphs even if on GUI frames.
6474 Adjust it->last_visible_x on GUI frames when the left or right fringes,
6475 or both, are absent.
6476 (start_display, move_it_in_display_line_to): Handle the case of a
6477 GUI frame without a fringe to display continuation or truncation
6479 (insert_left_trunc_glyphs): Support GUI frames: make sure
6480 truncation glyphs overwrite enough glyphs from the current line to
6481 have sufficient space in pixels.
6482 (display_line): Support truncation and continuation glyphs on GUI
6483 frames. If some spare pixels are left on the line after inserting
6484 the truncation glyphs, fill that space with a stretch glyph of a
6485 suitably computed width.
6487 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
6488 produce_glyphs, to support GUI sessions.
6490 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
6492 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
6494 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
6496 Do not require float-time's arg to fit in time_t (Bug#11825).
6497 This works better on hosts where time_t is unsigned, and where
6498 float-time is applied to the (negative) difference between two times.
6499 * editfns.c (decode_time_components): Last arg is now double *,
6500 not int *, and means to store all the result as a double, without
6501 worrying about whether the seconds part fits in time_t.
6502 All callers changed.
6503 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
6504 All callers changed.
6505 (Ffloat_time): Do not fail merely because the specified time falls
6506 outside of time_t range.
6508 2012-07-07 Glenn Morris <rgm@gnu.org>
6510 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
6511 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
6512 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
6514 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
6516 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
6517 Update dependencies.
6519 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
6521 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6523 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
6524 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
6525 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
6526 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
6527 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
6528 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
6530 * xfont.c (compare_font_names): Redo to omit the need for casts.
6532 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
6534 * xfns.c (Fx_change_window_property): Doc fix.
6535 * w32fns.c (Fx_change_window_property): Doc fix.
6537 * w32fns.c (Fx_window_property): Accept the same arguments as the
6538 X Windows version. Doc fix.
6539 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
6541 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
6542 Eli Zaretskii <eliz@gnu.org>
6544 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
6545 Windows-specific code from nt/config.nt moved here.
6546 Obsolete settings removed.
6548 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6550 * process.c: Avoid unnecessary calls to gettime.
6551 (wait_reading_process_output): Don't get the time of day
6552 when gobbling data immediately and not waiting, as there's no need
6553 for it in that case. This removes a FIXME.
6555 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
6557 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
6558 is defined (Bug#11768).
6560 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6562 Fix marker debugging code.
6563 * marker.c (byte_char_debug_check): Do not perform the check
6564 if buffer is not multibyte.
6565 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6566 Call byte_char_debug_check with correct arguments.
6568 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6570 Compile marker debugging code only if ENABLE_CHECKING is defined.
6571 * marker.c (byte_char_debug_check, count_markers):
6572 Use only if ENABLE_CHECKING is defined.
6573 (byte_debug_flag): Remove.
6574 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
6575 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
6577 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6579 Avoid code repetition in marker-related functions.
6580 * marker.c (attach_marker): New function.
6581 (Fset_marker, set_marker_restricted, set_marker_both)
6582 (set_marker_restricted_both): Use it.
6583 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
6584 Consistently rename charno to charpos.
6585 (marker_position): Add eassert.
6586 (marker_byte_position): Convert to eassert.
6588 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6590 Simplify list operations in unchain_overlay and unchain_marker.
6591 * buffer.c (unchain_overlay): Simplify. Add comment.
6592 * marker.c (unchain_marker): Simplify. Fix comments.
6594 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6596 Introduce fast path for the widely used marker operation.
6597 * alloc.c (build_marker): New function.
6598 * lisp.h (build_marker): New prototype.
6599 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
6600 * composite.c (autocmp_chars): Likewise.
6601 * editfns.c (buildmark): Remove.
6602 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
6603 (save_restriction_save): Use build_marker.
6604 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
6605 * window.c (save_window_save): Likewise.
6607 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
6609 Do not use Fdelete_overlay in delete_all_overlays
6610 to avoid redundant calls to unchain_overlay.
6611 * buffer.c (drop_overlay): New function.
6612 (delete_all_overlays, Fdelete_overlay): Use it.
6613 * minibuf.c (get_minibuffer): Fix comment.
6615 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
6617 Port to OpenBSD 5.1 amd64.
6618 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
6619 This is needed for OpenBSD, and should be harmless on all BSD systems.
6620 Also, include <sys/sysctl.h>, as it should be available on all
6621 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
6622 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
6623 use p_pid member, not kp_proc.pid.
6625 2012-07-06 Glenn Morris <rgm@gnu.org>
6627 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
6629 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6631 More xmalloc and related cleanup.
6632 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
6633 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
6634 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
6635 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
6636 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
6637 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
6638 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
6639 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
6640 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
6642 Omit needless casts involving void * pointers and allocation.
6643 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
6644 as the former is more robust if P's type is changed.
6645 Prefer xzalloc to xmalloc + memset 0.
6646 Simplify malloc-or-realloc to realloc.
6647 Don't worry about xmalloc returning a null pointer.
6648 Prefer xstrdup to xmalloc + strcpy.
6649 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
6651 * keyboard.c (apply_modifiers_uncached): Prefer local array to
6652 alloca of a constant.
6654 2012-07-05 Eli Zaretskii <eliz@gnu.org>
6656 * xdisp.c (display_line): Fix horizontal pixel coordinates when
6657 hscroll is larger than the line width. Fixes long and futile
6658 looping inside extend_face_to_end_of_line (on a TTY) producing
6659 glyphs that are not needed and thrown away.
6661 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6663 * marker.c (set_marker_restricted_both): Simplify by using
6666 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6668 * editfns.c (region_limit): Simplify by using clip_to_bounds.
6670 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
6672 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
6673 not defined (Bug#11768).
6674 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
6675 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
6676 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
6677 followed by gtk_box_set_homogeneous (Bug#11768).
6678 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
6679 (update_theme_scrollbar_width, xg_create_scroll_bar):
6680 Use gtk_scrollbar_new (Bug#11768).
6681 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
6682 (is_box_type): New function (Bug#11768).
6683 (xg_tool_item_stale_p): Call is_box_type.
6684 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
6685 with default display (Bug#11768).
6687 2012-07-05 Eli Zaretskii <eliz@gnu.org>
6689 * xdisp.c (window_hscroll_limited): New function.
6690 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
6691 coordinates when window's hscroll is set to insanely large
6694 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
6696 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
6697 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
6699 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
6702 * lisp.h (xzalloc): New prototype. Omit needless casts.
6703 * alloc.c (xzalloc): New function. Omit needless casts.
6704 * charset.c: Omit needless casts. Convert all calls to
6705 xmalloc with following memset to xzalloc.
6706 * dispnew.c: Likewise.
6707 * fringe.c: Likewise.
6708 * image.c: Likewise.
6709 * sound.c: Likewise.
6711 * w32fns.c: Likewise.
6712 * w32font.c: Likewise.
6713 * w32term.c: Likewise.
6714 * xfaces.c: Likewise.
6716 * xterm.c: Likewise.
6717 * atimer.c: Omit needless casts.
6718 * buffer.c: Likewise.
6719 * callproc.c: Likewise.
6721 * coding.c: Likewise.
6722 * composite.c: Likewise.
6724 * doprnt.c: Likewise.
6725 * editfns.c: Likewise.
6726 * emacs.c: Likewise.
6728 * filelock.c: Likewise.
6730 * gtkutil.c: Likewise.
6731 * keyboard.c: Likewise.
6733 * lread.c: Likewise.
6734 * minibuf.c: Likewise.
6735 * msdos.c: Likewise.
6736 * print.c: Likewise.
6737 * process.c: Likewise.
6738 * region-cache.c: Likewise.
6739 * search.c: Likewise.
6740 * sysdep.c: Likewise.
6741 * termcap.c: Likewise.
6742 * terminal.c: Likewise.
6743 * tparam.c: Likewise.
6744 * w16select.c: Likewise.
6746 * w32reg.c: Likewise.
6747 * w32select.c: Likewise.
6748 * w32uniscribe.c: Likewise.
6749 * widget.c: Likewise.
6750 * xdisp.c: Likewise.
6751 * xmenu.c: Likewise.
6753 * xselect.c: Likewise.
6755 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
6757 * fileio.c (time_error_value): Check the right error number.
6758 Problem reported by Troels Nielsen in
6759 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
6761 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6763 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
6764 This should be fixed in a better way; see Eli Zaretskii in
6765 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
6766 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
6768 * fileio.c (time_error_value): Rename from special_mtime.
6769 The old name's problems were noted by Eli Zaretskii in
6770 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
6772 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
6773 This variable's comment says Emacs needs at least one GDB-visible
6774 symbol of type enum pvec_type, to work around GDB problems.
6775 The symbol's value doesn't matter.
6777 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
6778 that causes compilation to fail on pre-C99 compilers.
6780 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
6782 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
6783 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
6785 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6787 * buffer.c (init_buffer_once): Fix initialization of
6788 headers for buffer_defaults and buffer_local_symbols.
6789 Reported by Juanma Barranquero <lekktu@gmail.com>.
6791 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
6793 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
6794 * lisp.h (enum pvec_type): Use fewer bits.
6795 (PSEUDOVECTOR_SIZE_BITS): New constant.
6796 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
6797 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
6798 change in pvec_type.
6799 (PSEUDOVECTOR_TYPEP): New macro.
6800 (TYPED_PSEUDOVECTORP): Use it.
6801 * fns.c (internal_equal): Adapt code to extract pvectype.
6802 * emacs.c (gdb_pvec_type): Update type.
6803 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
6804 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
6805 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
6806 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
6807 (sweep_vectors): Use it. Use local var `total_bytes' instead of
6808 abusing vector->header.next.nbytes.
6809 (live_vector_p): Use PVEC_TYPE.
6810 (mark_object): Adapt code to extract pvectype. Use switch.
6812 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6814 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
6815 Tighten new eassert a bit.
6817 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6819 Fix compilation with --enable-gcc-warnings and -O1
6821 * doprnt.c (doprnt): Change type of tem to int, initialize
6822 to avoid compiler warning. Add eassert.
6823 * search.c (simple_search): Initialize match_byte to avoid
6824 compiler warning. Add eassert.
6826 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6828 Avoid weird behavior with large horizontal scrolls.
6829 Without this change, for example, large hscroll values would
6830 mess up Emacs's display on Fedora 15 x86, presumably due to
6831 overflows in int calculations in the display code.
6832 Also, if buffers had long lines, Emacs would freeze.
6833 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
6834 (set_window_hscroll): New function, containing the old guts of
6835 Fset_window_hscroll. Return the clipped value.
6836 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
6837 This avoids the need to check against PTRDIFF_MAX.
6839 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
6841 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
6843 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
6845 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
6847 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
6848 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
6849 since GCC 4.4.6 issues a bogus warning for them.
6851 Fix bugs in file timestamp newness comparisons.
6852 * fileio.c (Ffile_newer_than_file_p):
6853 * lread.c (Fload): Use full timestamp resolution of files,
6854 not just the 1-second resolution, so that files that are only
6855 slightly newer still count as newer.
6856 * fileio.c (Ffile_newer_than_file_p): Don't assume file
6857 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
6859 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
6861 * fileio.c: Improve handling of file time marker. (Bug#11852)
6862 (special_mtime): New function.
6863 (Finsert_file_contents, Fverify_visited_file_modtime):
6864 Use it to set special mtime values consistently.
6866 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
6868 * fileio.c (Finsert_file_contents): Properly handle st_mtime
6869 marker for non-existing file. (Bug#11852)
6871 2012-07-03 Glenn Morris <rgm@gnu.org>
6873 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
6874 and did not make it into globals.h).
6876 2012-07-03 Tom Tromey <tromey@redhat.com>
6878 * window.c (Fset_window_margins, Fset_window_fringes)
6879 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
6880 * textprop.c (Fprevious_property_change): No longer static.
6881 * syntax.c (Fsyntax_table_p): No longer static.
6882 * process.c (Fget_process, Fprocess_datagram_address): No longer
6884 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
6885 * keyboard.c (Fcommand_execute): No longer static.
6887 * insdel.c (Fcombine_after_change_execute): No longer static.
6888 * image.c (Finit_image_library): No longer static.
6889 * fileio.c (Fmake_symbolic_link): No longer static.
6890 * eval.c (Ffetch_bytecode): No longer static.
6891 * editfns.c (Fuser_full_name): No longer static.
6892 * doc.c (Fdocumentation_property, Fsnarf_documentation):
6894 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
6896 * dired.c (Ffile_attributes): No longer static.
6897 * composite.c (Fcomposition_get_gstring): No longer static.
6898 * callproc.c (Fgetenv_internal): No longer static.
6900 * ccl.h: Remove EXFUNs.
6901 * buffer.h: Remove EXFUNs.
6902 * dispextern.h: Remove EXFUNs.
6903 * intervals.h: Remove EXFUNs.
6904 * fontset.h: Remove EXFUN.
6905 * font.h: Remove EXFUNs.
6906 * dosfns.c (system_process_attributes): Remove EXFUN.
6907 * keymap.h: Remove EXFUNs.
6908 * lisp.h: Remove EXFUNs.
6909 * w32term.h: Remove EXFUNs.
6910 * window.h: Remove EXFUNs.
6911 * xsettings.h: Remove EXFUN.
6912 * xterm.h: Remove EXFUN.
6914 2012-07-03 Glenn Morris <rgm@gnu.org>
6916 * lisp.h (Frandom): Make it visible to C.
6917 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
6918 buffer for invisible buffers. (Bug#1229)
6920 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6922 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
6923 values which aren't power of 2.
6924 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
6925 Verify its value and the value of VECTOR_BLOCK_SIZE. Adjust users
6928 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
6930 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
6932 * alloc.c (mark_object): Revert part of last patch to use `switch'.
6934 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6936 * alloc.c (allocate_vector_block): Remove redundant
6937 calls to mallopt if DOUG_LEA_MALLOC is defined.
6938 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
6939 avoid calls to mallopt if zero_vector is returned.
6941 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6943 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
6944 is enabled, avoid dereferencing NULL current_sblock if
6947 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
6949 Cleanup basic buffer management.
6950 * buffer.h (struct buffer): Change layout to use generic vector
6951 marking code. Fix some comments. Change type of 'clip_changed'
6952 to bitfield. Remove unused #ifndef old.
6953 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
6954 (GET_OVERLAYS_AT): Fix indentation.
6955 (for_each_per_buffer_object_at): New macro.
6956 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
6957 (Fbuffer_local_variables): Use it.
6958 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
6959 * alloc.c (allocate_buffer): Adjust to match new layout of
6960 struct buffer. Fix comment.
6961 (mark_overlay): New function.
6962 (mark_buffer): Use it. Use mark_vectorlike to mark normal
6963 Lisp area of struct buffer.
6964 (mark_object): Use it. Adjust marking of misc objects
6965 and related comments.
6967 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
6969 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
6970 wrapper that is not needed because the wrapped code is a no-op (zero
6971 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
6972 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
6974 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
6976 * alloc.c (mark_buffer): Simplify. Remove prototype.
6977 (mark_object): Add comment. Reorganize marking of vector-like
6978 objects. Use CHECK_LIVE for all vector-like objects except buffers
6979 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
6980 Avoid redundant calls to mark_vectorlike for bool vectors.
6982 2012-06-30 Glenn Morris <rgm@gnu.org>
6984 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
6986 * epaths.in (PATH_SITELOADSEARCH): New.
6987 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
6988 This is rather than relying on --enable-locallisppath elements
6989 having "site-lisp" in their names. (Bug#10208#25, 11658)
6991 2012-06-30 Eli Zaretskii <eliz@gnu.org>
6993 * w32proc.c (sys_select): Accept and ignore one more argument.
6995 * w32.c (emacs_gnutls_pull): Call select with one more argument.
6997 * sysselect.h [DOS_NT]: Don't include sys/select.h.
6998 (pselect) [!MS_DOS]: Redirect to sys_select.
7000 * sysdep.c: Don't include dos.h and dosfns.h.
7002 * process.c (sys_select):
7003 * msdos.c (sys_select): Accept one more argument and ignore it.
7005 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
7006 adapt data types and code to that.
7009 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
7010 which clashes with the gnulib function of the same name.
7012 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
7014 * font.c (font_style_to_value, font_style_symbolic)
7015 (font_prop_validate_style): Add type checks for values in
7018 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
7020 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
7023 2012-06-29 Eli Zaretskii <eliz@gnu.org>
7025 * xdisp.c (try_window_id): Undo last change.
7027 * w32.c (getwd): Adjust commentary about startup_dir.
7028 (init_environment): Always call sys_access, even in non-MSVC
7029 builds. Don't chdir to the directory of the Emacs executable.
7030 This undoes code from 1997 which was justified by the need to
7031 "avoid conflicts when removing and renaming directories". But its
7032 downside was that every relative file name was being interpreted
7033 relative to the directory of the Emacs executable, which can never
7034 be TRT. In particular, it broke sys_access when called with
7035 relative file names.
7036 (sys_access): Map GetLastError to errno.
7038 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
7040 * window.h (struct window): Change type of 'fringes_outside_margins'
7041 to bitfield. Fix comment. Adjust users accordingly.
7042 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
7044 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
7047 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
7049 * gnutls.c (emacs_gnutls_handshake):
7050 Add QUIT to make the loop interruptible.
7052 2012-06-29 Glenn Morris <rgm@gnu.org>
7054 * charset.c (init_charset): Make lack of etc/charsets fatal.
7056 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
7058 * editfns.c (region_limit): Fix type mismatch.
7060 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
7062 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
7063 undefined. Convert from xassert to eassert.
7064 * nsmenu.m: Convert from xassert to eassert.
7065 * nsterm.m: Likewise.
7067 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
7069 * editfns.c (region_limit): Clip to narrowing (bug#11770).
7071 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
7073 Avoid integer overflow on scroll-left and scroll-right.
7074 * window.c (HSCROLL_MAX): New macro.
7075 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
7076 overflow when requested scroll falls outside ptrdiff_t range.
7078 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
7080 * window.h (struct window): Change type of 'hscroll',
7081 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
7082 'last_modified' and 'last_overlay_modified' to EMACS_INT.
7083 Adjust users accordingly.
7084 * xdisp.c (try_cursor_movement): Replace type check with eassert.
7085 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
7086 from EMACS_INT to ptrdiff_t.
7087 (make_window): Omit redundant initialization.
7089 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
7091 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
7093 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
7095 * window.h (struct window): Change type of 'use_time' and
7096 'sequence_number' from Lisp_Object to int.
7097 * frame.c (make_frame): Adjust users accordingly.
7098 * print.c (print_object): Likewise.
7099 * window.c (select_window, Fwindow_use_time, make_parent_window)
7100 (make_window): Likewise.
7102 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
7104 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
7105 enabled with --enable-checking=[all,glyphs] configure option.
7106 Fix GLYPH_DEBUG usage assuming that it may be undefined,
7107 adjust comments accordingly.
7108 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
7109 undefined, adjust comments accordingly.
7110 * image.c: Likewise.
7111 * scroll.c: Likewise.
7112 * w32fns.c: Likewise.
7113 * w32term.c: Likewise.
7114 * xdisp.c: Likewise.
7115 * xfaces.c: Likewise.
7117 * xterm.c: Likewise.
7119 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
7121 Generalize run-time debugging checks.
7122 * dispextern.h (XASSERTS): Remove.
7123 * fontset.c (xassert): Remove.
7124 Convert from xassert to eassert.
7125 * alloc.c: Convert from xassert to eassert.
7127 * dispnew.c: Likewise.
7129 * fringe.c: Likewise.
7130 * ftfont.c: Likewise.
7131 * gtkutil.c: Likewise.
7132 * image.c: Likewise.
7133 * keyboard.c: Likewise.
7135 * process.c: Likewise.
7136 * scroll.c: Likewise.
7137 * sound.c: Likewise.
7139 * w32console.c: Likewise.
7140 * w32fns.c: Likewise.
7141 * w32term.c: Likewise.
7142 * window.c: Likewise.
7143 * xdisp.c: Likewise.
7144 * xfaces.c: Likewise.
7146 * xselect.c: Likewise.
7147 * xterm.c: Likewise.
7149 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
7151 * fns.c (maybe_resize_hash_table): Output message when growing the
7154 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
7156 * alloc.c (allocate_string_data): Remove dead code.
7157 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
7158 avoid GCC warning about unused macro.
7160 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
7162 * alloc.c (allocate_string): Omit intervals initialization.
7163 * alloc.c (make_uninit_multibyte_string): Initialize intervals
7164 as in make_pure_string and make_pure_c_string.
7166 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
7168 * alloc.c (allocate_string): Fix last change.
7170 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
7172 * alloc.c (allocate_string): Remove two redundant calls
7173 to memset, add explicit initialization where appropriate.
7175 2012-06-27 Glenn Morris <rgm@gnu.org>
7177 * lisp.mk (lisp): Remove paths.elc.
7179 2012-06-27 Chong Yidong <cyd@gnu.org>
7181 * doc.c (Fsubstitute_command_keys): Fix punctuation.
7183 2012-06-26 John Wiegley <johnw@newartisans.com>
7185 * unexmacosx.c (copy_data_segment): Add two section names used
7186 on Mac OS X Lion: __mod_init_func and __mod_term_func.
7188 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
7189 when building with Clang.
7191 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
7193 * eval.c (Fapply): Allow calling it with a single argument.
7195 2012-06-26 Eli Zaretskii <eliz@gnu.org>
7197 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
7198 _stricmp and _strnicmp.
7199 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
7201 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
7203 * alloc.c (allocate_window): Zero out non-Lisp part of newly
7205 (allocate_process): Likewise for new process.
7206 (allocate_terminal): Change to use offsetof.
7207 (allocate_frame): Likewise.
7208 * frame.c (make_frame): Omit redundant initialization.
7209 * window.c (make_parent_window): Use memset.
7210 (make_window): Omit redundant initialization.
7211 * process.c (make_process): Omit redundant initialization.
7212 * terminal.c (create_terminal): Likewise.
7214 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
7216 * term.c (delete_tty): Remove redundant call to memset.
7218 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
7220 * alloc.c: Remove build_string.
7221 * lisp.h: Define build_string as static inline. This provides
7222 a better opportunity to optimize away calls to strlen when the
7223 function is called with compile-time constant argument.
7224 * image.c (imagemagick_error): Convert to build_string.
7225 * w32proc.c (sys_spawnve): Likewise.
7226 * xterm.c (x_term_init): Likewise.
7228 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
7230 Use sprintf return value instead of invoking strlen on result.
7231 In the old days this wasn't portable, since some sprintf
7232 implementations returned char *. But they died out years ago and
7233 Emacs already assumes sprintf returns int.
7234 Similarly for float_to_string.
7235 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
7236 * ccl.c (ccl_driver):
7237 * character.c (string_escape_byte8):
7238 * data.c (Fnumber_to_string):
7239 * doprnt.c (doprnt):
7240 * print.c (print_object):
7241 * xdisp.c (message_dolog):
7242 * xfns.c (syms_of_xfns):
7243 Use sprintf or float_to_string result to avoid need to call strlen.
7244 * data.c (Fnumber_to_string):
7245 Use make_unibyte_string, since the string must be ASCII.
7246 * lisp.h, print.c (float_to_string): Now returns int length.
7247 * term.c (produce_glyphless_glyph):
7248 Use sprintf result rather than recomputing it.
7250 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
7251 * Makefile.in (ALL_CFLAGS):
7252 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
7253 * gmalloc.c, regex.c: Include <config.h> unconditionally.
7255 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
7257 * dispextern.h (xstrcasecmp): Define to library function
7258 strcasecmp if available.
7259 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
7261 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
7263 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
7264 Avoid comma operator.
7265 * menu.c (push_submenu_start, push_submenu_end)
7266 (push_left_right_boundary, push_menu_pane): Likewise.
7267 * msdos.c (dos_rawgetc): Likewise.
7269 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
7271 * xfns.c (xic_create_fontsetname): Remove redundant calls
7274 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
7276 * gtkutil.c (get_utf8_string): Remove redundant assignment.
7277 sprintf already null-terminates its output.
7279 * xfns.c (x_window): Remove redundant cast.
7281 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
7283 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
7284 `const char *' to `char *' to avoid compiler warning.
7286 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
7288 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
7289 instead of truncating it to 63 (admittedly a generous limit).
7291 * process.c: Fix spelling and caps in comments.
7293 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
7295 * emacs.c (setpgrp): Remove definition, unused.
7296 * sysdep.c (setpgrp): Remove definition, not used in this file.
7298 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
7300 * makefile.w32-in: Update dependencies.
7302 2012-06-24 Eli Zaretskii <eliz@gnu.org>
7304 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
7305 (SYSTIME_H): Add nt/inc/sys/time.h.
7307 * systime.h [WINDOWSNT]: Include sys/time.h.
7309 * s/ms-w32.h (struct timespec): Definition moved from
7310 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
7312 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
7314 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
7315 * buffer.h (buffer_slot_type_mismatch):
7316 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
7317 * eval.c (unwind_to_catch):
7318 * image.c (my_png_error, my_error_exit):
7319 * keyboard.c (quit_throw_to_read_char, user_error)
7320 (Fexit_recursive_edit, Fabort_recursive_edit):
7321 * lisp.h (die, args_out_of_range, args_out_of_range_3)
7322 (wrong_type_argument, buffer_overflow, __executable_start)
7323 (memory_full, buffer_memory_full, string_overflow, Fthrow)
7324 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
7325 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
7327 (child_setup) [!DOS_NT]:
7328 * lread.c (end_of_file_error, invalid_syntax):
7329 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
7330 * puresize.h (pure_write_error):
7331 * search.c (matcher_overflow):
7332 * sound.c (sound_perror, alsa_sound_perror):
7333 * sysdep.c, syssignal.h (croak):
7334 * term.c (maybe_fatal, vfatal):
7335 * textprop.c (text_read_only):
7336 * undo.c (user_error):
7337 * unexmacosx.c (unexec_error):
7338 * xterm.c (x_ins_del_lines, x_delete_glyphs):
7339 Use _Noreturn rather than NO_RETURN.
7340 No need for separate decl merely because of _Noreturn.
7341 * sound.c (sound_warning, parse_sound):
7342 Remove unnecessary forward decls.
7344 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
7346 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
7347 * lisp.h (WAIT_READING_MAX): New macro.
7348 * dispnew.c (Fsleep_for, sit_for):
7349 * keyboard.c (kbd_buffer_get_event):
7350 * process.c (Faccept_process_output):
7351 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
7352 This improves on the previous patch, which introduced a bug
7353 when time_t is unsigned and as wide as intmax_t.
7354 See <http://bugs.gnu.org/9000#51>.
7356 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7358 * dispnew.c (sit_for, Fsleep_for):
7359 * keyboard.c (kbd_buffer_get_event):
7360 * process.c (Faccept_process_output): Avoid compiler warnings when
7361 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
7363 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
7365 * makefile.w32-in: Update dependencies.
7367 * w32.c (ltime): Add return type and declare static.
7368 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
7370 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
7372 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
7373 Privately reported by Herbert J. Skuhra.
7374 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
7376 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
7377 not make_lisp_timeval, when the argument is of type EMACS_TIME.
7379 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7381 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
7382 last argument of make_unibyte_string.
7384 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
7385 language ID in the event parameters.
7387 * w32term.c (w32_read_socket): Put the new keyboard codepage into
7388 event.code, not the obscure "character set ID".
7390 2012-06-23 Chong Yidong <cyd@gnu.org>
7392 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
7394 2012-06-23 Eli Zaretskii <eliz@gnu.org>
7396 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
7397 * w32.c (fdutimens): New function.
7399 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
7401 * s/ms-w32.h (pselect): Redirect to sys_select.
7403 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
7405 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
7406 in the logic of incrementing and decrementing the value of
7407 use_relocatable_buffers.
7409 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
7411 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
7412 Privately reported by Herbert J. Skuhra.
7413 [__FreeBSD__]: Remove "*/" typo after "#include".
7414 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
7415 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
7416 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
7417 Don't assume EMACS_TIME and struct timeval are the same type.
7419 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
7421 Support higher-resolution time stamps (Bug#9000).
7422 The time stamps are only nanosecond-resolution at the C level,
7423 since that's the best that any real-world system supports now.
7424 But they are picosecond-resolution at the Lisp level, as that's
7425 easy, and leaves room for future OS improvements.
7427 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
7430 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
7431 Don't get current time unless it's needed.
7433 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
7434 now provides it if it's absent.
7435 (start_atimer): Port to higher-res time stamps.
7436 Check for time stamp overflow. Don't get current time more
7437 often than is needed.
7439 * buffer.h (struct buffer): Buffer modtime now has high resolution.
7440 Include systime.h, not time.h.
7441 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
7443 * dired.c: Include stat-time.h.
7444 (Ffile-attributes): File times now have higher resolution.
7446 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
7447 (struct image): Timestamp now has higher resolution.
7449 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
7450 has at least microseconds now. All uses removed.
7451 (update_frame, update_single_window, update_window, update_frame_1)
7452 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
7453 (duration_to_sec_usec): Remove; no longer needed.
7455 * editfns.c (time_overflow): Now extern.
7456 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
7457 (float-time, Fformat_time_string, Fcurrent_time_string)
7458 (Fcurrent_time_zone): Accept and generate higher-resolution
7460 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
7461 (decode_time_components, lisp_seconds_argument): New functions.
7462 (make_time): Now static.
7463 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
7464 Report an error if the time is invalid, rather than having the caller
7467 * fileio.c: Include <stat-time.h>
7468 (Fcopy_file): Copy higher-resolution time stamps.
7469 Prefer to set the time stamp via a file descriptor if that works.
7470 (Fset_file_times, Finsert_file_contents, Fwrite_region)
7471 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
7472 (Fvisited_file_modtime, Fset_visited_file_modtime):
7473 Support higher-resolution time stamps.
7475 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
7477 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
7479 * image.c (prepare_image_for_display, clear_image_cache)
7480 (lookup_image): Port to higer-resolution time stamps.
7482 * keyboard.c (start_polling, bind_polling_period):
7483 Check for time stamp overflow.
7484 (read_char, kbd_buffer_get_event, timer_start_idle)
7485 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
7486 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
7487 Port to higher-resolution time stamps. Do not assume time_t is signed.
7488 (decode_timer): New function. Timers are now vectors of length 9,
7489 not 8, to accommodate the picosecond component.
7490 (timer_check_2): Use it.
7492 * nsterm.m (select_timeout, timeval_subtract): Remove.
7493 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
7494 as they're a bit more accurate and handle overflow better.
7495 (ns_select): Change prototype to be compatible with pselect.
7496 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
7497 * nsterm.h (ns_select): Adjust prototype.
7499 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
7500 us-resolution time stamps.
7501 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
7503 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
7505 * lisp.h (time_overflow): New decl.
7506 (wait_reading_process_output): First arg is now intmax_t, not int,
7507 to accommodate larger waits.
7509 * process.h (struct Lisp_Process.read_output_delay):
7510 Now counts nanoseconds, not microseconds.
7511 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
7513 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
7514 (wait_reading_process_output):
7515 Port to ns-resolution time stamps.
7516 (Faccept_process_output, wait_reading_process_output):
7517 Check for time stamp overflow. Do not assume time_t is signed.
7518 (select_wrapper): Remove; we now use pselect.
7519 (Fprocess_attributes): Now generates ns-resolution time stamps.
7521 * sysdep.c: Include utimens.h. Don't include utime.h
7522 or worry about struct utimbuf; gnulib does that for us now.
7523 (gettimeofday): Remove; gnulib provides a substitute.
7524 (make_timeval): New function.
7525 (set_file_times): Now sets ns-resolution time stamps.
7526 New arg FD; all uses changed.
7527 (time_from_jiffies, ltime_from_jiffies, get_up_time)
7528 (system_process_attributes):
7529 Now returns ns-resolution time stamp. All uses changed.
7530 Check for time stamp overflow.
7532 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
7533 provides a substitute now.
7535 * systime.h: Include timespec.h rather than sys/time.h and time.h,
7536 since it guarantees struct timespec.
7537 (EMACS_TIME): Now struct timespec, so that we can support
7538 ns-resolution time stamps.
7539 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
7540 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
7541 (EMACS_USECS): Remove.
7542 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
7543 so multiply the arg by 1000 before storing it.
7544 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
7546 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
7547 Port to ns-resolution time stamps.
7548 (EMACS_TIME_NEG_P): Remove; replaced by....
7549 (EMACS_TIME_SIGN): New macro.
7550 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
7551 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
7552 (set_file_times, make_time, lisp_time_argument): Adjust signature.
7553 (make_timeval, make_lisp_time, decode_time_components): New decls.
7554 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
7555 that it mishandled time_t overflow. You can't compare by subtracting!
7556 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
7557 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
7559 * term.c: Include <sys/time.h>.
7560 (timeval_to_Time): New function, for proper overflow wraparound.
7561 (term_mouse_position, term_mouse_click): Use it.
7563 * undo.c (record_first_change): Support higher-resolution time stamps
7565 (Fprimitive_undo): Use them when restoring time stamps.
7567 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
7568 (w32_get_internal_run_time):
7569 Port to higher-resolution Emacs time stamps.
7570 (ltime): Now accepts single 64-bit integer, as that's more convenient
7573 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
7575 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
7576 for compatibility with pselect. Support ns-resolution time stamps.
7578 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
7580 * xselect.c (wait_for_property_change, x_get_foreign_selection):
7581 Check for time stamp overflow, and support ns-resolution time stamps.
7583 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
7584 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
7585 (timeval_subtract): Remove; no longer needed.
7586 (XTflash, XTring_bell, x_wait_for_event):
7587 Port to ns-resolution time stamps. Don't assume time_t is signed.
7589 2012-06-22 Chong Yidong <cyd@gnu.org>
7591 * xdisp.c (x_consider_frame_title): Revert last change.
7593 2012-06-22 Eli Zaretskii <eliz@gnu.org>
7595 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
7596 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
7597 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
7598 staticidx goes up to 1597 out of 1600 = 0x640.)
7600 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
7602 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
7603 Otherwise, the umask might be mistakenly 0 while handling input signals.
7605 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
7607 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
7609 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
7611 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
7612 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
7613 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
7614 access to `contents' member of Lisp_Vector objects with AREF and ASET
7617 2012-06-19 Chong Yidong <cyd@gnu.org>
7619 * frame.c (delete_frame): When selecting a frame on a different
7620 text terminal, do not alter the terminal's top-frame.
7622 * xdisp.c (format_mode_line_unwind_data): Record the target
7623 frame's selected window and its terminal's top-frame.
7624 (unwind_format_mode_line): Restore them.
7625 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
7627 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
7628 since tty frames can be explicitly named.
7629 (prepare_menu_bars): Likewise.
7631 * term.c (Ftty_top_frame): New function.
7633 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7635 Port byte-code-meter to modern targets.
7636 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
7637 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
7638 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
7639 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
7640 (METER_1, METER_2): Simplify.
7642 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
7644 * data.c (Fdefalias): Return `symbol' (bug#11686).
7646 2012-06-18 Martin Rudalics <rudalics@gmx.at>
7648 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
7649 gets killed during executing of this function (Bug#11665).
7650 Try to always return Qt when the buffer has been actually killed.
7651 (Vkill_buffer_query_functions): In doc-string say that functions
7652 run by this hook should not change the current buffer.
7654 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
7656 Fix recently-introduced process.c problems found by static checking.
7657 * process.c (write_queue_push, write_queue_pop, send_process):
7658 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
7659 (write_queue_pop): Fix pointer signedness problem.
7660 (send_process): Remove unused local.
7662 2012-06-17 Chong Yidong <cyd@gnu.org>
7664 * xdisp.c (redisplay_internal): No need to redisplay terminal
7665 frames that are not on top.
7667 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
7669 * process.c (make_process): Initialize write_queue.
7670 (write_queue_push, write_queue_pop): New functions.
7671 (send_process): Use them to maintain correct ordering of process
7674 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
7676 * lisp.h (eassert): Assume C89 or later.
7677 This removes the need for CHECK.
7678 (CHECK): Remove. Its comments about always evaluating its
7679 argument were confusing, as 'eassert' typically does not evaluate
7682 * coding.c (produce_chars): Use ptrdiff_t, not int.
7684 * xterm.c (x_draw_underwave): Check for integer overflow.
7685 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
7687 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
7689 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
7690 referenced (Bug#11583).
7692 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
7694 Implement wave-style variant of underlining.
7695 * dispextern.h (face_underline_type): New enum.
7696 (face): Add field for underline type.
7697 * nsterm.m (ns_draw_underwave): New function.
7698 (ns_draw_text_decoration): Use it.
7699 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
7701 (x_draw_glyph_string): Use them.
7702 * xfaces.c (Qline, Qwave): New Lisp objects.
7703 (check_lface_attrs, merge_face_ref)
7704 (Finternal_set_lisp_face_attribute, realize_x_face):
7705 Handle wave-style underline face attributes.
7706 * xterm.c (x_draw_underwave): New function.
7707 (x_draw_glyph_string): Use it.
7709 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
7711 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
7712 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
7713 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
7714 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
7715 ($(BLD)/w32select.$(O)): Update dependencies.
7717 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7719 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
7720 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
7721 * character.c (_fetch_multibyte_char_p): Remove.
7722 * alloc.c: Include "character.h" before "buffer.h".
7724 * buffer.c: Likewise.
7725 * bytecode.c: Likewise.
7726 * callint.c: Likewise.
7727 * callproc.c: Likewise.
7728 * casefiddle.c: Likewise.
7729 * casetab.c: Likewise.
7730 * category.c: Likewise.
7732 * coding.c: Likewise.
7733 * composite.c: Likewise.
7734 * dired.c: Likewise.
7735 * dispnew.c: Likewise.
7737 * dosfns.c: Likewise.
7738 * editfns.c: Likewise.
7739 * emacs.c: Likewise.
7740 * fileio.c: Likewise.
7741 * filelock.c: Likewise.
7743 * fontset.c: Likewise.
7744 * fringe.c: Likewise.
7745 * indent.c: Likewise.
7746 * insdel.c: Likewise.
7747 * intervals.c: Likewise.
7748 * keyboard.c: Likewise.
7749 * keymap.c: Likewise.
7750 * lread.c: Likewise.
7751 * macros.c: Likewise.
7752 * marker.c: Likewise.
7753 * minibuf.c: Likewise.
7754 * nsfns.m: Likewise.
7755 * nsmenu.m: Likewise.
7756 * print.c: Likewise.
7757 * process.c: Likewise.
7758 * regex.c: Likewise.
7759 * region-cache.c: Likewise.
7760 * search.c: Likewise.
7761 * syntax.c: Likewise.
7763 * textprop.c: Likewise.
7765 * unexsol.c: Likewise.
7766 * w16select.c: Likewise.
7767 * w32fns.c: Likewise.
7768 * w32menu.c: Likewise.
7769 * window.c: Likewise.
7770 * xdisp.c: Likewise.
7772 * xmenu.c: Likewise.
7774 * xselect.c: Likewise.
7776 2012-06-16 Eli Zaretskii <eliz@gnu.org>
7778 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
7779 If all the glyphs of the glyph row came from strings, and we have no
7780 cursor positioning clues, put the cursor on the first glyph of the
7782 (handle_face_prop): Use chunk-relative overlay string index when
7783 indexing into it->string_overlays array. (Bug#11653)
7784 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
7785 the rightmost. (Bug#11720)
7787 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
7789 * category.h (CHAR_HAS_CATEGORY): Define as inline.
7790 (CATEGORY_MEMBER): Enforce 1/0 value.
7791 * category.c (_temp_category_set): Remove.
7793 2012-06-16 Eli Zaretskii <eliz@gnu.org>
7795 * window.c (Fdelete_other_windows_internal)
7796 (Fdelete_window_internal): Don't access frame's mouse highlight
7797 info of the initial frame. (Bug#11677)
7799 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
7801 * .gdbinit (xgetint): Fix recently-introduced paren typo.
7802 Assume USE_2_TAGS_FOR_INTS.
7803 (xreload): Adjust $tagmask width to match recent lisp.h change.
7805 Simplify lisp.h in minor ways that should not affect code.
7806 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
7807 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
7808 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
7809 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
7810 (INTTYPEBITS): New macro, for clarity.
7811 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
7812 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
7813 Simplify now that USE_LSB_TAG is always defined.
7814 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
7815 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
7817 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
7819 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
7821 2012-06-13 Glenn Morris <rgm@gnu.org>
7823 * s/bsd-common.h (BSD4_3):
7824 * s/usg5-4-common.h (USG5_4): No longer define; unused.
7826 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
7828 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
7831 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
7833 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
7834 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
7835 * alloc.c (widen_to_Lisp_Object): Remove.
7836 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
7837 * frame.c (delete_frame): Remove outdated comment.
7838 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
7839 USE_LISP_UNION_TYPE.
7840 (Fw32_unregister_hot_key): Likewise.
7841 (Fw32_toggle_lock_key): Likewise.
7842 * w32menu.c (add_menu_item): Likewise.
7843 (w32_menu_display_help): Use XIL instead of checking
7844 USE_LISP_UNION_TYPE.
7845 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
7846 (init_heap): Likewise.
7847 * w32term.c (w32_read_socket): Update comment.
7849 2012-06-13 Glenn Morris <rgm@gnu.org>
7851 * s/usg5-4-common.h, src/s/unixware.h:
7852 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
7854 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
7856 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
7858 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
7859 * alloc.c (make_number) [!defined make_number]:
7860 Remove, as lisp.h always defines this now.
7861 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
7862 (roundup_size): Verify that it is a power of 2.
7863 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
7864 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
7865 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
7866 -DUSE_LSB_TAG=0, to override the automatically-selected default.
7867 USE_LSB_TAG now is always defined to be either 0 or 1.
7869 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
7870 code works fine either way, and efficiency is not a concern here,
7871 as the union type is for debugging, not for production.
7872 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
7873 Use an inline function on all platforms when using the union type,
7874 since this is simpler and 'static inline' can be used portably
7876 (LISP_INITIALLY_ZERO): New macro.
7877 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
7878 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
7880 2012-06-12 Glenn Morris <rgm@gnu.org>
7882 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
7884 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
7886 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
7887 Move BROKEN_SIGIO to configure.
7889 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
7890 Move NO_TERMIO to configure.
7892 2012-06-12 Chong Yidong <cyd@gnu.org>
7894 * image.c (imagemagick_load_image): Use MagickFlattenImage if
7895 MagickMergeImageLayers is undefined. Use pixel pusher loop if
7896 MagickExportImagePixels is undefined.
7898 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
7900 * image.c (imagemagick_load_image): Remove unused label.
7902 2012-06-11 Glenn Morris <rgm@gnu.org>
7904 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
7905 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
7906 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
7907 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
7909 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
7911 * alloc.c (make_byte_code): New function.
7912 (Fmake_byte_code): Use it. Don't purify here.
7913 * lread.c (read1): Use it as well to avoid extra allocation.
7915 2012-06-11 Chong Yidong <cyd@gnu.org>
7917 * image.c (imagemagick_load_image): Implement transparency.
7919 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
7921 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
7922 account for preceding backslashes. (Bug#11663)
7924 2012-06-09 Chong Yidong <cyd@gnu.org>
7926 * term.c: Support italics in capable terminals (Bug#9652).
7927 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
7928 (turn_on_face): Output using TS_enter_italic_mode if available.
7929 Don't handle unused blinking and alt-charset cases.
7930 (turn_off_face): Handle italic case; discard unused tty_blinking_p
7931 and tty_alt_charset_p cases.
7932 (tty_capable_p, init_tty): Support italics.
7934 * termchar.h (struct tty_display_info): Add field for italics.
7935 Remove unused blink field.
7937 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
7940 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
7941 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
7942 tty_alt_charset_p. Add tty_italic_p.
7944 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
7946 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
7947 dbus_type_is_basic if available.
7948 (xd_extract_signed, xd_extract_unsigned): Rename from
7949 extract_signed and extract_unsigned, respectively. Adapt callers.
7951 2012-06-09 Chong Yidong <cyd@gnu.org>
7953 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
7955 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
7958 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
7960 * xdisp.c (vmessage): Treat frame message as multibyte.
7961 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
7962 would generate the diagnostic "Making \302\247 buffer-local while
7965 2012-06-08 Eli Zaretskii <eliz@gnu.org>
7967 * dispnew.c (showing_window_margins_p): Undo last change, which
7968 was done due to an inadvertent commit.
7969 (adjust_frame_glyphs_for_frame_redisplay): Do call
7970 showing_window_margins_p.
7972 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
7974 * eval.c (Fmake_var_non_special): New primitive.
7975 (syms_of_eval): Defsubr it.
7976 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
7978 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
7980 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
7981 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
7983 2012-06-08 Eli Zaretskii <eliz@gnu.org>
7985 * alloc.c (allocate_vectorlike): Fix last change.
7987 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
7989 Block-based vector allocation of small vectors.
7990 * lisp.h (struct vectorlike_header): New field `nbytes',
7991 adjust comment accordingly.
7992 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
7993 to denote vector blocks. Adjust users (live_vector_p,
7994 mark_maybe_pointer, valid_lisp_object_p) accordingly.
7995 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
7996 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
7997 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
7998 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
7999 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
8000 (roundup_size): New constant.
8001 (struct vector_block): New data type.
8002 (vector_blocks, vector_free_lists, zero_vector): New variables.
8003 (all_vectors): Rename to `large_vectors'.
8004 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
8005 (sweep_vectors): New functions.
8006 (allocate_vectorlike): Return `zero_vector' as the only vector of
8007 0 items. Allocate new vector from block if vector size is less than
8008 or equal to VBLOCK_BYTES_MAX.
8009 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
8010 (init_alloc_once): Add call to init_vectors.
8012 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
8014 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
8016 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
8018 * doprnt.c (doprnt): Truncate multibyte char correctly.
8019 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
8020 would mishandle a string argument "Xc" if X was a multibyte
8021 character of length 2: it would truncate after X's first byte
8022 rather than including all of X.
8024 2012-06-06 Chong Yidong <cyd@gnu.org>
8026 * buffer.c (word_wrap): Doc fix.
8028 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
8030 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
8032 2012-06-03 Glenn Morris <rgm@gnu.org>
8034 * xdisp.c (tool-bar-style): Doc fix.
8036 2012-06-03 Ulrich Müller <ulm@gentoo.org>
8038 * Makefile.in (PAXCTL): Define.
8039 (temacs$(EXEEXT)): Disable memory randomization for the temacs
8040 binary via PaX flags if the paxctl utility is available.
8041 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
8042 Restore PaX flags to their default. (Bug#11398)
8044 2012-06-03 Chong Yidong <cyd@gnu.org>
8046 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
8049 2012-06-03 Chong Yidong <cyd@gnu.org>
8051 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
8052 (note_mode_line_or_margin_highlight): If there is no help echo,
8053 use mode-line-default-help-echo. Handle the case where the mouse
8054 position is past the end of the mode line string.
8056 * buffer.c (buffer_local_value_1): New function, split from
8057 Fbuffer_local_value; can return Qunbound.
8058 (Fbuffer_local_value): Use it.
8059 (Vmode_line_format): Docstring tweaks.
8061 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
8063 * sysdep.c (system_process_attributes): Improve comment.
8065 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
8067 * keyboard.c: Export real-this-command to Elisp.
8068 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
8069 and DEFVAR it. Update all users.
8071 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
8073 * minibuf.c (Fassoc_string): Remove duplicate declaration.
8075 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
8076 Convert pctcpu and pctmem to Lisp float properly.
8077 Let the compiler fold better, as 100.0/0x8000 is exact.
8079 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
8081 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
8084 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
8086 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
8088 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
8090 For a 'struct window', replace some Lisp_Object fields to
8091 bitfields where appropriate, remove unused fields.
8092 * window.h (struct window): Remove unused 'last_mark_x' and
8093 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
8094 change its type from Lisp_Object to bitfield.
8095 Change type of 'force_start', 'optional_new_start',
8096 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
8097 fields from Lisp_Object to bitfield. Adjust users accordingly.
8099 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
8101 Pacify gcc -Wdouble-precision when using Xaw.
8102 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
8103 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
8104 Use 'float' consistently, rather than 'float' in most places
8105 and 'double' in a couple of places.
8107 2012-05-31 Eli Zaretskii <eliz@gnu.org>
8109 * xdisp.c (handle_stop): Detect whether we have overlay strings
8110 loaded by testing it->current.overlay_string_index to be
8111 non-negative, instead of checking whether n_overlay_strings is
8112 positive. (Bug#11587)
8114 2012-05-31 Chong Yidong <cyd@gnu.org>
8116 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
8118 * doc.c (Fsubstitute_command_keys): Doc fix.
8120 2012-05-31 Eli Zaretskii <eliz@gnu.org>
8122 * search.c (search_buffer): Remove calls to
8123 r_alloc_inhibit_buffer_relocation, as it is now called by
8124 maybe_unify_char, which was the cause of relocation of buffer text
8127 2012-05-31 Eli Zaretskii <eliz@gnu.org>
8129 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
8130 for the duration of call to load_charset, to avoid problems with
8131 callers of maybe_unify_char that access buffer text through C
8134 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
8135 decrement the inhibition flag, instead of just setting or
8138 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
8140 Remove obsolete '#define static' cruft.
8141 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
8142 This #undef was "temporary" in 2000; it is no longer needed
8143 now that '#define static' has gone away.
8144 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
8145 (gray_bitmap_bits): Remove; no longer needed.
8146 All uses replaced with definiens.
8147 * xterm.c: Include "bitmaps/gray.xbm".
8149 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
8151 Clean up __executable_start, monstartup when --enable-profiling.
8152 The following changes affect the code only when profiling.
8153 * dispnew.c (__executable_start): Rename from safe_bcopy.
8154 Define only on platforms that need it.
8155 * emacs.c: Include <sys/gmon.h> when profiling.
8156 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
8157 (__executable_start): Remove decl, since lisp.h does it now.
8158 (safe_bcopy): Remove decl; no longer has that name.
8159 (main): Coalesce #if into single bit of code, for simplicity.
8160 Cast pointers to uintptr_t, since standard libraries want integers
8162 * lisp.h (__executable_start): New decl.
8164 2012-05-31 Glenn Morris <rgm@gnu.org>
8166 * image.c (Fimagemagick_types): Doc fix.
8168 2012-05-30 Jim Meyering <meyering@redhat.com>
8170 * callproc.c (Fcall_process_region): Include directory component
8171 in mkstemp error message (Bug#11586).
8173 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
8175 * alloc.c, lisp.h (make_pure_vector): Now static.
8177 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
8179 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
8180 Move to byte-run.el.
8181 (Fautoload): Do the hash-doc more carefully.
8182 * data.c (Fdefalias): Purify definition, except for keymaps.
8183 (Qdefun): Move from eval.c.
8184 * lisp.h (Qdefun): Remove.
8185 * lread.c (read1): Tiny simplification.
8187 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
8189 Do not create empty overlays with the evaporate property (Bug#9642).
8190 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
8191 Bug#9642, but explicitly check that the buffer the overlay would
8192 be moved to is live and rearrange lines to make sure that errors
8193 will not put the overlay in an inconsistent state.
8194 (Fdelete_overlay): Cosmetics.
8196 2012-05-28 Eli Zaretskii <eliz@gnu.org>
8198 * w32term.c (my_bring_window_to_top): New function.
8199 (x_raise_frame): Use handle returned by DeferWindowPos, which
8200 could be different from the original one.
8201 Call my_bring_window_to_top instead of my_set_foreground_window.
8204 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
8205 by calling BringWindowToTop.
8207 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
8208 (WM_EMACS_END): Increase by one.
8210 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
8212 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
8213 This avoids undefined behavior that might cause the eassert
8214 to not catch an out-of-range value.
8216 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
8218 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
8219 Update dependencies.
8221 2012-05-27 Eli Zaretskii <eliz@gnu.org>
8223 * bidi.c (bidi_mirror_char): Fix last change.
8225 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
8227 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
8228 when referring to sectname field in printf format.
8230 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
8232 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
8233 Only r_alloc_inhibit_buffer_relocation needed to be added;
8234 the others were already declared.
8236 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
8237 before checking whether it's out of range. Put the check inside
8239 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
8241 2012-05-27 Ken Brown <kbrown@cornell.edu>
8243 * callproc.c (Fcall_process): Restore a line that was accidentally
8244 commented out in the 2011-02-13 change (bug#11547).
8246 2012-05-27 Eli Zaretskii <eliz@gnu.org>
8248 * lisp.h [REL_ALLOC]: Add prototypes for external functions
8249 defined on ralloc.c.
8251 * buffer.c [REL_ALLOC]: Remove prototypes of
8252 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
8253 they are now on lisp.h.
8255 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
8257 * search.c (search_buffer): Use it to inhibit relocation of buffer
8258 text while re_search_2 is doing its job, because re_search_2 is
8259 passed C pointers to buffer text. (Bug#11519)
8261 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
8264 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
8265 state after an additional call to move_it_in_display_line_to, keep
8266 the values of it->max_ascent and it->max_descent found for the
8268 (pos_visible_p): Revert the comparison against bottom_y to what it
8269 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
8272 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
8274 Fix coding-related core dumps with gcc -ftrapv.
8275 The code was computing A - B, where A and B are pointers, and B is
8276 random garbage. This can lead to core dumps on platforms that
8277 have special pointer registers, and it also leads to core dumps on
8278 x86-64 when compiled with gcc -ftrapv. The fix is to compute
8279 A - B only when B is initialized properly.
8280 * coding.c (coding_set_source, coding_set_destination): Return void.
8281 (coding_change_source, coding_change_destinations): New functions,
8282 with the old behaviors of coding_set_source and coding_set_destination.
8283 All callers that need an offset changed to use these new functions.
8285 2012-05-26 Glenn Morris <rgm@gnu.org>
8287 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
8289 2012-05-26 Eli Zaretskii <eliz@gnu.org>
8291 Extend mouse support on W32 text-mode console.
8292 * xdisp.c (draw_row_with_mouse_face):
8293 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
8295 * w32console.c: Include window.h.
8296 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
8298 (initialize_w32_display): Initialize mouse-highlight data.
8300 * w32inevt.c: Include termchar.h and window.h.
8301 (do_mouse_event): Support mouse-autoselect-window. When the mouse
8302 moves, call note_mouse_highlight. If help_echo changed, call
8303 gen_help_event to produce help-echo message in the echo area.
8304 Call clear_mouse_face if mouse_face_hidden is set in the mouse
8307 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
8309 * lread.c (read1): Simplify slightly to avoid an overflow warning
8310 with GCC 4.7.0 on x86-64.
8312 2012-05-26 Eli Zaretskii <eliz@gnu.org>
8314 * bidi.c (bidi_mirror_char): Revert last change: an int is
8315 definitely wide enough here.
8317 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
8319 Fix integer width and related bugs (Bug#9874).
8320 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
8321 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
8322 (string_bytes, check_sblock, allocate_string_data):
8323 (compact_small_strings, Fmake_bool_vector, make_string)
8324 (make_unibyte_string, make_multibyte_string)
8325 (make_string_from_bytes, make_specified_string)
8326 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
8327 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
8329 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8330 (allocate_pseudovector):
8331 Use int, not EMACS_INT, where int is wide enough.
8332 (inhibit_garbage_collection, Fgarbage_collect):
8333 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8334 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
8335 int might not be wide enough.
8336 (bidi_cache_search, bidi_cache_find, bidi_init_it)
8337 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
8338 (bidi_at_paragraph_end, bidi_find_paragraph_start)
8339 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
8340 (bidi_level_of_next_char, bidi_move_to_visually_next):
8341 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8342 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
8343 (Fkill_buffer, Fset_buffer_major_mode)
8344 (advance_to_char_boundary, Fbuffer_swap_text)
8345 (Fset_buffer_multibyte, overlays_at, overlays_in)
8346 (overlay_touches_p, struct sortvec, record_overlay_string)
8347 (overlay_strings, recenter_overlay_lists)
8348 (adjust_overlays_for_insert, adjust_overlays_for_delete)
8349 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
8350 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
8351 (Foverlay_recenter, last_overlay_modification_hooks_used)
8352 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
8353 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8354 (validate_region): Omit unnecessary test for b <= e,
8355 since that's guaranteed by the previous test.
8356 (adjust_overlays_for_delete): Avoid pos + length overflow.
8357 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
8358 (report_overlay_modification):
8359 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8360 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
8361 Omit pointer cast, which isn't needed anyway, and doesn't work
8362 after the EMACS_INT -> ptrdiff_t change.
8363 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
8364 * buffer.h: Adjust decls to match defn changes elsewhere.
8365 (struct buffer_text, struct buffer):
8366 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8367 Use EMACS_INT, not int, where int might not be wide enough.
8368 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
8369 not int, to avoid needless 32-bit limit on 64-bit hosts.
8370 (exec_byte_code): Use tighter memory-full test, one that checks
8371 for alloca overflow. Don't compute the address of the object just
8372 before an array, as that's not portable. Use EMACS_INT, not
8373 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
8374 * callint.c (Fcall_interactively):
8375 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8376 * callproc.c (call_process_kill, Fcall_process):
8377 Don't assume pid_t fits into an Emacs fixnum.
8378 (call_process_cleanup, Fcall_process, child_setup):
8379 Don't assume pid_t fits into int.
8380 (call_process_cleanup, Fcall_process, delete_temp_file)
8381 (Fcall_process_region):
8382 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8383 (Fcall_process): Simplify handling of volatile integers.
8384 Use int, not EMACS_INT, where int will do.
8385 * casefiddle.c (casify_object, casify_region, operate_on_word)
8386 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
8387 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8388 (casify_object): Avoid integer overflow when overallocating buffer.
8389 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
8390 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
8391 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
8392 * category.h (CATEGORYP): Don't assume arg is nonnegative.
8393 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
8394 integers are now checked earlier. All uses replaced with XINT.
8396 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8397 For CCL_MapSingle, check that content and value are in int range.
8398 (ccl_driver, Fregister_code_conversion_map):
8399 Check that Vcode_version_map_vector is a vector.
8400 (resolve_symbol_ccl_program): Check that vector header is in range.
8401 Always copy the vector, so that we can check its contents reliably
8402 now rather than having to recheck each instruction as it's being
8403 executed. Check that vector words fit in 'int'.
8404 (ccl_get_compiled_code, Fregister_ccl_program)
8405 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
8406 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
8407 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
8408 contents are in range.
8409 (Fccl_execute_on_string): Check that status is in range.
8410 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
8411 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
8412 Accept and return EMACS_INT, not int, because callers can pass values
8414 (c_string_width, strwidth, lisp_string_width, chars_in_text)
8415 (multibyte_chars_in_text, parse_str_as_multibyte)
8416 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
8417 (str_as_unibyte, str_to_unibyte, string_count_byte8)
8418 (string_escape_byte8, Fget_byte):
8419 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8420 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
8421 avoid mishandling large integers.
8422 * character.h: Adjust decls to match defn changes elsewhere.
8423 * charset.c (load_charset_map_from_file, find_charsets_in_text)
8424 (Ffind_charset_region):
8425 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8426 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
8427 (load_charset_map_from_vector, Fdefine_charset_internal):
8428 Don't assume fixnum fits in int.
8429 (load_charset_map_from_vector, Fmap_charset_chars):
8430 Remove now-unnecessary CHECK_NATNUMs.
8431 (Fdefine_charset_internal): Check ranges here, more carefully.
8432 Don't rely on undefined behavior with signed left shift overflow.
8433 Don't assume unsigned int fits into fixnum, or that fixnum fits
8434 into unsigned int. Don't require max_code to be a valid fixnum;
8435 that's not true for gb10830 4-byte on a 32-bit host. Allow
8436 invalid_code to be a cons, for the same reason. Require code_offset
8437 to be a character. Avoid int overflow if max_char is close
8439 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
8440 this is intended anyway and avoids some undefined behavior.
8441 (load_charset_map): Pass unsigned, not int, as 2nd arg of
8442 INDEX_TO_CODE_POINT, as that's what it expects.
8443 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
8444 * charset.h (DECODE_CHAR): Return int, not unsigned;
8445 this is what was intended anyway, and it avoids undefined behavior.
8446 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
8447 integer-overflow issues.
8448 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
8449 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
8450 where the argument is EMACS_INT, and this behavior is not intended.
8451 * chartab.c (Fmake_char_table, Fset_char_table_range)
8452 (uniprop_get_decoder, uniprop_get_encoder):
8453 Don't assume fixnum fits in int.
8454 * cmds.c (move_point): New function, that does the gist of
8455 Fforward_char and Fbackward_char, but does so while checking
8456 for integer overflow more accurately.
8457 (Fforward_char, Fbackward_char): Use it.
8458 (Fforward_line, Fend_of_line, internal_self_insert)
8459 (internal_self_insert):
8460 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8461 Fix a FIXME, by checking for integer overflow when calculating
8462 target_clm and actual_clm.
8463 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
8464 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
8465 (ASSURE_DESTINATION, coding_alloc_by_realloc)
8466 (coding_alloc_by_making_gap, alloc_destination)
8467 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
8468 (encode_coding_utf_16, detect_coding_emacs_mule)
8469 (decode_coding_emacs_mule, encode_coding_emacs_mule)
8470 (detect_coding_iso_2022, decode_coding_iso_2022)
8471 (encode_invocation_designation, encode_designation_at_bol)
8472 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
8473 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
8474 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
8475 (encode_coding_ccl, encode_coding_raw_text)
8476 (detect_coding_charset, decode_coding_charset)
8477 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
8478 (produce_composition, produce_charset, produce_annotation)
8479 (decode_coding, handle_composition_annotation)
8480 (handle_charset_annotation, consume_chars, decode_coding_gap)
8481 (decode_coding_object, encode_coding_object, detect_coding_system)
8482 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
8483 (code_convert_region, code_convert_string)
8484 (Fdefine_coding_system_internal)
8485 (coding_set_source, coding_set_destination):
8486 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8487 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
8488 (Fdefine_coding_system_internal):
8489 Don't assume fixnums fit in int.
8490 (decode_coding_gap, decode_coding_object, encode_coding_object)
8491 (Fread_coding_system, Fdetect_coding_region)
8492 (Funencodable_char_position, Fcheck_coding_systems_region)
8493 (get_translation, handle_composition_annotation, consume_chars):
8494 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8495 (consume_chars): Rewrite to not calculate an address outside buffer.
8496 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
8497 Don't access memory outside of the args array.
8498 (Fdefine_coding_system_internal): Check for charset-id overflow.
8499 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
8500 result of ENCODE_CHAR.
8501 * coding.h: Adjust decls to match defn changes elsewhere.
8502 (struct coding_system):
8503 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8504 * composite.c (get_composition_id, find_composition)
8505 (run_composition_function, update_compositions)
8506 (compose_text, composition_gstring_put_cache)
8507 (composition_gstring_p, composition_gstring_width)
8508 (fill_gstring_header, fill_gstring_body, autocmp_chars)
8509 (composition_compute_stop_pos, composition_reseat_it)
8510 (composition_update_it, struct position_record)
8511 (find_automatic_composition, composition_adjust_point)
8512 (Fcomposition_get_gstring, Ffind_composition_internal):
8513 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8514 (update_compositions):
8515 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8516 * composite.h: Adjust decls to match defn changes elsewhere.
8517 (struct composition):
8518 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8519 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
8520 Do not attempt to compute the address of the object just before a
8521 buffer; this is not portable.
8523 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8524 (Faset): Use int, not EMACS_INT, where int is wide enough.
8525 (Fstring_to_number): Don't assume fixnums fit in int.
8526 (Frem): Don't assume arg is nonnegative.
8527 * dbusbind.c (xd_append_arg): Check for integers out of range.
8528 (Fdbus_call_method): Don't overflow the timeout int.
8529 (extract_signed, extract_unsigned): New functions.
8530 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
8531 (xd_get_connection_references): Return ptrdiff_t, not int.
8533 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
8534 (xd_read_message_1):
8535 Use int, not unsigned, where the dbus API uses int.
8536 (Fdbus_message_internal): Don't overflow mtype.
8537 (syms_of_dbusbind): Allocate right-sized buffer for integers.
8538 * dired.c (directory_files_internal, file_name_completion, scmp)
8539 (file_name_completion_stat):
8540 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8541 (file_name_completion): Don't overflow matchcount.
8542 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
8543 * dispextern.h: Adjust decls to match defn changes elsewhere.
8544 (struct text_pos, struct glyph, struct bidi_saved_info)
8545 (struct bidi_string_data, struct bidi_it, struct composition_it)
8547 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8548 (struct display_pos, struct composition_it, struct it):
8549 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8550 * dispnew.c (increment_matrix_positions)
8551 (increment_row_positions, mode_line_string)
8552 (marginal_area_string):
8553 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8554 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
8555 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8556 (duration_to_sec_usec): New function, to check for overflow better.
8557 (Fsleep_for, sit_for): Use it.
8558 * doc.c (get_doc_string, store_function_docstring):
8559 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8560 (get_doc_string, Fsnarf_documentation):
8561 Use int, not EMACS_INT, where int is wide enough.
8563 Use SAFE_ALLOCA, not alloca.
8564 Check for overflow when converting EMACS_INT to off_t.
8565 * doprnt.c (doprnt):
8566 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8567 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
8568 Don't assume uid_t fits into fixnum.
8569 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
8570 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
8571 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
8572 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
8573 (general_insert_function)
8574 (Finsert_char, make_buffer_string, make_buffer_string_both)
8575 (update_buffer_properties, Fbuffer_substring)
8576 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
8577 (Fsubst_char_in_region, check_translation)
8578 (Ftranslate_region_internal, save_restriction_restore, Fformat)
8579 (transpose_markers, Ftranspose_regions):
8580 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8581 (clip_to_bounds): Move to lisp.h as an inline function).
8582 (Fconstrain_to_field): Don't assume integers are nonnegative.
8583 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
8584 (Fsubst_char_in_region, Fsave_restriction):
8585 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8586 (Femacs_pid): Don't assume pid_t fits into fixnum.
8587 (lo_time): Use int, not EMACS_INT, when int suffices.
8588 (lisp_time_argument): Check for usec out of range.
8589 (Fencode_time): Don't assume fixnum fits in int.
8590 (Fuser_login_name, Fuser_full_name): Signal an error
8591 if a uid argument is out of range, rather than relying on
8593 (Fformat_time_string): Remove now-unnecessary check.
8594 lisp_time_argument checks for out-of-range usec now.
8595 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
8596 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
8597 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
8598 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
8599 (init_cmdargs, Fdump_emacs):
8600 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8601 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
8602 the bottom (typically) 32 bits of the fixnum.
8603 * eval.c (specpdl_size, call_debugger):
8604 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8605 (when_entered_debugger, Fbacktrace_debug):
8606 Don't assume fixnum can fit in int.
8607 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
8608 the object just before a buffer; this is not portable.
8609 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
8610 (grow_specpdl, unbind_to):
8611 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8612 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
8613 (grow_specpdl): Simplify allocation by using xpalloc.
8614 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
8615 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
8616 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
8617 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8618 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
8620 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8621 (Fcopy_file, non_regular_nbytes, read_non_regular)
8622 (Finsert_file_contents):
8623 Use int, not EMACS_INT, where int is wide enough.
8624 (READ_BUF_SIZE): Verify that it fits in int.
8625 (Finsert_file_contents): Check that counts are in proper range,
8626 rather than assuming fixnums fit into ptrdiff_t etc.
8627 Don't assume fixnums fit into int.
8628 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
8629 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
8630 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
8631 (string_char_to_byte, string_byte_to_char)
8632 (string_make_multibyte, string_to_multibyte)
8633 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
8634 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
8635 (substring_both, Fdelete, internal_equal, Ffillarray)
8636 (Fclear_string, mapcar1)
8637 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
8638 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
8639 (larger_vector, make_hash_table, maybe_resize_hash_table)
8640 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
8641 (Fmaphash, secure_hash):
8642 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8643 (concat): Check for string index and length overflow.
8644 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
8646 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8647 (larger_vector): New API (vec, incr_min, size_max) replaces old
8648 one (vec, new_size, init). This catches size overflow.
8649 INIT was removed because it was always Qnil.
8650 All callers changed.
8651 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
8652 the upper bound on a hash table index size.
8653 (make_hash_table, maybe_resize_hash_table): Use it.
8654 (secure_hash): Computer start_byte and end_byte only after
8655 they're known to be in ptrdiff_t range.
8656 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
8657 (Ffont_get_glyphs, Ffont_at):
8658 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8659 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
8660 (Flist_fonts, Fopen_font):
8661 Don't assume fixnum can fit in int.
8662 (check_gstring): Don't assume index can fit in int.
8663 (font_match_p): Check that fixnum is a character, not a nonnegative
8664 fixnum, since the later code needs to stuff it into an int.
8665 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
8666 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
8667 conversion overflow issues.
8668 (Fopen_font): Check for integer out of range.
8669 (Ffont_get_glyphs): Don't assume index can fit in int.
8670 * font.h: Adjust decls to match defn changes elsewhere.
8671 * fontset.c (reorder_font_vector): Redo score calculation to avoid
8673 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
8674 printmax_t, where ptrdiff_t is wide enough.
8675 (Finternal_char_font):
8676 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8677 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
8678 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
8679 (Fset_frame_position, x_set_frame_parameters)
8680 (x_set_line_spacing, x_set_border_width)
8681 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
8682 Check that fixnums are in proper range for system types.
8683 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
8684 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8685 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
8686 Use SAFE_ALLOCA_LISP, not alloca.
8687 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
8688 intptr_t is wide enough.
8689 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
8690 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
8691 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
8692 Check for fixnum out of range.
8693 * ftfont.c (ftfont_list): Don't assume index fits in int.
8694 Check that fixnums are in proper range for system types.
8695 (ftfont_shape_by_flt):
8696 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8697 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
8698 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8699 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
8700 Check that fixnums are in proper range for system types.
8701 * gnutls.h: Adjust decls to match defn changes elsewhere.
8702 * gtkutil.c (xg_dialog_run):
8703 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8704 (update_frame_tool_bar):
8705 Check that fixnums are in proper range for system types.
8706 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
8707 (lookup_image): Check that fixnums are in range for system types.
8708 * indent.c (last_known_column, last_known_column_point):
8709 (current_column_bol_cache):
8710 (skip_invisible, current_column, check_display_width):
8711 (check_display_width, scan_for_column, current_column_1)
8712 (Findent_to, Fcurrent_indentation, position_indentation)
8713 (indented_beyond_p, Fmove_to_column, compute_motion):
8714 (Fcompute_motion, Fvertical_motion):
8715 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8716 (last_known_column_modified): Use EMACS_INT, not int.
8717 (check_display_width):
8719 Check that fixnums and floats are in proper range for system types.
8720 (compute_motion): Don't assume index or fixnum fits in int.
8721 (compute_motion, Fcompute_motion):
8722 Use int, not EMACS_INT, when it is wide enough.
8723 (vmotion): Omit local var start_hpos that is always 0; that way
8724 we don't need to worry about overflow in expressions involving it.
8725 * indent.h: Adjust decls to match defn changes elsewhere.
8727 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8728 Use int, not EMACS_INT, where int is wide enough.
8729 Remove unused members ovstring_chars_done and tab_offset;
8731 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
8732 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
8733 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
8734 (make_gap, copy_text, insert, insert_and_inherit)
8735 (insert_before_markers, insert_before_markers_and_inherit)
8736 (insert_1, count_combining_before, count_combining_after)
8737 (insert_1_both, insert_from_string)
8738 (insert_from_string_before_markers, insert_from_string_1)
8739 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
8740 (adjust_after_replace, adjust_after_insert, replace_range)
8741 (replace_range_2, del_range, del_range_1, del_range_byte)
8742 (del_range_both, del_range_2, modify_region)
8743 (prepare_to_modify_buffer, signal_before_change)
8744 (signal_after_change, Fcombine_after_change_execute):
8745 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8746 * intervals.c (traverse_intervals, rotate_right, rotate_left)
8747 (balance_an_interval, split_interval_right, split_interval_left)
8748 (find_interval, next_interval, update_interval)
8749 (adjust_intervals_for_insertion, delete_node, delete_interval)
8750 (interval_deletion_adjustment, adjust_intervals_for_deletion)
8751 (static_offset_intervals, offset_intervals)
8752 (merge_interval_right, merge_interval_left, make_new_interval)
8753 (graft_intervals_into_buffer, temp_set_point_both)
8754 (temp_set_point, set_point, adjust_for_invis_intang)
8755 (set_point_both, move_if_not_intangible, get_property_and_range)
8756 (get_local_map, copy_intervals, copy_intervals_to_string)
8757 (compare_string_intervals, set_intervals_multibyte_1):
8758 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8759 * intervals.h: Adjust decls to match defn changes elsewhere.
8761 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8762 * keyboard.c (this_command_key_count, this_single_command_key_start)
8763 (before_command_key_count, before_command_echo_length, echo_now)
8764 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
8765 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
8766 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
8767 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
8768 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8769 (last_non_minibuf_size, last_point_position, echo_truncate)
8770 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
8771 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
8772 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
8773 (stuff_buffered_input):
8774 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8775 (last_auto_save, command_loop_1, read_char):
8776 Use EMACS_INT, not int, to avoid integer overflow.
8777 (record_char): Avoid overflow in total_keys computation.
8778 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
8779 * keyboard.h: Adjust decls to match defn changes elsewhere.
8780 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
8781 (Fkey_description, Fdescribe_vector, Flookup_key):
8782 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8783 (click_position): New function, to check that positions are in range.
8784 (Fcurrent_active_maps):
8786 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8787 (Faccessible_keymaps, Fkey_description):
8788 (preferred_sequence_p):
8789 Don't assume fixnum can fit into int.
8790 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
8791 Check for integer overflow in size calculations.
8792 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
8793 avoid mishandling large integers.
8794 * lisp.h: Adjust decls to match defn changes elsewhere.
8795 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
8796 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
8797 (struct Lisp_Marker):
8798 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8799 (clip_to_bounds): Now an inline function, moved here from editfns.c.
8800 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
8801 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
8802 All callers changed.
8803 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
8804 Assume the arg has valid form, since it always does.
8805 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
8806 unsigned integer system type.
8807 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
8808 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
8809 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8810 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
8811 (duration_to_sec_usec): New decl.
8812 * lread.c (read_from_string_index, read_from_string_index_byte)
8813 (read_from_string_limit, readchar, unreadchar, openp)
8814 (read_internal_start, read1, oblookup):
8815 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8816 (Fload, readevalloop, Feval_buffer, Feval_region):
8817 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8818 (openp): Check for out-of-range argument to 'access'.
8819 (read1): Use int, not EMACS_INT, where int is wide enough.
8820 Don't assume fixnum fits into int.
8821 Fix off-by-one error that can read outside a buffer.
8822 (read_filtered_event): Use duration_to_sec_usec
8823 to do proper overflow checking on durations.
8824 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
8825 in size calculation.
8826 (Fexecute_kbd_macro):
8827 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8828 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
8829 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
8830 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
8831 (set_marker_both, set_marker_restricted_both, marker_position)
8832 (marker_byte_position, Fbuffer_has_markers_at):
8833 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8834 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
8835 * menu.c (ensure_menu_items): Rename from grow_menu_items.
8836 It now merely ensures that the menu is large enough, without
8837 necessarily growing it, as this avoids some integer overflow issues.
8838 All callers changed.
8839 (keymap_panes, parse_single_submenu, Fx_popup_menu):
8840 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8841 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
8842 Use SAFE_ALLOCA_LISP, not alloca.
8843 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
8844 to EMACS_INT. Check that fixnums are in proper range for system types.
8845 * minibuf.c (minibuf_prompt_width, string_to_object)
8846 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
8847 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
8848 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8849 (get_minibuffer, read_minibuf_unwind):
8850 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8851 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
8852 this simplifies overflow checking. All callers changed.
8853 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
8855 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8856 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
8857 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
8858 Check that fixnums are in proper range for system types.
8859 (Fx_create_frame, Fx_show_tip):
8860 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8861 * nsfont.m (ns_findfonts, nsfont_list_family):
8862 Don't assume fixnum fits in long.
8863 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
8864 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8865 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
8867 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
8868 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8869 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
8870 (PRINTDECLARE, PRINTPREPARE):
8871 (strout, print_string):
8872 (print, print_preprocess, print_check_string_charset_prop)
8874 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8876 (temp_output_buffer_setup, Fprin1_to_string, print_object):
8877 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8878 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
8879 (printchar, strout): Use xpalloc to catch size calculation overflow.
8880 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
8881 (print_error_message): Use SAFE_ALLOCA, not alloca.
8882 (print_object): Use int, not EMACS_INT, where int is wide enough.
8883 (print_depth, new_backquote_output, print_number_index):
8884 Use ptrdiff_t, not int, where int might not be wide enough.
8885 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
8886 (Fset_process_window_size, Fformat_network_address)
8887 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
8889 Check that fixnums are in proper range for system types.
8890 (Fsignal_process): Simplify by avoiding a goto.
8891 Check for process-ids out of pid_t range rather than relying on
8893 (process_tick, update_tick): Use EMACS_INT, not int.
8894 (Fformat_network_address, read_process_output, send_process)
8895 (Fprocess_send_region, status_notify):
8896 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8897 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
8898 (wait_reading_process_output, read_process_output, exec_sentinel):
8899 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8900 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
8901 (Faccept_process_output): Use duration_to_sec_usec to do proper
8902 overflow checking on durations.
8903 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
8904 Don't assume pid_t fits in int.
8905 * process.h (struct Lisp_Process): Members tick and update_tick
8906 are now of type EMACS_INT, not int.
8907 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
8908 configured --with-wide-int.
8909 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
8910 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
8911 * search.c (looking_at_1, string_match_1):
8912 (fast_string_match, fast_c_string_match_ignore_case)
8913 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
8914 (scan_newline, find_before_next_newline, search_command)
8915 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
8916 (set_search_regs, wordify):
8919 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8920 (string_match_1, search_buffer, set_search_regs):
8922 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8923 (wordify): Check for overflow in size calculation.
8924 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
8925 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
8926 Check that fixnums are in proper range for system types.
8927 * sound.c (struct sound_device)
8928 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
8929 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8930 (Fplay_sound_internal):
8931 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8932 * syntax.c (struct lisp_parse_state, find_start_modiff)
8933 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
8934 (Fparse_partial_sexp):
8935 Don't assume fixnums can fit in int.
8936 (struct lisp_parse_state, find_start_pos, find_start_value)
8937 (find_start_value_byte, find_start_begv)
8938 (update_syntax_table, char_quoted, dec_bytepos)
8939 (find_defun_start, prev_char_comend_first, back_comment):
8940 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
8941 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
8942 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8943 (Finternal_describe_syntax_value): Check that match_lisp is a
8944 character, not an integer, since the code stuffs it into int.
8945 (scan_words, scan_sexps_forward):
8946 Check that fixnums are in proper range for system types.
8948 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8949 (scan_sexps_forward):
8950 Use CHARACTERP, not INTEGERP, since the value must fit into int.
8951 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
8952 * syntax.h: Adjust decls to match defn changes elsewhere.
8953 (struct gl_state_s):
8954 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8955 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
8956 MOST_POSITIVE_FIXNUM.
8957 * sysdep.c (wait_for_termination_1, wait_for_termination)
8958 (interruptible_wait_for_termination, mkdir):
8959 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
8960 (emacs_read, emacs_write):
8961 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8962 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
8963 and double all fit in int.
8964 * term.c (set_tty_color_mode):
8965 Check that fixnums are in proper range for system types.
8966 * termhooks.h (struct input_event):
8967 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8968 * textprop.c (validate_interval_range, interval_of)
8969 (Fadd_text_properties, set_text_properties_1)
8970 (Fremove_text_properties, Fremove_list_of_text_properties)
8971 (Ftext_property_any, Ftext_property_not_all)
8972 (copy_text_properties, text_property_list, extend_property_ranges)
8973 (verify_interval_modification):
8974 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8975 (Fnext_single_char_property_change)
8976 (Fprevious_single_char_property_change):
8977 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8978 (copy_text_properties):
8979 Check for integer overflow in index calculation.
8980 * undo.c (last_boundary_position, record_point, record_insert)
8981 (record_delete, record_marker_adjustment, record_change)
8982 (record_property_change):
8983 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8984 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
8985 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8986 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
8987 (Fx_hide_tip, Fx_file_dialog):
8988 * w32menu.c (set_frame_menubar):
8989 Use ptrdiff_t, not int, for consistency with rest of code.
8990 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
8991 (select_window, Fdelete_other_windows_internal)
8992 (window_scroll_pixel_based, window_scroll_line_based)
8993 (Frecenter, Fset_window_configuration):
8994 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
8995 (Fset_window_hscroll, run_window_configuration_change_hook)
8996 (set_window_buffer, temp_output_buffer_show, scroll_command)
8997 (Fscroll_other_window, Frecenter):
8998 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
8999 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
9000 Don't assume fixnum fits in int.
9001 (Fset_window_scroll_bars):
9002 Check that fixnums are in proper range for system types.
9003 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
9004 (string_pos, c_string_pos, number_of_chars, init_iterator)
9005 (in_ellipses_for_invisible_text_p, init_from_display_pos)
9006 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
9007 (compute_display_string_end, handle_face_prop)
9008 (face_before_or_after_it_pos, handle_invisible_prop)
9009 (handle_display_prop, handle_display_spec, handle_single_display_spec)
9010 (display_prop_intangible_p, string_buffer_position_lim)
9011 (string_buffer_position, handle_composition_prop, load_overlay_strings)
9012 (get_overlay_strings_1, get_overlay_strings)
9013 (iterate_out_of_display_property, forward_to_next_line_start)
9014 (back_to_previous_visible_line_start, reseat, reseat_to_string)
9015 (get_next_display_element, set_iterator_to_next)
9016 (get_visually_first_element, compute_stop_pos_backwards)
9017 (handle_stop_backwards, next_element_from_buffer)
9018 (move_it_in_display_line_to, move_it_in_display_line)
9019 (move_it_to, move_it_vertically_backward, move_it_by_lines)
9020 (add_to_log, message_dolog, message_log_check_duplicate)
9021 (message2, message2_nolog, message3, message3_nolog
9022 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
9023 (current_message_1, truncate_echo_area, truncate_message_1)
9024 (set_message, set_message_1, store_mode_line_noprop)
9025 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
9026 (text_outside_line_unchanged_p, check_point_in_composition)
9027 (reconsider_clip_changes)
9028 (redisplay_internal, set_cursor_from_row, try_scrolling)
9029 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
9030 (redisplay_window, find_last_unchanged_at_beg_row)
9031 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
9032 (trailing_whitespace_p, find_row_edges, display_line)
9033 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
9034 (display_mode_element, store_mode_line_string)
9035 (pint2str, pint2hrstr, decode_mode_spec)
9036 (display_count_lines, display_string, draw_glyphs)
9037 (x_produce_glyphs, x_insert_glyphs)
9038 (rows_from_pos_range, mouse_face_from_buffer_pos)
9039 (fast_find_string_pos, mouse_face_from_string_pos)
9040 (note_mode_line_or_margin_highlight, note_mouse_highlight):
9041 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9042 (safe_call, init_from_display_pos, handle_fontified_prop)
9043 (handle_single_display_spec, load_overlay_strings)
9044 (with_echo_area_buffer, setup_echo_area_for_printing)
9045 (display_echo_area, echo_area_display)
9046 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
9047 (update_tool_bar, hscroll_window_tree, redisplay_internal)
9048 (redisplay_window, dump_glyph_row, display_mode_line)
9049 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
9050 (handle_display_spec, display_prop_string_p):
9051 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9052 (handle_single_display_spec, build_desired_tool_bar_string)
9053 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
9054 (get_specified_cursor_type):
9055 Check that fixnums are in proper range for system types.
9056 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
9057 (Flookup_image_map):
9058 Don't assume fixnums fit in int.
9059 (compare_overlay_entries):
9060 Avoid mishandling comparisons due to subtraction overflow.
9061 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
9062 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
9063 (handle_tool_bar_click):
9064 Use int, not unsigned, since we prefer signed and the signedness
9065 doesn't matter here.
9066 (get_next_display_element, next_element_from_display_vector):
9067 Use int, not EMACS_INT, when int is wide enough.
9068 (start_hourglass): Use duration_to_sec_usec to do proper
9069 overflow checking on durations.
9070 * xfaces.c (Fbitmap_spec_p):
9071 Check that fixnums are in proper range for system types.
9072 (compare_fonts_by_sort_order):
9073 Avoid mishandling comparisons due to subtraction overflow.
9074 (Fx_family_fonts, realize_basic_faces):
9075 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9077 Don't assume fixnum fits in int.
9078 Use SAFE_ALLOCA_LISP, not alloca.
9079 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
9080 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
9081 (face_at_buffer_position, face_for_overlay_string)
9082 (face_at_string_position):
9083 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9084 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
9085 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
9087 Check that fixnums are in proper range for system types.
9088 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
9089 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
9090 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9091 (Fx_change_window_property): Don't assume fixnums fit in int.
9092 * xfont.c (xfont_chars_supported):
9093 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9094 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
9095 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
9096 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9097 * xml.c (parse_region):
9098 * xrdb.c (magic_file_p):
9099 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
9100 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
9101 (x_get_local_selection, x_reply_selection_request)
9102 (x_handle_selection_request, wait_for_property_change):
9103 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9104 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
9105 short is wide enough.
9106 (x_send_client_event): Don't assume fixnum fits in int.
9107 * xterm.c (x_x_to_emacs_modifiers):
9108 Don't assume EMACS_INT overflows nicely into int.
9109 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
9111 (handle_one_xevent): NATNUMP can eval its arg twice.
9112 (x_connection_closed):
9113 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
9114 * xterm.h: Adjust decls to match defn changes elsewhere.
9115 (struct scroll_bar): Use struct vectorlike_header
9116 rather than rolling our own approximation.
9117 (SCROLL_BAR_VEC_SIZE): Remove; not used.
9119 2012-05-25 Glenn Morris <rgm@gnu.org>
9121 * lisp.mk (lisp): Update for more files being compiled now.
9123 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
9125 * lread.c: Remove `read_pure' which makes no difference.
9126 (read_pure): Remove var.
9127 (unreadpure): Remove function.
9128 (readevalloop): Don't call read_list with -1 flag.
9129 (read1, read_vector): Don't test read_pure any more.
9130 (read_list): Simplify.
9132 * fileio.c, character.h: Minor style tweaks.
9134 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
9136 * window.h (clip_changed): Remove useless declaration.
9138 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
9140 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
9141 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
9143 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
9146 This directory predates autoconf and is no longer needed nowadays.
9147 Move its few remaining bits of functionality to where they're needed.
9148 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
9149 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
9150 * m/template.h: Remove.
9151 * Makefile.in (M_FILE): Remove. All uses removed.
9152 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
9153 * lisp.h (USE_LSB_TAG):
9154 * mem-limits.h (EXCEEDS_LISP_PTR):
9155 Use VAL_MAX, not VALBITS, in #if.
9156 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
9157 (EMACS_UINT): Define unconditionally now.
9158 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
9159 (BITS_PER_EMACS_INT): New constants, replacing
9160 what used to be in config.h, but not useful in #if.
9161 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
9162 define them any more.
9163 (VAL_MAX): New macro.
9165 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
9166 BITS_PER_EMACS_INT, in #if.
9167 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
9168 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
9169 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
9170 * s/ms-w32.h (DATA_START):
9171 Move here from removed file m/intel386.h.
9172 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
9173 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
9175 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
9177 Assume C89 or later.
9178 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
9179 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
9181 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
9182 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
9183 * textprop.c, tparam.c (NULL): Remove.
9184 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
9185 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
9186 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
9187 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
9188 * xterm.c (input_signal_count): Assume volatile works.
9190 2012-05-21 Ken Brown <kbrown@cornell.edu>
9192 * xgselect.c (xg_select): Fix first argument in call to 'select'
9195 2012-05-20 Ken Brown <kbrown@cornell.edu>
9197 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
9198 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
9200 2012-05-19 Ken Brown <kbrown@cornell.edu>
9202 * xfns.c (x_in_use): Remove `static' qualifier.
9203 * xterm.h (x_in_use): Declare.
9204 * xgselect.c: Include xterm.h.
9205 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
9206 and `display_arg' (bug#9754).
9208 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
9210 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
9212 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
9213 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
9215 2012-05-18 Eli Zaretskii <eliz@gnu.org>
9217 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
9219 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
9220 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
9222 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
9223 reference to image_cache->refcount.
9224 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
9226 2012-05-17 Juri Linkov <juri@jurta.org>
9228 * search.c (Fword_search_regexp, Fword_search_backward)
9229 (Fword_search_forward, Fword_search_backward_lax)
9230 (Fword_search_forward_lax): Move functions to isearch.el
9231 (bug#10145, bug#11381).
9233 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
9235 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
9237 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
9239 * lread.c (init_obarray): Declare Qt and Qnil as special.
9241 2012-05-14 Glenn Morris <rgm@gnu.org>
9243 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
9244 Put "libexec" before "bin", for the sake of init_callproc_1.
9246 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
9248 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
9250 * unexaix.c: Port to more-recent AIX compilers.
9251 (report_error, report_error_1, make_hdr, copy_sym)
9252 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
9253 Make arguments const char *, not char *, to avoid violations of C
9254 standard and to fix some AIX warnings reported by Gilles Pion.
9256 2012-05-14 Eli Zaretskii <eliz@gnu.org>
9258 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
9259 already have overlays loaded.
9260 (handle_single_display_spec): Before returning without displaying
9261 fringe bitmap, synchronize the bidi iterator with the main display
9262 iterator, by calling iterate_out_of_display_property.
9263 (iterate_out_of_display_property): Detect buffer iteration by
9264 testing that it->string is a Lisp string.
9265 (get_next_display_element): When the current object is exhausted,
9266 and there's something on it->stack, call set_iterator_to_next to
9267 proceed with what's on the stack, instead of returning zero.
9268 (set_iterator_to_next): If called at the end of a Lisp string,
9269 proceed to consider_string_end without incrementing string
9270 position. Don't increment display vector index past the end of
9271 the display vector. (Bug#11417)
9272 (pos_visible_p): Don't report a position visible when move_it_to
9273 stopped at the last line of window, which happens to be scanned
9274 backwards by the bidi iteration. (Bug#11464)
9276 2012-05-14 Eli Zaretskii <eliz@gnu.org>
9278 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
9279 and right-margin display specs even if the spec is invalid or we
9280 are on a TTY, and thus unable to display on the fringes.
9281 That's because the text with the property will not be displayed anyway,
9282 so we need to signal to the caller that this is a "replacing"
9283 display spec. This fixes display when the spec is invalid or we
9286 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
9288 * unexaix.c (make_hdr): Fix typo in prototype.
9289 This bug broke the build on AIX. Problem reported by Gilles Pion.
9291 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
9293 * keyboard.c (kbd_buffer_get_event): Read special events also in
9294 batch mode. (Bug#11415)
9296 2012-05-12 Glenn Morris <rgm@gnu.org>
9298 * ns.mk: Update for ns_appbindir no longer having trailing "/".
9300 2012-05-12 Eli Zaretskii <eliz@gnu.org>
9302 * lisp.mk (lisp): Add newcomment.elc.
9304 2012-05-12 Glenn Morris <rgm@gnu.org>
9306 * Makefile.in (MKDIR_P): New, set by configure.
9307 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
9309 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
9311 Remove unused function hourglass_started.
9312 * dispextern.h (hourglass_started):
9313 * w32fns.c (hourglass_started):
9314 * xdisp.c (hourglass_started): Remove.
9316 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
9318 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
9319 Update dependencies.
9321 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
9323 * xgselect.c (xg_select): Put maxfds+1 into a var.
9324 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
9326 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
9328 2012-05-10 Dave Abrahams <dave@boostpro.com>
9330 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
9331 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
9333 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
9335 * dbusbind.c (xd_registered_buses): New internal Lisp object.
9336 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
9337 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
9338 Initialize xd_registered_buses.
9340 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
9342 Untag more efficiently if USE_LSB_TAG.
9343 This is based on a proposal by YAMAMOTO Mitsuharu in
9344 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
9345 For an admittedly artificial (nth 8000 longlist) benchmark on
9346 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
9347 Emacs's overall text size by 1%.
9348 * lisp.h (XUNTAG): New macro.
9349 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
9350 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
9351 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
9352 * eval.c (Fautoload):
9353 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
9354 * frame.h (XFRAME): Use XUNTAG.
9356 Port recent dbusbind.c changes to 32-bit --with-wide-int.
9357 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
9358 Remove unportable assumptions about print widths of types like
9360 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
9361 intptr_t when converting between pointer and integer, to avoid GCC
9362 warnings about wrong width.
9364 2012-05-09 Eli Zaretskii <eliz@gnu.org>
9366 * w32proc.c (new_child): Force Windows to reserve only 64KB of
9367 stack for each reader_thread, instead of defaulting to 8MB
9368 determined by the linker. This avoids failures in creating
9369 subprocesses on Windows 7, see the discussion in this thread:
9370 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
9372 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
9374 Fix up display of the *Minibuf-0* buffer in the mini window.
9375 * keyboard.c (read_char): Don't clear the echo area if there's no
9377 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
9378 contents of *Minibuf-0*) if there's no message displayed in its stead.
9380 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
9382 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
9385 2012-05-06 Chong Yidong <cyd@gnu.org>
9387 * lisp.mk (lisp): Update.
9389 2012-05-05 Jim Meyering <meyering@redhat.com>
9391 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
9393 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
9395 * data.c (PUT_ERROR): New macro.
9396 (syms_of_data): Use it. Add new error type `user-error'.
9397 * undo.c (user_error): New function.
9398 (Fprimitive_undo): Use it.
9399 * print.c (print_error_message): Adjust print style for `user-error'.
9400 * keyboard.c (user_error): New function.
9401 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
9403 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
9405 Do not limit current-time-string to years 1000..9999.
9406 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
9407 (Fcurrent_time_string): Support any year that is supported by the
9408 underlying localtime representation. Don't use asctime, as it
9409 has undefined behavior for years outside the range -999..9999.
9411 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
9413 Fix race conditions involving setenv, gmtime, localtime, asctime.
9414 Without this fix, interrupts could mess up code that uses these
9415 nonreentrant functions, since setting TZ invalidates existing
9416 tm_zone or tzname values, and since most of these functions return
9417 pointers to static storage.
9418 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
9419 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
9420 Grow the critical sections to include not just invoking
9421 localtime/gmtime, but also accessing these functions' results
9422 including their tm_zone values if any, and any related TZ setting.
9423 (format_time_string): Last arg is now struct tm *, not struct tm **,
9424 so that the struct tm is saved in the critical section.
9425 All callers changed. Simplify allocation of initial buffer, partly
9426 motivated by the fact that memory allocation needs to be outside
9427 the critical section.
9429 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
9431 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
9432 with RESET_INTERVAL.
9434 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
9435 Remove duplicated buffer name initialization.
9437 2012-05-02 Jim Meyering <jim@meyering.net>
9439 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
9441 * xfns.c (x_window): Use xstrdup (Bug#11375).
9443 2012-05-02 Eli Zaretskii <eliz@gnu.org>
9445 * xdisp.c (pos_visible_p): If already at a newline from the
9446 display string before the 'while' loop, don't walk back the glyphs
9447 from it3.glyph_row. Solves assertion violation when the display
9448 string begins with a newline (egg.el). (Bug#11367)
9450 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
9452 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
9455 2012-05-01 Glenn Morris <rgm@gnu.org>
9457 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
9458 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
9459 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
9460 All were removed before 23.1.
9462 * dispnew.c: Remove HAVE_LIBNCURSES test;
9463 it is always true on relevant platforms.
9465 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
9466 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
9468 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
9470 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
9472 * .gdbinit (xpr): Remove checks for no longer existing misc types.
9473 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
9476 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
9478 Do not avoid creating empty evaporating overlays (Bug#9642).
9479 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
9480 That is, do not delete an evaporating overlay if it becomes
9481 empty after its bounds are adjusted to fit within its buffer.
9482 This fix caused other problems, and I'm reverting it until we get
9483 to the bottom of them.
9485 2012-04-27 Chong Yidong <cyd@gnu.org>
9487 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
9489 2012-04-27 Eli Zaretskii <eliz@gnu.org>
9491 * xdisp.c (pos_visible_p): If the window start position is beyond
9492 ZV, start the display from buffer beginning. Prevents assertion
9493 violation in init_iterator when the minibuffer window is scrolled
9496 * window.c (window_scroll_pixel_based): Likewise.
9498 2012-04-27 Chong Yidong <cyd@gnu.org>
9500 * keymap.c (where_is_internal): Doc fix (Bug#10872).
9502 2012-04-27 Glenn Morris <rgm@gnu.org>
9504 * fileio.c (Fcopy_file, Fset_file_selinux_context):
9505 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
9507 2012-04-27 Eli Zaretskii <eliz@gnu.org>
9509 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
9510 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
9512 2012-04-26 Eli Zaretskii <eliz@gnu.org>
9514 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
9515 display element, check also the underlying string or buffer
9516 character. (Bug#11341)
9518 * w32menu.c: Include w32heap.h.
9519 (add_menu_item): If the call to AppendMenuW (via
9520 unicode_append_menu) fails, disable Unicode menus only if we are
9521 running on Windows 9X/Me.
9523 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
9525 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
9526 (xgetint): Add missing shift for LSB tags.
9528 2012-04-24 Martin Rudalics <rudalics@gmx.at>
9530 * keyboard.c (read_char): Don't wipe echo area for select window
9531 events: These might get delayed via `mouse-autoselect-window'
9534 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
9536 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
9537 manipulation of :loaded-from data.
9539 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
9541 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
9542 now a cons (bug#11311).
9544 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
9546 Do not create empty overlays with the evaporate property (Bug#9642).
9547 * buffer.c (Fmove_overlay): Delete an evaporating overlay
9548 if it becomes empty after its bounds are adjusted to fit within
9549 its buffer. Without this fix, in a nonempty buffer (let ((o
9550 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
9551 yields an empty overlay that has the evaporate property, which is
9552 not supposed to happen.
9554 Fix minor GTK3 problems found by static checking.
9555 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9556 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9557 (struct _EmacsFixedClass, emacs_fixed_get_type):
9558 Move decls here from emacsgtkfixed.h, since they needn't be public.
9559 (emacs_fixed_get_type): Now static.
9560 (emacs_fixed_class_init): Omit unused local.
9561 (emacs_fixed_child_type): Remove; unused.
9562 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
9563 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
9564 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
9565 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
9566 (EMACS_FIXED_GET_CLASS): Remove; unused.
9567 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
9569 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
9570 Problem reported by Juanma Barranquero for Windows -Wunused-function.
9572 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9574 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
9575 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
9576 (__malloc_size_t, __malloc_ptrdiff_t):
9577 Remove. All uses removed, replaced by the definiens if needed,
9578 since we can assume C89 or better now.
9579 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
9580 (protect_malloc_state, align, get_contiguous_space)
9581 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
9582 (malloc_atfork_handler_child, malloc_enable_thread)
9583 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
9584 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
9585 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
9586 (special_realloc, _realloc_internal_nolock, _realloc_internal)
9587 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
9588 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
9589 Define using prototypes, not old style.
9590 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
9591 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
9592 (align): Don't assume that signed integer overflow wraps around.
9593 Omit unused local var.
9594 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
9595 (_free_internal_nolock, memalign, mallochook, reallochook):
9596 Omit no-longer-needed casts.
9597 (valloc): Use getpagesize, not __getpagesize.
9598 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
9599 (struct hdr): The 'magic' member is now size_t, not unsigned long.
9601 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
9603 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
9605 Move functions from C to Lisp. Make non-blocking method calls
9606 the default. Implement further D-Bus standard interfaces.
9608 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
9609 (QCdbus_request_name_allow_replacement)
9610 (QCdbus_request_name_replace_existing)
9611 (QCdbus_request_name_do_not_queue)
9612 (QCdbus_request_name_reply_primary_owner)
9613 (QCdbus_request_name_reply_in_queue)
9614 (QCdbus_request_name_reply_exists)
9615 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
9616 (QCdbus_registered_serial, QCdbus_registered_method)
9617 (QCdbus_registered_signal): New Lisp objects.
9618 (XD_DEBUG_MESSAGE): Use sizeof.
9619 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
9620 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
9621 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
9622 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
9623 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
9624 (xd_signature, xd_append_arg): Allow float for integer types.
9625 (xd_get_connection_references): New function.
9626 (xd_get_connection_address): Rename from xd_initialize.
9627 Return cached address.
9628 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
9629 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
9631 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
9632 Return number of refcounts.
9633 (Fdbus_get_unique_name): Make stronger parameter check.
9634 (Fdbus_message_internal): New defun.
9635 (Fdbus_call_method, Fdbus_call_method_asynchronously)
9636 (Fdbus_method_return_internal, Fdbus_method_error_internal)
9637 (Fdbus_send_signal, Fdbus_register_service)
9638 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
9639 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
9640 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
9641 (Vdbus_compiled_version, Vdbus_runtime_version)
9642 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
9643 (Vdbus_message_type_method_return, Vdbus_message_type_error)
9644 (Vdbus_message_type_signal): New defvars.
9645 (Vdbus_registered_buses, Vdbus_registered_objects_table):
9648 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9650 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
9651 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
9652 Do not assume ptrdiff_t is the same width as 'int'.
9654 * alloc.c: Handle unusual debugging option combinations.
9655 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
9656 since the two debugging options are incompatible.
9657 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
9659 (mem_init, mem_insert, mem_insert_fixup):
9660 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
9661 (NEED_MEM_INSERT): Remove; no longer needed.
9663 2012-04-22 Leo Liu <sdl.web@gmail.com>
9665 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
9667 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
9669 * sysdep.c [__FreeBSD__]: Minor cleanups.
9670 (list_system_processes, system_process_attributes) [__FreeBSD__]:
9671 Use Emacs indenting style more consistently. Avoid some casts.
9672 Use 'double' consistently rather than mixing 'float' and 'double'.
9674 2012-04-21 Eduard Wiebe <usenet@pusto.de>
9676 * sysdep.c (list_system_processes, system_process_attributes):
9677 Add implementation for FreeBSD (Bug#5243).
9679 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
9681 * lisp.mk (lisp): Update.
9683 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
9685 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
9686 It is never used otherwise.
9688 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
9690 * print.c (print_preprocess): Only check print_depth if print-circle
9692 (print_object): Check for cycles even when print-circle is nil and
9693 print-gensym is t, but only check print_depth if print-circle is nil.
9695 2012-04-20 Chong Yidong <cyd@gnu.org>
9697 * process.c (wait_reading_process_output): If EIO occurs on a pty,
9698 set the status to "failed" and ensure that sentinel is run.
9700 2012-04-20 Glenn Morris <rgm@gnu.org>
9702 * process.c (Fset_process_inherit_coding_system_flag)
9703 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
9704 (Fmake_network_process, Fmake_serial_process): Doc fix.
9706 2012-04-20 Eli Zaretskii <eliz@gnu.org>
9708 * xdisp.c (string_buffer_position_lim): Limit starting position to
9710 (set_cursor_from_row): If called for a mode-line or header-line
9711 row, return zero immediately.
9712 (try_cursor_movement): If inside continuation line, don't back up
9713 farther than the first row after the header line, if any.
9714 Don't consider the header-line row as "partially visible", even if
9715 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
9717 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
9719 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
9722 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
9723 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
9725 configure: new option --enable-gcc-warnings (Bug#11207)
9726 * Makefile.in (C_WARNINGS_SWITCH): Remove.
9727 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
9728 (ALL_CFLAGS): Use new macros rather than old.
9729 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
9730 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
9731 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
9732 -Wunused-result, -Wunused-variable. This should go away once
9733 the Emacs and Gnulib regex code is merged.
9734 (xmalloc, xrealloc): Now static.
9736 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
9738 * dired.c (Fsystem_groups): Remove unused local.
9740 2012-04-17 Glenn Morris <rgm@gnu.org>
9742 * dired.c (Fsystem_users): Doc fix.
9744 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
9746 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
9747 (syms_of_dired): Add them.
9749 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
9751 Fix minor alloc.c problems found by static checking.
9752 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
9753 New extern decls, to avoid calling undeclared functions.
9754 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
9755 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
9756 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
9757 (NEED_MEM_INSERT): New macro.
9758 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
9759 Remove one incorrect comment and fix another.
9761 Fix minor ralloc.c problems found by static checking.
9762 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9763 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
9764 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
9765 (r_alloc_sbrk): Now static.
9767 Improve ralloc.c interface checking.
9768 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
9769 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
9770 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
9771 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
9772 [REL_ALLOC]: ... to here, to check interface.
9773 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
9774 Remove decls. This fixes an "It stinks!".
9776 * alloc.c (which_symbols): Fix alignment issue / type clash.
9778 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
9780 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
9781 (struct Lisp_Misc_Any): Likewise.
9782 (struct Lisp_Free): Likewise.
9783 * alloc.c (union aligned_Lisp_Symbol): Define.
9784 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
9785 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
9786 (union aligned_Lisp_Misc): Define.
9787 (MARKER_BLOCK_SIZE, struct marker_block): Use union
9788 aligned_Lisp_Misc instead of union Lisp_Misc.
9789 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
9791 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
9793 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
9794 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
9795 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
9796 * s/netbsd.h, s/sol2-6.h:
9797 Remove definition of GC_MARK_STACK, since the default now works.
9798 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
9799 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
9800 no longer the default.
9801 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
9803 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
9805 * lread.c (lisp_file_lexically_bound_p):
9806 Fix hang at ";-*-\n" (bug#11238).
9808 2012-04-14 Eli Zaretskii <eliz@gnu.org>
9810 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
9811 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
9813 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
9815 * nsterm.m (constrainFrameRect): Always constrain when there is only
9816 one screen (Bug#10962).
9818 2012-04-13 Ken Brown <kbrown@cornell.edu>
9820 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
9822 2012-04-13 Reuben Thomas <rrt@sc3d.org>
9824 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
9826 2012-04-11 Daniel Colascione <dancol@dancol.org>
9828 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
9829 against is gone. It's better to use vfork now so that when Cygwin
9830 gains a new, working vfork, we use it automatically (bug#10398).
9832 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9834 * window.c (save_window_save): Obey window-point-insertion-type.
9836 2012-04-11 Glenn Morris <rgm@gnu.org>
9838 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
9840 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
9842 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
9844 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
9846 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
9847 (force_quit_count): New var.
9848 (handle_interrupt): Use it.
9850 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
9852 * w32.c (w32_delayed_load): Record the full path of the library
9853 being loaded (bug#10424).
9855 2012-04-09 Glenn Morris <rgm@gnu.org>
9857 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
9858 not just in the obarray, before snarfing them. (Bug#11036)
9860 * Makefile.in ($(leimdir)/leim-list.el):
9861 Pass EMACS rather than BUILT_EMACS.
9863 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
9865 * process.c (make_process):
9866 * process.h: Add integer `gnutls_handshakes_tried' member to
9869 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
9870 Add convenience `GNUTLS_LOG2i' macro.
9872 * gnutls.c (gnutls_log_function2i): Convenience log function.
9873 (emacs_gnutls_read): Use new log functions,
9874 `gnutls_handshakes_tried' process member, and
9875 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
9876 attempts per process (connection).
9878 2012-04-09 Chong Yidong <cyd@gnu.org>
9880 * eval.c (Fuser_variable_p, user_variable_p_eh)
9881 (lisp_indirect_variable): Functions deleted.
9882 (Fdefvar): Caller changed.
9884 * callint.c (Finteractive, Fcall_interactively):
9885 * minibuf.c (Fread_variable): Callers changed.
9887 2012-04-09 Eli Zaretskii <eliz@gnu.org>
9889 * xdisp.c (set_cursor_from_row): If the display string appears in
9890 the buffer at position that is closer to point than the position
9891 after the display string, display the cursor on the first glyph of
9892 the display string. Fixes cursor display when a 'display' text
9893 property immediately follows invisible text. (Bug#11094)
9895 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
9897 composite.c: use 'double' consistently
9898 * composite.c (get_composition_id): Use 'double' consistently
9899 instead of converting 'float' to 'double' and vice versa; this is
9900 easier to understand and avoids a GCC warning.
9902 2012-04-09 Glenn Morris <rgm@gnu.org>
9904 * Makefile.in: Generate leim-list with bootstrap-emacs, in
9905 preparation for dumping it with emacs. (Bug#4789)
9906 (leimdir): New variable.
9907 ($(leimdir)/leim-list.el): New rule.
9908 (emacs$(EXEEXT)): Depend on leim-list.el.
9910 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
9911 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
9912 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
9914 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
9916 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
9919 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
9921 * xml.c (init_libxml2_functions) [WINDOWSNT]:
9922 Remove unused local variable.
9924 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9926 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
9927 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
9928 (mark_memory): Mark Lisp_Objects only if pointers might hide in
9929 objects, as mark_maybe_pointer will catch them otherwise.
9930 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
9931 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
9933 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
9935 Fix typo that broke non-Windows builds.
9936 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
9938 2012-04-07 Eli Zaretskii <eliz@gnu.org>
9940 Support building on MS-Windows with libxml2.
9942 * makefile.w32-in (OBJ2): Add xml.$(O).
9943 (GLOBAL_SOURCES): Add xml.c.
9944 ($(BLD)/xml.$(O)): New dependency list.
9946 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
9947 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
9948 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
9949 [!WINDOWSNT]: New macros.
9950 (init_libxml2_functions, libxml2_loaded_p): New functions.
9951 (parse_region): Call fn_xmlCheckVersion instead of using the macro
9952 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
9953 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
9954 Calls xmlCleanupParser only if libxml2 was loaded (or statically
9956 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
9957 Call init_libxml2_functions before calling libxml2 functions.
9958 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
9960 * emacs.c: Don't include libxml/parser.h.
9961 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
9962 xmlCleanupParser directly.
9964 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
9966 2012-04-07 Eli Zaretskii <eliz@gnu.org>
9968 * indent.c (Fvertical_motion): If there is a display string at
9969 point, use it.vpos to compute how many lines to backtrack after
9970 move_it_to point. (Bug#11133)
9972 2012-04-06 Eli Zaretskii <eliz@gnu.org>
9974 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
9975 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
9976 about subtle differences between FETCH_CHAR* and STRING_CHAR*
9977 macros related to unification of CJK characters. For the details,
9978 see the discussion following the message here:
9979 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
9981 2012-04-04 Chong Yidong <cyd@gnu.org>
9983 * keyboard.c (Vdelayed_warnings_list): Doc fix.
9985 2012-04-01 Eli Zaretskii <eliz@gnu.org>
9987 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
9988 instead of alloca. (Bug#11138)
9990 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
9992 * w32menu.c (is_simple_dialog): Properly check lisp types.
9995 2012-03-31 Eli Zaretskii <eliz@gnu.org>
9997 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
9998 position we get to after a call to move_it_to fails the
9999 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
10000 only if we wind up in a string from display property. (Bug#11063)
10002 * window.c (Fdelete_other_windows_internal): Invalidate the row
10003 and column information about mouse highlight, so that redisplay
10004 restores it after reallocating the glyph matrices. (Bug#7464)
10006 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
10007 string comes from a `display' text property, use the buffer
10008 position of that property as if we actually saw that position in
10010 (move_it_by_lines): Remove the assertion that
10011 "it->current_x == 0 && it->hpos == 0" which can be legitimately
10012 violated when there's a before-string at the beginning of a line.
10015 2012-03-30 Eli Zaretskii <eliz@gnu.org>
10017 * xdisp.c (append_space_for_newline): If the default face was
10018 remapped, use the remapped face for the appended newline.
10019 (extend_face_to_end_of_line): Use the remapped default face for
10020 extending the face to the end of the line.
10021 (display_line): Call extend_face_to_end_of_line when the default
10022 face was remapped. (Bug#11068)
10024 2012-03-29 Eli Zaretskii <eliz@gnu.org>
10026 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
10028 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
10030 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
10032 2012-03-27 Glenn Morris <rgm@gnu.org>
10034 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
10037 2012-03-26 Kenichi Handa <handa@m17n.org>
10039 * dispextern.h (struct glyph): Fix previous change. Change the
10040 bit length of glyphless.ch to 25 (Bug#11082).
10042 2012-03-26 Chong Yidong <cyd@gnu.org>
10044 * keyboard.c (Vselection_inhibit_update_commands): New variable.
10045 (command_loop_1): Use it; inhibit selection update for
10046 handle-select-window too (Bug#8996).
10048 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
10050 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
10052 2012-03-25 Kenichi Handa <handa@m17n.org>
10054 * dispextern.h (struct glyph): Change the bit length of
10055 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
10057 2012-03-24 Eli Zaretskii <eliz@gnu.org>
10059 * s/ms-w32.h (tzname): Include time.h before redirecting to
10060 _tzname. Fixes the MSVC build. (Bug#9960)
10062 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
10064 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
10067 * xterm.c (XTread_socket): Only modify handling_signal if
10068 !SYNC_INPUT. (Bug#11080)
10070 2012-03-23 Eli Zaretskii <eliz@gnu.org>
10072 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
10073 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
10074 when fetching a multibyte character consumes more bytes than
10075 CHAR_BYTES returns, due to unification of CJK characters in
10076 string_char. (Bug#11073)
10078 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
10080 * process.c (wait_reading_process_output): Handle pty disconnect
10081 by refraining from sending oneself a SIGCHLD (bug#10933).
10083 2012-03-22 Chong Yidong <cyd@gnu.org>
10085 * dispextern.h (struct it): New member string_from_prefix_prop_p.
10087 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
10088 Mark string as coming from a prefix property.
10089 (handle_face_prop): Use default face for prefix strings (Bug#4281).
10090 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
10092 2012-03-21 Chong Yidong <cyd@gnu.org>
10094 * xfaces.c (Vface_remapping_alist): Doc fix.
10096 2012-03-20 Eli Zaretskii <eliz@gnu.org>
10098 * w32proc.c (Fw32_set_console_codepage)
10099 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
10102 2012-03-20 Chong Yidong <cyd@gnu.org>
10104 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
10105 to reflect default non-nil value of redisplay-dont-pause.
10107 2012-03-19 Kenichi Handa <handa@m17n.org>
10109 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
10110 it fit in a valid range (Bug#11003).
10112 2012-03-18 Eli Zaretskii <eliz@gnu.org>
10114 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
10115 that is not from display property, accept the row as a "cursor
10116 row" if one of the string's character has a non-nil `cursor'
10117 property. Fixes cursor positioning when there are newlines in
10118 overlay strings, e.g. in icomplete.el. (Bug#11035)
10120 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
10122 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
10124 2012-03-12 Chong Yidong <cyd@gnu.org>
10126 * eval.c (inhibit_lisp_code): Rename from
10127 inhibit_window_configuration_change_hook; move from window.c.
10129 * xfns.c (unwind_create_frame_1, Fx_create_frame):
10130 * window.c (run_window_configuration_change_hook)
10131 (syms_of_window): Callers changed.
10133 2012-03-11 Chong Yidong <cyd@gnu.org>
10135 * keymap.c (Fkey_description): Doc fix (Bug#9700).
10137 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
10139 2012-03-10 Chong Yidong <cyd@gnu.org>
10141 * frame.c (other_visible_frames): Don't assume the selected frame
10142 is visible (Bug#10955).
10144 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
10146 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
10148 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
10150 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
10151 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
10154 2012-03-03 Glenn Morris <rgm@gnu.org>
10156 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
10158 2012-03-02 Eli Zaretskii <eliz@gnu.org>
10160 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
10161 position past the first glyph_row that ends at ZV. (Bug#10902)
10162 (redisplay_window, next_element_from_string): Fix typos in
10164 (redisplay_window): Pass to move_it_vertically the margin in
10165 pixels, not in screen lines.
10167 2012-03-02 Glenn Morris <rgm@gnu.org>
10169 * buffer.c (buffer-list-update-hook): Doc fix.
10171 2012-02-29 Eli Zaretskii <eliz@gnu.org>
10173 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
10174 push_it before setting up the iterator for the first overlay
10175 string, even if we have an empty string loaded.
10176 (next_overlay_string): If there's an empty string on the iterator
10177 stack, pop the stack. (Bug#10903)
10179 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
10181 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
10182 Suggested by Stefan Monnier in
10183 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
10184 * alloc.c (widen_to_Lisp_Object): New static function.
10185 (mark_memory): Also mark Lisp_Objects by fetching pointer words
10186 and widening them to Lisp_Objects. This would work even if
10187 USE_LSB_TAG is defined and wide integers are used, which might
10188 happen in a future version of Emacs.
10190 2012-02-25 Chong Yidong <cyd@gnu.org>
10192 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
10195 * xselect.c (Fx_selection_exists_p): Doc fix.
10196 (x_clipboard_manager_save_all): Print an informative message
10197 before saving to clipboard manager.
10199 2012-02-24 Chong Yidong <cyd@gnu.org>
10201 * keyboard.c (process_special_events): Handle all X selection
10202 requests in kbd_buffer, not just the next one (Bug#8869).
10204 2012-02-23 Chong Yidong <cyd@gnu.org>
10206 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
10207 call when setting menu-bar-lines and tool-bar-lines parameters.
10208 (unwind_create_frame_1): New helper function.
10210 * window.c (inhibit_window_configuration_change_hook): New var.
10211 (run_window_configuration_change_hook): Obey it.
10212 (syms_of_window): Initialize it.
10214 2012-02-22 Chong Yidong <cyd@gnu.org>
10216 * xterm.c (x_draw_image_relief): Add missing type check for
10217 Vtool_bar_button_margin (Bug#10743).
10219 2012-02-21 Chong Yidong <cyd@gnu.org>
10221 * fileio.c (Vfile_name_handler_alist): Doc fix.
10223 * buffer.c (Fget_file_buffer): Protect against invalid file
10224 handler return value.
10226 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
10228 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
10229 when computing $valmask.
10231 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
10232 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
10233 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
10234 It's useless in that case, and it can cause problems on hosts
10235 that allocate halves of EMACS_INT values separately.
10236 Reported by Dan Horák. Diagnosed by Andreas Schwab in
10237 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
10238 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
10239 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
10240 it avoids undefined behavior on hosts where shifting right by more
10241 than the word width has undefined behavior.
10243 2012-02-19 Chong Yidong <cyd@gnu.org>
10245 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
10246 (Funhandled_file_name_directory, Ffile_name_as_directory)
10247 (Fdirectory_file_name, Fexpand_file_name)
10248 (Fsubstitute_in_file_name): Protect against invalid file handler
10249 return values (Bug#10845).
10251 2012-02-18 Eli Zaretskii <eliz@gnu.org>
10253 * .gdbinit (pitx): Fix incorrect references to fields of the
10256 2012-02-17 Chong Yidong <cyd@gnu.org>
10258 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
10260 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
10262 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
10263 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
10265 2012-02-15 Chong Yidong <cyd@gnu.org>
10267 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
10268 marked as special. Also, starting docstrings with * is obsolete.
10270 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
10272 * gnutls.c (emacs_gnutls_write): Fix last change.
10274 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
10276 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
10279 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
10281 * keymap.c (Fsingle_key_description): Handle char ranges.
10283 2012-02-12 Chong Yidong <cyd@gnu.org>
10285 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
10286 as that creates a dangerous corner case.
10288 * window.c (Fdelete_window_internal): Invalidate the mouse
10289 highlight (Bug#9904).
10291 2012-02-12 Glenn Morris <rgm@gnu.org>
10293 * xselect.c (Fx_own_selection_internal)
10294 (Fx_get_selection_internal, Fx_disown_selection_internal)
10295 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
10296 * nsselect.m (Fx_own_selection_internal)
10297 (Fx_disown_selection_internal, Fx_selection_exists_p)
10298 (Fx_selection_owner_p, Fx_get_selection_internal):
10299 Sync docs and argument specs with the xselect.c versions.
10301 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
10303 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
10305 2012-02-11 Eli Zaretskii <eliz@gnu.org>
10307 * w32select.c (Fx_selection_exists_p): Sync doc string and
10308 argument list with xselect.c. (Bug#10783)
10310 * w16select.c (Fx_selection_exists_p): Sync doc string and
10311 argument list with xselect.c. (Bug#10783)
10313 2012-02-10 Glenn Morris <rgm@gnu.org>
10315 * fns.c (Fsecure_hash): Doc fix.
10317 2012-02-09 Kenichi Handa <handa@m17n.org>
10319 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
10321 2012-02-07 Chong Yidong <cyd@gnu.org>
10323 * buffer.c (Fbuffer_local_variables)
10324 (buffer_lisp_local_variables): Handle unbound vars correctly;
10325 don't let Qunbound leak into Lisp.
10327 2012-02-07 Glenn Morris <rgm@gnu.org>
10329 * image.c (Fimagemagick_types): Doc fix.
10331 * image.c (imagemagick-render-type): Change it from a lisp object
10332 to an integer. Move the doc here from the lisp manual.
10333 Treat all values not equal to 0 the same.
10335 2012-02-06 Chong Yidong <cyd@gnu.org>
10337 * doc.c (store_function_docstring): Avoid applying docstring of
10338 alias to base function (Bug#2603).
10340 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
10342 * .gdbinit (pp1, pv1): Remove redundant defines.
10345 2012-02-04 Chong Yidong <cyd@gnu.org>
10347 * nsterm.m: Declare a global (Bug#10694).
10349 2012-02-04 Eli Zaretskii <eliz@gnu.org>
10351 * w32.c (get_emacs_configuration_options):
10352 Include --enable-checking, if specified, in the return value.
10354 2012-02-04 Martin Rudalics <rudalics@gmx.at>
10356 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
10357 after rounding frame sizes. (Bug#9723)
10359 2012-02-04 Eli Zaretskii <eliz@gnu.org>
10361 * keyboard.c (adjust_point_for_property): Don't position point
10362 before BEGV. (Bug#10696)
10364 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
10366 Handle overflow when computing char display width (Bug#9496).
10367 * character.c (char_width): Return EMACS_INT, not int.
10368 (char_width, c_string_width): Check for overflow when
10369 computing the width; this is possible now that individual
10370 characters can have unbounded width. Problem introduced
10371 by merge from Emacs 23 on 2012-01-19.
10373 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
10375 * dbusbind.c (Fdbus_register_method): Mention the return value
10376 :ignore in the docstring.
10378 2012-02-02 Glenn Morris <rgm@gnu.org>
10380 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
10382 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10383 Unconditionally set to t. (Bug#10673)
10384 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10385 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
10386 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
10388 2012-02-02 Kenichi Handa <handa@m17n.org>
10390 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
10391 0, do not call append_composite_glyph.
10393 2012-02-02 Kenichi Handa <handa@m17n.org>
10395 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
10397 (x_produce_glyphs): If the component of a composition is a null
10398 string, set it->pixel_width to 1 to avoid zero-width glyph.
10400 2012-02-01 Eli Zaretskii <eliz@gnu.org>
10402 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
10403 first 2 arguments are identical. This makes inserting large
10404 output from a subprocess an order of magnitude faster on
10405 MS-Windows, where all sbrk'ed memory is always contiguous.
10407 2012-01-31 Glenn Morris <rgm@gnu.org>
10409 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
10410 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
10411 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
10413 2012-01-29 Glenn Morris <rgm@gnu.org>
10415 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
10417 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
10419 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
10421 2012-01-28 Chong Yidong <cyd@gnu.org>
10423 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
10425 2012-01-26 Chong Yidong <cyd@gnu.org>
10427 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
10429 * search.c (Fsearch_forward, Fsearch_backward): Document negative
10430 repeat counts (Bug#10507).
10432 2012-01-26 Glenn Morris <rgm@gnu.org>
10434 * lread.c (syms_of_lread): Doc fix.
10436 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
10438 * coding.c (encode_designation_at_bol): Change return value to
10441 2012-01-25 Chong Yidong <cyd@gnu.org>
10443 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
10445 2012-01-21 Chong Yidong <cyd@gnu.org>
10447 * floatfns.c (Fcopysign): Make the second argument non-optional,
10448 since nil is not allowed anyway.
10450 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
10452 * process.c (read_process_output): Use p instead of XPROCESS (proc).
10453 (send_process): Likewise.
10455 2012-01-19 Martin Rudalics <rudalics@gmx.at>
10457 * window.c (save_window_save, Fcurrent_window_configuration)
10458 (Vwindow_persistent_parameters): Do not use Qstate.
10459 Rewrite doc-strings.
10461 2012-01-19 Kenichi Handa <handa@m17n.org>
10463 * character.c (char_width): New function.
10464 (Fchar_width, c_string_width, lisp_string_width):
10465 Use char_width (Bug#9496).
10467 2012-01-16 Martin Rudalics <rudalics@gmx.at>
10469 * window.c (Vwindow_persistent_parameters): New variable.
10470 (Fset_window_configuration, save_window_save): Handle persistent
10473 2012-01-14 Eli Zaretskii <eliz@gnu.org>
10475 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
10476 thrashing the stack of the thread. (Bug#9087)
10478 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
10480 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
10482 2012-01-11 Eli Zaretskii <eliz@gnu.org>
10484 * xdisp.c (rows_from_pos_range): Handle the case where the
10485 highlight ends on a newline. (Bug#10464)
10486 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
10487 he end column for display of highlight that ends on a newline
10490 2012-01-11 Glenn Morris <rgm@gnu.org>
10492 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
10493 from load-path also when installation-directory is nil. (Bug#10208)
10495 2012-01-10 Glenn Morris <rgm@gnu.org>
10497 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
10499 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
10500 Update template values to be closer to their typical values these days.
10502 2012-01-09 Eli Zaretskii <eliz@gnu.org>
10504 * xdisp.c (rows_from_pos_range): Accept additional argument
10505 DISP_STRING, and accept any glyph in a row whose object is that
10506 string as eligible for mouse highlight. Fixes mouse highlight of
10507 display strings from overlays. (Bug#10464)
10509 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
10511 emacs: fix an auto-save permissions race condition (Bug#10400)
10512 * fileio.c (auto_saving_dir_umask): New static var.
10513 (Fmake_directory_internal): Use it.
10514 (do_auto_save_make_dir): Set it, instead of invoking chmod after
10515 creating the directory. The old code temporarily assigns
10516 too-generous permissions to the directory.
10517 (do_auto_save_eh): Clear it.
10518 (Fdo_auto_save): Catch all errors, not just file errors, so
10519 that the var is always cleared.
10521 2012-01-07 Eli Zaretskii <eliz@gnu.org>
10523 * search.c (scan_buffer): Pass character positions to
10524 know_region_cache, not byte positions. (Bug#6540)
10526 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
10528 * w32.c (sys_rename): Report EXDEV when rename of a directory
10529 fails because the target is on another logical disk. (Bug#10284)
10531 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
10533 * xterm.c (x_embed_request_focus): New function.
10535 * xterm.h: Add prototype.
10537 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
10539 2012-01-05 Glenn Morris <rgm@gnu.org>
10541 * emacs.c (emacs_copyright): Update short copyright year to 2012.
10543 2012-01-01 Eli Zaretskii <eliz@gnu.org>
10545 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
10546 Load gnutls_transport_set_lowat only if GnuTLS version is below
10548 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
10549 GnuTLS versions below 2.11.1.
10551 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
10553 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
10554 to the doc string advising against its use for altering the way
10555 windows are scrolled.
10557 2011-12-28 Kenichi Handa <handa@m17n.org>
10559 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
10560 coding-system ASCII compatible only when it does not produce BOM
10561 on encoding (Bug#10383).
10563 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
10565 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
10567 (create_and_show_popup_menu): Always use menu_position_func for
10570 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
10572 * callint.c (Fcall_interactively): Don't truncate prompt string.
10574 2011-12-23 Eli Zaretskii <eliz@gnu.org>
10576 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
10577 property that ends at ZV, so that the bidi iteration could be
10578 resumed from there (after widening). (Bug#10360)
10580 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
10582 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
10584 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
10586 * nsterm.m (x_free_frame_resources):
10587 Release f->output_data.ns->miniimage.
10588 (ns_index_color): Fix indentation. Do not retain
10589 color_table->colors[i].
10591 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
10594 * nsfns.m (x_set_background_color): Assign return value from
10595 ns_index_color to face-background instead of NSColor*.
10596 (ns_implicitly_set_icon_type): Fix indentation.
10597 Change assignment in for loop to comparison.
10599 * emacs.c (ns_pool): New variable.
10600 (main): Assign ns_pool.
10601 (Fkill_emacs): Call ns_release_autorelease_pool.
10603 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
10604 autorelease fdesc, release fdAttrs and tdict.
10605 (ns_get_covering_families): Release charset.
10606 (ns_findfonts): Release NSFontDescriptor created with new.
10607 (ns_uni_to_glyphs): Fix indentation.
10608 (setString): Release attrStr before assigning new value.
10610 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
10612 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
10614 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
10615 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
10617 2011-12-18 David Reitter <reitter@cmu.edu>
10619 * nsterm.m (ns_term_init): Subscribe for notifications
10620 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
10621 to method trackingNotification in EmacsMenu.
10623 * nsmenu.m (trackingMenu): New variable.
10624 (trackingNotification): New method (from Aquamacs).
10625 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
10626 from Aquamacs (Bug#7030).
10628 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
10630 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
10631 (symbol_to_nsstring): Fix indentation.
10632 (ns_symbol_to_pb): New function.
10633 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
10634 (Fns_rotate_cut_buffers_internal): Remove.
10635 (Fns_store_selection_internal): Rename from
10636 Fns_store_cut_buffer_internal.
10637 (ns_get_foreign_selection, Fx_own_selection_internal)
10638 (Fx_disown_selection_internal, Fx_selection_exists_p)
10639 (Fns_get_selection_internal, Fns_store_selection_internal):
10640 Use ns_symbol_to_pb and check if return value is nil.
10641 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
10642 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
10643 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
10644 renamed to Sns_store_selection_internal.
10645 (ns_handle_selection_request): Move code to Fx_own_selection_internal
10646 and remove this function.
10647 (ns_handle_selection_clear): Remove, never used.
10648 (Fx_own_selection_internal): Move code from ns_handle_selection_request
10651 2011-12-17 Ken Brown <kbrown@cornell.edu>
10653 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
10654 GID is unknown (Bug#10257).
10656 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
10658 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
10659 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
10660 which caused a build failure on GNU/Linux IA-64. This problem was
10661 introduced by my 2011-10-07 patch.
10663 2011-12-15 Juri Linkov <juri@jurta.org>
10665 * image.c (imagemagick_error): New function. (Bug#10112)
10666 (imagemagick_load_image): Comment out `MagickSetResolution' call.
10667 Use `imagemagick_error' where ImageMagick functions return
10669 (Fimagemagick_types): Add `Fnreverse' to return the list in the
10672 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10674 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
10675 fill background (Bug#8992).
10677 2011-12-13 Martin Rudalics <rudalics@gmx.at>
10679 * window.c (Vwindow_combination_resize)
10680 (Vwindow_combination_limit): Use t instead of non-nil in
10682 (Vrecenter_redisplay): Add first sentence of doc-string on
10684 (Frecenter): Fix doc-string typo.
10686 2011-12-11 Kenichi Handa <handa@m17n.org>
10688 * coding.c (Funencodable_char_position): Pay attention to the
10689 buffer text relocation (Bug#9389).
10691 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
10693 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
10694 gtk_init (Bug#10100).
10696 2011-12-10 Eli Zaretskii <eliz@gnu.org>
10698 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
10699 IT->string is nil. (Bug#10263)
10701 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
10703 * nsterm.h (x_free_frame_resources): Declare.
10705 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
10706 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
10708 * nsterm.h (ns_get_defaults_value): Declare.
10710 * nsterm.m (ns_default): Call ns_get_defaults_value.
10712 2011-12-09 Eli Zaretskii <eliz@gnu.org>
10714 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
10717 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10719 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
10720 that where the value of an _OBJC_* symbol points to is in the .bss
10721 section (Bug#10240).
10723 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10725 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
10726 after the loop to call ccl_driver at least once (Bug#8619).
10728 2011-12-08 Kenichi Handa <handa@m17n.org>
10730 * ftfont.c (get_adstyle_property): Fix previous change
10733 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
10735 * w32.c (init_environment): If no_site_lisp, remove site-lisp
10736 dirs from the default value of EMACSLOADPATH (bug#10208).
10738 2011-12-07 Glenn Morris <rgm@gnu.org>
10740 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
10741 installation and source directories as well. (Bug#10208)
10743 2011-12-06 Chong Yidong <cyd@gnu.org>
10745 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
10747 2011-12-06 Glenn Morris <rgm@gnu.org>
10749 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
10750 as an error, not just -1. (Bug#10217)
10752 2011-12-05 Chong Yidong <cyd@gnu.org>
10754 * keyboard.c (process_special_events): New function.
10755 (swallow_events, Finput_pending_p): Use it (Bug#10195).
10757 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
10759 * coding.c (encode_designation_at_bol): Don't use uninitialized
10760 local variable (Bug#9318).
10762 2011-12-05 Kenichi Handa <handa@m17n.org>
10764 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
10765 return Qnil (Bug#8046, Bug#10193).
10767 2011-12-05 Kenichi Handa <handa@m17n.org>
10769 * coding.c (encode_designation_at_bol): New args charbuf_end and
10770 dst. Return the number of produced bytes. Callers changed.
10771 (coding_set_source): Return how many bytes coding->source was
10773 (coding_set_destination): Return how many bytes
10774 coding->destination was relocated.
10775 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
10776 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
10778 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
10780 * coding.c (CODING_CHAR_CHARSET_P): New macro.
10781 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
10784 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
10786 The following changes are to fix Bug#9318.
10788 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
10789 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
10790 (encode_coding_iso_2022, encode_coding_sjis)
10791 (encode_coding_big5, encode_coding_charset): Use the above macros.
10793 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
10795 * lisp.h (process_quit_flag): Fix external declaration.
10797 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
10799 Don't macro-inline non-performance-critical code.
10800 * eval.c (process_quit_flag): New function.
10801 * lisp.h (QUIT): Use it.
10803 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
10805 * nsfns.m (get_geometry_from_preferences): New function.
10806 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
10808 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
10810 * emacs.c (Qkill_emacs): Define.
10811 (syms_of_emacs): Initialize it.
10812 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
10813 Qquit_flag to `kill-emacs' instead.
10814 (quit_throw_to_read_char): Add parameter `from_signal'.
10815 All callers changed. Call Fkill_emacs if requested and safe.
10816 * lisp.h (QUIT): Call Fkill_emacs if requested.
10818 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
10820 * widget.c (update_wm_hints): Return if wmshell is null.
10821 (widget_update_wm_size_hints): New function.
10823 * widget.h (widget_update_wm_size_hints): Declare.
10825 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
10826 widget_update_wm_size_hints (Bug#10104).
10828 2011-12-03 Eli Zaretskii <eliz@gnu.org>
10830 * xdisp.c (handle_invisible_prop): If the invisible text ends just
10831 before a newline, prepare the bidi iterator for consuming the
10832 newline, and keep the current paragraph direction. (Bug#10183)
10833 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
10835 2011-12-02 Juri Linkov <juri@jurta.org>
10837 * search.c (Fword_search_regexp): New Lisp function created from
10838 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
10839 (Fword_search_backward, Fword_search_forward)
10840 (Fword_search_backward_lax, Fword_search_forward_lax):
10841 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
10842 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
10844 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
10846 * fileio.c (Finsert_file_contents): Move after-change-function call
10847 to before the "handled:" label, since all "goto handled" appear in
10848 cases where the *-change-functions have already been properly called
10851 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
10853 * keyboard.c (interrupt_signal): Don't call kill-emacs when
10854 waiting for input. (Bug#10169)
10856 2011-11-30 Eli Zaretskii <eliz@gnu.org>
10858 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
10859 verifies glyph row's hash code--we have just reallocated the
10860 glyphs, so their contents can be complete garbage. (Bug#10164)
10862 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
10864 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
10866 2011-11-30 Eli Zaretskii <eliz@gnu.org>
10868 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
10869 attributes are tested _before_ calling verify_row_hash, to protect
10870 against GCC re-ordering of the tests. (Bug#10164)
10872 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
10874 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
10876 * xterm.c (handle_one_xevent): Only set async_visible and friends
10877 if net_wm_state_hidden_seen is non-zero (Bug#10002)
10878 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
10879 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
10881 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
10883 Remove GCPRO-related macros that exist only to avoid shadowing locals.
10884 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
10885 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
10886 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10887 All uses changed to use GCPRO1 etc.
10888 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
10889 Revert to old implementation (i.e., before 2011-03-11).
10891 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10893 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
10894 of scroll runs so as to avoid assigning disabled bogus rows and
10895 unnecessary graphics copy operations.
10897 2011-11-27 Eli Zaretskii <eliz@gnu.org>
10899 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
10900 (snprintf) [_MSC_VER]: Redirect to _snprintf.
10901 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
10902 (malloc, free, realloc, calloc): Redirect to e_* only when
10905 * lisp.h (GCTYPEBITS): Move before first use.
10906 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
10907 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
10908 this macro definition.
10910 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
10913 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
10915 * gtkutil.c (xg_create_frame_widgets):
10916 Call gtk_window_set_has_resize_grip (FALSE) if that function is
10917 present with Gtk+ 2.0.
10919 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10921 * fileio.c (Finsert_file_contents): Undo previous change; see
10922 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
10924 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
10926 Rename locals to avoid shadowing.
10927 * fileio.c (Finsert_file_contents):
10928 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
10929 * process.c (wait_reading_process_output):
10930 Rename inner 'proc' to 'p' to avoid shadowing.
10931 Indent for consistency with usual Emacs style.
10933 2011-11-25 Eli Zaretskii <eliz@gnu.org>
10935 * xdisp.c (redisplay_window): If cursor row is not fully visible
10936 after recentering, and scroll-conservatively is set to a large
10937 number, scroll window by a few more lines to make the cursor fully
10938 visible and out of scroll-margin. (Bug#10105)
10939 (start_display): Don't move to the next line if the display should
10940 start at a newline that is part of a display vector or an overlay
10941 string. (Bug#10119)
10943 2011-11-24 Juri Linkov <juri@jurta.org>
10945 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
10946 after the `MagickPingImage' call. (Bug#10112)
10948 2011-11-23 Chong Yidong <cyd@gnu.org>
10950 * window.c (Fcoordinates_in_window_p): Accept only live windows.
10952 2011-11-23 Martin Rudalics <rudalics@gmx.at>
10954 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
10955 making another buffer current. (Bug#10114)
10957 2011-11-23 Glenn Morris <rgm@gnu.org>
10959 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
10961 2011-11-23 Chong Yidong <cyd@gnu.org>
10963 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
10964 using it (Bug#5984).
10966 2011-11-22 Eli Zaretskii <eliz@gnu.org>
10968 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
10969 and header-lines, as they don't have one computed for them.
10972 * .gdbinit (prow): Make displayed values more self-explaining.
10973 Add row's hash code.
10975 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
10977 * process.c (wait_reading_process_output): Fix asynchrounous
10978 GnuTLS socket handling on some versions of the GnuTLS library.
10979 (wait_reading_process_output): Add comment and URL.
10981 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
10983 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
10985 2011-11-21 Chong Yidong <cyd@gnu.org>
10987 * window.c (Fnext_window, Fprevious_window): Doc fix.
10989 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
10991 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
10993 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
10995 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
10997 2011-11-20 Martin Rudalics <rudalics@gmx.at>
10999 * window.c (Fset_window_combination_limit): Rename argument
11001 (Vwindow_combination_limit): Remove "status" from doc-string.
11003 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
11005 * m/ibms390.h: Remove.
11006 * m/ibms390x.h: Don't include "ibms390.h".
11008 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
11010 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
11011 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
11013 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
11015 * casetab.c (Fset_case_table):
11016 * charset.c (Fcharset_after): Fix typos.
11018 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
11020 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
11021 Otherwise, valgrind does not work on some platforms.
11022 Problem reported by Andreas Schwab in
11023 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
11024 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
11025 is set, removing the need for VIRT_ADDRESS_VARIES.
11026 (PURE_P): Use a more-efficient implementation that needs just one
11027 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
11028 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
11029 to 4 (xorl, subq, cmpq, setbe).
11030 * alloc.c (pure): Always extern now, since that's the
11031 VIRT_ADDR_VARIES behavior.
11032 (PURE_POINTER_P): Use a single comparison, not two, for
11033 consistency with the new puresize.h.
11034 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
11035 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
11036 Remove VIRT_ADDR_VARIES no longer needed.
11038 2011-11-19 Eli Zaretskii <eliz@gnu.org>
11040 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
11041 (erase_phys_cursor, update_window_cursor, show_mouse_face)
11042 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
11043 behave as if the cursor position were at the window margin.
11045 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
11046 and the cursor position is out of bounds, behave as if the cursor
11047 position were at the window margin. (Bug#10075)
11049 2011-11-18 Chong Yidong <cyd@gnu.org>
11051 * window.c (Fwindow_combination_limit): Make first argument
11052 non-optional, since it is meaningless for live windows like the
11055 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
11057 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
11059 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
11061 * intervals.c: Fix grafting over the whole buffer (bug#10071).
11062 (graft_intervals_into_buffer): Simplify.
11064 2011-11-18 Eli Zaretskii <eliz@gnu.org>
11066 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
11067 hash values of the two rows.
11068 (copy_row_except_pointers): Preserve the used[] arrays and the
11069 hash values of the two rows. (Bug#10035)
11070 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
11072 * xdisp.c (row_hash): New function, body extracted from
11073 compute_line_metrics.
11074 (compute_line_metrics): Call row_hash, instead of computing the
11077 * dispnew.c (verify_row_hash): Call row_hash for computing the
11078 hash code of a row, instead of duplicating code from xdisp.c.
11080 * dispextern.h (row_hash): Add prototype.
11082 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
11084 * frame.c (delete_frame): Don't delete the terminal when the last
11085 X frame is closed if emacs is built with GTK toolkit.
11087 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
11089 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
11091 2011-11-17 Martin Rudalics <rudalics@gmx.at>
11093 * window.c (Vwindow_splits): Rename to
11094 Vwindow_combination_resize. Suggested by Juri Linkov.
11095 (Fsplit_window_internal): Use Vwindow_combination_resize instead
11098 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
11100 * nsfns.m (Fns_font_name):
11101 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
11103 2011-11-16 Martin Rudalics <rudalics@gmx.at>
11105 * window.h (window): Rename slot "nest" to "combination_limit".
11106 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
11107 (Fset_window_nest): Rename to Fset_window_combination_limit.
11108 (Vwindow_nest): Rename to Vwindow_combination_limit.
11109 (recombine_windows, make_parent_window, make_window)
11110 (Fsplit_window_internal, saved_window)
11111 (Fset_window_configuration, save_window_save): Rename all
11112 occurrences of window_nest to window_combination_limit.
11114 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
11116 * image.c (imagemagick_load_image): Fix typo.
11118 2011-11-14 Eli Zaretskii <eliz@gnu.org>
11120 * xdisp.c (display_line): Move the call to
11121 highlight_trailing_whitespace before the call to
11122 compute_line_metrics, since the latter needs to see the final
11123 faces of all the glyphs to compute ROW's hash value.
11124 Fixes assertion violations in row_equal_p. (Bug#10035)
11126 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
11128 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
11129 just return (bug#10044).
11131 2011-11-12 Eli Zaretskii <eliz@gnu.org>
11133 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
11134 with user-defined heap size. Bump the default size of the temacs
11135 heap to 27MB, to avoid memory warning when running temacs.
11136 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
11138 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
11139 current_matrix and desired_matrix. (Bug#9990)
11140 (verify_row_hash) [XASSERTS]: New function.
11141 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
11142 that the hash value of glyph rows is correct.
11144 2011-11-12 Martin Rudalics <rudalics@gmx.at>
11146 * window.h (window): Remove splits slot.
11147 * window.c (Fwindow_splits, Fset_window_splits): Remove.
11148 (Fdelete_other_windows_internal, make_parent_window)
11149 (make_window, Fsplit_window_internal, Fdelete_window_internal)
11150 (Fset_window_configuration, save_window_save): Don't deal with
11151 split status of windows.
11152 (saved_window): Remove splits slot.
11153 (Vwindow_splits): Rewrite doc-string.
11155 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
11157 * xfns.c (unwind_create_frame):
11158 * nsfns.m (unwind_create_frame):
11159 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
11160 Vframe_list (Bug#9999).
11162 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
11164 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
11166 2011-11-11 Kenichi Handa <handa@m17n.org>
11168 * callproc.c (Fcall_process): Set the member dst_multibyte of
11171 2011-11-11 Johan Bockgård <bojohan@gnu.org>
11173 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
11174 avoid a crash (bug#9496).
11176 2011-11-09 Chong Yidong <cyd@gnu.org>
11178 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
11179 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
11181 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
11183 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
11185 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
11187 Avoid some portability problems by eschewing 'extern inline' functions.
11188 The trivial performance wins aren't worth the portability hassles; see
11189 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
11191 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
11192 (window_box_width, window_box_left, window_box_left_offset)
11193 (window_box_right, window_box_right_offset): Undo previous change,
11194 by removing the "extern"s.
11195 * intervals.c (adjust_intervals_for_insertion)
11196 (adjust_intervals_for_deletion): Undo previous change,
11197 making these static again.
11198 (offset_intervals, temp_set_point_both, temp_set_point)
11199 (copy_intervals_to_string): No longer inline.
11200 * xdisp.c (window_text_bottom_y, window_box_width)
11201 (window_box_height, window_box_left_offset)
11202 (window_box_right_offset, window_box_left, window_box_right)
11203 (window_box): No longer inline.
11205 2011-11-08 Chong Yidong <cyd@gnu.org>
11207 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
11208 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
11209 Signal an error if not a live window.
11210 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
11211 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
11213 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
11215 * lisp.h (syms_of_abbrev): Remove declaration.
11216 Reported by CHENG Gao <chenggao@royau.me>.
11218 2011-11-07 Eli Zaretskii <eliz@gnu.org>
11220 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
11221 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
11222 of temacs in GUI mode.
11224 2011-11-07 Martin Rudalics <rudalics@gmx.at>
11226 * window.h: Declare delete_all_child_windows instead of
11227 delete_all_subwindows.
11228 * window.c (Fwindow_nest, Fset_window_nest)
11229 (Fset_window_new_total, Fset_window_new_normal)
11230 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
11231 (delete_all_subwindows): Rename to delete_all_child_windows.
11232 (Fdelete_other_windows_internal, Fset_window_configuration):
11233 Call delete_all_child_windows instead of delete_all_subwindows.
11234 * frame.c (delete_frame): Call delete_all_child_windows instead
11235 of delete_all_subwindows.
11237 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
11239 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
11240 This is also needed for porting to any host where GC_MARK_STACK is
11241 not GC_MAKE_GCPROS_NOOPS.
11242 (which_symbols): Use it.
11244 2011-11-07 Kenichi Handa <handa@m17n.org>
11246 * coding.c (coding_set_destination): Check coding->src_pos only
11247 when coding->src_object is a buffer (bug#9910).
11249 * process.c (send_process): Set the member src_multibyte of coding
11250 to 0 (bug#9911) when sending a unibyte text.
11252 * callproc.c (Fcall_process): Set the member src_multibyte of
11253 process_coding to 0 (bug#9912).
11255 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11257 * xmenu.c (cleanup_widget_value_tree): New function.
11258 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
11259 calling free_menubar_widget_value_tree directly (Bug#9830).
11261 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
11263 Fix some portability problems with 'inline'.
11264 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
11265 (window_box_width, window_box_left, window_box_left_offset)
11266 (window_box_right, window_box_right_offset): Declare extern.
11267 Otherwise, these inline functions do not conform to C99 and
11268 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
11269 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
11270 * intervals.c (adjust_intervals_for_insertion)
11271 (adjust_intervals_for_deletion): Now extern, because otherwise the
11272 extern inline functions 'offset_intervals' couldn't refer to it.
11273 (static_offset_intervals): Remove.
11274 (offset_intervals): Rewrite using the old contents of
11275 static_offset_intervals. The old version didn't conform to C99
11276 because an extern inline function contained a reference to an
11277 identifier with static linkage.
11279 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
11281 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
11284 2011-11-06 Eli Zaretskii <eliz@gnu.org>
11286 * xdisp.c (init_iterator, reseat_to_string): Don't set the
11287 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
11288 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
11289 return Qleft_to_right.
11291 2011-11-06 Chong Yidong <cyd@gnu.org>
11293 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
11294 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
11295 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
11296 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
11297 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
11298 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
11299 (Fwindow_vscroll): Doc fix.
11300 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
11301 argument, since it makes no sense to pass a live window and for
11302 consistency with window-child.
11304 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
11306 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
11309 2011-11-05 Jason Rumney <jasonr@gnu.org>
11311 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
11312 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
11314 (add_font_entity_to_list): Fix logic errors in mixed boolean and
11315 bitwise arithmetic preventing use of unicode-sip and non-truetype
11318 2011-11-05 Eli Zaretskii <eliz@gnu.org>
11320 * s/ms-w32.h (fstat, stat, utime): Move redirections to
11323 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
11324 initialization code to keep similarity to xfns.c after changes
11327 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
11329 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
11330 (unwind_create_frame): New function (Bug#9943).
11331 (Fx_create_frame): Restructure code to be more similar to the one in
11332 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
11333 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
11334 Move terminal->reference_count++ just before making the frame official
11337 * nsterm.m (x_free_frame_resources): New function.
11338 (x_destroy_window): Move code to x_free_frame_resources.
11340 * xfns.c (unwind_create_frame): Fix comment.
11341 (Fx_create_frame, x_create_tip_frame):
11342 Move terminal->reference_count++ just before making the frame
11343 official. Move initialization of image_cache_refcount and
11344 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
11346 2011-11-05 Eli Zaretskii <eliz@gnu.org>
11348 Support MSVC build with newer versions of Visual Studio.
11349 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
11350 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
11353 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
11354 which are not supported by MSVC.
11355 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
11356 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
11358 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
11359 types in bitfields.
11360 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
11362 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
11364 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
11366 Support MSVC build with newer versions of Visual Studio.
11367 * w32.c: Don't include w32api.h for MSVC.
11368 (init_environment) [_MSC_VER]: Call sys_access, not _access.
11370 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
11371 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
11372 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
11373 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
11375 (alloca) [_MSC_VER]: Define to _alloca.
11377 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
11379 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
11381 2011-11-04 Eli Zaretskii <eliz@gnu.org>
11383 * xdisp.c (note_mouse_highlight): If either of
11384 previous/next-single-property-change returns nil, treat that as
11385 the beginning or the end of the buffer. (Bug#9955)
11387 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
11389 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
11390 label is not null (Bug#9951).
11391 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
11394 2011-11-04 Eli Zaretskii <eliz@gnu.org>
11396 * window.c (Fwindow_body_size): Mention in the doc string that the
11397 return value is in frame's canonical units. (Bug#9949)
11399 2011-11-03 Eli Zaretskii <eliz@gnu.org>
11401 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
11403 * w32fns.c (unwind_create_frame): If needed, free the glyph
11404 matrices of the partially constructed frame. (Bug#9943)
11405 * xfns.c (unwind_create_frame): Likewise.
11407 2011-11-01 Eli Zaretskii <eliz@gnu.org>
11409 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
11410 Don't stop backward scan on the continuation glyph, even though
11411 its CHARPOS is positive.
11412 (mouse_face_from_buffer_pos, note_mouse_highlight):
11413 Rename cover_string to disp_string.
11415 2011-11-01 Martin Rudalics <rudalics@gmx.at>
11417 * window.c (temp_output_buffer_show): Don't use
11418 Vtemp_buffer_show_specifiers.
11419 (Vtemp_buffer_show_specifiers): Remove unused variable.
11421 2011-10-30 Eli Zaretskii <eliz@gnu.org>
11423 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
11424 past the beginning of the current glyph matrix.
11426 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
11428 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
11429 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
11430 HAVE_GTK3 (Bug#9869).
11432 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
11433 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
11435 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
11437 * xterm.c: Declare x_handle_net_wm_state to return int.
11438 (handle_one_xevent): Check if we are iconified but don't have
11439 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
11440 (get_current_wm_state): Return non-zero if not hidden,
11441 check for _NET_WM_STATE_HIDDEN (Bug#9893).
11442 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
11443 (x_handle_net_wm_state): Return what get_current_wm_state returns.
11444 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
11446 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
11448 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
11449 so that this new function doesn't get optimized away by a
11450 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
11452 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
11454 * frame.h (MOUSE_HL_INFO): Remove excess parens.
11456 2011-10-29 Eli Zaretskii <eliz@gnu.org>
11458 Fix the `xbytecode' command.
11459 * .gdbinit (xprintbytestr): New command.
11460 (xwhichsymbols): Rename from `which'; all callers changed.
11461 (xbytecode): Print the byte-code string as well.
11463 2011-10-29 Kim Storm <storm@cua.dk>
11465 * alloc.c (which_symbols): New function.
11467 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
11469 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
11472 2011-10-29 Glenn Morris <rgm@gnu.org>
11474 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
11475 Not clear what it was for, and it causes various bugs. (Bug#9839)
11477 2011-10-28 Eli Zaretskii <eliz@gnu.org>
11479 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
11480 possible random value that matches one of those tested as
11481 condition to clear the mouse face.
11483 2011-10-28 Chong Yidong <cyd@gnu.org>
11485 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
11487 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
11489 * window.c (make_window): Initialize phys_cursor_on_p.
11491 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
11493 * lisp.h (struct Lisp_Symbol): Update comments.
11495 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
11497 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
11499 2011-10-28 Eli Zaretskii <eliz@gnu.org>
11501 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
11502 <oslsachem@gmail.com> for helping to debug this.
11504 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
11505 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
11506 (g_b_init_get_glyph_outline_w): New static variables.
11507 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
11508 (GetGlyphOutlineW_Proc): New typedefs.
11509 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
11510 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
11512 (w32font_open_internal, compute_metrics):
11513 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
11514 instead of calling the "wide" APIs directly.
11516 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
11518 * w32.h (syms_of_w32font): Add prototype.
11520 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
11522 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
11523 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
11524 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
11525 (Fmove_to_window_line): Doc fix.
11527 2011-10-27 Chong Yidong <cyd@gnu.org>
11529 * process.c (make_process): Set gnutls_state to NULL.
11531 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
11532 non-NULL, regardless of GNUTLS_INITSTAGE.
11533 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
11534 an error. Set process slots as soon as we allocate them.
11536 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
11538 2011-10-27 Chong Yidong <cyd@gnu.org>
11540 * gnutls.c (emacs_gnutls_deinit): New function.
11541 Deallocate credentials structures as well as calling gnutls_deinit.
11542 (Fgnutls_deinit, Fgnutls_boot): Use it.
11544 * process.c (make_process): Initialize GnuTLS credentials to NULL.
11545 (deactivate_process): Call emacs_gnutls_deinit.
11547 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
11549 * image.c (x_create_x_image_and_pixmap):
11550 * w32.c (sys_rename, w32_delayed_load):
11551 * w32font.c (fill_in_logfont):
11552 * w32reg.c (x_get_string_resource): Silence compiler warnings.
11554 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
11556 * w32fns.c (w32_default_color_map): New function,
11557 extracted from Fw32_default_color_map.
11558 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
11560 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
11562 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
11564 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
11566 * keyboard.c (test_undefined): New function (bug#9751).
11567 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
11569 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
11571 * sysdep.c (init_sys_modes): Fix the check for the controlling
11572 terminal (Bug#6649).
11574 2011-10-20 Eli Zaretskii <eliz@gnu.org>
11576 * dispextern.h (struct bidi_it): New member next_en_type.
11578 * bidi.c (bidi_line_init): Initialize the next_en_type member.
11579 (bidi_resolve_explicit_1): When next_en_pos is valid for the
11580 current character, check also for next_en_type being WEAK_EN.
11581 (bidi_resolve_weak): Don't enter the expensive loop if the current
11582 position is before next_en_pos. Record the bidi type of the first
11583 non-ET, non-BN character we find, in addition to its position.
11584 (bidi_level_of_next_char): Invalidate next_en_type when
11585 next_en_pos is over-stepped.
11587 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
11589 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
11590 * editfns.c: Rewrite current-time-zone so that it invokes
11591 the equivalent of (format-time-string "%Z") to get the time zone name.
11592 This fixes a bug when the time zone name contains characters that
11593 need converting from the system time locale to Emacs internal format.
11594 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
11595 that patch fixed format-time-string to do the conversion, but
11596 I forgot to fix current-time-zone.
11597 (format_time_string): New function, containing most of
11598 what Fformat_time_string used to contain.
11599 (Fformat_time_string): Rewrite in terms of format_time_string.
11600 This doesn't change this function's behavior.
11601 (current-time-zone): Rewrite to use format_time_string.
11602 This fixes the bug reported by Michael Schierl in
11603 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
11604 Jason Rumney's 2007-06-07 change worked around this bug, but
11606 * systime.h (tzname, timezone): Remove no-longer-used declarations.
11608 2011-10-19 Eli Zaretskii <eliz@gnu.org>
11610 * xdisp.c (start_display): If the character at POS is displayed
11611 via a display vector, reset IT->current.dpvec_index to zero.
11612 (try_window_reusing_current_matrix): If a line ends in a display
11613 vector or the next line starts in a display vector, continue
11614 redrawing the window even though the character position of
11615 start_row was reached.
11618 2011-10-18 Chong Yidong <cyd@gnu.org>
11620 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
11621 with nobreak-char-display too.
11623 2011-10-18 Eli Zaretskii <eliz@gnu.org>
11625 Fix part 3 of bug#9771.
11626 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
11627 (bidi_resolve_neutral): Don't enter the expensive loop looking for
11628 non-neutral characters if the current character is a paragraph
11629 separator (a.k.a. Newline). This avoids running the same
11630 expensive loop twice, once when we consume the preceding newline
11631 and the other time when the line actually needs to be displayed.
11632 Avoid the loop when we see neutrals on the base embedding level
11633 following a character whose directionality is the same as the
11634 paragraph's. This avoids running the expensive loop when a line
11635 ends in a long sequence of neutrals, like control characters.
11636 Add assertion against STRONG_AL type. Slightly rearrange code
11637 that determines the type of a neutral given the first non-neutral
11639 (bidi_level_of_next_char): Set next_en_pos to zero when
11640 invalidating its info.
11642 2011-10-17 Eli Zaretskii <eliz@gnu.org>
11644 * xdisp.c (push_display_prop): Determine whether to record string
11645 or buffer position by IT->string, not by IT->method. Allow
11646 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
11647 (move_it_vertically_backward): Don't look for character position
11648 immediately after the newline when in a continuation line.
11651 2011-10-15 Martin Rudalics <rudalics@gmx.at>
11653 * window.c (coordinates_in_window): Rewrite and delabelize
11654 vertical border check. (Bug#5357) (Bug#9618)
11656 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
11658 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
11659 errors in XSetWindowBorder (bug#9310).
11661 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
11663 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
11664 avoid crash when xmalloc overrun checking is enabled.
11666 2011-10-13 Eli Zaretskii <eliz@gnu.org>
11668 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
11669 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
11670 cursor motion with <left> and <right> arrow keys.
11672 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
11673 some callers set that themselves.
11675 2011-10-12 Eli Zaretskii <eliz@gnu.org>
11677 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
11678 display string and the previous row comes from the same string and
11679 is empty. (Bug#9739) (Bug#9738)
11681 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
11683 * doc.c (get_doc_string): Encode file name (bug#9735).
11685 2011-10-12 Eli Zaretskii <eliz@gnu.org>
11687 * bidi.c (bidi_level_of_next_char):
11688 * xdisp.c (get_visually_first_element): Remove old incorrect
11689 comments regarding the Unicode Line Separator character.
11691 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
11693 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
11695 * alloc.c (Fgc_status): Do not access beyond zombies array
11696 boundary if nzombies > MAX_ZOMBIES.
11697 * alloc.c (dump_zombies): Add missing format specifier.
11699 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
11701 * xdisp.c (set_cursor_from_row): Simplify conditionals,
11702 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
11704 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
11705 Some packages use them to denote characters with modifiers.
11707 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
11709 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
11710 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
11711 matching a pp-number. Rename parameter var to var1.
11713 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
11715 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
11717 2011-10-08 Glenn Morris <rgm@gnu.org>
11719 * callint.c (Fcall_interactively): Give a more explicit error for the
11720 'c' case with a non-character input. (Bug#8479)
11722 2011-10-08 Eli Zaretskii <eliz@gnu.org>
11724 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
11726 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
11727 lines that are hscrolled on the left.
11729 * dispnew.c (buffer_posn_from_coords): Account for a possible
11730 presence of header-line. (Bug#4426)
11732 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
11734 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
11735 Don't advertise functionality which we discourage or doesn't work.
11737 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
11739 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
11740 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
11741 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
11742 this makes Emacs dump core during garbage collection on rare
11743 occasions. sizeof is obviously inferior to offsetof here, so
11744 stick with offsetof.
11745 (GC_POINTER_ALIGNMENT): New macro.
11746 (mark_memory): Omit 3rd (offset) arg; caller changed.
11747 Don't assume EMACS_INT alignment is the same as pointer alignment.
11749 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
11751 * keyboard.c (read_key_sequence_remapped): New var.
11752 (read_key_sequence): Compute remapping in the right buffer.
11753 (command_loop_1): Use read_key_sequence's remapping directly.
11755 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
11757 * dired.c (file_name_completion): Don't expand file name.
11758 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
11759 before checking file name handler.
11761 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
11762 they've been requested explicitly (bug#9591).
11764 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
11766 * keymap.c (Fsingle_key_description): Use make_specified_string
11767 instead of build_string to build string from push_key_description.
11770 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11772 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
11773 This fixes a Y2038 bug on 64-bit hosts.
11774 * buffer.c (reset_buffer):
11775 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
11776 (Fclear_buffer_auto_save_failure):
11777 Use 0, not -1, to represent an unset failure time, since time_t
11778 might not be signed.
11780 Remove dependency on glibc malloc internals.
11781 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11782 Move back here from lisp.h, but with their new implementations.
11783 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11784 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
11785 * charset.c (charset_table_init): New static var.
11786 (syms_of_charset): Use it instead of xmalloc. This removes a
11787 dependency on glibc malloc internals. See Eli Zaretskii's comment in
11788 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
11789 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11790 Move back to alloc.c.
11791 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11792 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
11794 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
11796 * nsterm.m (windowDidResize): Call x_set_window_size only when
11797 ns_in_resize is true. Otherwise set pixelwidth/height and
11798 call change_frame_size (Bug#9628).
11800 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
11802 Port --enable-checking=all to Fedora 14 x86-64.
11803 * charset.c (syms_of_charset): Also account for glibc malloc's
11804 internal overhead when calculating the initial malloc maximum.
11806 Port --enable-checking=all to Fedora 14 x86.
11807 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11809 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
11810 (overrun_check_realloc, overrun_check_free):
11811 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
11812 That way, xmalloc returns a properly-aligned pointer even if
11813 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
11814 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
11815 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
11816 into account when calculating the initial malloc maximum.
11817 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
11818 Move here from alloc.c, so that charset.c can use it too.
11819 Properly align; the old code wasn't right for common 32-bit hosts
11820 when configured with --enable-checking=all.
11821 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
11822 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
11824 2011-09-29 Eli Zaretskii <eliz@gnu.org>
11826 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
11829 2011-09-28 Eli Zaretskii <eliz@gnu.org>
11831 * xdisp.c (compute_display_string_end): If there's no display
11832 string at CHARPOS, return -1.
11834 * bidi.c (bidi_fetch_char): When compute_display_string_end
11835 returns a negative value, treat the character as a normal
11836 character not covered by a display string. (Bug#9624)
11838 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
11840 * lread.c (Fread_from_string): Fix typo in docstring.
11842 2011-09-27 Eli Zaretskii <eliz@gnu.org>
11844 * xdisp.c (handle_invisible_prop): If invisible text ends on a
11845 newline, reseat the iterator instead of bidi-iterating there one
11846 character at a time. (Bug#9610)
11847 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
11848 TO_CHARPOS if the bidi iterator is at base embedding level.
11850 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
11852 * lread.c (readevalloop): Use correct code for NBSP.
11853 (read1): Likewise. (Bug#9608)
11855 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
11857 * dbusbind.c (Fdbus_register_signal): When service is not
11858 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
11860 2011-09-25 Glenn Morris <rgm@gnu.org>
11862 * buffer.c (truncate-lines): Doc fix.
11864 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
11866 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
11867 (Fset_window_next_buffers): Doc fix.
11869 2011-09-24 Glenn Morris <rgm@gnu.org>
11871 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
11873 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
11875 Fix minor problems found by static checking.
11876 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
11877 * indent.c (Fvertical_motion): Fix == vs = typo.
11879 2011-09-24 Eli Zaretskii <eliz@gnu.org>
11881 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
11882 Default value is now t. Doc fix.
11884 * indent.c (Fvertical_motion): Compute and apply the overshoot
11885 logic when moving up, not only when moving down. Fix the
11886 confusing name and values of the it_overshoot_expected variable;
11887 logic changes accordingly. (Bug#9254) (Bug#9549)
11889 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
11890 CHARPOS is covered by a display string which includes newlines.
11891 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
11892 is covered by a display string with embedded newlines.
11894 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
11896 * dbusbind.c (Fdbus_register_signal): Add match rule to
11897 Vdbus_registered_objects_table. (Bug#9581)
11898 (Fdbus_register_method, Vdbus_registered_objects_table):
11901 2011-09-24 Jim Meyering <meyering@redhat.com>
11903 do not ignore write error for any output size
11904 The previous change was incomplete.
11905 While it makes emacs --batch detect the vast majority of stdout
11906 write failures, errors were still ignored whenever the output size is
11907 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
11908 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
11909 && echo FAIL: ignored write error
11910 FAIL: ignored write error
11911 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
11912 && echo FAIL: ignored write error
11913 FAIL: ignored write error
11914 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
11916 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
11918 * emacs.c (Fkill_emacs): In noninteractive mode exit
11919 non-successfully if a write error occurred on stdout. (Bug#9574)
11921 2011-09-21 Eli Zaretskii <eliz@gnu.org>
11923 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
11926 * dispextern.h (struct it): Update the comment documenting what
11929 2011-09-20 Eli Zaretskii <eliz@gnu.org>
11931 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
11932 a display string, extend search for cursor position to end of row.
11933 (find_row_edges): If the row ends in a newline from a display
11934 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
11935 Handle the case of a display string with multiple newlines.
11936 (Fcurrent_bidi_paragraph_direction): Fix search for previous
11937 non-empty line. Fixes confusing cursor motion with arrow keys at
11938 the beginning of a line that starts with whitespace.
11940 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11942 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
11945 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
11947 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
11948 boolean (Bug#9154).
11950 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11952 * xdisp.c (display_line): Record maximum and minimum buffer
11953 positions even if no glyphs were produced (e.g., by a zero-width
11954 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
11955 buffer positions that will be removed from the glyph row because
11957 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
11958 column is beyond frame width: don't subtract 1 "pixel" when
11959 computing width of the stretch.
11960 (reseat_at_next_visible_line_start): Undo the change made on
11961 2011-09-17 that saved paragraph information and restored it after
11962 the call to `reseat'. (Bug#9545)
11964 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11966 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
11967 and turn window cursor on if cleared (Bug#9415).
11969 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
11971 * search.c (boyer_moore): Take unibyte characters from pattern
11972 literally. (Bug#9458)
11974 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11976 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
11978 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
11980 Fix minor problem found by static checking.
11981 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
11982 initialized, to pacify gcc -Wuninitialized.
11984 * fileio.c: Report proper errno when syscall falls.
11985 (Finsert_file_contents): Save and restore errno,
11986 so that report_file_error outputs the correct diagnostic.
11987 (Fwrite_region) [CLASH_DETECTION]: Likewise.
11989 2011-09-18 Eli Zaretskii <eliz@gnu.org>
11991 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
11993 2011-09-17 Eli Zaretskii <eliz@gnu.org>
11995 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
11996 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
11998 2011-09-17 Eli Zaretskii <eliz@gnu.org>
12000 * xdisp.c (reseat_at_next_visible_line_start): Keep information
12001 about the current paragraph and restore it after the call to reseat.
12003 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
12004 (bidi_find_paragraph_start): Search back for paragraph beginning
12005 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
12006 (bidi_move_to_visually_next): Only trigger paragraph-related
12007 computations when the last character is a newline or at EOB, not
12008 just any NEUTRAL_B. (Bug#9470)
12010 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
12011 truncated lines if point is covered by a display string. (Bug#9524)
12013 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
12015 * xselect.c: Relax test for outgoing X longs (Bug#9498).
12016 (cons_to_x_long): New function.
12017 (lisp_data_to_selection_data): Use it. Correct the test for
12018 short-versus-long data; it was negated. Break out of vector
12019 loop, for efficiency, when a long datum is discovered.
12021 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
12023 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
12025 2011-09-16 Eli Zaretskii <eliz@gnu.org>
12027 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
12028 GCC PR/17406) by declaring this function with external scope.
12030 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
12032 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
12033 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
12035 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
12037 * editfns.c (Fformat): Correctly handle text properties on "%%".
12039 2011-09-15 Eli Zaretskii <eliz@gnu.org>
12041 * xterm.c (x_draw_composite_glyph_string_foreground):
12042 * w32term.c (x_draw_composite_glyph_string_foreground):
12043 * term.c (encode_terminal_code):
12044 * composite.c (composition_update_it, get_composition_id):
12045 * xdisp.c (get_next_display_element)
12046 (fill_composite_glyph_string): Add comments about special meaning
12047 of TAB characters in a composition.
12049 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
12051 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
12052 This occurs when processing a multibyte format.
12053 Problem reported by Wolfgang Jenker.
12055 2011-09-15 Johan Bockgård <bojohan@gnu.org>
12057 * xdisp.c (try_cursor_movement): Only check for exact match if
12058 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
12060 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
12062 Remove unused external symbols.
12063 * dispextern.h (calc_pixel_width_or_height): Remove decl.
12064 * xdisp.c (calc_pixel_width_or_height): Now static.
12065 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
12066 * indent.c (check_display_width):
12067 * w32term.c: Fix comment to match code.
12068 * xterm.c, xterm.h (x_catching_errors): Remove.
12070 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
12072 * xselect.c: Use signed conversions more consistently (Bug#9498).
12073 (selection_data_to_lisp_data): Assume incoming selection data are
12074 signed integers, not unsigned. This is to be consistent with
12075 outgoing selection data, which was modified to use signed integers
12076 in as part of the fix to Bug#9196 in response to Jan D.'s comment
12077 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
12078 expects long, not unsigned long.
12080 2011-09-14 Eli Zaretskii <eliz@gnu.org>
12082 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
12083 computation of loop end. Reported by Johan Bockgård
12086 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
12088 * frame.c (Fother_visible_frames_p): Function deleted.
12090 2011-09-12 Eli Zaretskii <eliz@gnu.org>
12092 * indent.c (compute_motion): Process display vector front to back
12093 rather than the other way around. (Bug#2496)
12095 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
12097 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
12099 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
12101 * minibuf.c (Fread_from_minibuffer): Doc fix.
12103 2011-09-11 Eli Zaretskii <eliz@gnu.org>
12105 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
12106 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
12108 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
12110 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
12111 value for non-existent files.
12113 2011-09-11 Eli Zaretskii <eliz@gnu.org>
12115 * fileio.c (Finsert_file_contents): If the file cannot be opened,
12116 set its "size" to -1. This will set the modtime_size field of
12117 the corresponding buffer to -1, which is what
12118 verify-visited-file-modtime expects for files that do not exist.
12121 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
12123 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
12125 * lisp.h: ... from here. push_key_description is no longer
12126 defined in keyboard.c, so its declaration should not be in
12127 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
12128 logically belongs with push_key_description.
12130 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
12132 * buffer.h: Include <sys/types.h> instead of <time.h>.
12133 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
12134 Problem reported by Herbert J. Skuhra.
12136 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
12138 * xml.c (parse_region): Make the parsing work for
12139 non-comment-starting XML files again (bug#9144).
12141 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
12143 * image.c (gif_load): Fix calculation of bottom and right corner.
12146 2011-09-10 Eli Zaretskii <eliz@gnu.org>
12148 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
12149 redisplay in small windows.
12151 2011-09-09 Eli Zaretskii <eliz@gnu.org>
12153 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
12155 2011-09-08 Martin Rudalics <rudalics@gmx.at>
12157 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
12158 Operate on live windows only.
12160 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
12162 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
12164 2011-09-07 Eli Zaretskii <eliz@gnu.org>
12166 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
12167 only under bidi iteration.
12169 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
12171 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
12173 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
12175 isnan: Fix porting problem to Solaris 10 with bundled gcc.
12176 Without this fix, the command to link temacs failed due to an
12177 undefined symbol __builtin_isnan. This is because
12178 /usr/include/iso/math_c99.h #defines isnan(x) to
12179 __builtin_isnan(x), but the bundled gcc, which identifies itself
12180 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
12182 * floatfns.c (isnan): #undef, and then #define to a clone of
12184 (Fisnan): Always define, since it's always available now.
12185 (syms_of_floatfns): Always define isnan at the Lisp level.
12187 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
12189 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
12191 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
12193 * fileio.c: Fix bugs with large file offsets (Bug#9428).
12194 The previous code assumed that file offsets (off_t values) fit in
12195 EMACS_INT variables, which is not true on typical 32-bit hosts.
12196 The code messed up by falsely reporting buffer overflow in cases
12197 such as (insert-file-contents "big" nil 1 2) into an empty buffer
12198 when "big" contains more than 2**29 bytes, even though this
12199 inserts just one byte and does not overflow the buffer.
12200 (Finsert_file_contents): Store file offsets as off_t
12201 values, not as EMACS_INT values. Check for overflow when
12202 converting between EMACS_INT and off_t. When checking for
12203 buffer overflow or for overlap, take the offsets into account.
12204 Don't use EMACS_INT for small values where int suffices.
12205 When checking for overlap, fix a typo: ZV was used where
12206 ZV_BYTE was intended.
12207 (Fwrite_region): Don't assume off_t fits into 'long'.
12208 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
12210 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
12212 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
12214 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
12216 sprintf-related integer and memory overflow issues (Bug#9412).
12218 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
12219 (esprintf, exprintf, evxprintf): New functions.
12220 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
12221 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
12222 (modify_event_symbol): Do not assume that the length of
12223 name_alist_or_stem is safe to alloca and fits in int.
12224 (Fexecute_extended_command): Likewise for function name and binding.
12225 (Frecursion_depth): Wrap around reliably on integer overflow.
12226 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
12227 since some callers pass EMACS_INT values.
12228 (Fsingle_key_description): Don't crash if symbol name contains more
12229 than MAX_ALLOCA bytes.
12230 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
12231 (get_minibuffer): Arg is now EMACS_INT, not int.
12232 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
12233 (esprintf, exprintf, evxprintf): New decls.
12234 * window.h (command_loop_level, minibuf_level): Reflect API changes.
12236 * dbusbind.c (signature_cat): New function.
12237 (xd_signature, Fdbus_register_signal):
12238 Do not overrun buffer; instead, report string overflow.
12240 * dispnew.c (add_window_display_history): Don't overrun buffer.
12241 Truncate instead; this is OK since it's just a log.
12243 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
12244 even if the time zone offset is outlandishly large.
12245 Don't mishandle offset == INT_MIN.
12247 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
12248 when creating daemon; the previous buffer-overflow check was incorrect.
12250 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
12251 which has the guts of the old verror function.
12253 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
12254 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
12256 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
12257 (font_unparse_xlfd): Don't blindly alloca long strings.
12258 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
12259 fits in int, when using sprintf. Use single snprintf to count
12260 length of string rather than counting it via multiple sprintfs;
12261 that's simpler and more reliable.
12262 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
12263 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
12264 sprintf, in case result does not fit in int.
12266 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
12267 (fontset_from_font): Print it.
12269 * frame.c (tty_frame_count): Now printmax_t, not int.
12270 (make_terminal_frame, set_term_frame_name): Print it.
12271 (x_report_frame_params): In X, window IDs are unsigned long,
12272 not signed long, so print them as unsigned.
12273 (validate_x_resource_name): Check for implausibly long names,
12274 and don't assume name length fits in 'int'.
12275 (x_get_resource_string): Don't blindly alloca invocation name;
12276 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
12279 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
12280 (xg_check_special_colors, xg_set_geometry):
12281 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
12283 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
12284 Use esprintf, not sprintf, in case result does not fit in int.
12286 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
12287 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
12288 it as a large positive number.
12289 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
12290 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
12292 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
12293 in case result does not fit in int.
12295 * print.c (float_to_string): Detect width overflow more reliably.
12296 (print_object): Make sprintf buffer a bit bigger, to avoid potential
12297 buffer overrun. Don't assume list length fits in 'int'. Treat
12298 print length of 0 as 0, not as infinity; to be consistent with other
12299 uses of print length in this function. Don't overflow print length
12300 index. Don't assume hash table size fits in 'long', or that
12301 vectorlike size fits in 'unsigned long'.
12303 * process.c (make_process): Use printmax_t, not int, to format
12304 process-name gensyms.
12306 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
12308 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
12309 to avoid potential buffer overrun.
12311 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
12312 if X resource line is longer than 512 bytes.
12314 * xfns.c (x_window): Make sprintf buffer a bit bigger
12315 to avoid potential buffer overrun.
12317 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
12319 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
12321 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
12323 Integer overflow fixes for scrolling, etc.
12324 Without these, Emacs silently mishandles large integers sometimes.
12325 For example, "C-u 4294967297 M-x recenter" was treated as if
12326 it were "C-u 1 M-x recenter" on a typical 64-bit host.
12328 * xdisp.c (try_window_id): Check Emacs fixnum range before
12329 converting to 'int'.
12331 * window.c (window_scroll_line_based, Frecenter):
12332 Check that an Emacs fixnum is in range before assigning it to 'int'.
12333 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
12334 values converted from Emacs fixnums.
12335 (Frecenter): Don't wrap around a line count if it is out of 'int'
12336 range; instead, treat it as an extreme value.
12337 (Fset_window_configuration, compare_window_configurations):
12338 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
12340 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
12341 that can exceed INT_MAX. Check that EMACS_INT value is in range
12342 before assigning it to the (possibly-narrower) index.
12343 (match_limit): Don't assume that a fixnum can fit in 'int'.
12345 * print.c (print_object): Use ptrdiff_t, not int, for index that can
12348 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
12349 (Fvertical_motion): Don't wrap around LINES values that don't fit
12350 in 'int'. Instead, treat them as extreme values. This is good
12351 enough for windows, which can't have more than INT_MAX lines anyway.
12353 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
12355 * Require libxml/parser.h to avoid compilation warning.
12357 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
12359 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
12360 since this reportedly can destroy thread storage.
12362 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
12364 * syntax.c (find_defun_start): Update all cache variables if
12365 exiting early (Bug#9401).
12367 2011-08-30 Eli Zaretskii <eliz@gnu.org>
12369 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
12371 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
12372 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
12373 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
12375 * term.c (tty_append_glyph): New function.
12376 (produce_stretch_glyph): Static function and its prototype deleted.
12378 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
12381 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
12383 * image.c (parse_image_spec): Check for nonnegative, not for positive,
12384 when checking :margin (Bug#9390).
12385 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
12386 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
12387 so that the name doesn't mislead. All uses changed.
12389 2011-08-28 Johan Bockgård <bojohan@gnu.org>
12391 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
12394 2011-08-27 Eli Zaretskii <eliz@gnu.org>
12396 * xdisp.c (move_it_to): Don't bail out early when reaching
12397 position beyond to_charpos, if we are scanning backwards.
12398 (move_it_vertically_backward): When DY == 0, make sure we get to
12399 the first character in the line after the newline.
12401 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
12403 * ccl.c: Improve and simplify overflow checking (Bug#9196).
12404 (ccl_driver): Do not generate an out-of-range pointer.
12405 (Fccl_execute_on_string): Remove unnecessary check for
12406 integer overflow, noted by Stefan Monnier in
12407 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
12408 Remove a FIXME that didn't need fixing.
12409 Simplify the newly-introduced buffer reallocation code.
12411 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
12413 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
12415 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
12417 Integer and memory overflow issues (Bug#9196).
12419 * doc.c (get_doc_string): Rework so that
12420 get_doc_string_buffer_size is the actual buffer size, rather than
12421 being 1 less than the actual buffer size; this makes xpalloc more
12424 * image.c (x_allocate_bitmap_record, cache_image):
12425 * xselect.c (Fx_register_dnd_atom):
12426 Simplify previous changes by using xpalloc.
12428 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
12429 since either will do and ptrdiff_t is convenient with xpalloc.
12431 * charset.c (charset_table_size)
12432 (struct charset_sort_data.priority): Now ptrdiff_t.
12433 (charset_compare): Don't overflow if priorities differ greatly.
12434 (Fsort_charsets): Don't assume list length fits in int.
12435 Check for size-calculation overflow when allocating sort data.
12436 (syms_of_charset): Allocate an initial charset table that is
12437 just under 64 KiB, to avoid problems with glibc malloc and mmap.
12439 * cmds.c (internal_self_insert): Check for size-calculation overflow.
12441 * composite.h (struct composition.glyph_len): Now int, not unsigned.
12442 The actual value is always <= INT_MAX, and leaving it unsigned made
12443 overflow checking harder.
12445 * dispextern.h (struct glyph_matrix.rows_allocated)
12446 (struct face_cache.size): Now ptrdiff_t, for convenience in use
12447 with xpalloc. The values are still always <= INT_MAX.
12449 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
12451 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
12452 (SAFE_NALLOCA): New macro.
12454 * region-cache.c (struct boundary.pos, find_cache_boundary)
12455 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
12456 (set_cache_region, invalidate_region_cache)
12457 (revalidate_region_cache, know_region_cache, region_cache_forward)
12458 (region_cache_backward, pp_cache):
12459 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
12460 so that ptrdiff_t * can be passed to xpalloc.
12461 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
12462 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
12463 (pp_cache): Don't assume cache_len fits in int.
12464 * region-cache.h: Adjust extern decls to match.
12466 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
12467 EMACS_INT, since either will do, for xpalloc.
12469 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
12470 (xnmalloc, xnrealloc, xpalloc): New functions.
12472 * bidi.c (bidi_shelve_header_size): New constant.
12473 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
12474 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
12476 * bidi.c (bidi_cache_shrink):
12477 * buffer.c (overlays_at, overlays_in, record_overlay_string)
12479 Don't update size of array until after memory allocation succeeds,
12480 because xmalloc/xrealloc may not return.
12481 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
12482 now that we have proper integer overflow checking.
12483 (record_overlay_string, overlay_strings): Catch overflows when
12484 calculating size of overlay_str_buf.
12486 * callproc.c (Fcall_process): Check for size overflow when
12487 calculating size of args2.
12488 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
12489 Normally we prefer signed values, but sticking with ptrdiff_t would
12490 require adding more-complicated checks.
12492 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
12493 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
12494 Redo buffer-overflow calculations to avoid integer overflow.
12495 Add a FIXME comment where memory seems to be over-allocated.
12497 * character.c (Fstring): Check for size-calculation overflow.
12499 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
12500 unnecessary integer overflow. Check for size overflow.
12501 (encode_coding_object): Don't update size until xmalloc succeeds.
12503 * composite.c (get_composition_id): Check for overflow in glyph
12504 length calculations.
12506 Integer and memory overflow fixes for display code.
12507 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
12508 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
12509 (scrolling_window): Check for overflow in size calculations.
12510 (line_draw_cost, realloc_glyph_pool, add_row_entry):
12511 Don't assume glyph table len fits in int.
12512 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
12513 (row_table_size): Now ptrdiff_t, not int.
12514 (scrolling_window): Avoid overflow in size calculations.
12515 Don't update size until allocation succeeds.
12516 * fns.c (concat): Check for overflow in size calculations.
12517 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
12518 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12519 (NEXT_ALMOST_PRIME_LIMIT): New constant.
12521 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
12522 (get_doc_string): Check for size calculation overflow.
12523 Don't update size until allocation succeeds.
12524 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
12525 EMACS_INT, where ptrdiff_t will do.
12526 (Fsubstitute_command_keys): Check for string overflow.
12528 * editfns.c (set_time_zone_rule): Don't assume environment length
12530 (message_length): Now ptrdiff_t, not int.
12531 (Fmessage_box): Don't update size until allocation succeeds.
12532 Don't assume message length fits in int.
12533 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
12535 * emacs.c (main): Do not reallocate argv, since there is a null at
12536 the end that can be overwritten, and this way there's no need to
12537 worry about size-calculation overflow.
12538 (sort_args): Check for size-calculation overflow.
12540 * eval.c (init_eval_once, grow_specpdl): Don't update size until
12542 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
12544 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
12545 (x_set_scroll_bar_width, x_figure_window_size):
12546 Check for integer overflow.
12547 (x_set_alpha): Do not assume XINT fits in int.
12549 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
12550 This is for the members text_lines, text_cols, total_lines, total_cols,
12551 where the system imposes an 'int' limit.
12553 * fringe.c (Fdefine_fringe_bitmap):
12554 Don't update size until alloc works.
12556 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
12557 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
12559 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
12560 Check for size-calculation overflow.
12561 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
12562 do, as we prefer signed integers.
12563 (id_to_widget.max_size, id_to_widget.used)
12564 (xg_store_widget_in_map, xg_remove_widget_from_map)
12565 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
12566 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
12567 Use and return ptrdiff_t, not int.
12568 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
12569 * gtkutil.h: Change prototypes to match the above.
12571 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
12572 are duplicate now that they've been promoted to lisp.h.
12573 (x_allocate_bitmap_record, x_alloc_image_color)
12574 (make_image_cache, cache_image, xpm_load):
12575 Don't update size until alloc is done.
12576 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
12578 Check for size calculation overflow.
12579 (ct_colors_allocated_max): New constant.
12580 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
12583 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
12584 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
12585 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
12586 Use ptrdiff_t, not int, to count maps.
12587 (read_char_minibuf_menu_prompt): Check for overflow in size
12588 calculations. Don't update size until allocation succeeds.
12589 Redo calculations to avoid overflow.
12590 * keyboard.h: Change prototypes to match the above.
12592 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
12594 (current_minor_maps): Check for size calculation overflow.
12595 * keymap.h: Change prototypes to match the above.
12597 * lread.c (read1, init_obarray): Don't update size until alloc done.
12599 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
12600 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
12602 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
12603 Now ptrdiff_t, not int.
12604 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
12605 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
12607 * process.c (Fnetwork_interface_list): Check for overflow
12608 in size calculation.
12610 * region-cache.c (move_cache_gap): Check for size calculation overflow.
12612 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
12613 overflow. Don't bother calling xmalloc when xrealloc will do.
12615 * search.c (Freplace_match): Check for size calculation overflow.
12616 (Fset_match_data): Don't assume list lengths fit in 'int'.
12618 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
12619 for command line length. Do not attempt to address one before the
12620 beginning of an array, as that's not portable.
12622 * term.c (max_frame_lines): Remove; unused.
12623 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
12625 (encode_terminal_code, calculate_costs): Check for size
12626 calculation overflow.
12627 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
12628 table lengths and related sizes. Don't update size until alloc
12629 done. Redo calculations to avoid overflow.
12630 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
12632 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
12633 subtracting pointers.
12634 (gobble_line): Check for overflow more carefully. Don't update size
12637 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
12638 Don't update size until alloc done.
12639 Redo size calculations to avoid overflow.
12640 Check for size calculation overflow.
12641 (main) [DEBUG]: Fix typo in invoking tparam1.
12643 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
12644 Use ptrdiff_t, not int, for sizes.
12645 (store_mode_line_noprop_char): Don't update size until alloc done.
12647 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
12648 Use ptrdiff_t, not int, for sizes.
12649 (Finternal_make_lisp_face, cache_face):
12650 Check for size calculation overflow.
12651 (cache_face): Treat size calculation overflows as if they were
12652 memory exhaustion (the usual treatment), rather than aborting.
12654 * xfns.c (x_encode_text, x_set_name_internal)
12655 (Fx_change_window_property): Use ptrdiff_t, not int, to count
12656 sizes, since they can exceed INT_MAX in size. Check for size
12657 calculation overflow.
12659 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
12660 (xg_select): Check for size calculation overflow.
12661 Don't update size until alloc done.
12663 * xrdb.c (get_environ_db): Don't assume path length fits in int,
12664 as sprintf is limited to int lengths.
12666 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
12667 (X_LONG_MIN): New macros.
12668 Use them to make the following changes clearer.
12669 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
12670 This change doesn't affect the value now, but it may help remind
12671 future maintainers not to raise the value too much later.
12672 (SELECTION_QUANTUM): Remove, replacing with ...
12673 (selection_quantum): ... new function, which avoids overflow.
12675 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
12676 assumption that selection length fits in 'int'.
12677 (x_reply_selection_request, x_handle_selection_request)
12678 (x_get_window_property, receive_incremental_selection)
12679 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
12680 (lisp_data_to_selection_data, clean_local_selection_data):
12681 Use ptrdiff_t, not int, to record length of selection.
12682 (x_reply_selection_request, x_get_window_property)
12683 (receive_incremental_selection, x_property_data_to_lisp):
12684 Redo calculations to avoid overflow.
12685 (x_reply_selection_request): When sending hint, ceiling it at
12686 X_LONG_MAX rather than relying on wraparound overflow to send
12688 (x_get_window_property, receive_incremental_selection)
12689 (lisp_data_to_selection_data, x_property_data_to_lisp):
12690 Check for size-calculation overflow.
12691 (x_get_window_property, receive_incremental_selection)
12692 (lisp_data_to_selection_data, Fx_register_dnd_atom):
12693 Don't store size until memory allocation succeeds.
12694 (x_get_window_property): Plug memory leak on memory exhaustion.
12695 Don't double-block input; malloc is safe here. Don't assume 2**34
12696 - 4 fits in unsigned long. Add an xassert to check
12697 XGetWindowProperty overflow. Be more careful about overflow
12698 calculations, and distinguish size from memory overflow better.
12699 (receive_incremental_selection): When tracing, don't assume
12700 unsigned int is less than INT_MAX.
12701 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
12702 harmful) conversions of unsigned short to int.
12703 (lisp_data_to_selection_data): Don't assume that integers
12704 in the range -65535 through -1 fit in an X unsigned short.
12705 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
12706 result parameters unless successful. Rely on cons_to_unsigned
12707 to report problems with elements; the old code wasn't right anyway.
12708 (x_check_property_data): Check for int overflow; we cannot use
12709 a wider type due to X limits.
12710 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
12712 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
12714 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
12715 (x_term_init): Check for size calculation overflow.
12716 (x_color_cells): Don't store size until memory allocation succeeds.
12717 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
12718 Don't assume alloca size is less than MAX_ALLOCA.
12719 (x_term_init): Don't assume length fits in int (sprintf is limited
12722 Use ptrdiff_t for composition IDs.
12723 * character.c (lisp_string_width):
12724 * composite.c (composition_table_size, n_compositions)
12725 (get_composition_id, composition_gstring_from_id):
12726 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
12727 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
12728 * window.c (Frecenter):
12729 Use ptrdiff_t, not int, for composition IDs.
12730 * composite.c (get_composition_id): Check for integer overflow.
12731 * composite.h: Adjust prototypes to match the above changes.
12733 Use ptrdiff_t for hash table indexes.
12734 * category.c (hash_get_category_set):
12735 * ccl.c (ccl_driver):
12736 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
12737 * coding.c (coding_system_charset_list, detect_coding_system):
12738 * coding.h (struct coding_system.id):
12739 * composite.c (get_composition_id, gstring_lookup_cache):
12740 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
12741 * image.c (xpm_get_color_table_h):
12742 * lisp.h (hash_lookup, hash_put):
12743 * minibuf.c (Ftest_completion):
12744 Use ptrdiff_t for hash table indexes, not int (which is too
12745 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
12746 32-bit --with-wide-int hosts).
12748 * charset.c (Fdefine_charset_internal): Check for integer overflow.
12749 Add a FIXME comment about memory leaks.
12750 (syms_of_charset): Don't assume xmalloc returns.
12752 Don't assume that stated character widths fit in int.
12753 * character.c (Fchar_width, c_string_width, lisp_string_width):
12754 * character.h (CHAR_WIDTH):
12755 * indent.c (MULTIBYTE_BYTES_WIDTH):
12756 Use sanitize_char_width to avoid undefined and/or bad behavior
12757 with outlandish widths.
12758 * character.h (sanitize_tab_width): Rename from sanitize_width,
12759 now that we have two such functions. All uses changed.
12760 (sanitize_char_width): New inline function.
12762 Don't assume that tab-width fits in int.
12763 * character.h (sanitize_width): New inline function.
12764 (SANE_TAB_WIDTH): New macro.
12765 (ASCII_CHAR_WIDTH): Use it.
12766 * indent.c (sane_tab_width): Remove. All uses replaced by
12767 SANE_TAB_WIDTH (current_buffer).
12768 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
12770 * fileio.c: Integer overflow issues with file modes.
12771 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
12773 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
12774 Remove unreachable code.
12775 (read_hex, load_charset_map_from_file): Check for integer overflow.
12777 * xterm.c: Don't go over XClientMessageEvent limit.
12778 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
12779 (x_send_scroll_bar_event): Likewise. Check that the size does not
12780 exceed limits imposed by XClientMessageEvent, as well as the usual
12781 ptrdiff_t and size_t limits.
12783 * keyboard.c: Overflow, signedness and related fixes.
12784 (make_lispy_movement): Use same integer type in forward decl
12785 that is used in the definition.
12786 (read_key_sequence, keyremap_step):
12787 Change bufsize argument back to int, undoing my 2011-03-30 change.
12788 We prefer signed types, and int is wide enough here.
12789 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
12790 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
12791 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
12792 length, not size_t. Use ptrdiff_t for index, not int.
12793 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
12794 possibility of integer overflow.
12796 Overflow, signedness and related fixes for images.
12798 * dispextern.h (struct it.stack[0].u.image.image_id)
12799 (struct_it.image_id, struct image.id, struct image_cache.size)
12800 (struct image_cache.used, struct image_cache.ref_count):
12801 * gtkutil.c (update_frame_tool_bar):
12802 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
12803 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
12804 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
12805 * nsmenu.m (update_frame_tool_bar):
12806 * xdisp.c (calc_pixel_width_or_height):
12807 * xfns.c (image_cache_refcount):
12808 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
12809 on typical 64-bit hosts.
12811 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
12812 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
12813 Omit unnecessary casts to int.
12814 (parse_image_spec): Check that integers fall into 'int' range
12815 when the callers expect that.
12816 (image_ascent): Redo ascent calculation to avoid int overflow.
12817 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
12818 (lookup_image): Remove unnecessary tests.
12819 (xbm_image_p): Locals are now of int, not EMACS_INT,
12820 since parse_image_check makes sure they fit into int.
12821 (png_load, gif_load, svg_load_image):
12822 Prefer int to unsigned where either will do.
12823 (tiff_handler): New function, combining the cores of the
12824 old tiff_error_handler and tiff_warning_handler.
12825 This function is rewritten to use vsnprintf and thereby avoid
12826 stack buffer overflows. It uses only the features of vsnprintf
12827 that are common to both POSIX and native Microsoft.
12828 (tiff_error_handler, tiff_warning_handler): Use it.
12829 (tiff_load, gif_load, imagemagick_load_image):
12830 Don't assume :index value fits in 'int'.
12831 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
12832 (imagemagick_load_image): Check that crop parameters fit into
12833 the integer types that MagickCropImage accepts. Don't assume
12834 Vimagemagick_render_type has a nonnegative value. Don't assume
12835 size_t fits in 'long'.
12836 (gs_load): Use printmax_t to print the widest integers possible.
12837 Check for integer overflow when computing image height and width.
12839 2011-08-26 Eli Zaretskii <eliz@gnu.org>
12841 * xdisp.c (redisplay_window): Don't force window start if point
12842 will be invisible in the resulting window. (Bug#9324)
12844 2011-08-25 Eli Zaretskii <eliz@gnu.org>
12846 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
12847 the display spec is of the form `(space ...)'.
12848 (handle_display_spec): Return the value returned by
12849 handle_single_display_spec, not just 1 or zero.
12850 (handle_single_display_spec): If the display spec is of the form
12851 `(space ...)', and specifies display in the text area, return 2
12853 (try_cursor_movement): Check for the need to scroll more
12854 accurately, and prefer exact match for point under bidi.
12855 Don't advance `row' beyond the last row of the window.
12857 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
12858 into disp_prop; all users changed.
12860 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
12861 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
12862 for the text covered by the display property.
12864 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
12866 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
12867 Change return value to nil.
12868 (Frecord_buffer): Delete unused function.
12870 2011-08-24 Eli Zaretskii <eliz@gnu.org>
12872 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
12873 buffers, return left-to-right.
12874 (set_cursor_from_row): Consider candidate row a win if its glyph
12875 represents a newline and point is on that newline. Fixes cursor
12876 positioning on the newline at EOL of R2L text within L2R
12877 paragraph, and vice versa.
12878 (try_cursor_movement): Check continued rows, in addition to
12879 continuation rows. Fixes unwarranted scroll when point enters a
12880 continued line of R2L text within an L2R paragraph, or vice versa.
12881 (cursor_row_p): Consider the case of point being equal to
12882 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
12883 from the end of a short line to the beginning of a continued line
12884 of R2L text within L2R paragraph.
12885 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
12886 composed characters.
12888 * bidi.c (bidi_check_type): Use xassert.
12889 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
12892 2011-08-23 Eli Zaretskii <eliz@gnu.org>
12894 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
12897 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
12899 * nsfont.m (ns_otf_to_script): Fix typo.
12901 2011-08-22 Kenichi Handa <handa@m17n.org>
12903 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
12904 extra slot even if the purpose is char-code-property-table.
12906 2011-08-23 Eli Zaretskii <eliz@gnu.org>
12908 * xdisp.c (redisplay_window): When computing centering_position,
12909 account for the height of the header line. (Bug#8874)
12911 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
12912 instead of CHAR_TO_BYTE. Fixes a crash when a completion
12913 candidate is selected by the mouse, and that candidate has a
12914 composed character under the mouse.
12916 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
12917 coordinates reported by pos-visible-in-window-p for a composed
12918 character in column zero.
12920 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
12922 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
12924 2011-08-22 Eli Zaretskii <eliz@gnu.org>
12926 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
12927 consider it a hit if to_charpos is anywhere in the range of the
12928 composed buffer positions.
12930 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
12932 * image.c (gif_load): Don't assume that each subimage has the same
12933 dimensions as the base image. Handle disposal method that is
12934 "undefined" by the gif spec (Bug#9335).
12936 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
12938 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
12939 (Fcondition_case): Document `debug' symbol in error handler.
12941 2011-08-19 Eli Zaretskii <eliz@gnu.org>
12943 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
12944 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
12945 from an Org mode buffer to a Speedbar frame.
12947 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
12948 a composition, take its buffer position from IT->cmp_it.charpos.
12949 Fixes cursor positioning at the beginning of a line that begins
12950 with a composed character.
12952 2011-08-18 Eli Zaretskii <eliz@gnu.org>
12954 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
12955 character bidirectional type, use STRONG_L instead. Fixes crashes
12956 in a buffer produced by `describe-categories'.
12958 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
12959 members before the level stack, so they would be saved and
12960 restored when copying iterator state. Fixes incorrect reordering
12961 around TABs covered by display properties.
12963 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
12965 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
12967 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
12969 * eval.c (internal_condition_case, internal_condition_case_1)
12970 (internal_condition_case_2, internal_condition_case_n):
12971 Remove unnecessary aborts (Bug#9081).
12973 2011-08-17 Eli Zaretskii <eliz@gnu.org>
12975 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
12976 has no `load' handler, try opening the file locally. (Bug#9311)
12978 2011-08-16 Ken Brown <kbrown@cornell.edu>
12980 * gmalloc.c: Expand comment.
12982 2011-08-16 Eli Zaretskii <eliz@gnu.org>
12984 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
12985 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
12987 2011-08-16 Ken Brown <kbrown@cornell.edu>
12989 Fix memory allocation problems in Cygwin build (Bug#9273).
12991 * unexcw.c ( __malloc_initialized): Declare external variable.
12992 (fixup_executable): Force the dumped emacs to reinitialize malloc.
12994 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
12996 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
12998 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
12999 in the static heap.
13000 [CYGWIN] (special_realloc): New function.
13001 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
13002 requests to realloc storage in the static heap.
13004 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
13006 * bidi.c (bidi_initialize): Remove unused local.
13008 2011-08-15 Eli Zaretskii <eliz@gnu.org>
13011 * biditype.h: Remove file.
13012 * makefile.w32-in ($(BLD)/bidi.$(O)):
13013 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
13015 * dispextern.h: Fix a typo in the comment to bidi_type_t.
13017 * chartab.c: Improve commentary for the uniprop_table API.
13019 * bidi.c (bidi_paragraph_init): Support zero value of
13020 bidi_ignore_explicit_marks_for_paragraph_level.
13021 (bidi_initialize): Use uniprop_table instead of including
13022 biditype.h and bidimirror.h.
13024 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
13025 coordinates of the iterator when restoring from ppos_it.
13028 2011-08-14 Kenichi Handa <handa@m17n.org>
13030 * process.c (create_process): Call setup_process_coding_systems
13031 after the pid of the process is set to -1 (Bug#8162).
13033 2011-08-14 Eli Zaretskii <eliz@gnu.org>
13035 * xdisp.c (move_it_in_display_line_to): Don't invoke
13036 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
13037 ppos_it. Fixes vertical cursor motion when line beginning is
13038 covered by an image. (Bug#9296)
13040 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
13042 * nsterm.h (ns_run_ascript): Declare.
13043 (NSAPP_DATA2_RUNASSCRIPT): Define.
13045 * nsfns.m (as_script, as_result, as_status): New static variables.
13046 (ns_run_ascript): New function.
13047 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
13048 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
13049 the event loop. Get status from as_status (Bug#7276).
13051 * nsterm.m (sendEvent): If event is NSApplicationDefined and
13052 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
13053 the event loop (Bug#7276).
13055 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
13057 * gnutls.c (QCgnutls_bootprop_priority)
13058 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
13059 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
13060 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
13061 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
13062 (QCgnutls_bootprop_verify_hostname_error)
13063 (QCgnutls_bootprop_callbacks_verify): Rename from
13064 Qgnutls_bootprop_..., all uses changed.
13066 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
13069 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
13071 * xfaces.c (Qframe_set_background_mode): Now static.
13072 * dispextern.h (Qframe_set_background_mode): Remove decl.
13074 * process.c (Fnetwork_interface_info): Declare local only if needed.
13076 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
13078 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
13079 (Fnetwork_interface_list): Allocate in increments of bytes instead
13080 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
13081 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
13083 (struct ifflag_def): notrailers is smart on OSX.
13084 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
13085 Get hardware address with getifaddrs if available.
13087 2011-08-12 Eli Zaretskii <eliz@gnu.org>
13089 * xdisp.c (iterate_out_of_display_property): xassert that
13090 IT->position is set to within IT->object's boundaries. Break from
13091 the loop as soon as EOB is reached; avoids infloops in redisplay
13092 when IT->position is set up wrongly due to some bug.
13093 Set IT->current to match the bidi iterator unconditionally.
13094 (push_display_prop): Allow GET_FROM_STRING as IT->method on
13095 entry. Force push_it to save on the stack the current
13096 buffer/string position, to be restored by pop_it. Fix flags in
13097 the iterator structure wrt the object coming from a display
13098 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
13099 properties. (Bug#9284)
13101 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
13103 * fontset.c (fontset_get_font_group): Add proper type checks.
13106 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13108 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
13109 and LC_VERSION_MIN_MACOSX.
13110 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
13111 (dump_it) [LC_FUNCTION_STARTS]: Use it.
13113 2011-08-08 Eli Zaretskii <eliz@gnu.org>
13115 * xdisp.c (forward_to_next_line_start): Allow to use the
13116 no-display-properties-and-no-overlays under bidi display.
13117 Set disp_pos in the bidi iterator to avoid searches for display
13118 properties and overlays.
13120 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
13122 * editfns.c (Fset_time_zone_rule): Document relationship with the
13125 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
13126 the font entity extracted from the cache (Bug#8109).
13128 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
13130 * composite.c (autocmp_chars): Don't reset point. That is done by
13131 restore_point_unwind (Bug#5984).
13133 2011-08-07 Juri Linkov <juri@jurta.org>
13135 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
13136 to show the arg `TIME' instead of `TIMEVAL'.
13138 2011-08-06 Eli Zaretskii <eliz@gnu.org>
13140 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
13141 display property strides EOL and includes a newline, as in
13142 longlines-mode. (Bug#9254)
13143 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
13144 word-wrap under bidirectional display. (Bug#9224)
13146 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
13147 is non-zero, even if the data buffer is NULL. Fixes a crash in
13148 vertical-motion with longlines-mode. (Bug#9254)
13150 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13152 * bidi.c <bidi_cache_total_alloc>: Now static.
13153 (bidi_initialize): Initialize bidi_cache_total_alloc.
13155 * xdisp.c (display_line): Release buffer allocated for shelved bidi
13158 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
13159 amount allocated this far in `bidi_cache_total_alloc'.
13160 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
13161 non-zero, only free the data buffer without restoring the cache
13162 contents. All callers changed.
13164 * dispextern.h (bidi_unshelve_cache): Update prototype.
13166 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
13167 (move_it_in_display_line, move_it_to)
13168 (move_it_vertically_backward, move_it_by_lines): Replace the call
13169 to xfree to an equivalent call to bidi_unshelve_cache.
13170 (move_it_in_display_line_to): Fix logic of returning
13171 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
13173 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13175 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
13176 came from a string character with a `cursor' property. (Bug#9229)
13178 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
13180 * Makefile.in (LIB_PTHREAD): New variable.
13181 (LIBES): Add LIB_PTHREAD (Bug#9216).
13183 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
13184 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
13186 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
13188 * regex.c (re_iswctype): Remove some redundant boolean conversions.
13190 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
13192 * xterm.c (x_find_topmost_parent): New function.
13193 (x_set_frame_alpha): Find topmost parent window with
13194 x_find_topmost_parent and set the property there also (bug#9181).
13195 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
13197 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
13199 * callproc.c (Fcall_process): Avoid vfork clobbering
13200 the local vars buffer, coding_systems, current_dir.
13202 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
13204 * keymap.c (Fmake_composed_keymap): Move to subr.el.
13206 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
13208 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
13209 so that it is not optimized away.
13211 * xdisp.c (compute_display_string_pos): Remove unused local.
13213 2011-08-02 Eli Zaretskii <eliz@gnu.org>
13215 Fix slow cursor motion and scrolling in large buffers with
13216 selective display, like Org Mode buffers. (Bug#9218)
13218 * dispextern.h (struct bidi_it): New member disp_prop_p.
13220 * xdisp.c: Remove one-slot cache of display string positions.
13221 (compute_display_string_pos): Accept an additional argument
13222 DISP_PROP_P; callers changed. Scan at most 5K characters forward
13223 for a display string or property. If found, set DISP_PROP_P
13226 * bidi.c (bidi_fetch_char): Accept an additional argument
13227 DISP_PROP_P, and pass it to compute_display_string_pos.
13228 Only handle text covered by a display string if DISP_PROP_P is returned
13229 non-zero. All callers of bidi_fetch_char changed.
13231 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
13233 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
13235 2010-12-03 Don March <don@ohspite.net>
13237 * keymap.c (Fdefine_key): Fix non-prefix key error message when
13238 last character M-[char] is translated to ESC [char] (bug#7541).
13240 2011-08-02 Kenichi Handa <handa@m17n.org>
13242 * lisp.h (uniprop_table): Extern it.
13244 * chartab.c (uniprop_table): Make it non-static.
13246 2011-08-01 Eli Zaretskii <eliz@gnu.org>
13248 * xdisp.c (forward_to_next_line_start): Accept additional argument
13249 BIDI_IT_PREV, and store into it the state of the bidi iterator had
13251 (reseat_at_next_visible_line_start): Use the bidi iterator state
13252 returned by forward_to_next_line_start to restore the state of
13253 it->bidi_it after backing up to previous newline. (Bug#9212)
13255 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
13257 * regex.c (re_comp): Protoize.
13258 (re_exec): Fix return type.
13259 (regexec): Fix type of `ret'. (Bug#9203)
13261 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13263 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
13264 This is needed if max-image-size is a floating-point number.
13266 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
13268 * print.c (print_object): Print empty symbol as ##.
13270 * lread.c (read1): Read ## as empty symbol.
13272 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
13274 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
13275 setting frame foreground color (Bug#9175).
13276 (x_set_background_color): Likewise.
13278 * nsmenu.m (-setText): Size tooltip dimensions precisely to
13279 contents (Bug#9176).
13280 (EmacsTooltip -init): Remove bezels and add shadows to
13283 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
13284 or scroll bar (Bug#8470).
13286 * nsfont.m (nsfont_open): Remove assignment to voffset and
13287 unnecessary vars hshink, expand, hd, full_height, min_height.
13288 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
13290 * nsterm.h (nsfont_info): Remove voffset field.
13292 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
13294 Implement strike-through and overline on NextStep (Bug#8863).
13296 * nsfont.m (nsfont_open): Use underline position provided by font,
13297 instead of hard-coded value of 2.
13298 (nsfont_draw): Call ns_draw_text_decoration instead.
13300 * nsterm.h: Add declaration for ns_draw_text_decoration.
13302 * nsterm.m (ns_draw_text_decoration): New function for drawing
13303 underline, overline, and strike-through.
13304 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
13305 ns_draw_text_decoration. Change treatment of cursor drawing to
13306 accommodate underlining, etc.
13308 2011-07-28 Eli Zaretskii <eliz@gnu.org>
13310 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
13313 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13315 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
13316 Without this fix, if a signal arrives just after memory fills up,
13317 'malloc' might be invoked reentrantly.
13319 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
13320 In other words, assume that every image size is allowed, on non-X
13321 hosts. This assumption is probably wrong, but it lets Emacs compile.
13323 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
13325 * regex.c (re_iswctype): Convert return values to boolean.
13327 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
13329 * xdisp.c (compute_display_string_pos): Don't use cached display
13330 string position if the buffer had its restriction changed.
13333 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13335 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
13337 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
13339 Integer signedness and overflow and related fixes. (Bug#9079)
13341 * bidi.c: Integer size and overflow fixes.
13342 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
13343 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
13344 (bidi_cache_find_level_change, bidi_cache_ensure_space)
13345 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
13346 (bidi_find_other_level_edge):
13347 Use ptrdiff_t instead of EMACS_INT where either will do.
13348 This works better on 32-bit hosts configured --with-wide-int.
13349 (bidi_cache_ensure_space): Check for size-calculation overflow.
13350 Use % rather than repeated addition, for better worst-case speed.
13351 Don't set bidi_cache_size until after xrealloc returns, because it
13353 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
13354 (bidi_cache_ensure_space): Also check that the bidi cache size
13355 does not exceed that of the largest Lisp string or buffer. See Eli
13356 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
13358 * alloc.c (__malloc_size_t): Remove.
13359 All uses replaced by size_t. See Andreas Schwab's note
13360 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
13362 * image.c: Improve checking for integer overflow.
13363 (check_image_size): Assume that f is nonnull, since
13364 it is always nonnull in practice. This is one less thing to
13365 worry about when checking for integer overflow later.
13366 (x_check_image_size): New function, which checks for integer
13367 overflow issues inside X.
13368 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
13369 This removes the need for a memory_full check.
13370 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
13371 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
13372 (xbm_read_bitmap_data): Change locals back to 'int', since
13373 their values must fit in 'int'.
13374 (xpm_load_image, png_load, tiff_load):
13375 Invoke x_create_x_image_and_pixmap earlier,
13376 to avoid much needless work if the image is too large.
13377 (tiff_load): Treat overly large images as if
13378 x_create_x_image_and_pixmap failed, not as malloc failures.
13379 (gs_load): Use x_check_image_size.
13381 * gtkutil.c: Omit integer casts.
13382 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
13383 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
13385 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
13387 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
13388 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
13389 would wrongly return t on a 64-bit host.
13391 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
13392 The plain *_OVERFLOW macros run afoul of GCC bug 49705
13393 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
13394 and therefore cause GCC to emit a bogus diagnostic in some cases.
13396 * image.c: Integer signedness and overflow and related fixes.
13397 This is not an exhaustive set of fixes, but it's time to
13398 record what I've got.
13399 (lookup_pixel_color, check_image_size): Remove redundant decls.
13400 (check_image_size): Don't assume that arbitrary EMACS_INT values
13401 fit in 'int', or that arbitrary 'double' values fit in 'int'.
13402 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
13403 (tiff_load, imagemagick_load_image):
13404 Check for overflow in size calculations.
13405 (x_create_x_image_and_pixmap): Remove unnecessary test for
13406 xmalloc returning NULL; that can't happen.
13407 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
13408 (xpm_color_bucket): Use better integer hashing function.
13409 (xpm_cache_color): Don't possibly over-allocate memory.
13410 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
13411 (gif_memory_source):
13412 Use ptrdiff_t, not int or size_t, to record sizes.
13413 (png_load): Don't assume values greater than 2**31 fit in 'int'.
13414 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
13415 either works, as we prefer signed integers.
13416 (tiff_read_from_memory, tiff_write_from_memory):
13417 Return tsize_t, not size_t, since that's what the TIFF API wants.
13418 (tiff_read_from_memory): Don't fail simply because the read would
13419 go past EOF; instead, return a short read.
13420 (tiff_load): Omit no-longer-needed casts.
13421 (Fimagemagick_types): Don't assume size fits into 'int'.
13423 Improve hashing quality when configured --with-wide-int.
13424 * fns.c (hash_string): New function, taken from sxhash_string.
13425 Do not discard information about ASCII character case; this
13426 discarding is no longer needed.
13427 (sxhash-string): Use it. Change sig to match it. Caller changed.
13428 * lisp.h: Declare it.
13429 * lread.c (hash_string): Remove, since we now use fns.c's version.
13430 The fns.c version returns a wider integer if --with-wide-int is
13431 specified, so this should help the quality of the hashing a bit.
13433 * emacs.c: Integer overflow minor fix.
13434 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
13435 Define only if GNU_LINUX.
13436 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
13438 * dispnew.c: Integer signedness and overflow fixes.
13439 Remove unnecessary forward decls, that were a maintenance hassle.
13440 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
13442 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
13443 (scrolling_window): Use ptrdiff_t, not int, for byte count.
13444 (prepare_desired_row, line_draw_cost):
13445 Use int, not unsigned, where either works.
13446 (save_current_matrix, restore_current_matrix):
13447 Use ptrdiff_t, not size_t, where either works.
13448 (init_display): Check for overflow more accurately, and without
13449 relying on undefined behavior.
13451 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
13452 Remove, replacing with the new symbols in lisp.h. All uses changed.
13453 * fileio.c (make_temp_name):
13454 * filelock.c (lock_file_1, lock_file):
13455 * xdisp.c (message_dolog):
13456 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
13457 Use pMd etc. instead.
13458 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
13459 replacing the pWIDE etc. symbols removed from editfns.c.
13461 * keyboard.h (num_input_events): Now uintmax_t.
13462 This is (very slightly) less likely to mess up due to wraparound.
13465 * buffer.c: Integer signedness fixes.
13466 (alloc_buffer_text, enlarge_buffer_text):
13467 Use ptrdiff_t rather than size_t when either will do, as we prefer
13470 * alloc.c: Integer signedness and overflow fixes.
13471 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
13472 (__malloc_size_t): Default to size_t, not to int.
13473 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
13474 (Fgarbage_collect, mark_object_loop_halt, mark_object):
13475 Prefer ptrdiff_t to size_t when either would do, as we prefer
13477 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
13478 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
13479 Now const. Initialize with values that are in range even if char
13481 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
13482 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
13483 These functions do the right thing with sizes > 2**32.
13484 (check_depth): Now ptrdiff_t, not int.
13485 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
13486 Adjust to new way of storing sizes. Check for size overflow bugs
13488 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
13489 slightly wrong anyway, as it missed one instance of
13490 XMALLOC_OVERRUN_CHECK_OVERHEAD.
13491 (refill_memory_reserve): Omit needless cast to size_t.
13492 (mark_object_loop_halt): Mark as externally visible.
13494 * xselect.c: Integer signedness and overflow fixes.
13495 (Fx_register_dnd_atom, x_handle_dnd_message):
13496 Use ptrdiff_t, not size_t, since we prefer signed.
13497 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
13498 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
13499 x_dnd_atoms_size and x_dnd_atoms_length.
13501 * doprnt.c: Prefer signed to unsigned when either works.
13503 * doprnt.c (doprnt):
13505 * xdisp.c (vmessage):
13506 Use ptrdiff_t, not size_t, when using or implementing doprnt,
13507 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
13508 prefer signed arithmetic to avoid comparison confusion.
13509 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
13510 but is a bit tricky.
13512 Assume freestanding C89 headers, string.h, stdlib.h.
13513 * data.c, doprnt.c, floatfns.c, print.c:
13514 Include float.h unconditionally.
13515 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
13516 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
13517 * regex.c: Likewise for stddef.h, string.h.
13518 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
13519 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
13520 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
13521 (STDC_HEADERS): Remove obsolete defines.
13522 * sysdep.c: Include limits.h unconditionally.
13524 Assume support for memcmp, memcpy, memmove, memset.
13525 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
13526 * regex.c (memcmp, memcpy):
13527 Remove; we assume C89 now.
13529 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
13530 (__malloc_safe_bcopy): Remove; no longer needed.
13532 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
13533 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
13534 well either way, and we prefer signed to unsigned.
13536 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
13538 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
13539 closes the connection while we're reading (bug#9182).
13541 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
13543 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
13544 are specified (Bug#9168).
13546 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
13548 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
13549 Found by GCC static checking and --with-wide-int on a 32-bit host.
13551 2011-07-25 Eli Zaretskii <eliz@gnu.org>
13553 * xdisp.c (compute_display_string_pos): Fix logic of caching
13554 previous display string position. Initialize cached_prev_pos to
13555 -1. Fixes slow-down at the beginning of a buffer.
13557 2011-07-24 Eli Zaretskii <eliz@gnu.org>
13559 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
13560 for attrs[LFACE_FONTSET_INDEX].
13562 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
13564 * xml.c (parse_region): Remove unused local
13565 that was recently introduced.
13567 2011-07-23 Eli Zaretskii <eliz@gnu.org>
13569 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
13570 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
13572 * xdisp.c (move_it_in_display_line_to): Record the best matching
13573 position for TO_CHARPOS while scanning the line, and restore it on
13574 exit if none of the characters scanned was an exact match.
13575 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
13576 when exact match is impossible due to invisible text, and the
13577 lines are truncated.
13579 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
13581 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
13584 2011-07-22 Eli Zaretskii <eliz@gnu.org>
13586 Fix a significant slow-down of cursor motion with C-n, C-p,
13587 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
13588 auto-repeat under bidi redisplay in fontified buffers.
13589 * xdisp.c (compute_stop_pos_backwards): New function.
13590 (next_element_from_buffer): Call compute_stop_pos_backwards to
13591 find a suitable prev_stop when we find ourselves before
13593 (reseat): Don't look for prev_stop, as that could mean a very long
13595 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
13596 <cached_disp_overlay_modiff>: Cache for last found display string
13598 (compute_display_string_pos): Return the cached position if asked
13599 about the same buffer in the same area of character positions, and
13600 the buffer wasn't changed since the time the display string
13601 position was cached.
13603 2011-07-22 Eli Zaretskii <eliz@gnu.org>
13605 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
13606 is an integer, which is important for empty lines. (Bug#9149)
13608 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
13610 * frame.c (Fmodify_frame_parameters): In tty case, update the
13611 default face if necessary (Bug#4238).
13613 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
13615 * editfns.c (Fstring_to_char): No need to explain what a character
13616 is in the docstring (Bug#6576).
13618 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13620 * xml.c (parse_region): Make sure we always return a tree.
13622 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
13624 * xml.c (parse_region): If a document contains only comments,
13627 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
13629 * xml.c (make_dom): Return comments, too.
13631 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
13634 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
13635 and the surrounding thread.
13636 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
13637 rather than fgets, and retry after EINTR. Otherwise, 'emacs
13638 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
13640 * s/openbsd.h (BROKEN_SIGIO): Define.
13641 * unexelf.c (unexec) [__OpenBSD__]:
13642 Don't update the .mdebug section of the Alpha COFF symbol table.
13644 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
13646 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
13649 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
13651 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
13652 This fixes some race conditions on the permissions of any newly
13655 * alloc.c (valid_pointer_p): Use pipe, not open.
13656 This fixes some permissions issues when debugging.
13658 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
13659 If fchown fails to set both uid and gid, try to set just gid,
13660 as that is sometimes allowed. Adjust the file's mode to eliminate
13661 setuid or setgid bits that are inappropriate if fchown fails.
13663 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
13665 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
13666 to compare Lisp_Objects.
13667 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
13668 global_gnutls_log_level, don't mistake it for a Lisp_Object.
13669 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
13671 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
13673 * lread.c (read_integer): Unread even EOF character.
13674 (read1): Likewise. Properly record start position of symbol.
13676 * lread.c (read1): Read `#:' as empty uninterned symbol if no
13677 symbol character follows.
13679 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
13681 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
13682 This works around a problem with the previous change to Fcopy_file.
13683 Recent glibc declares fchown with __attribute__((warn_unused_result)),
13684 and without this change, GCC might complain about discarding
13685 fchown's return value.
13687 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
13689 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
13691 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
13693 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
13695 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
13697 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
13698 it's used from the C level.
13700 * process.c: Use the same condition for POLL_FOR_INPUT in both
13701 keyboard.c and process.c (bug#1858).
13703 2011-07-09 Lawrence Mitchell <wence@gmx.li>
13705 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
13706 (Fgnutls_boot): Use it.
13708 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
13710 * doc.c (Fsubstitute_command_keys): Revert last change.
13712 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
13714 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
13715 quotes the next character, and doesn't affect other longer
13716 sequences (bug#8935).
13718 * lread.c (syms_of_lread): Clarify that is isn't only
13719 `eval-buffer' and `eval-defun' that's affected by
13720 `lexical-binding' (bug#8460).
13722 2011-07-15 Eli Zaretskii <eliz@gnu.org>
13724 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
13725 bidi redisplay when a line includes both an image and is truncated.
13727 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
13729 Fix minor problems found by static checking.
13730 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
13731 (elsz): Now a signed constant, not a size_t var. We prefer signed
13732 types to unsigned, to avoid integer comparison confusion. Without
13733 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
13734 "cannot optimize loop, the loop counter may overflow", a symptom
13736 * indent.c (Fvertical_motion): Mark locals as initialized.
13737 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
13739 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13741 * search.c (Fre_search_backward): Mention `case-fold-search' in
13742 all the re_search_* functions (bug#8138).
13744 * keyboard.c (Fopen_dribble_file): Document when the file is
13747 2011-07-14 Eli Zaretskii <eliz@gnu.org>
13749 * bidi.c (bidi_dump_cached_states): Fix format of displaying
13752 Support bidi reordering of display and overlay strings.
13753 * xdisp.c (compute_display_string_pos)
13754 (compute_display_string_end): Accept additional argument STRING.
13755 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
13756 (reseat_to_string): Initialize bidi_it->string.s and
13757 bidi_it->string.schars.
13758 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
13759 NULL (avoids a crash in bidi_paragraph_init).
13760 Initialize itb.string.lstring.
13761 (init_iterator): Call bidi_init_it only of a valid
13762 buffer position was specified. Initialize paragraph_embedding to
13764 (reseat_to_string): Initialize the bidi iterator.
13765 (display_string): If we need to ignore text properties of
13766 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
13767 original value of -1 will not work with bidi.)
13768 (compute_display_string_pos): First arg is now struct
13769 `text_pos *'; all callers changed. Support display properties on
13771 (compute_display_string_end): Support display properties on Lisp
13773 (init_iterator, reseat_1, reseat_to_string): Initialize the
13774 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
13775 when iterating on a string not from display properties).
13776 (compute_display_string_pos, compute_display_string_end):
13777 Fix calculation of the object to scan. Fixes an error when using
13779 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
13780 base_level_stop; instead, set base_level_stop to BEGV.
13781 Fixes crashes in vertical-motion.
13782 (next_element_from_buffer): Improve commentary for when
13783 the iterator is before prev_stop.
13784 (init_iterator): Initialize bidi_p from the default value of
13785 bidi-display-reordering, not from buffer-local value. Use the
13786 buffer-local value only if initializing for buffer iteration.
13787 (handle_invisible_prop): Support invisible properties on strings
13788 that are being bidi-reordered.
13789 (set_iterator_to_next): Support bidi reordering of C strings and
13791 (next_element_from_string): Support bidi reordering of Lisp
13793 (handle_stop_backwards): Support Lisp strings as well.
13794 (display_string): Support display of R2L glyph rows.
13795 Use IT_STRING_CHARPOS when displaying from a Lisp string.
13796 (init_iterator): Don't initialize it->bidi_p for strings
13798 (reseat_to_string): Initialize it->bidi_p for strings here.
13799 (next_element_from_string, next_element_from_c_string)
13800 (next_element_from_buffer): Add xassert's for correspondence
13801 between IT's object being iterated and it->bidi_it.string
13803 (face_before_or_after_it_pos): Support bidi iteration.
13804 (next_element_from_c_string): Handle the case of the first string
13805 character that is not the first one in the visual order.
13806 (get_visually_first_element): New function, refactored from common
13807 parts of next_element_from_buffer, next_element_from_string, and
13808 next_element_from_c_string.
13809 (tool_bar_lines_needed, redisplay_tool_bar)
13810 (display_menu_bar): Force left-to-right direction. Add a FIXME
13811 comment for making that be controlled by a user option.
13812 (push_it, pop_it): Save and restore the state of the
13813 bidi iterator. Save and restore the bidi_p flag.
13814 (pop_it): Iterate out of display property for string iteration as
13816 (iterate_out_of_display_property): Support iteration over strings.
13817 (handle_single_display_spec): Set up it->bidi_it for iteration
13818 over a display string, and call bidi_init_it.
13819 (handle_single_display_spec, next_overlay_string)
13820 (get_overlay_strings_1, push_display_prop): Set up the bidi
13821 iterator for displaying display or overlay strings.
13822 (forward_to_next_line_start): Don't use the shortcut if
13824 (back_to_previous_visible_line_start): If handle_display_prop
13825 pushed the iterator stack, restore the internal state of the bidi
13826 iterator by calling bidi_pop_it same number of times.
13827 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
13828 and we are bidi-iterating, don't decrement the iterator position;
13829 instead, set the first_elt flag in the bidi iterator, to produce
13831 (reseat_1): Remove redundant setting of string_from_display_prop_p.
13832 (push_display_prop): xassert that we are iterating a buffer.
13833 (push_it, pop_it): Save and restore paragraph_embedding member.
13834 (handle_single_display_spec, next_overlay_string)
13835 (get_overlay_strings_1, reseat_1, reseat_to_string)
13836 (push_display_prop): Set up the `unibyte' member of bidi_it.string
13837 correctly. Don't assume unibyte strings are not bidi-reordered.
13838 (compute_display_string_pos)
13839 (compute_display_string_end): Fix handling the case of C string.
13840 (push_it, pop_it): Save and restore from_disp_prop_p.
13841 (handle_single_display_spec, push_display_prop): Set the
13842 from_disp_prop_p flag.
13843 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
13844 (pop_it): Call iterate_out_of_display_property only if we are
13845 popping after iteration over a string that came from a display
13846 property. Fix a typo in popping stretch info. Add an assertion
13847 for verifying that the iterator position is in sync with the bidi
13849 (handle_single_display_spec, get_overlay_strings_1)
13850 (push_display_prop): Fix initialization of paragraph direction for
13851 string when that of the parent object is not yet determined.
13852 (reseat_1): Call bidi_init_it to resync the bidi
13853 iterator with IT's position. (Bug#7616)
13854 (find_row_edges): If ROW->start.pos gives position
13855 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
13856 (handle_stop, back_to_previous_visible_line_start, reseat_1):
13857 Reset the from_disp_prop_p flag.
13858 (SAVE_IT, RESTORE_IT): New macros.
13859 (pos_visible_p, face_before_or_after_it_pos)
13860 (back_to_previous_visible_line_start)
13861 (move_it_in_display_line_to, move_it_in_display_line)
13862 (move_it_to, move_it_vertically_backward, move_it_by_lines)
13863 (try_scrolling, redisplay_window, display_line): Use them when
13864 saving a temporary copy of the iterator and restoring it back.
13865 (back_to_previous_visible_line_start, reseat_1)
13866 (init_iterator): Empty the bidi cache "stack".
13867 (move_it_in_display_line_to): If iterator ended up at
13868 EOL, but we never saw any buffer positions smaller than
13869 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
13870 motion in bidi-reordered lines.
13871 (move_it_in_display_line_to): Record prev_method and prev_pos
13872 immediately before the call to set_iterator_to_next. Fixes cursor
13873 motion in bidi-reordered lines with stretch glyphs and strings
13874 displayed in margins. (Bug#8133) (Bug#8867)
13875 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
13877 (pos_visible_p): Support positions in bidi-reordered lines.
13878 Save and restore bidi cache.
13880 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
13881 (bidi_paragraph_info): Delete unused struct.
13882 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
13883 (bidi_cache_start): New variable.
13884 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
13886 (bidi_cache_fetch_state, bidi_cache_search)
13887 (bidi_cache_find_level_change, bidi_cache_iterator_state)
13888 (bidi_cache_find, bidi_peek_at_next_level)
13889 (bidi_level_of_next_char, bidi_find_other_level_edge)
13890 (bidi_move_to_visually_next): Compare cache index with
13891 bidi_cache_start rather than with zero.
13892 (bidi_fetch_char): Accept new argument STRING; all callers
13893 changed. Support iteration over a string. Support strings with
13894 display properties. Support unibyte strings. Fix the type of
13895 `len' according to what STRING_CHAR_AND_LENGTH expects.
13896 (bidi_paragraph_init, bidi_resolve_explicit_1)
13897 (bidi_resolve_explicit, bidi_resolve_weak)
13898 (bidi_level_of_next_char, bidi_move_to_visually_next):
13899 Support iteration over a string.
13900 (bidi_set_sor_type, bidi_resolve_explicit_1)
13901 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
13902 can now be zero (for strings); special values 0 and -1 were
13903 changed to -1 and -2, respectively.
13904 (bidi_char_at_pos): New function.
13905 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
13906 Call it instead of FETCH_MULTIBYTE_CHAR.
13907 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
13908 initialized to valid values.
13909 (bidi_init_it): Don't initialize charpos and bytepos with invalid
13911 (bidi_level_of_next_char): Allow the sentinel "position" to pass
13912 the test for valid cached positions. Fix the logic for looking up
13913 the sentinel state in the cache. GCPRO the Lisp string we are
13915 (bidi_push_it, bidi_pop_it): New functions.
13916 (bidi_initialize): Initialize the bidi cache start stack pointer.
13917 (bidi_cache_ensure_space): New function, refactored from part of
13918 bidi_cache_iterator_state. Don't assume the required size is just
13919 one BIDI_CACHE_CHUNK away.
13920 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
13921 (bidi_count_bytes, bidi_char_at_pos): New functions.
13922 (bidi_cache_search): Don't assume bidi_cache_last_idx is
13923 always valid if bidi_cache_idx is valid.
13924 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
13925 is valid if it's going to be used.
13926 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
13927 (bidi_cache_fetch_state, bidi_cache_search)
13928 (bidi_cache_find_level_change, bidi_cache_ensure_space)
13929 (bidi_cache_iterator_state, bidi_cache_find)
13930 (bidi_find_other_level_edge, bidi_cache_start_stack):
13931 All variables related to cache indices are now EMACS_INT.
13933 * dispextern.h (struct bidi_string_data): New structure.
13934 (struct bidi_it): New member `string'. Make flag members be 1-bit
13935 fields, and put them last in the struct.
13936 (compute_display_string_pos, compute_display_string_end):
13938 (bidi_push_it, bidi_pop_it): Add prototypes.
13939 (struct iterator_stack_entry): New members bidi_p,
13940 paragraph_embedding, and from_disp_prop_p.
13941 (struct it): Member bidi_p is now a bit field 1 bit wide.
13942 (bidi_shelve_cache, bidi_unshelve_cache):
13943 Declare prototypes.
13945 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
13946 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
13947 and vector-like objects.
13949 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
13950 cache around display iteration.
13952 * window.c (Fwindow_end, window_scroll_pixel_based)
13953 (displayed_window_lines, Frecenter): Save and restore the bidi
13954 cache around display iteration.
13956 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
13958 * editfns.c (Fdelete_region): Clarify the use of the named
13959 parameters (bug#6788).
13961 2011-07-14 Martin Rudalics <rudalics@gmx.at>
13963 * indent.c (Fvertical_motion): Set and restore w->pointm when
13964 saving and restoring the window's buffer (Bug#9006).
13966 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
13968 * editfns.c (Fstring_to_char): Clarify just what is returned
13969 (bug#6576). Text by Eli Zaretskii.
13971 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
13973 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
13975 2011-07-13 Eli Zaretskii <eliz@gnu.org>
13977 * buffer.c (mmap_find): Fix a typo.
13979 2011-07-13 Johan Bockgård <bojohan@gnu.org>
13981 Fix execution of x selection hooks.
13982 * xselect.c (Qx_lost_selection_functions)
13983 (Qx_sent_selection_functions): New vars.
13984 (syms_of_xselect): DEFSYM them.
13985 (x_handle_selection_request): Pass Qx_sent_selection_functions
13986 rather than Vx_sent_selection_functions to Frun_hook_with_args.
13987 (x_handle_selection_clear,x_clear_frame_selections):
13988 Pass Qx_lost_selection_functions rather than
13989 Vx_lost_selection_functions to Frun_hook_with_args.
13991 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
13993 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
13994 The old code sometimes used this field without initializing it.
13996 * alloc.c (gc_sweep): Don't read past end of array.
13997 In theory, the old code could also have corrupted Emacs internals,
13998 though it'd be very unlikely.
14000 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
14002 * character.c (Fcharacterp): Don't advertise optional ignored
14003 argument. (Bug#4026)
14005 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
14007 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
14010 * window.c (Fset_window_start): Doc fix (bug#4199).
14011 (Fset_window_hscroll): Ditto.
14013 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
14015 Fix minor new problems caught by GCC 4.6.1.
14016 * term.c (init_tty): Remove unused local.
14017 * xsettings.c (store_monospaced_changed): Define this function only
14018 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
14019 not used otherwise.
14021 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
14023 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
14025 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
14027 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
14028 are the mini-buffer and the echo area (bug#3320).
14030 * term.c (init_tty): Remove support for supdup, c10 and perq
14031 terminals, which are no longer supported (bug#1482).
14033 2011-07-10 Johan Bockgård <bojohan@gnu.org>
14035 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
14037 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
14039 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
14040 for non-popups (Bug#3642).
14042 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
14044 * alloc.c (reset_malloc_hooks): Protoize.
14045 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
14046 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
14047 * cm.c (losecursor): Likewise.
14048 * data.c (fmod): Likewise.
14049 * dispnew.c (swap_glyphs_in_rows): Likewise.
14050 * emacs.c (memory_warning_signal): Likewise.
14051 * floatfns.c (float_error): Likewise.
14052 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
14053 (otf_open, font_otf_capability, generate_otf_features)
14054 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
14056 * image.c (pbm_read_file): Likewise.
14057 * indent.c (string_display_width): Likewise.
14058 * intervals.c (check_for_interval, search_for_interval)
14059 (inc_interval_count, count_intervals, root_interval)
14060 (adjust_intervals_for_insertion, make_new_interval): Likewise.
14061 * lread.c (defalias): Likewise.
14062 * ralloc.c (r_alloc_check): Likewise.
14063 * regex.c (set_image_of_range_1, set_image_of_range)
14064 (regex_grow_registers): Likewise.
14065 * sysdep.c (strerror): Likewise.
14066 * termcap.c (valid_filename_p, tprint, main): Likewise.
14067 * tparam.c (main): Likewise.
14068 * unexhp9k800.c (run_time_remap, save_data_space)
14069 (update_file_ptrs, read_header, write_header, calculate_checksum)
14070 (copy_file, copy_rest, display_header): Likewise.
14071 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
14073 * xdisp.c (check_it): Likewise.
14074 * xfaces.c (register_color, unregister_color, unregister_colors):
14076 * xfns.c (print_fontset_result): Likewise.
14077 * xrdb.c (member, fatal, main): Likewise.
14079 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
14081 Fix minor problems found by static checking (Bug#9031).
14082 * chartab.c (char_table_set_range, map_sub_char_table):
14083 Remove unused locals.
14084 (uniprop_table): Now static.
14085 * composite.c (_work_char): Remove unused static var.
14087 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
14089 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
14091 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
14093 * gtkutil.c (qttip_cb): Remove code without function.
14095 2011-07-09 Eli Zaretskii <eliz@gnu.org>
14097 * w32.c (pthread_sigmask): New stub.
14099 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
14101 Use pthread_sigmask, not sigprocmask (Bug#9010).
14102 sigprocmask is portable only for single-threaded applications, and
14103 Emacs can be multi-threaded when it uses GTK.
14104 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
14106 * callproc.c (Fcall_process):
14107 * process.c (create_process):
14108 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
14109 Use pthread_sigmask, not sigprocmask.
14111 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
14113 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
14114 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
14117 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
14119 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
14120 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
14121 (xg_hide_tooltip): Fix comment.
14123 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
14124 in registerServicesMenuSendTypes.
14125 (validRequestorForSendType): Don't check ns_return_types.
14127 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
14130 2011-07-08 Jason Rumney <jasonr@gnu.org>
14132 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
14133 SH_SHOW for hidden windows (Bug#5482).
14135 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
14136 frame struct members of non-existent frames (Bug#6284).
14138 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
14140 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
14141 variable firstTime not needed on OSX >= 10.6.
14142 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
14143 >= 10.5. Use setKnobProportion, setDoubleValue.
14145 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
14146 (MAC_OS_X_VERSION_10_5): Define if not defined.
14147 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
14148 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
14149 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
14151 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
14152 cString and lossyCString on OSX >= 10.4.
14154 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
14155 sizeToFit on OSX >= 10.2.
14157 * nsimage.m (allocInitFromFile): Don't use deprecated method
14158 bestRepresentationForDevice on OSX >= 10.6.
14160 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
14163 * emacs.c: Declare unexec_init_emacs_zone.
14165 * nsgui.h: Fix compiler warning about gnulib redefining verify.
14167 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
14169 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
14170 on svcsMenu (Bug#8842).
14172 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
14174 (Fns_list_services): Just return Qnil on 10.6, code not working there.
14176 * nsterm.m (QUTF8_STRING): Declare.
14177 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
14178 (validRequestorForSendType): Return type is (id).
14179 Change indexOfObjectIdenticalTo to indexOfObject.
14180 Check if we have local selection before returning self (Bug#8842).
14181 (writeSelectionToPasteboard): Put local selection into paste board
14182 if we have a local selection (Bug#8842).
14183 (syms_of_nsterm): DEFSYM QUTF8_STRING.
14185 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
14186 (ns_get_local_selection): Declare.
14188 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
14190 * keymap.c (describe_map_tree): Don't insert a double newline at
14191 the end of the buffer (bug#1169) and return whether we inserted
14194 * callint.c (Fcall_interactively): Change "reading args" to
14195 "providing args" to try to clarify what it does (bug#1010).
14197 2011-07-07 Kenichi Handa <handa@m17n.org>
14199 * composite.c (composition_compute_stop_pos): Ignore a static
14200 composition starting before CHARPOS (Bug#8915).
14202 * xdisp.c (handle_composition_prop): Likewise.
14204 2011-07-07 Eli Zaretskii <eliz@gnu.org>
14206 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
14209 2011-07-07 Kenichi Handa <handa@m17n.org>
14211 * character.h (unicode_category_t): New enum type.
14213 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
14214 (Qchar_code_property_table): New variable.
14215 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
14216 (UNIPROP_COMPRESSED_FORM_P): New macros.
14217 (char_table_ascii): Uncompress the compressed values.
14218 (sub_char_table_ref): New arg is_uniprop. Callers changed.
14219 Uncompress the compressed values.
14220 (sub_char_table_ref_and_range): Likewise.
14221 (char_table_ref_and_range): Uncompress the compressed values.
14222 (sub_char_table_set): New arg is_uniprop. Callers changed.
14223 Uncompress the compressed values.
14224 (sub_char_table_set_range): Args changed. Callers changed.
14225 (char_table_set_range): Adjuted for the above change.
14226 (map_sub_char_table): Delete args default_val and parent. Add arg
14227 top. Give decoded values to a Lisp function.
14228 (map_char_table): Adjust for the above change. Give decoded
14229 values to a Lisp function. Gcpro more variables.
14230 (uniprop_table_uncompress)
14231 (uniprop_decode_value_run_length): New functions.
14232 (uniprop_decoder, uniprop_decoder_count): New variables.
14233 (uniprop_get_decoder, uniprop_encode_value_character)
14234 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
14236 (uniprop_encoder, uniprop_encoder_count): New variables.
14237 (uniprop_get_encoder, uniprop_table)
14238 (Funicode_property_table_internal, Fget_unicode_property_internal)
14239 (Fput_unicode_property_internal): New functions.
14240 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
14241 Sunicode_property_table_internal, Sget_unicode_property_internal,
14242 and Sput_unicode_property_internal. Defvar_lisp
14243 char-code-property-alist.
14245 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
14246 Vunicode_category_table.
14248 * font.c (font_range): Adjust for the change of
14249 Vunicode_category_table.
14251 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
14253 * m/iris4d.h: Remove file, move contents ...
14254 * s/irix6-5.h: ... here.
14256 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
14258 Remove unportable assumption about struct layout (Bug#8884).
14259 * alloc.c (mark_buffer):
14260 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
14261 (clone_per_buffer_values): Don't assume that
14262 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
14263 This isn't true in general, and it's particularly not true
14264 if Emacs is configured with --with-wide-int.
14265 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
14266 New macros, used in the buffer.c change.
14268 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
14270 * xsettings.c: Use both GConf and GSettings if both are available.
14271 (store_config_changed_event): Add comment.
14272 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
14273 (store_tool_bar_style_changed): New functions.
14274 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
14275 (struct xsettings): Move font inside HAVE_XFT.
14276 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
14277 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
14278 Move inside HAVE_XFT.
14279 (something_changed_gsettingsCB): Rename from something_changedCB.
14280 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
14282 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
14283 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
14284 (something_changed_gconfCB): Rename from something_changedCB.
14285 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
14286 (parse_settings): Move check for font inside HAVE_XFT.
14287 (read_settings, apply_xft_settings): Add comment.
14288 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
14289 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
14290 call store_font_name_changed.
14291 (xft_settings_event): Add comment.
14292 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
14293 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
14294 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
14295 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
14296 (xsettings_initialize): Call init_gsettings last.
14297 (xsettings_get_system_font, xsettings_get_system_normal_font):
14300 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
14302 Random fixes. E.g., (random) never returned negative values.
14303 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
14304 subseconds part to the entropy, as that's a bit more random.
14305 Prefer signed to unsigned, since the signedness doesn't matter and
14306 in general we prefer signed. When given a limit, use a
14307 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
14308 latter isn't right if USE_2_TAGS_FOR_INTS.
14309 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
14310 not 0..VALMASK. Don't discard "excess" bits that random () returns.
14312 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
14314 * textprop.c (text_property_stickiness):
14315 Obey Vtext_property_default_nonsticky.
14316 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
14317 * w32fns.c (syms_of_w32fns):
14318 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
14320 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
14322 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
14323 This is more efficient than Ffile_directory_p and avoids a minor race.
14325 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
14327 * buffer.c (Foverlay_put): Say what the return value is
14330 * fileio.c (barf_or_query_if_file_exists): Check first if the file
14331 is a directory before asking whether to use the file name
14333 (barf_or_query_if_file_exists): Make the "File is a directory"
14334 error be more correct.
14336 * fns.c (Frequire): Remove the mention of the .gz files, since
14337 that's installation-specific, but keep the mention of
14338 `get-load-suffixes'.
14340 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
14342 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
14343 Report string overflow if the output is too long.
14345 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
14347 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
14348 (syms_of_gnutls): Remove duplicate DEFSYM for
14349 Qgnutls_bootprop_verify_hostname_error, an error for
14350 Qgnutls_bootprop_verify_error (which is no longer used).
14352 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
14353 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
14354 Also (re)move comments that are misplaced or no longer relevant.
14356 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
14358 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
14360 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
14362 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
14363 and background color parameters if they have been changed.
14365 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
14367 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
14369 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
14371 * xsettings.c (SYSTEM_FONT): Define only when used.
14372 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
14374 * keymap.c (access_keymap_1): Now static.
14376 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
14378 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
14379 leave any prefix arg for the up event (Bug#1586).
14381 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
14383 * lread.c (syms_of_lread): Mention single symbols defined by
14384 `defvar' or `defconst' (bug#7154).
14386 * fns.c (Frequire): Mention .el.gz files (bug#7314).
14387 (Frequire): Mention get-load-suffixes.
14389 2011-07-02 Martin Rudalics <rudalics@gmx.at>
14391 * window.h (window): Remove clone_number slot.
14392 * window.c (Fwindow_clone_number, Fset_window_clone_number):
14394 (make_parent_window, make_window, saved_window)
14395 (Fset_window_configuration, save_window_save): Don't deal with
14397 * buffer.c (Qclone_number): Remove declaration.
14398 (sort_overlays, overlay_strings): Don't deal with clone numbers.
14400 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
14402 Add multiple inheritance to keymaps.
14403 * keymap.c (Fmake_composed_keymap): New function.
14404 (Fset_keymap_parent): Simplify.
14405 (fix_submap_inheritance): Remove.
14406 (access_keymap_1): New function extracted from access_keymap to handle
14407 embedded parents and handle lists of maps.
14408 (access_keymap): Use it.
14409 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
14410 (Fcopy_keymap): Handle embedded parents.
14411 (Fcommand_remapping, define_as_prefix): Simplify.
14412 (Fkey_binding): Simplify.
14413 (syms_of_keymap): Move minibuffer-local-completion-map,
14414 minibuffer-local-filename-completion-map,
14415 minibuffer-local-must-match-map, and
14416 minibuffer-local-filename-must-match-map to Elisp.
14417 (syms_of_keymap): Defsubr make-composed-keymap.
14418 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
14419 (parse_menu_item): Trivial simplification.
14421 2011-07-01 Glenn Morris <rgm@gnu.org>
14423 * Makefile.in (SETTINGS_LIBS): Fix typo.
14425 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
14427 * coding.c (Fencode_coding_string): Record the last coding system
14428 used, as the function doc string says (bug#8738).
14430 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
14432 * xsettings.c (store_monospaced_changed): Take new font as arg and
14433 check for change against current_mono_font.
14434 (EMACS_TYPE_SETTINGS): Remove this and related defines.
14435 (emacs_settings_constructor, emacs_settings_get_property)
14436 (emacs_settings_set_property, emacs_settings_class_init)
14437 (emacs_settings_init, gsettings_obj): Remove.
14438 (something_changedCB): New function for HAVE_GSETTINGS.
14439 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
14440 with value as argument.
14441 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
14442 g_settings_new (Bug#8967). Do not create gsettings_obj.
14443 Remove calls to g_settings_bind. Connect something_changedCB to
14446 * xgselect.c: Add defined (HAVE_GSETTINGS).
14447 (xgselect_initialize): Ditto.
14449 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
14450 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
14453 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
14455 * eval.c (struct backtrace): Simplify and port the data structure.
14456 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
14457 signed bit field, as this assumption is not portable and it makes
14458 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
14459 "char debug_on_exit : 1" as this is not portable either; instead,
14460 use the portable "unsigned int debug_on_exit : 1". Remove unused
14461 member evalargs. Remove obsolete comments about cc bombing out.
14463 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
14465 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
14466 Let HAVE_GSETTINGS override HAVE_GCONF.
14467 (store_monospaced_changed): New function.
14468 (EMACS_SETTINGS): A new type derived from GObject to handle
14469 GSettings notifications.
14470 (emacs_settings_constructor, emacs_settings_get_property)
14471 (emacs_settings_set_property, emacs_settings_class_init):
14473 (gsettings_client, gsettings_obj): New variables.
14474 (GSETTINGS_SCHEMA): New define.
14475 (something_changedCB): Call store_monospaced_changed.
14476 (init_gsettings): New function.
14477 (xsettings_initialize): Call init_gsettings.
14478 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
14481 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
14484 2011-06-29 Martin Rudalics <rudalics@gmx.at>
14486 * window.c (resize_root_window, grow_mini_window)
14487 (shrink_mini_window): Rename Qresize_root_window to
14488 Qwindow_resize_root_window and Qresize_root_window_vertically to
14489 Qwindow_resize_root_window_vertically.
14491 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
14493 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
14495 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
14497 * makefile.w32-in: Redesign dependencies so they reflect more
14498 clearly which files are directly included by each source file,
14499 and not through other includes.
14501 2011-06-27 Martin Rudalics <rudalics@gmx.at>
14503 * buffer.c (Qclone_number): Declare static and DEFSYM it.
14504 (sort_overlays, overlay_strings): When an overlay's clone number
14505 matches the window's clone number process the overlay even if
14506 the overlay's window property doesn't match the current window.
14508 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
14509 (Fwindow_hchild): Rename to Fwindow_left_child.
14510 (Fwindow_next): Rename to Fwindow_next_sibling.
14511 (Fwindow_prev): Rename to Fwindow_prev_sibling.
14512 (resize_window_check): Rename to window_resize_check.
14513 (resize_window_apply): Rename to window_resize_apply.
14514 (Fresize_window_apply): Rename to Fwindow_resize_apply.
14515 (Fdelete_other_windows_internal, resize_frame_windows)
14516 (Fsplit_window_internal, Fdelete_window_internal)
14517 (grow_mini_window, shrink_mini_window)
14518 (Fresize_mini_window_internal): Fix callers accordingly.
14520 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
14522 * emacsgtkfixed.h: State that this is only used with Gtk+3.
14523 (emacs_fixed_set_min_size): Remove.
14524 (emacs_fixed_new): Take frame as argument.
14526 * emacsgtkfixed.c: State that this is only used with Gtk+3.
14527 (_EmacsFixedPrivate): Remove minwidth/height.
14528 Add struct frame *f.
14529 (emacs_fixed_init): Initialize priv->f.
14530 (get_parent_class, emacs_fixed_set_min_size): Remove.
14531 (emacs_fixed_new): Set priv->f to argument.
14532 (emacs_fixed_get_preferred_width)
14533 (emacs_fixed_get_preferred_height): Use min_width/height from
14534 frames size_hint to set minimum and natural (Bug#8919).
14535 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
14536 and use min_width/height from frames size_hint to set
14537 min_width/height (Bug#8919).
14539 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
14540 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
14543 2011-06-26 Eli Zaretskii <eliz@gnu.org>
14545 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
14546 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
14549 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
14551 * process.c (wait_reading_process_output): Bypass select if
14552 waiting for a cell while ignoring keyboard input, and input is
14553 pending. Suggested by Jan Djärv (Bug#8869).
14555 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
14557 Use gnulib's dup2 module instead of rolling our own.
14558 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
14560 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14562 * dispnew.c (scrolling_window): Before scrolling, turn off a
14563 mouse-highlight in the window being scrolled.
14565 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
14567 Move DEFSYM to lisp.h and use everywhere.
14569 * character.h (DEFSYM): Move declaration...
14570 * lisp.h (DEFSYM): ...here.
14576 * w32select.c: Don't include character.h.
14578 * alloc.c (syms_of_alloc):
14579 * buffer.c (syms_of_buffer):
14580 * bytecode.c (syms_of_bytecode):
14581 * callint.c (syms_of_callint):
14582 * casefiddle.c (syms_of_casefiddle):
14583 * casetab.c (init_casetab_once):
14584 * category.c (init_category_once, syms_of_category):
14585 * ccl.c (syms_of_ccl):
14586 * cmds.c (syms_of_cmds):
14587 * composite.c (syms_of_composite):
14588 * dbusbind.c (syms_of_dbusbind):
14589 * dired.c (syms_of_dired):
14590 * dispnew.c (syms_of_display):
14591 * doc.c (syms_of_doc):
14592 * editfns.c (syms_of_editfns):
14593 * emacs.c (syms_of_emacs):
14594 * eval.c (syms_of_eval):
14595 * fileio.c (syms_of_fileio):
14596 * fns.c (syms_of_fns):
14597 * frame.c (syms_of_frame):
14598 * fringe.c (syms_of_fringe):
14599 * insdel.c (syms_of_insdel):
14600 * keymap.c (syms_of_keymap):
14601 * lread.c (init_obarray, syms_of_lread):
14602 * macros.c (syms_of_macros):
14603 * msdos.c (syms_of_msdos):
14604 * print.c (syms_of_print):
14605 * process.c (syms_of_process):
14606 * search.c (syms_of_search):
14607 * sound.c (syms_of_sound):
14608 * syntax.c (init_syntax_once, syms_of_syntax):
14609 * terminal.c (syms_of_terminal):
14610 * textprop.c (syms_of_textprop):
14611 * undo.c (syms_of_undo):
14612 * w32.c (globals_of_w32):
14613 * window.c (syms_of_window):
14614 * xdisp.c (syms_of_xdisp):
14615 * xfaces.c (syms_of_xfaces):
14616 * xfns.c (syms_of_xfns):
14617 * xmenu.c (syms_of_xmenu):
14618 * xsettings.c (syms_of_xsettings):
14619 * xterm.c (syms_of_xterm): Use DEFSYM.
14621 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
14623 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
14625 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
14627 Integer and buffer overflow fixes (Bug#8873).
14629 * print.c (printchar, strout): Check for string overflow.
14630 (PRINTPREPARE, printchar, strout):
14631 Don't set size unless allocation succeeds.
14633 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
14634 for sizes. Check for string overflow more accurately.
14635 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
14637 * macros.c: Integer and buffer overflow fixes.
14638 * keyboard.h (struct keyboard.kbd_macro_bufsize):
14639 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
14640 Use ptrdiff_t, not int, for sizes.
14641 Don't increment bufsize until after realloc succeeds.
14642 Check for size-calculation overflow.
14643 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
14645 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
14647 * lread.c: Integer overflow fixes.
14648 (read_integer): Radix is now EMACS_INT, not int,
14649 to improve quality of diagnostics for out-of-range radices.
14650 Calculate buffer size correctly for out-of-range radices.
14651 (read1): Check for integer overflow in radices, and in
14652 read-circle numbers.
14653 (read_escape): Avoid int overflow.
14654 (Fload, openp, read_buffer_size, read1)
14655 (substitute_object_recurse, read_vector, read_list, map_obarray):
14656 Use ptrdiff_t, not int, for sizes.
14657 (read1): Use EMACS_INT, not int, for sizes.
14658 Check for size overflow.
14660 * image.c (cache_image): Check for size arithmetic overflow.
14662 * lread.c: Integer overflow issues.
14663 (saved_doc_string_size, saved_doc_string_length)
14664 (prev_saved_doc_string_size, prev_saved_doc_string_length):
14665 Now ptrdiff_t, not int.
14666 (read1): Don't assume doc string length fits in int. Check for
14667 out-of-range doc string lengths.
14668 (read_list): Don't assume file position fits in int.
14669 (read_escape): Check for hex character overflow.
14671 2011-06-22 Leo Liu <sdl.web@gmail.com>
14673 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
14674 Move to minibuffer.el.
14676 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14678 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
14679 The following patches are for when GLYPH_DEBUG && !XASSERT.
14680 * dispextern.h (trace_redisplay_p, dump_glyph_string):
14681 * dispnew.c (flush_stdout):
14682 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
14683 Mark as externally visible.
14684 * dispnew.c (check_window_matrix_pointers): Now static.
14685 * dispnew.c (window_to_frame_vpos):
14686 * xfns.c (unwind_create_frame):
14687 * xterm.c (x_check_font): Remove unused local.
14688 * scroll.c (CHECK_BOUNDS):
14689 * xfaces.c (cache_fache): Rename local to avoid shadowing.
14690 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
14691 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
14692 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
14693 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
14695 (debug_method_add): Use va_list and vsprintf rather than relying
14696 on undefined behavior with wrong number of arguments.
14697 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
14698 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
14699 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
14700 since we're not interested in debugging glyphs with old libraries.
14701 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
14702 GCC 4.6.0's static checking.
14704 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
14706 Integer overflow and signedness fixes (Bug#8873).
14707 A few related buffer overrun fixes, too.
14709 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
14711 * dispextern.h (struct face.stipple):
14712 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
14713 (x_bitmap_mask, x_allocate_bitmap_record)
14714 (x_create_bitmap_from_data, x_create_bitmap_from_file)
14715 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
14716 (x_create_bitmap_from_xpm_data):
14717 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
14718 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
14720 * xfaces.c (load_pixmap):
14721 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
14722 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
14723 (.bitmaps_last, struct x_output.icon_bitmap):
14724 Use ptrdiff_t, not int, for bitmap indexes.
14725 (x_allocate_bitmap_record): Check for size overflow.
14726 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
14728 Use ptrdiff_t, not int, for overlay counts.
14729 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
14730 * editfns.c (overlays_around, get_pos_property):
14731 * textprop.c (get_char_property_and_overlay):
14732 * xdisp.c (next_overlay_change, note_mouse_highlight):
14733 * xfaces.c (face_at_buffer_position):
14734 * buffer.c (OVERLAY_COUNT_MAX): New macro.
14735 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
14736 (Fnext_overlay_change, Fprevious_overlay_change)
14737 (mouse_face_overlay_overlaps, Foverlays_in):
14738 Use ptrdiff_t, not int, for sizes.
14739 (overlays_at, overlays_in): Check for size-calculation overflow.
14741 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
14743 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
14744 (x_session_initialize): Do not assume string length fits in int.
14746 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
14747 This is unlikely, but can occur if DPI is outlandish.
14749 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
14750 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
14752 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
14753 * xrdb.c (magic_file_p, search_magic_path):
14754 Omit last arg SUFFIX; it was always 0. All callers changed.
14755 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
14757 * xfont.c (xfont_match): Avoid need for strlen.
14759 * xfns.c: Don't assume strlen fits in int.
14760 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
14762 * xdisp.c (message_log_check_duplicate): Return intmax_t,
14763 not unsigned long, as we prefer signed integers. All callers changed.
14764 Detect integer overflow in repeat count.
14765 (message_dolog): Don't assume print length fits in 39 bytes.
14766 (display_mode_element): Don't assume strlen fits in int.
14768 * termcap.c: Don't assume sizes fit in int and never overflow.
14769 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
14770 (gobble_line): Check for size-calculation overflow.
14772 * minibuf.c (Fread_buffer):
14773 * lread.c (intern, intern_c_string):
14774 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
14775 Don't assume string length fits in int.
14777 * keyboard.c (parse_tool_bar_item):
14778 * gtkutil.c (style_changed_cb): Avoid need for strlen.
14780 * font.c: Don't assume string length fits in int.
14781 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
14782 Use ptrdiff_t, not int.
14783 (font_intern_prop): Don't assume string length fits in int.
14784 Don't assume integer property fits in fixnum.
14785 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
14787 * filelock.c: Fix some buffer overrun and integer overflow issues.
14788 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
14789 Reformulate so as not to need the command string.
14790 Invoke gzip -cd rather than gunzip, as it's more portable.
14791 (lock_info_type, lock_file_1, lock_file):
14792 Don't assume pid_t and time_t fit in unsigned long.
14793 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
14794 (current_lock_owner): Prefer signed type for sizes.
14795 Use memcpy, not strncpy, where memcpy is what is really wanted.
14796 Don't assume (via atoi) that time_t and pid_t fit in int.
14797 Check for time_t and/or pid_t out of range, e.g., via a network share.
14798 Don't alloca where an auto var works fine.
14800 * fileio.c: Fix some integer overflow issues.
14801 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
14802 Don't assume string length fits in int.
14803 (directory_file_name): Don't assume string length fits in long.
14804 (make_temp_name): Don't assume pid fits in int, or that its print
14805 length is less than 20.
14807 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
14809 * coding.c (make_subsidiaries): Don't assume string length fits in int.
14811 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
14813 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
14814 We prefer signed integers, even for size calculations.
14816 * emacs.c: Don't assume string length fits in 'int'.
14817 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
14818 (main): Don't invoke strlen when not needed.
14820 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
14821 (XD_DEBUG_MESSAGE): Don't waste a byte.
14823 * callproc.c (getenv_internal_1, getenv_internal)
14824 (Fgetenv_internal):
14825 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
14827 * lread.c (invalid_syntax): Omit length argument.
14828 All uses changed. This doesn't fix a bug, but it simplifies the
14829 code away from its former Hollerith-constant appearance, and it's
14830 one less 'int' to worry about when looking at integer-overflow issues.
14831 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
14833 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
14834 This didn't break anything, but it didn't help either.
14835 It's confusing to put a bogus integer in a place where the actual
14836 value does not matter.
14837 (LIST_END_P): Remove unused macro and its bogus comment.
14838 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
14840 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
14841 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
14843 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
14844 We prefer signed types, and the value cannot exceed the EMACS_INT
14845 range anyway (because otherwise the length would not be representable).
14846 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
14847 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
14848 This avoids a GCC warning when WIDE_EMACS_INT.
14850 * indent.c (sane_tab_width): New function.
14851 (current_column, scan_for_column, Findent_to, position_indentation)
14852 (compute_motion): Use it. This is just for clarity.
14853 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
14855 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
14857 * lisp.h (lint_assume): New macro.
14858 * composite.c (composition_gstring_put_cache):
14859 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
14861 * editfns.c, insdel.c:
14862 Omit unnecessary forward decls, to simplify future changes.
14864 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
14866 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
14868 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
14869 Use much-faster test for byte-length change.
14870 Don't assume string byte-length fits in 'int'.
14871 Check that character arg fits in 'int'.
14872 (mapcar1): Declare byte as byte, for clarity.
14874 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
14876 * fns.c (concat): Catch string overflow earlier.
14877 Do not rely on integer wraparound.
14879 * dispextern.h (struct it.overlay_strings_charpos)
14880 (struct it.selective): Now EMACS_INT, not int.
14881 * xdisp.c (forward_to_next_line_start)
14882 (back_to_previous_visible_line_start)
14883 (reseat_at_next_visible_line_start, next_element_from_buffer):
14884 Don't arbitrarily truncate the value of 'selective' to int.
14886 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
14888 * composite.c: Don't truncate sizes to 'int'.
14889 (composition_gstring_p, composition_reseat_it)
14890 (composition_adjust_point): Use EMACS_INT, not int.
14891 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
14892 not EMACS_UINT, for indexes.
14894 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
14896 * buffer.c: Include <verify.h>.
14897 (struct sortvec.priority, struct sortstr.priority):
14898 Now EMACS_INT, not int.
14899 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
14900 (struct sortstr.size, record_overlay_string)
14901 (struct sortstrlist.size, struct sortlist.used):
14902 Don't truncate size to int.
14903 (record_overlay_string): Check for size-calculation overflow.
14904 (init_buffer_once): Check at compile-time, not run-time.
14906 2011-06-22 Jim Meyering <meyering@redhat.com>
14908 Don't leak an XBM-image-sized buffer
14909 * image.c (xbm_load): Free the image buffer after using it.
14911 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
14914 * composite.c (find_automatic_composition): Omit needless 'return 0;'
14915 that Sun C diagnosed.
14916 * fns.c (secure_hash): Fix pointer signedness issue.
14917 * intervals.c (static_offset_intervals): New function.
14918 (offset_intervals): Use it.
14920 2011-06-21 Leo Liu <sdl.web@gmail.com>
14923 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
14926 * fns.c (secure_hash): Rename from crypto_hash_function and change
14927 the first arg to accept symbols.
14928 (Fsecure_hash): New primitive.
14929 (syms_of_fns): New symbols.
14931 2011-06-20 Deniz Dogan <deniz@dogan.se>
14933 * process.c (Fset_process_buffer): Clarify return value in
14936 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
14938 * dispnew.c (add_window_display_history): Use BVAR.
14940 * xdisp.c (debug_method_add): Use BVAR.
14941 (check_window_end, dump_glyph_matrix, dump_glyph)
14942 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
14944 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
14947 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
14948 check till after the cache is created in init_frame_faces.
14950 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
14952 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
14954 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
14956 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
14957 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
14958 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
14960 Improve buffer-overflow checking (Bug#8873).
14961 * fileio.c (Finsert_file_contents):
14962 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
14963 Remove the old (too-loose) buffer overflow checks.
14964 They weren't needed, since make_gap checks for buffer overflow.
14965 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
14966 The old code merely checked for Emacs fixnum overflow, and relied
14967 on undefined (wraparound) behavior. The new code avoids undefined
14968 behavior, and also checks for ptrdiff_t and/or size_t overflow.
14970 * editfns.c (Finsert_char): Don't dump core with very negative counts.
14971 Tune. Don't use wider integers than needed. Don't use alloca.
14972 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
14974 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
14976 * insdel.c, lisp.h (buffer_overflow): New function.
14977 (insert_from_buffer_1, replace_range, replace_range_2):
14978 * insdel.c (make_gap_larger):
14979 * editfns.c (Finsert_char):
14980 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
14982 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
14984 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
14986 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
14988 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
14989 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
14991 * fileio.c: Don't assume EMACS_INT fits in off_t.
14992 (emacs_lseek): New static function.
14993 (Finsert_file_contents, Fwrite_region): Use it.
14994 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
14996 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
14998 * fns.c: Don't overflow int when computing a list length.
14999 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
15000 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
15001 truncation on 64-bit hosts. Check for QUIT every
15002 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
15003 faster and is responsive enough.
15004 (Flength): Report an error instead of overflowing an integer.
15005 (Fsafe_length): Return a float if the value is not representable
15006 as a fixnum. This shouldn't happen except in contrived situations.
15007 (Fnthcdr, Fsort): Don't assume list length fits in int.
15008 (Fcopy_sequence): Don't assume vector length fits in int.
15010 * alloc.c: Check that resized vectors' lengths fit in fixnums.
15011 (header_size, word_size): New constants.
15012 (allocate_vectorlike): Don't check size overflow here.
15013 (allocate_vector): Check it here instead, since this is the only
15014 caller of allocate_vectorlike that could cause overflow.
15015 Check that the new vector's length is representable as a fixnum.
15017 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
15018 The previous code was bogus. For example, next_almost_prime (32)
15019 returned 39, which is undesirable as it is a multiple of 3; and
15020 next_almost_prime (24) returned 25, which is a multiple of 5 so
15021 why was the code bothering to check for multiples of 7?
15023 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
15025 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
15027 Variadic C functions now count arguments with ptrdiff_t.
15028 This partly undoes my 2011-03-30 change, which replaced int with size_t.
15029 Back then I didn't know that the Emacs coding style prefers signed int.
15030 Also, in the meantime I found a few more instances where arguments
15031 were being counted with int, which may truncate counts on 64-bit
15032 machines, or EMACS_INT, which may be unnecessarily wide.
15033 * lisp.h (struct Lisp_Subr.function.aMANY)
15034 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
15035 Arg counts are now ptrdiff_t, not size_t.
15036 All variadic functions and their callers changed accordingly.
15037 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
15038 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
15039 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
15040 * callint.c (Fcall_interactively): Check arg count for overflow,
15041 to avoid potential buffer overrun. Use signed char, not 'int',
15042 for 'varies' array, so that we needn't bother to check its size
15043 calculation for overflow.
15044 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
15045 * eval.c (apply_lambda):
15046 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
15047 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
15048 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
15050 * callint.c (Fcall_interactively): Don't use index var as event count.
15052 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
15053 * mem-limits.h (SIZE): Remove; no longer used.
15055 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
15057 Remove unnecessary casts.
15058 * xterm.c (x_term_init):
15059 * xfns.c (x_set_border_pixel):
15060 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
15061 These aren't needed now that we assume ANSI C.
15063 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
15064 It's more likely to cause problems (due to unsigned overflow)
15067 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
15069 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
15071 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
15073 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
15075 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
15077 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
15079 GLYPH_CODE_FACE returns EMACS_INT, not int.
15080 * dispextern.h (merge_faces):
15081 * xfaces.c (merge_faces):
15082 * xdisp.c (get_next_display_element, next_element_from_display_vector):
15083 Don't assume EMACS_INT fits in int.
15085 * character.h (CHAR_VALID_P): Remove unused parameter.
15086 * fontset.c, lisp.h, xdisp.c: All uses changed.
15088 * editfns.c (Ftranslate_region_internal): Omit redundant test.
15090 * fns.c (concat): Minor tuning based on overflow analysis.
15091 This doesn't fix any bugs. Use int to hold character, instead
15092 of constantly refetching from Emacs object. Use XFASTINT, not
15093 XINT, for value known to be a character. Don't bother comparing
15094 a single byte to 0400, as it's always less.
15096 * floatfns.c (Fexpt):
15097 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
15099 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
15102 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
15104 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
15105 Without this fix, on a 64-bit host (aset S 0 4294967386) would
15106 incorrectly succeed when S was a string, because 4294967386 was
15107 truncated before it was used.
15109 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
15110 Otherwise, an out-of-range integer could cause undefined behavior
15113 * composite.c: Use int, not EMACS_INT, for characters.
15114 (fill_gstring_body, composition_compute_stop_pos): Use int, not
15115 EMACS_INT, for values that are known to be in character range.
15116 This doesn't fix any bugs but is the usual style inside Emacs and
15117 may generate better code on 32-bit machines.
15119 Make sure a 64-bit char is never passed to ENCODE_CHAR.
15120 This is for reasons similar to the recent CHAR_STRING fix.
15121 * charset.c (Fencode_char): Check that character arg is actually
15122 a character. Pass an int to ENCODE_CHAR.
15123 * charset.h (ENCODE_CHAR): Verify that the character argument is no
15124 wider than 'int', as a compile-time check to prevent future regressions
15127 * character.c (char_string): Remove unnecessary casts.
15129 Make sure a 64-bit char is never passed to CHAR_STRING.
15130 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
15131 by silently ignoring the top 32 bits, allowing some values
15132 that were far too large to be valid characters.
15133 * character.h: Include <verify.h>.
15134 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
15135 arguments are no wider than unsigned, as a compile-time check
15136 to prevent future regressions in this area.
15138 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
15139 (Fsubst_char_in_region):
15141 * xdisp.c (decode_mode_spec_coding):
15142 Adjust to CHAR_STRING's new requirement.
15143 * editfns.c (Finsert_char, Fsubst_char_in_region):
15144 * fns.c (concat): Check that character args are actually
15145 characters. Without this test, these functions did the wrong
15146 thing with wildly out-of-range values on 64-bit hosts.
15148 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
15149 These casts should not be needed on 32-bit hosts, either.
15150 * keyboard.c (read_char):
15151 * lread.c (Fload): Remove casts to unsigned.
15153 * lisp.h (UNSIGNED_CMP): New macro.
15154 This fixes comparison bugs on 64-bit hosts.
15155 (ASCII_CHAR_P): Use it.
15156 * casefiddle.c (casify_object):
15157 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
15158 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
15159 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
15160 * dispextern.h (FACE_FROM_ID):
15161 * keyboard.c (read_char): Use UNSIGNED_CMP.
15163 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
15164 not to EMACS_INT, to avoid GCC warning.
15166 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
15168 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
15169 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
15170 isn't needed on 32-bit machines.
15172 * buffer.c (Fgenerate_new_buffer_name):
15173 Use EMACS_INT for count, not int.
15174 (advance_to_char_boundary): Return EMACS_INT, not int.
15176 * data.c (Qcompiled_function): Now static.
15178 * window.c (window_body_lines): Now static.
15180 * image.c (gif_load): Rename local to avoid shadowing.
15182 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
15183 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
15184 * alloc.c (make_save_value): Integer argument is now of type
15185 ptrdiff_t, not int.
15186 (mark_object): Use ptrdiff_t, not int.
15187 * lisp.h (pD): New macro.
15188 * print.c (print_object): Use it.
15190 * alloc.c: Use EMACS_INT, not int, to count objects.
15191 (total_conses, total_markers, total_symbols, total_vector_size)
15192 (total_free_conses, total_free_markers, total_free_symbols)
15193 (total_free_floats, total_floats, total_free_intervals)
15194 (total_intervals, total_strings, total_free_strings):
15195 Now EMACS_INT, not int. All uses changed.
15196 (Fgarbage_collect): Compute overall total using a double, so that
15197 integer overflow is less likely to be a problem. Check for overflow
15198 when converting back to an integer.
15199 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
15200 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
15201 These were 'int' variables that could overflow on 64-bit hosts;
15202 they were never used, so remove them instead of repairing them.
15203 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
15204 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
15205 Previously, this ceilinged at INT_MAX, but that doesn't work on
15207 (allocate_pseudovector): Don't use EMACS_INT when int would do.
15209 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
15210 (allocate_vectorlike): Check for ptrdiff_t overflow.
15211 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
15212 when a (possibly-narrower) signed value would do just as well.
15213 We prefer using signed arithmetic, to avoid comparison confusion.
15215 * alloc.c: Catch some string size overflows that we were missing.
15216 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
15217 for convenience in STRING_BYTES_MAX.
15218 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
15219 The definition here is exact; the one in lisp.h was approximate.
15220 (allocate_string_data): Check for string overflow. This catches
15221 some instances we weren't catching before. Also, it catches
15222 size_t overflow on (unusual) hosts where SIZE_MAX <= min
15223 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
15224 and ptrdiff_t and EMACS_INT are both 64 bits.
15226 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
15227 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
15228 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
15230 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
15232 * alloc.c (Fmake_string): Check for out-of-range init.
15234 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
15236 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
15238 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
15240 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
15241 xg_get_default_scrollbar_width.
15243 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
15244 (int_gtk_range_get_value): Move to the scroll bar part of the file.
15245 (style_changed_cb): Call update_theme_scrollbar_width and call
15246 x_set_scroll_bar_default_width and xg_frame_set_char_size for
15247 all frames (Bug#8505).
15248 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
15249 Call gtk_window_set_resizable if HAVE_GTK3.
15250 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
15251 and height if HAVE_GTK3 (Bug#8505).
15252 (scroll_bar_width_for_theme): New variable.
15253 (update_theme_scrollbar_width): New function.
15254 (xg_get_default_scrollbar_width): Move code to
15255 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
15256 (xg_initialize): Call update_theme_scrollbar_width.
15258 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
15260 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
15262 2011-06-12 Martin Rudalics <rudalics@gmx.at>
15264 * frame.c (make_frame): Call other_buffer_safely instead of
15267 * window.c (temp_output_buffer_show): Call display_buffer with
15268 second argument Vtemp_buffer_show_specifiers and reset latter
15269 immediately after the call.
15270 (Vtemp_buffer_show_specifiers): New variable.
15271 (auto_window_vscroll_p, next_screen_context_lines)
15272 (Vscroll_preserve_screen_position): Remove leading asterisks from
15275 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
15277 Fix minor problems found by GCC 4.6.0 static checking.
15278 * buffer.c (Qclone_number): Remove for now, as it's unused.
15279 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
15280 (record_buffer): Remove unused local.
15281 * frame.c (other_visible_frames, frame_buffer_list): Now static.
15282 (set_frame_buffer_list): Remove; unused.
15283 * frame.h (other_visible_frames): Remove decl.
15284 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
15285 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
15286 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
15288 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
15289 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
15290 Define only if HAVE_GPM.
15291 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
15292 (update_hints_inhibit): Remove; never set. All uses removed.
15293 * widgetprv.h (emacsFrameClassRec): Remove decl.
15294 * window.c (delete_deletable_window): Now returns void, since it
15295 wasn't returning anything.
15296 (compare_window_configurations): Remove unused locals.
15297 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
15298 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
15299 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
15300 the same widths as pointers. This follows up on the 2011-05-06 patch.
15301 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
15302 * xterm.h: Likewise.
15303 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
15305 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
15307 * makefile.w32-in: Update dependencies.
15308 (LISP_H): Add lib/intprops.h.
15310 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
15312 * image.c (gif_load): Add animation frame delay to the metadata.
15313 (syms_of_image): Use DEFSYM. New symbol `delay'.
15315 2011-06-11 Martin Rudalics <rudalics@gmx.at>
15317 * window.c (delete_deletable_window): Re-add.
15318 (Fset_window_configuration): Rewrite to handle dead buffers and
15319 consequently deletable windows.
15320 (window_tree, Fwindow_tree): Remove. Supply functionality in
15322 (compare_window_configurations): Simplify code.
15324 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
15326 * image.c (imagemagick_load_image): Fix type mismatch.
15327 (Fimagemagick_types): Likewise.
15329 * window.h (replace_buffer_in_windows): Declare.
15331 2011-06-11 Martin Rudalics <rudalics@gmx.at>
15333 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
15334 Qclone_number. Remove external declaration of Qdelete_window.
15335 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
15337 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
15338 Run Qbuffer_list_update_hook if allowed.
15339 (Fother_buffer): Rewrite doc-string. Major rewrite for new
15340 buffer list implementation.
15341 (other_buffer_safely): New function.
15342 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
15343 calls to replace_buffer_in_windows and
15344 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
15346 (record_buffer): Inhibit quitting and rewrite using quittable
15347 functions. Run Qbuffer_list_update_hook if allowed.
15348 (Frecord_buffer, Funrecord_buffer): New functions.
15349 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
15350 Move switch-to-buffer to window.el.
15351 (bury-buffer): Move to window.el.
15352 (Vbuffer_list_update_hook): New variable.
15354 * lisp.h (other_buffer_safely): Add prototype in buffer.c
15357 * window.h (resize_frame_windows): Move up in code.
15358 (Fwindow_frame): Remove EXFUN.
15359 (replace_buffer_in_all_windows): Remove prototype.
15360 (replace_buffer_in_windows_safely): Add prototype.
15362 * window.c: Declare Qdelete_window static again. Move down
15363 declaration of select_count.
15364 (Fnext_window, Fprevious_window): Rewrite doc-strings.
15365 (Fother_window): Move to window.el.
15366 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
15367 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
15368 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
15370 (replace_buffer_in_windows): Implement by calling
15371 Qreplace_buffer_in_windows.
15372 (replace_buffer_in_all_windows): Remove with some functionality
15373 moved into replace_buffer_in_windows_safely.
15374 (replace_buffer_in_windows_safely): New function.
15375 (select_window_norecord, select_frame_norecord): Move in front
15376 of run_window_configuration_change_hook. Remove now obsolete
15378 (Fset_window_buffer): Rewrite doc-string.
15379 Call Qrecord_window_buffer.
15380 (keys_of_window): Move binding for other-window to window.el.
15382 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
15384 * dispextern.h (struct image): Replace data member, whose int_val
15385 and ptr_val fields were not used by anything, with a single
15388 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
15389 (gif_clear_image, gif_load, imagemagick_load_image)
15390 (gs_clear_image, gs_load): Callers changed.
15392 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
15394 * buffer.h: Include <time.h>, for time_t.
15395 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
15397 Fix minor problems found by static checking.
15399 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
15401 Make identifiers static if they are not used in other modules.
15402 * data.c (Qcompiled_function, Qframe, Qvector):
15403 * image.c (QimageMagick, Qsvg):
15404 * minibuf.c (Qmetadata):
15405 * window.c (resize_window_check, resize_root_window): Now static.
15406 * window.h (resize_window_check, resize_root_window): Remove decls.
15408 * window.c (window_deletion_count, delete_deletable_window):
15410 (window_body_lines): Now static.
15411 (Fdelete_other_windows_internal): Mark vars as initialized.
15412 Make sure 'resize_failed' is initialized.
15413 (run_window_configuration_change_hook): Rename local to avoid shadowing.
15414 (resize_window_apply): Remove unused local.
15415 * window.h (delete_deletable_window): Remove decl.
15417 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
15418 (imagemagick_load_image): Fix pointer signedness problem by changing
15419 last arg from unsigned char * to char *. All uses changed.
15420 Also, fix a local for similar reasons.
15421 Remove unused locals. Remove locals to avoid shadowing.
15422 (fn_rsvg_handle_free): Remove; unused.
15423 (svg_load, svg_load_image): Fix pointer signedness problem.
15424 (imagemagick_load_image): Don't use garbage pointer image_wand.
15426 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
15428 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
15430 * image.c (gif_load): Fix omitted cast error introduced by
15433 2011-06-10 Martin Rudalics <rudalics@gmx.at>
15435 * window.h (resize_proportionally, orig_total_lines)
15436 (orig_top_line): Remove from window structure.
15437 (set_window_height, set_window_width, change_window_heights)
15438 (Fdelete_window): Remove prototypes.
15439 (resize_frame_windows): Remove duplicate declaration.
15441 2011-06-10 Eli Zaretskii <eliz@gnu.org>
15443 * window.h (resize_frame_windows, resize_window_check)
15444 (delete_deletable_window, resize_root_window)
15445 (resize_frame_windows): Declare prototypes.
15447 * window.c (resize_window_apply): Make definition be "static" to
15448 match the prototype.
15450 2011-06-10 Martin Rudalics <rudalics@gmx.at>
15452 * window.c: Remove declarations of Qwindow_size_fixed,
15453 window_min_size_1, window_min_size_2, window_min_size,
15454 size_window, window_fixed_size_p, enlarge_window, delete_window.
15455 Remove static from declaration of Qdelete_window, it's
15456 temporarily needed by Fbury_buffer.
15457 (replace_window): Don't assign orig_top_line and
15459 (Fdelete_window, delete_window): Remove. Window deletion is
15460 handled by window.el.
15461 (window_loop): Remove DELETE_OTHER_WINDOWS case.
15462 Replace Fdelete_window calls with calls to Qdelete_window.
15463 (Fdelete_other_windows): Remove. Deleting other windows is
15464 handled by window.el.
15465 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
15466 handled in window.el.
15467 (window_min_size_2, window_min_size_1, window_min_size): Remove.
15468 Window minimum sizes are handled in window.el.
15469 (shrink_windows, size_window, set_window_height)
15470 (set_window_width, change_window_heights, window_height)
15471 (window_width, CURBEG, CURSIZE, enlarge_window)
15472 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
15473 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
15474 handled in window.el.
15475 (make_dummy_parent): Rename to make_parent_window and give it a
15476 second argument horflag.
15477 (make_window): Don't set resize_proportionally any more.
15478 (Fsplit_window): Remove. Windows are split in window.el.
15479 (save_restore_action, save_restore_orig_size)
15480 (shrink_window_lowest_first, save_restore_orig_size): Remove.
15481 Resize mini windows in window.el.
15482 (grow_mini_window, shrink_mini_window): Implement by calling
15483 Qresize_root_window_vertically, resize_window_check and
15484 resize_window_apply.
15485 (saved_window, Fset_window_configuration, save_window_save):
15486 Do not handle orig_top_line, orig_total_lines, and
15487 resize_proportionally.
15488 (window_min_height, window_min_width): Move to window.el.
15489 (keys_of_window): Move bindings for delete-other-windows,
15490 split-window, delete-window and enlarge-window to window.el.
15492 * buffer.c: Temporarily extern Qdelete_window.
15493 (Fbury_buffer): Temporarily call Qdelete_window instead of
15494 Fdelete_window (Fbury_buffer will move to window.el soon).
15496 * frame.c (set_menu_bar_lines_1): Remove code handling
15497 orig_top_line and orig_total_lines.
15499 * dispnew.c (adjust_frame_glyphs_initially): Don't use
15500 set_window_height but set heights directly.
15501 (change_frame_size_1): Use resize_frame_windows.
15503 * xdisp.c (init_xdisp): Don't use set_window_height but set
15506 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
15507 Use resize_frame_windows instead of change_window_heights and run
15508 run_window_configuration_change_hook.
15510 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
15511 instead of change_window_heights and run
15512 run_window_configuration_change_hook.
15514 2011-06-09 Martin Rudalics <rudalics@gmx.at>
15516 * window.c (replace_window): Rename second argument REPLACEMENT to
15517 NEW. New third argument SETFLAG. Rewrite.
15518 (delete_window, make_dummy_parent): Call replace_window with
15520 (window_list_1): Move down in code.
15521 (run_window_configuration_change_hook): Move set_buffer part
15522 before select_frame_norecord part in order to unwind correctly.
15523 Rename count1 to count.
15524 (recombine_windows, delete_deletable_window, resize_root_window)
15525 (Fdelete_other_windows_internal)
15526 (Frun_window_configuration_change_hook, make_parent_window)
15527 (resize_window_check, resize_window_apply, Fresize_window_apply)
15528 (resize_frame_windows, Fsplit_window_internal)
15529 (Fdelete_window_internal, Fresize_mini_window_internal):
15531 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
15533 2011-06-08 Martin Rudalics <rudalics@gmx.at>
15535 * window.h (window): Add some new members to window structure -
15536 normal_lines, normal_cols, new_total, new_normal, clone_number,
15537 splits, nest, prev_buffers, next_buffers.
15538 (WINDOW_TOTAL_SIZE): Move here from window.c.
15539 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
15541 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
15543 (make_dummy_parent): Set new members of windows structure.
15544 (make_window): Move down in code. Handle new members of window
15546 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
15547 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
15548 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
15549 (Fset_window_prev_buffers, Fwindow_next_buffers)
15550 (Fset_window_next_buffers, Fset_window_clone_number):
15552 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
15553 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
15555 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
15556 Argument WINDOW can be now internal window too.
15557 (Fwindow_use_time): Move up in code.
15558 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
15559 Rewrite doc-string.
15560 (Fset_window_configuration, saved_window)
15561 (Fcurrent_window_configuration, save_window_save): Handle new
15562 members of window structure.
15563 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
15564 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
15565 (syms_of_window): New Lisp objects Qrecord_window_buffer,
15566 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
15567 Qget_mru_window, Qresize_root_window,
15568 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
15569 Qauto_buffer_name; staticpro them.
15571 2011-06-07 Martin Rudalics <rudalics@gmx.at>
15573 * window.c (Fwindow_total_size, Fwindow_left_column)
15574 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
15575 (Fwindow_list_1): New functions.
15576 (window_box_text_cols): Replace with window_body_cols.
15577 (Fwindow_width, Fscroll_left, Fscroll_right):
15578 Use window_body_cols instead of window_box_text_cols.
15579 (delete_window, Fset_window_configuration):
15580 Call delete_all_subwindows with window as argument.
15581 (delete_all_subwindows): Take a window as argument and not a
15582 structure. Rewrite.
15583 (window_loop): Remove handling of GET_LRU_WINDOW and
15584 GET_LARGEST_WINDOW.
15585 (Fget_lru_window, Fget_largest_window): Move to window.el.
15587 * window.h: Extern window_body_cols instead of
15588 window_box_text_cols. delete_all_subwindows now takes a
15589 Lisp_Object as argument.
15591 * indent.c (compute_motion, Fcompute_motion):
15592 Use window_body_cols instead of window_box_text_cols.
15594 * frame.c (delete_frame): Call delete_all_subwindows with root
15595 window as argument.
15597 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
15599 * fns.c (Fputhash): Document return value.
15601 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
15603 * image.c (gif_load): Implement gif89a spec "no disposal" method.
15605 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15607 Cons<->int and similar integer overflow fixes (Bug#8794).
15609 Check for overflow when converting integer to cons and back.
15610 * charset.c (Fdefine_charset_internal, Fdecode_char):
15611 Use cons_to_unsigned to catch overflow.
15612 (Fencode_char): Use INTEGER_TO_CONS.
15613 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
15614 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
15615 * data.c (long_to_cons, cons_to_long): Remove.
15616 (cons_to_unsigned, cons_to_signed): New functions.
15617 These signal an error for invalid or out-of-range values.
15618 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
15619 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
15620 * font.c (Ffont_variation_glyphs):
15621 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
15622 * lisp.h: Include <intprops.h>.
15623 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
15624 (cons_to_signed, cons_to_unsigned): New decls.
15625 (long_to_cons, cons_to_long): Remove decls.
15626 * undo.c (record_first_change): Use INTEGER_TO_CONS.
15627 (Fprimitive_undo): Use CONS_TO_INTEGER.
15628 * xfns.c (Fx_window_property): Likewise.
15629 * xselect.c: Include <limits.h>.
15630 (x_own_selection, selection_data_to_lisp_data):
15631 Use INTEGER_TO_CONS.
15632 (x_handle_selection_request, x_handle_selection_clear)
15633 (x_get_foreign_selection, Fx_disown_selection_internal)
15634 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
15635 (lisp_data_to_selection_data): Use cons_to_unsigned.
15636 (x_fill_property_data): Use cons_to_signed.
15637 Report values out of range.
15639 Check for buffer and string overflow more precisely.
15640 * buffer.h (BUF_BYTES_MAX): New macro.
15641 * lisp.h (STRING_BYTES_MAX): New macro.
15642 * alloc.c (Fmake_string):
15643 * character.c (string_escape_byte8):
15644 * coding.c (coding_alloc_by_realloc):
15645 * doprnt.c (doprnt):
15646 * editfns.c (Fformat):
15648 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
15649 since they may not be the same number.
15650 * editfns.c (Finsert_char):
15651 * fileio.c (Finsert_file_contents):
15652 Likewise for BUF_BYTES_MAX.
15654 * image.c: Use ptrdiff_t, not int, for sizes.
15655 (slurp_file): Switch from int to ptrdiff_t.
15657 (slurp_file): Check that file size fits in both size_t (for
15658 malloc) and ptrdiff_t (for sanity and safety).
15660 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
15661 if b->modtime has its maximal value.
15663 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
15665 Don't assume time_t can fit into int.
15666 * buffer.h (struct buffer.modtime): Now time_t, not int.
15667 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
15668 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
15670 Minor fixes for signed vs unsigned integers.
15671 * character.h (MAYBE_UNIFY_CHAR):
15672 * charset.c (maybe_unify_char):
15673 * keyboard.c (read_char, reorder_modifiers):
15674 XINT -> XFASTINT, since the integer must be nonnegative.
15675 * ftfont.c (ftfont_spec_pattern):
15676 * keymap.c (access_keymap, silly_event_symbol_error):
15677 XUINT -> XFASTINT, since the integer must be nonnegative.
15678 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
15679 since it makes no difference and we prefer signed.
15680 * keyboard.c (record_char): Use XUINT when all the neighbors do.
15681 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
15684 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
15686 * window.h (Fwindow_frame): Declare.
15688 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15690 * alloc.c: Simplify handling of large-request failures (Bug#8800).
15691 (SPARE_MEMORY): Always define.
15692 (LARGE_REQUEST): Remove.
15693 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
15695 2011-06-06 Martin Rudalics <rudalics@gmx.at>
15697 * lisp.h: Move EXFUNS for Fframe_root_window,
15698 Fframe_first_window and Fset_frame_selected_window to window.h.
15700 * window.h: Move EXFUNS for Fframe_root_window,
15701 Fframe_first_window and Fset_frame_selected_window here from
15704 * frame.c (Fwindow_frame, Fframe_first_window)
15705 (Fframe_root_window, Fframe_selected_window)
15706 (Fset_frame_selected_window): Move to window.c.
15707 (Factive_minibuffer_window): Move to minibuf.c.
15708 (Fother_visible_frames_p): New function.
15710 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
15712 * window.c (decode_window, decode_any_window): Move up in code.
15713 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
15714 (inhibit_frame_unsplittable): Remove unused variable.
15715 (Fwindow_buffer): Move up and rewrite doc-string.
15716 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
15717 (Fwindow_prev): New functions.
15718 (Fwindow_frame): Move here from frame.c. Accept any window as
15720 (Fframe_root_window, Fframe_first_window)
15721 (Fframe_selected_window): Move here from frame.c. Accept frame
15722 or arbitrary window as argument. Update doc-strings.
15723 (Fminibuffer_window): Move up in code.
15724 (Fwindow_minibuffer_p): Move up in code and simplify.
15725 (Fset_frame_selected_window): Move here from frame.c.
15727 (Fselected_window, select_window, Fselect_window): Move up in
15728 code. Minor doc-string fixes.
15730 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
15732 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
15733 Do not assume that spare memory exists; that assumption is valid
15734 only if SYSTEM_MALLOC.
15735 (LARGE_REQUEST): New macro, so that the issue of large requests
15736 is separated from the issue of spare memory.
15738 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
15740 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
15743 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
15745 * xfns.c (x_set_scroll_bar_default_width): Move declarations
15748 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
15750 * gtkutil.c (xg_get_default_scrollbar_width): New function.
15752 * gtkutil.h: Declare xg_get_default_scrollbar_width.
15754 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
15755 min width by calling x_set_scroll_bar_default_width (Bug#8505).
15757 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
15759 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
15761 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
15763 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
15764 (x_clipboard_manager_save): Add return value.
15765 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
15766 New error handlers.
15767 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
15768 Obey Vx_select_enable_clipboard_manager. Catch errors in
15769 x_clipboard_manager_save (Bug#8779).
15770 (Vx_select_enable_clipboard_manager): New variable.
15771 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
15773 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
15775 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
15777 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15779 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
15780 in the current matrix if keep_current_p is non-zero.
15782 2011-06-04 Eli Zaretskii <eliz@gnu.org>
15784 * bidi.c (bidi_level_of_next_char): Fix last change.
15786 2011-06-03 Eli Zaretskii <eliz@gnu.org>
15788 Support bidi reordering of text covered by display properties.
15790 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
15791 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
15792 (bidi_cache_search, bidi_cache_iterator_state)
15793 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
15794 (bidi_level_of_next_char, bidi_move_to_visually_next):
15795 Support character positions inside a run of characters covered by a
15797 (bidi_paragraph_init, bidi_resolve_explicit_1)
15798 (bidi_level_of_next_char): Call bidi_fetch_char and
15799 bidi_fetch_char_advance instead of FETCH_CHAR and
15800 FETCH_CHAR_ADVANCE.
15801 (bidi_init_it): Initialize new members.
15802 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
15804 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
15805 instead of using explicit *_CHAR codes.
15806 (bidi_resolve_explicit, bidi_resolve_weak):
15807 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
15808 bidirectional text is supported only in multibyte buffers.
15809 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
15810 it to initialize the frame_window_p member of struct bidi_it.
15811 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
15812 (bidi_resolve_explicit, bidi_resolve_weak)
15813 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
15814 bidi_it->nchars is non-positive.
15815 (bidi_level_of_next_char): Don't try to lookup the cache for the
15816 next/previous character if nothing is cached there yet, or if we
15817 were just reseat()'ed to a new position.
15819 * xdisp.c (set_cursor_from_row): Set start and stop points
15820 according to the row's direction when priming the loop that looks
15821 for the glyph on which to display cursor.
15822 (single_display_spec_intangible_p): Function deleted.
15823 (display_prop_intangible_p): Reimplement to call
15824 handle_display_spec instead of single_display_spec_intangible_p.
15825 Accept 3 additional arguments needed by handle_display_spec.
15826 This fixes incorrect cursor motion across display property with complex
15827 values: lists, `(when COND...)' forms, etc.
15828 (single_display_spec_string_p): Support property values that are
15829 lists with the argument STRING its top-level element.
15830 (display_prop_string_p): Fix the condition for processing a
15831 property that is a list to be consistent with handle_display_spec.
15832 (handle_display_spec): New function, refactored from the
15833 last portion of handle_display_prop.
15834 (compute_display_string_pos): Accept additional argument
15835 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
15836 value of a `display' property is a "replacing spec".
15837 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
15838 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
15839 the display property, but just return a value indicating whether
15840 the display property will replace the characters it covers.
15841 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
15842 frame_window_p members of struct bidi_it.
15843 (compute_display_string_pos, compute_display_string_end):
15845 (push_it): Accept second argument POSITION, where pop_it should
15846 jump to continue iteration.
15847 (reseat_1): Initialize bidi_it.disp_pos.
15849 * keyboard.c (adjust_point_for_property): Adjust the call to
15850 display_prop_intangible_p to its new signature.
15852 * dispextern.h (struct bidi_it): New member frame_window_p.
15853 (bidi_init_it): Update prototypes.
15854 (display_prop_intangible_p): Update prototype.
15855 (compute_display_string_pos, compute_display_string_end):
15856 Declare prototypes.
15857 (struct bidi_it): New members nchars and disp_pos. ch_len is now
15860 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
15862 Malloc failure behavior now depends on size of allocation.
15863 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
15864 * lisp.h: Change signatures accordingly.
15865 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
15866 All callers changed. (Bug#8762)
15868 * gnutls.c: Use Emacs's memory allocators.
15869 Without this change, the gnutls library would invoke malloc etc.
15870 directly, which causes problems on non-SYNC_INPUT hosts, and which
15871 runs afoul of improving memory_full behavior. (Bug#8761)
15872 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
15873 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
15874 xfree instead of the default malloc, realloc, free.
15875 (Fgnutls_boot): No need to check for memory allocation failure,
15876 since xmalloc does that for us.
15878 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
15879 * category.c (hash_get_category_set):
15880 * ccl.c (ccl_driver):
15881 * charset.c (Fdefine_charset_internal):
15882 * charset.h (struct charset.hash_index):
15883 * composite.c (get_composition_id, gstring_lookup_cache)
15884 (composition_gstring_put_cache):
15885 * composite.h (struct composition.hash_index):
15886 * dispextern.h (struct image.hash):
15887 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
15888 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
15889 (hashfn_equal, hashfn_user_defined, make_hash_table)
15890 (maybe_resize_hash_table, hash_lookup, hash_put)
15891 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
15892 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
15893 (Fsxhash, Fgethash, Fputhash, Fmaphash):
15894 * image.c (make_image, search_image_cache, lookup_image)
15895 (xpm_put_color_table_h):
15896 * lisp.h (struct Lisp_Hash_Table):
15897 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
15898 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
15899 for hashes and hash indexes, instead of 'unsigned' and 'int'.
15900 * alloc.c (allocate_vectorlike):
15901 Check for overflow in vector size calculations.
15902 * ccl.c (ccl_driver):
15903 Check for overflow when converting EMACS_INT to int.
15904 * fns.c, image.c: Remove unnecessary static decls that would otherwise
15905 need to be updated by these changes.
15906 * fns.c (make_hash_table, maybe_resize_hash_table):
15907 Check for integer overflow with large hash tables.
15908 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
15909 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
15910 (SXHASH_REDUCE): New macro.
15911 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
15912 Use it instead of discarding useful hash info with large hash values.
15913 (sxhash_float): New function.
15914 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
15915 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
15916 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
15917 Rewrite to use FIXNUM_BITS, as this simplifies things.
15918 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
15919 Adjust signatures to match updated version of code.
15920 (consing_since_gc): Now EMACS_INT, since a single hash table can
15921 use more than INT_MAX bytes.
15923 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
15925 Make it possible to build with GCC-4.6+ -O2 -flto.
15927 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
15929 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
15931 * minibuf.c (get_minibuffer, read_minibuf_unwind):
15932 Call minibuffer-inactive-mode.
15934 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
15936 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
15937 Update dependencies.
15939 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15941 * data.c (init_data): Remove code for UTS, this system is not
15944 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15946 Don't force ./temacs to start in terminal mode.
15948 * frame.c (make_initial_frame): Initialize faces in all cases, not
15949 only when CANNOT_DUMP is defined.
15950 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
15952 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15954 * dispnew.c (add_window_display_history): Use const for the string
15955 pointer. Remove declaration, not needed.
15957 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15959 Use 'inline', not 'INLINE'.
15960 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
15961 * alloc.c, fontset.c (INLINE): Remove.
15962 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
15963 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
15964 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
15965 * gmalloc.c (register_heapinfo): Use inline unconditionally.
15966 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
15968 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
15970 Make it possible to run ./temacs.
15972 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
15973 syms_of_callproc does the same thing. Remove test for
15974 "initialized", do it in the caller.
15975 * emacs.c (main): Avoid calling set_initial_environment when dumping.
15977 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
15979 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
15980 (read_minibuf): Use get_minibuffer.
15981 (syms_of_minibuf): Use DEFSYM.
15982 (Qmetadata): New var.
15983 * data.c (Qbuffer): Don't make it static.
15984 (syms_of_data): Use DEFSYM.
15986 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
15988 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
15989 (CCL_CODE_MIN): New macro.
15991 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
15993 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
15995 * eval.c (Qdebug): Now static.
15996 * lisp.h (Qdebug): Remove decl. This reverts a part of the
15997 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
15998 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
16000 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
16002 * image.c: Various fixes to ImageMagick code comments.
16003 (Fimagemagick_types): Doc fix.
16005 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
16007 Minor fixes prompted by GCC 4.6.0 warnings.
16009 * xselect.c (converted_selections, conversion_fail_tag): Now static.
16011 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
16012 (x_clipboard_manager_save_all): Move extern decl to ...
16013 * xterm.h: ... here, so that it can be checked for consistency.
16015 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
16017 * xselect.c (x_clipboard_manager_save_frame)
16018 (x_clipboard_manager_save_all): New functions.
16019 (Fx_clipboard_manager_save): Lisp function deleted.
16021 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
16022 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
16024 * xterm.h: Update prototype.
16026 2011-05-28 William Xu <william.xwl@gmail.com>
16028 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
16029 exiting (Bug#8239).
16031 2011-05-28 Jim Meyering <meyering@redhat.com>
16033 Avoid a sign-extension bug in crypto_hash_function.
16034 * fns.c (to_uchar): Define.
16035 (crypto_hash_function): Use it to convert some newly-signed
16036 variables to unsigned, to avoid sign-extension bugs. For example,
16037 without this change, (md5 "truc") would evaluate to
16038 45723a2aff78ff4fff7fff1114760e62 rather than the expected
16039 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
16040 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
16042 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
16044 Integer overflow fixes.
16046 * dbusbind.c: Serial number integer overflow fixes.
16047 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
16048 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
16049 to hold a serial number that is too large for a fixnum.
16050 (Fdbus_method_return_internal, Fdbus_method_error_internal):
16051 Check for serial numbers out of range. Decode any serial number
16052 that was so large that it became a float. (Bug#8722)
16054 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
16055 (Fdbus_call_method, Fdbus_call_method_asynchronously):
16056 Use XFASTINT rather than XUINT when numbers are nonnegative.
16057 (xd_append_arg, Fdbus_method_return_internal):
16058 (Fdbus_method_error_internal): Likewise. Also, for unsigned
16059 arguments, check that Lisp number is nonnegative, rather than
16060 silently wrapping negative numbers around. (Bug#8722)
16061 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
16064 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
16066 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
16068 ccl: Add integer overflow checks.
16069 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
16070 (IN_INT_RANGE): New macros.
16071 (ccl_driver): Use them to check for integer overflow when
16072 decoding a CCL program. Many of the new checks are whether XINT (x)
16073 fits in int; it doesn't always, on 64-bit hosts. The new version
16074 doesn't catch all possible integer overflows, but it's an
16075 improvement. (Bug#8719)
16077 * alloc.c (make_event_array): Use XINT, not XUINT.
16078 There's no need for unsigned here.
16080 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
16081 This follows up to the 2011-05-06 change that substituted uintptr_t
16082 for EMACS_INT. This case wasn't caught back then.
16084 Rework Fformat to avoid integer overflow issues.
16085 * editfns.c: Include <float.h> unconditionally, as it's everywhere
16086 now (part of C89). Include <verify.h>.
16087 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
16088 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
16089 (Fformat): Avoid the prepass trying to compute sizes; it was only
16090 approximate and thus did not catch overflow reliably. Instead, walk
16091 through the format just once, formatting and computing sizes as we go,
16092 checking for integer overflow at every step, and allocating a larger
16093 buffer as needed. Keep track separately whether the format is
16094 multibyte. Keep only the most-recently calculated precision, rather
16095 than them all. Record whether each argument has been converted to
16096 string. Use EMACS_INT, not int, for byte and char and arg counts.
16097 Support field widths and precisions larger than INT_MAX. Avoid
16098 sprintf's undefined behavior with conversion specifications such as %#d
16099 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
16100 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
16101 formatting out-of-range floating point numbers with int
16102 formats. (Bug#8668)
16104 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
16106 * data.c: Avoid integer truncation in expressions involving floats.
16107 * data.c: Include <intprops.h>.
16108 (arith_driver): When there's an integer overflow in an expression
16109 involving floating point, convert the integers to floating point
16110 so that the resulting value does not suffer from catastrophic
16111 integer truncation. For example, on a 64-bit host (* 4
16112 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
16113 Do not rely on undefined behavior after integer overflow.
16115 merge count_size_as_multibyte, parse_str_to_multibyte
16116 * character.c, character.h (count_size_as_multibyte):
16117 Rename from parse_str_to_multibyte; all uses changed.
16118 Check for integer overflow.
16119 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
16120 since it's now a duplicate of the other. This is more of
16121 a character than a buffer op, so better that it's in character.c.
16122 * fns.c, print.c: Adjust to above changes.
16124 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
16126 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
16128 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
16130 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
16131 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
16132 (x_clipboard_manager_save): Now static.
16133 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
16135 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
16136 (crypto_hash_function): Now static.
16137 Fix pointer signedness problems. Avoid unnecessary initializations.
16139 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
16141 * termhooks.h (Vselection_alist): Make it terminal-local.
16143 * terminal.c (create_terminal): Initialize it.
16145 * xselect.c: Support for clipboard managers.
16146 (Vselection_alist): Move to termhooks.h as terminal-local var.
16147 (LOCAL_SELECTION): New macro.
16148 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
16149 (symbol_to_x_atom): Remove gratuitous arg.
16150 (x_handle_selection_request, lisp_data_to_selection_data)
16151 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
16152 (x_own_selection, x_get_local_selection, x_convert_selection):
16153 New arg, specifying work frame. Use terminal-local Vselection_alist.
16154 (some_frame_on_display): Delete unused function.
16155 (Fx_own_selection_internal, Fx_get_selection_internal)
16156 (Fx_disown_selection_internal, Fx_selection_owner_p)
16157 (Fx_selection_exists_p): New optional frame arg.
16158 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
16159 (x_handle_selection_clear): Don't treat other terminals with the
16160 same keyboard specially. Use the terminal-local Vselection_alist.
16161 (x_clear_frame_selections): Use Frun_hook_with_args.
16163 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
16165 * xterm.h: Add support for those atoms.
16167 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
16169 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
16170 (converted_selections, conversion_fail_tag): New global variables.
16171 (x_selection_request_lisp_error): Free the above.
16172 (x_get_local_selection): Remove unnecessary code.
16173 (x_reply_selection_request): Args changed; handle arbitrary array
16174 of converted selections stored in converted_selections.
16175 Separate the XChangeProperty and SelectionNotify steps.
16176 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
16177 (x_convert_selection): New function.
16178 (x_handle_selection_event): Simplify.
16179 (x_get_foreign_selection): Don't ignore incoming requests while
16180 waiting for an answer; this will fail when we implement
16181 SAVE_TARGETS, and seems unnecessary anyway.
16182 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
16183 (Vx_sent_selection_functions): Doc fix.
16185 2011-05-26 Leo Liu <sdl.web@gmail.com>
16187 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
16189 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16191 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
16193 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
16194 for fringe update if it has periodic bitmap.
16195 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
16196 and fringe_bitmap_periodic_p.
16198 * fringe.c (get_fringe_bitmap_data): New function.
16199 (draw_fringe_bitmap_1, update_window_fringes): Use it.
16200 (update_window_fringes): Record periodicity of fringe bitmap in glyph
16201 row. Mark glyph row for fringe update if periodicity changed.
16203 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
16204 for fringe update unless it has periodic bitmap.
16206 2011-05-25 Kenichi Handa <handa@m17n.org>
16208 * xdisp.c (get_next_display_element): Set correct it->face_id for
16209 a static composition.
16211 2011-05-24 Leo Liu <sdl.web@gmail.com>
16214 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
16216 * fns.c (crypto_hash_function, Fsha1): New function.
16217 (Fmd5): Use crypto_hash_function.
16218 (syms_of_fns): Add Ssha1.
16220 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
16222 * gnutls.c: Remove unused macros.
16223 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
16224 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
16225 Remove macros that are defined and never used.
16226 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
16228 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
16230 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
16231 (Fx_get_selection_internal): Minor cleanup.
16232 (Fx_own_selection_internal): Rename arguments for consistency with
16235 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
16237 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
16239 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
16241 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
16243 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16245 * dispnew.c (scrolling_window): Don't exclude the case that the
16246 last enabled row in the desired matrix touches the bottom boundary.
16248 2011-05-21 Glenn Morris <rgm@gnu.org>
16250 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
16251 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
16252 and add some more files.
16254 2011-05-20 Eli Zaretskii <eliz@gnu.org>
16256 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
16257 report_file_error introduced by the change from 2011-05-07.
16259 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
16261 * systime.h (Time): Define only if emacs is defined.
16262 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
16263 where the include path doesn't have X11/X.h by default. See
16264 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
16266 2011-05-20 Kenichi Handa <handa@m17n.org>
16268 * composite.c (find_automatic_composition): Fix previous change.
16270 2011-05-20 Glenn Morris <rgm@gnu.org>
16272 * lisp.mk: New file, split from Makefile.in.
16273 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
16274 (shortlisp): Remove.
16275 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
16277 2011-05-19 Glenn Morris <rgm@gnu.org>
16279 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
16280 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
16281 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
16282 (lisp): Set the order to that of loadup.el.
16283 (shortlisp): Make it a copy of $lisp.
16284 (SOME_MACHINE_LISP): Remove.
16285 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
16286 Use just $shortlisp, not $SOME_MACHINE_LISP too.
16288 2011-05-18 Kenichi Handa <handa@m17n.org>
16290 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
16291 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
16292 (find_automatic_composition): Mostly rewrite for efficiency.
16294 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
16296 * makefile.w32-in: Update dependencies.
16298 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
16300 * menu.c: Include limits.h (fixes the MS-Windows build broken by
16301 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
16303 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
16305 Fix some integer overflow issues, such as string length overflow.
16307 * insdel.c (count_size_as_multibyte): Check for string overflow.
16309 * character.c (lisp_string_width): Check for string overflow.
16310 Use EMACS_INT, not int, for string indexes and lengths; in
16311 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
16312 the resulting string length overflows an EMACS_INT; instead,
16313 report a string overflow if no precision given. When checking for
16314 precision exhaustion, use a check that cannot possibly have
16315 integer overflow. (Bug#8675)
16316 * character.h (lisp_string_width): Adjust to new signature.
16318 * alloc.c (string_overflow): New function.
16319 (Fmake_string): Use it. This doesn't change behavior, but saves
16320 a few bytes and will simplify future changes.
16321 * character.c (string_escape_byte8): Likewise.
16322 * lisp.h (string_overflow): New decl.
16324 Fixups, following up to the user-interface timestamp change.
16325 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
16326 for UI timestamps, instead of unsigned long.
16327 * msdos.c (mouse_get_pos): Likewise.
16328 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
16329 * w32gui.h (Time): Define by including "systime.h" rather than by
16330 declaring it ourselves. (Bug#8664)
16332 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
16333 * image.c (clear_image_cache): Likewise.
16335 * term.c (term_mouse_position): Don't assume time_t wraparound.
16337 Be more systematic about user-interface timestamps.
16338 Before, the code sometimes used 'Time', sometimes 'unsigned long',
16339 and sometimes 'EMACS_UINT', to represent these timestamps.
16340 This change causes it to use 'Time' uniformly, as that's what X uses.
16341 This makes the code easier to follow, and makes it easier to catch
16342 integer overflow bugs such as Bug#8664.
16343 * frame.c (Fmouse_position, Fmouse_pixel_position):
16344 Use Time, not unsigned long, for user-interface timestamps.
16345 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
16346 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
16347 * keyboard.h (last_event_timestamp): Likewise.
16348 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
16349 * menu.h (xmenu_show): Likewise.
16350 * term.c (term_mouse_position): Likewise.
16351 * termhooks.h (struct input_event.timestamp): Likewise.
16352 (struct terminal.mouse_position_hook): Likewise.
16353 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
16354 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
16355 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
16356 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
16357 what it was before.
16358 * menu.h, termhooks.h: Include "systime.h", for Time.
16360 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
16361 Don't assume that the difference between two unsigned long values
16362 can fit into an integer. At this point, we know button_down_time
16363 <= event->timestamp, so the difference must be nonnegative, so
16364 there's no need to cast the result if double-click-time is
16365 nonnegative, as it should be; check that it's nonnegative, just in
16366 case. This bug is triggered when events are more than 2**31 ms
16367 apart (about 25 days). (Bug#8664)
16369 * xselect.c (last_event_timestamp): Remove duplicate decl.
16370 (x_own_selection): Remove needless cast to unsigned long.
16372 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
16373 that always fit in int. Use a sentinel instead of a counter, to
16374 avoid a temp and to allay GCC's concerns about possible int overflow.
16375 * frame.h (struct frame): Use int for menu_bar_items_used
16376 instead of EMACS_INT, since it always fits in int.
16378 * menu.c (grow_menu_items): Check for int overflow.
16380 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
16382 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
16383 Before, the code was not consistent. These values cannot exceed
16384 2**31 - 1 so there's no need to make them unsigned.
16385 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
16386 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
16387 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
16389 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
16391 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
16392 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
16393 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
16394 presumably because the widths might not match.
16396 * window.c (size_window): Avoid needless test at loop start.
16398 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
16400 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
16402 2011-05-12 Drew Adams <drew.adams@oracle.com>
16404 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
16406 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16408 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
16409 `width' to `bar_area_x' and `bar_area_width', respectively.
16410 (x_scroll_run): Take account of fringe background extension.
16412 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
16413 Rename local vars `left' and `width' to `bar_area_x' and
16414 `bar_area_width', respectively.
16415 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
16416 background extension.
16418 2011-05-10 Jim Meyering <meyering@redhat.com>
16420 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
16422 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
16424 * image.c (Finit_image_library): Return t for built-in image types,
16425 like pbm and xbm. (Bug#8640)
16427 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
16429 * w32menu.c (set_frame_menubar): Fix submenu allocation.
16431 2011-05-07 Eli Zaretskii <eliz@gnu.org>
16433 * w32console.c (Fset_screen_color): Doc fix.
16434 (Fget_screen_color): New function.
16435 (syms_of_ntterm): Defsubr it.
16437 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
16438 unlink the temporary file if Fcall_process didn't create it in the
16440 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
16441 child process will be redirected to a file specified with `:file'.
16442 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
16443 cue to call_process_cleanup not to close that handle.
16445 2011-05-07 Ben Key <bkey76@gmail.com>
16447 * makefile.w32-in: The bootstrap-temacs rule now makes use of
16448 one of two shell specific rules, either bootstrap-temacs-CMD or
16449 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
16450 to the previous implementation of the bootstrap-temacs rule.
16451 The bootstrap-temacs-CMD rule is similar to the previous
16452 implementation of the bootstrap-temacs rule except that it
16453 makes use of the ESC_CFLAGS variable instead of the CFLAGS
16456 These changes, along with some changes to nt/configure.bat,
16457 nt/gmake.defs, and nt/nmake.defs, are required to extend my
16458 earlier fix to add support for --cflags and --ldflags options
16459 that include quotes so that it works whether make uses cmd or
16462 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
16464 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
16465 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
16467 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
16468 a string. Handle both cases.
16469 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
16470 (Fdbus_register_method): Use Qinvalid_function.
16472 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
16474 * makefile.w32-in: Update dependencies.
16475 (LISP_H): Add inttypes.h and stdin.h.
16476 (PROCESS_H): Add unistd.h.
16478 2011-05-06 Eli Zaretskii <eliz@gnu.org>
16480 * lread.c: Include limits.h (fixes the MS-Windows build broken by
16481 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
16483 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
16485 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
16487 * term.c (vfatal): Remove stray call to va_end.
16488 It's not needed and the C Standard doesn't allow it here anyway.
16490 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
16491 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
16493 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
16496 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
16498 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
16500 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
16502 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
16504 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
16506 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
16507 * charset.c (Fdefine_charset_internal): Don't initialize
16508 charset.code_space[15]. The value was garbage, on hosts with
16509 32-bit int (Bug#8600).
16511 * lread.c (read_integer): Be more consistent with string-to-number.
16512 Use string_to_number to do the actual conversion; this avoids
16513 rounding errors and fixes some other screwups. Without this fix,
16514 for example, #x1fffffffffffffff was misread as -2305843009213693952.
16515 (digit_to_number): Move earlier, for benefit of read_integer.
16516 Return -1 if the digit is out of range for the base, -2 if it is
16517 not a digit in any supported base. (Bug#8602)
16519 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
16521 * dispnew.c (scrolling_window): Return 1 if we scrolled,
16522 to match comment at start of function. This also removes a
16523 GCC warning about overflow in a 32+64-bit port.
16525 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
16527 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
16528 Reported by Stefan Monnier in
16529 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
16530 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16531 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
16533 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
16534 (EMACS_UINTPTR): Likewise, with uintptr_t.
16536 * lisp.h: Prefer 64-bit EMACS_INT if available.
16537 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
16538 on 32-bit hosts that have 64-bit int, so that they can access
16540 However, temporarily disable this change unless the temporary
16541 symbol WIDE_EMACS_INT is defined.
16543 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
16545 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
16546 This removes an assumption that EMACS_INT and long are the same
16547 width as pointers. The assumption is true for Emacs porting targets
16548 now, but we want to make other targets possible.
16549 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
16550 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
16551 In the rest of the code, change types of integers that hold casted
16552 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
16553 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
16554 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
16555 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
16556 No need to cast type when ORing.
16557 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
16558 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
16559 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
16560 assume EMACS_INT is the same width as char *.
16561 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
16562 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
16563 Remove no-longer-needed casts.
16564 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
16565 (xg_tool_bar_help_callback, xg_make_tool_item):
16566 Use EMACS_INTPTR to hold an integer
16567 that will be cast to void *; this can avoid a GCC warning
16568 if EMACS_INT is not the same width as void *.
16569 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
16570 * xdisp.c (display_echo_area_1, resize_mini_window_1):
16571 (current_message_1, set_message_1):
16572 Use a local to convert to proper width without a cast.
16573 * xmenu.c (dialog_selection_callback): Likewise.
16575 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
16576 Also, don't assume VALBITS / RAND_BITS is less than 5,
16577 and don't rely on undefined behavior when shifting a 1 left into
16579 * lisp.h (get_random): Change signature to match.
16581 * lread.c (hash_string): Use size_t, not int, for hash computation.
16582 Normally we prefer signed values; but hashing is special, because
16583 it's better to use unsigned division on hash table sizes so that
16584 the remainder is nonnegative. Also, size_t is the natural width
16585 for hashing into memory. The previous code used 'int', which doesn't
16586 retain enough info to hash well into very large tables.
16587 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
16589 * dbusbind.c: Don't possibly lose pointer info when converting.
16590 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
16591 Use XPNTR rather than XHASH, so that the high-order bits of
16592 the pointer aren't lost when converting through void *.
16594 * eval.c (Fautoload): Don't double-shift a pointer.
16596 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
16598 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
16600 * gnutls.c (DEF_GNUTLS_FN):
16601 * image.c (DEF_IMGLIB_FN): Make function pointers static.
16603 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
16605 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
16608 2011-05-05 Eli Zaretskii <eliz@gnu.org>
16610 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
16611 New version that can reserve upto 2GB of heap space.
16613 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
16615 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
16617 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
16619 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
16620 `gnutls_certificate_set_x509_key_file'.
16622 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
16624 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
16625 Update dependencies.
16627 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16629 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
16630 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
16631 Remove unused parameter `fildes'.
16632 * process.c (read_process_output, send_process): Don't pass it.
16634 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16636 Fix previous change: the library cache is defined in w32.c.
16637 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
16638 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
16640 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
16642 Implement dynamic loading of GnuTLS on Windows.
16644 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
16645 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
16646 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16649 * gnutls.c (Qgnutls_dll): Define.
16650 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
16651 (gnutls_*): Declare function pointers.
16652 (init_gnutls_functions): New function to initialize function pointers.
16653 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
16654 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
16655 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
16656 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
16657 (emacs_gnutls_write, emacs_gnutls_read)
16658 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
16659 (Fgnutls_available_p): New function.
16660 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
16661 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
16662 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
16664 * image.c: Include w32.h.
16665 (Vimage_type_cache): Delete.
16666 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
16667 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
16668 (w32_delayed_load): Move to w32.c.
16670 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
16672 * w32.c (QCloaded_from, Vlibrary_cache): Define.
16673 (w32_delayed_load): Move from image.c. When loading a library, record
16674 its filename in the :loaded-from property of the library id.
16675 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
16676 Initialize and staticpro them.
16677 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
16679 * process.c: Include lisp.h before w32.h, not after.
16680 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
16681 instead of gnutls_record_check_pending.
16683 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
16685 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
16687 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
16688 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
16691 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
16693 * xterm.c (x_set_frame_alpha): Do not set property on anything
16694 else than FRAME_X_OUTER_WINDOW (Bug#8608).
16696 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
16698 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
16700 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
16702 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
16703 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
16704 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
16705 (gnutls_global_initialized, Qgnutls_bootprop_priority)
16706 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
16707 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
16708 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
16709 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
16710 (Qgnutls_bootprop_callbacks_verify): Make static.
16712 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
16714 * callproc.c: Indentation fixup.
16716 * sysdep.c (wait_for_termination_1): Make static.
16717 (wait_for_termination, interruptible_wait_for_termination):
16718 Move after wait_for_termination_1.
16720 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
16722 * sysdep.c (interruptible_wait_for_termination): New function
16723 which is like wait_for_termination, but allows keyboard
16726 * callproc.c (Fcall_process): Add (:file "file") as an option for
16728 (Fcall_process_region): Ditto.
16730 2011-04-30 Eli Zaretskii <eliz@gnu.org>
16732 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
16733 rather than `XVECTOR (FOO)->size'.
16735 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
16736 inttypes.h, as a gnulib replacement is used if it not available in
16739 2011-04-21 Eli Zaretskii <eliz@gnu.org>
16741 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
16742 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
16743 of MOST_POSITIVE_FIXNUM. (Bug#8528)
16745 * coding.c (coding_alloc_by_realloc): Error out if destination
16746 will grow beyond MOST_POSITIVE_FIXNUM.
16747 (decode_coding_emacs_mule): Abort if there isn't enough place in
16748 charbuf for the composition carryover bytes. Reserve an extra
16749 space for up to 2 characters produced in a loop.
16750 (decode_coding_iso_2022): Abort if there isn't enough place in
16751 charbuf for the composition carryover bytes.
16753 2011-04-21 Eli Zaretskii <eliz@gnu.org>
16755 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
16756 aborting when %lld or %lll format is passed.
16757 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
16758 %llo or %llx format is passed. (Bug#8545)
16760 * window.c (window_scroll_line_based): Use a marker instead of
16761 simple variables to record original value of point. (Bug#7952)
16763 * doprnt.c (doprnt): Fix the case where a multibyte sequence
16764 produced by %s or %c overflows available buffer space. (Bug#8545)
16766 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
16768 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
16769 (SIZE_MAX): Move defn after all includes, as they might #define it.
16771 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16773 * w32.c (init_environment): Warn about defaulting HOME to C:\.
16775 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16777 * keyboard.c (Qdelayed_warnings_hook): Define.
16778 (command_loop_1): Run `delayed-warnings-hook'
16779 if Vdelayed_warnings_list is non-nil.
16780 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
16781 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
16783 2011-04-28 Eli Zaretskii <eliz@gnu.org>
16785 * doprnt.c (doprnt): Don't return value smaller than the buffer
16786 size if the message was truncated. (Bug#8545).
16788 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
16790 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
16791 (Fx_window_property): #if-0 the whole functions, not just the bodies.
16793 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16795 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
16797 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
16799 * makefile.w32-in: Update dependencies.
16801 2011-04-27 Eli Zaretskii <eliz@gnu.org>
16803 Improve `doprnt' and its usage. (Bug#8545)
16804 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
16805 `format_end'. Remove support for %l as a conversion specifier.
16806 Don't use xrealloc. Improve diagnostics when the %l size modifier
16807 is used. Update the commentary.
16809 * eval.c (verror): Simplify calculation of size_t.
16811 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
16814 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
16816 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
16819 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
16821 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
16822 This makes this file independent of the recent pseudovector change.
16824 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
16826 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
16828 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
16829 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
16830 Remove unused local.
16831 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
16833 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
16834 GCC 4.6.0 optimizes based on type-based alias analysis.
16835 For example, if b is of type struct buffer * and v of type struct
16836 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
16837 != &v->size, and therefore "v->size = 1; b->size = 2; return
16838 v->size;" must therefore return 1. This assumption is incorrect
16839 for Emacs, since it type-puns struct Lisp_Vector * with many other
16840 types. To fix this problem, this patch adds a new type struct
16841 vectorlike_header that documents the constraints on layout of vectors
16842 and pseudovectors, and helps optimizing compilers not get fooled
16843 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
16844 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
16845 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
16847 (XSETPVECTYPE): Rewrite in terms of new macro.
16848 (XSETPVECTYPESIZE): New macro, specifying both type and size.
16849 This is a bit clearer, and further avoids the possibility of
16850 undesirable aliasing.
16851 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
16852 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
16853 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
16854 since Lisp_Subr is a special case (no "next" field).
16855 (ASIZE): Now uses header.size rather than size.
16856 All previous uses of XVECTOR (foo)->size replaced to use this macro,
16857 to avoid the hassle of writing XVECTOR (foo)->header.size.
16858 (struct vectorlike_header): New type.
16859 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
16860 object, to help avoid aliasing.
16861 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
16862 (SUBRP): Likewise, since Lisp_Subr is a special case.
16863 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
16864 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
16865 (struct Lisp_Hash_Table): Combine first two members into a single
16866 struct vectorlike_header member. All uses of "size" and "next" members
16867 changed to be "header.size" and "header.next".
16868 * buffer.h (struct buffer): Likewise.
16869 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
16870 * frame.h (struct frame): Likewise.
16871 * process.h (struct Lisp_Process): Likewise.
16872 * termhooks.h (struct terminal): Likewise.
16873 * window.c (struct save_window_data, struct saved_window): Likewise.
16874 * window.h (struct window): Likewise.
16875 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
16876 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
16877 * buffer.c (init_buffer_once): Likewise.
16878 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
16880 * process.c (Fformat_network_address): Use local var for size,
16883 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
16885 Make the Lisp reader and string-to-float more consistent (Bug#8525)
16886 * data.c (atof): Remove decl; no longer used or needed.
16887 (digit_to_number): Move to lread.c.
16888 (Fstring_to_number): Use new string_to_number function, to be
16889 consistent with how the Lisp reader treats infinities and NaNs.
16890 Do not assume that floating-point numbers represent EMACS_INT
16891 without losing information; this is not true on most 64-bit hosts.
16892 Avoid double-rounding errors, by insisting on integers when
16893 parsing non-base-10 numbers, as the documentation specifies.
16894 * lisp.h (string_to_number): New decl, replacing ...
16895 (isfloat_string): Remove.
16896 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
16897 (read1): Do not accept +. and -. as integers; this
16898 appears to have been a coding error. Similarly, do not accept
16899 strings like +-1e0 as floating point numbers. Do not report
16900 overflow for integer overflows unless the base is not 10 which
16901 means we have no simple and reliable way to continue.
16902 Break out the floating-point parsing into a new
16903 function string_to_number, so that Fstring_to_number parses
16904 floating point numbers consistently with the Lisp reader.
16905 (digit_to_number): Move here from data.c. Make it static inline.
16906 (E_CHAR, EXP_INT): Remove, replacing with ...
16907 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
16908 (string_to_number): New function, replacing isfloat_string.
16909 This function checks for valid syntax and produces the resulting
16910 Lisp float number too. Rework it so that string-to-number
16911 no longer mishandles examples like "1.0e+". Use strtoumax,
16912 so that overflow for non-base-10 numbers is reported only when
16913 there's no portable and simple way to convert to floating point.
16915 * textprop.c (set_text_properties_1): Rewrite for clarity,
16916 and to avoid GCC warning about integer overflow.
16918 * intervals.h (struct interval): Use EMACS_INT for members
16919 where EMACS_UINT might cause problems. See
16920 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
16921 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
16922 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
16924 (offset_intervals): Tell GCC not to worry about length overflow
16925 when negating a negative length.
16927 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
16928 (overrun_check_free): Likewise.
16930 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
16931 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
16934 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16935 (gnutls_make_error): Rename local to avoid shadowing.
16936 (gnutls_emacs_global_deinit): ifdef out; not used.
16937 (Fgnutls_boot): Use const for pointer to readonly storage.
16938 Comment out unused local. Fix pointer signedness problems.
16940 * lread.c (openp): Don't stuff size_t into an 'int'.
16941 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
16942 about possible signed overflow.
16944 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
16945 (GDK_KEY_g): Don't define if already defined.
16946 (xg_prepare_tooltip): Avoid pointer signedness problem.
16947 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
16949 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
16950 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
16952 * xfns.c (Fx_window_property): Simplify a bit,
16953 to make a bit faster and to avoid GCC 4.6.0 warning.
16954 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
16956 * fns.c (internal_equal): Don't assume size_t fits in int.
16958 * alloc.c (compact_small_strings): Tighten assertion a little.
16960 Replace pEd with more-general pI, and fix some printf arg casts.
16961 * lisp.h (pI): New macro, generalizing old pEd macro to other
16962 conversion specifiers. For example, use "...%"pI"d..." rather
16963 than "...%"pEd"...".
16964 (pEd): Remove. All uses replaced with similar uses of pI.
16965 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
16966 * alloc.c (check_pure_size): Don't overflow by converting size to int.
16967 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
16968 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
16969 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
16970 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
16971 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
16973 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
16974 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
16975 * print.c (safe_debug_print, print_object): Likewise.
16976 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
16978 Use pI instead of if-then-else-abort. Use %p to avoid casts,
16979 avoiding the 0 flag, which is not portable.
16980 * process.c (Fmake_network_process): Use pI to avoid cast.
16981 * region-cache.c (pp_cache): Likewise.
16982 * xdisp.c (decode_mode_spec): Likewise.
16983 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
16984 behavior on 64-bit hosts with printf arg.
16985 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
16986 (x_stop_queuing_selection_requests): Likewise.
16987 (x_get_window_property): Don't truncate byte count to an 'int'
16990 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
16991 here, since it parses constructs like leading '-' and spaces,
16992 which are not wanted; and it overflows with large numbers.
16993 Instead, simply match F[0-9]+, which is what is wanted anyway.
16995 * alloc.c: Remove unportable assumptions about struct layout.
16996 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
16997 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
16998 (allocate_vectorlike, make_pure_vector): Use the new macros,
16999 plus offsetof, to remove unportable assumptions about struct layout.
17000 These assumptions hold on all porting targets that I know of, but
17001 they are not guaranteed, they're easy to remove, and removing them
17002 makes further changes easier.
17004 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
17005 This doesn't fix a bug but makes the code clearer.
17006 (string_overrun_cookie): Now const. Use initializers that
17007 don't formally overflow signed char, to avoid warnings.
17008 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
17009 can cause Emacs to crash when string overrun checking is enabled.
17010 (allocate_buffer): Don't assume sizeof (struct buffer) is a
17011 multiple of sizeof (EMACS_INT); it need not be, if
17012 alignof(EMACS_INT) < sizeof (EMACS_INT).
17013 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
17015 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
17017 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
17019 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
17021 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
17022 supposed to be handshaking. (Bug#8556)
17023 Reported by Paul Eggert <eggert@cs.ucla.edu>.
17025 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
17027 * lisp.h (Qdebug): List symbol.
17028 * eval.c (Qdebug): Restore global linkage.
17029 * keyboard.c (debug-on-event): New variable.
17030 (handle_user_signal): Break into debugger when debug-on-event
17031 matches the current signal symbol.
17033 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
17035 * alloc.c (check_sblock, check_string_bytes)
17036 (check_string_free_list): Convert to standard C.
17038 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
17040 * w32.c (emacs_gnutls_push): Fix typo.
17042 2011-04-25 Eli Zaretskii <eliz@gnu.org>
17044 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
17045 "cast to pointer from integer of different size".
17047 Improve doprnt and its use in verror. (Bug#8545)
17048 * doprnt.c (doprnt): Document the set of format control sequences
17049 supported by the function. Use SAFE_ALLOCA instead of always
17052 * eval.c (verror): Don't limit the buffer size at size_max-1, that
17053 is one byte too soon. Don't use xrealloc; instead xfree and
17056 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
17058 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
17061 * gnutls.c: Renamed global_initialized to
17062 gnutls_global_initialized. Added internals for the
17063 :verify-hostname-error, :verify-error, and :verify-flags
17064 parameters of `gnutls-boot' and documented those parameters in the
17065 docstring. Start callback support.
17066 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
17067 unless a fatal error occurred. Call gnutls_alert_send_appropriate
17068 on error. Return error code.
17069 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
17070 (emacs_gnutls_read): Likewise.
17071 (Fgnutls_boot): Return handshake error code.
17072 (emacs_gnutls_handle_error): New function.
17073 (wsaerror_to_errno): Likewise.
17075 * w32.h (emacs_gnutls_pull): Add prototype.
17076 (emacs_gnutls_push): Likewise.
17078 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
17079 (emacs_gnutls_push): Likewise.
17081 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
17083 * process.c (wait_reading_process_output): Check if GnuTLS
17084 buffered some data internally if no FDs are set for TLS
17087 * makefile.w32-in (OBJ2): Add gnutls.$(O).
17088 (LIBS): Link to USER_LIBS.
17089 ($(BLD)/gnutls.$(0)): New target.
17091 2011-04-24 Eli Zaretskii <eliz@gnu.org>
17093 * xdisp.c (handle_single_display_spec): Rename the
17094 display_replaced_before_p argument into display_replaced_p, to
17095 make it consistent with the commentary. Fix typos in the
17098 * textprop.c (syms_of_textprop): Remove dead code.
17099 (copy_text_properties): Delete obsolete commentary about an
17100 interface that was deleted long ago. Fix typos in the description
17103 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
17104 to changes in oldXMenu/XMenu.h from 2011-04-16.
17105 <menu_help_message, prev_menu_help_message>: Constify.
17106 (IT_menu_make_room): menu->help_text is now `const char **';
17109 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
17110 to changes in oldXMenu/XMenu.h from 2011-04-16.
17111 (struct XMenu): Declare `help_text' `const char **'.
17113 * xfaces.c <Qunspecified>: Make extern again.
17115 * syntax.c: Include sys/types.h before including regex.h, as
17118 * doc.c (get_doc_string): Improve the format passed to `error'.
17120 * doprnt.c (doprnt): Improve commentary.
17122 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
17124 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
17127 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
17128 changes in globals.h immediately force recompilation.
17129 (TAGS): Depend on $(CURDIR)/m/intel386.h and
17130 $(CURDIR)/s/ms-w32.h.
17131 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
17133 * character.c (Fchar_direction): Function deleted.
17134 (syms_of_character): Don't defsubr it.
17135 <char-direction-table>: Deleted.
17137 2011-04-23 Eli Zaretskii <eliz@gnu.org>
17139 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
17140 * doprnt.c: Include limits.h.
17141 (SIZE_MAX): New macro.
17142 (doprnt): Return a size_t value. 2nd arg is now size_t.
17143 Many local variables are now size_t instead of int or unsigned.
17144 Improve overflow protection. Support `l' modifier for integer
17145 conversions. Support %l conversion. Don't assume an EMACS_INT
17146 argument for integer conversions and for %c.
17148 * lisp.h (doprnt): Restore prototype.
17150 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
17151 $(SRC)/character.h.
17153 * Makefile.in (base_obj): Add back doprnt.o.
17155 * deps.mk (doprnt.o): Add back prerequisites.
17156 (callint.o): Depend on character.h.
17158 * eval.c (internal_lisp_condition_case): Include the handler
17159 representation in the error message.
17160 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
17161 when breaking from the loop.
17163 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
17165 * callint.c (Fcall_interactively): When displaying error message
17166 about invalid control letter, pass the character's codepoint, not
17167 a pointer to its multibyte form. Improve display of the character
17168 in octal and display also its hex code.
17170 * character.c (char_string): Use %x to display the (unsigned)
17171 codepoint of an invalid character, to avoid displaying a bogus
17174 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
17175 `error', not SYMBOL_NAME itself.
17177 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
17178 character arguments to `error'.
17180 * charset.c (check_iso_charset_parameter): Fix incorrect argument
17181 to `error' in error message about FINAL_CHAR argument. Make sure
17182 FINAL_CHAR is a character, and use %c when it is passed as
17183 argument to `error'.
17185 2011-04-23 Eli Zaretskii <eliz@gnu.org>
17187 * s/ms-w32.h (localtime): Redirect to sys_localtime.
17189 * w32.c: Include <time.h>.
17190 (sys_localtime): New function.
17192 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
17194 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
17196 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
17198 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
17200 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
17201 zombies (Bug#8467).
17203 2011-04-19 Eli Zaretskii <eliz@gnu.org>
17205 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
17206 gl_state.e_property when gl_state.object is Qt.
17208 * insdel.c (make_gap_larger): Remove limitation of buffer size
17211 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
17213 * xdisp.c (lookup_glyphless_char_display)
17214 (produce_glyphless_glyph): Handle cons cell entry in
17215 glyphless-char-display.
17216 (Vglyphless_char_display): Document it.
17218 * term.c (produce_glyphless_glyph): Handle cons cell entry in
17219 glyphless-char-display.
17221 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
17223 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
17225 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
17227 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
17228 definition for no-X builds.
17230 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
17232 Static checks with GCC 4.6.0 and non-default toolkits.
17234 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
17236 * process.c (keyboard_bit_set): Define only if SIGIO.
17237 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
17238 (send_process): Repair possible setjmp clobbering.
17240 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
17242 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
17244 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
17246 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
17247 Define only if needed.
17249 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
17250 by pacifying GCC about it. Maybe it's time to retire it?
17251 * xfaces.c (USG, __TIMEVAL__): Likewise.
17253 * dispextern.h (struct redisplay_interface): Rename param
17254 to avoid shadowing.
17255 * termhooks.h (struct terminal): Likewise.
17256 * xterm.c (xembed_send_message): Likewise.
17258 * insdel.c (make_gap_smaller): Define only if
17259 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
17261 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
17264 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
17265 so that we aren't warned about unused symbols.
17267 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
17269 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
17271 * xfns.c (x_real_positions): Mark locals as initialized.
17273 * xmenu.c (xmenu_show): Don't use uninitialized vars.
17275 * xterm.c: Fix problems found by static analysis with other toolkits.
17276 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
17277 (x_dispatch_event): Declare static if USE_GTK, and
17278 define if USE_GTK || USE_X_TOOLKIT.
17279 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
17280 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
17281 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
17282 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
17284 * xmenu.c (menu_help_callback): Pointer type fixes.
17285 Use const pointers when pointing at readonly data. Avoid pointer
17286 signedness clashes.
17287 (FALSE): Remove unused macro.
17288 (update_frame_menubar): Remove unused decl.
17290 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
17292 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
17293 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
17294 (single_menu_item): Rename local to avoid shadowing.
17296 * keyboard.c (make_lispy_event): Remove unused local var.
17298 * frame.c, frame.h (x_get_resource_string): Bring this back, but
17299 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
17301 * bitmaps: Change bitmaps from unsigned char back to the X11
17302 compatible char. Avoid the old compiler warnings about
17303 out-of-range initializers by using, for example, '\xab' rather
17306 * xgselect.c (xgselect_initialize): Check vs interface
17307 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
17309 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
17311 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
17312 to read-only memory.
17314 * fns.c (vector): Remove; this old hack is no longer needed.
17316 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
17318 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
17320 * xrdb.c (x_load_resources): Omit unused local.
17322 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
17323 (x_window): Rename locals to avoid shadowing.
17324 (USG): Use the kludged USG macro, to pacify gcc.
17326 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
17327 (x_term_init): Remove local to avoid shadowing.
17329 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
17331 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
17332 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
17334 2011-04-16 Eli Zaretskii <eliz@gnu.org>
17336 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
17338 Fix regex.c, syntax.c and friends for buffers > 2GB.
17339 * syntax.h (struct gl_state_s): Declare character position members
17342 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
17344 * textprop.c (verify_interval_modification, interval_of):
17345 Declare arguments EMACS_INT.
17347 * intervals.c (adjust_intervals_for_insertion): Declare arguments
17350 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
17352 * indent.c (Fvertical_motion): Local variable it_start is now
17355 * regex.c (re_match, re_match_2, re_match_2_internal)
17356 (bcmp_translate, regcomp, regexec, print_double_string)
17357 (group_in_compile_stack, re_search, re_search_2, regex_compile)
17358 (re_compile_pattern, re_exec): Declare arguments and local
17359 variables `size_t' and `ssize_t' and return values `regoff_t', as
17361 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
17362 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
17363 <compile_stack_type>: `size' and `avail' are now `size_t'.
17365 * regex.h <regoff_t>: Use ssize_t, not int.
17366 (re_search, re_search_2, re_match, re_match_2): Arguments that
17367 specify buffer/string position and length are now ssize_t and
17368 size_t. Return type is regoff_t.
17370 2011-04-16 Ben Key <bkey76@gmail.com>
17372 * nsfont.m: Fixed bugs in ns_get_family and
17373 ns_descriptor_to_entity that were caused by using free to
17374 deallocate memory blocks that were allocated by xmalloc (via
17375 xstrdup). This caused Emacs to crash when compiled with
17376 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
17377 --enable-checking=xmallocoverrun). xfree is now used to
17378 deallocate these memory blocks.
17380 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
17382 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
17384 emacs_write: Accept and return EMACS_INT for sizes.
17385 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
17387 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
17388 Accept and return EMACS_INT.
17389 (emacs_gnutls_write): Return the number of bytes written on
17391 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
17392 (emacs_read, emacs_write): Remove check for negative size, as the
17393 Emacs source code has been audited now.
17394 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
17395 (emacs_read, emacs_write): Use it.
17396 * process.c (send_process): Adjust to the new signatures of
17397 emacs_write and emacs_gnutls_write. Do not attempt to store
17398 a byte offset into an 'int'; it might overflow.
17399 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
17401 * sound.c: Don't assume sizes fit in 'int'.
17402 (struct sound_device.period_size, alsa_period_size):
17403 Return EMACS_INT, not int.
17404 (struct sound_device.write, vox_write, alsa_write):
17405 Accept EMACS_INT, not int.
17406 (wav_play, au_play): Use EMACS_INT to store sizes and to
17407 record read return values.
17409 2011-04-15 Ben Key <bkey76@gmail.com>
17411 * keyboard.c (Qundefined): Don't declare static since it is used
17413 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
17414 static since they are used in nsfont.m.
17416 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
17418 * process.c (Qprocessp): Don't declare static.
17419 * lisp.h (Qprocessp): Declare again.
17421 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
17423 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
17425 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
17427 Improve C-level modularity by making more things 'static'.
17429 Don't publish debugger-only interfaces to other modules.
17430 * lisp.h (safe_debug_print, debug_output_compilation_hack):
17431 (verify_bytepos, count_markers): Move decls to the only modules
17433 * region-cache.h (pp_cache): Likewise.
17434 * window.h (check_all_windows): Likewise.
17435 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
17437 * sysdep.c (croak): Now static, if
17438 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
17439 * syssignal.h (croak): Declare only if not static.
17441 * alloc.c (refill_memory_reserve): Now static if
17442 !defined REL_ALLOC || defined SYSTEM_MALLOC.
17443 * lisp.h (refill_memory_reserve): Declare only if not static.
17445 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
17446 Define only if USE_LUCID.
17448 * xrdb.c (x_customization_string, x_rm_string): Now static.
17450 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
17451 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
17453 * xdisp.c (draw_row_with_mouse_face): Now static.
17454 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
17456 * window.h (check_all_windows): Mark externally visible.
17458 * window.c (window_deletion_count): Now static.
17460 * undo.c: Make symbols static if they're not exported.
17461 (last_undo_buffer, last_boundary_position, pending_boundary):
17464 * textprop.c (interval_insert_behind_hooks): Now static.
17465 (interval_insert_in_front_hooks): Likewise.
17467 * term.c: Make symbols static if they're not exported.
17468 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
17469 (max_frame_lines, tty_set_terminal_modes):
17470 (tty_reset_terminal_modes, tty_turn_off_highlight):
17471 (get_tty_terminal): Now static.
17472 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
17473 * termhooks.h (term_mouse_moveto): Do not declare if
17474 HAVE_WINDOW_SYSTEM.
17475 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
17476 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
17478 * sysdep.c: Make symbols static if they're not exported.
17479 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
17481 (sigprocmask_set, full_mask): Remove; unused.
17482 (wait_debugging): Mark as visible.
17483 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
17484 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
17486 * syntax.c (syntax_temp): Define only if !__GNUC__.
17488 * sound.c (current_sound_device, current_sound): Now static.
17490 * search.c (searchbufs, searchbuf_head): Now static.
17492 * scroll.c (scroll_cost): Remove; unused.
17493 * dispextern.h (scroll_cost): Remove decl.
17495 * region-cache.h (pp_cache): Mark as externally visible.
17497 * process.c: Make symbols static if they're not exported.
17498 (process_tick, update_tick, create_process, chan_process):
17499 (Vprocess_alist, proc_buffered_char, datagram_access):
17500 (fd_callback_data, send_process_frame, process_sent_to): Now static.
17501 (deactivate_process): Mark defn as static, as well as decl.
17502 * lisp.h (create_process): Remove decl.
17503 * process.h (chan_process, Vprocess_alist): Remove decls.
17505 * print.c: Make symbols static if they're not exported.
17506 (print_depth, new_backquote_output, being_printed, print_buffer):
17507 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
17508 (print_interval, print_number_index, initial_stderr_stream):
17510 * lisp.h (Fprinc): Remove decl.
17511 (debug_output_compilation_hack): Mark as externally visible.
17513 * sysdep.c (croak): Move decl from here to syssignal.h.
17514 * syssignal.h (croak): Put it here, so the API can be checked when
17515 'croak' is called from dissociate_if_controlling_tty.
17517 * minibuf.c: Make symbols static if they're not exported.
17518 (minibuf_save_list, choose_minibuf_frame): Now static.
17519 * lisp.h (choose_minibuf_frame): Remove decl.
17521 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
17523 * lread.c: Make symbols static if they're not exported.
17524 (read_objects, initial_obarray, oblookup_last_bucket_number):
17526 (make_symbol): Remove; unused.
17527 * lisp.h (initial_obarray, make_symbol): Remove decls.
17529 * keyboard.c: Make symbols static if they're not exported.
17530 (single_kboard, recent_keys_index, total_keys, recent_keys):
17531 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
17532 (this_single_command_key_start, echoing, last_auto_save):
17533 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
17534 (command_loop, echo_now, keyboard_init_hook, help_char_p):
17535 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
17536 (Vlispy_mouse_stem, double_click_count):
17538 (force_auto_save_soon): Define only if SIGDANGER.
17539 (ignore_mouse_drag_p): Now static if
17540 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
17541 (print_help): Remove; unused.
17542 (stop_character, last_timer_event): Mark as externally visible.
17543 * keyboard.h (ignore_mouse_drag_p): Declare only if
17544 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
17545 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
17546 * lisp.h (echoing): Remove decl.
17547 (force_auto_save_soon): Declare only if SIGDANGER.
17548 * xdisp.c (redisplay_window): Simplify code, to make it more
17549 obvious that ignore_mouse_drag_p is not accessed if !defined
17550 USE_GTK && !defined HAVE_NS.
17552 * intervals.c: Make symbols static if they're not exported.
17553 (merge_properties_sticky, merge_interval_right, delete_interval):
17555 * intervals.h (merge_interval_right, delete_interval): Remove decls.
17557 * insdel.c: Make symbols static if they're not exported.
17558 However, leave prepare_to_modify_buffer alone. It's never
17559 called from outside this function, but that appears to be a bug.
17560 (combine_after_change_list, combine_after_change_buffer):
17561 (adjust_after_replace, signal_before_change): Now static.
17562 (adjust_after_replace_noundo): Remove; unused.
17563 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
17564 (signal_before_change): Remove decls.
17566 * indent.c (val_compute_motion, val_vmotion): Now static.
17568 * image.c: Make symbols static if they're not exported.
17569 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
17571 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
17572 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
17574 * fringe.c (standard_bitmaps): Now static.
17575 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
17577 * frame.c: Make symbols static if they're not exported.
17578 (x_report_frame_params, make_terminal_frame): Now static.
17579 (get_frame_param): Now static, unless HAVE_NS.
17580 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
17581 (x_get_resource_string): Remove; not used.
17582 * frame.h (make_terminal_frame, x_report_frame_params):
17583 (x_get_resource_string); Remove decls.
17584 (x_fullscreen_adjust): Declare only if WINDOWSNT.
17585 * lisp.h (get_frame_param): Declare only if HAVE_NS.
17587 * font.c, fontset.c: Make symbols static if they're not exported.
17588 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
17589 (FACE_SUITABLE_FOR_CHAR_P): Use it.
17590 * font.c (font_close_object): Now static.
17591 * font.h (font_close_object): Remove.
17592 * fontset.c (FONTSET_OBJLIST): Remove.
17593 (free_realized_fontset) #if-0 the body, which does nothing.
17594 (face_suitable_for_char_p): #if-0, as it's never called.
17595 * fontset.h (face_suitable_for_char_p): Remove decl.
17596 * xfaces.c (face_at_string_position):
17597 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
17598 since 0 is always ASCII.
17600 * fns.c (weak_hash_tables): Now static.
17602 * fileio.c: Make symbols static if they're not exported.
17603 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
17604 (Vwrite_region_annotation_buffers): Now static.
17606 * eval.c: Make symbols static if they're not exported.
17607 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
17608 * lisp.h (backtrace_list): Remove decl.
17610 * emacs.c: Make symbols static if they're not exported.
17611 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
17612 (fatal_error_code, fatal_error_signal_hook, standard_args):
17614 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
17615 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
17616 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
17617 * lisp.h (fatal_error_signal_hook): Remove decl.
17618 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
17620 * editfns.c: Move a (normally-unused) function to its only use.
17621 * editfns.c, lisp.h (get_operating_system_release): Remove.
17622 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
17623 worth the hassle of breaking this out.
17625 * xterm.c: Make symbols static if they're not exported.
17626 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
17627 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
17628 (x_destroy_window, x_delete_display):
17630 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
17631 (x_mouse_leave): Remove; unused.
17632 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
17633 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
17634 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
17636 (x_mouse_leave): Declare only if WINDOWSNT.
17637 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
17638 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
17641 * ftxfont.c: Make symbols static if they're not exported.
17642 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
17644 * font.h (ftxfont_driver): Likewise.
17646 * xfns.c: Make symbols static if they're not exported.
17647 (x_last_font_name, x_display_info_for_name):
17648 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
17649 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
17650 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
17651 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
17652 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
17653 (last_show_tip_args): Now static.
17654 (xic_defaut_fontset, xic_create_fontsetname): Define only if
17655 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
17656 (x_screen_planes): Remove; unused.
17657 * dispextern.h (x_screen_planes): Remove decl.
17659 * dispnew.c: Make symbols static if they're not exported.
17660 * dispextern.h (redraw_garbaged_frames, scrolling):
17661 (increment_row_positions): Remove.
17662 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
17663 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
17665 (redraw_garbaged_frames): Remove; unused.
17667 * xfaces.c: Make symbols static if they're not exported.
17668 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
17670 * xterm.h (defined_color): Remove decls.
17671 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
17672 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
17673 (menu_face_changed_default, defined_color, free_realized_face):
17674 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
17675 (ascii_face_of_lisp_face): Remove; unused.
17677 * xdisp.c: Make symbols static if they're not exported.
17678 * dispextern.h (scratch_glyph_row, window_box_edges):
17679 (glyph_to_pixel_coords, set_cursor_from_row):
17680 (get_next_display_element, set_iterator_to_next):
17681 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
17682 (show_mouse_face): Remove decls
17683 * frame.h (message_buf_print): Likewise.
17684 * lisp.h (pop_message, set_message, check_point_in_composition):
17686 * xterm.h (set_vertical_scroll_bar): Likewise.
17687 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
17688 (message_buf_print, scratch_glyph_row, displayed_buffer):
17689 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
17690 (get_next_display_element, show_mouse_face, window_box_edges):
17691 (frame_to_window_pixel_xy, check_point_in_composition):
17692 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
17693 (glyph_to_pixel_coords): Remove; unused.
17695 * dired.c (file_name_completion): Now static.
17697 * dbusbind.c (xd_in_read_queued_messages): Now static.
17699 * lisp.h (circular_list_error, FOREACH): Remove; unused.
17700 * data.c (circular_list_error): Remove.
17702 * commands.h (last_point_position, last_point_position_buffer):
17703 (last_point_position_window): Remove decls.
17704 * keyboard.c: Make these variables static.
17706 * coding.h (coding, code_convert_region, encode_coding_gap):
17708 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
17709 (iso_code_class, detect_coding, code_convert_region): Now static.
17710 (encode_coding_gap): Remove; unused.
17712 * chartab.c (chartab_chars, chartab_bits): Now static.
17714 * charset.h (charset_iso_8859_1): Remove decl.
17715 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
17718 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
17719 * ccl.c (Vccl_program_table): Now static.
17720 (check_ccl_update): Remove; unused.
17722 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
17723 * category.h: ... from here.
17724 * category.c (check_category_table, set_category_set): Now static.
17726 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
17727 * lisp.h: Remove these decls.
17729 * buffer.c (buffer_count): Remove unused var.
17731 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
17732 so that it's not optimized away.
17733 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
17734 * dispextern.h (bidi_dump_cached_states): Remove, since it's
17735 exported only to the debugger.
17737 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
17738 * atimer.h (run_all_atimers): Remove; not exported.
17740 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
17741 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
17742 was inaccessible from Lisp.
17743 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
17744 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
17746 alloc.c: Import and export fewer symbols, and remove unused items.
17747 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
17749 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
17750 it's not optimized away by whole-program optimization.
17751 (message_enable_multibyte, free_misc): Remove.
17752 (catchlist, handlerlist, mark_backtrace):
17753 Declare only if BYTE_MARK_STACK.
17754 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
17755 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
17756 (message_enable_multibyte): Remove decl.
17757 (free_misc, interval_free_list, float_block, float_block_index):
17758 (n_float_blocks, float_free_list, cons_block, cons_block_index):
17759 (cons_free_list, last_marked_index):
17761 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
17762 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
17763 (mark_backtrace): Define only if BYTE_MARK_STACK.
17764 * xdisp.c (message_enable_multibyte): Now static.
17766 Declare Lisp_Object Q* variables to be 'static' if not exported.
17767 This makes it easier for human readers (and static analyzers)
17768 to see whether these variables are used from other modules.
17769 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
17770 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
17771 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
17772 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
17773 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
17774 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
17775 * xmenu.c, xselect.c:
17776 Declare Q* vars static if they are not used in other modules.
17777 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
17778 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
17779 Remove decls of unexported vars.
17780 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
17782 * lisp.h (DEFINE_FUNC): Make sname 'static'.
17784 Make Emacs functions such as Fatom 'static' by default.
17785 This makes it easier for human readers (and static analyzers)
17786 to see whether these functions can be called from other modules.
17787 DEFUN now defines a static function. To make the function external
17788 so that it can be used in other C modules, use the new macro DEFUE.
17789 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
17790 (Finit_image_library):
17791 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
17792 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
17793 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
17794 Remove decls, since these functions are now static.
17795 (Funintern, Fget_internal_run_time): New decls, since these functions
17796 were already external.
17798 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
17799 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
17800 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
17801 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
17802 * keyboard.c, keymap.c, lread.c:
17803 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
17804 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
17805 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
17806 Mark functions with DEFUE instead of DEFUN,
17807 if they are used in other modules.
17808 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
17809 decls for now-static functions.
17810 * buffer.h (Fdelete_overlay): Remove decl.
17811 * callproc.c (Fgetenv_internal): Mark as internal.
17812 * composite.c (Fremove_list_of_text_properties): Remove decl.
17813 (Fcomposition_get_gstring): New forward static decl.
17814 * composite.h (Fcomposite_get_gstring): Remove decl.
17815 * dired.c (Ffile_attributes): New forward static decl.
17816 * doc.c (Fdocumntation_property): New forward static decl.
17817 * eval.c (Ffetch_bytecode): New forward static decl.
17818 (Funintern): Remove extern decl; now in .h file where it belongs.
17819 * fileio.c (Fmake_symbolic_link): New forward static decl.
17820 * image.c (Finit_image_library): New forward static decl.
17821 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
17822 * intervals.h (Fprevious_property_change):
17823 (Fremove_list_of_text_properties): Remove decls.
17824 * keyboard.c (Fthis_command_keys): Remove decl.
17825 (Fcommand_execute): New forward static decl.
17826 * keymap.c (Flookup_key): New forward static decl.
17827 (Fcopy_keymap): Now static.
17828 * keymap.h (Flookup_key): Remove decl.
17829 * process.c (Fget_process): New forward static decl.
17830 (Fprocess_datagram_address): Mark as internal.
17831 * syntax.c (Fsyntax_table_p): New forward static decl.
17832 (skip_chars): Remove duplicate decl.
17833 * textprop.c (Fprevious_property_change): New forward static decl.
17834 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
17836 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
17837 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
17839 * editfns.c (Fformat): Remove unreachable code.
17841 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
17843 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
17846 2011-04-13 Eli Zaretskii <eliz@gnu.org>
17848 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
17849 when at ZV. (Bug#8487)
17851 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
17853 * charset.c (Fclear_charset_maps): Use xfree instead of free.
17855 * keyboard.c (parse_tool_bar_item): Likewise.
17856 * sound.c (sound_cleanup, alsa_close): Likewise.
17857 * termcap.c (tgetent): Likewise.
17858 * xfns.c (x_default_font_parameter): Likewise.
17859 * xsettings.c (read_and_apply_settings): Likewise.
17861 * alloc.c (overrun_check_malloc, overrun_check_realloc)
17862 (overrun_check_free): Protoize.
17864 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
17866 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
17867 since callers should never pass a negative size.
17868 Change the signature to match that of plain 'read' and 'write'; see
17869 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
17870 * lisp.h: Update prototypes of emacs_write and emacs_read.
17872 2011-04-11 Eli Zaretskii <eliz@gnu.org>
17874 * xdisp.c (redisplay_window): Don't try to determine the character
17875 position of the scroll margin if the window start point w->startp
17876 is outside the buffer's accessible region. (Bug#8468)
17878 2011-04-10 Eli Zaretskii <eliz@gnu.org>
17880 Fix write-region and its subroutines for buffers > 2GB.
17881 * fileio.c (a_write, e_write): Modify declaration of arguments and
17882 local variables to support buffers larger than 2GB.
17883 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
17885 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
17886 argument, local variables, and return value.
17888 * lisp.h: Update prototypes of emacs_write and emacs_read.
17890 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
17892 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
17894 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
17896 Fix more problems found by GCC 4.6.0's static checks.
17898 * xdisp.c (vmessage): Use a better test for character truncation.
17900 * charset.c (load_charset_map): <, not <=, for optimization,
17901 and to avoid potential problems with integer overflow.
17902 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
17903 * casetab.c (set_identity, shuffle): Likewise.
17904 * editfns.c (Fformat): Likewise.
17905 * syntax.c (skip_chars): Likewise.
17907 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
17908 This also lets GCC 4.6.0 generate slightly better loop code.
17910 * callint.c (Fcall_interactively): <, not <=, for optimization.
17911 (Fcall_interactively): Count the number of arguments produced,
17912 not the number of arguments given. This is simpler and lets GCC
17913 4.6.0 generate slightly better code.
17915 * ftfont.c: Distingish more carefully between FcChar8 and char.
17916 The previous code passed unsigned char * to a functions like
17917 strlen and xstrcasecmp that expect char *, which does not
17918 conform to the C standard.
17919 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
17920 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
17921 char * when the C standard requires it.
17923 * keyboard.c (read_char): Remove unused var.
17925 * eval.c: Port to Windows vsnprintf (Bug#8435).
17926 Include <limits.h>.
17927 (SIZE_MAX): Define if the headers do not.
17928 (verror): Do not give up if vsnprintf returns a negative count.
17929 Instead, grow the buffer. This ports to Windows vsnprintf, which
17930 does not conform to C99. Problem reported by Eli Zaretskii.
17931 Also, simplify the allocation scheme, by avoiding the need for
17932 calling realloc, and removing the ALLOCATED variable.
17934 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
17936 Remove invocations of doprnt, as Emacs now uses vsnprintf.
17937 But keep the doprint source code for now, as we might revamp it
17938 and use it again (Bug#8435).
17939 * lisp.h (doprnt): Remove.
17940 * Makefile.in (base_obj): Remove doprnt.o.
17941 * deps.mk (doprnt.o): Remove.
17943 error: Print 32- and 64-bit integers portably (Bug#8435).
17944 Without this change, on typical 64-bit hosts error ("...%d...", N)
17945 was used to print both 32- and 64-bit integers N, which relied on
17946 undefined behavior.
17947 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
17948 * lisp.h (error, verror): Mark as printf-like functions.
17949 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
17950 Report overflow in size calculations when allocating printf buffer.
17951 Do not truncate output string at its first null byte.
17952 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
17953 Truncate the output at a character boundary, since vsnprintf does not
17955 * charset.c (check_iso_charset_parameter): Convert internal
17956 character to string before calling 'error', since %c now has the
17958 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
17959 overflow when computing char to be passed to 'error'. Do not
17960 pass Lisp_Object to 'error'; pass the integer instead.
17961 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
17962 formatted with plain %d.
17964 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
17966 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
17968 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
17970 * xterm.c (x_catch_errors): Remove duplicate declaration.
17972 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
17974 * xdisp.c, lisp.h (message_nolog): Remove; unused.
17976 2011-04-10 Jim Meyering <meyering@redhat.com>
17978 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
17979 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
17980 return ssize_t not "int", and use size_t as the buffer length.
17981 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
17982 * gnutls.h: Update declarations.
17983 * process.c (read_process_output): Use ssize_t, to match.
17984 (send_process): Likewise.
17986 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
17988 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
17990 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
17992 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
17993 Use unsigned char, to match FcChar8 type definition.
17995 * xterm.c (handle_one_xevent):
17996 * xmenu.c (create_and_show_popup_menu):
17997 * xselect.c (x_decline_selection_request)
17998 (x_reply_selection_request): Avoid type-punned deref of X events.
18000 2011-04-09 Eli Zaretskii <eliz@gnu.org>
18002 Fix some uses of `int' instead of EMACS_INT.
18003 * search.c (string_match_1, fast_string_match)
18004 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
18005 (scan_buffer, find_next_newline_no_quit)
18006 (find_before_next_newline, search_command, Freplace_match)
18007 (Fmatch_data): Make some `int' variables be EMACS_INT.
18009 * xdisp.c (display_count_lines): 3rd argument and return value now
18010 EMACS_INT. All callers changed.
18011 (pint2hrstr): Last argument is now EMACS_INT.
18013 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
18014 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
18015 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
18016 (decode_coding_utf_16, decode_coding_emacs_mule)
18017 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
18018 (decode_coding_ccl, decode_coding_charset)
18019 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
18020 (decode_coding_iso_2022, decode_coding_emacs_mule)
18021 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
18022 <char_offset, last_offset>: Declare EMACS_INT.
18023 (encode_coding_utf_8, encode_coding_utf_16)
18024 (encode_coding_emacs_mule, encode_invocation_designation)
18025 (encode_designation_at_bol, encode_coding_iso_2022)
18026 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
18027 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
18029 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
18030 (encode_invocation_designation): Last argument P_NCHARS is now
18032 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
18033 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
18035 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
18038 * ccl.c (Fccl_execute_on_string): Declare some variables
18041 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
18043 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
18045 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
18047 * process.c (Fformat_network_address): Doc fix.
18049 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
18051 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
18053 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
18055 * keyboard.c (read_char): Call Lisp function help-form-show,
18056 instead of using internal_with_output_to_temp_buffer.
18057 (Qhelp_form_show): New var.
18058 (syms_of_keyboard): Use DEFSYM macro.
18060 * print.c (internal_with_output_to_temp_buffer): Function deleted.
18062 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
18064 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
18066 * process.c (Flist_processes): Remove to Lisp.
18067 (list_processes_1): Delete.
18069 2011-04-06 Eli Zaretskii <eliz@gnu.org>
18071 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
18073 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
18075 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
18077 Fix more problems found by GCC 4.6.0's static checks.
18079 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
18081 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
18083 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
18085 * xdisp.c (vmessage): Mark as a printf-like function.
18087 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
18089 * sound.c (sound_warning): Don't crash if arg contains a printf format.
18091 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
18092 printf-like functions.
18093 (tiff_load): Add casts to remove these marks before passing them
18094 to system-supplied API.
18096 * eval.c (Fsignal): Remove excess argument to 'fatal'.
18098 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
18099 This avoids several warnings with gcc -Wstrict-overflow.
18100 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
18101 directly, rather than having caller test rule sign. This avoids
18102 some unnecessary tests.
18103 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
18104 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
18105 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
18107 * xfont.c (xfont_text_extents): Remove var that was set but not used.
18108 (xfont_open): Avoid unnecessary tests.
18110 * composite.c (composition_gstring_put_cache): Use unsigned integer.
18112 * composite.h, composite.c (composition_gstring_put_cache):
18113 Use EMACS_INT, not int, for length.
18115 * composite.h (COMPOSITION_DECODE_REFS): New macro,
18116 breaking out part of COMPOSITION_DECODE_RULE.
18117 (COMPOSITION_DECODE_RULE): Use it.
18118 * composite.c (get_composition_id): Remove unused local vars,
18119 by using the new macro.
18121 * textprop.c (set_text_properties_1): Change while to do-while,
18122 since the condition is always true at first.
18124 * intervals.c (graft_intervals_into_buffer): Mark var as used.
18125 (interval_deletion_adjustment): Return unsigned value.
18128 * process.c (list_processes_1, create_pty, read_process_output):
18129 (exec_sentinel): Remove vars that were set but not used.
18130 (create_pty): Remove unnecessary "volatile"s.
18131 (Fnetwork_interface_info): Avoid possibility of int overflow.
18132 (read_process_output): Do adaptive read buffering even if carryover.
18133 (read_process_output): Simplify nbytes computation if buffered.
18135 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
18137 * syntax.c (scan_words): Remove var that was set but not used.
18138 (update_syntax_table): Use unsigned instead of int.
18140 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
18141 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
18142 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
18144 * print.c (print_error_message): Avoid int overflow.
18146 * font.c (font_list_entities): Redo for clarity,
18147 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
18149 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
18150 (font_score): Avoid potential overflow in diff calculation.
18152 * fns.c (substring_both): Remove var that is set but not used.
18153 (sxhash): Redo loop for clarity and to avoid wraparound warning.
18155 * eval.c (funcall_lambda): Rename local to avoid shadowing.
18157 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
18158 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
18159 can always succeed if overflow has undefined behavior.
18161 * search.c (boyer_moore, wordify): Remove vars set but not used.
18162 (wordify): Omit three unnecessary tests.
18164 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
18165 All callers changed. This avoids the need for an unused var.
18167 * casefiddle.c (casify_region): Remove var that is set but not used.
18169 * dired.c (file_name_completion): Remove var that is set but not used.
18171 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
18173 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
18174 (Finsert_file_contents): Remove unnecessary code checking fd.
18176 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
18177 Check for integer overflow on size calculations.
18179 * buffer.c (Fprevious_overlay_change): Remove var that is set
18182 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
18183 Remove vars that are set but not used.
18184 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
18185 (timer_check_2): Mark vars as initialized.
18187 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
18189 * image.c (lookup_image): Remove var that is set but not used.
18190 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
18192 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
18193 that are set but not used.
18195 * xfns.c (make_invisible_cursor): Don't return garbage
18196 if XCreateBitmapFromData fails (Bug#8410).
18198 * xselect.c (x_get_local_selection, x_handle_property_notify):
18199 Remove vars that are set but not used.
18201 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
18202 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
18204 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
18205 Remove var that is set but not used.
18206 (scroll_bar_windows_size): Now size_t, not int.
18207 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
18208 Check for overflow.
18210 * xfaces.c (realize_named_face): Remove vars that are set but not used.
18211 (map_tty_color) [!defined MSDOS]: Likewise.
18213 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
18215 * coding.c: Remove vars that are set but not used.
18216 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
18217 All callers changed.
18218 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
18219 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
18220 (decode_coding_charset): Remove vars that are set but not used.
18222 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
18223 that is set but not used.
18225 * print.c (print_object): Remove var that is set but not used.
18227 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
18228 The gnulib version avoids calling malloc in the usual case,
18229 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
18230 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
18231 * filelock.c (current_lock_owner): Likewise.
18232 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
18233 * sysdep.c: Include allocator.h, careadlinkat.h.
18234 (emacs_no_realloc_allocator): New static constant.
18235 (emacs_readlink): New function.
18236 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
18237 ../lib/careadlinkat.h.
18239 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
18241 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
18242 first non-nil return value).
18244 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
18246 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
18247 if not defined (Bug#8403).
18249 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
18251 * xdisp.c (display_count_lines): Remove parameter `start',
18252 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
18253 (get_char_face_and_encoding): Remove parameter `multibyte_p',
18254 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
18255 (fill_stretch_glyph_string): Remove parameters `row' and `area',
18256 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
18257 and thereabouts. All callers changed.
18258 (get_per_char_metric): Remove parameter `f', unused since
18259 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
18261 2011-04-02 Jim Meyering <meyering@redhat.com>
18263 do not dereference NULL upon failed strdup
18264 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
18265 (ns_get_family): Likewise.
18267 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
18269 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
18271 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
18273 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
18276 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
18278 Add lexical binding.
18280 * window.c (Ftemp_output_buffer_show): New fun.
18281 (Fsave_window_excursion):
18282 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
18284 * lread.c (lisp_file_lexically_bound_p): New function.
18285 (Fload): Bind Qlexical_binding.
18286 (readevalloop): Remove `evalfun' arg.
18287 Bind Qinternal_interpreter_environment.
18288 (Feval_buffer): Bind Qlexical_binding.
18289 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
18291 (syms_of_lread): Declare `lexical-binding'.
18293 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
18295 * keyboard.c (eval_dyn): New fun.
18296 (menu_item_eval_property): Use it.
18298 * image.c (parse_image_spec): Use Ffunctionp.
18300 * fns.c (concat, mapcar1): Accept byte-code-functions.
18302 * eval.c (Fsetq): Handle lexical vars.
18303 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
18304 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
18305 (FletX, Flet): Obey lexical binding.
18306 (Fcommandp): Handle closures.
18307 (Feval): New `lexical' arg.
18308 (eval_sub): New function extracted from Feval. Use it almost
18309 everywhere where Feval was used. Look up vars in lexical env.
18311 (Ffunctionp): Move from subr.el.
18312 (Ffuncall): Handle closures.
18313 (apply_lambda): Remove `eval_flags'.
18314 (funcall_lambda): Handle closures and new byte-code-functions.
18315 (Fspecial_variable_p): New function.
18316 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
18317 but without exporting it to Lisp.
18319 * doc.c (Fdocumentation, store_function_docstring):
18320 * data.c (Finteractive_form): Handle closures.
18322 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
18325 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
18327 (exec_byte_code): New function extracted from Fbyte_code to handle new
18328 calling convention for byte-code-functions. Add new byte-codes.
18330 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
18332 * alloc.c (Fmake_symbol): Init new `declared_special' field.
18334 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
18336 * xdisp.c (redisplay_internal): Fix prototype.
18338 2011-03-31 Eli Zaretskii <eliz@gnu.org>
18340 * xdisp.c (SCROLL_LIMIT): New macro.
18341 (try_scrolling): Use it when setting scroll_limit.
18342 Limit scrolling to 100 screen lines.
18343 (redisplay_window): Even when falling back on "recentering",
18344 position point in the window according to scroll-conservatively,
18345 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
18347 (try_scrolling): When point is above the window, allow searching
18348 as far as scroll_max, or one screenful, to compute vertical
18349 distance from PT to the scroll margin position. This prevents
18350 try_scrolling from unnecessarily failing when
18351 scroll-conservatively is set to a value slightly larger than the
18352 window height. Clean up the case of PT below the margin at bottom
18353 of window: scroll_max can no longer be INT_MAX. When aggressive
18354 scrolling is in use, don't let point enter the opposite scroll
18355 margin as result of the scroll.
18356 (syms_of_xdisp) <scroll-conservatively>: Document the
18357 threshold of 100 lines for never-recentering scrolling.
18359 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
18361 * dispextern.h (move_it_by_lines):
18362 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
18363 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
18364 (message_log_check_duplicate): Remove parameters `prev_bol' and
18365 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
18366 (redisplay_internal): Remove parameter `preserve_echo_area',
18367 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
18369 * indent.c (Fvertical_motion):
18370 * window.c (window_scroll_pixel_based, Frecenter):
18371 Don't pass `need_y_p' to `move_it_by_lines'.
18373 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
18375 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
18376 steal a few bits to be more compact.
18377 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
18378 Remove unneeded casts.
18380 * bytecode.c (Fbyte_code): CAR and CDR can GC.
18382 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
18384 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
18385 binding" message (bug#7967).
18387 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
18389 Fix more problems found by GCC 4.6.0's static checks.
18391 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
18392 Remove unused local var.
18394 * editfns.c (Fmessage_box): Remove unused local var.
18396 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
18397 (note_mode_line_or_margin_highlight, note_mouse_highlight):
18398 Omit unused local vars.
18399 * window.c (shrink_windows): Omit unused local var.
18400 * menu.c (digest_single_submenu): Omit unused local var.
18401 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
18402 Omit unused local var.
18404 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
18405 Don't assume string length fits in int.
18406 (keyremap_step, read_key_sequence): Use size_t for sizes.
18407 (read_key_sequence): Don't check last_real_key_start redundantly.
18409 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
18410 instead of alloca (Bug#8344).
18412 * eval.c (Fbacktrace): Don't assume nargs fits in int.
18413 (Fbacktrace_frame): Don't assume nframes fits in int.
18415 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
18417 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
18420 * term.c (produce_glyphless_glyph): Remove unnecessary test.
18422 * cm.c (calccost): Turn while-do into do-while, for clarity.
18424 * keyboard.c (syms_of_keyboard): Use the same style as later
18425 in this function when indexing through an array. This also
18426 works around GCC bug 48267.
18428 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
18430 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
18432 * chartab.c (sub_char_table_ref_and_range): Redo for slight
18433 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
18435 * keyboard.c, keyboard.h (num_input_events): Now size_t.
18436 This avoids undefined behavior on integer overflow, and is a bit
18437 more convenient anyway since it is compared to a size_t variable.
18439 Variadic C functions now count arguments with size_t, not int.
18440 This avoids an unnecessary limitation on 64-bit machines, which
18441 caused (substring ...) to crash on large vectors (Bug#8344).
18442 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
18443 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
18444 All variadic functions and their callers changed accordingly.
18445 (struct gcpro.nvars): Now size_t, not int. All uses changed.
18446 * data.c (arith_driver, float_arith_driver): Likewise.
18447 * editfns.c (general_insert_function): Likewise.
18448 * eval.c (struct backtrace.nargs, interactive_p)
18449 (internal_condition_case_n, run_hook_with_args, apply_lambda)
18450 (funcall_lambda, mark_backtrace): Likewise.
18451 * fns.c (concat): Likewise.
18452 * frame.c (x_set_frame_parameters): Likewise.
18453 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
18454 0 if not found, not -1. All callers changed.
18456 * alloc.c (garbage_collect): Don't assume stack size fits in int.
18457 (stack_copy_size): Now size_t, not int.
18458 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
18460 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
18462 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
18463 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
18464 All callers changed.
18466 * lisp.h (multibyte_char_to_unibyte):
18467 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
18468 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
18469 * character.h (CHAR_TO_BYTE8):
18470 * cmds.c (internal_self_insert):
18471 * editfns.c (general_insert_function):
18472 * keymap.c (push_key_description):
18473 * search.c (Freplace_match):
18474 * xdisp.c (message_dolog, set_message_1): All callers changed.
18476 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
18478 * keyboard.c (safe_run_hook_funcall): New function.
18479 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
18480 don't set the hook to nil, but remove the offending function instead.
18481 (Qcommand_hook_internal): Remove, unused.
18482 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
18483 Vcommand_hook_internal.
18485 * eval.c (enum run_hooks_condition): Remove.
18486 (funcall_nil, funcall_not): New functions.
18487 (run_hook_with_args): Call each function through a `funcall' argument.
18488 Remove `cond' argument, now redundant.
18489 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
18490 (Frun_hook_with_args_until_failure): Adjust accordingly.
18491 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
18493 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
18495 * dispextern.h (string_buffer_position): Remove declaration.
18497 * print.c (strout): Remove parameter `multibyte', unused since
18498 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
18500 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
18501 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
18502 All callers changed.
18504 * w32.c (_wsa_errlist): Use braces for struct initializers.
18506 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
18507 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
18508 All callers changed.
18509 (string_buffer_position): Likewise. Also, make static (it's never
18510 used outside xdisp.c).
18511 (cursor_row_p): Remove parameter `w', unused since
18512 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
18513 (decode_mode_spec): Remove parameter `precision', introduced during
18514 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
18515 All callers changed.
18517 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
18519 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
18521 2011-03-27 Anders Lindgren <andlind@gmail.com>
18523 * nsterm.m (ns_menu_bar_is_hidden): New variable.
18524 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
18525 (ns_update_auto_hide_menu_bar): New functions.
18526 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
18527 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
18528 ns_constrain_all_frames.
18529 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
18530 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
18532 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
18534 * nsmenu.m (runDialogAt): Remove argument to timer_check.
18536 2011-03-27 Glenn Morris <rgm@gnu.org>
18538 * syssignal.h: Replace RETSIGTYPE with void.
18539 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
18540 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
18541 Replace SIGTYPE with void everywhere.
18542 * s/usg5-4-common.h (SIGTYPE): Remove definition.
18543 * s/template.h (SIGTYPE): Remove commented out definition.
18545 2011-03-26 Eli Zaretskii <eliz@gnu.org>
18547 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
18548 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
18550 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
18552 * w32.c (read_unc_volume): Use parameter `henum', instead of
18553 global variable `wget_enum_handle'.
18555 * keymap.c (describe_vector): Remove parameters `indices' and
18556 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
18557 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
18559 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
18561 * keyboard.c (timer_check): Remove parameter `do_it_now',
18562 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
18563 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
18564 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
18566 * keyboard.c (read_char):
18567 * w32menu.c (w32_menu_display_help):
18568 * xmenu.c (show_help_event, menu_help_callback):
18569 Adjust calls to `show_help_echo'.
18571 * gtkutil.c (xg_maybe_add_timer):
18572 * keyboard.c (readable_events):
18573 * process.c (wait_reading_process_output):
18574 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
18576 * insdel.c (adjust_markers_gap_motion):
18577 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
18578 (gap_left, gap_right): Don't call it.
18580 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
18582 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
18583 incurred during fontification.
18585 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
18587 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
18588 (DEFVAR_PER_BUFFER): Don't pass it.
18590 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
18591 (scrolling_window): Don't pass it.
18593 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
18595 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
18597 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
18599 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
18600 of variables specific to SELinux and computation of `encoded_absname'.
18602 * image.c (XPutPixel): Remove unused variable `height'.
18604 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
18606 * unexw32.c (get_section_info): Remove unused variable `section'.
18608 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
18609 (system_process_attributes): Remove unused variable `sess'.
18610 (sys_read): Remove unused variable `err'.
18612 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
18613 (w32_wnd_proc): Remove unused variable `isdead'.
18614 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
18615 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
18616 (x_create_tip_frame): Remove unused variable `tem'.
18618 * w32inevt.c (w32_console_read_socket):
18619 Remove unused variable `no_events'.
18621 * w32term.c (x_draw_composite_glyph_string_foreground):
18622 Remove unused variable `width'.
18624 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
18626 * w32term.c (x_set_glyph_string_clipping):
18627 Don't pass uninitialized region to CombineRgn.
18629 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
18631 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
18632 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
18633 (Fx_close_connection): Remove unused variable `i'.
18635 * w32font.c (w32font_draw): Return number of glyphs.
18636 (w32font_open_internal): Remove unused variable `i'.
18637 (w32font_driver): Add missing initializer.
18639 * w32menu.c (utf8to16): Remove unused variable `utf16'.
18640 (fill_in_menu): Remove unused variable `items_added'.
18642 * w32term.c (last_mouse_press_frame): Remove static global variable.
18643 (w32_clip_to_row): Remove unused variable `f'.
18644 (x_delete_terminal): Remove unused variable `i'.
18646 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
18647 (NOTHING): Remove unused static global variable.
18648 (uniscribe_check_otf): Remove unused variable `table'.
18649 (uniscribe_font_driver): Add missing initializers.
18651 2011-03-23 Julien Danjou <julien@danjou.info>
18653 * term.c (Fsuspend_tty, Fresume_tty):
18654 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
18655 * window.c (temp_output_buffer_show):
18656 * insdel.c (signal_before_change):
18657 * frame.c (Fhandle_switch_frame):
18658 * fileio.c (Fdo_auto_save):
18659 * emacs.c (Fkill_emacs):
18660 * editfns.c (save_excursion_restore):
18661 * cmds.c (internal_self_insert):
18662 * callint.c (Fcall_interactively):
18663 * buffer.c (Fkill_all_local_variables):
18664 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
18666 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
18667 unconditionally since it does the check itself.
18669 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
18671 Fix more problems found by GCC 4.5.2's static checks.
18673 * coding.c (encode_coding_raw_text): Avoid unnecessary test
18674 the first time through the loop, since we know p0 < p1 then.
18675 This also avoids a gcc -Wstrict-overflow warning.
18677 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
18678 leading to a memory leak, possible in functions like
18679 load_charset_map_from_file that can allocate an unbounded number
18680 of objects (Bug#8318).
18682 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
18683 that could (at least in theory) be that large.
18685 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
18686 This is less likely to overflow, and avoids undefined behavior if
18687 overflow does occur. All callers changed. Use strtoul to scan
18688 for the unsigned long integer.
18689 (pint2hrstr): Simplify and tune code slightly.
18690 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
18692 * scroll.c (do_scrolling): Work around GCC bug 48228.
18693 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
18695 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
18696 This also avoids a warning with gcc -Wstrict-overflow.
18697 (validate_x_resource_name): Simplify count usage.
18698 This also avoids a warning with gcc -Wstrict-overflow.
18700 * fileio.c (Fcopy_file): Report error if fchown or fchmod
18703 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
18705 * process.c (Fmake_network_process): Use socklen_t, not int,
18706 where POSIX says socklen_t is required in portable programs.
18707 This fixes a porting bug on hosts like 64-bit HP-UX, where
18708 socklen_t is wider than int (Bug#8277).
18709 (Fmake_network_process, server_accept_connection):
18710 (wait_reading_process_output, read_process_output):
18713 * process.c: Rename or move locals to avoid shadowing.
18714 (list_processes_1, Fmake_network_process):
18715 (read_process_output_error_handler, exec_sentinel_error_handler):
18716 Rename or move locals.
18717 (Fmake_network_process): Define label "retry_connect" only if needed.
18718 (Fnetwork_interface_info): Fix pointer signedness.
18719 (process_send_signal): Add cast to avoid pointer signedness problem.
18720 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
18721 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
18723 Make tparam.h and terminfo.c consistent.
18724 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
18725 Include tparam.h instead, since it declares them.
18726 * cm.h (PC): Remove extern decl; tparam.h now does this.
18727 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
18728 * terminfo.c: Include tparam.h, to check interfaces.
18729 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
18730 (tparam): Adjust signature to match interface in tparam.h;
18731 this removes some undefined behavior. Check that outstring and len
18732 are zero, which they always are with Emacs.
18733 * tparam.h (PC, BC, UP): New extern decls.
18735 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
18736 (xftfont_open): Rename locals to avoid shadowing.
18738 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
18739 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
18740 (OTF_TAG_SYM): Omit macro if not needed.
18741 (ftfont_list): Remove unused local.
18742 (get_adstyle_property, ftfont_pattern_entity):
18743 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
18744 Rename locals to avoid shadowing.
18746 * xfont.c (xfont_list_family): Mark var as initialized.
18748 * xml.c (make_dom): Now static.
18750 * composite.c (composition_compute_stop_pos): Rename local to
18752 (composition_reseat_it): Remove unused locals.
18753 (find_automatic_composition, composition_adjust_point): Likewise.
18754 (composition_update_it): Mark var as initialized.
18755 (find_automatic_composition): Mark vars as initialized,
18756 with a FIXME (Bug#8290).
18758 character.h: Rename locals to avoid shadowing.
18759 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
18760 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
18761 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
18762 (BUF_DEC_POS): Be more systematic about renaming local temporaries
18763 to avoid shadowing.
18765 * textprop.c (property_change_between_p): Remove; unused.
18767 * intervals.c (interval_start_pos): Now static.
18769 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
18771 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
18772 Rename locals to avoid shadowing.
18774 * sound.c (wav_play, au_play, Fplay_sound_internal):
18775 Fix pointer signedness.
18776 (alsa_choose_format): Remove unused local var.
18777 (wav_play): Initialize a variable to 0, to prevent undefined
18778 behavior (Bug#8278).
18780 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
18782 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
18784 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
18785 clobbering (Bug#8298).
18786 * sysdep.c (sys_subshell): Likewise.
18787 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
18789 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
18790 This should get cleaned up, so that child_setup has the
18791 same signature on all platforms.
18793 * callproc.c (call_process_cleanup): Now static.
18794 (relocate_fd): Rename locals to avoid shadowing.
18796 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
18798 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
18799 not to be necessary, and produces flickering.
18801 2011-03-20 Glenn Morris <rgm@gnu.org>
18803 * config.in: Remove file.
18805 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
18807 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
18808 are now in src/globals.h.
18809 (syms_of_minibuf): Remove spurious & from previous change.
18811 2011-03-20 Leo Liu <sdl.web@gmail.com>
18813 * minibuf.c (completing-read-function): New variable.
18814 (completing-read-default): Rename from completing-read.
18815 (completing-read): Call completing-read-function.
18817 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
18819 * xfaces.c (Fx_load_color_file):
18820 Read color file from absolute filename (bug#8250).
18822 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
18824 * makefile.w32-in: Update dependencies.
18826 2011-03-17 Eli Zaretskii <eliz@gnu.org>
18828 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
18830 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
18832 Fix more problems found by GCC 4.5.2's static checks.
18834 * process.c (make_serial_process_unwind, send_process_trap):
18835 (sigchld_handler): Now static.
18837 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
18838 That way, the code declares only the vars that it needs.
18839 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
18840 * s/cygwin.h (PTY_ITERATION): Likewise.
18841 * s/darwin.h (PTY_ITERATION): Likewise.
18842 * s/gnu-linux.h (PTY_ITERATION): Likewise.
18844 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
18845 * process.c (allocate_pty): Don't declare stb unless it's needed.
18847 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
18848 (CONSTANTLIM): Remove; unused.
18849 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
18850 Define only if needed.
18852 * unexelf.c (unexec): Name an expression,
18853 to avoid gcc -Wbad-function-cast warning.
18854 Use a different way to cause a compilation error if anyone uses
18855 n rather than nn, a way that does not involve shadowing.
18856 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
18858 * deps.mk (unexalpha.o): Remove; unused.
18860 New file unexec.h, the (simple) interface for unexec (Bug#8267).
18861 * unexec.h: New file.
18862 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
18863 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
18864 Depend on unexec.h.
18865 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
18866 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
18867 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
18868 Change as necessary to match prototype in unexec.h.
18870 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
18872 (back_comment, skip_chars): Mark vars as initialized.
18874 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
18875 Rename locals to avoid shadowing.
18877 * lread.c (read1): Rewrite so as not to use empty "else".
18878 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
18880 * print.c (Fredirect_debugging_output): Fix pointer signedess.
18882 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
18883 warning when compiling print.c.
18885 * font.c (font_unparse_fcname): Abort in an "impossible" situation
18886 instead of using an uninitialized var.
18887 (font_sort_entities): Mark var as initialized.
18889 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
18891 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
18892 pointers to constants.
18893 (font_parse_fcname): Remove unused vars.
18894 (font_delete_unmatched): Now static.
18895 (font_get_spec): Remove; unused.
18896 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
18897 (font_update_drivers, Ffont_get_glyphs, font_add_log):
18898 Rename or move locals to avoid shadowing.
18900 * fns.c (require_nesting_list, require_unwind): Now static.
18901 (Ffillarray): Rename locals to avoid shadowing.
18903 * floatfns.c (domain_error2): Define only if needed.
18904 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
18906 * alloc.c (mark_backtrace): Move decl from here ...
18907 * lisp.h: ... to here, so that it can be checked.
18909 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
18910 (Fdefvar): Rewrite so as not to use empty "else".
18911 (lisp_indirect_variable): Name an expression,
18912 to avoid gcc -Wbad-function-cast warning.
18913 (Fdefvar): Rename locals to avoid shadowing.
18915 * callint.c (quotify_arg, quotify_args): Now static.
18916 (Fcall_interactively): Rename locals to avoid shadowing.
18917 Use const pointer when appropriate.
18919 * lisp.h (get_system_name, get_operating_system_release):
18920 Move decls here, to check interfaces.
18921 * process.c (get_operating_system_release): Move decl to lisp.h.
18922 * xrdb.c (get_system_name): Likewise.
18923 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
18924 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
18925 some of which prompt warnings from gcc -Wbad-function-cast.
18926 (Fformat_time_string, Fencode_time, Finsert_char):
18927 (Ftranslate_region_internal, Fformat):
18928 Rename or remove local vars to avoid shadowing.
18929 (Ftranslate_region_internal): Mark var as initialized.
18931 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
18934 * lisp.h (eassert): Check that the argument compiles, even if
18935 ENABLE_CHECKING is not defined.
18937 * data.c (Findirect_variable): Name an expression, to avoid
18938 gcc -Wbad-function-cast warning.
18939 (default_value, arithcompare, arith_driver, arith_error): Now static.
18940 (store_symval_forwarding): Rename local to avoid shadowing.
18941 (Fmake_variable_buffer_local, Fmake_local_variable):
18942 Mark variables as initialized.
18943 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
18945 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
18946 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
18947 Rename locals to avoid shadowing.
18948 (mark_stack): Move local variables into the #ifdef region where
18950 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
18951 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
18953 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
18954 (GC_STRING_CHARS): Remove; not used.
18955 (Fmemory_limit): Cast sbrk's returned value to char *.
18957 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
18958 avoids undefined behavior in theory.
18960 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
18962 Use functions, not macros, for up- and down-casing (Bug#8254).
18963 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
18964 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
18965 to use the following functions instead of these macros.
18966 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
18967 EMACS_INT, since callers assume the returned value fits in int.
18968 (upcase1): Likewise, for UPCASE_TABLE.
18969 (uppercasep, lowercasep, upcase): New static inline functions.
18970 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
18971 the race-condition problem in the old DOWNCASE.
18973 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
18974 Rename locals to avoid shadowing.
18975 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
18976 (regex_compile, re_search_2, re_match_2_internal):
18977 Remove unused local vars.
18978 (FREE_VAR): Rewrite so as not to use empty "else",
18979 which gcc can warn about.
18980 (regex_compile, re_match_2_internal): Mark locals as initialized.
18981 (RETALLOC_IF): Define only if needed.
18982 (WORDCHAR_P): Likewise. This one is never needed, but is used
18983 only in a comment talking about a compiler bug, so put inside
18984 the #if 0 of that comment.
18985 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
18986 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
18989 * search.c (boyer_moore): Rename locals to avoid shadowing.
18990 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
18991 (PREV_CHAR_BOUNDARY): Likewise.
18993 * search.c (simple_search): Remove unused var.
18995 * dired.c (compile_pattern): Move decl from here ...
18996 * lisp.h: ... to here, so that it can be checked.
18997 (struct re_registers): New forward decl.
18999 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
19001 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
19003 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
19004 Rename locals to avoid shadowing.
19005 (Fvertical_motion): Mark locals as initialized.
19007 * casefiddle.c (casify_object, casify_region): Now static.
19008 (casify_region): Mark local as initialized.
19010 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
19012 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
19013 New macros, so that the caller can use some names other than
19014 gcpro1, gcpro2, etc.
19015 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
19017 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
19018 argument, for consistency with GCPRO2_VAR, etc: it is now the
19019 prefix of the variable, not the variable itself. All uses
19021 * dired.c (directory_files_internal, file_name_completion):
19022 Rename locals to avoid shadowing.
19024 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
19025 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
19026 dired.c's scmp function, had undefined behavior.
19027 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
19028 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
19029 * buffer.h: ... to here, because these macros use current_buffer,
19030 and the new implementation with inline functions needs to have
19031 current_buffer in scope now, rather than later when the macros
19033 (downcase, upcase1): New static inline functions.
19034 (DOWNCASE, UPCASE1): Reimplement using these functions.
19035 This avoids undefined behavior in expressions like
19036 DOWNCASE (x) == DOWNCASE (y), which previously suffered
19037 from race conditions in accessing the global variables
19038 case_temp1 and case_temp2.
19039 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
19040 * lisp.h (case_temp1, case_temp2): Remove their decls.
19041 * character.h (ASCII_CHAR_P): Move from here ...
19042 * lisp.h: ... to here, so that the inline functions mentioned
19043 above can use them.
19045 * dired.c (directory_files_internal_unwind): Now static.
19047 * fileio.c (file_name_as_directory, directory_file_name):
19048 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
19050 (file_name_as_directory): Use const pointers when appropriate.
19051 (Fexpand_file_name): Likewise. In particular, newdir might
19052 point at constant storage, so make it a const pointer.
19053 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
19054 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
19056 (Fset_file_times, Finsert_file_contents, auto_save_error):
19057 Rename locals to avoid shadowing.
19059 * minibuf.c (choose_minibuf_frame_1): Now static.
19060 (Ftry_completion, Fall_completions): Rename or remove locals
19061 to avoid shadowing.
19063 * marker.c (bytepos_to_charpos): Remove; unused.
19065 * lisp.h (verify_bytepos, count_markers): New decls,
19066 so that gcc does not warn that these functions aren't declared.
19068 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
19069 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
19070 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
19071 (copy_text): Remove unused local var.
19073 * filelock.c (within_one_second): Now static.
19074 (lock_file_1): Rename local to avoid shadowing.
19076 * buffer.c (fix_overlays_before): Mark locals as initialized.
19077 (fix_start_end_in_overlays): Likewise. This function should be
19078 simplified by using pointers-to-pointers, but that's a different
19080 (switch_to_buffer_1): Now static.
19081 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
19082 (report_overlay_modification): Rename locals to avoid shadowing.
19084 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
19085 Fix pointer signedness issue.
19086 (sys_subshell): Mark local as volatile if checking for lint,
19087 to suppress a gcc -Wclobbered warning that does not seem to be right.
19088 (MAXPATHLEN): Define only if needed.
19090 * process.c (serial_open, serial_configure): Move decls from here ...
19091 * systty.h: ... to here, so that they can be checked.
19093 * fns.c (get_random, seed_random): Move extern decls from here ...
19094 * lisp.h: ... to here, so that they can be checked.
19096 * sysdep.c (reset_io): Now static.
19097 (wait_for_termination_signal): Remove; unused.
19099 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
19100 (copy_keymap_item, append_key, push_text_char_description):
19102 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
19103 (DENSE_TABLE_SIZE): Remove; unused.
19104 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
19105 (describe_map_tree):
19106 Rename locals to avoid shadowing.
19108 * keyboard.c: Declare functions static if they are not used elsewhere.
19109 (echo_char, echo_dash, cmd_error, top_level_2):
19110 (poll_for_input, handle_async_input): Now static.
19111 (read_char, kbd_buffer_get_event, make_lispy_position):
19112 (make_lispy_event, make_lispy_movement, apply_modifiers):
19113 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
19114 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
19115 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
19116 (read_key_sequence, read_char): Mark locals as initialized.
19117 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
19119 * keyboard.h (make_ctrl_char): New decl.
19120 (mark_kboards): Move decl here ...
19121 * alloc.c (mark_kboards): ... from here.
19123 * lisp.h (force_auto_save_soon): New decl.
19125 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
19126 (DEFINE_DUMMY_FUNCTION): New macro.
19127 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
19129 (main): Add casts to avoid warnings
19130 if GCC considers string literals to be constants.
19132 * lisp.h (fatal_error_signal): Add decl, since it's exported.
19134 * dbusbind.c: Pointer signedness fixes.
19135 (xd_signature, xd_append_arg, xd_initialize):
19136 (Fdbus_call_method, Fdbus_call_method_asynchronously):
19137 (Fdbus_method_return_internal, Fdbus_method_error_internal):
19138 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
19139 (Fdbus_register_signal): Use SSDATA when the context wants char *.
19141 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
19142 if GCC considers string literals to be constants.
19143 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
19145 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
19147 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
19148 (print_preprocess, print_object): New macro to fix last change.
19150 * print.c (print_preprocess): Don't forget font objects.
19152 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
19154 * emacs.c (USAGE3): Doc fixes.
19156 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
19158 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
19161 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
19163 * lisp.h (VWindow_system, Qfile_name_history):
19164 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
19165 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
19166 (w32_system_caret_x, w32_system_caret_y): Declare extern.
19168 * w32select.c: Don't #include "keyboard.h".
19169 (run_protected): Add extern declaration for waiting_for_input.
19171 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
19172 * w32console.c (detect_input_pending, read_input_pending)
19173 (encode_terminal_code):
19174 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
19175 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
19176 (w32_system_caret_y, Qfile_name_history):
19177 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
19178 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
19179 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
19180 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
19181 * w32proc.c (Qlocal, report_file_error):
19182 * w32term.c (Vwindow_system, updating_frame):
19183 * w32uniscribe.c (initialized, uniscribe_font_driver):
19184 Remove unneeded extern declarations.
19186 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
19188 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
19190 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
19192 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
19193 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
19194 These macros can no longer be used for assignment.
19196 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
19197 Assign struct members directly, instead of using BUF_BEGV etc.
19198 (record_buffer_markers, fetch_buffer_markers): New functions for
19199 recording and fetching special buffer markers.
19200 (set_buffer_internal_1, set_buffer_temp): Use them.
19202 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
19204 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
19206 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
19207 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
19209 * xdisp.c (hscroll_window_tree):
19210 (reconsider_clip_changes): Use PT instead of BUF_PT.
19212 2011-03-13 Eli Zaretskii <eliz@gnu.org>
19214 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
19215 $(EMACS_ROOT)/lib/intprops.h.
19217 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
19219 Fix more problems found by GCC 4.5.2's static checks.
19221 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
19222 to unsigned char * to avoid compiler diagnostic.
19223 (xg_free_frame_widgets): Make it clear that a local variable is
19224 needed only if USE_GTK_TOOLTIP.
19225 (gdk_window_get_screen): Make it clear that this macro is needed
19226 only if USE_GTK_TOOLTIP.
19227 (int_gtk_range_get_value): New function, which avoids a diagnostic
19228 from gcc -Wbad-function-cast.
19229 (xg_set_toolkit_scroll_bar_thumb): Use it.
19230 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
19231 diagnostic from gcc -Wbad-function-cast.
19232 (get_utf8_string, xg_get_file_with_chooser):
19233 Rename locals to avoid shadowing.
19234 (create_dialog): Move locals to avoid shadowing.
19236 * xgselect.c (xg_select): Remove unused var.
19238 * image.c (four_corners_best): Mark locals as initialized.
19239 (gif_load): Initialize transparent_p to zero (Bug#8238).
19240 Mark another local as initialized.
19241 (my_png_error, my_error_exit): Mark with NO_RETURN.
19243 * image.c (clear_image_cache): Now static.
19244 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
19245 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
19246 (x_edge_detection): Remove unnecessary cast that
19247 gcc -Wbad-function-cast diagnoses.
19248 (gif_load): Fix pointer signedness.
19249 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
19250 (jpeg_load, gif_load): Rename locals to avoid shadowing.
19252 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
19254 Improve quality of tests for time stamp overflow.
19255 For example, without this patch (encode-time 0 0 0 1 1
19256 1152921504606846976) returns the obviously-bogus value (-948597
19257 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
19258 reports time overflow. See
19259 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
19260 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
19261 * editfns.c: Include limits.h and intprops.h.
19262 (TIME_T_MIN, TIME_T_MAX): New macros.
19263 (time_overflow): Move earlier, to before first use.
19264 (hi_time, lo_time): New functions, for an accurate test for
19265 out-of-range times.
19266 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
19267 (Fget_internal_run_time): Don't assume time_t fits in int.
19268 (make_time): Use list2 instead of Fcons twice.
19269 (Fdecode_time): More accurate test for out-of-range times.
19270 (check_tm_member): New function.
19271 (Fencode_time): Use it, to test for out-of-range times.
19272 (lisp_time_argument): Don't rely on undefined left-shift and
19273 right-shift behavior when checking for time stamp overflow.
19275 * editfns.c (time_overflow): New function, refactoring common code.
19276 (Fformat_time_string, Fdecode_time, Fencode_time):
19277 (Fcurrent_time_string): Use it.
19279 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
19280 * dired.c (make_time): Move to ...
19281 * editfns.c (make_time): ... here.
19282 * systime.h: Note the move.
19284 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
19286 * fringe.c (update_window_fringes): Remove unused variables.
19288 * unexmacosx.c (copy_data_segment): Also copy __got section.
19291 2011-03-12 Eli Zaretskii <eliz@gnu.org>
19293 * termcap.c [MSDOS]: Include "msdos.h".
19294 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
19295 Constify `char *' arguments and their references according to
19296 prototypes in tparam.h.
19298 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
19300 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
19301 Adapt all references accordingly.
19303 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
19305 2011-03-11 Tom Tromey <tromey@redhat.com>
19307 * buffer.c (syms_of_buffer): Remove obsolete comment.
19309 2011-03-11 Eli Zaretskii <eliz@gnu.org>
19311 * termhooks.h (encode_terminal_code): Declare prototype.
19313 * msdos.c (encode_terminal_code): Don't declare prototype.
19315 * term.c (encode_terminal_code): Now external again, used by
19316 w32console.c and msdos.c.
19318 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
19319 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
19321 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
19323 Fix some minor problems found by GCC 4.5.2's static checks.
19325 * fringe.c (update_window_fringes): Mark locals as initialized
19327 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
19329 * alloc.c (mark_fringe_data): Move decl from here ...
19330 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
19331 to check its interface.
19332 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
19334 * fontset.c (free_realized_fontset): Now static.
19335 (Fset_fontset_font): Rename local to avoid shadowing.
19336 (fontset_font): Mark local as initialized.
19337 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
19339 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
19341 * xselect.c (x_disown_buffer_selections): Remove; not used.
19342 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
19343 (x_own_selection, Fx_disown_selection_internal): Rename locals
19344 to avoid shadowing.
19345 (x_handle_dnd_message): Remove local to avoid shadowing.
19347 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
19348 so that the caller can use some name other than gcpro1.
19349 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
19350 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
19351 (Fx_backspace_delete_keys_p):
19352 Use them to avoid shadowing, and rename vars to avoid shadowing.
19353 (x_decode_color, x_set_name, x_window): Now static.
19354 (Fx_create_frame): Add braces to silence GCC warning.
19355 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
19356 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
19357 Remove unused locals.
19358 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
19359 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
19360 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
19363 * xterm.h (x_mouse_leave): New decl.
19365 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
19366 Remove unused functions.
19367 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
19368 (x_calc_absolute_position): Now static.
19369 (XTread_socket): Don't define label "out" unless it's used.
19370 Don't declare local "event" unless it's used.
19371 (x_iconify_frame, x_free_frame_resources): Don't declare locals
19372 unless they are used.
19373 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
19374 (x_fatal_error_signal): Remove; not used.
19375 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
19376 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
19377 (x_error_catcher, x_connection_closed, x_error_handler):
19378 (x_error_quitter, xembed_send_message, x_iconify_frame):
19379 (my_log_handler): Rename locals to avoid shadowing.
19380 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
19381 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
19383 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
19384 Rename or move locals to avoid shadowing.
19385 (tty_defined_color, merge_face_heights): Now static.
19386 (free_realized_faces_for_fontset): Remove; not used.
19387 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
19388 does not deduce is never used uninitialized.
19389 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
19390 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
19392 * terminal.c (store_terminal_param): Now static.
19394 * xmenu.c (menu_highlight_callback): Now static.
19395 (set_frame_menubar): Remove unused local.
19396 (xmenu_show): Rename parameter to avoid shadowing.
19397 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
19398 since they might point to immutable storage.
19399 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
19400 since it's unused otherwise.
19402 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
19403 Add a FIXME, since the code still doesn't look right. (Bug#8215)
19404 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
19405 avoids a gcc -Wuninitialized diagnostic.
19406 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
19407 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
19408 does not deduce are never used uninitialized.
19410 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
19412 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
19413 * window.c (window_loop, size_window):
19414 (run_window_configuration_change_hook, enlarge_window): Likewise.
19416 * window.c (display_buffer): Now static.
19417 (size_window): Mark variables that gcc -Wuninitialized
19418 does not deduce are never used uninitialized.
19419 * window.h (check_all_windows): New decl, to forestall
19420 gcc -Wmissing-prototypes diagnostic.
19421 * dispextern.h (bidi_dump_cached_states): Likewise.
19423 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
19425 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
19426 Include <limits.h>.
19427 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
19428 and to avoid gcc -Wuninitialized warning.
19429 (load_charset_map): Mark variables that gcc -Wuninitialized
19430 does not deduce are never used uninitialized.
19431 (load_charset): Abort instead of using uninitialized var (Bug#8229).
19433 * coding.c (coding_set_source, coding_set_destination):
19434 Use "else { /* comment */ }" rather than "else /* comment */;"
19435 for clarity, and to avoid gcc -Wempty-body warning.
19436 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
19437 a block, when the outer 'i' will do.
19438 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
19439 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
19440 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
19441 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
19442 (Fdecode_sjis_char, Fdefine_coding_system_internal):
19443 Rename locals to avoid shadowing.
19444 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
19445 * coding.c (emacs_mule_char, encode_invocation_designation):
19446 Now static, since they're not used elsewhere.
19447 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
19448 (decode_coding_object, encode_coding_object, detect_coding_system):
19449 (decode_coding_emacs_mule): Mark variables that gcc
19450 -Wuninitialized does not deduce are never used uninitialized.
19451 (detect_coding_iso_2022): Initialize a local variable that might
19452 be used uninitialized. Leave a FIXME because it's not clear that
19453 this initialization is needed. (Bug#8211)
19454 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
19455 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
19456 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
19457 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
19458 Remove unused macros.
19460 * category.c (hash_get_category_set): Remove unused local var.
19461 (copy_category_table): Now static, since it's not used elsewhere.
19462 * character.c (string_count_byte8): Likewise.
19464 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
19465 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
19467 * chartab.c (copy_sub_char_table): Now static, since it's not used
19469 (sub_char_table_ref_and_range, char_table_ref_and_range):
19470 Rename locals to avoid shadowing.
19471 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
19473 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
19474 (BIDI_BOB): Remove unused macro.
19476 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
19477 deduce are never used uninitialized.
19478 * term.c (encode_terminal_code): Likewise.
19480 * term.c (encode_terminal_code): Now static. Remove unused local.
19482 * tparam.h: New file.
19483 * term.c, tparam.h: Include it.
19484 * deps.mk (term.o, tparam.o): Depend on tparam.h.
19485 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
19486 Move these decls to tparam.h, and make them agree with what
19487 is actually in tparam.c. The previous trick of using incompatible
19488 decls in different modules does not conform to the C standard.
19489 All callers of tparam changed to use tparam's actual API.
19490 * tparam.c (tparam1, tparam, tgoto):
19491 Use const pointers where appropriate.
19493 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
19494 * cm.h (struct cm): Likewise.
19495 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
19496 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
19497 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
19498 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
19499 (turn_on_face, init_tty): Likewise.
19500 * termchar.h (struct tty_display_info): Likewise.
19502 * term.c (term_mouse_position): Rename local to avoid shadowing.
19504 * alloc.c (mark_ttys): Move decl from here ...
19505 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
19507 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
19509 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
19511 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
19513 * search.c (compile_pattern_1): Remove argument regp, unused since
19514 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
19515 (compile_pattern): Don't pass it.
19517 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
19519 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
19520 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
19522 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
19524 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
19526 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
19527 gdk_window_get_screen, gdk_window_get_geometry,
19528 gdk_x11_window_lookup_for_display and GDK_KEY_g.
19529 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
19530 (xg_get_pixbuf_from_pixmap): New function.
19531 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
19532 to Pixmap, take frame as parameter, remove GdkColormap parameter.
19533 Call xg_get_pixbuf_from_pixmap instead of
19534 gdk_pixbuf_get_from_drawable.
19535 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
19536 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
19537 (xg_check_special_colors): Use GtkStyleContext and its functions
19539 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
19540 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
19541 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
19542 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
19543 Call gtk_widget_get_preferred_size.
19544 (xg_frame_resized): gdk_window_get_geometry only takes 5
19546 (xg_win_to_widget, xg_event_is_for_menubar):
19547 Call gdk_x11_window_lookup_for_display.
19548 (xg_set_widget_bg): New function.
19549 (delete_cb): New function.
19550 (xg_create_frame_widgets): Connect delete-event to delete_cb.
19551 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
19552 (xg_set_background_color): Call xg_set_widget_bg.
19553 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
19554 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
19555 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
19556 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
19558 (update_frame_tool_bar): Call gtk_widget_hide.
19559 (xg_initialize): Use GDK_KEY_g.
19561 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
19563 (x_session_initialize): Call gdk_x11_set_sm_client_id.
19565 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
19566 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
19567 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
19569 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
19571 * w32xfns.c (select_palette): Check success of RealizePalette against
19572 GDI_ERROR, not zero.
19574 See ChangeLog.11 for earlier changes.
19576 ;; Local Variables:
19580 Copyright (C) 2011-2012 Free Software Foundation, Inc.
19582 This file is part of GNU Emacs.
19584 GNU Emacs is free software: you can redistribute it and/or modify
19585 it under the terms of the GNU General Public License as published by
19586 the Free Software Foundation, either version 3 of the License, or
19587 (at your option) any later version.
19589 GNU Emacs is distributed in the hope that it will be useful,
19590 but WITHOUT ANY WARRANTY; without even the implied warranty of
19591 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19592 GNU General Public License for more details.
19594 You should have received a copy of the GNU General Public License
19595 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.