1 2012-09-17 Eli Zaretskii <eliz@gnu.org>
3 * w32term.c (w32_read_socket): Set pending_signals to 1, like
4 xterm.c does. Reported by Daniel Colascione <dancol@dancol.org>.
6 * ralloc.c (r_alloc_init) [!SYSTEM_MALLOC]: Initialize
7 __malloc_extra_blocks to 32 instead of 64, like alloc.c did in
8 emacs_blocked_malloc, now deleted.
10 2012-09-17 Paul Eggert <eggert@cs.ucla.edu>
12 Remove no-longer-needed Solaris 2.4 vfork bug workaround.
13 The workaround was for improving performance on Solaris 2.4, but
14 is getting in the way now. Emacs will still work if someone is
15 still running Solaris 2.4 in a museum somewhere; Sun dropped
16 support for Solaris 2.4 in 2003.
17 * callproc.c (Fcall_process) [HAVE_WORKING_VFORK]:
18 * process.c (create_process) [HAVE_WORKING_VFORK]:
19 Omit now-unnecessary workaround for the Solaris 2.4 vfork bug,
20 since Emacs no longer uses vfork on that platform.
22 2012-09-17 Glenn Morris <rgm@gnu.org>
24 * emacs.c: Use COPYRIGHT.
26 2012-09-16 Paul Eggert <eggert@cs.ucla.edu>
28 Remove configure's --without-sync-input option (Bug#12450).
29 When auditing signal-handling in preparation for cleaning it up,
30 I found that SYNC_INPUT has race conditions and would be a real
31 pain to fix. Since it's an undocumented and deprecated
32 configure-time option, now seems like a good time to remove it.
33 Also see <http://bugs.gnu.org/11080#16>.
34 * alloc.c (_bytes_used, __malloc_extra_blocks, _malloc_internal)
35 (_free_internal) [!DOUG_LEA_MALLOC]: Remove decls.
36 (alloc_mutex) [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
38 (check_depth) [XMALLOC_OVERRUN_CHECK]:
39 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT):
40 (__malloc_hook, __realloc_hook, __free_hook, BYTES_USED)
41 (dont_register_blocks, bytes_used_when_reconsidered)
42 (bytes_used_when_full, emacs_blocked_free, emacs_blocked_malloc)
43 (emacs_blocked_realloc, reset_malloc_hooks, uninterrupt_malloc):
44 [!SYSTEM_MALLOC && !SYNC_INPUT]:
45 Remove. All uses removed.
46 (MALLOC_BLOCK_INPUT, MALLOC_UNBLOCK_INPUT): Use a different
47 implementation, one that depends on whether the new macro
48 XMALLOC_BLOCK_INPUT_CHECK is defined, not on whether SYNC_INPUT
50 * atimer.c (run_timers, handle_alarm_signal):
51 * keyboard.c (pending_signal, poll_for_input_1, poll_for_input)
52 (handle_async_input, process_pending_signals)
53 (handle_input_available_signal, init_keyboard):
54 * nsterm.m (ns_read_socket):
55 * process.c (wait_reading_process_output):
56 * regex.c (immediate_quit, IMMEDIATE_QUIT_CHECK):
57 * sysdep.c (emacs_sigaction_init) [SA_RESTART]:
59 * xterm.c (XTread_socket):
61 * conf_post.h (SA_RESTART) [IRIX6_5]: Do not #undef.
62 * eval.c (handling_signal): Remove. All uses removed.
63 * lisp.h (ELSE_PENDING_SIGNALS): Remove.
64 All uses replaced with the SYNC_INPUT version.
65 (reset_malloc_hooks, uninterrupt_malloc, handling_signal):
67 * sysdep.c, syssignal.h (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
70 * font.c (Ffont_shape_gstring): Remove unused local.
72 2012-09-16 Glenn Morris <rgm@gnu.org>
74 * Makefile.in (clean): No longer run nextstep's clean.
76 * Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
78 (ns-app): Move here from ns.mk, and simplify.
79 (clean): Simplify nextstep entry.
82 2012-09-16 Kenichi Handa <handa@gnu.org>
84 * font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
85 not covert the last few charactes.
87 2012-09-16 Kenichi Handa <handa@gnu.org>
89 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
90 here, but just check the validity of glyphs in the glyph-string.
92 2012-09-16 Martin Rudalics <rudalics@gmx.at>
94 * window.c (Fwindow_parameter, Fset_window_parameter): Accept
95 any window as argument (Bug#12452).
97 2012-09-16 Jan Djärv <jan.h.d@swipnet.se>
99 * nsfns.m (Fx_open_connection): Move initialization of ns_*_types
100 to ns_term_init to avoid memory leak.
102 * nsterm.m (ns_update_begin): Initialize bp after lcokFocus, use
103 explicit retain/release.
104 (ns_term_init): Only allow one display. Initialize outerpool and
107 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
109 Port _setjmp fix to POSIXish hosts as well as Microsoft.
110 * image.c (_setjmp) [!HAVE__SETJMP]: Restore definition, as
111 it's needed on POSIXish hosts that lack _setjmp. Attempt to solve
112 the Microsoft problem in a different way, by altering ../nt/config.nt.
114 2012-09-15 Eli Zaretskii <eliz@gnu.org>
129 * w16select.c: Remove inclusion of setjmp.h, as it is now included
130 by lisp.h. This completes removal of setjmp.h inclusion
131 erroneously announced in the previous commit. (Bug#12446)
133 * lisp.h [!HAVE__SETJMP, !HAVE_SIGSETJMP]: Make the commentary
136 * image.c (_setjmp) [!HAVE__SETJMP]: Define only if 'setjmp' is
137 not defined as a macro. The latter happens on MS-Windows.
140 2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
142 Port better to POSIX hosts lacking _setjmp (Bug#12446).
143 * lisp.h: Include <setjmp.h> here, since we use its symbols here.
144 Some instances of '#include <setjmp.h>' removed, if the
145 only reason for the instance was because "lisp.h" was included.
146 (sys_jmp_buf, sys_setjmp, sys_longjmp): New symbols.
147 Unless otherwise specified, replace all uses of jmp_buf, _setjmp,
148 and _longjmp with the new symbols. Emacs already uses _setjmp if
149 available, so this change affects only POSIXish hosts that have
150 sigsetjmp but not _setjmp, such as some versions of Solaris and
151 Unixware. (Also, POSIX-2008 marks _setjmp as obsolescent.)
152 * image.c (_setjmp, _longjmp) [HAVE_PNG && !HAVE__SETJMP]: New macros.
153 (png_load_body) [HAVE_PNG]:
154 (PNG_LONGJMP) [HAVE_PNG && PNG_LIBPNG_VER < 10500]:
155 (PNG_JMPBUF) [HAVE_PNG && PNG_LIBPNG_VER >= 10500]:
156 Use _setjmp and _longjmp rather than sys_setjmp and sys_longjmp,
157 since PNG requires jmp_buf. This is the only exception to the
158 general rule that we now use sys_setjmp and sys_longjmp.
159 This exception is OK since this code does not change the signal
160 mask or longjmp out of a signal handler.
162 2012-09-14 Paul Eggert <eggert@cs.ucla.edu>
164 * alloc.c [!SYSTEM_MALLOC && !SYNC_INPUT && HAVE_PTHREAD]:
165 Include "syssignal.h", for 'main_thread'.
167 2012-09-14 Dmitry Antipov <dmantipov@yandex.ru>
169 Avoid out-of-range marker position (Bug#12426).
170 * insdel.c (replace_range, replace_range_2): Adjust
171 markers before overlays, as suggested by comments.
172 (insert_1_both, insert_from_buffer_1, adjust_after_replace):
173 Remove redundant check before calling offset_intervals.
175 2012-09-14 Martin Rudalics <rudalics@gmx.at>
177 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
178 current buffer (Bug#12387).
180 2012-09-14 Juanma Barranquero <lekktu@gmail.com>
182 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
184 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
186 Use a more backwards-compatible timer format (Bug#12430).
187 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
188 vector element, not from the 4th, since PSECS is now at the end.
189 (Fcurrent_idle_time): Doc fix.
191 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
193 Function to mark objects and remove killed buffers at once.
194 * alloc.c (discard_killed_buffers): Rename to ...
195 (mark_discard_killed buffers) ... new name. Add marking
196 of remaining objects. Fix comment. Adjust users.
197 (mark_object): Do not touch frame buffer lists here.
198 * frame.c (delete_frame): Reset frame buffer lists here.
200 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
202 Better workaround for GNOME bug when --enable-gcc-warnings.
203 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
204 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
205 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
207 Simplify SIGIO usage (Bug#12408).
208 The code that dealt with SIGIO was crufty and confusing, e.g., it
209 played tricks like "#undef SIGIO" but these tricks were not used
210 consistently. Simplify mostly by not #undeffing standard symbols,
211 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
212 or not as we please) rather than "defined SIGIO" (standard symbol
213 that we probably shouldn't #undef).
214 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
215 Modules that need it can include it.
216 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
217 * dispextern.h (ignore_sigio): New decl.
218 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
219 unconditionally, since it's now a no-op if !USABLE_SIGIO.
220 * emacs.c (shut_down_emacs):
221 * keyboard.c (kbd_buffer_store_event_hold):
222 Use ignore_sigio rather than invoking 'signal' directly.
223 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
225 (FIONREAD, SIGIO): Do not #undef.
226 (tty_read_avail_input): Use #error rather than a syntax error.
227 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
228 for I_PIPE, used by SETUP_SLAVE_PTY.
229 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
230 * sysdep.c (croak): Remove; no longer needed. This bit of
231 temporary code, with Fred N. Fish's comment that it's temporary,
232 has been in Emacs since at least 1992!
233 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
234 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
235 * syssignal.h (croak): Remove decl.
236 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
237 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
238 now that we're termios-only.
239 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
240 * term.c (dissociate_if_controlling_tty): Use #error rather than
243 Work around GCC and GNOME bugs when --enable-gcc-warnings.
244 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
245 to work around GNOME bug 683906.
246 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
247 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
248 This works around GCC bug 54561.
250 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
252 More fixes for 'volatile' and setjmp/longjmp.
253 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
254 * image.c (struct png_load_context) [HAVE_PNG]: New type.
255 (png_load_body) [HAVE_PNG]:
256 (jpeg_load_body) [HAVE_JPEG]:
257 New function, with most of the old parent function's body.
258 (png_load) [HAVE_PNG]:
259 (jpeg_load) [HAVE_JPEG]:
260 Invoke the new function, to avoid longjmp munging our locals.
261 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
262 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
263 longjmp is passed 2, as the C standard doesn't guarantee this.
264 Instead, store the failure code into mgr->failure_code.
266 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
268 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
269 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
270 (syms_of_keyboard): Remove support for unread-command-char.
272 2012-09-12 Eli Zaretskii <eliz@gnu.org>
274 * w32proc.c (sys_kill): If PID is our process ID and the signal is
275 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
276 violation. (Bug#12426)
278 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
280 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
282 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
284 * eval.c: Add `inhibit-debugger'.
285 (Qinhibit_debugger): New symbol.
286 (call_debugger): Bind it instead of Qdebug_on_error.
287 (maybe_call_debugger): Test Vinhibit_debugger.
288 (syms_of_eval): Define inhibit-debugger.
289 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
290 (syms_of_xdisp): Remove inhibit-debug-on-message.
292 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
294 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
295 If a nonvolatile local variable is written before a _longjmp to
296 the frame containing the variable, and is read after the _longjmp,
297 the value read is indeterminate. Some local variables of type
298 'struct handler' and 'struct catchtag' are used in this way, so
299 mark each of their slots as volatile if the slot can be set before
300 _longjmp and read afterwards.
301 * lisp.h (struct handler): var and chosen_clause are now volatile.
302 (struct catchtag): val, next, and pdlcount are now volatile.
304 * bidi.c (bidi_push_it, bidi_pop_it):
305 * fns.c (copy_hash_table):
306 * image.c (define_image_type):
307 * keyboard.c (kbd_buffer_store_event_hold):
308 * process.c (Fprocess_send_eof):
309 * xfaces.c (x_create_gc) [HAVE_NS]:
310 * xgselect.c (xg_select):
311 Prefer assignment to memcpy when either will do.
313 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
314 Use pointer-to-a-pointer to simplify and avoid a NILP check each
315 time an item is removed. No need to mark this function 'inline';
316 the compiler knows better than we do.
318 2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
320 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
321 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
322 to change_frame_size (Bug#12388).
323 (windowDidResize:): Pass YES to updateFrameSize.
325 * nsterm.h: Add delay parameter to updateFrameSize.
327 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
329 Discard killed buffers from deleted window and frame objects.
330 This reduces an amount of references to killed buffers and
331 helps GC to reclaim them faster.
332 * alloc.c (discard_killed_buffers): New function.
333 (mark_object): Use it for deleted windows and frames.
334 (mark_object): If symbol's value is set up for a killed buffer
335 or deleted frame, restore it's global binding.
336 * data.c (swap_in_global_binding): Add GC notice.
337 (swap_in_symval_forwarding): Use convenient set_blv_where.
338 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
339 * window.h: ... to here.
341 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
343 Convenient macro to check whether the buffer is live.
344 * buffer.h (BUFFER_LIVE_P): New macro.
345 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
346 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
348 2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
350 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
351 composition cases (Bug#12364).
353 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
354 overhang of succeeding glyphs overlapping box cursor.
356 * w32term.c (x_draw_glyph_string): Likewise.
358 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
360 Simplify, document, and port floating-point (Bug#12381).
361 The porting part of this patch fixes bugs on non-IEEE platforms
362 with frexp, ldexp, logb.
363 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
365 * floatfns.c: Simplify discussion of functions that Emacs doesn't
366 support, by removing commented-out code and briefly listing the
367 C89 functions excluded. The commented-out stuff was confusing
368 maintenance, e.g., we thought we needed cbrt but it was commented out.
369 (logb): Remove decl; no longer needed.
370 (isfinite): New macro, if not already supplied.
371 (isnan): Don't replace any existing macro.
372 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
373 are present on all C89 platforms.
374 (Ffrexp): Do not special-case zero, as frexp does the right thing
376 (Flogb): Do not use logb, as it doesn't have the desired meaning
377 on hosts that use non-base-2 floating point. Instead, stick with
378 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
379 frexp, to avoid getting an unspecified result.
381 * xdisp.c (Qinhibit_debug_on_message): Now static.
383 2012-09-10 Jan Djärv <jan.h.d@swipnet.se>
385 * nsterm.m (ns_update_begin): Set clip path to whole view by using
386 NSBezierPath (Bug#12131).
388 2012-09-10 Chong Yidong <cyd@gnu.org>
390 * fns.c (Fdelq, Fdelete): Doc fix.
392 2012-09-10 Paul Eggert <eggert@cs.ucla.edu>
394 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
395 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
397 2012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
399 * lisp.h (make_lisp_ptr): New macro to replace XSET.
400 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
403 2012-09-09 Eli Zaretskii <eliz@gnu.org>
405 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
406 left fringe if the window has a left margin. This avoids leaving
407 traces of the cursor because its leftmost pixel is not drawn over.
409 * dispnew.c (update_window_line): When the left margin area of a
410 screen line is updated, set the redraw_fringe_bitmaps_p flag of
411 that screen line. (Bug#12277)
413 2012-09-09 Paul Eggert <eggert@cs.ucla.edu>
415 Assume C89 or later for math functions (Bug#12381).
416 This simplifies the code, and makes it a bit smaller and faster,
417 and (most important) makes it easier to clean up signal handling
418 since we can stop worring about floating-point exceptions in
419 library code. That was a problem before C89, but the problem
420 went away many years ago on all practical Emacs targets.
421 * data.c, image.c, lread.c, print.c:
422 Don't include <math.h>; no longer needed.
423 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
424 might be autoconfigured, as that never happens.
426 * doprnt.c (DBL_MAX_10_EXP):
428 Remove. C89 or later always defines these.
429 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
430 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
431 (arith_error, domain_error, domain_error2):
432 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
433 no longer needed -- we simply return what C returns. All uses removed.
434 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
436 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
437 Remove. All uses expanded, as these macros are no longer used
438 more than once and are now more trouble than they're worth.
439 (Ftan): Use tan, not sin / cos.
440 (Flogb): Assume C89 frexp.
441 (fmod_float): Assume C89 fmod.
442 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
443 (init_floatfns): Remove. All uses removed.
445 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
447 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
448 compositeToPoint for OSX < 10.6 (Bug#12390).
450 2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
452 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
453 This produces more-accurate results.
455 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
457 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
460 2012-09-08 Chong Yidong <cyd@gnu.org>
462 * syntax.c (Fstring_to_syntax): Doc fix.
464 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
466 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
467 in the internal border.
468 (x_set_window_size): Remove static variables and their usage.
469 (ns_redraw_scroll_bars): Fix NSTRACE arg.
470 (ns_after_update_window_line, ns_draw_fringe_bitmap): Remove
471 fringe/internal border adjustment (Bug#11052).
472 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
473 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
474 (ns_fix_rect_ibw): Remove.
475 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
476 (ns_dumpglyphs_box_or_relief): Ditto.
477 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
479 (ns_dumpglyphs_image): Ditto.
480 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
482 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
483 their usage. Add fringe_extended_p and its use as in other terms.
484 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
485 scroll bar was removed.
486 (updateFrameSize): New function.
487 (windowDidResize): Move code to updateFrameSize and call it.
489 * nsterm.h (EmacsView): Add updateFrameSize.
491 2012-09-07 Chong Yidong <cyd@gnu.org>
493 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
495 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
497 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
499 More signal-handler cleanup (Bug#12327).
500 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
501 Problem introduced when merging patches. Noted by Eli Zaretskii in
502 <http://bugs.gnu.org/12327#67>.
503 * floatfns.c: Comment fix.
504 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
505 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
506 and anyway the declaration is harmless even if SIGDANGER is not defined.
507 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
508 defined BROKEN_FIONREAD). systty.h formerly did this, but other
509 source files not surprisingly expected syssignal.h to define, or
510 not define, SIGIO, and it's cleaner to do it that way, for consistency.
511 Include <sys/ioctl.h>, for FIONREAD.
512 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
513 This eliminates a problem whereby other files mysteriously had
514 to include "syssignal.h" before including "systty.h" if they
515 wanted to use "#ifdef SIGIO".
517 2012-09-07 Eli Zaretskii <eliz@gnu.org>
519 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
521 * w32.c (sigemptyset): Empty the set.
522 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
524 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
526 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
528 * alloc.c (mark_buffer): Revert unsafe marking optimization.
529 (mark_object): Likewise for frame objects.
531 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
533 * syssignal.h (handle_on_main_thread): Always declare,
534 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
535 This ports to platforms without HAVE_PTHREAD.
537 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
539 Signal-handler cleanup (Bug#12327).
540 Emacs's signal handlers were written in the old 4.2BSD style with
541 sigblock and sigmask and so forth, and this led to some
542 inefficiencies and confusion. Rewrite these to use
543 pthread_sigmask etc. without copying signal sets around. Also,
544 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
545 'signal', and instead use functions that do not attempt to take
546 over the system name space. This patch causes Emacs's text
547 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
548 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
549 Do not include <signal.h> or "syssignal.h", as these
550 modules do not use signals.
551 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
552 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
553 Do not include <signal.h>, as "syssignal.h" does that for us now.
554 * atimer.c (sigmask_atimers): New function.
555 (block_atimers, unblock_atimers): New functions,
556 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
558 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
559 no longer needed here.
560 * emacs.c (main): Inspect existing signal handler with sigaction,
561 so that there's no need to block and unblock SIGHUP.
562 * sysdep.c (struct save_signal): New member 'action', replacing
563 old member 'handler'.
564 (save_signal_handlers, restore_signal_handlers):
565 Use sigaction instead of 'signal' to save and restore.
566 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
567 New function. All users of 'signal' modified to use set_sighandler
568 if they're writeonly, and to use sys_signal if they're read+write.
569 (emacs_sigaction_init, forwarded_signal): New functions.
570 (sys_signal): Remove. All uses replaced by calls to sigaction
571 and emacs_sigaction_init, or by direct calls to 'signal'.
572 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
573 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
574 all uses replaced by pthread_sigmask etc. calls.
575 * syssignal.h: Include <signal.h>.
576 (emacs_sigaction_init, forwarded_signal): New decls.
577 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
578 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
579 (sigmask, sys_sigmask): Remove; no longer needed.
580 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
581 (sigblock, sigunblock, sigfree):
582 (sigsetmask) [!defined sigsetmask]:
583 Remove. All uses replaced by pthread_sigmask.
584 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
585 no longer need to be replaced, and its typical old uses
586 are now done via emacs_sigaction_init and sigaction.
587 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
588 (sys_sigdel): Remove; unused.
589 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
591 2012-09-06 Eli Zaretskii <eliz@gnu.org>
593 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
594 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
596 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
598 Explicitly mark buffer_defaults and buffer_local_symbols.
599 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
600 mark_local_symbols here.
601 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
602 since special buffers aren't marked here any more.
603 (allocate_buffer): Chain new buffer with all_buffers here...
604 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
606 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
607 (syms_of_buffer): Remove staticpro of the above.
608 (init_buffer_once): Set names for buffer_defaults and
609 buffer_local_symbols.
611 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
613 Use bool for booleans in font-related modules.
614 * font.c (font_intern_prop, font_style_to_value)
615 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
616 (generate_otf_features, font_check_otf_features, font_check_otf)
617 (font_match_p, font_list_entities, font_at):
618 * fontset.c (fontset_id_valid_p, reorder_font_vector
619 (fontset_find_font, Fset_fontset_font)
620 (face_suitable_for_char_p) [0]:
621 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
622 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
623 (m17n_flt_initialized, ftfont_shape_by_flt):
624 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
625 * nsfont.m (nsfont_draw):
626 * w32font.c (w32font_draw):
627 * w32term.c (x_draw_glyphless_glyph_string_foreground):
628 Use bool for booleans.
629 * font.h: Adjust to above API changes.
630 (struct font, struct font_driver, struct font_driver_list):
631 Use bool for booleans.
632 (struct font): Remove useless member encoding_type.
634 * fontset.c, xftfont.c: Omit unnecessary static decls.
636 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
638 * alloc.c (mark_object): Revert window marking code
639 since it's unsafe for the Fset_window_configuration.
641 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
643 Fix race conditions with signal handlers and errno (Bug#12327).
644 Be more systematic about preserving errno whenever a signal
645 handler returns, even if it's not in the main thread. Do this by
646 renaming signal handlers to distinguish between signal delivery
647 and signal handling. All uses changed.
648 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
649 * data.c (deliver_arith_signal): Rename from arith_error.
650 * dispnew.c (deliver_window_change_signal): Rename from
651 window_change_signal.
652 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
653 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
654 * keyboard.c (deliver_input_available_signal): Rename from
655 input_available_signal.
656 (deliver_user_signal): Rename from handle_user_signal.
657 (deliver_interrupt_signal): Rename from interrupt_signal.
658 * process.c (deliver_pipe_signal): Rename from send_process_trap.
659 (deliver_child_signal): Rename from sigchld_handler.
660 * atimer.c (handle_alarm_signal):
661 * data.c (handle_arith_signal):
662 * dispnew.c (handle_window_change_signal):
663 * emacs.c (handle_fatal_signal, handle_danger_signal):
664 * keyboard.c (handle_input_available_signal):
665 * keyboard.c (handle_user_signal, handle_interrupt_signal):
666 * process.c (handle_pipe_signal, handle_child_signal):
667 New functions, with the actual signal-handling code taken from the
668 original respective signal handlers, sans the sporadic attempts to
669 preserve errno, since that's now done by handle_on_main_thread.
670 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
671 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
672 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
674 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
675 Move initialization of main_thread to sysdep.c's init_signals.
676 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
677 our usage, and simplifies the mainline code.
678 (record_child_status_change): New static function, as a helper
679 for handle_child_signal, and with most of the old child handler's
681 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
682 (handle_child_signal): Use the above.
683 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
684 Moved here from emacs.c.
685 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
686 code moved here from emacs.c's main function.
687 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
688 replacing the old SIGNAL_THREAD_CHECK. All uses changed. This
689 lets callers save and restore errno properly.
691 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
693 Remove redundant or unused things here and there.
694 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
695 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
696 * editfns.c (Fcompare_buffer_substrings): Likewise.
697 * frame.h (struct terminal, struct font_driver_list):
698 Remove redundant declarations.
699 * window.h (Qleft, Qright): Likewise.
701 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
703 Do not mark objects from deleted buffers, windows and frames.
704 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
705 (mark_object): Likewise for windows and frames.
707 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
709 * alloc.c (valid_lisp_object_p): Treat killed buffers,
710 buffer_defaults and buffer_local_symbols as valid objects.
711 Return special value to denote them.
713 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
715 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
716 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
717 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
718 (file_name_absolute_p, Fsubstitute_in_file_name):
719 (check_executable, check_writable, Ffile_accessible_directory_p)
720 (Fset_file_selinux_context, Fdefault_file_modes)
721 (Finsert_file_contents, choose_write_coding_system)
722 (Fwrite_region, build_annotations, a_write, e_write)
724 * filelock.c (boot_time_initialized, get_boot_time)
725 (get_boot_time_1, lock_file_1, within_one_second):
726 * floatfns.c (in_float):
727 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
728 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
729 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
730 * lisp.h (struct Lisp_Hash_Table.cmpfn):
731 * window.c (compare_window_configurations):
732 Use bool for booleans.
733 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
734 (Fdefault_file_modes): Now mode_t, not int, for modes.
735 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
736 (internal_delete_file): Now returns void, not a (boolean) int,
737 since nobody was looking at the return value.
738 * lisp.h, window.h: Adjust to above API changes.
740 * xdisp.c (set_message): Simplify and reindent last change.
742 2012-09-05 Juanma Barranquero <lekktu@gmail.com>
744 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
746 2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
748 * eval.c (call_debugger): Make the function non-static so that we
749 can call it from set_message.
751 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
752 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
754 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
756 Give more-useful info on a fatal error (Bug#12328).
757 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
758 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
759 of doing the work ourselves.
760 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
762 (fatal_error_backtrace): New function, taken from the guts
763 of the old fatal_error_signal, but with a new option to output
765 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
766 info about the signal than just its number.
767 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
768 * sysdep.c: Include <execinfo.h>
769 (emacs_backtrace): New function, taken partly from the previous
770 code of the 'die' function.
771 (emacs_abort): Call fatal_error_backtrace rather than abort.
773 2012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
775 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
776 eager (load-time) macro-expansion.
777 * lisp.mk (lisp): Add macroexp.
779 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
781 Simplify redefinition of 'abort' (Bug#12316).
782 Do not try to redefine the 'abort' function. Instead, redo
783 the code so that it calls 'emacs_abort' rather than 'abort'.
784 This removes the need for the NO_ABORT configure-time macro
785 and makes it easier to change the abort code to do a backtrace.
786 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
787 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
788 Remove; sysdep.c's emacs_abort now takes its place.
789 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
790 'abort' changed to use 'emacs_abort'.
791 * msdos.c (dos_abort) [defined abort]: Remove; not used.
792 (abort) [!defined abort]: Rename to ...
793 (emacs_abort): ... new name.
794 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
795 the place of the old 'abort' in emacs.c.
796 * w32.c, w32fns.c (abort): Do not #undef.
797 * w32.c (emacs_abort): Rename from w32_abort.
799 2012-09-04 Eli Zaretskii <eliz@gnu.org>
801 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
802 offsets[j].dv, since the y axis of the screen coordinates points
803 down, while the y axis of the font definition coordinates points
804 up. This fixes display of Arabic diacritics such as KASRA and
805 KASRATAN. (Bug#11860)
807 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
809 Be more systematic about _setjmp vs setjmp.
810 * alloc.c (test_setjmp, mark_stack):
811 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
812 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
813 (png_load, my_error_exit, jpeg_load):
814 * process.c (send_process_trap, send_process):
815 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
816 The underscored versions are up to 30x faster on some hosts.
817 Formerly, the code used setjmp+longjmp sometimes and
818 _setjmp+_longjmp at other times, with no particular reason to
819 prefer setjmp+longjmp.
821 2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
823 Fix minor problem found by static checking.
824 * buffer.c (Fdelete_all_overlays): Return nil.
826 2012-09-03 Martin Rudalics <rudalics@gmx.at>
828 * buffer.c (Fdelete_all_overlays): New function.
830 2012-09-03 Chong Yidong <cyd@gnu.org>
832 * gtkutil.c: Add extern decl for Qxft.
834 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
836 * emacs.c, eval.c: Use bool for boolean.
837 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
838 (malloc_using_checking) [DOUG_LEA_MALLOC]:
839 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
840 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
841 (main, decode_env_path, Fdaemon_initialized):
842 * eval.c (call_debugger, Finteractive_p, interactive_p):
843 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
844 (maybe_call_debugger, Fbacktrace):
845 * process.c (read_process_output, exec_sentinel):
846 Use bool for booleans.
847 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
849 * eval.c (interactive_p): Omit always-true boolean argument
850 EXCLUDE_SUBRS_P. All callers changed.
851 * dispextern.h, lisp.h: Reflect above API changes.
852 * firstfile.c (dummy): Use the address of 'main', whose signature
853 won't change, instead of the address of 'initialize', whose
854 signature just changed from int to bool.
855 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
856 * msdos.c (fatal_error_in_progress): ... from here.
857 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
859 (redisplay_internal, unwind_redisplay): Simply clear
860 REDISPLAYING_P when unwinding, instead of saving its previous,
861 always-false value and then restoring it.
863 Clean up some extern decls.
864 Mostly, this hoists extern decls out of .c files and into .h files.
865 That way, we're more likely to catch errors if the interfaces change.
866 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
867 declare xg_mark_data.
868 * dispextern.h (x_frame_parm_handlers):
870 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
871 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
872 (Qultra_bold, Qoblique, Qitalic):
873 Move extern decl here from .c file.
874 * alloc.c (xg_mark_data) [USE_GTK]:
876 * eval.c (Qlexical_binding):
877 * fns.c (time) [!HAVE_UNISTD_H]:
878 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
879 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
880 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
881 * lread.c (Qinternal_interpreter_environment):
882 * minibuf.c (Qbuffer):
883 * process.c (QCfamily, QCfilter):
884 * widget.c (free_frame_faces):
885 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
886 * xfont.c (x_clear_errors):
887 * xterm.c (x_frame_parm_handlers):
888 Remove now-redundant extern decls.
889 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
890 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
892 * xfaces.c: Remove unnecessary static decls.
893 * xterm.c (updating_frame): Remove decl of nonexistent object.
895 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
896 when building globals.h, as the objects that are not built on
897 this host are not needed to compile C files on this host.
899 2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
901 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
903 * frame.h: Add missing prototype for x_wm_set_size_hint.
905 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
907 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
908 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
909 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
910 (Fsubstitute_command_keys):
911 * editfns.c (region_limit, find_field, Fconstrain_to_field)
912 (save_excursion_save, save_excursion_restore)
913 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
914 (format_time_string, general_insert_function)
915 (make_buffer_string, make_buffer_string_both)
916 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
917 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
918 (copy_text, insert_1, insert_1_both, insert_from_string)
919 (insert_from_string_before_markers, insert_from_string_1)
920 (insert_from_buffer, insert_from_buffer_1, replace_range)
921 (replace_range_2, del_range_1, del_range_byte, del_range_both)
922 (del_range_2, modify_region):
923 * intervals.c (intervals_equal, balance_possible_root_interval)
924 (adjust_intervals_for_insertion, merge_properties_sticky)
925 (graft_intervals_into_buffer, lookup_char_property)
926 (adjust_for_invis_intang, set_point_both)
927 (get_property_and_range, compare_string_intervals)
928 (set_intervals_multibyte_1, set_intervals_multibyte):
929 * keyboard.c (decode_timer):
930 Use bool for boolean.
931 * intervals.h, lisp.h, systime.h: Reflect above API changes.
932 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
934 2012-09-02 Chong Yidong <cyd@gnu.org>
936 * keymap.c (push_key_description): Print M-TAB as C-M-i
939 2012-09-02 Juanma Barranquero <lekktu@gmail.com>
941 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
942 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
943 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
944 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
945 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
946 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
947 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
949 2012-09-01 Eli Zaretskii <eliz@gnu.org>
951 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
952 more than one grapheme cluster passed to the shaper: compute the
953 offset adjustment values separately for each cluster. (Bug#11860)
955 * image.c: Restore mistakenly removed inclusion of w32.h. Without
956 it, GCC doesn't see prototypes of w32_delayed_load, and complains
957 about implicit conversions from integer to pointer.
959 2012-09-01 Daniel Colascione <dancol@dancol.org>
961 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
962 system used too early.
964 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
966 Better seed support for (random).
967 * emacs.c (main): Call init_random.
968 * fns.c (Frandom): Set the seed from a string argument, if given.
969 Remove long-obsolete Gentzel cruft.
970 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
971 (init_random): New function.
973 2012-09-01 Daniel Colascione <dancol@dancol.org>
975 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
976 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
977 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
978 x_wm_set_size_hint, x_query_colors, x_real_positions,
979 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
980 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
981 all of which have been moved to common code.
983 * xfaces.c: Include TERM_HEADER instead of listing all possible
984 window-system headers.
986 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
989 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
990 directly accessing frame internals.
992 * w32font.h: Include font.h. Define syms_of_w32font and
995 * process.c: Include TERM_HEADER instead of listing all possible
996 window-system headers.
998 * nsterm.h: Remove declarations now in frame.h. Define
999 FRAME_X_SCREEN, FRAME_X_VISUAL.
1001 * menu.c: Include TERM_HEADER instead of listing all possible
1002 window-system headers.
1004 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
1007 * keyboard.c: Include TERM_HEADER instead of listing all possible
1008 window-system headers.
1010 * image.c: Include TERM_HEADER instead of listing all possible
1011 window-system headers. Declare Vlibrary_cache when compiling for
1014 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
1015 window system declarations.
1017 * frame.h: Move common functions here: set_frame_menubar,
1018 x_set_window_size, x_sync, x_get_focus_frame,
1019 x_set_mouse_position, x_set_mouse_pixel_position,
1020 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
1021 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
1022 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
1023 x_activate_menubar, x_real_positions, x_bitmap_icon,
1024 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
1027 * frame.c: Include TERM_HEADER instead of listing all possible
1028 window-system headers.
1030 * font.c: Include TERM_HEADER instead of listing all possible
1031 window-system headers.
1033 * emacs.c: Include TERM_HEADER.
1035 * dispnew.c: Include TERM_HEADER instead of listing all possible
1036 window-system headers.
1038 * ccl.h: Include character.h.
1040 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
1041 the current window system; include in list of objects to link into
1044 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
1046 Remove mark_ttys function and fix tty_display_info initialization.
1047 * lisp.h (mark_ttys): Remove prototype.
1048 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
1049 to mark_ttys because all possible values of 'top_frame' slot are
1050 the frames which are reachable from Vframe_list.
1051 * term.c (mark_ttys): Remove.
1052 (init_tty): Safely initialize 'top_frame' slot with Qnil.
1054 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
1056 Change struct frame bitfields from unsigned char to unsigned.
1057 * frame.h (struct frame): Change type of 'display_preempted',
1058 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
1059 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
1060 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
1061 bitfields from unsigned char to unsigned.
1063 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
1065 Remove unused member of struct x_output and struct w32_output.
1066 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
1067 * w32term.h (struct w32_output): Likewise.
1069 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
1071 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
1072 does not become zero (Bug#12234).
1074 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
1076 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
1077 for GCC 4.7.1 x86-64.
1079 2012-08-30 Glenn Morris <rgm@gnu.org>
1081 * lread.c (init_lread): For out-of-tree builds, only add the
1082 source directory's site-lisp dir to the load-path if it exists,
1083 consistent with in-tree builds. (Bug#12302)
1085 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
1087 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
1088 button_values to NULL. Call setStykeMask so dialogs get a close button.
1089 (windowShouldClose:): Set window_closed.
1090 (dealloc): New member, free button_values.
1091 (process_dialog:): Make member function. Remove window argument,
1092 replace window with self. Count buttons and allocate and store values
1094 (addButton:value:row:): value is int with the name tag. Call setTag
1095 with tag. Remove return self, declare return value as void.
1096 (addString:row:): Remove return self, declare return value as void.
1097 (addSplit): Remove return self, declare return value as void.
1098 (clicked:): Remove return self, declare return value as void.
1099 Set dialog_return to button_values[seltag]. Code formatting change.
1100 (initFromContents:isQuestion:): Adjust call to process_dialog.
1101 Code formatting change.
1102 (timeout_handler:): Set timer_fired to YES.
1103 (runDialogAt:): Set timer_fired to NO.
1104 Handle click on close button as quit.
1106 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
1107 Add window_closed and button_values. Add void as return value for
1108 add(Button|String|Split). addButton takes int instead of Lisp_Object.
1109 Add process_dialog as new member.
1111 2012-08-28 Eli Zaretskii <eliz@gnu.org>
1113 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
1114 is not one of the heaps we manage. (Bug#12242)
1116 2012-08-28 Glenn Morris <rgm@gnu.org>
1118 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
1120 2012-08-28 Martin Rudalics <rudalics@gmx.at>
1122 * window.c (Fset_window_configuration): Remove handling of
1123 auto-buffer-name window parameter. Install revision of reverted
1126 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
1128 Do not allow to set major mode for a dead buffer.
1129 * buffer.c (Fset_buffer_major_mode): Signal an error
1130 if the buffer is dead.
1131 (Fother_buffer, other_buffer_safely): Remove redundant
1134 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
1136 Always use set_buffer_if_live to restore original buffer at unwind.
1137 * buffer.h (record_unwind_current_buffer): New function.
1138 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
1139 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
1140 * undo.c, window.c: Adjust users.
1141 * buffer.c (set_buffer_if_live): Fix comment.
1143 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
1145 Fix usage of set_buffer_internal.
1146 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
1147 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
1148 * coding.c (decode_coding): Omit redundant test.
1149 * fileio.c (decide_coding_unwind): Likewise.
1150 * fns.c (secure_hash): Likewise.
1151 * insdel.c (modify_region): Likewise.
1152 * keyboard.c (command_loop_1): Likewise.
1153 * print.c (PRINTFINISH): Likewise.
1154 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
1156 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
1158 * dispnew.c: Use bool for boolean.
1159 (frame_garbaged, display_completed, delayed_size_change)
1160 (fonts_changed_p, add_window_display_history)
1161 (add_frame_display_history, verify_row_hash)
1162 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
1163 (row_equal_p, realloc_glyph_pool)
1164 (allocate_matrices_for_frame_redisplay)
1165 (showing_window_margins_p)
1166 (adjust_frame_glyphs_for_frame_redisplay)
1167 (build_frame_matrix_from_leaf_window, make_current)
1168 (mirrored_line_dance, mirror_line_dance, update_frame)
1169 (update_window_tree, update_single_window)
1170 (check_current_matrix_flags, update_window, update_text_area)
1171 (update_window_line, set_window_update_flags, scrolling_window)
1172 (update_frame_1, scrolling, buffer_posn_from_coords)
1173 (do_pending_window_change, change_frame_size)
1174 (change_frame_size_1, sit_for):
1175 Use bool for boolean.
1176 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
1177 and remove last int (actually boolean) argument, which was always 0.
1178 All callers changed.
1179 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
1180 * dispextern.h (struct composition_it): Use bool for boolean.
1181 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
1182 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
1183 * dired.c (file_name_completion):
1184 Use bool for boolean. (This was missed in an earlier change.)
1186 2012-08-27 Martin Rudalics <rudalics@gmx.at>
1188 * window.c (Fset_window_configuration): Revert first part of
1191 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
1193 * nsterm.h (NSPanel): New class variable dialog_return.
1195 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
1197 (windowShouldClose:): Use stop instead of stopModalWithCode.
1198 (clicked:): Ditto, and also set dialog_return (Bug#12258).
1199 (timeout_handler:): Use stop instead of abortModal. Send a dummy
1201 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
1204 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
1206 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
1207 * composite.c (find_composition, composition_gstring_p)
1208 (composition_reseat_it, find_automatic_composition):
1209 * data.c (let_shadows_buffer_binding_p)
1210 (let_shadows_global_binding_p, set_internal, make_blv)
1211 (Fmake_variable_buffer_local, Fmake_local_variable)
1212 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
1213 (cons_to_signed, arith_driver):
1214 * dbusbind.c (xd_in_read_queued_messages):
1215 * dired.c (directory_files_internal, file_name_completion):
1216 Use bool for booleans.
1217 * dired.c (file_name_completion):
1218 * process.h (fd_callback):
1219 Omit int (actually boolean) argument. It wasn't being used.
1221 * composite.h, lisp.h: Reflect above API changes.
1223 * cmds.c, coding.c: Use bool for booleans.
1224 * cmds.c (move_point, Fself_insert_command):
1225 * coding.h (struct composition status, struct coding_system):
1226 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
1227 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
1228 (emacs_mule_char, decode_coding_emacs_mule)
1229 (encode_coding_emacs_mule, detect_coding_iso_2022)
1230 (decode_coding_iso_2022, encode_invocation_designation)
1231 (encode_designation_at_bol, encode_coding_iso_2022)
1232 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
1233 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
1234 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
1235 (encode_coding_raw_text, detect_coding_charset)
1236 (decode_coding_charset, encode_coding_charset, detect_eol)
1237 (detect_coding, get_translation_table, produce_chars)
1238 (consume_chars, reused_workbuf_in_use)
1239 (make_conversion_work_buffer, code_conversion_save)
1240 (decode_coding_object, encode_coding_object)
1241 (detect_coding_system, char_encodable_p)
1242 (Funencodable_char_position, code_convert_region)
1243 (code_convert_string, code_convert_string_norecord)
1244 (Fset_coding_system_priority):
1245 * fileio.c (Finsert_file_contents):
1246 Use bool for booleans.
1247 * coding.h, lisp.h: Reflect above API changes.
1248 * coding.c: Remove unnecessary static function decls.
1249 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
1250 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
1251 not a boolean 'int', since callers never look at the return value.
1252 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
1253 * coding.h (decoding_buffer_size, encoding_buffer_size)
1254 (emacs_mule_string_char): Remove unused extern decls.
1255 (struct iso_2022_spec, struct coding_system):
1256 Use 'unsigned int : 1' for boolean fields, since there's more than one.
1257 (struct emacs_mule_spec): Remove unused field 'full_support'.
1258 All initializations removed.
1259 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
1261 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
1263 Fix spare memory change (Bug#12286).
1264 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
1265 (valid_lisp_object_p): Likewise.
1267 2012-08-27 Martin Rudalics <rudalics@gmx.at>
1269 * window.c (Fset_window_configuration): Record any window's old
1270 buffer if it's replaced (see Bug#8789). If the new current
1271 buffer doesn't appear in the selected window, go to its old
1274 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
1276 Special MEM_TYPE_SPARE to denote reserved memory.
1277 * alloc.c (enum mem_type): New memory type.
1278 (refill_memory_reserve): Use new type for spare memory.
1279 This prevents live_cons_p and live_string_p from incorrect
1280 detection of uninitialized objects from spare memory as live.
1282 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
1285 * Makefile.in (.PHONY): versioclean -> versionclean.
1287 Remove unused external symbols.
1288 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
1289 * window.c (Qwindow_valid_p, decode_valid_window):
1290 Now static, not extern.
1291 * data.c (Qinterval): Remove; unused.
1292 (syms_of_data): Do not define 'interval'.
1293 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
1294 * window.h (decode_valid_window):
1297 * character.c, charset.c, chartab.c: Use bool for booleans.
1298 * character.c (lisp_string_width, string_count_byte8)
1299 (string_escape_byte8):
1300 * charset.c (charset_map_loaded, load_charset_map, read_hex):
1301 (load_charset_map_from_file, map_charset_chars)
1302 (Fdefine_charset_internal, define_charset_internal)
1303 (Fdeclare_equiv_charset, find_charsets_in_text)
1304 (Ffind_charset_region, char_charset, Fiso_charset):
1305 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
1306 (sub_char_table_set, sub_char_table_set_range)
1307 (char_table_set_range, optimize_sub_char_table)
1308 (map_sub_char_table):
1309 Use bool for boolean.
1310 * character.c (str_to_unibyte): Omit last boolean argument; it was
1311 always 0. All callers changed.
1312 * character.h, charset.h: Adjust to match previous changes.
1313 * character.h (char_printable_p): Remove decl of nonexistent function.
1314 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
1315 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
1316 are all boolean, so make them single-bit bitfields.
1318 * lisp.h (ASET): Remove attempt to detect side effects.
1319 It was meant to be temporary and it often doesn't work,
1320 because when IDX has side effects the behavior of IDX==IDX
1321 is undefined. See Stefan Monnier in
1322 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
1324 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
1326 * lisp.h (functionp): New function (extracted from Ffunctionp).
1327 (FUNCTIONP): Use it.
1328 * eval.c (Ffunctionp): Use it.
1330 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
1332 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
1333 as that's faster and simpler than static storage. Don't bother
1334 with the g_main_context_query overhead if g_main_context_pending
1335 says no events are pending.
1336 (gfds, gfds_size): Remove these static vars.
1337 (xgselect_initialize): Remove; no longer needed.
1338 All uses and decls removed.
1340 * emacs.c (fatal_error_signal_hook): Remove.
1341 All uses removed. This leftover from old code was always 0.
1343 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
1344 * casefiddle.c (casify_object, casify_region):
1345 * casetab.c (set_case_table):
1346 * category.c, category.h (word_boundary_p):
1347 * category.h (CHAR_HAS_CATEGORY):
1348 Use bool for booleans, instead of int.
1350 2012-08-25 Eli Zaretskii <eliz@gnu.org>
1352 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
1354 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
1356 On assertion failure, print backtrace if available.
1357 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
1358 (die) [ENABLE_CHECKING]: Print a backtrace if available.
1359 * Makefile.in (LIB_EXECINFO): New macro.
1362 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
1363 * bytecode.c (exec_byte_code):
1364 * callint.c (check_mark, Fcall_interactively):
1365 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
1366 (getenv_internal, sync_process_alive, call_process_exited):
1367 * lisp.h (USE_SAFE_ALLOCA):
1368 Use bool for booleans, instead of int.
1369 * lisp.h, process.h: Adjust prototypes to match above changes.
1370 * callint.c (Fcall_interactively): Don't assume the mark's
1371 offset fits in 'int'.
1373 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
1375 * buffer.c, buffer.h: Use bool for boolean.
1376 * buffer.c (reset_buffer_local_variables)
1377 (buffer_lisp_local_variables, Fset_buffer_modified_p)
1378 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
1379 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
1380 (overlay_touches_p, overlay_strings, Foverlay_put)
1381 (report_overlay_modification, call_overlay_mod_hooks):
1382 (mmap_enlarge, mmap_set_vars):
1383 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
1384 Use bool for booleans, instead of int.
1385 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
1386 since the 1-or-0 return value is always ignored anyway.
1387 (mmap_initialized_p):
1388 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
1389 * buffer.h, lisp.h: Adjust prototypes to match above changes.
1391 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
1393 * bidi.c: Use bool for boolean.
1394 This is a bit more readable, and makes the text segment of bidi.o
1395 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
1396 Presumably it's faster too.
1397 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
1399 (bidi_cache_find_level_change, bidi_cache_iterator_state)
1400 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
1401 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
1402 (bidi_explicit_dir_char, bidi_level_of_next_char)
1403 (bidi_find_other_level_edge, bidi_move_to_visually_next):
1404 Use bool for booleans, instead of int.
1405 * dispextern.h (bidi_init_it, bidi_paragraph_init)
1406 (bidi_unshelve_cache): Adjust decls to match code.
1408 2012-08-23 Martin Rudalics <rudalics@gmx.at>
1410 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
1413 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
1415 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
1416 * atimer.h: Include <stdbool.h>.
1418 2012-08-22 Dan Nicolaescu <dann@gnu.org>
1420 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
1421 compile time tests instead of run time tests on systems that do
1423 (FRAME_MAC_P): Remove leftover from deleted code.
1424 * frame.c (syms_of_frame): Remove leftover from deleted code.
1426 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
1428 * nsterm.m (insertText:): Don't clear modifiers if code is space.
1430 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
1432 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
1433 Otherwise, the compiler complains about (A?B:C) where B is void
1434 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
1435 (fontset_add): Return void, for FONTSET_ADD.
1437 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
1439 * alloc.c: Use bool for booleans.
1440 (gc_in_progress, abort_on_gc)
1441 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
1442 (dont_register_blocks) [GC_MALLOC_CHECK]:
1443 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
1444 (check_string_bytes, make_specified_string, memory_full)
1445 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
1446 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
1447 (mark_stack, valid_pointer_p, make_pure_string)
1448 (Fgarbage_collect, survives_gc_p, gc_sweep):
1449 Use bool for booleans, instead of int.
1450 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
1451 Remove unused local.
1452 * alloc.c (PURE_POINTER_P):
1453 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
1454 * editfns.c (Fformat):
1455 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
1457 * fns.c (sweep_weak_table):
1458 * lisp.h (suppress_checking, push_message, survives_gc_p)
1459 (make_pure_string, gc_in_progress, abort_on_gc):
1460 * lread.c (readchar, read1):
1461 * print.c (Fprin1_to_string):
1462 * xdisp.c (push_message):
1463 Use bool for booleans affected directly or indirectly by
1466 Make recently-introduced setters macros.
1467 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
1468 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
1469 (set_fontset_default, set_fontset_fallback): Rename from their
1470 upper-case counterparts, and make them functions rather than macros.
1471 This is more consistent with the other recently-introduced setters.
1472 These don't need to be inline, since they're local.
1474 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
1476 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
1477 the loop (Bug#12247).
1479 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
1481 * lisp.h (vcopy): Use memcpy rather than our own loop.
1482 This fixes a performance regression introduced by the recent
1483 addition of vcopy. This means 'vcopy' will need to be modified
1484 for a copying collector, but that's OK. Also, tighten the
1485 checking in the assertion.
1487 2012-08-21 Eli Zaretskii <eliz@gnu.org>
1489 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
1490 components for RTL text (Bug#11860). Adjust X-OFFSET of each
1491 non-base glyph for the width of the base character, according to
1492 what x_draw_composite_glyph_string_foreground expects.
1493 Generate WADJUST value according to composition_gstring_width's
1494 expectations, to produce correct width of the composed character.
1495 Reverse the sign of the DU offset produced by ScriptPlace.
1497 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
1499 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
1501 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
1503 Avoid direct writes to contents member of struct Lisp_Vector.
1504 * lisp.h (vcopy): New function to copy data into vector.
1505 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
1506 * fns.c (Ffillarray): Use ASET.
1507 * keyboard.c (timer_check_2): Use AREF and ASET.
1508 (append_tool_bar_item, Frecent_keys): Use vcopy.
1509 * lread.c (read_vector): Use ASET.
1510 * msdos.c (Frecent_doskeys): Use vcopy.
1511 * xface.c (Finternal_copy_lisp_face): Use vcopy.
1512 (Finternal_merge_in_global_face): Use ASET and vcopy.
1513 * xfont.c (xfont_list_pattern): Likewise.
1515 2012-08-21 Martin Rudalics <rudalics@gmx.at>
1517 * window.c (Fwindow_point): For the selected window always return
1518 the position of its buffer's point.
1519 (Fset_window_point): For the selected window always go in its
1520 buffer to the specified position.
1522 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
1524 Setter macros for fontsets.
1525 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
1526 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
1527 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
1530 2012-08-20 Glenn Morris <rgm@gnu.org>
1532 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
1533 Don't assume that `ln -f' works.
1535 2012-08-20 Eli Zaretskii <eliz@gnu.org>
1537 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
1538 and later about non-assignments with no effect. See discussion at
1539 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
1542 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
1544 Inline setter functions for Lisp_Objects slots of struct specbinding.
1545 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
1548 2012-08-20 Martin Rudalics <rudalics@gmx.at>
1550 * window.c (select_window): Always make selected window's buffer
1553 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
1555 Use AREF and ASET for docstrings of category tables.
1556 * category.h (CATEGORY_DOCSTRING): Use AREF.
1557 (SET_CATEGORY_DOCSTRING): Use ASET.
1558 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
1560 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
1562 Inline setter functions for hash table members.
1563 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
1564 (set_hash_hash, set_hash_index): Rename with _slot suffix.
1565 (set_hash_key_and_value, set_hash_index, set_hash_next)
1566 (set_hash_hash): New functions.
1567 * charset.c, fns.c: Adjust users.
1569 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
1571 Inline getter and setter functions for per-buffer values.
1572 * buffer.h (per_buffer_default, set_per_buffer_default)
1573 (per_buffer_value, set_per_buffer_value): New functions.
1574 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
1575 * buffer.c, data.c: Adjust users.
1577 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
1579 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
1581 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
1583 Rely on <config.h> + <unistd.h> to declare 'environ',
1584 as gnulib does this if the system doesn't.
1585 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
1586 Remove declaration. MS-Windows declares it on stdlib.h which is
1587 included by conf_post.h.
1588 * emacs.c (environ) [DOUG_LEA_MALLOC]:
1589 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
1590 * vm-limit.c: Include <unistd.h>, for 'environ'.
1592 * unexaix.c, unexcoff.c: Include "mem-limits.h".
1593 (start_of_data): Remove decl; mem-limits.h provides it.
1595 * xdisp.c (handle_invisible_prop): Make it a bit faster
1596 and avoid a gcc -Wmaybe-uninitialized diagnostic.
1598 2012-08-19 Chong Yidong <cyd@gnu.org>
1600 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
1603 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
1605 * .gdbinit: Use call instead of set when calling a function in the
1608 * data.c (set_internal): Don't use set_blv_found.
1609 (Fkill_local_variable): Likewise.
1611 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
1613 * nsfont.m (ns_ascii_average_width): Ensure the string
1614 ascii_printable is initialized with a null-terminated character
1615 array. Otherwise, it can contain undesired extra characters.
1617 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
1619 port new setting code to Sun C 5.8 2005/10/13
1620 * chartab.c, lisp.h (char_table_set, char_table_set_range):
1621 Return void, not Lisp_Object. Otherwise, the compiler
1622 complains about (A?B:C) where B is void and C is Lisp_Object
1623 when compiling CHAR_TABLE_SET, due to the recent change to
1624 the API of sub_char_table_set_contents.
1626 2012-08-18 Chong Yidong <cyd@gnu.org>
1628 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
1629 for the string case (Bug#3874).
1631 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
1633 * buffer.h (BSET): Remove (Bug#12215).
1634 Replace all uses with calls to new setter functions.
1635 (bset_bidi_paragraph_direction, bset_case_canon_table)
1636 (bset_case_eqv_table, bset_directory, bset_display_count)
1637 (bset_display_time, bset_downcase_table)
1638 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
1639 (bset_last_selected_window, bset_local_var_alist)
1640 (bset_mark_active, bset_point_before_scroll, bset_read_only)
1641 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
1643 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
1644 (bset_auto_fill_function, bset_auto_save_file_format)
1645 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
1646 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
1647 (bset_cache_long_line_scans, bset_case_fold_search)
1648 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
1649 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
1650 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
1651 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
1652 (bset_header_line_format, bset_indicate_buffer_boundaries)
1653 (bset_indicate_empty_lines, bset_invisibility_spec)
1654 (bset_left_fringe_width, bset_major_mode, bset_mark)
1655 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
1656 (bset_name, bset_overwrite_mode, bset_pt_marker)
1657 (bset_right_fringe_width, bset_save_length)
1658 (bset_scroll_bar_width, bset_scroll_down_aggressively)
1659 (bset_scroll_up_aggressively, bset_selective_display)
1660 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
1661 (bset_word_wrap, bset_zv_marker):
1662 * category.c (bset_category_table):
1663 * syntax.c (bset_syntax_table):
1664 New setter functions.
1666 * process.h (PSET): Remove (Bug#12215).
1667 Replace all uses with calls to new setter functions.
1668 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
1669 (PROCESS_INLINE): New macro.
1670 (pset_childp): New setter function.
1671 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
1672 * process.c (PROCESS_INLINE):
1673 Define to EXTERN_INLINE, so that the corresponding functions
1674 are compiled into code.
1675 (pset_buffer, pset_command, pset_decode_coding_system)
1676 (pset_decoding_buf, pset_encode_coding_system)
1677 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
1678 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
1679 (pset_type, pset_write_queue): New setter functions.
1681 * window.h (WSET): Remove (Bug#12215).
1682 Replace all uses with calls to new setter functions.
1683 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
1684 (WINDOW_INLINE): New macro.
1685 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
1686 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
1687 (wset_total_lines, wset_vertical_scroll_bar)
1688 (wset_window_end_pos, wset_window_end_valid)
1689 (wset_window_end_vpos): New setter functions.
1690 * window.c (WINDOW_INLINE):
1691 Define to EXTERN_INLINE, so that the corresponding functions
1692 are compiled into code.
1693 (wset_combination_limit, wset_dedicated, wset_display_table)
1694 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
1695 (wset_new_normal, wset_new_total, wset_next_buffers)
1696 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
1697 (wset_prev_buffers, wset_right_fringe_width)
1698 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
1699 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
1700 (wset_window_parameters):
1701 * xdisp.c (wset_base_line_number, wset_base_line_pos)
1702 (wset_column_number_displayed, wset_region_showing):
1703 New setter functions.
1705 * termhooks.h (TSET): Remove (Bug#12215).
1706 Replace all uses with calls to new setter functions.
1707 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
1708 (TERMHOOKS_INLINE): New macro.
1709 (tset_charset_list, tset_selection_alist): New setter functions.
1710 * terminal.c (TERMHOOKS_INLINE):
1711 Define to EXTERN_INLINE, so that the corresponding functions
1712 are compiled into code.
1713 (tset_param_alist): New setter function.
1715 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
1717 * keyboard.h (KSET): Remove (Bug#12215).
1718 Replace all uses with calls to new setter functions.
1719 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
1720 (KEYBOARD_INLINE): New macro.
1721 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
1722 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
1723 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
1724 New setter functions.
1725 * keyboard.c (KEYBOARD_INLINE):
1726 Define to EXTERN_INLINE, so that the corresponding functions
1727 are compiled into code.
1728 (kset_echo_string, kset_kbd_queue)
1729 (kset_keyboard_translate_table, kset_last_prefix_arg)
1730 (kset_last_repeatable_command, kset_local_function_key_map)
1731 (kset_overriding_terminal_local_map, kset_real_last_command)
1732 (kset_system_key_syms): New setter functions.
1734 * frame.h (FSET): Remove (Bug#12215).
1735 Replace all uses with calls to new setter functions.
1736 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
1737 (FRAME_INLINE): New macro.
1738 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
1739 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
1740 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
1741 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
1742 (fset_param_alist, fset_root_window, fset_scroll_bars)
1743 (fset_selected_window, fset_title, fset_tool_bar_items)
1744 (fset_tool_bar_position, fset_tool_bar_window): New functions.
1745 * frame.c (FRAME_INLINE):
1746 Define to EXTERN_INLINE, so that the corresponding functions
1747 are compiled into code.
1748 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
1750 A few more naming-convention fixes for getters and setters.
1751 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
1752 and rename from buffer_overlays_set_before.
1753 (set_buffer_overlays_after): Move here from buffer.h, and rename
1754 from buffer_overlays_set_after.
1755 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
1757 (set_buffer_intervals): Rename from buffer_set_intervals.
1758 * intervals.c (set_interval_object): Move here from intervals.h,
1759 and rename from interval_set_object.
1760 (set_interval_left): Move here from intervals.h, and rename from
1762 (set_interval_right): Move here from intervals.h, and rename from
1764 (copy_interval_parent): Move here from intervals.h, and rename from
1765 interval_copy_parent.
1766 * intervals.h (set_interval_parent): Rename from interval_set_parent.
1767 (set_interval_plist): Rename from interval_set_plist.
1768 Return void, not Lisp_Object, since no caller uses the result.
1769 * lisp.h (string_intervals): Rename from string_get_intervals.
1770 (set_string_intervals): Rename from string_set_intervals.
1772 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
1773 (set_char_table_contents): Rename from char_table_set_contents.
1774 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
1775 All uses changed. See the end of
1776 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
1778 * lisp.h (CSET): Remove (Bug#12215).
1779 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
1780 (set_char_table_purpose): New functions,
1781 replacing CSET. All uses changed. For example, replace
1782 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
1783 "set_char_table_parent (char_table, parent);".
1784 The old version was confusing because it used the same name
1785 'parent' for two different things.
1787 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
1789 Functions to get and set Lisp_Object fields of buffer-local variables.
1790 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
1791 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
1792 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
1793 * data.c, eval.c, frame.c: Adjust users.
1795 2012-08-17 Chong Yidong <cyd@gnu.org>
1797 * xfaces.c (merge_face_vectors): If the target font specfies a
1798 font spec, make the font's attributes take precedence over
1799 directly-specified attributes.
1800 (merge_face_ref): Recognize :font.
1802 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
1804 Do not use memcpy for copying intervals.
1805 * intervals.c (reproduce_interval): New function.
1806 (reproduce_tree, reproduce_tree_obj): Use it.
1807 (reproduce_tree_obj): Remove prototype.
1809 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
1811 * lisp.h (duration_to_sec_usec): Remove unused decl.
1813 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
1815 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
1816 to an allocated instance of NSString, not to the class itself.
1818 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
1820 * makefile.w32-in (C_CTYPE_H): New macro.
1821 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
1822 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
1823 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
1825 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
1827 Use ASCII tests for character types.
1828 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
1830 Don't include <ctype.h>; was not needed.
1831 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
1832 * sysdep.c, xfaces.c:
1833 Include <c-ctype.h> instead of <ctype.h>.
1834 * nsterm.m: Include <c-ctype.h>.
1835 * charset.c (read_hex):
1836 * doc.c (Fsnarf_documentation):
1837 * fileio.c (IS_DRIVE) [WINDOWSNT]:
1838 (DRIVE_LETTER) [DOS_NT]:
1839 (Ffile_name_directory, Fexpand_file_name)
1840 (Fsubstitute_in_file_name):
1841 * font.c (font_parse_xlfd, font_parse_fcname):
1842 * frame.c (x_set_font_backend):
1843 * gtkutil.c (xg_get_font):
1844 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
1845 * nsimage.m (hexchar):
1846 * nsterm.m (ns_xlfd_to_fontname):
1847 * sysdep.c (system_process_attributes):
1848 * xfaces.c (hash_string_case_insensitive):
1849 Use C-locale tests instead of locale-specific tests for character
1850 types, since we want the ASCII interpretation here, not the
1851 interpretation suitable for whatever happens to be the current locale.
1853 2012-08-16 Martin Rudalics <rudalics@gmx.at>
1855 Consistently check windows for validity/liveness
1856 (Bug#11984, Bug#12025, Bug#12026).
1857 * lisp.h (CHECK_VALID_WINDOW): New macro.
1858 * window.c (decode_window): Rename to decode_live_window.
1859 (decode_valid_window, Fwindow_valid_p): New functions.
1860 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
1861 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
1862 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
1863 (Fwindow_prev_sibling, Fwindow_combination_limit)
1864 (Fset_window_combination_limit, Fwindow_use_time)
1865 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
1866 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
1867 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
1868 (Fwindow_hscroll, Fset_window_hscroll)
1869 (Fwindow_redisplay_end_trigger)
1870 (Fset_window_redisplay_end_trigger, Fwindow_edges)
1871 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
1872 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
1873 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
1874 (Fwindow_end, Fset_window_point, Fset_window_start)
1875 (Fpos_visible_in_window_p, Fwindow_line_height)
1876 (Fwindow_dedicated_p, Fset_window_dedicated_p)
1877 (Fwindow_prev_buffers, Fset_window_prev_buffers)
1878 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
1879 (Fset_window_parameter, Fwindow_display_table)
1880 (Fset_window_display_table, Fdelete_other_windows_internal)
1881 (Fset_window_buffer, Fset_window_new_total)
1882 (Fset_window_new_normal, Fdelete_window_internal)
1883 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
1884 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
1885 (Fwindow_scroll_bars): Check whether argument window is a valid or
1886 live window. Update doc-strings.
1887 (syms_of_window): New symbol Qwindow_valid_p.
1888 * keyboard.c (Fposn_at_x_y): Check whether argument
1889 frame_or_window denotes a valid window.
1891 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
1893 Fix previous char table change.
1894 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
1895 * chartab.c (optimize_sub_char_table): Likewise.
1897 2012-08-16 Chong Yidong <cyd@gnu.org>
1899 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
1901 * xfont.c (xfont_open):
1902 * xftfont.c (xftfont_open): Set the font's max_width field.
1904 * nsfont.m (nsfont_open): Similar to the Xft backend, set
1905 min_width to space_width and average_width to the average over
1906 printable ASCII characters.
1907 (ns_char_width): Code cleanup.
1908 (ns_ascii_average_width): New utility function.
1910 * font.h (struct font): Update comments.
1912 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
1914 Simple interface to set Lisp_Object fields of character tables.
1915 * lisp.h (CSET): New macro.
1916 (char_table_set_extras, char_table_set_contents)
1917 (sub_char_table_set_contents): New function.
1918 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
1919 * syntax.c: Adjust users.
1921 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
1923 * eval.c (eval_sub): Bind lexical-binding.
1924 * lread.c (Qlexical_binding): Make non-static.
1926 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
1928 * nsmenu.m (popupSession): Remove.
1929 (pop_down_menu): Remove endModalSession.
1930 (timeout_handler:): New method.
1931 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
1932 Call runModalForWindow. Check timer_fired when it returns.
1933 If not set, cancel timer and break out of loop.
1934 Otherwise loop again, with a new timeout.
1936 * nsterm.m: Include fcntl.h if present.
1937 (fd_entry, t_readfds, inNsSelect): Remove.
1938 (select_writefds, select_valid, select_timeout, selfds)
1939 (select_mutex, apploopnr): Add.
1940 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
1941 Otherwise call kbd_buffer_store_event.
1942 (ns_send_appdefined): Remove release of fd_entry.
1943 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
1944 Increment and decrement apploopnr.
1945 (ns_select): If no file descriptors, just do a NSTimer.
1946 Otherwise copy read/write masks and start select thread (fd_handler).
1947 Start main loop and wait for application defined event.
1948 Inform select thread to stop selecting after main loop is exited.
1949 (ns_term_init): Create selfds pipe and set non-blocking.
1950 Initialize select_mutex. Start the select thread (fd_handler).
1951 (fd_handler:): Loop forever, wait for info from the main thread
1952 to either start or stop selecting. When select returns, send
1953 and appdefined event.
1954 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
1955 If not call kbd_buffer_store_event.
1957 * nsterm.h (EmacsApp): fd_handler takes id argument.
1958 (EmacsDialogPanel): Add timer_fired and timeout_handler.
1960 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
1962 2012-08-15 Eli Zaretskii <eliz@gnu.org>
1964 * region-cache.c (move_cache_gap): Update gap_len using the actual
1965 growth of the boundaries array. Do not change cache_len.
1968 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
1970 Generalize and cleanup font subsystem checks.
1971 * font.h (FONT_DEBUG, font_assert): Remove.
1972 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
1973 Change font_assert to eassert. Use eassert where appropriate.
1975 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
1977 * gtkutil.c (xg_get_font): Use pango_units_to_double.
1979 2012-08-15 Chong Yidong <cyd@gnu.org>
1981 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
1982 When using the new font chooser, use gtk_font_chooser_get_font_desc to
1983 extract the font descriptor instead of just the font name.
1984 In that case, return a font spec instead of a string.
1985 (x_last_font_name): Move to this file from xfns.c.
1987 * xfns.c (Fx_select_font): The return value can also be a font
1988 spec. Move x_last_font_name management to gtkutil.c.
1990 * xfaces.c: Make font weight and style symbols non-static.
1992 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
1994 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
1997 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
1999 * alloc.c (Fgarbage_collect): Use plural form consistently.
2001 2012-08-14 Eli Zaretskii <eliz@gnu.org>
2003 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
2004 iteration through the command loop. Fixes a problem whereby mouse
2005 movements are ignored until the first mouse click.
2007 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
2009 Use bool, not int, for Lisp booleans.
2010 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
2011 makes Emacs a bit smaller and presumably a bit faster.
2012 * lisp.h: Include <stdbool.h>.
2013 (struct Lisp_Boolfwd, defvar_bool):
2014 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
2015 * regex.c [!emacs]: Include <stdbool.h>.
2016 (false, true): Remove; <stdbool.h> does this for us now.
2018 2012-08-14 Chong Yidong <cyd@gnu.org>
2020 * character.c (Fcharacterp): Doc fix (Bug#12076).
2022 * data.c (Findirect_variable): Doc fix (Bug#11040).
2024 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
2026 * editfns.c (Fformat): Doc fix (Bug#12059).
2027 (Fsave_current_buffer): Doc fix (Bug#11542).
2029 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
2031 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
2034 2012-08-14 Martin Rudalics <rudalics@gmx.at>
2036 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
2037 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
2038 * minibuf.c (choose_minibuf_frame, read_minibuf):
2039 * w32fns.c (x_create_tip_frame):
2040 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
2041 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
2043 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
2045 * intervals.c (offset_intervals): Remove obsolete comment.
2047 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
2049 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
2051 2012-08-14 Gergely Risko <gergely@risko.hu>
2053 * coding.c (decode_coding): Record buffer modification before
2054 disabling undo_list (Bug#11773).
2056 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
2058 Revert and cleanup some recent overlay changes.
2059 * buffer.h (enum overlay_type): Remove.
2060 (buffer_get_overlays, buffer_set_overlays): Likewise.
2061 (buffer_set_overlays_before, buffer_set_overlays_after):
2062 New function. Adjust users.
2063 (unchain_both): Add eassert.
2065 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
2067 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
2069 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
2071 * gtkutil.c (xg_mark_data): Don't assume C99.
2073 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
2075 * gtkutil.c (xg_frame_tb_info): New struct.
2076 (TB_INFO_KEY): New define.
2077 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
2078 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
2079 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
2081 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
2082 is up to date. Otherwise store new data.
2083 (free_frame_tool_bar): Free xg_frame_tb_info if present.
2085 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
2087 Use KSET for write access to Lisp_Object members of struct kboard.
2088 * keyboard.h (KSET): New macro.
2089 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
2090 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
2091 * xterm.c: Adjust users.
2093 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
2095 Use BSET for write access to Lisp_Object members of struct buffer.
2096 * buffer.h (BSET): New macro.
2097 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
2098 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
2099 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
2100 * window.c, xdisp.c, xfns.c: Adjust users.
2102 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
2104 * lread.c (syms_of_lread): Initialize Vlexical_binding.
2106 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
2108 * nsterm.m (not_in_argv): New function.
2109 (application:openFile, application:openTempFile:):
2110 (application:openFileWithoutUI:, application:openFiles:): Open file
2111 if not_in_argv returns non-zero (bug#12171).
2113 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
2114 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
2115 Define for Gtk+ versions less than 3.2.
2116 (xg_get_font_name): Use those functions/macros here.
2117 Reported by Frans Oilinki <moilinki@gmail.com>.
2119 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2121 * unexmacosx.c (copy_data_segment): Copy initialized data in
2122 statically linked libraries from input file rather than memory.
2124 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
2125 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
2126 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
2128 2012-08-10 Glenn Morris <rgm@gnu.org>
2130 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
2131 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
2133 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
2135 Fix last change to allow compilation with low optimization levels.
2136 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
2137 Reported by Jan Djärv <jan.h.d@swipnet.se>.
2139 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
2141 Use common inline syntax in intervals.h.
2142 * intervals.h (INTERVALS_INLINE): New macro.
2143 Change all users from LISP_INLINE.
2145 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
2147 Define Qnone once for all platforms.
2148 * frame.c (Qnone): Define here.
2149 (syms_of_frame): DEFSYM it.
2150 * lisp.h (Qnone): New declaration.
2151 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
2152 * xfns.c: Remove duplication. Adjust users.
2154 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
2156 Remove unused macros from intervals.h.
2157 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
2158 * intervals.c: Adjust comment.
2160 2012-08-10 Eli Zaretskii <eliz@gnu.org>
2162 * w32fns.c <w32_unicode_gui>: New static variable.
2163 (globals_of_w32fns): Initialize it according to os_subtype.
2164 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
2167 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
2168 Eli Zaretskii <eliz@gnu.org>
2170 Fix bug #10299 with Unicode characters sent by customized
2171 keyboards created by MSKLC.
2172 * w32fns.c (INIT_WINDOW_CLASS): New macro.
2173 (w32_init_class): Use it to initialize the Emacs class with either
2174 ANSI or Unicode API calls.
2175 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
2177 (w32_wnd_proc): If the character code sent by WM_CHAR or
2178 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
2179 original message. Call DefWindowProcW on NT and later.
2181 2012-08-10 Glenn Morris <rgm@gnu.org>
2183 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
2185 * lisp.h (DIRECTORY_SEP): Let configure set it.
2187 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
2189 Use TSET for write access to Lisp_Object slots of struct terminal.
2190 * termhooks.h (TSET): New macro.
2191 * coding.c, terminal.c, xselect.c: Adjust users.
2193 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
2195 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
2196 the failing expression, include them in the error message.
2197 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
2198 * lisp.h (internal_condition_case_n): Update declaration.
2200 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2202 Inline functions to examine and change buffer overlays.
2203 * buffer.c (unchain_both): New function.
2204 * buffer.h (buffer_get_overlays, buffer_set_overlays):
2205 (buffer_has_overlays): New function.
2206 (enum overlay_type): New enum.
2207 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
2208 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
2210 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2212 Inline functions to examine and change buffer intervals.
2213 * alloc.c (mark_interval_tree): Remove.
2214 (MARK_INTERVAL_TREE): Simplify.
2215 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
2216 * intervals.c (buffer_balance_intervals): New function.
2217 (graft_intervals_into_buffer): Adjust indentation.
2218 (set_intervals_multibyte): Simplify.
2219 * buffer.h (BUF_INTERVALS): Remove.
2220 (buffer_get_intervals, buffer_set_intervals): New function.
2221 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
2222 * intervals.c, textprop.c: Adjust users.
2224 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2226 Inline functions to examine and change string intervals.
2227 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
2228 (string_get_intervals, string_set_intervals): New function.
2229 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
2230 * lread.c, print.c, textprop.c: Adjust users.
2232 2012-08-08 Glenn Morris <rgm@gnu.org>
2234 * lisp.mk (lisp): Remove language/persian.elc.
2236 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2239 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
2240 (NULL_INTERVAL_P): Likewise. Adjust users.
2241 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
2242 Adjust comment. Move under #if 0.
2243 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
2244 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
2246 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2248 Check total length of intervals with eassert.
2249 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
2250 * intervals.c: Change all users to eassert.
2252 2012-08-07 Eli Zaretskii <eliz@gnu.org>
2254 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
2255 Rename fields to match removal of FGET and WGET and disuse of
2256 INTERNAL_FIELD in Lisp_Cons.
2258 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2260 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
2261 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
2262 name since all xname users are fixed long time ago. Do not
2264 (set_symbol_name, set_symbol_function, set_symbol_plist):
2265 (set_symbol_next, set_overlay_plist): New function.
2266 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
2267 (struct Lisp_Overlay): Likewise.
2268 (CVAR, MVAR, SVAR): Remove.
2269 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
2270 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
2271 * xterm.c: Adjust users.
2272 * .gdbinit: Change to use name field of struct Lisp_Symbol
2275 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2277 Basic functions to set Lisp_Object and pointer slots of intervals.
2278 * intervals.h (interval_set_parent, interval_set_object):
2279 (interval_set_left, interval_set_right, interval_set_plist):
2280 (interval_copy_parent): New function.
2281 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
2282 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
2284 (INTERVAL_SIZE): Remove. Adjust users.
2285 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
2287 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2289 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
2290 * process.h (PGET): Remove.
2291 (struct Lisp_Process): Do not use INTERNAL_FIELD.
2292 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
2294 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2296 Drop WGET and revert read access to Lisp_Objects slots of struct window.
2297 * window.h (WGET): Remove.
2298 (struct window): Do not use INTERNAL_FIELD.
2299 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
2300 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
2301 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
2302 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
2303 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
2306 2012-08-07 Chong Yidong <cyd@gnu.org>
2308 * window.c (Fwindow_edges, Fwindow_pixel_edges)
2309 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
2310 (Fdelete_window_internal): Signal an error if the window is not on
2311 a live frame (Bug#12025).
2313 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2315 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
2316 * frame.h (FGET): Remove.
2317 (struct frame): Do not use INTERNAL_FIELD.
2318 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
2319 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
2320 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
2321 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
2323 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
2325 * w32.c: Silence compiler warnings.
2326 (map_w32_filename): Remove unused variable `is_fat'.
2327 (chase_symlinks): Add parentheses around expression.
2329 2012-08-06 Glenn Morris <rgm@gnu.org>
2331 * sysdep.c: Respect BROKEN_GETWD.
2333 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
2334 Let configure handle it.
2335 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
2337 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2339 Use GCALIGNMENT where appropriate.
2340 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
2341 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
2342 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
2344 2012-08-06 Eli Zaretskii <eliz@gnu.org>
2346 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
2347 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
2349 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
2351 * buffer.h (struct buffer): Revert `indirections' to a simple int;
2352 that should be sufficient for everyone.
2354 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
2356 * keyboard.c (timer_check_2): Add break so timer_check returns next
2359 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2361 Fix Windows build errors introduced after converting to WGET and WSET.
2362 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
2363 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
2365 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
2367 * nsterm.m (ns_frame_rehighlight): Use FSET.
2369 * nsmenu.m (ns_update_menubar): Use FSET.
2371 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2373 Separate read and write access to Lisp_Object slots of Lisp_Process.
2374 * process.h (PGET, PSET): New macros similar to AREF and ASET.
2375 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
2377 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2379 Separate read and write access to Lisp_Object slots of struct window.
2380 * window.h (WGET, WSET): New macros similar to AREF and ASET.
2381 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
2382 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
2383 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
2384 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
2385 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
2388 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2390 Fix Windows build errors introduced after converting to FGET and FSET.
2391 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
2392 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
2393 (w32_judge_scroll_bars): Change to use FSET.
2394 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
2396 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2398 Fix replacement typo.
2399 * window.c (replace_window): Set root_window instead of
2400 selected_window. This fixes a total window subsystem
2401 malfunction reported by Bastien Guerry <bzg@gnu.org>.
2403 2012-08-06 Glenn Morris <rgm@gnu.org>
2405 * lisp.mk (lisp): Add language/persian.elc.
2407 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2409 Separate read and write access to Lisp_Object slots of struct frame.
2410 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
2411 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
2412 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
2413 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
2414 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
2416 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
2418 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
2420 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
2422 Generalize common compile-time constants.
2423 * lisp.h (header_size, bool_header_size, word_size): Now here.
2424 (struct Lisp_Vector): Add comment.
2425 (struct Lisp_Bool_Vector): Move up to define handy constants.
2426 (VECSIZE, PSEUDOVECSIZE): Simplify.
2427 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
2428 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
2429 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
2430 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
2431 * xfont.c, xmenu.c: Use word_size where appropriate.
2433 2012-08-05 Lawrence Mitchell <wence@gmx.li>
2435 * search.c (Freplace_match): Treat \? in the replacement text
2436 literally (Bug#8161).
2438 2012-08-05 Chong Yidong <cyd@gnu.org>
2440 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
2441 * frame.c (Vdelete_frame_functions):
2442 * emacs.c (Vkill_emacs_hook): Doc fix.
2444 2012-08-04 Eli Zaretskii <eliz@gnu.org>
2446 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
2447 --with-x-toolkit=no builds.
2448 Reported by Carsten Mattner <carstenmattner@gmail.com>.
2450 2012-08-04 Chong Yidong <cyd@gnu.org>
2452 * syntax.c (Fmodify_syntax_entry): Doc fix.
2454 2012-08-04 Eli Zaretskii <eliz@gnu.org>
2456 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
2457 * w32.c (init_environment): Change the default values of many
2458 environment variables in dflt_envvars[] to NULL, to avoid pushing
2459 them into environment when they were not already defined.
2460 Remove the code that deletes site-lisp subdirectories from the default
2461 value of EMACSLOADPATH, as it is no longer needed.
2462 (check_windows_init_file): Now external, not static.
2463 Use Vload_path as is, without adding anything, as this function is now
2464 called when Vload_path is already set up.
2466 * w32.h (check_windows_init_file): Add prototype.
2468 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
2469 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
2470 compatibility with Posix platforms.
2471 (main): Move the call to check_windows_init_file to here from
2473 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
2474 any, in the DEFALT argument into the root of the Emacs build or
2475 installation tree, as appropriate.
2477 * callproc.c (init_callproc_1): Call decode_env_path instead of
2478 doing its equivalent by hand.
2479 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
2480 the code that sets Vexec_path run on MS-Windows.
2482 * lread.c (init_lread): Add comments to #ifdef's.
2484 * msdos.c (dos_set_window_size, IT_update_begin)
2485 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
2486 instead of direct references.
2488 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
2490 Export DEFAULT_REHASH_* to GDB.
2491 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
2492 Now constants, not macros.
2494 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
2496 Remove unnecessary casts involving pointers.
2497 These casts are no longer needed now that we assume C89 or later,
2498 since they involve casting to or from void *.
2499 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
2500 (make_pure_float, make_pure_vector):
2501 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
2502 * macros.c (Fstart_kbd_macro):
2503 * menu.c (find_and_return_menu_selection):
2504 * minibuf.c (read_minibuf_noninteractive):
2505 * sysdep.c (closedir):
2506 * xdisp.c (x_produce_glyphs):
2507 * xfaces.c (compare_fonts_by_sort_order):
2508 * xfns.c (x_real_positions, select_visual):
2509 * xselect.c (x_stop_queuing_selection_requests)
2510 (x_get_window_property, x_get_window_property_as_lisp_data):
2511 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
2512 Remove unnecessary pointer casts.
2513 * alloc.c (record_xmalloc): New function.
2514 * lisp.h (record_xmalloc): New decl.
2515 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
2516 more like a function. This is because the pointer cast is not
2517 needed. All uses changed.
2518 * print.c (print_string, print_error_message): Avoid length recalc.
2520 Improve fix for macroexp crash with debugging (Bug#12118).
2521 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
2522 ARRAY_MARK_FLAG when checking subscripts, because ASET is
2523 not supposed to be invoked from the garbage collector.
2524 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
2525 (gc_aset): New function, which is like ASET but can be
2526 used in the garbage collector.
2527 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
2528 (set_hash_index): Use it instead of ASET.
2530 2012-08-03 Eli Zaretskii <eliz@gnu.org>
2532 Support symlinks on latest versions of MS-Windows.
2533 * w32.c: Include winioctl.h and aclapi.h.
2534 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
2535 (revert_to_self): Forward declarations of static functions.
2536 <static BOOL g_b_init_get_security_info>:
2537 <g_b_init_create_symbolic_link>: New static flags.
2538 (globals_of_w32): Initialize them to zero.
2539 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
2540 (map_w32_filename): Improve commentary. Simplify switch.
2541 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
2542 headers (most versions of MinGW w32api don't).
2543 (get_security_info, create_symbolic_link)
2544 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
2546 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
2547 in the argument file name.
2548 (sys_access): Call unc_volume_file_attributes only if
2549 GetFileAttributes fails with network-related error codes.
2550 (sys_rename): Diagnose renaming of a symlink when the user doesn't
2551 have the required privileges.
2552 (get_file_security_desc_by_name): Rename from
2553 get_file_security_desc.
2554 (stat_worker): New function, with most of the guts of 'stat', and
2555 with addition of handling of symlinks and support for 'lstat'.
2556 If possible, get file's attributes and security information by
2557 handle, not by name. Produce S_IFLNK bit for symlinks, when
2558 called from 'lstat'.
2559 (stat, lstat): New functions, call 'stat_worker'.
2560 (symlink, readlink, careadlinkat): Rewritten to create and resolve
2561 symlinks when the underlying filesystem supports them.
2563 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
2565 Fix macroexp crash on Windows with debugging (Bug#12118).
2566 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
2567 checking subscripts; problem introduced with the recent
2568 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
2569 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
2570 since it's used in non-static inline functions now.
2572 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
2573 Don't assume buffer size fits in 'int'. Remove unused local.
2575 Use C99-style 'extern inline' if available.
2576 * buffer.h (BUFFER_INLINE):
2577 * category.h (CATEGORY_INLINE):
2578 * character.h (CHARACTER_INLINE):
2579 * charset.h (CHARSET_INLINE):
2580 * composite.h (COMPOSITE_INLINE):
2581 * dispextern.h (DISPEXTERN_INLINE):
2582 * lisp.h (LISP_INLINE):
2583 * systime.h (SYSTIME_INLINE):
2584 New macro, replacing 'static inline' in this header.
2585 * buffer.h, category.h, character.h, charset.h, composite.h:
2586 * dispextern.h, lisp.h, systime.h:
2587 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
2588 * alloc.c (LISP_INLINE):
2589 * buffer.c (BUFFER_INLINE):
2590 * category.c (CATEGORY_INLINE):
2591 * character.c (CHARACTER_INLINE):
2592 * charset.c (CHARSET_INLINE):
2593 * composite.c (COMPOSITE_INLINE):
2594 * dispnew.c (DISPEXTERN_INLINE):
2595 * sysdep.c (SYSTIME_INLINE):
2596 Define to EXTERN_INLINE, so that the corresponding functions
2597 are compiled into code.
2598 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
2599 (INLINE_HEADER_END): New macros.
2600 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
2601 since it's used in non-static inline functions now.
2602 (VALMASK) [!USE_LSB_TAG]: Likewise.
2604 2012-08-02 Glenn Morris <rgm@gnu.org>
2606 * s/: Remove empty directory.
2608 * s/ms-w32.h: Move to ../nt/inc.
2609 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
2610 Update for new ms-w32.h location.
2612 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
2615 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
2617 2012-08-02 Glenn Morris <rgm@gnu.org>
2619 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
2620 hard-coding the path separator.
2622 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
2624 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
2625 This how ASET and AREF are supposed to work, and makes
2626 it easier to think about future improvements. See
2627 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
2628 * charset.h (set_charset_attr): New function.
2629 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
2630 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
2631 (aref_addr): New function. All uses of &AREF(...) changed.
2632 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
2633 (set_hash_index): New functions. All lvalue-style uses of
2634 HASH_KEY etc. changed.
2635 * keyboard.c (set_prop): New function. All lvalue-style uses
2638 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
2640 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
2641 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
2642 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
2643 * nsfns.m (ns_set_name_as_filename): Likewise.
2644 * nsmenu.m (ns_update_menubar): Likewise.
2645 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
2647 2012-08-01 Eli Zaretskii <eliz@gnu.org>
2649 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
2650 Adapt to latest changes in field names of the corresponding Lisp
2653 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
2655 2012-08-01 Glenn Morris <rgm@gnu.org>
2657 * s/msdos.h: Remove file.
2658 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
2659 * Makefile.in (S_FILE): Remove.
2660 (config_h): Remove S_FILE.
2662 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
2664 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
2665 Remove; moved to nt/config.nt.
2667 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
2669 Use INTERNAL_FIELD for conses and overlays.
2670 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
2671 Remove obsolete comment.
2673 (struct Lisp_Overlay): Use INTERNAL_FIELD.
2674 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
2676 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
2678 Use INTERNAL_FIELD for symbols.
2679 * lisp.h (SVAR): New macro. Adjust users.
2680 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
2681 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
2683 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
2685 Use INTERNAL_FIELD for processes.
2686 * process.h (PVAR): New macro. Adjust style.
2687 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
2688 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
2690 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
2692 Use INTERNAL_FIELD for windows.
2693 * window.h (WVAR): New macro.
2694 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
2695 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
2696 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
2697 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
2698 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
2699 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
2701 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
2703 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
2705 2012-08-01 Glenn Morris <rgm@gnu.org>
2707 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
2708 Move to configure.ac.
2710 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
2712 * makefile.w32-in (CONFIG_H): Update dependencies.
2713 (CONF_POST_H): New macro.
2715 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
2717 2012-07-31 Glenn Morris <rgm@gnu.org>
2719 * Makefile.in (S_FILE): No longer set by configure.
2721 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
2723 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
2725 * process.h (NULL_DEVICE):
2726 * emacs.c (SEPCHAR):
2727 * editfns.c (USER_FULL_NAME): Let configure set them.
2729 * s/README, s/template.h: Remove files.
2731 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
2733 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
2734 Move to configure.ac.
2736 2012-07-31 Eli Zaretskii <eliz@gnu.org>
2738 * .gdbinit (xframe): Adapt to introduction of FVAR and the
2739 resulting renaming of 'struct frame' members.
2741 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
2743 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
2744 after introduction of FVAR.
2746 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
2748 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
2750 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
2751 instead of compositeToPoint.
2752 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
2754 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
2756 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
2758 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
2759 * lisp.h (INTERNAL_FIELD): New macro.
2760 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
2761 (BVAR): Change to use INTERNAL_FIELD.
2762 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
2763 (KVAR): Change to use INTERNAL_FIELD.
2764 * frame.h (FVAR): New macro.
2765 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
2766 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
2767 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
2768 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
2769 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
2771 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
2773 Miscellaneous fixes for non-default X toolkits.
2774 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
2775 * xterm.c (x_frame_of_widget): Remove redundant prototype.
2776 Move under #ifdef USE_LUCID.
2777 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
2778 definition and usage to avoid warnings.
2780 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
2782 * nsterm.m (openFiles): Fix previous checkin.
2784 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
2786 * indent.c (compute_motion): Remove unused local.
2788 2012-07-31 Glenn Morris <rgm@gnu.org>
2790 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
2792 * conf_post.h [USG5_4]:
2793 Move remaining contents of s/usg5-4-common.h here.
2794 * s/usg5-4-common.h: Remove file.
2796 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
2797 * s/irix6-5.h: Remove file.
2799 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
2800 * s/darwin.h: Remove file.
2802 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
2803 * s/hpux10-20.h: Remove file, which is now empty.
2805 2012-07-30 Glenn Morris <rgm@gnu.org>
2807 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
2808 * Makefile.in (config_h): Add conf_post.h.
2809 * makefile.w32-in (CONFIG_H): Add conf_post.h.
2811 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
2813 * nsterm.m (ns_do_open_file): New variable.
2814 (ns_term_init): Set ns_do_open_file to YES after run returns.
2815 (openFile, openTempFile, openFileWithoutUI, openFiles):
2816 Open files only if ns_do_open_file.
2818 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
2820 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
2821 This no-op macro hasn't been needed for many years.
2822 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
2824 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
2825 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
2826 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
2827 gdb_make_enums_visible.
2828 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
2829 (DIRECTORY_SEP): Now a constant, not a macro.
2831 2012-07-30 Eli Zaretskii <eliz@gnu.org>
2833 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
2834 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
2836 * w32term.c <w32_keyboard_codepage>: Renamed from
2837 keyboard_codepage and now external. All users changed.
2839 * w32term.h: Add declaration of w32_keyboard_codepage.
2841 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
2842 the codepage to translate keys to Unicode. If this argument is
2843 -1, use the value returned by GetConsoleCP. All callers changed.
2845 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
2847 Update .PHONY listings in makefiles.
2848 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
2849 bootstrap-clean, distclean, maintainer-clean, versioclean,
2852 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
2853 This is a bit clearer. Fix some commentary typos.
2855 2012-07-30 Glenn Morris <rgm@gnu.org>
2857 * s/netbsd.h: Let configure include signal.h if needed.
2858 Remove file, which is now empty.
2860 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
2861 Let configure set them.
2862 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
2863 No more need to undefine.
2865 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
2867 * keymap.c (Fkey_description): Don't remove 0x80 bit from
2868 non-single-byte char when adding meta modifier. (Bug#12090)
2870 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
2872 Convert safe_call to use variable number of arguments.
2873 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
2874 (safe_call2): Fix comment.
2875 * lisp.h (safe_call): Adjust prototype.
2876 * coding.c (encode_coding_object): Change to use safe_call2.
2877 * xfaces.c (merge_face_heights): Change to use safe_call1.
2879 2012-07-30 Glenn Morris <rgm@gnu.org>
2881 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
2882 does that unconditionally. Remove file, which is now empty.
2884 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
2887 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
2889 Export to GDB most of lisp.h's remaining object-like macros.
2890 * lisp.h (min, max): Move earlier, because they're used earlier now.
2891 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
2892 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
2893 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
2894 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
2895 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
2896 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
2897 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
2898 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
2899 Now constants, for GDB. They need not be macros.
2900 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
2901 Now constants, for GDB, as well as macros, for static initializers.
2902 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
2903 Move to after the definition of struct Lisp_Char_Table,
2904 since the former now needs that type defined.
2905 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
2906 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
2907 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
2908 New enums, for gdb_make_enums_visible.
2909 (GLYPH_MODE_LINE_FACE): Remove; unused.
2910 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
2911 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
2912 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
2913 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
2914 enum maxargs, enum MAX_ALLOCA.
2915 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
2916 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
2917 no longer needed, now that they are done in lisp.h.
2919 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
2921 Cleanup string bytes checking.
2922 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
2923 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
2924 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
2925 (check_sblock, compact_small_strings): Simplify.
2927 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
2929 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
2930 These macros are confusing and no longer need to be defined, as
2931 the enum values now suffice. All uses replaced with definiens.
2932 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
2934 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
2936 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
2937 ($(BLD)/w32console.$(O)): Update dependencies.
2939 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
2941 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
2942 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
2944 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
2946 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
2948 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
2949 setting sitelisp (Bug#12010).
2951 2012-07-29 Eli Zaretskii <eliz@gnu.org>
2953 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
2955 * w32heap.c (cache_system_info):
2956 * w32.c (sys_rename):
2957 * w32proc.c (find_child_console, sys_kill): All users changed.
2959 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
2961 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
2963 2012-07-29 Eli Zaretskii <eliz@gnu.org>
2965 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
2967 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
2969 Cleanup statistics calculation in Fgarbage_collect.
2970 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
2971 Fix zombies percentage calculation. Simplify elapsed time calculation.
2973 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
2975 Generalize marker debugging code under MARKER_DEBUG and use eassert.
2976 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
2977 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
2978 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
2979 (replace_range, replace_range_2, del_range_2): Change to eassert.
2980 * marker.c (byte_char_debug_check): Adjust style.
2982 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
2984 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
2985 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
2986 long-ago-commented-out code that talks about "WIN32".
2987 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
2990 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
2992 Use Gnulib stdalign module (Bug#9772, Bug#9960).
2993 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
2994 Simplify by using alignof.
2995 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
2996 * lisp.h: Include <stdalign.h>.
2997 (GCALIGNMENT): New macro and constant.
2998 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
2999 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
3000 (stdalign): New macro, if not already defined.
3002 2012-07-28 Eli Zaretskii <eliz@gnu.org>
3004 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
3005 * w32inevt.c: Include w32inevt.h.
3006 (w32_read_console_input): New inline function, calls either
3007 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
3008 w32_console_unicode_input.
3009 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
3010 (w32_kbd_patch_key, key_event): Use the codepage returned by
3011 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
3012 (key_event): use uChar.UnicodeChar only if
3013 w32_console_unicode_input is non-zero.
3015 * w32console.c: Include w32heap.h.
3016 <w32_console_unicode_input>: New global variable.
3017 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
3018 family of Windows, zero otherwise.
3020 * w32inevt.h: Declare w32_console_unicode_input.
3022 * xdisp.c (init_iterator): Don't reference tip_frame in a build
3023 --without-x. (Bug#11742)
3025 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
3027 Adjust GDB to reflect pvec_type changes (Bug#12036).
3028 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
3029 2012-07-04 changes to pseudovector representation.
3030 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
3032 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
3034 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
3036 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
3038 2012-07-27 Eli Zaretskii <eliz@gnu.org>
3040 * alloc.c (listn): Fix the order the arguments are consed onto the
3043 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
3044 enumeration constants, as PURE and HEAP are too general, and clash
3045 with other headers and sources, such as gmalloc.c and the
3046 MS-Windows system headers. All users changed.
3048 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
3050 Revert last save_excursion_save and save_excursion_restore changes.
3051 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
3052 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
3054 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
3056 Fix recently-introduced typos in Windows port.
3057 Reported by Martin Rudalics <rudalics@gmx.at>.
3058 * w32.c (init_environment): Replace comma with semicolon.
3059 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
3061 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
3063 Improve GDB symbol export (Bug#12036).
3064 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
3065 arms of an 'if', not using conditional expressions; otherwise GDB
3066 complains about the types in the unevaluated arm when the argument
3067 is an integer literal.
3068 (xgetint): Simplify expression.
3069 * alloc.c (gdb_make_enums_visible): New constant. This ports to
3070 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
3071 Zaretskii in <http://bugs.gnu.org/12036#13>.
3072 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
3073 needed now that we have gdb_make_enums_visible.
3074 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
3075 (enum enum_USE_LSB_TAG):
3076 New enum types, packaging up enums that need to be exported to GDB.
3078 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
3080 Utility function to make a list from specified amount of objects.
3081 * lisp.h (enum constype): New datatype.
3082 (listn): New prototype.
3083 * alloc.c (listn): New function.
3084 (Fmemory_use_count, syms_of_alloc): Use it.
3085 * buffer.c (syms_of_buffer): Likewise.
3086 * callint.c (syms_of_callint): Likewise.
3087 * charset.c (define_charset_internal): Likewise.
3088 * coding.c (syms_of_coding): Likewise.
3089 * keymap.c (syms_of_keymap): Likewise.
3090 * search.c (syms_of_search): Likewise.
3091 * syntax.c (syms_of_syntax): Likewise.
3092 * w32.c (init_environment): Likewise.
3093 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
3094 * xdisp.c (syms_of_xdisp): Likewise.
3095 * xfns.c (syms_of_xfns): Likewise.
3097 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
3099 Fast save_excursion_save and save_excursion_restore.
3100 * lisp.h (struct Lisp_Excursion): New data type.
3101 (PVEC_EXCURSION): New pseudovector type.
3102 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
3103 to deal with it. Adjust comments.
3104 (init_marker, attach_marker): New prototype.
3105 (unchain_marker): Adjust prototype.
3106 * marker.c (attach_marker): Change to global.
3107 (init_marker): New function.
3108 * alloc.c (Fmake_marker, build_marker): Use it.
3109 (build_marker): More easserts.
3110 (mark_object): Handle struct Lisp_Excursion.
3111 * editfns.c (save_excursion_save, save_excursion_restore):
3112 Reimplement to use struct Lisp_Excursion. Add comments.
3114 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
3116 Fix export of symbols to GDB (Bug#12036).
3117 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
3118 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
3119 emacs.c, as this is a more-suitable home. Had this been done earlier
3120 the fix for 12036 would have avoided some of the problems noted in
3121 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
3122 would have been more obvious.
3123 * emacs.c: Do not include <verify.h>; no longer needed.
3124 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
3125 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
3126 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
3127 Remove; now done in lisp.h.
3128 * lisp.h (PUBLISH_TO_GDB): New macro.
3129 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
3130 (DATA_SEG_BITS): Use it.
3131 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
3132 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
3133 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
3134 not be usable in #if. This simplifies things.
3136 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
3138 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
3140 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
3142 Simplify export of symbols to GDB (Bug#12036).
3143 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
3144 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
3145 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
3146 Adjust to changes in lisp.h and emacs.c, by using
3147 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
3148 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
3149 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
3150 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
3151 instead of gdb_valbits.
3152 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
3153 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
3154 instead of gdb_array_mark_flag.
3155 (xboolvector): Get size from $->size, not $->header.size.
3156 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
3157 (xreload, hook-run, hookpost-run): Remove.
3158 * emacs.c: Include <verify.h>.
3159 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
3160 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
3162 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
3163 (gdb_USE_LSB_TAG): New enum constants.
3164 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
3165 Also define these as enum constants, so they're visible to GDB.
3166 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
3167 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
3168 as constants, so they're visible to GDB.
3169 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
3170 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
3171 Now enum constants, not macros, so they're visible to GDB.
3172 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
3173 more convenient now. All uses changed.
3174 (VALMASK) [USE_LSB_TAG]: Also define in this case.
3175 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
3177 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
3179 Explicitly free restriction data that are not needed anymore.
3180 * editfns.c (save_restriction_restore): Free restriction data.
3182 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
3184 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
3185 add argument, tune behavior, and adjust all callers.
3187 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
3189 Use typedef for EMACS_INT, EMACS_UINT.
3190 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
3191 than macros. This simplifies debugging in the usual case, since
3192 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
3193 and it allows expressions involving EMACS_INT casts.
3194 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
3196 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
3198 * nsterm.m (ns_read_socket): Return early if there is a modal
3201 2012-07-25 Martin Rudalics <rudalics@gmx.at>
3203 * frame.c (Fredirect_frame_focus): In doc-string don't mention
3204 that FOCUS-FRAME can be omitted.
3206 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
3208 Adjust buffer text indirection counters at the end of Fkill_buffer.
3209 * buffer.c (Fkill_buffer): Adjust indirection counters when the
3210 buffer is definitely dead. This should really fix an issue reported
3211 by Christoph Scholtes again. (Bug#12007).
3212 (init_buffer_once): Initialize indirection counters of
3213 buffer_defaults and buffer_local_symbols (for sanity and safety).
3215 2012-07-24 Eli Zaretskii <eliz@gnu.org>
3217 * xdisp.c (init_iterator): Don't compute dimensions of truncation
3218 and continuation glyphs on tooltip frames, leave them at zero.
3219 Avoids continued lines in tooltips. (Bug#11832)
3221 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
3223 Simplify copy_overlay.
3224 * buffer.c (copy_overlay): Simplify. Use build_marker.
3225 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
3227 2012-07-23 Eli Zaretskii <eliz@gnu.org>
3229 * print.c (print_object): Don't crash when a frame's name is nil
3230 or invalid. (Bug#12025)
3232 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
3233 it signals an error when a tooltip frame is being created.
3235 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
3237 Cleanup miscellaneous objects allocation and initialization.
3238 * alloc.c (allocate_misc): Change to static. Add argument to
3239 specify the subtype. Adjust comment and users.
3240 (build_overlay): New function.
3241 * buffer.c (copy_overlays, Fmake_overlay): Use it.
3242 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
3243 (allocate_misc): Remove prototype.
3244 (build_overlay): Add prototype.
3246 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
3248 Swap buffer text indirection counters in Fbuffer_swap_text.
3249 * buffer.c (Fbuffer_swap_text): Swap indirections too.
3250 This avoids crash reported by Christoph Scholtes at
3251 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
3253 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
3255 * nsmenu.m (Popdown_data): New struct.
3256 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
3258 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
3259 (initWithContentRect): Make imgView and contentView non-static
3260 and autorelease them. Also autorelease img and matrix (Bug#12005).
3261 (dealloc): Remove (Bug#12005).
3263 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
3265 Adjust consing_since_gc when objects are explicitly freed.
3266 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
3267 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
3268 (free_cons, free_misc): Subtract object size from consing_since_gc.
3270 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
3272 Simplify and cleanup markers positioning code.
3273 * marker.c (attach_marker): More useful eassert.
3274 (live_buffer, set_marker_internal): New function.
3275 (Fset_marker, set_marker_restricted): Use set_marker_internal.
3276 (set_marker_both, set_marker_restricted_both): Use live_buffer.
3278 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
3280 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
3281 as it's limited by the amount of memory, not by INT_MAX.
3283 2012-07-21 Eli Zaretskii <eliz@gnu.org>
3285 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
3286 in special-event-map. See the discussion at
3287 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
3290 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
3291 info.dwItemData. Fixes crashes on 64-bit Windows.
3292 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
3294 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
3296 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
3297 (conversationIdentifier): Return value is NSInteger.
3298 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
3300 2012-07-21 Chong Yidong <cyd@gnu.org>
3302 * window.c (decode_any_window): Signal an error if the window is
3303 on a dead frame (Bug#11984).
3305 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3307 Add indirection counting to speed up Fkill_buffer.
3308 * buffer.h (struct buffer): New member.
3309 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
3310 (Fmake_indirect_buffer): Set indirection counter to -1, increment
3311 base buffer indirection counter.
3312 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
3313 (Fkill_buffer): Adjust indirection counters as needed, don't walk
3314 through buffer list if indirection counter is 0.
3316 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3318 Extend the value returned by Fgarbage_collect with heap statistics.
3319 * alloc.c (Qheap): New symbol.
3320 (syms_of_alloc): DEFSYM it.
3321 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
3322 (Fmemory_free): Remove.
3323 (syms_of_alloc): Don't defsubr it.
3324 * buffer.c (Fcompact_buffer): Remove.
3325 (syms_of_buffer): Don't defsubr it.
3327 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3329 Make maybe_gc inline.
3330 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
3331 * lisp.h (consing_since_gc, gc_relative_threshold)
3332 (memory_full_cons_threshold): Revert declaration.
3333 (maybe_gc): Remove prototype, define as inline.
3334 * alloc.c: Remove old commented-out code.
3335 (consing_since_gc, gc_relative_threshold)
3336 (memory_full_cons_threshold): Revert to global.
3339 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3341 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
3342 * lisp.h (build_unibyte_string): New function.
3343 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
3344 * sysdep.c, w32fns.c, xfns.c: Use it.
3345 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
3346 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
3347 Adjust users accordingly.
3348 * font.h (font_open_by_name): Adjust prototype.
3350 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3352 Cleanup calls to Fgarbage_collect.
3353 * lisp.h (maybe_gc): New prototype.
3354 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
3355 Remove declarations.
3356 * alloc.c (maybe_gc): New function.
3357 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
3359 * bytecode.c (MAYBE_GC): Use maybe_gc.
3360 * eval.c (eval_sub, Ffuncall): Likewise.
3361 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
3362 to avoid dependency from auto-save feature.
3364 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
3366 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
3367 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
3368 'for_each_per_buffer_object_at'.
3369 All uses changed. It's better to use upper-case for macros that
3370 cannot be implemented as functions, to give the reader a clue
3371 that they're special.
3373 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
3375 * alloc.c (Fgarbage_collect): Tweak docstring.
3377 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
3379 Tweak the value returned from Fgarbage_collect again.
3380 * alloc.c (Fgarbage_collect): New return value, as confirmed in
3381 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
3382 Adjust documentation.
3383 (total_vector_bytes): Rename to total_vector_slots, adjust
3385 (total_free_vector_bytes): Rename to total_free_vector_slots,
3387 (Qstring_bytes, Qvector_slots): New symbols.
3388 (syms_of_alloc): DEFSYM them.
3390 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
3392 Buffer compaction primitive which may be used from Lisp.
3393 * buffer.c (compact_buffer, Fcompact_buffer): New function.
3394 (syms_of_buffer): Register Fcompact_buffer.
3395 * alloc.c (Fgarbage_collect): Use compact_buffer.
3396 * buffer.h (compact_buffer): New prototype.
3397 (struct buffer_text): New member.
3399 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
3401 New macro to iterate over all buffers, miscellaneous cleanups.
3402 * lisp.h (all_buffers): Remove declaration.
3403 * buffer.h (all_buffers): Add declaration, with comment.
3404 (for_each_buffer): New macro.
3405 * alloc.c (Fgarbage_collect, mark_object): Use it.
3406 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
3407 (init_buffer): Likewise.
3408 * data.c (Fset_default): Likewise.
3409 * coding.c (code_conversion_restore): Remove redundant check
3411 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
3413 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
3415 Fix bug that created negative-length intervals.
3416 * intervals.c (merge_interval_right, merge_interval_left):
3417 Do not zero out this interval if it is absorbed by its children,
3418 as this interval's total length doesn't change in that case. See
3419 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
3421 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
3423 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
3424 when invoking (make-bool-vector N t) and N is a positive
3425 multiple of 8 -- the last 8 bits were mistakenly cleared.
3427 Remove some struct layout assumptions in bool vectors.
3428 * alloc.c (bool_header_size): New constant.
3429 (header_size, word_size): Move earlier, as they're now used earlier.
3430 Use 'word_size' in a few more places, where it's appropriate.
3431 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
3432 padding before the data member of a bool vector.
3433 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
3434 than doing the check by hand with an abort ().
3436 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
3438 * eval.c (Fdefvar): Don't check constants since we only set the var if
3439 it's not yet defined anyway (bug#11904).
3441 * lisp.h (last_undo_boundary): Declare new var.
3442 * keyboard.c (command_loop_1): Set it.
3443 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
3444 were auto-added by the command loop (bug#11774).
3446 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
3448 * w32font.c (Qsymbol): Remove local definition.
3449 (syms_of_w32font): Don't DEFSYM it.
3451 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
3453 Fix sweep_vectors to handle large bool vectors correctly.
3454 * alloc.c (sweep_vectors): Account total_vector_bytes for
3455 bool vectors larger than VBLOCK_BYTES_MAX.
3457 2012-07-18 Chong Yidong <cyd@gnu.org>
3459 * frame.c (x_set_frame_parameters): Revert bogus change introduced
3460 in 2012-05-25 commit by Paul Eggert (Bug#11738).
3462 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
3464 Return more descriptive data from Fgarbage_collect.
3465 Suggested by Stefan Monnier in
3466 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
3467 * alloc.c (bounded_number): New function.
3468 (total_buffers, total_vectors): New variable.
3469 (total_string_size): Rename to total_string_bytes, adjust users.
3470 (total_vector_size): Rename to total_vector_bytes, adjust users.
3471 (sweep_vectors): Account total_vectors and total_vector_bytes.
3472 (Fgarbage_collect): New return value. Adjust documentation.
3473 (gc_sweep): Account total_buffers.
3474 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
3475 (VECTOR_SIZE): Remove.
3476 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
3477 (Qinterval, Qmisc): New symbols.
3478 (syms_of_data): Initialize them.
3479 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
3480 (Qcons, Qbuffer): New declarations.
3482 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
3484 * alloc.c (Fmemory_free): Account for memory-free's own storage.
3485 Round up, not down. Improve doc.
3487 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3489 Restore old code in allocate_string_data to avoid Faset breakage.
3490 Reported by Julien Danjou <julien@danjou.info> in
3491 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
3492 * alloc.c (allocate_string_data): Restore old code with minor
3493 adjustments, fix comment to explain this subtle issue.
3495 2012-07-17 Eli Zaretskii <eliz@gnu.org>
3497 Remove FILE_SYSTEM_CASE.
3498 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
3500 * fileio.c (FILE_SYSTEM_CASE): Don't define.
3501 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
3502 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
3503 call-process-region passes it through expand-file-name.
3505 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
3507 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
3509 Fix crash when creating indirect buffer (Bug#11917)
3510 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
3511 Don't handle unbound variables specially if non-zero.
3512 (Fbuffer_local_variables): Pass zero.
3513 (clone_per_buffer_values): Pass non-zero.
3515 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
3517 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
3518 to make the loop interruptible.
3520 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
3522 * gnutls.c (emacs_gnutls_handshake): Only retry if
3523 GNUTLS_E_INTERRUPTED.
3525 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3527 Cleanup and convert miscellaneous checks to eassert.
3528 * alloc.c (mark_interval): Fix comment, partially rephrase
3529 old comment from intervals.h (see below).
3530 * intervals.c (find_interval, adjust_intervals_for_insertion)
3531 (delete_interval, adjust_intervals_for_deletion)
3532 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
3534 (adjust_intervals_for_insertion, make_new_interval):
3535 Remove obsolete and unused code.
3536 * intervals.h (struct interval): Remove obsolete comment.
3537 * textprotp.c (erase_properties): Remove unused code.
3538 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
3539 (Fremove_list_of_text_properties): Convert to eassert.
3541 2012-07-17 Chong Yidong <cyd@gnu.org>
3543 * editfns.c (Finsert_char): Doc fix.
3545 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3547 Fix previous change to make Fmemory_free always accurate.
3548 * alloc.c (make_interval): Update total_free_intervals.
3549 (make_float): Likewise for total_free_floats.
3550 (free_cons, Fcons): Likewise for total_free_conses.
3551 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
3552 Likewise for total_free_vector_bytes.
3553 (Fmake_symbol): Likewise for total_free_symbols.
3554 (bytes_free): Remove.
3556 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3558 Simple free memory accounting feature.
3559 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
3560 (sweep_vectors): Accumulate size of free vectors.
3561 (Fgarbage_collect): Setup bytes_free.
3562 (Fmemory_free): New function.
3563 (syms_of_alloc): Register it.
3565 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3567 Cleanup overlays checking.
3568 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
3569 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
3570 eassert and OVERLAYP.
3571 (sort_overlays): Change to use OVERLAYP.
3573 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
3575 * editfns.c (Finsert_char): Make it interactive, and make the
3576 second arg optional. Copy interactive spec and docstring from
3579 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
3581 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
3582 Unlike the other wrapped functions, fabs has an unspecified
3585 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
3587 * nsterm.m (keyDown): Interpret flags without left/right bits
3588 as the left key (Bug#11670).
3590 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
3592 Remove empty and useless init functions.
3593 * lisp.h (init_character_once, init_fns, init_image)
3594 (init_filelock, init_sound): Remove prototype.
3595 * character.c (init_character_once): Remove.
3596 * filelock.c (init_filelock): Likewise.
3597 * fns.c (init_fns): Likewise.
3598 * image.c (init_image): Likewise.
3599 * sound.c (init_sound): Likewise.
3600 * emacs.c (main): Adjust accordingly.
3602 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
3604 * gtkutil.h: Tiny cleanups.
3605 (use_old_gtk_file_dialog): Remove useless declaration.
3606 (xg_uses_old_file_dialog): Add suggested const attribute.
3608 2012-07-15 Eli Zaretskii <eliz@gnu.org>
3610 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
3611 (bidi_paragraph_init): Use it to limit search forward for a strong
3612 directional character in abnormally large paragraphs full of
3613 neutral or weak characters. (Bug#11943)
3615 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
3617 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
3618 the toolbar (Bug#9451).
3619 (xg_make_tool_item): Give the widget event box a transparent
3622 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
3624 Cleanup basic allocation variables and functions.
3625 * alloc.c (ignore_warnings, init_intervals, init_float)
3626 (init_cons, init_symbol, init_marker): Remove.
3627 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
3628 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
3629 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
3630 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
3631 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
3632 (staticidx, init_alloc_once, init_strings, free_ablock):
3633 Remove redundant initialization.
3634 * fns.c (init_weak_hash_tables): Remove.
3635 * lisp.h (init_weak_hash_tables): Remove prototype.
3637 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
3639 Use zero_vector where appropriate.
3640 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
3642 * lisp.h (zero_vector): New declaration.
3643 * font.c (null_vector): Remove.
3644 (syms_of_font): Remove initialization and staticpro.
3645 (font_list_entities, font_find_for_lface): Change to use zero_vector.
3646 * keymap.c (Faccessible_keymaps): Likewise.
3648 2012-07-15 Leo Liu <sdl.web@gmail.com>
3650 * fringe.c: Fix typo in comments.
3652 2012-07-14 Leo Liu <sdl.web@gmail.com>
3654 * fringe.c: Add a new bitmap exclamation-mark.
3656 2012-07-14 Eli Zaretskii <eliz@gnu.org>
3658 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
3660 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
3661 (HAVE_MENUS): Don't define, defined by editing config.in with
3663 (GMALLOC_INHIBIT_VALLOC): Don't define.
3664 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
3666 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
3668 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
3670 2012-07-14 Glenn Morris <rgm@gnu.org>
3672 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
3673 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
3674 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
3676 2012-07-13 Glenn Morris <rgm@gnu.org>
3678 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
3680 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
3681 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
3683 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
3685 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
3686 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
3687 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
3688 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
3690 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
3691 as boolean expression.
3692 (x_set_window_size): Remove unused variable toolbar.
3693 (ns_get_color_default, ns_mod_to_lisp): Remove.
3694 (ns_mouse_position): Remove unused variables xchar and ychar.
3695 (ns_compute_glyph_string_overhangs): Remove unused variable face.
3696 (ns_set_vertical_scroll_bar): Remove unused variable count.
3697 (ns_delete_terminal): Remove unused variable i.
3698 (ns_term_init): Remove unused variables r, g and b.
3699 (mouseDown): Remove unused variable window.
3700 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
3701 (initFrameFromEmacs): Remove unused variable vbextra.
3702 (mouseEntered): Remove unused variables p and dpyinfo.
3703 (mouseExited): Remove unused variables p and r.
3704 (ns_define_frame_cursor, ns_clear_frame_area)
3705 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
3706 (menuDown): Assign [sender tag] to variable and cast the variable.
3708 * nsterm.h (menuDown): Add id as type to argument sender.
3709 (ns_display_info_for_name): Add Lisp_Object argument.
3710 (ns_term_init): Add Lisp_Object argument.
3711 (ns_map_event_to_object): Add void argument.
3712 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
3713 prototype with arguments and only declare if __OBJC__.
3714 (nxatoms_of_nsselect): Add void argument.
3715 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
3716 (ns_alloc_autorelease_pool): Add void argument.
3717 (ns_release_autorelease_pool): Add void* argument.
3718 (ns_get_defaults_value): Add const char* argument.
3720 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
3721 (initFromContents): Use SSDATA where appropriate.
3722 (ns_update_menubar): Add braces to ambigous if-else.
3723 (initWithTitle): Put () around assignment in if statement.
3724 (ns_menu_show): Remove unused variables window and keymap.
3725 (update_frame_tool_bar): Remove unused variable selected_p.
3726 (initWithContentRect): Remove unused variable this_cmd_name.
3728 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
3730 (setXBMColor): Remove unused variable len.
3731 (setPixmapData): Put () around assignment in loop statement.
3733 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
3734 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
3736 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
3737 around assignment in loop statement.
3738 (nsfont_open): Remove unused variable i.
3739 (nsfont_open): Remove unused variable len.
3740 (nsfont_draw): Remove unused variable cs.
3742 * nsfns.m (x_set_icon_name, ns_set_name_internal)
3743 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
3744 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
3745 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
3746 (Fns_font_name, Fns_perform_service)
3747 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
3748 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
3749 (ns_set_name): Remove unused variable view.
3750 (x_set_menu_bar_lines): Remove unused variable olines.
3751 (x_set_tool_bar_lines): Remove unused variable root_window.
3752 (Fns_list_colors): Put () around assignment in while statement.
3753 (Fns_perform_service): Remove unused variable len.
3754 (Fns_display_usable_bounds): Remove unused variable top.
3755 (syms_of_nsfns): Remove unused variable i.
3757 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
3760 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
3762 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
3763 and free it with DestroyExceptionInfo (Bug#11558).
3765 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
3767 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
3768 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
3769 Set here, not in nt/config.nt.
3771 2012-07-13 Eli Zaretskii <eliz@gnu.org>
3773 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
3774 cursor overflow into the last glyph on display line when the right
3775 fringe is off. (Bug#11832)
3777 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
3779 * xdisp.c (produce_special_glyphs): Now static.
3780 * dispextern.h (produce_special_glyphs): Remove decl.
3782 2012-07-13 Glenn Morris <rgm@gnu.org>
3784 * s/bsd-common.h, s/cygwin.h: Remove empty files.
3785 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
3787 * s/usg5-4-common.h (USG, USG5):
3788 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
3789 * s/sol2-6.h (SOLARIS2):
3790 * s/irix6-5.h (IRIX6_5):
3791 * s/hpux10-20.h (USG, USG5, HPUX):
3792 * s/gnu-linux.h (USG, GNU_LINUX):
3793 * s/freebsd.h (BSD_SYSTEM):
3794 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
3795 * s/cygwin.h (CYGWIN):
3796 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
3797 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
3799 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
3801 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
3803 2012-07-13 Glenn Morris <rgm@gnu.org>
3805 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
3807 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
3809 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
3810 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
3812 2012-07-12 Glenn Morris <rgm@gnu.org>
3814 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
3816 * process.c (init_process_emacs): Rename from init_process.
3817 The old name is also the name of a Mach system call.
3818 * lisp.h, emacs.c: Update for this name change.
3819 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
3822 2012-07-12 Eli Zaretskii <eliz@gnu.org>
3824 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
3825 memmove call that removes glyphs covered by the left truncation
3826 glyph. Improve commentary.
3827 (display_line): Fix display of continuation glyphs on GUI frames
3828 when the right fringe is turned off and variable-size fonts are
3829 used in the window. Move the code that appends a stretch glyph to
3830 produce_special_glyphs, so that it could be used for truncation
3831 and continuation glyphs alike.
3832 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
3833 glyph of a suitably computed width, to align the special glyphs at
3834 the window margin. Code moved from display_line. (Bug#11832)
3836 2012-07-12 Glenn Morris <rgm@gnu.org>
3838 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
3840 * s/gnu-linux.h, s/hpux10-20.h:
3841 Do not unconditionally define HAVE_XRMSETDATABASE.
3843 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
3845 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
3847 Fix typos that broke OS X build.
3848 Reported by Randal L. Schwartz in
3849 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
3850 * nsterm.m (ns_timeout): Add missing local decl.
3851 (ns_get_color): snprintf -> sprintf, to fix typo.
3853 2012-07-12 Glenn Morris <rgm@gnu.org>
3855 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
3856 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
3857 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
3858 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
3860 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
3861 Move PTY_OPEN to configure.
3863 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
3864 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
3865 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
3867 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
3869 Use empty_unibyte_string where applicable.
3870 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
3871 * lread.c (read1): Likewise.
3872 * xsettings.c (syms_of_xsettings): Likewise.
3874 2012-07-12 Glenn Morris <rgm@gnu.org>
3876 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
3877 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
3878 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
3879 * s/hpux10-20.h (RUN_TIME_REMAP):
3880 * s/bsd-common.h (TABDLY): Move to configure.
3882 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
3884 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
3886 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
3887 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
3889 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
3891 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
3892 * s/template.h: Move NARROWPROTO to configure.
3894 2012-07-11 Glenn Morris <rgm@gnu.org>
3896 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
3897 unused since 2011-01-17 change to systty.h.
3899 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
3900 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
3901 Move HAVE_PTYS and HAVE_SOCKETS to configure.
3903 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
3905 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
3907 2012-07-11 Glenn Morris <rgm@gnu.org>
3909 * s/darwin.h, s/gnu-linux.h, s/template.h:
3910 Move INTERRUPT_INPUT to configure.
3912 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
3914 Minor adjustments to interning code.
3915 * lisp.h (intern, intern_c_string): Redefine as static inline
3916 wrappers for intern_1 and intern_c_string_1, respectively.
3917 (intern_1, intern_c_string_1): Rename prototypes.
3918 * lread.c (intern_1, intern_c_string_1, oblookup):
3919 Simplify Vobarray checking.
3920 * font.c (font_intern_prop): Likewise. Adjust comment.
3921 * w32font.c (intern_font_name): Likewise.
3923 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
3925 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
3927 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
3928 of Fcar/Fcdr if possible.
3929 * font.c (check_otf_features): Likewise.
3930 * fontset.c (Fnew_fontset): Likewise.
3931 * gnutls.c (Fgnutls_boot): Likewise.
3932 * minibuf.c (read_minibuf): Likewise.
3933 * msdos.c (IT_set_frame_parameters): Likewise.
3934 * xmenu.c (Fx_popup_dialog): Likewise.
3935 * w32menu.c (Fx_popup_dialog): Likewise.
3937 2012-07-11 Glenn Morris <rgm@gnu.org>
3939 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
3940 since nothing has defined it on these platforms.
3942 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
3943 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
3945 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
3946 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
3947 Move CLASH_DETECTION to configure.
3949 * s/gnu.h: Remove file, which is now empty.
3951 * s/gnu.h, s/gnu-linux.h:
3952 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
3954 2012-07-11 John Wiegley <johnw@newartisans.com>
3956 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
3957 function attribute, so we only use it if it exists in the
3960 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
3962 Avoid call to strlen in fast_c_string_match_ignore_case.
3963 * search.c (fast_c_string_match_ignore_case): Change to use
3964 length argument. Adjust users accordingly.
3965 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
3967 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
3969 Assume mkdir, rmdir.
3970 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
3971 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
3974 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
3977 * s/hpux10-20.h (HAVE_PERROR): Remove.
3978 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
3979 Remove dummy definition, as this problem was obsolete long ago.
3982 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
3984 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
3986 Avoid calls to strlen in font processing functions.
3987 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
3988 (font_open_by_name): Change to use length argument.
3989 Adjust users accordingly.
3990 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
3992 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
3993 Change to return ptrdiff_t.
3994 (xfont_list_pattern, xfont_match): Use length returned by
3995 xfont_decode_coding_xlfd.
3996 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
3998 2012-07-11 Glenn Morris <rgm@gnu.org>
4000 * s/darwin.h, s/freebsd.h, s/netbsd.h:
4001 Move DONT_REOPEN_PTY to configure.
4003 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
4004 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
4006 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
4008 Remove "#define unix" that is no longer needed (Bug#11905).
4009 * s/aix4-2.h (unix): Remove; no longer needed.
4011 EMACS_TIME simplification (Bug#11875).
4012 This replaces macros (which typically do not work in GDB)
4013 with functions, typedefs and enums, making the code easier to debug.
4014 The functional style also makes code easier to read and maintain.
4015 * systime.h: Include <sys/time.h> on all hosts, not just if
4016 WINDOWSNT, since 'struct timeval' is needed in general.
4017 (EMACS_TIME): Now a typedef, not a macro.
4018 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
4020 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
4021 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
4022 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
4023 (EMACS_TIME_LE): Now functions, not macros.
4024 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
4025 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
4026 which are not functions. All uses rewritten to use:
4027 (make_emacs_time): New function.
4028 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
4029 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
4030 not functions. All uses rewritten to use the following, respectively:
4031 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
4032 (add_emacs_time, sub_emacs_time): New functions.
4033 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
4034 * fileio.c (Fcopy_file):
4035 * xterm.c (XTflash): Get the current time closer to when it's used.
4036 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
4038 * bytecode.c (targets): Suppress -Woverride-init warnings.
4040 Simplify by avoiding confusing use of strncpy etc.
4041 * doc.c (Fsnarf_documentation):
4042 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
4043 * frame.c (Fmake_terminal_frame):
4044 * gtkutil.c (get_utf8_string):
4046 * nsmenu.m (ns_update_menubar):
4047 * regex.c (regerror):
4048 Prefer memcpy to strncpy and strncat when either will do.
4049 * fileio.c (Fsubstitute_in_file_name):
4050 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
4051 (menu_separator_name_p):
4052 * nsmenu.m (ns_update_menubar):
4053 Prefer memcmp to strncmp when either will do.
4054 * nsterm.m: Include <ftoastr.h>.
4056 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
4057 Prefer snprintf to strncpy.
4058 * nsterm.m (ns_term_init):
4059 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
4060 * nsterm.m (ns_term_init):
4061 Avoid the need for strncpy, by using build_string or
4062 make_unibyte_string directly. Use dtoastr, not snprintf.
4063 * process.c (Fmake_network_process): Diagnose service names that
4064 are too long, rather than silently truncating them or creating
4065 non-null-terminated names.
4066 (Fnetwork_interface_info): Likewise, for interface names.
4067 * sysdep.c (system_process_attributes) [GNU_LINUX]:
4068 Prefer sprintf to strncat.
4069 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
4070 Prefer vsnprintf to vsprintf + strncpy.
4072 2012-07-10 Glenn Morris <rgm@gnu.org>
4074 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
4075 Clarify fallback case.
4077 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
4079 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
4080 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
4081 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
4082 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
4083 where argument type is known to be a Lisp_Cons.
4085 2012-07-10 Tom Tromey <tromey@redhat.com>
4087 * bytecode.c (BYTE_CODE_THREADED): New macro.
4088 (BYTE_CODES): New macro. Replaces all old byte-code defines.
4089 (enum byte_code_op): New type.
4090 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
4091 (exec_byte_code): Use them. Use token threading when applicable.
4093 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
4095 Optimize pure C strings initialization.
4096 * lisp.h (make_pure_string): Fix prototype.
4097 (build_pure_c_string): New function, defined as static inline. This
4098 provides a better opportunity to optimize away calls to strlen when
4099 the function is called with compile-time constant argument.
4100 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
4101 argument, adjust users accordingly. Use build_pure_c_string where
4103 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
4104 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
4105 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
4107 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
4109 Avoid calls to strlen in miscellaneous functions.
4110 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
4111 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
4112 * lread.c (openp): Likewise.
4114 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
4116 Avoid calls to strlen in path processing functions.
4117 * fileio.c (file_name_as_directory): Add comment. Change to add
4118 srclen argument and return the length of result. Adjust users
4120 (directory_file_name): Fix comment. Change to add srclen argument,
4121 swap 1st and 2nd arguments to obey the common convention.
4122 Adjust users accordingly.
4123 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
4125 2012-07-10 Glenn Morris <rgm@gnu.org>
4127 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
4128 Move PENDING_OUTPUT_COUNT definition to configure.
4130 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
4131 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
4132 * s/gnu.h (DATA_START): Move definitions to configure.
4134 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
4135 We include usg5-4-common.h, which defines them both.
4137 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
4138 O_RDONLY already includes it).
4140 Stop ns builds setting the EMACSLOADPATH environment variable.
4141 * nsterm.m (ns_load_path): Rename from ns_init_paths.
4142 Now it does not set EMACSLOADPATH, just returns the load-path string.
4143 * nsterm.h: Update accordingly.
4144 * lread.c [HAVE_NS]: Include nsterm.h.
4145 (init_lread) [HAVE_NS]: Use ns_load_path.
4146 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
4148 2012-07-09 Glenn Morris <rgm@gnu.org>
4150 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
4151 since the included bsd-common.h does so.
4153 Stop ns builds setting the EMACSPATH environment variable.
4154 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
4155 (ns_init_paths): Do not set EMACSPATH.
4156 * nsterm.h (ns_exec_path): Add it.
4157 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
4160 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
4162 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
4164 * process.c (wait_reading_process_output): 'waitchannels' was unset
4165 when read_kbd || !NILP (wait_for_cell); fix this.
4167 Add GCC-style 'const' attribute to functions that can use it.
4168 * character.h (char_resolve_modifier_mask):
4169 * keyboard.h (make_ctrl_char):
4170 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
4171 (init_character_once, next_almost_prime, init_fns, init_image)
4172 (flush_pending_output, init_sound):
4173 * mem-limits.h (start_of_data):
4174 * menu.h (finish_menu_items):
4175 Add ATTRIBUTE_CONST.
4176 * emacs.c (DEFINE_DUMMY_FUNCTION):
4177 Declare the dummy function with ATTRIBUTE_CONST.
4178 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
4179 Add decls with ATTRIBUTE_CONST.
4181 Minor improvements to make_formatted_string.
4182 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
4183 where int is good enough, as vsprintf returns an int.
4184 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
4186 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
4188 Use make_formatted_string to avoid double length calculation.
4189 * lisp.h (make_formatted_string): New prototype.
4190 * alloc.c (make_formatted_string): New function.
4191 * buffer.c (Fgenerate_new_buffer_name): Use it.
4192 * dbus.c (syms_of_dbusbind): Likewise.
4193 * editfns.c (Fcurrent_time_zone): Likewise.
4194 * filelock.c (get_boot_time): Likewise.
4195 * frame.c (make_terminal_frame, set_term_frame_name)
4196 (x_report_frame_params): Likewise.
4197 * image.c (gs_load): Likewise.
4198 * minibuf.c (get_minibuffer): Likewise.
4199 * msdos.c (dos_set_window_size): Likewise.
4200 * process.c (make_process): Likewise.
4201 * xdisp.c (ensure_echo_area_buffers): Likewise.
4202 * xsettings.c (apply_xft_settings): Likewise.
4204 2012-07-09 Glenn Morris <rgm@gnu.org>
4206 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
4207 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
4208 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
4209 * nsterm.h (ns_etc_directory): Add it.
4210 * callproc.c [HAVE_NS]: Include nsterm.h.
4211 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
4213 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
4215 Move marker debugging code under MARKER_DEBUG.
4216 * marker.c (MARKER_DEBUG): Move marker debugging code under
4217 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
4218 for bootstrap with --enable-checking (~3x slowdown reported
4219 by Juanma Barranquero <lekktu@gmail.com>).
4220 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
4222 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
4224 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
4225 See <http://bugs.gnu.org/11825#29>.
4227 2012-07-08 Eli Zaretskii <eliz@gnu.org>
4229 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
4230 has no font, use the frame's font. (Bug#11813)
4231 (display_line): Add commentary about displaying truncation glyphs
4233 (produce_special_glyphs): Move here from term.c.
4235 * term.c (produce_special_glyphs): Move to xdisp.c.
4237 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
4240 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
4242 * xdisp.c (display_line): Avoid warning about implicit declaration
4245 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
4247 * lisp.h: Remove empty conditional.
4249 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
4251 * lread.c (load_path_check): Now static.
4253 Fix some minor --with-ns problems found by static checking.
4254 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
4255 (x_set_font) [!HAVE_X_WINDOWS]:
4256 * image.c (xpm_load_image) [HAVE_NS]:
4257 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
4258 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
4259 Remove unused local.
4260 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
4261 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
4262 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
4263 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
4264 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
4265 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
4266 Fix pointer signedness problem.
4267 * xfaces.c (FRAME_X_FONT_TABLE):
4268 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
4270 2012-07-07 Glenn Morris <rgm@gnu.org>
4272 * lread.c (load_path_check): New function, split from init_lread.
4273 (init_lread): Reorganize. Motivation:
4274 If EMACSLOADPATH is set, check/warn about that rather than the
4275 defaults, which we are not going to use. Hence we can remove
4276 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
4277 Don't warn if site-lisp directories are missing.
4278 If not installed, start from a blank load-path, since
4279 PATH_LOADSEARCH refers to the eventual installation directories.
4281 2012-07-07 Eli Zaretskii <eliz@gnu.org>
4283 Support truncation and continuation glyphs on GUI frames, when
4284 fringes are disabled. (Bug#11832)
4285 * xdisp.c (init_iterator): Get dimensions of truncation and
4286 continuation glyphs even if on GUI frames.
4287 Adjust it->last_visible_x on GUI frames when the left or right fringes,
4288 or both, are absent.
4289 (start_display, move_it_in_display_line_to): Handle the case of a
4290 GUI frame without a fringe to display continuation or truncation
4292 (insert_left_trunc_glyphs): Support GUI frames: make sure
4293 truncation glyphs overwrite enough glyphs from the current line to
4294 have sufficient space in pixels.
4295 (display_line): Support truncation and continuation glyphs on GUI
4296 frames. If some spare pixels are left on the line after inserting
4297 the truncation glyphs, fill that space with a stretch glyph of a
4298 suitably computed width.
4300 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
4301 produce_glyphs, to support GUI sessions.
4303 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
4305 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
4307 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
4309 Do not require float-time's arg to fit in time_t (Bug#11825).
4310 This works better on hosts where time_t is unsigned, and where
4311 float-time is applied to the (negative) difference between two times.
4312 * editfns.c (decode_time_components): Last arg is now double *,
4313 not int *, and means to store all the result as a double, without
4314 worrying about whether the seconds part fits in time_t.
4315 All callers changed.
4316 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
4317 All callers changed.
4318 (Ffloat_time): Do not fail merely because the specified time falls
4319 outside of time_t range.
4321 2012-07-07 Glenn Morris <rgm@gnu.org>
4323 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
4324 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
4325 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
4327 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
4329 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
4330 Update dependencies.
4332 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
4334 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
4336 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
4337 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
4338 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
4339 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
4340 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
4341 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
4343 * xfont.c (compare_font_names): Redo to omit the need for casts.
4345 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
4347 * xfns.c (Fx_change_window_property): Doc fix.
4348 * w32fns.c (Fx_change_window_property): Doc fix.
4350 * w32fns.c (Fx_window_property): Accept the same arguments as the
4351 X Windows version. Doc fix.
4352 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
4354 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
4355 Eli Zaretskii <eliz@gnu.org>
4357 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
4358 Windows-specific code from nt/config.nt moved here.
4359 Obsolete settings removed.
4361 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
4363 * process.c: Avoid unnecessary calls to gettime.
4364 (wait_reading_process_output): Don't get the time of day
4365 when gobbling data immediately and not waiting, as there's no need
4366 for it in that case. This removes a FIXME.
4368 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
4370 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
4371 is defined (Bug#11768).
4373 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4375 Fix marker debugging code.
4376 * marker.c (byte_char_debug_check): Do not perform the check
4377 if buffer is not multibyte.
4378 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
4379 Call byte_char_debug_check with correct arguments.
4381 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4383 Compile marker debugging code only if ENABLE_CHECKING is defined.
4384 * marker.c (byte_char_debug_check, count_markers):
4385 Use only if ENABLE_CHECKING is defined.
4386 (byte_debug_flag): Remove.
4387 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
4388 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
4390 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4392 Avoid code repetition in marker-related functions.
4393 * marker.c (attach_marker): New function.
4394 (Fset_marker, set_marker_restricted, set_marker_both)
4395 (set_marker_restricted_both): Use it.
4396 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
4397 Consistently rename charno to charpos.
4398 (marker_position): Add eassert.
4399 (marker_byte_position): Convert to eassert.
4401 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4403 Simplify list operations in unchain_overlay and unchain_marker.
4404 * buffer.c (unchain_overlay): Simplify. Add comment.
4405 * marker.c (unchain_marker): Simplify. Fix comments.
4407 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4409 Introduce fast path for the widely used marker operation.
4410 * alloc.c (build_marker): New function.
4411 * lisp.h (build_marker): New prototype.
4412 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
4413 * composite.c (autocmp_chars): Likewise.
4414 * editfns.c (buildmark): Remove.
4415 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
4416 (save_restriction_save): Use build_marker.
4417 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
4418 * window.c (save_window_save): Likewise.
4420 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4422 Do not use Fdelete_overlay in delete_all_overlays
4423 to avoid redundant calls to unchain_overlay.
4424 * buffer.c (drop_overlay): New function.
4425 (delete_all_overlays, Fdelete_overlay): Use it.
4426 * minibuf.c (get_minibuffer): Fix comment.
4428 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
4430 Port to OpenBSD 5.1 amd64.
4431 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
4432 This is needed for OpenBSD, and should be harmless on all BSD systems.
4433 Also, include <sys/sysctl.h>, as it should be available on all
4434 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
4435 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
4436 use p_pid member, not kp_proc.pid.
4438 2012-07-06 Glenn Morris <rgm@gnu.org>
4440 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
4442 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
4444 More xmalloc and related cleanup.
4445 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
4446 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
4447 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
4448 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
4449 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
4450 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
4451 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
4452 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
4453 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
4455 Omit needless casts involving void * pointers and allocation.
4456 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
4457 as the former is more robust if P's type is changed.
4458 Prefer xzalloc to xmalloc + memset 0.
4459 Simplify malloc-or-realloc to realloc.
4460 Don't worry about xmalloc returning a null pointer.
4461 Prefer xstrdup to xmalloc + strcpy.
4462 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
4464 * keyboard.c (apply_modifiers_uncached): Prefer local array to
4465 alloca of a constant.
4467 2012-07-05 Eli Zaretskii <eliz@gnu.org>
4469 * xdisp.c (display_line): Fix horizontal pixel coordinates when
4470 hscroll is larger than the line width. Fixes long and futile
4471 looping inside extend_face_to_end_of_line (on a TTY) producing
4472 glyphs that are not needed and thrown away.
4474 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
4476 * marker.c (set_marker_restricted_both): Simplify by using
4479 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
4481 * editfns.c (region_limit): Simplify by using clip_to_bounds.
4483 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
4485 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
4486 not defined (Bug#11768).
4487 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
4488 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
4489 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
4490 followed by gtk_box_set_homogeneous (Bug#11768).
4491 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
4492 (update_theme_scrollbar_width, xg_create_scroll_bar):
4493 Use gtk_scrollbar_new (Bug#11768).
4494 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
4495 (is_box_type): New function (Bug#11768).
4496 (xg_tool_item_stale_p): Call is_box_type.
4497 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
4498 with default display (Bug#11768).
4500 2012-07-05 Eli Zaretskii <eliz@gnu.org>
4502 * xdisp.c (window_hscroll_limited): New function.
4503 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
4504 coordinates when window's hscroll is set to insanely large
4507 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
4509 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
4510 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
4512 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
4515 * lisp.h (xzalloc): New prototype. Omit needless casts.
4516 * alloc.c (xzalloc): New function. Omit needless casts.
4517 * charset.c: Omit needless casts. Convert all calls to
4518 xmalloc with following memset to xzalloc.
4519 * dispnew.c: Likewise.
4520 * fringe.c: Likewise.
4521 * image.c: Likewise.
4522 * sound.c: Likewise.
4524 * w32fns.c: Likewise.
4525 * w32font.c: Likewise.
4526 * w32term.c: Likewise.
4527 * xfaces.c: Likewise.
4529 * xterm.c: Likewise.
4530 * atimer.c: Omit needless casts.
4531 * buffer.c: Likewise.
4532 * callproc.c: Likewise.
4534 * coding.c: Likewise.
4535 * composite.c: Likewise.
4537 * doprnt.c: Likewise.
4538 * editfns.c: Likewise.
4539 * emacs.c: Likewise.
4541 * filelock.c: Likewise.
4543 * gtkutil.c: Likewise.
4544 * keyboard.c: Likewise.
4546 * lread.c: Likewise.
4547 * minibuf.c: Likewise.
4548 * msdos.c: Likewise.
4549 * print.c: Likewise.
4550 * process.c: Likewise.
4551 * region-cache.c: Likewise.
4552 * search.c: Likewise.
4553 * sysdep.c: Likewise.
4554 * termcap.c: Likewise.
4555 * terminal.c: Likewise.
4556 * tparam.c: Likewise.
4557 * w16select.c: Likewise.
4559 * w32reg.c: Likewise.
4560 * w32select.c: Likewise.
4561 * w32uniscribe.c: Likewise.
4562 * widget.c: Likewise.
4563 * xdisp.c: Likewise.
4564 * xmenu.c: Likewise.
4566 * xselect.c: Likewise.
4568 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
4570 * fileio.c (time_error_value): Check the right error number.
4571 Problem reported by Troels Nielsen in
4572 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
4574 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
4576 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
4577 This should be fixed in a better way; see Eli Zaretskii in
4578 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
4579 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
4581 * fileio.c (time_error_value): Rename from special_mtime.
4582 The old name's problems were noted by Eli Zaretskii in
4583 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
4585 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
4586 This variable's comment says Emacs needs at least one GDB-visible
4587 symbol of type enum pvec_type, to work around GDB problems.
4588 The symbol's value doesn't matter.
4590 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
4591 that causes compilation to fail on pre-C99 compilers.
4593 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
4595 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
4596 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
4598 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
4600 * buffer.c (init_buffer_once): Fix initialization of
4601 headers for buffer_defaults and buffer_local_symbols.
4602 Reported by Juanma Barranquero <lekktu@gmail.com>.
4604 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
4606 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
4607 * lisp.h (enum pvec_type): Use fewer bits.
4608 (PSEUDOVECTOR_SIZE_BITS): New constant.
4609 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
4610 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
4611 change in pvec_type.
4612 (PSEUDOVECTOR_TYPEP): New macro.
4613 (TYPED_PSEUDOVECTORP): Use it.
4614 * fns.c (internal_equal): Adapt code to extract pvectype.
4615 * emacs.c (gdb_pvec_type): Update type.
4616 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
4617 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
4618 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
4619 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
4620 (sweep_vectors): Use it. Use local var `total_bytes' instead of
4621 abusing vector->header.next.nbytes.
4622 (live_vector_p): Use PVEC_TYPE.
4623 (mark_object): Adapt code to extract pvectype. Use switch.
4625 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
4627 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
4628 Tighten new eassert a bit.
4630 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
4632 Fix compilation with --enable-gcc-warnings and -O1
4634 * doprnt.c (doprnt): Change type of tem to int, initialize
4635 to avoid compiler warning. Add eassert.
4636 * search.c (simple_search): Initialize match_byte to avoid
4637 compiler warning. Add eassert.
4639 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
4641 Avoid weird behavior with large horizontal scrolls.
4642 Without this change, for example, large hscroll values would
4643 mess up Emacs's display on Fedora 15 x86, presumably due to
4644 overflows in int calculations in the display code.
4645 Also, if buffers had long lines, Emacs would freeze.
4646 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
4647 (set_window_hscroll): New function, containing the old guts of
4648 Fset_window_hscroll. Return the clipped value.
4649 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
4650 This avoids the need to check against PTRDIFF_MAX.
4652 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
4654 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
4656 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
4658 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
4660 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
4661 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
4662 since GCC 4.4.6 issues a bogus warning for them.
4664 Fix bugs in file timestamp newness comparisons.
4665 * fileio.c (Ffile_newer_than_file_p):
4666 * lread.c (Fload): Use full timestamp resolution of files,
4667 not just the 1-second resolution, so that files that are only
4668 slightly newer still count as newer.
4669 * fileio.c (Ffile_newer_than_file_p): Don't assume file
4670 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
4672 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
4674 * fileio.c: Improve handling of file time marker. (Bug#11852)
4675 (special_mtime): New function.
4676 (Finsert_file_contents, Fverify_visited_file_modtime):
4677 Use it to set special mtime values consistently.
4679 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
4681 * fileio.c (Finsert_file_contents): Properly handle st_mtime
4682 marker for non-existing file. (Bug#11852)
4684 2012-07-03 Glenn Morris <rgm@gnu.org>
4686 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
4687 and did not make it into globals.h).
4689 2012-07-03 Tom Tromey <tromey@redhat.com>
4691 * window.c (Fset_window_margins, Fset_window_fringes)
4692 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
4693 * textprop.c (Fprevious_property_change): No longer static.
4694 * syntax.c (Fsyntax_table_p): No longer static.
4695 * process.c (Fget_process, Fprocess_datagram_address): No longer
4697 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
4698 * keyboard.c (Fcommand_execute): No longer static.
4700 * insdel.c (Fcombine_after_change_execute): No longer static.
4701 * image.c (Finit_image_library): No longer static.
4702 * fileio.c (Fmake_symbolic_link): No longer static.
4703 * eval.c (Ffetch_bytecode): No longer static.
4704 * editfns.c (Fuser_full_name): No longer static.
4705 * doc.c (Fdocumentation_property, Fsnarf_documentation):
4707 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
4709 * dired.c (Ffile_attributes): No longer static.
4710 * composite.c (Fcomposition_get_gstring): No longer static.
4711 * callproc.c (Fgetenv_internal): No longer static.
4713 * ccl.h: Remove EXFUNs.
4714 * buffer.h: Remove EXFUNs.
4715 * dispextern.h: Remove EXFUNs.
4716 * intervals.h: Remove EXFUNs.
4717 * fontset.h: Remove EXFUN.
4718 * font.h: Remove EXFUNs.
4719 * dosfns.c (system_process_attributes): Remove EXFUN.
4720 * keymap.h: Remove EXFUNs.
4721 * lisp.h: Remove EXFUNs.
4722 * w32term.h: Remove EXFUNs.
4723 * window.h: Remove EXFUNs.
4724 * xsettings.h: Remove EXFUN.
4725 * xterm.h: Remove EXFUN.
4727 2012-07-03 Glenn Morris <rgm@gnu.org>
4729 * lisp.h (Frandom): Make it visible to C.
4730 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
4731 buffer for invisible buffers. (Bug#1229)
4733 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
4735 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
4736 values which aren't power of 2.
4737 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
4738 Verify it's value and the value of VECTOR_BLOCK_SIZE. Adjust users
4741 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
4743 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
4745 * alloc.c (mark_object): Revert part of last patch to use `switch'.
4747 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
4749 * alloc.c (allocate_vector_block): Remove redundant
4750 calls to mallopt if DOUG_LEA_MALLOC is defined.
4751 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
4752 avoid calls to mallopt if zero_vector is returned.
4754 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
4756 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
4757 is enabled, avoid dereferencing NULL current_sblock if
4760 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
4762 Cleanup basic buffer management.
4763 * buffer.h (struct buffer): Change layout to use generic vector
4764 marking code. Fix some comments. Change type of 'clip_changed'
4765 to bitfield. Remove unused #ifndef old.
4766 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
4767 (GET_OVERLAYS_AT): Fix indentation.
4768 (for_each_per_buffer_object_at): New macro.
4769 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
4770 (Fbuffer_local_variables): Use it.
4771 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
4772 * alloc.c (allocate_buffer): Adjust to match new layout of
4773 struct buffer. Fix comment.
4774 (mark_overlay): New function.
4775 (mark_buffer): Use it. Use mark_vectorlike to mark normal
4776 Lisp area of struct buffer.
4777 (mark_object): Use it. Adjust marking of misc objects
4778 and related comments.
4780 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
4782 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
4783 wrapper that is not needed because the wrapped code is a no-op (zero
4784 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
4785 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
4787 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
4789 * alloc.c (mark_buffer): Simplify. Remove prototype.
4790 (mark_object): Add comment. Reorganize marking of vector-like
4791 objects. Use CHECK_LIVE for all vector-like objects except buffers
4792 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
4793 Avoid redundant calls to mark_vectorlike for bool vectors.
4795 2012-06-30 Glenn Morris <rgm@gnu.org>
4797 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
4799 * epaths.in (PATH_SITELOADSEARCH): New.
4800 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
4801 This is rather than relying on --enable-locallisppath elements
4802 having "site-lisp" in their names. (Bug#10208#25, 11658)
4804 2012-06-30 Eli Zaretskii <eliz@gnu.org>
4806 * w32proc.c (sys_select): Accept and ignore one more argument.
4808 * w32.c (emacs_gnutls_pull): Call select with one more argument.
4810 * sysselect.h [DOS_NT]: Don't include sys/select.h.
4811 (pselect) [!MS_DOS]: Redirect to sys_select.
4813 * sysdep.c: Don't include dos.h and dosfns.h.
4815 * process.c (sys_select):
4816 * msdos.c (sys_select): Accept one more argument and ignore it.
4818 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
4819 adapt data types and code to that.
4822 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
4823 which clashes with the gnulib function of the same name.
4825 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
4827 * font.c (font_style_to_value, font_style_symbolic)
4828 (font_prop_validate_style): Add type checks for values in
4831 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
4833 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
4836 2012-06-29 Eli Zaretskii <eliz@gnu.org>
4838 * xdisp.c (try_window_id): Undo last change.
4840 * w32.c (getwd): Adjust commentary about startup_dir.
4841 (init_environment): Always call sys_access, even in non-MSVC
4842 builds. Don't chdir to the directory of the Emacs executable.
4843 This undoes code from 1997 which was justified by the need to
4844 "avoid conflicts when removing and renaming directories". But its
4845 downside was that every relative file name was being interpreted
4846 relative to the directory of the Emacs executable, which can never
4847 be TRT. In particular, it broke sys_access when called with
4848 relative file names.
4849 (sys_access): Map GetLastError to errno.
4851 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
4853 * window.h (struct window): Change type of 'fringes_outside_margins'
4854 to bitfield. Fix comment. Adjust users accordingly.
4855 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
4857 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
4860 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
4862 * gnutls.c (emacs_gnutls_handshake):
4863 Add QUIT to make the loop interruptible.
4865 2012-06-29 Glenn Morris <rgm@gnu.org>
4867 * charset.c (init_charset): Make lack of etc/charsets fatal.
4869 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
4871 * editfns.c (region_limit): Fix type mismatch.
4873 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
4875 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
4876 undefined. Convert from xassert to eassert.
4877 * nsmenu.m: Convert from xassert to eassert.
4878 * nsterm.m: Likewise.
4880 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
4882 * editfns.c (region_limit): Clip to narrowing (bug#11770).
4884 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
4886 Avoid integer overflow on scroll-left and scroll-right.
4887 * window.c (HSCROLL_MAX): New macro.
4888 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
4889 overflow when requested scroll falls outside ptrdiff_t range.
4891 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
4893 * window.h (struct window): Change type of 'hscroll',
4894 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
4895 'last_modified' and 'last_overlay_modified' to EMACS_INT.
4896 Adjust users accordingly.
4897 * xdisp.c (try_cursor_movement): Replace type check with eassert.
4898 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
4899 from EMACS_INT to ptrdiff_t.
4900 (make_window): Omit redundant initialization.
4902 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
4904 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
4906 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
4908 * window.h (struct window): Change type of 'use_time' and
4909 'sequence_number' from Lisp_Object to int.
4910 * frame.c (make_frame): Adjust users accordingly.
4911 * print.c (print_object): Likewise.
4912 * window.c (select_window, Fwindow_use_time, make_parent_window)
4913 (make_window): Likewise.
4915 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
4917 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
4918 enabled with --enable-checking=[all,glyphs] configure option.
4919 Fix GLYPH_DEBUG usage assuming that it may be undefined,
4920 adjust comments accordingly.
4921 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
4922 undefined, adjust comments accordingly.
4923 * image.c: Likewise.
4924 * scroll.c: Likewise.
4925 * w32fns.c: Likewise.
4926 * w32term.c: Likewise.
4927 * xdisp.c: Likewise.
4928 * xfaces.c: Likewise.
4930 * xterm.c: Likewise.
4932 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
4934 Generalize run-time debugging checks.
4935 * dispextern.h (XASSERTS): Remove.
4936 * fontset.c (xassert): Remove.
4937 Convert from xassert to eassert.
4938 * alloc.c: Convert from xassert to eassert.
4940 * dispnew.c: Likewise.
4942 * fringe.c: Likewise.
4943 * ftfont.c: Likewise.
4944 * gtkutil.c: Likewise.
4945 * image.c: Likewise.
4946 * keyboard.c: Likewise.
4948 * process.c: Likewise.
4949 * scroll.c: Likewise.
4950 * sound.c: Likewise.
4952 * w32console.c: Likewise.
4953 * w32fns.c: Likewise.
4954 * w32term.c: Likewise.
4955 * window.c: Likewise.
4956 * xdisp.c: Likewise.
4957 * xfaces.c: Likewise.
4959 * xselect.c: Likewise.
4960 * xterm.c: Likewise.
4962 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
4964 * fns.c (maybe_resize_hash_table): Output message when growing the
4967 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
4969 * alloc.c (allocate_string_data): Remove dead code.
4970 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
4971 avoid GCC warning about unused macro.
4973 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
4975 * alloc.c (allocate_string): Omit intervals initialization.
4976 * alloc.c (make_uninit_multibyte_string): Initialize intervals
4977 as in make_pure_string and make_pure_c_string.
4979 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
4981 * alloc.c (allocate_string): Fix last change.
4983 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
4985 * alloc.c (allocate_string): Remove two redundant calls
4986 to memset, add explicit initialization where appropriate.
4988 2012-06-27 Glenn Morris <rgm@gnu.org>
4990 * lisp.mk (lisp): Remove paths.elc.
4992 2012-06-27 Chong Yidong <cyd@gnu.org>
4994 * doc.c (Fsubstitute_command_keys): Fix punctuation.
4996 2012-06-26 John Wiegley <johnw@newartisans.com>
4998 * unexmacosx.c (copy_data_segment): Add two section names used
4999 on Mac OS X Lion: __mod_init_func and __mod_term_func.
5001 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
5002 when building with Clang.
5004 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
5006 * eval.c (Fapply): Allow calling it with a single argument.
5008 2012-06-26 Eli Zaretskii <eliz@gnu.org>
5010 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
5011 _stricmp and _strnicmp.
5012 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
5014 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
5016 * alloc.c (allocate_window): Zero out non-Lisp part of newly
5018 (allocate_process): Likewise for new process.
5019 (allocate_terminal): Change to use offsetof.
5020 (allocate_frame): Likewise.
5021 * frame.c (make_frame): Omit redundant initialization.
5022 * window.c (make_parent_window): Use memset.
5023 (make_window): Omit redundant initialization.
5024 * process.c (make_process): Omit redundant initialization.
5025 * terminal.c (create_terminal): Likewise.
5027 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
5029 * term.c (delete_tty): Remove redundant call to memset.
5031 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
5033 * alloc.c: Remove build_string.
5034 * lisp.h: Define build_string as static inline. This provides
5035 a better opportunity to optimize away calls to strlen when the
5036 function is called with compile-time constant argument.
5037 * image.c (imagemagick_error): Convert to build_string.
5038 * w32proc.c (sys_spawnve): Likewise.
5039 * xterm.c (x_term_init): Likewise.
5041 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
5043 Use sprintf return value instead of invoking strlen on result.
5044 In the old days this wasn't portable, since some sprintf
5045 implementations returned char *. But they died out years ago and
5046 Emacs already assumes sprintf returns int.
5047 Similarly for float_to_string.
5048 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
5049 * ccl.c (ccl_driver):
5050 * character.c (string_escape_byte8):
5051 * data.c (Fnumber_to_string):
5052 * doprnt.c (doprnt):
5053 * print.c (print_object):
5054 * xdisp.c (message_dolog):
5055 * xfns.c (syms_of_xfns):
5056 Use sprintf or float_to_string result to avoid need to call strlen.
5057 * data.c (Fnumber_to_string):
5058 Use make_unibyte_string, since the string must be ASCII.
5059 * lisp.h, print.c (float_to_string): Now returns int length.
5060 * term.c (produce_glyphless_glyph):
5061 Use sprintf result rather than recomputing it.
5063 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
5064 * Makefile.in (ALL_CFLAGS):
5065 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
5066 * gmalloc.c, regex.c: Include <config.h> unconditionally.
5068 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5070 * dispextern.h (xstrcasecmp): Define to library function
5071 strcasecmp if available.
5072 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
5074 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
5076 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
5077 Avoid comma operator.
5078 * menu.c (push_submenu_start, push_submenu_end)
5079 (push_left_right_boundary, push_menu_pane): Likewise.
5080 * msdos.c (dos_rawgetc): Likewise.
5082 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5084 * xfns.c (xic_create_fontsetname): Remove redundant calls
5087 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
5089 * gtkutil.c (get_utf8_string): Remove redundant assignment.
5090 sprintf already null-terminates its output.
5092 * xfns.c (x_window): Remove redundant cast.
5094 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
5096 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
5097 `const char *' to `char *' to avoid compiler warning.
5099 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
5101 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
5102 instead of truncating it to 63 (admittedly a generous limit).
5104 * process.c: Fix spelling and caps in comments.
5106 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
5108 * emacs.c (setpgrp): Remove definition, unused.
5109 * sysdep.c (setpgrp): Remove definition, not used in this file.
5111 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
5113 * makefile.w32-in: Update dependencies.
5115 2012-06-24 Eli Zaretskii <eliz@gnu.org>
5117 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
5118 (SYSTIME_H): Add nt/inc/sys/time.h.
5120 * systime.h [WINDOWSNT]: Include sys/time.h.
5122 * s/ms-w32.h (struct timespec): Definition moved from
5123 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
5125 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
5127 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
5128 * buffer.h (buffer_slot_type_mismatch):
5129 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
5130 * eval.c (unwind_to_catch):
5131 * image.c (my_png_error, my_error_exit):
5132 * keyboard.c (quit_throw_to_read_char, user_error)
5133 (Fexit_recursive_edit, Fabort_recursive_edit):
5134 * lisp.h (die, args_out_of_range, args_out_of_range_3)
5135 (wrong_type_argument, buffer_overflow, __executable_start)
5136 (memory_full, buffer_memory_full, string_overflow, Fthrow)
5137 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
5138 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
5140 (child_setup) [!DOS_NT]:
5141 * lread.c (end_of_file_error, invalid_syntax):
5142 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
5143 * puresize.h (pure_write_error):
5144 * search.c (matcher_overflow):
5145 * sound.c (sound_perror, alsa_sound_perror):
5146 * sysdep.c, syssignal.h (croak):
5147 * term.c (maybe_fatal, vfatal):
5148 * textprop.c (text_read_only):
5149 * undo.c (user_error):
5150 * unexmacosx.c (unexec_error):
5151 * xterm.c (x_ins_del_lines, x_delete_glyphs):
5152 Use _Noreturn rather than NO_RETURN.
5153 No need for separate decl merely because of _Noreturn.
5154 * sound.c (sound_warning, parse_sound):
5155 Remove unnecessary forward decls.
5157 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
5159 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
5160 * lisp.h (WAIT_READING_MAX): New macro.
5161 * dispnew.c (Fsleep_for, sit_for):
5162 * keyboard.c (kbd_buffer_get_event):
5163 * process.c (Faccept_process_output):
5164 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
5165 This improves on the previous patch, which introduced a bug
5166 when time_t is unsigned and as wide as intmax_t.
5167 See <http://bugs.gnu.org/9000#51>.
5169 2012-06-23 Eli Zaretskii <eliz@gnu.org>
5171 * dispnew.c (sit_for, Fsleep_for):
5172 * keyboard.c (kbd_buffer_get_event):
5173 * process.c (Faccept_process_output): Avoid compiler warnings when
5174 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
5176 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
5178 * makefile.w32-in: Update dependencies.
5180 * w32.c (ltime): Add return type and declare static.
5181 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
5183 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
5185 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
5186 Privately reported by Herbert J. Skuhra.
5187 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
5189 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
5190 not make_lisp_timeval, when the argument is of type EMACS_TIME.
5192 2012-06-23 Eli Zaretskii <eliz@gnu.org>
5194 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
5195 last argument of make_unibyte_string.
5197 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
5198 language ID in the event parameters.
5200 * w32term.c (w32_read_socket): Put the new keyboard codepage into
5201 event.code, not the obscure "character set ID".
5203 2012-06-23 Chong Yidong <cyd@gnu.org>
5205 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
5207 2012-06-23 Eli Zaretskii <eliz@gnu.org>
5209 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
5210 * w32.c (fdutimens): New function.
5212 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
5214 * s/ms-w32.h (pselect): Redirect to sys_select.
5216 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
5218 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
5219 in the logic of incrementing and decrementing the value of
5220 use_relocatable_buffers.
5222 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
5224 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
5225 Privately reported by Herbert J. Skuhra.
5226 [__FreeBSD__]: Remove "*/" typo after "#include".
5227 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
5228 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
5229 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
5230 Don't assume EMACS_TIME and struct timeval are the same type.
5232 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
5234 Support higher-resolution time stamps (Bug#9000).
5235 The time stamps are only nanosecond-resolution at the C level,
5236 since that's the best that any real-world system supports now.
5237 But they are picosecond-resolution at the Lisp level, as that's
5238 easy, and leaves room for future OS improvements.
5240 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
5243 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
5244 Don't get current time unless it's needed.
5246 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
5247 now provides it if it's absent.
5248 (start_atimer): Port to higher-res time stamps.
5249 Check for time stamp overflow. Don't get current time more
5250 often than is needed.
5252 * buffer.h (struct buffer): Buffer modtime now has high resolution.
5253 Include systime.h, not time.h.
5254 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
5256 * dired.c: Include stat-time.h.
5257 (Ffile-attributes): File times now have higher resolution.
5259 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
5260 (struct image): Timestamp now has higher resolution.
5262 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
5263 has at least microseconds now. All uses removed.
5264 (update_frame, update_single_window, update_window, update_frame_1)
5265 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
5266 (duration_to_sec_usec): Remove; no longer needed.
5268 * editfns.c (time_overflow): Now extern.
5269 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
5270 (float-time, Fformat_time_string, Fcurrent_time_string)
5271 (Fcurrent_time_zone): Accept and generate higher-resolution
5273 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
5274 (decode_time_components, lisp_seconds_argument): New functions.
5275 (make_time): Now static.
5276 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
5277 Report an error if the time is invalid, rather than having the caller
5280 * fileio.c: Include <stat-time.h>
5281 (Fcopy_file): Copy higher-resolution time stamps.
5282 Prefer to set the time stamp via a file descriptor if that works.
5283 (Fset_file_times, Finsert_file_contents, Fwrite_region)
5284 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
5285 (Fvisited_file_modtime, Fset_visited_file_modtime):
5286 Support higher-resolution time stamps.
5288 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
5290 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
5292 * image.c (prepare_image_for_display, clear_image_cache)
5293 (lookup_image): Port to higer-resolution time stamps.
5295 * keyboard.c (start_polling, bind_polling_period):
5296 Check for time stamp overflow.
5297 (read_char, kbd_buffer_get_event, timer_start_idle)
5298 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
5299 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
5300 Port to higher-resolution time stamps. Do not assume time_t is signed.
5301 (decode_timer): New function. Timers are now vectors of length 9,
5302 not 8, to accommodate the picosecond component.
5303 (timer_check_2): Use it.
5305 * nsterm.m (select_timeout, timeval_subtract): Remove.
5306 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
5307 as they're a bit more accurate and handle overflow better.
5308 (ns_select): Change prototype to be compatible with pselect.
5309 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
5310 * nsterm.h (ns_select): Adjust prototype.
5312 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
5313 us-resolution time stamps.
5314 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
5316 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
5318 * lisp.h (time_overflow): New decl.
5319 (wait_reading_process_output): First arg is now intmax_t, not int,
5320 to accommodate larger waits.
5322 * process.h (struct Lisp_Process.read_output_delay):
5323 Now counts nanoseconds, not microseconds.
5324 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
5326 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
5327 (wait_reading_process_output):
5328 Port to ns-resolution time stamps.
5329 (Faccept_process_output, wait_reading_process_output):
5330 Check for time stamp overflow. Do not assume time_t is signed.
5331 (select_wrapper): Remove; we now use pselect.
5332 (Fprocess_attributes): Now generates ns-resolution time stamps.
5334 * sysdep.c: Include utimens.h. Don't include utime.h
5335 or worry about struct utimbuf; gnulib does that for us now.
5336 (gettimeofday): Remove; gnulib provides a substitute.
5337 (make_timeval): New function.
5338 (set_file_times): Now sets ns-resolution time stamps.
5339 New arg FD; all uses changed.
5340 (time_from_jiffies, ltime_from_jiffies, get_up_time)
5341 (system_process_attributes):
5342 Now returns ns-resolution time stamp. All uses changed.
5343 Check for time stamp overflow.
5345 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
5346 provides a substitute now.
5348 * systime.h: Include timespec.h rather than sys/time.h and time.h,
5349 since it guarantees struct timespec.
5350 (EMACS_TIME): Now struct timespec, so that we can support
5351 ns-resolution time stamps.
5352 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
5353 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
5354 (EMACS_USECS): Remove.
5355 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
5356 so multiply the arg by 1000 before storing it.
5357 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
5359 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
5360 Port to ns-resolution time stamps.
5361 (EMACS_TIME_NEG_P): Remove; replaced by....
5362 (EMACS_TIME_SIGN): New macro.
5363 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
5364 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
5365 (set_file_times, make_time, lisp_time_argument): Adjust signature.
5366 (make_timeval, make_lisp_time, decode_time_components): New decls.
5367 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
5368 that it mishandled time_t overflow. You can't compare by subtracting!
5369 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
5370 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
5372 * term.c: Include <sys/time.h>.
5373 (timeval_to_Time): New function, for proper overflow wraparound.
5374 (term_mouse_position, term_mouse_click): Use it.
5376 * undo.c (record_first_change): Support higher-resolution time stamps
5378 (Fprimitive_undo): Use them when restoring time stamps.
5380 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
5381 (w32_get_internal_run_time):
5382 Port to higher-resolution Emacs time stamps.
5383 (ltime): Now accepts single 64-bit integer, as that's more convenient
5386 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
5388 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
5389 for compatibility with pselect. Support ns-resolution time stamps.
5391 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
5393 * xselect.c (wait_for_property_change, x_get_foreign_selection):
5394 Check for time stamp overflow, and support ns-resolution time stamps.
5396 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
5397 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
5398 (timeval_subtract): Remove; no longer needed.
5399 (XTflash, XTring_bell, x_wait_for_event):
5400 Port to ns-resolution time stamps. Don't assume time_t is signed.
5402 2012-06-22 Chong Yidong <cyd@gnu.org>
5404 * xdisp.c (x_consider_frame_title): Revert last change.
5406 2012-06-22 Eli Zaretskii <eliz@gnu.org>
5408 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
5409 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
5410 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
5411 staticidx goes up to 1597 out of 1600 = 0x640.)
5413 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
5415 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
5416 Otherwise, the umask might be mistakenly 0 while handling input signals.
5418 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
5420 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
5422 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
5424 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
5425 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
5426 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
5427 access to `contents' member of Lisp_Vector objects with AREF and ASET
5430 2012-06-19 Chong Yidong <cyd@gnu.org>
5432 * frame.c (delete_frame): When selecting a frame on a different
5433 text terminal, do not alter the terminal's top-frame.
5435 * xdisp.c (format_mode_line_unwind_data): Record the target
5436 frame's selected window and its terminal's top-frame.
5437 (unwind_format_mode_line): Restore them.
5438 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
5440 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
5441 since tty frames can be explicitly named.
5442 (prepare_menu_bars): Likewise.
5444 * term.c (Ftty_top_frame): New function.
5446 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
5448 Port byte-code-meter to modern targets.
5449 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
5450 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
5451 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
5452 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
5453 (METER_1, METER_2): Simplify.
5455 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
5457 * data.c (Fdefalias): Return `symbol' (bug#11686).
5459 2012-06-18 Martin Rudalics <rudalics@gmx.at>
5461 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
5462 gets killed during executing of this function (Bug#11665).
5463 Try to always return Qt when the buffer has been actually killed.
5464 (Vkill_buffer_query_functions): In doc-string say that functions
5465 run by this hook should not change the current buffer.
5467 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
5469 Fix recently-introduced process.c problems found by static checking.
5470 * process.c (write_queue_push, write_queue_pop, send_process):
5471 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
5472 (write_queue_pop): Fix pointer signedness problem.
5473 (send_process): Remove unused local.
5475 2012-06-17 Chong Yidong <cyd@gnu.org>
5477 * xdisp.c (redisplay_internal): No need to redisplay terminal
5478 frames that are not on top.
5480 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
5482 * process.c (make_process): Initialize write_queue.
5483 (write_queue_push, write_queue_pop): New functions.
5484 (send_process): Use them to maintain correct ordering of process
5487 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
5489 * lisp.h (eassert): Assume C89 or later.
5490 This removes the need for CHECK.
5491 (CHECK): Remove. Its comments about always evaluating its
5492 argument were confusing, as 'eassert' typically does not evaluate
5495 * coding.c (produce_chars): Use ptrdiff_t, not int.
5497 * xterm.c (x_draw_underwave): Check for integer overflow.
5498 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
5500 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
5502 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
5503 referenced (Bug#11583).
5505 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
5507 Implement wave-style variant of underlining.
5508 * dispextern.h (face_underline_type): New enum.
5509 (face): Add field for underline type.
5510 * nsterm.m (ns_draw_underwave): New function.
5511 (ns_draw_text_decoration): Use it.
5512 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
5514 (x_draw_glyph_string): Use them.
5515 * xfaces.c (Qline, Qwave): New Lisp objects.
5516 (check_lface_attrs, merge_face_ref)
5517 (Finternal_set_lisp_face_attribute, realize_x_face):
5518 Handle wave-style underline face attributes.
5519 * xterm.c (x_draw_underwave): New function.
5520 (x_draw_glyph_string): Use it.
5522 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
5524 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
5525 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
5526 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
5527 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
5528 ($(BLD)/w32select.$(O)): Update dependencies.
5530 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
5532 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
5533 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
5534 * character.c (_fetch_multibyte_char_p): Remove.
5535 * alloc.c: Include "character.h" before "buffer.h".
5537 * buffer.c: Likewise.
5538 * bytecode.c: Likewise.
5539 * callint.c: Likewise.
5540 * callproc.c: Likewise.
5541 * casefiddle.c: Likewise.
5542 * casetab.c: Likewise.
5543 * category.c: Likewise.
5545 * coding.c: Likewise.
5546 * composite.c: Likewise.
5547 * dired.c: Likewise.
5548 * dispnew.c: Likewise.
5550 * dosfns.c: Likewise.
5551 * editfns.c: Likewise.
5552 * emacs.c: Likewise.
5553 * fileio.c: Likewise.
5554 * filelock.c: Likewise.
5556 * fontset.c: Likewise.
5557 * fringe.c: Likewise.
5558 * indent.c: Likewise.
5559 * insdel.c: Likewise.
5560 * intervals.c: Likewise.
5561 * keyboard.c: Likewise.
5562 * keymap.c: Likewise.
5563 * lread.c: Likewise.
5564 * macros.c: Likewise.
5565 * marker.c: Likewise.
5566 * minibuf.c: Likewise.
5567 * nsfns.m: Likewise.
5568 * nsmenu.m: Likewise.
5569 * print.c: Likewise.
5570 * process.c: Likewise.
5571 * regex.c: Likewise.
5572 * region-cache.c: Likewise.
5573 * search.c: Likewise.
5574 * syntax.c: Likewise.
5576 * textprop.c: Likewise.
5578 * unexsol.c: Likewise.
5579 * w16select.c: Likewise.
5580 * w32fns.c: Likewise.
5581 * w32menu.c: Likewise.
5582 * window.c: Likewise.
5583 * xdisp.c: Likewise.
5585 * xmenu.c: Likewise.
5587 * xselect.c: Likewise.
5589 2012-06-16 Eli Zaretskii <eliz@gnu.org>
5591 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
5592 If all the glyphs of the glyph row came from strings, and we have no
5593 cursor positioning clues, put the cursor on the first glyph of the
5595 (handle_face_prop): Use chunk-relative overlay string index when
5596 indexing into it->string_overlays array. (Bug#11653)
5597 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
5598 the rightmost. (Bug#11720)
5600 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
5602 * category.h (CHAR_HAS_CATEGORY): Define as inline.
5603 (CATEGORY_MEMBER): Enforce 1/0 value.
5604 * category.c (_temp_category_set): Remove.
5606 2012-06-16 Eli Zaretskii <eliz@gnu.org>
5608 * window.c (Fdelete_other_windows_internal)
5609 (Fdelete_window_internal): Don't access frame's mouse highlight
5610 info of the initial frame. (Bug#11677)
5612 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
5614 * .gdbinit (xgetint): Fix recently-introduced paren typo.
5615 Assume USE_2_TAGS_FOR_INTS.
5616 (xreload): Adjust $tagmask width to match recent lisp.h change.
5618 Simplify lisp.h in minor ways that should not affect code.
5619 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
5620 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
5621 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
5622 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
5623 (INTTYPEBITS): New macro, for clarity.
5624 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
5625 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
5626 Simplify now that USE_LSB_TAG is always defined.
5627 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
5628 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
5630 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
5632 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
5634 2012-06-13 Glenn Morris <rgm@gnu.org>
5636 * s/bsd-common.h (BSD4_3):
5637 * s/usg5-4-common.h (USG5_4): No longer define; unused.
5639 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
5641 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
5644 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
5646 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
5647 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
5648 * alloc.c (widen_to_Lisp_Object): Remove.
5649 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
5650 * frame.c (delete_frame): Remove outdated comment.
5651 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
5652 USE_LISP_UNION_TYPE.
5653 (Fw32_unregister_hot_key): Likewise.
5654 (Fw32_toggle_lock_key): Likewise.
5655 * w32menu.c (add_menu_item): Likewise.
5656 (w32_menu_display_help): Use XIL instead of checking
5657 USE_LISP_UNION_TYPE.
5658 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
5659 (init_heap): Likewise.
5660 * w32term.c (w32_read_socket): Update comment.
5662 2012-06-13 Glenn Morris <rgm@gnu.org>
5664 * s/usg5-4-common.h, src/s/unixware.h:
5665 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
5667 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
5669 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
5671 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
5672 * alloc.c (make_number) [!defined make_number]:
5673 Remove, as lisp.h always defines this now.
5674 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
5675 (roundup_size): Verify that it is a power of 2.
5676 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
5677 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
5678 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
5679 -DUSE_LSB_TAG=0, to override the automatically-selected default.
5680 USE_LSB_TAG now is always defined to be either 0 or 1.
5682 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
5683 code works fine either way, and efficiency is not a concern here,
5684 as the union type is for debugging, not for production.
5685 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
5686 Use an inline function on all platforms when using the union type,
5687 since this is simpler and 'static inline' can be used portably
5689 (LISP_INITIALLY_ZERO): New macro.
5690 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
5691 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
5693 2012-06-12 Glenn Morris <rgm@gnu.org>
5695 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
5697 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
5699 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
5700 Move BROKEN_SIGIO to configure.
5702 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
5703 Move NO_TERMIO to configure.
5705 2012-06-12 Chong Yidong <cyd@gnu.org>
5707 * image.c (imagemagick_load_image): Use MagickFlattenImage if
5708 MagickMergeImageLayers is undefined. Use pixel pusher loop if
5709 MagickExportImagePixels is undefined.
5711 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
5713 * image.c (imagemagick_load_image): Remove unused label.
5715 2012-06-11 Glenn Morris <rgm@gnu.org>
5717 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5718 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
5719 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
5720 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
5722 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
5724 * alloc.c (make_byte_code): New function.
5725 (Fmake_byte_code): Use it. Don't purify here.
5726 * lread.c (read1): Use it as well to avoid extra allocation.
5728 2012-06-11 Chong Yidong <cyd@gnu.org>
5730 * image.c (imagemagick_load_image): Implement transparency.
5732 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
5734 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
5735 account for preceding backslashes. (Bug#11663)
5737 2012-06-09 Chong Yidong <cyd@gnu.org>
5739 * term.c: Support italics in capable terminals (Bug#9652).
5740 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
5741 (turn_on_face): Output using TS_enter_italic_mode if available.
5742 Don't handle unused blinking and alt-charset cases.
5743 (turn_off_face): Handle italic case; discard unused tty_blinking_p
5744 and tty_alt_charset_p cases.
5745 (tty_capable_p, init_tty): Support italics.
5747 * termchar.h (struct tty_display_info): Add field for italics.
5748 Remove unused blink field.
5750 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
5753 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
5754 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
5755 tty_alt_charset_p. Add tty_italic_p.
5757 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
5759 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
5760 dbus_type_is_basic if available.
5761 (xd_extract_signed, xd_extract_unsigned): Rename from
5762 extract_signed and extract_unsigned, respectively. Adapt callers.
5764 2012-06-09 Chong Yidong <cyd@gnu.org>
5766 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
5768 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
5771 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
5773 * xdisp.c (vmessage): Treat frame message as multibyte.
5774 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
5775 would generate the diagnostic "Making \302\247 buffer-local while
5778 2012-06-08 Eli Zaretskii <eliz@gnu.org>
5780 * dispnew.c (showing_window_margins_p): Undo last change, which
5781 was done due to an inadvertent commit.
5782 (adjust_frame_glyphs_for_frame_redisplay): Do call
5783 showing_window_margins_p.
5785 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
5787 * eval.c (Fmake_var_non_special): New primitive.
5788 (syms_of_eval): Defsubr it.
5789 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
5791 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
5793 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
5794 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
5796 2012-06-08 Eli Zaretskii <eliz@gnu.org>
5798 * alloc.c (allocate_vectorlike): Fix last change.
5800 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
5802 Block-based vector allocation of small vectors.
5803 * lisp.h (struct vectorlike_header): New field `nbytes',
5804 adjust comment accordingly.
5805 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
5806 to denote vector blocks. Adjust users (live_vector_p,
5807 mark_maybe_pointer, valid_lisp_object_p) accordingly.
5808 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
5809 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
5810 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
5811 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
5812 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
5813 (roundup_size): New constant.
5814 (struct vector_block): New data type.
5815 (vector_blocks, vector_free_lists, zero_vector): New variables.
5816 (all_vectors): Rename to `large_vectors'.
5817 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
5818 (sweep_vectors): New functions.
5819 (allocate_vectorlike): Return `zero_vector' as the only vector of
5820 0 items. Allocate new vector from block if vector size is less than
5821 or equal to VBLOCK_BYTES_MAX.
5822 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
5823 (init_alloc_once): Add call to init_vectors.
5825 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
5827 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
5829 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
5831 * doprnt.c (doprnt): Truncate multibyte char correctly.
5832 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
5833 would mishandle a string argument "Xc" if X was a multibyte
5834 character of length 2: it would truncate after X's first byte
5835 rather than including all of X.
5837 2012-06-06 Chong Yidong <cyd@gnu.org>
5839 * buffer.c (word_wrap): Doc fix.
5841 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
5843 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
5845 2012-06-03 Glenn Morris <rgm@gnu.org>
5847 * xdisp.c (tool-bar-style): Doc fix.
5849 2012-06-03 Ulrich Müller <ulm@gentoo.org>
5851 * Makefile.in (PAXCTL): Define.
5852 (temacs$(EXEEXT)): Disable memory randomization for the temacs
5853 binary via PaX flags if the paxctl utility is available.
5854 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
5855 Restore PaX flags to their default. (Bug#11398)
5857 2012-06-03 Chong Yidong <cyd@gnu.org>
5859 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
5862 2012-06-03 Chong Yidong <cyd@gnu.org>
5864 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
5865 (note_mode_line_or_margin_highlight): If there is no help echo,
5866 use mode-line-default-help-echo. Handle the case where the mouse
5867 position is past the end of the mode line string.
5869 * buffer.c (buffer_local_value_1): New function, split from
5870 Fbuffer_local_value; can return Qunbound.
5871 (Fbuffer_local_value): Use it.
5872 (Vmode_line_format): Docstring tweaks.
5874 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
5876 * sysdep.c (system_process_attributes): Improve comment.
5878 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
5880 * keyboard.c: Export real-this-command to Elisp.
5881 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
5882 and DEFVAR it. Update all users.
5884 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
5886 * minibuf.c (Fassoc_string): Remove duplicate declaration.
5888 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
5889 Convert pctcpu and pctmem to Lisp float properly.
5890 Let the compiler fold better, as 100.0/0x8000 is exact.
5892 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
5894 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
5897 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
5899 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
5901 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
5903 For a 'struct window', replace some Lisp_Object fields to
5904 bitfields where appropriate, remove unused fields.
5905 * window.h (struct window): Remove unused 'last_mark_x' and
5906 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
5907 change it's type from Lisp_Object to bitfield.
5908 Change type of 'force_start', 'optional_new_start',
5909 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
5910 fields from Lisp_Object to bitfield. Adjust users accordingly.
5912 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
5914 Pacify gcc -Wdouble-precision when using Xaw.
5915 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
5916 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
5917 Use 'float' consistently, rather than 'float' in most places
5918 and 'double' in a couple of places.
5920 2012-05-31 Eli Zaretskii <eliz@gnu.org>
5922 * xdisp.c (handle_stop): Detect whether we have overlay strings
5923 loaded by testing it->current.overlay_string_index to be
5924 non-negative, instead of checking whether n_overlay_strings is
5925 positive. (Bug#11587)
5927 2012-05-31 Chong Yidong <cyd@gnu.org>
5929 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
5931 * doc.c (Fsubstitute_command_keys): Doc fix.
5933 2012-05-31 Eli Zaretskii <eliz@gnu.org>
5935 * search.c (search_buffer): Remove calls to
5936 r_alloc_inhibit_buffer_relocation, as it is now called by
5937 maybe_unify_char, which was the cause of relocation of buffer text
5940 2012-05-31 Eli Zaretskii <eliz@gnu.org>
5942 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
5943 for the duration of call to load_charset, to avoid problems with
5944 callers of maybe_unify_char that access buffer text through C
5947 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
5948 decrement the inhibition flag, instead of just setting or
5951 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
5953 Remove obsolete '#define static' cruft.
5954 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
5955 This #undef was "temporary" in 2000; it is no longer needed
5956 now that '#define static' has gone away.
5957 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
5958 (gray_bitmap_bits): Remove; no longer needed.
5959 All uses replaced with definiens.
5960 * xterm.c: Include "bitmaps/gray.xbm".
5962 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
5964 Clean up __executable_start, monstartup when --enable-profiling.
5965 The following changes affect the code only when profiling.
5966 * dispnew.c (__executable_start): Rename from safe_bcopy.
5967 Define only on platforms that need it.
5968 * emacs.c: Include <sys/gmon.h> when profiling.
5969 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
5970 (__executable_start): Remove decl, since lisp.h does it now.
5971 (safe_bcopy): Remove decl; no longer has that name.
5972 (main): Coalesce #if into single bit of code, for simplicity.
5973 Cast pointers to uintptr_t, since standard libraries want integers
5975 * lisp.h (__executable_start): New decl.
5977 2012-05-31 Glenn Morris <rgm@gnu.org>
5979 * image.c (Fimagemagick_types): Doc fix.
5981 2012-05-30 Jim Meyering <meyering@redhat.com>
5983 * callproc.c (Fcall_process_region): Include directory component
5984 in mkstemp error message (Bug#11586).
5986 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
5988 * alloc.c, lisp.h (make_pure_vector): Now static.
5990 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
5992 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
5993 Move to byte-run.el.
5994 (Fautoload): Do the hash-doc more carefully.
5995 * data.c (Fdefalias): Purify definition, except for keymaps.
5996 (Qdefun): Move from eval.c.
5997 * lisp.h (Qdefun): Remove.
5998 * lread.c (read1): Tiny simplification.
6000 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
6002 Do not create empty overlays with the evaporate property (Bug#9642).
6003 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
6004 Bug#9642, but explicitly check that the buffer the overlay would
6005 be moved to is live and rearrange lines to make sure that errors
6006 will not put the overlay in an inconsistent state.
6007 (Fdelete_overlay): Cosmetics.
6009 2012-05-28 Eli Zaretskii <eliz@gnu.org>
6011 * w32term.c (my_bring_window_to_top): New function.
6012 (x_raise_frame): Use handle returned by DeferWindowPos, which
6013 could be different from the original one.
6014 Call my_bring_window_to_top instead of my_set_foreground_window.
6017 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
6018 by calling BringWindowToTop.
6020 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
6021 (WM_EMACS_END): Increase by one.
6023 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
6025 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
6026 This avoids undefined behavior that might cause the eassert
6027 to not catch an out-of-range value.
6029 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
6031 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
6032 Update dependencies.
6034 2012-05-27 Eli Zaretskii <eliz@gnu.org>
6036 * bidi.c (bidi_mirror_char): Fix last change.
6038 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
6040 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
6041 when referring to sectname field in printf format.
6043 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
6045 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
6046 Only r_alloc_inhibit_buffer_relocation needed to be added;
6047 the others were already declared.
6049 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
6050 before checking whether it's out of range. Put the check inside
6052 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
6054 2012-05-27 Ken Brown <kbrown@cornell.edu>
6056 * callproc.c (Fcall_process): Restore a line that was accidentally
6057 commented out in the 2011-02-13 change (bug#11547).
6059 2012-05-27 Eli Zaretskii <eliz@gnu.org>
6061 * lisp.h [REL_ALLOC]: Add prototypes for external functions
6062 defined on ralloc.c.
6064 * buffer.c [REL_ALLOC]: Remove prototypes of
6065 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
6066 they are now on lisp.h.
6068 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
6070 * search.c (search_buffer): Use it to inhibit relocation of buffer
6071 text while re_search_2 is doing its job, because re_search_2 is
6072 passed C pointers to buffer text. (Bug#11519)
6074 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
6077 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
6078 state after an additional call to move_it_in_display_line_to, keep
6079 the values of it->max_ascent and it->max_descent found for the
6081 (pos_visible_p): Revert the comparison against bottom_y to what it
6082 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
6085 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
6087 Fix coding-related core dumps with gcc -ftrapv.
6088 The code was computing A - B, where A and B are pointers, and B is
6089 random garbage. This can lead to core dumps on platforms that
6090 have special pointer registers, and it also leads to core dumps on
6091 x86-64 when compiled with gcc -ftrapv. The fix is to compute
6092 A - B only when B is initialized properly.
6093 * coding.c (coding_set_source, coding_set_destination): Return void.
6094 (coding_change_source, coding_change_destinations): New functions,
6095 with the old behaviors of coding_set_source and coding_set_destination.
6096 All callers that need an offset changed to use these new functions.
6098 2012-05-26 Glenn Morris <rgm@gnu.org>
6100 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
6102 2012-05-26 Eli Zaretskii <eliz@gnu.org>
6104 Extend mouse support on W32 text-mode console.
6105 * xdisp.c (draw_row_with_mouse_face):
6106 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
6108 * w32console.c: Include window.h.
6109 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
6111 (initialize_w32_display): Initialize mouse-highlight data.
6113 * w32inevt.c: Include termchar.h and window.h.
6114 (do_mouse_event): Support mouse-autoselect-window. When the mouse
6115 moves, call note_mouse_highlight. If help_echo changed, call
6116 gen_help_event to produce help-echo message in the echo area.
6117 Call clear_mouse_face if mouse_face_hidden is set in the mouse
6120 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
6122 * lread.c (read1): Simplify slightly to avoid an overflow warning
6123 with GCC 4.7.0 on x86-64.
6125 2012-05-26 Eli Zaretskii <eliz@gnu.org>
6127 * bidi.c (bidi_mirror_char): Revert last change: an int is
6128 definitely wide enough here.
6130 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
6132 Fix integer width and related bugs (Bug#9874).
6133 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
6134 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
6135 (string_bytes, check_sblock, allocate_string_data):
6136 (compact_small_strings, Fmake_bool_vector, make_string)
6137 (make_unibyte_string, make_multibyte_string)
6138 (make_string_from_bytes, make_specified_string)
6139 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
6140 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
6142 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6143 (allocate_pseudovector):
6144 Use int, not EMACS_INT, where int is wide enough.
6145 (inhibit_garbage_collection, Fgarbage_collect):
6146 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6147 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
6148 int might not be wide enough.
6149 (bidi_cache_search, bidi_cache_find, bidi_init_it)
6150 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
6151 (bidi_at_paragraph_end, bidi_find_paragraph_start)
6152 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
6153 (bidi_level_of_next_char, bidi_move_to_visually_next):
6154 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6155 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
6156 (Fkill_buffer, Fset_buffer_major_mode)
6157 (advance_to_char_boundary, Fbuffer_swap_text)
6158 (Fset_buffer_multibyte, overlays_at, overlays_in)
6159 (overlay_touches_p, struct sortvec, record_overlay_string)
6160 (overlay_strings, recenter_overlay_lists)
6161 (adjust_overlays_for_insert, adjust_overlays_for_delete)
6162 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
6163 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
6164 (Foverlay_recenter, last_overlay_modification_hooks_used)
6165 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
6166 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6167 (validate_region): Omit unnecessary test for b <= e,
6168 since that's guaranteed by the previous test.
6169 (adjust_overlays_for_delete): Avoid pos + length overflow.
6170 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
6171 (report_overlay_modification):
6172 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6173 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
6174 Omit pointer cast, which isn't needed anyway, and doesn't work
6175 after the EMACS_INT -> ptrdiff_t change.
6176 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
6177 * buffer.h: Adjust decls to match defn changes elsewhere.
6178 (struct buffer_text, struct buffer):
6179 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6180 Use EMACS_INT, not int, where int might not be wide enough.
6181 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
6182 not int, to avoid needless 32-bit limit on 64-bit hosts.
6183 (exec_byte_code): Use tighter memory-full test, one that checks
6184 for alloca overflow. Don't compute the address of the object just
6185 before an array, as that's not portable. Use EMACS_INT, not
6186 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
6187 * callint.c (Fcall_interactively):
6188 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6189 * callproc.c (call_process_kill, Fcall_process):
6190 Don't assume pid_t fits into an Emacs fixnum.
6191 (call_process_cleanup, Fcall_process, child_setup):
6192 Don't assume pid_t fits into int.
6193 (call_process_cleanup, Fcall_process, delete_temp_file)
6194 (Fcall_process_region):
6195 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6196 (Fcall_process): Simplify handling of volatile integers.
6197 Use int, not EMACS_INT, where int will do.
6198 * casefiddle.c (casify_object, casify_region, operate_on_word)
6199 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
6200 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6201 (casify_object): Avoid integer overflow when overallocating buffer.
6202 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
6203 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
6204 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
6205 * category.h (CATEGORYP): Don't assume arg is nonnegative.
6206 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
6207 integers are now checked earlier. All uses replaced with XINT.
6209 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6210 For CCL_MapSingle, check that content and value are in int range.
6211 (ccl_driver, Fregister_code_conversion_map):
6212 Check that Vcode_version_map_vector is a vector.
6213 (resolve_symbol_ccl_program): Check that vector header is in range.
6214 Always copy the vector, so that we can check its contents reliably
6215 now rather than having to recheck each instruction as it's being
6216 executed. Check that vector words fit in 'int'.
6217 (ccl_get_compiled_code, Fregister_ccl_program)
6218 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
6219 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
6220 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
6221 contents are in range.
6222 (Fccl_execute_on_string): Check that status is in range.
6223 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
6224 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
6225 Accept and return EMACS_INT, not int, because callers can pass values
6227 (c_string_width, strwidth, lisp_string_width, chars_in_text)
6228 (multibyte_chars_in_text, parse_str_as_multibyte)
6229 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
6230 (str_as_unibyte, str_to_unibyte, string_count_byte8)
6231 (string_escape_byte8, Fget_byte):
6232 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6233 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
6234 avoid mishandling large integers.
6235 * character.h: Adjust decls to match defn changes elsewhere.
6236 * charset.c (load_charset_map_from_file, find_charsets_in_text)
6237 (Ffind_charset_region):
6238 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6239 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
6240 (load_charset_map_from_vector, Fdefine_charset_internal):
6241 Don't assume fixnum fits in int.
6242 (load_charset_map_from_vector, Fmap_charset_chars):
6243 Remove now-unnecessary CHECK_NATNUMs.
6244 (Fdefine_charset_internal): Check ranges here, more carefully.
6245 Don't rely on undefined behavior with signed left shift overflow.
6246 Don't assume unsigned int fits into fixnum, or that fixnum fits
6247 into unsigned int. Don't require max_code to be a valid fixnum;
6248 that's not true for gb10830 4-byte on a 32-bit host. Allow
6249 invalid_code to be a cons, for the same reason. Require code_offset
6250 to be a character. Avoid int overflow if max_char is close
6252 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
6253 this is intended anyway and avoids some undefined behavior.
6254 (load_charset_map): Pass unsigned, not int, as 2nd arg of
6255 INDEX_TO_CODE_POINT, as that's what it expects.
6256 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
6257 * charset.h (DECODE_CHAR): Return int, not unsigned;
6258 this is what was intended anyway, and it avoids undefined behavior.
6259 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
6260 integer-overflow issues.
6261 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
6262 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
6263 where the argument is EMACS_INT, and this behavior is not intended.
6264 * chartab.c (Fmake_char_table, Fset_char_table_range)
6265 (uniprop_get_decoder, uniprop_get_encoder):
6266 Don't assume fixnum fits in int.
6267 * cmds.c (move_point): New function, that does the gist of
6268 Fforward_char and Fbackward_char, but does so while checking
6269 for integer overflow more accurately.
6270 (Fforward_char, Fbackward_char): Use it.
6271 (Fforward_line, Fend_of_line, internal_self_insert)
6272 (internal_self_insert):
6273 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6274 Fix a FIXME, by checking for integer overflow when calculating
6275 target_clm and actual_clm.
6276 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
6277 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
6278 (ASSURE_DESTINATION, coding_alloc_by_realloc)
6279 (coding_alloc_by_making_gap, alloc_destination)
6280 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
6281 (encode_coding_utf_16, detect_coding_emacs_mule)
6282 (decode_coding_emacs_mule, encode_coding_emacs_mule)
6283 (detect_coding_iso_2022, decode_coding_iso_2022)
6284 (encode_invocation_designation, encode_designation_at_bol)
6285 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
6286 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
6287 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
6288 (encode_coding_ccl, encode_coding_raw_text)
6289 (detect_coding_charset, decode_coding_charset)
6290 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
6291 (produce_composition, produce_charset, produce_annotation)
6292 (decode_coding, handle_composition_annotation)
6293 (handle_charset_annotation, consume_chars, decode_coding_gap)
6294 (decode_coding_object, encode_coding_object, detect_coding_system)
6295 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
6296 (code_convert_region, code_convert_string)
6297 (Fdefine_coding_system_internal)
6298 (coding_set_source, coding_set_destination):
6299 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6300 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
6301 (Fdefine_coding_system_internal):
6302 Don't assume fixnums fit in int.
6303 (decode_coding_gap, decode_coding_object, encode_coding_object)
6304 (Fread_coding_system, Fdetect_coding_region)
6305 (Funencodable_char_position, Fcheck_coding_systems_region)
6306 (get_translation, handle_composition_annotation, consume_chars):
6307 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6308 (consume_chars): Rewrite to not calculate an address outside buffer.
6309 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
6310 Don't access memory outside of the args array.
6311 (Fdefine_coding_system_internal): Check for charset-id overflow.
6312 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
6313 result of ENCODE_CHAR.
6314 * coding.h: Adjust decls to match defn changes elsewhere.
6315 (struct coding_system):
6316 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6317 * composite.c (get_composition_id, find_composition)
6318 (run_composition_function, update_compositions)
6319 (compose_text, composition_gstring_put_cache)
6320 (composition_gstring_p, composition_gstring_width)
6321 (fill_gstring_header, fill_gstring_body, autocmp_chars)
6322 (composition_compute_stop_pos, composition_reseat_it)
6323 (composition_update_it, struct position_record)
6324 (find_automatic_composition, composition_adjust_point)
6325 (Fcomposition_get_gstring, Ffind_composition_internal):
6326 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6327 (update_compositions):
6328 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6329 * composite.h: Adjust decls to match defn changes elsewhere.
6330 (struct composition):
6331 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6332 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
6333 Do not attempt to compute the address of the object just before a
6334 buffer; this is not portable.
6336 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6337 (Faset): Use int, not EMACS_INT, where int is wide enough.
6338 (Fstring_to_number): Don't assume fixnums fit in int.
6339 (Frem): Don't assume arg is nonnegative.
6340 * dbusbind.c (xd_append_arg): Check for integers out of range.
6341 (Fdbus_call_method): Don't overflow the timeout int.
6342 (extract_signed, extract_unsigned): New functions.
6343 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
6344 (xd_get_connection_references): Return ptrdiff_t, not int.
6346 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
6347 (xd_read_message_1):
6348 Use int, not unsigned, where the dbus API uses int.
6349 (Fdbus_message_internal): Don't overflow mtype.
6350 (syms_of_dbusbind): Allocate right-sized buffer for integers.
6351 * dired.c (directory_files_internal, file_name_completion, scmp)
6352 (file_name_completion_stat):
6353 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6354 (file_name_completion): Don't overflow matchcount.
6355 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
6356 * dispextern.h: Adjust decls to match defn changes elsewhere.
6357 (struct text_pos, struct glyph, struct bidi_saved_info)
6358 (struct bidi_string_data, struct bidi_it, struct composition_it)
6360 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6361 (struct display_pos, struct composition_it, struct it):
6362 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6363 * dispnew.c (increment_matrix_positions)
6364 (increment_row_positions, mode_line_string)
6365 (marginal_area_string):
6366 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6367 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
6368 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6369 (duration_to_sec_usec): New function, to check for overflow better.
6370 (Fsleep_for, sit_for): Use it.
6371 * doc.c (get_doc_string, store_function_docstring):
6372 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6373 (get_doc_string, Fsnarf_documentation):
6374 Use int, not EMACS_INT, where int is wide enough.
6376 Use SAFE_ALLOCA, not alloca.
6377 Check for overflow when converting EMACS_INT to off_t.
6378 * doprnt.c (doprnt):
6379 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6380 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
6381 Don't assume uid_t fits into fixnum.
6382 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
6383 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
6384 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
6385 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
6386 (general_insert_function)
6387 (Finsert_char, make_buffer_string, make_buffer_string_both)
6388 (update_buffer_properties, Fbuffer_substring)
6389 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
6390 (Fsubst_char_in_region, check_translation)
6391 (Ftranslate_region_internal, save_restriction_restore, Fformat)
6392 (transpose_markers, Ftranspose_regions):
6393 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6394 (clip_to_bounds): Move to lisp.h as an inline function).
6395 (Fconstrain_to_field): Don't assume integers are nonnegative.
6396 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
6397 (Fsubst_char_in_region, Fsave_restriction):
6398 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6399 (Femacs_pid): Don't assume pid_t fits into fixnum.
6400 (lo_time): Use int, not EMACS_INT, when int suffices.
6401 (lisp_time_argument): Check for usec out of range.
6402 (Fencode_time): Don't assume fixnum fits in int.
6403 (Fuser_login_name, Fuser_full_name): Signal an error
6404 if a uid argument is out of range, rather than relying on
6406 (Fformat_time_string): Remove now-unnecessary check.
6407 lisp_time_argument checks for out-of-range usec now.
6408 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
6409 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
6410 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
6411 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
6412 (init_cmdargs, Fdump_emacs):
6413 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6414 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
6415 the bottom (typically) 32 bits of the fixnum.
6416 * eval.c (specpdl_size, call_debugger):
6417 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6418 (when_entered_debugger, Fbacktrace_debug):
6419 Don't assume fixnum can fit in int.
6420 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
6421 the object just before a buffer; this is not portable.
6422 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
6423 (grow_specpdl, unbind_to):
6424 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6425 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
6426 (grow_specpdl): Simplify allocation by using xpalloc.
6427 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
6428 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
6429 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
6430 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6431 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
6433 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6434 (Fcopy_file, non_regular_nbytes, read_non_regular)
6435 (Finsert_file_contents):
6436 Use int, not EMACS_INT, where int is wide enough.
6437 (READ_BUF_SIZE): Verify that it fits in int.
6438 (Finsert_file_contents): Check that counts are in proper range,
6439 rather than assuming fixnums fit into ptrdiff_t etc.
6440 Don't assume fixnums fit into int.
6441 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
6442 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
6443 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
6444 (string_char_to_byte, string_byte_to_char)
6445 (string_make_multibyte, string_to_multibyte)
6446 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
6447 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
6448 (substring_both, Fdelete, internal_equal, Ffillarray)
6449 (Fclear_string, mapcar1)
6450 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
6451 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
6452 (larger_vector, make_hash_table, maybe_resize_hash_table)
6453 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
6454 (Fmaphash, secure_hash):
6455 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6456 (concat): Check for string index and length overflow.
6457 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
6459 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6460 (larger_vector): New API (vec, incr_min, size_max) replaces old
6461 one (vec, new_size, init). This catches size overflow.
6462 INIT was removed because it was always Qnil.
6463 All callers changed.
6464 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
6465 the upper bound on a hash table index size.
6466 (make_hash_table, maybe_resize_hash_table): Use it.
6467 (secure_hash): Computer start_byte and end_byte only after
6468 they're known to be in ptrdiff_t range.
6469 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
6470 (Ffont_get_glyphs, Ffont_at):
6471 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6472 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
6473 (Flist_fonts, Fopen_font):
6474 Don't assume fixnum can fit in int.
6475 (check_gstring): Don't assume index can fit in int.
6476 (font_match_p): Check that fixnum is a character, not a nonnegative
6477 fixnum, since the later code needs to stuff it into an int.
6478 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
6479 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
6480 conversion overflow issues.
6481 (Fopen_font): Check for integer out of range.
6482 (Ffont_get_glyphs): Don't assume index can fit in int.
6483 * font.h: Adjust decls to match defn changes elsewhere.
6484 * fontset.c (reorder_font_vector): Redo score calculation to avoid
6486 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
6487 printmax_t, where ptrdiff_t is wide enough.
6488 (Finternal_char_font):
6489 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6490 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
6491 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
6492 (Fset_frame_position, x_set_frame_parameters)
6493 (x_set_line_spacing, x_set_border_width)
6494 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
6495 Check that fixnums are in proper range for system types.
6496 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
6497 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6498 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
6499 Use SAFE_ALLOCA_LISP, not alloca.
6500 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
6501 intptr_t is wide enough.
6502 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
6503 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
6504 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
6505 Check for fixnum out of range.
6506 * ftfont.c (ftfont_list): Don't assume index fits in int.
6507 Check that fixnums are in proper range for system types.
6508 (ftfont_shape_by_flt):
6509 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6510 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
6511 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6512 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
6513 Check that fixnums are in proper range for system types.
6514 * gnutls.h: Adjust decls to match defn changes elsewhere.
6515 * gtkutil.c (xg_dialog_run):
6516 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6517 (update_frame_tool_bar):
6518 Check that fixnums are in proper range for system types.
6519 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
6520 (lookup_image): Check that fixnums are in range for system types.
6521 * indent.c (last_known_column, last_known_column_point):
6522 (current_column_bol_cache):
6523 (skip_invisible, current_column, check_display_width):
6524 (check_display_width, scan_for_column, current_column_1)
6525 (Findent_to, Fcurrent_indentation, position_indentation)
6526 (indented_beyond_p, Fmove_to_column, compute_motion):
6527 (Fcompute_motion, Fvertical_motion):
6528 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6529 (last_known_column_modified): Use EMACS_INT, not int.
6530 (check_display_width):
6532 Check that fixnums and floats are in proper range for system types.
6533 (compute_motion): Don't assume index or fixnum fits in int.
6534 (compute_motion, Fcompute_motion):
6535 Use int, not EMACS_INT, when it is wide enough.
6536 (vmotion): Omit local var start_hpos that is always 0; that way
6537 we don't need to worry about overflow in expressions involving it.
6538 * indent.h: Adjust decls to match defn changes elsewhere.
6540 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6541 Use int, not EMACS_INT, where int is wide enough.
6542 Remove unused members ovstring_chars_done and tab_offset;
6544 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
6545 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
6546 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
6547 (make_gap, copy_text, insert, insert_and_inherit)
6548 (insert_before_markers, insert_before_markers_and_inherit)
6549 (insert_1, count_combining_before, count_combining_after)
6550 (insert_1_both, insert_from_string)
6551 (insert_from_string_before_markers, insert_from_string_1)
6552 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
6553 (adjust_after_replace, adjust_after_insert, replace_range)
6554 (replace_range_2, del_range, del_range_1, del_range_byte)
6555 (del_range_both, del_range_2, modify_region)
6556 (prepare_to_modify_buffer, signal_before_change)
6557 (signal_after_change, Fcombine_after_change_execute):
6558 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6559 * intervals.c (traverse_intervals, rotate_right, rotate_left)
6560 (balance_an_interval, split_interval_right, split_interval_left)
6561 (find_interval, next_interval, update_interval)
6562 (adjust_intervals_for_insertion, delete_node, delete_interval)
6563 (interval_deletion_adjustment, adjust_intervals_for_deletion)
6564 (static_offset_intervals, offset_intervals)
6565 (merge_interval_right, merge_interval_left, make_new_interval)
6566 (graft_intervals_into_buffer, temp_set_point_both)
6567 (temp_set_point, set_point, adjust_for_invis_intang)
6568 (set_point_both, move_if_not_intangible, get_property_and_range)
6569 (get_local_map, copy_intervals, copy_intervals_to_string)
6570 (compare_string_intervals, set_intervals_multibyte_1):
6571 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6572 * intervals.h: Adjust decls to match defn changes elsewhere.
6574 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6575 * keyboard.c (this_command_key_count, this_single_command_key_start)
6576 (before_command_key_count, before_command_echo_length, echo_now)
6577 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
6578 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
6579 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
6580 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
6581 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6582 (last_non_minibuf_size, last_point_position, echo_truncate)
6583 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
6584 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
6585 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
6586 (stuff_buffered_input):
6587 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6588 (last_auto_save, command_loop_1, read_char):
6589 Use EMACS_INT, not int, to avoid integer overflow.
6590 (record_char): Avoid overflow in total_keys computation.
6591 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
6592 * keyboard.h: Adjust decls to match defn changes elsewhere.
6593 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
6594 (Fkey_description, Fdescribe_vector, Flookup_key):
6595 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6596 (click_position): New function, to check that positions are in range.
6597 (Fcurrent_active_maps):
6599 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6600 (Faccessible_keymaps, Fkey_description):
6601 (preferred_sequence_p):
6602 Don't assume fixnum can fit into int.
6603 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
6604 Check for integer overflow in size calculations.
6605 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
6606 avoid mishandling large integers.
6607 * lisp.h: Adjust decls to match defn changes elsewhere.
6608 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
6609 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
6610 (struct Lisp_Marker):
6611 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6612 (clip_to_bounds): Now an inline function, moved here from editfns.c.
6613 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
6614 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
6615 All callers changed.
6616 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
6617 Assume the arg has valid form, since it always does.
6618 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
6619 unsigned integer system type.
6620 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
6621 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
6622 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6623 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
6624 (duration_to_sec_usec): New decl.
6625 * lread.c (read_from_string_index, read_from_string_index_byte)
6626 (read_from_string_limit, readchar, unreadchar, openp)
6627 (read_internal_start, read1, oblookup):
6628 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6629 (Fload, readevalloop, Feval_buffer, Feval_region):
6630 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6631 (openp): Check for out-of-range argument to 'access'.
6632 (read1): Use int, not EMACS_INT, where int is wide enough.
6633 Don't assume fixnum fits into int.
6634 Fix off-by-one error that can read outside a buffer.
6635 (read_filtered_event): Use duration_to_sec_usec
6636 to do proper overflow checking on durations.
6637 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
6638 in size calculation.
6639 (Fexecute_kbd_macro):
6640 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6641 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
6642 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
6643 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
6644 (set_marker_both, set_marker_restricted_both, marker_position)
6645 (marker_byte_position, Fbuffer_has_markers_at):
6646 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6647 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
6648 * menu.c (ensure_menu_items): Rename from grow_menu_items.
6649 It now merely ensures that the menu is large enough, without
6650 necessarily growing it, as this avoids some integer overflow issues.
6651 All callers changed.
6652 (keymap_panes, parse_single_submenu, Fx_popup_menu):
6653 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6654 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
6655 Use SAFE_ALLOCA_LISP, not alloca.
6656 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
6657 to EMACS_INT. Check that fixnums are in proper range for system types.
6658 * minibuf.c (minibuf_prompt_width, string_to_object)
6659 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
6660 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
6661 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6662 (get_minibuffer, read_minibuf_unwind):
6663 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6664 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
6665 this simplifies overflow checking. All callers changed.
6666 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
6668 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6669 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
6670 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
6671 Check that fixnums are in proper range for system types.
6672 (Fx_create_frame, Fx_show_tip):
6673 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6674 * nsfont.m (ns_findfonts, nsfont_list_family):
6675 Don't assume fixnum fits in long.
6676 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
6677 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6678 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
6680 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
6681 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6682 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
6683 (PRINTDECLARE, PRINTPREPARE):
6684 (strout, print_string):
6685 (print, print_preprocess, print_check_string_charset_prop)
6687 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6689 (temp_output_buffer_setup, Fprin1_to_string, print_object):
6690 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6691 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
6692 (printchar, strout): Use xpalloc to catch size calculation overflow.
6693 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
6694 (print_error_message): Use SAFE_ALLOCA, not alloca.
6695 (print_object): Use int, not EMACS_INT, where int is wide enough.
6696 (print_depth, new_backquote_output, print_number_index):
6697 Use ptrdiff_t, not int, where int might not be wide enough.
6698 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
6699 (Fset_process_window_size, Fformat_network_address)
6700 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
6702 Check that fixnums are in proper range for system types.
6703 (Fsignal_process): Simplify by avoiding a goto.
6704 Check for process-ids out of pid_t range rather than relying on
6706 (process_tick, update_tick): Use EMACS_INT, not int.
6707 (Fformat_network_address, read_process_output, send_process)
6708 (Fprocess_send_region, status_notify):
6709 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6710 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
6711 (wait_reading_process_output, read_process_output, exec_sentinel):
6712 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6713 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
6714 (Faccept_process_output): Use duration_to_sec_usec to do proper
6715 overflow checking on durations.
6716 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
6717 Don't assume pid_t fits in int.
6718 * process.h (struct Lisp_Process): Members tick and update_tick
6719 are now of type EMACS_INT, not int.
6720 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
6721 configured --with-wide-int.
6722 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
6723 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
6724 * search.c (looking_at_1, string_match_1):
6725 (fast_string_match, fast_c_string_match_ignore_case)
6726 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
6727 (scan_newline, find_before_next_newline, search_command)
6728 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
6729 (set_search_regs, wordify):
6732 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6733 (string_match_1, search_buffer, set_search_regs):
6735 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6736 (wordify): Check for overflow in size calculation.
6737 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
6738 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
6739 Check that fixnums are in proper range for system types.
6740 * sound.c (struct sound_device)
6741 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
6742 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6743 (Fplay_sound_internal):
6744 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6745 * syntax.c (struct lisp_parse_state, find_start_modiff)
6746 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
6747 (Fparse_partial_sexp):
6748 Don't assume fixnums can fit in int.
6749 (struct lisp_parse_state, find_start_pos, find_start_value)
6750 (find_start_value_byte, find_start_begv)
6751 (update_syntax_table, char_quoted, dec_bytepos)
6752 (find_defun_start, prev_char_comend_first, back_comment):
6753 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
6754 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
6755 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6756 (Finternal_describe_syntax_value): Check that match_lisp is a
6757 character, not an integer, since the code stuffs it into int.
6758 (scan_words, scan_sexps_forward):
6759 Check that fixnums are in proper range for system types.
6761 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6762 (scan_sexps_forward):
6763 Use CHARACTERP, not INTEGERP, since the value must fit into int.
6764 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
6765 * syntax.h: Adjust decls to match defn changes elsewhere.
6766 (struct gl_state_s):
6767 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6768 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
6769 MOST_POSITIVE_FIXNUM.
6770 * sysdep.c (wait_for_termination_1, wait_for_termination)
6771 (interruptible_wait_for_termination, mkdir):
6772 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
6773 (emacs_read, emacs_write):
6774 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6775 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
6776 and double all fit in int.
6777 * term.c (set_tty_color_mode):
6778 Check that fixnums are in proper range for system types.
6779 * termhooks.h (struct input_event):
6780 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6781 * textprop.c (validate_interval_range, interval_of)
6782 (Fadd_text_properties, set_text_properties_1)
6783 (Fremove_text_properties, Fremove_list_of_text_properties)
6784 (Ftext_property_any, Ftext_property_not_all)
6785 (copy_text_properties, text_property_list, extend_property_ranges)
6786 (verify_interval_modification):
6787 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6788 (Fnext_single_char_property_change)
6789 (Fprevious_single_char_property_change):
6790 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6791 (copy_text_properties):
6792 Check for integer overflow in index calculation.
6793 * undo.c (last_boundary_position, record_point, record_insert)
6794 (record_delete, record_marker_adjustment, record_change)
6795 (record_property_change):
6796 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6797 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
6798 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6799 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
6800 (Fx_hide_tip, Fx_file_dialog):
6801 * w32menu.c (set_frame_menubar):
6802 Use ptrdiff_t, not int, for consistency with rest of code.
6803 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
6804 (select_window, Fdelete_other_windows_internal)
6805 (window_scroll_pixel_based, window_scroll_line_based)
6806 (Frecenter, Fset_window_configuration):
6807 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6808 (Fset_window_hscroll, run_window_configuration_change_hook)
6809 (set_window_buffer, temp_output_buffer_show, scroll_command)
6810 (Fscroll_other_window, Frecenter):
6811 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6812 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
6813 Don't assume fixnum fits in int.
6814 (Fset_window_scroll_bars):
6815 Check that fixnums are in proper range for system types.
6816 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
6817 (string_pos, c_string_pos, number_of_chars, init_iterator)
6818 (in_ellipses_for_invisible_text_p, init_from_display_pos)
6819 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
6820 (compute_display_string_end, handle_face_prop)
6821 (face_before_or_after_it_pos, handle_invisible_prop)
6822 (handle_display_prop, handle_display_spec, handle_single_display_spec)
6823 (display_prop_intangible_p, string_buffer_position_lim)
6824 (string_buffer_position, handle_composition_prop, load_overlay_strings)
6825 (get_overlay_strings_1, get_overlay_strings)
6826 (iterate_out_of_display_property, forward_to_next_line_start)
6827 (back_to_previous_visible_line_start, reseat, reseat_to_string)
6828 (get_next_display_element, set_iterator_to_next)
6829 (get_visually_first_element, compute_stop_pos_backwards)
6830 (handle_stop_backwards, next_element_from_buffer)
6831 (move_it_in_display_line_to, move_it_in_display_line)
6832 (move_it_to, move_it_vertically_backward, move_it_by_lines)
6833 (add_to_log, message_dolog, message_log_check_duplicate)
6834 (message2, message2_nolog, message3, message3_nolog
6835 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
6836 (current_message_1, truncate_echo_area, truncate_message_1)
6837 (set_message, set_message_1, store_mode_line_noprop)
6838 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
6839 (text_outside_line_unchanged_p, check_point_in_composition)
6840 (reconsider_clip_changes)
6841 (redisplay_internal, set_cursor_from_row, try_scrolling)
6842 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
6843 (redisplay_window, find_last_unchanged_at_beg_row)
6844 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
6845 (trailing_whitespace_p, find_row_edges, display_line)
6846 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
6847 (display_mode_element, store_mode_line_string)
6848 (pint2str, pint2hrstr, decode_mode_spec)
6849 (display_count_lines, display_string, draw_glyphs)
6850 (x_produce_glyphs, x_insert_glyphs)
6851 (rows_from_pos_range, mouse_face_from_buffer_pos)
6852 (fast_find_string_pos, mouse_face_from_string_pos)
6853 (note_mode_line_or_margin_highlight, note_mouse_highlight):
6854 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6855 (safe_call, init_from_display_pos, handle_fontified_prop)
6856 (handle_single_display_spec, load_overlay_strings)
6857 (with_echo_area_buffer, setup_echo_area_for_printing)
6858 (display_echo_area, echo_area_display)
6859 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
6860 (update_tool_bar, hscroll_window_tree, redisplay_internal)
6861 (redisplay_window, dump_glyph_row, display_mode_line)
6862 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
6863 (handle_display_spec, display_prop_string_p):
6864 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6865 (handle_single_display_spec, build_desired_tool_bar_string)
6866 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
6867 (get_specified_cursor_type):
6868 Check that fixnums are in proper range for system types.
6869 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
6870 (Flookup_image_map):
6871 Don't assume fixnums fit in int.
6872 (compare_overlay_entries):
6873 Avoid mishandling comparisons due to subtraction overflow.
6874 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
6875 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
6876 (handle_tool_bar_click):
6877 Use int, not unsigned, since we prefer signed and the signedness
6878 doesn't matter here.
6879 (get_next_display_element, next_element_from_display_vector):
6880 Use int, not EMACS_INT, when int is wide enough.
6881 (start_hourglass): Use duration_to_sec_usec to do proper
6882 overflow checking on durations.
6883 * xfaces.c (Fbitmap_spec_p):
6884 Check that fixnums are in proper range for system types.
6885 (compare_fonts_by_sort_order):
6886 Avoid mishandling comparisons due to subtraction overflow.
6887 (Fx_family_fonts, realize_basic_faces):
6888 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6890 Don't assume fixnum fits in int.
6891 Use SAFE_ALLOCA_LISP, not alloca.
6892 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
6893 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
6894 (face_at_buffer_position, face_for_overlay_string)
6895 (face_at_string_position):
6896 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6897 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
6898 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
6900 Check that fixnums are in proper range for system types.
6901 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
6902 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
6903 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6904 (Fx_change_window_property): Don't assume fixnums fit in int.
6905 * xfont.c (xfont_chars_supported):
6906 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6907 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
6908 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
6909 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6910 * xml.c (parse_region):
6911 * xrdb.c (magic_file_p):
6912 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6913 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
6914 (x_get_local_selection, x_reply_selection_request)
6915 (x_handle_selection_request, wait_for_property_change):
6916 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6917 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
6918 short is wide enough.
6919 (x_send_client_event): Don't assume fixnum fits in int.
6920 * xterm.c (x_x_to_emacs_modifiers):
6921 Don't assume EMACS_INT overflows nicely into int.
6922 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
6924 (handle_one_xevent): NATNUMP can eval its arg twice.
6925 (x_connection_closed):
6926 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6927 * xterm.h: Adjust decls to match defn changes elsewhere.
6928 (struct scroll_bar): Use struct vectorlike_header
6929 rather than rolling our own approximation.
6930 (SCROLL_BAR_VEC_SIZE): Remove; not used.
6932 2012-05-25 Glenn Morris <rgm@gnu.org>
6934 * lisp.mk (lisp): Update for more files being compiled now.
6936 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
6938 * lread.c: Remove `read_pure' which makes no difference.
6939 (read_pure): Remove var.
6940 (unreadpure): Remove function.
6941 (readevalloop): Don't call read_list with -1 flag.
6942 (read1, read_vector): Don't test read_pure any more.
6943 (read_list): Simplify.
6945 * fileio.c, character.h: Minor style tweaks.
6947 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
6949 * window.h (clip_changed): Remove useless declaration.
6951 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
6953 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
6954 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
6956 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
6959 This directory predates autoconf and is no longer needed nowadays.
6960 Move its few remaining bits of functionality to where they're needed.
6961 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
6962 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
6963 * m/template.h: Remove.
6964 * Makefile.in (M_FILE): Remove. All uses removed.
6965 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
6966 * lisp.h (USE_LSB_TAG):
6967 * mem-limits.h (EXCEEDS_LISP_PTR):
6968 Use VAL_MAX, not VALBITS, in #if.
6969 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
6970 (EMACS_UINT): Define unconditionally now.
6971 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
6972 (BITS_PER_EMACS_INT): New constants, replacing
6973 what used to be in config.h, but not useful in #if.
6974 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
6975 define them any more.
6976 (VAL_MAX): New macro.
6978 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
6979 BITS_PER_EMACS_INT, in #if.
6980 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
6981 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
6982 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
6983 * s/ms-w32.h (DATA_START):
6984 Move here from removed file m/intel386.h.
6985 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
6986 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
6988 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
6990 Assume C89 or later.
6991 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
6992 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
6994 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
6995 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
6996 * textprop.c, tparam.c (NULL): Remove.
6997 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
6998 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
6999 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
7000 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
7001 * xterm.c (input_signal_count): Assume volatile works.
7003 2012-05-21 Ken Brown <kbrown@cornell.edu>
7005 * xgselect.c (xg_select): Fix first argument in call to 'select'
7008 2012-05-20 Ken Brown <kbrown@cornell.edu>
7010 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
7011 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
7013 2012-05-19 Ken Brown <kbrown@cornell.edu>
7015 * xfns.c (x_in_use): Remove `static' qualifier.
7016 * xterm.h (x_in_use): Declare.
7017 * xgselect.c: Include xterm.h.
7018 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
7019 and `display_arg' (bug#9754).
7021 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
7023 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
7025 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
7026 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
7028 2012-05-18 Eli Zaretskii <eliz@gnu.org>
7030 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
7032 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
7033 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
7035 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
7036 reference to image_cache->refcount.
7037 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
7039 2012-05-17 Juri Linkov <juri@jurta.org>
7041 * search.c (Fword_search_regexp, Fword_search_backward)
7042 (Fword_search_forward, Fword_search_backward_lax)
7043 (Fword_search_forward_lax): Move functions to isearch.el
7044 (bug#10145, bug#11381).
7046 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
7048 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
7050 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
7052 * lread.c (init_obarray): Declare Qt and Qnil as special.
7054 2012-05-14 Glenn Morris <rgm@gnu.org>
7056 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
7057 Put "libexec" before "bin", for the sake of init_callproc_1.
7059 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
7061 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
7063 * unexaix.c: Port to more-recent AIX compilers.
7064 (report_error, report_error_1, make_hdr, copy_sym)
7065 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
7066 Make arguments const char *, not char *, to avoid violations of C
7067 standard and to fix some AIX warnings reported by Gilles Pion.
7069 2012-05-14 Eli Zaretskii <eliz@gnu.org>
7071 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
7072 already have overlays loaded.
7073 (handle_single_display_spec): Before returning without displaying
7074 fringe bitmap, synchronize the bidi iterator with the main display
7075 iterator, by calling iterate_out_of_display_property.
7076 (iterate_out_of_display_property): Detect buffer iteration by
7077 testing that it->string is a Lisp string.
7078 (get_next_display_element): When the current object is exhausted,
7079 and there's something on it->stack, call set_iterator_to_next to
7080 proceed with what's on the stack, instead of returning zero.
7081 (set_iterator_to_next): If called at the end of a Lisp string,
7082 proceed to consider_string_end without incrementing string
7083 position. Don't increment display vector index past the end of
7084 the display vector. (Bug#11417)
7085 (pos_visible_p): Don't report a position visible when move_it_to
7086 stopped at the last line of window, which happens to be scanned
7087 backwards by the bidi iteration. (Bug#11464)
7089 2012-05-14 Eli Zaretskii <eliz@gnu.org>
7091 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
7092 and right-margin display specs even if the spec is invalid or we
7093 are on a TTY, and thus unable to display on the fringes.
7094 That's because the text with the property will not be displayed anyway,
7095 so we need to signal to the caller that this is a "replacing"
7096 display spec. This fixes display when the spec is invalid or we
7099 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
7101 * unexaix.c (make_hdr): Fix typo in prototype.
7102 This bug broke the build on AIX. Problem reported by Gilles Pion.
7104 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
7106 * keyboard.c (kbd_buffer_get_event): Read special events also in
7107 batch mode. (Bug#11415)
7109 2012-05-12 Glenn Morris <rgm@gnu.org>
7111 * ns.mk: Update for ns_appbindir no longer having trailing "/".
7113 2012-05-12 Eli Zaretskii <eliz@gnu.org>
7115 * lisp.mk (lisp): Add newcomment.elc.
7117 2012-05-12 Glenn Morris <rgm@gnu.org>
7119 * Makefile.in (MKDIR_P): New, set by configure.
7120 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
7122 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
7124 Remove unused function hourglass_started.
7125 * dispextern.h (hourglass_started):
7126 * w32fns.c (hourglass_started):
7127 * xdisp.c (hourglass_started): Remove.
7129 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
7131 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
7132 Update dependencies.
7134 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
7136 * xgselect.c (xg_select): Put maxfds+1 into a var.
7137 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
7139 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
7141 2012-05-10 Dave Abrahams <dave@boostpro.com>
7143 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
7144 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
7146 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
7148 * dbusbind.c (xd_registered_buses): New internal Lisp object.
7149 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
7150 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
7151 Initialize xd_registered_buses.
7153 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
7155 Untag more efficiently if USE_LSB_TAG.
7156 This is based on a proposal by YAMAMOTO Mitsuharu in
7157 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
7158 For an admittedly artificial (nth 8000 longlist) benchmark on
7159 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
7160 Emacs's overall text size by 1%.
7161 * lisp.h (XUNTAG): New macro.
7162 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
7163 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
7164 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
7165 * eval.c (Fautoload):
7166 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
7167 * frame.h (XFRAME): Use XUNTAG.
7169 Port recent dbusbind.c changes to 32-bit --with-wide-int.
7170 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
7171 Remove unportable assumptions about print widths of types like
7173 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
7174 intptr_t when converting between pointer and integer, to avoid GCC
7175 warnings about wrong width.
7177 2012-05-09 Eli Zaretskii <eliz@gnu.org>
7179 * w32proc.c (new_child): Force Windows to reserve only 64KB of
7180 stack for each reader_thread, instead of defaulting to 8MB
7181 determined by the linker. This avoids failures in creating
7182 subprocesses on Windows 7, see the discussion in this thread:
7183 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
7185 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
7187 Fix up display of the *Minibuf-0* buffer in the mini window.
7188 * keyboard.c (read_char): Don't clear the echo area if there's no
7190 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
7191 contents of *Minibuf-0*) if there's no message displayed in its stead.
7193 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
7195 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
7198 2012-05-06 Chong Yidong <cyd@gnu.org>
7200 * lisp.mk (lisp): Update.
7202 2012-05-05 Jim Meyering <meyering@redhat.com>
7204 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
7206 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
7208 * data.c (PUT_ERROR): New macro.
7209 (syms_of_data): Use it. Add new error type `user-error'.
7210 * undo.c (user_error): New function.
7211 (Fprimitive_undo): Use it.
7212 * print.c (print_error_message): Adjust print style for `user-error'.
7213 * keyboard.c (user_error): New function.
7214 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
7216 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
7218 Do not limit current-time-string to years 1000..9999.
7219 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
7220 (Fcurrent_time_string): Support any year that is supported by the
7221 underlying localtime representation. Don't use asctime, as it
7222 has undefined behavior for years outside the range -999..9999.
7224 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
7226 Fix race conditions involving setenv, gmtime, localtime, asctime.
7227 Without this fix, interrupts could mess up code that uses these
7228 nonreentrant functions, since setting TZ invalidates existing
7229 tm_zone or tzname values, and since most of these functions return
7230 pointers to static storage.
7231 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
7232 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
7233 Grow the critical sections to include not just invoking
7234 localtime/gmtime, but also accessing these functions' results
7235 including their tm_zone values if any, and any related TZ setting.
7236 (format_time_string): Last arg is now struct tm *, not struct tm **,
7237 so that the struct tm is saved in the critical section.
7238 All callers changed. Simplify allocation of initial buffer, partly
7239 motivated by the fact that memory allocation needs to be outside
7240 the critical section.
7242 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
7244 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
7245 with RESET_INTERVAL.
7247 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
7248 Remove duplicated buffer name initialization.
7250 2012-05-02 Jim Meyering <jim@meyering.net>
7252 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
7254 * xfns.c (x_window): Use xstrdup (Bug#11375).
7256 2012-05-02 Eli Zaretskii <eliz@gnu.org>
7258 * xdisp.c (pos_visible_p): If already at a newline from the
7259 display string before the 'while' loop, don't walk back the glyphs
7260 from it3.glyph_row. Solves assertion violation when the display
7261 string begins with a newline (egg.el). (Bug#11367)
7263 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
7265 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
7268 2012-05-01 Glenn Morris <rgm@gnu.org>
7270 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
7271 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
7272 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
7273 All were removed before 23.1.
7275 * dispnew.c: Remove HAVE_LIBNCURSES test;
7276 it is always true on relevant platforms.
7278 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
7279 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
7281 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
7283 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
7285 * .gdbinit (xpr): Remove checks for no longer existing misc types.
7286 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
7289 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
7291 Do not avoid creating empty evaporating overlays (Bug#9642).
7292 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
7293 That is, do not delete an evaporating overlay if it becomes
7294 empty after its bounds are adjusted to fit within its buffer.
7295 This fix caused other problems, and I'm reverting it until we get
7296 to the bottom of them.
7298 2012-04-27 Chong Yidong <cyd@gnu.org>
7300 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
7302 2012-04-27 Eli Zaretskii <eliz@gnu.org>
7304 * xdisp.c (pos_visible_p): If the window start position is beyond
7305 ZV, start the display from buffer beginning. Prevents assertion
7306 violation in init_iterator when the minibuffer window is scrolled
7309 * window.c (window_scroll_pixel_based): Likewise.
7311 2012-04-27 Chong Yidong <cyd@gnu.org>
7313 * keymap.c (where_is_internal): Doc fix (Bug#10872).
7315 2012-04-27 Glenn Morris <rgm@gnu.org>
7317 * fileio.c (Fcopy_file, Fset_file_selinux_context):
7318 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
7320 2012-04-27 Eli Zaretskii <eliz@gnu.org>
7322 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
7323 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
7325 2012-04-26 Eli Zaretskii <eliz@gnu.org>
7327 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
7328 display element, check also the underlying string or buffer
7329 character. (Bug#11341)
7331 * w32menu.c: Include w32heap.h.
7332 (add_menu_item): If the call to AppendMenuW (via
7333 unicode_append_menu) fails, disable Unicode menus only if we are
7334 running on Windows 9X/Me.
7336 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
7338 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
7339 (xgetint): Add missing shift for LSB tags.
7341 2012-04-24 Martin Rudalics <rudalics@gmx.at>
7343 * keyboard.c (read_char): Don't wipe echo area for select window
7344 events: These might get delayed via `mouse-autoselect-window'
7347 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
7349 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
7350 manipulation of :loaded-from data.
7352 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
7354 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
7355 now a cons (bug#11311).
7357 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
7359 Do not create empty overlays with the evaporate property (Bug#9642).
7360 * buffer.c (Fmove_overlay): Delete an evaporating overlay
7361 if it becomes empty after its bounds are adjusted to fit within
7362 its buffer. Without this fix, in a nonempty buffer (let ((o
7363 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
7364 yields an empty overlay that has the evaporate property, which is
7365 not supposed to happen.
7367 Fix minor GTK3 problems found by static checking.
7368 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
7369 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
7370 (struct _EmacsFixedClass, emacs_fixed_get_type):
7371 Move decls here from emacsgtkfixed.h, since they needn't be public.
7372 (emacs_fixed_get_type): Now static.
7373 (emacs_fixed_class_init): Omit unused local.
7374 (emacs_fixed_child_type): Remove; unused.
7375 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
7376 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
7377 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
7378 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
7379 (EMACS_FIXED_GET_CLASS): Remove; unused.
7380 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
7382 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
7383 Problem reported by Juanma Barranquero for Windows -Wunused-function.
7385 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
7387 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
7388 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
7389 (__malloc_size_t, __malloc_ptrdiff_t):
7390 Remove. All uses removed, replaced by the definiens if needed,
7391 since we can assume C89 or better now.
7392 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
7393 (protect_malloc_state, align, get_contiguous_space)
7394 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
7395 (malloc_atfork_handler_child, malloc_enable_thread)
7396 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
7397 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
7398 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
7399 (special_realloc, _realloc_internal_nolock, _realloc_internal)
7400 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
7401 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
7402 Define using prototypes, not old style.
7403 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
7404 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
7405 (align): Don't assume that signed integer overflow wraps around.
7406 Omit unused local var.
7407 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
7408 (_free_internal_nolock, memalign, mallochook, reallochook):
7409 Omit no-longer-needed casts.
7410 (valloc): Use getpagesize, not __getpagesize.
7411 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
7412 (struct hdr): The 'magic' member is now size_t, not unsigned long.
7414 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
7416 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
7418 Move functions from C to Lisp. Make non-blocking method calls
7419 the default. Implement further D-Bus standard interfaces.
7421 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
7422 (QCdbus_request_name_allow_replacement)
7423 (QCdbus_request_name_replace_existing)
7424 (QCdbus_request_name_do_not_queue)
7425 (QCdbus_request_name_reply_primary_owner)
7426 (QCdbus_request_name_reply_in_queue)
7427 (QCdbus_request_name_reply_exists)
7428 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
7429 (QCdbus_registered_serial, QCdbus_registered_method)
7430 (QCdbus_registered_signal): New Lisp objects.
7431 (XD_DEBUG_MESSAGE): Use sizeof.
7432 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
7433 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
7434 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
7435 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
7436 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
7437 (xd_signature, xd_append_arg): Allow float for integer types.
7438 (xd_get_connection_references): New function.
7439 (xd_get_connection_address): Rename from xd_initialize.
7440 Return cached address.
7441 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
7442 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
7444 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
7445 Return number of refcounts.
7446 (Fdbus_get_unique_name): Make stronger parameter check.
7447 (Fdbus_message_internal): New defun.
7448 (Fdbus_call_method, Fdbus_call_method_asynchronously)
7449 (Fdbus_method_return_internal, Fdbus_method_error_internal)
7450 (Fdbus_send_signal, Fdbus_register_service)
7451 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
7452 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
7453 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
7454 (Vdbus_compiled_version, Vdbus_runtime_version)
7455 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
7456 (Vdbus_message_type_method_return, Vdbus_message_type_error)
7457 (Vdbus_message_type_signal): New defvars.
7458 (Vdbus_registered_buses, Vdbus_registered_objects_table):
7461 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
7463 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
7464 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
7465 Do not assume ptrdiff_t is the same width as 'int'.
7467 * alloc.c: Handle unusual debugging option combinations.
7468 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
7469 since the two debugging options are incompatible.
7470 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
7472 (mem_init, mem_insert, mem_insert_fixup):
7473 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
7474 (NEED_MEM_INSERT): Remove; no longer needed.
7476 2012-04-22 Leo Liu <sdl.web@gmail.com>
7478 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
7480 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
7482 * sysdep.c [__FreeBSD__]: Minor cleanups.
7483 (list_system_processes, system_process_attributes) [__FreeBSD__]:
7484 Use Emacs indenting style more consistently. Avoid some casts.
7485 Use 'double' consistently rather than mixing 'float' and 'double'.
7487 2012-04-21 Eduard Wiebe <usenet@pusto.de>
7489 * sysdep.c (list_system_processes, system_process_attributes):
7490 Add implementation for FreeBSD (Bug#5243).
7492 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
7494 * lisp.mk (lisp): Update.
7496 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
7498 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
7499 It is never used otherwise.
7501 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
7503 * print.c (print_preprocess): Only check print_depth if print-circle
7505 (print_object): Check for cycles even when print-circle is nil and
7506 print-gensym is t, but only check print_depth if print-circle is nil.
7508 2012-04-20 Chong Yidong <cyd@gnu.org>
7510 * process.c (wait_reading_process_output): If EIO occurs on a pty,
7511 set the status to "failed" and ensure that sentinel is run.
7513 2012-04-20 Glenn Morris <rgm@gnu.org>
7515 * process.c (Fset_process_inherit_coding_system_flag)
7516 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
7517 (Fmake_network_process, Fmake_serial_process): Doc fix.
7519 2012-04-20 Eli Zaretskii <eliz@gnu.org>
7521 * xdisp.c (string_buffer_position_lim): Limit starting position to
7523 (set_cursor_from_row): If called for a mode-line or header-line
7524 row, return zero immediately.
7525 (try_cursor_movement): If inside continuation line, don't back up
7526 farther than the first row after the header line, if any.
7527 Don't consider the header-line row as "partially visible", even if
7528 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
7530 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
7532 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
7535 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
7536 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
7538 configure: new option --enable-gcc-warnings (Bug#11207)
7539 * Makefile.in (C_WARNINGS_SWITCH): Remove.
7540 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
7541 (ALL_CFLAGS): Use new macros rather than old.
7542 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
7543 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
7544 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
7545 -Wunused-result, -Wunused-variable. This should go away once
7546 the Emacs and Gnulib regex code is merged.
7547 (xmalloc, xrealloc): Now static.
7549 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
7551 * dired.c (Fsystem_groups): Remove unused local.
7553 2012-04-17 Glenn Morris <rgm@gnu.org>
7555 * dired.c (Fsystem_users): Doc fix.
7557 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
7559 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
7560 (syms_of_dired): Add them.
7562 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
7564 Fix minor alloc.c problems found by static checking.
7565 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
7566 New extern decls, to avoid calling undeclared functions.
7567 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
7568 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
7569 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
7570 (NEED_MEM_INSERT): New macro.
7571 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
7572 Remove one incorrect comment and fix another.
7574 Fix minor ralloc.c problems found by static checking.
7575 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
7576 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
7577 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
7578 (r_alloc_sbrk): Now static.
7580 Improve ralloc.c interface checking.
7581 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
7582 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
7583 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
7584 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
7585 [REL_ALLOC]: ... to here, to check interface.
7586 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
7587 Remove decls. This fixes an "It stinks!".
7589 * alloc.c (which_symbols): Fix alignment issue / type clash.
7591 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
7593 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
7594 (struct Lisp_Misc_Any): Likewise.
7595 (struct Lisp_Free): Likewise.
7596 * alloc.c (union aligned_Lisp_Symbol): Define.
7597 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
7598 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
7599 (union aligned_Lisp_Misc): Define.
7600 (MARKER_BLOCK_SIZE, struct marker_block): Use union
7601 aligned_Lisp_Misc instead of union Lisp_Misc.
7602 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
7604 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
7606 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
7607 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
7608 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
7609 * s/netbsd.h, s/sol2-6.h:
7610 Remove definition of GC_MARK_STACK, since the default now works.
7611 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
7612 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
7613 no longer the default.
7614 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
7616 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
7618 * lread.c (lisp_file_lexically_bound_p):
7619 Fix hang at ";-*-\n" (bug#11238).
7621 2012-04-14 Eli Zaretskii <eliz@gnu.org>
7623 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
7624 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
7626 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
7628 * nsterm.m (constrainFrameRect): Always constrain when there is only
7629 one screen (Bug#10962).
7631 2012-04-13 Ken Brown <kbrown@cornell.edu>
7633 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
7635 2012-04-13 Reuben Thomas <rrt@sc3d.org>
7637 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
7639 2012-04-11 Daniel Colascione <dancol@dancol.org>
7641 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
7642 against is gone. It's better to use vfork now so that when Cygwin
7643 gains a new, working vfork, we use it automatically (bug#10398).
7645 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
7647 * window.c (save_window_save): Obey window-point-insertion-type.
7649 2012-04-11 Glenn Morris <rgm@gnu.org>
7651 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
7653 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
7655 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
7657 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
7659 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
7660 (force_quit_count): New var.
7661 (handle_interrupt): Use it.
7663 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
7665 * w32.c (w32_delayed_load): Record the full path of the library
7666 being loaded (bug#10424).
7668 2012-04-09 Glenn Morris <rgm@gnu.org>
7670 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
7671 not just in the obarray, before snarfing them. (Bug#11036)
7673 * Makefile.in ($(leimdir)/leim-list.el):
7674 Pass EMACS rather than BUILT_EMACS.
7676 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
7678 * process.c (make_process):
7679 * process.h: Add integer `gnutls_handshakes_tried' member to
7682 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
7683 Add convenience `GNUTLS_LOG2i' macro.
7685 * gnutls.c (gnutls_log_function2i): Convenience log function.
7686 (emacs_gnutls_read): Use new log functions,
7687 `gnutls_handshakes_tried' process member, and
7688 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
7689 attempts per process (connection).
7691 2012-04-09 Chong Yidong <cyd@gnu.org>
7693 * eval.c (Fuser_variable_p, user_variable_p_eh)
7694 (lisp_indirect_variable): Functions deleted.
7695 (Fdefvar): Caller changed.
7697 * callint.c (Finteractive, Fcall_interactively):
7698 * minibuf.c (Fread_variable): Callers changed.
7700 2012-04-09 Eli Zaretskii <eliz@gnu.org>
7702 * xdisp.c (set_cursor_from_row): If the display string appears in
7703 the buffer at position that is closer to point than the position
7704 after the display string, display the cursor on the first glyph of
7705 the display string. Fixes cursor display when a 'display' text
7706 property immediately follows invisible text. (Bug#11094)
7708 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
7710 composite.c: use 'double' consistently
7711 * composite.c (get_composition_id): Use 'double' consistently
7712 instead of converting 'float' to 'double' and vice versa; this is
7713 easier to understand and avoids a GCC warning.
7715 2012-04-09 Glenn Morris <rgm@gnu.org>
7717 * Makefile.in: Generate leim-list with bootstrap-emacs, in
7718 preparation for dumping it with emacs. (Bug#4789)
7719 (leimdir): New variable.
7720 ($(leimdir)/leim-list.el): New rule.
7721 (emacs$(EXEEXT)): Depend on leim-list.el.
7723 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
7724 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
7725 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
7727 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
7729 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
7732 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
7734 * xml.c (init_libxml2_functions) [WINDOWSNT]:
7735 Remove unused local variable.
7737 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
7739 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
7740 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
7741 (mark_memory): Mark Lisp_Objects only if pointers might hide in
7742 objects, as mark_maybe_pointer will catch them otherwise.
7743 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
7744 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
7746 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
7748 Fix typo that broke non-Windows builds.
7749 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
7751 2012-04-07 Eli Zaretskii <eliz@gnu.org>
7753 Support building on MS-Windows with libxml2.
7755 * makefile.w32-in (OBJ2): Add xml.$(O).
7756 (GLOBAL_SOURCES): Add xml.c.
7757 ($(BLD)/xml.$(O)): New dependency list.
7759 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
7760 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
7761 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
7762 [!WINDOWSNT]: New macros.
7763 (init_libxml2_functions, libxml2_loaded_p): New functions.
7764 (parse_region): Call fn_xmlCheckVersion instead of using the macro
7765 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
7766 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
7767 Calls xmlCleanupParser only if libxml2 was loaded (or statically
7769 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
7770 Call init_libxml2_functions before calling libxml2 functions.
7771 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
7773 * emacs.c: Don't include libxml/parser.h.
7774 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
7775 xmlCleanupParser directly.
7777 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
7779 2012-04-07 Eli Zaretskii <eliz@gnu.org>
7781 * indent.c (Fvertical_motion): If there is a display string at
7782 point, use it.vpos to compute how many lines to backtrack after
7783 move_it_to point. (Bug#11133)
7785 2012-04-06 Eli Zaretskii <eliz@gnu.org>
7787 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
7788 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
7789 about subtle differences between FETCH_CHAR* and STRING_CHAR*
7790 macros related to unification of CJK characters. For the details,
7791 see the discussion following the message here:
7792 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
7794 2012-04-04 Chong Yidong <cyd@gnu.org>
7796 * keyboard.c (Vdelayed_warnings_list): Doc fix.
7798 2012-04-01 Eli Zaretskii <eliz@gnu.org>
7800 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
7801 instead of alloca. (Bug#11138)
7803 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
7805 * w32menu.c (is_simple_dialog): Properly check lisp types.
7808 2012-03-31 Eli Zaretskii <eliz@gnu.org>
7810 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
7811 position we get to after a call to move_it_to fails the
7812 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
7813 only if we wind up in a string from display property. (Bug#11063)
7815 * window.c (Fdelete_other_windows_internal): Invalidate the row
7816 and column information about mouse highlight, so that redisplay
7817 restores it after reallocating the glyph matrices. (Bug#7464)
7819 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
7820 string comes from a `display' text property, use the buffer
7821 position of that property as if we actually saw that position in
7823 (move_it_by_lines): Remove the assertion that
7824 "it->current_x == 0 && it->hpos == 0" which can be legitimately
7825 violated when there's a before-string at the beginning of a line.
7828 2012-03-30 Eli Zaretskii <eliz@gnu.org>
7830 * xdisp.c (append_space_for_newline): If the default face was
7831 remapped, use the remapped face for the appended newline.
7832 (extend_face_to_end_of_line): Use the remapped default face for
7833 extending the face to the end of the line.
7834 (display_line): Call extend_face_to_end_of_line when the default
7835 face was remapped. (Bug#11068)
7837 2012-03-29 Eli Zaretskii <eliz@gnu.org>
7839 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
7841 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
7843 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
7845 2012-03-27 Glenn Morris <rgm@gnu.org>
7847 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
7850 2012-03-26 Kenichi Handa <handa@m17n.org>
7852 * dispextern.h (struct glyph): Fix previous change. Change the
7853 bit length of glyphless.ch to 25 (Bug#11082).
7855 2012-03-26 Chong Yidong <cyd@gnu.org>
7857 * keyboard.c (Vselection_inhibit_update_commands): New variable.
7858 (command_loop_1): Use it; inhibit selection update for
7859 handle-select-window too (Bug#8996).
7861 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
7863 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
7865 2012-03-25 Kenichi Handa <handa@m17n.org>
7867 * dispextern.h (struct glyph): Change the bit length of
7868 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
7870 2012-03-24 Eli Zaretskii <eliz@gnu.org>
7872 * s/ms-w32.h (tzname): Include time.h before redirecting to
7873 _tzname. Fixes the MSVC build. (Bug#9960)
7875 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
7877 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
7880 * xterm.c (XTread_socket): Only modify handling_signal if
7881 !SYNC_INPUT. (Bug#11080)
7883 2012-03-23 Eli Zaretskii <eliz@gnu.org>
7885 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
7886 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
7887 when fetching a multibyte character consumes more bytes than
7888 CHAR_BYTES returns, due to unification of CJK characters in
7889 string_char. (Bug#11073)
7891 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
7893 * process.c (wait_reading_process_output): Handle pty disconnect
7894 by refraining from sending oneself a SIGCHLD (bug#10933).
7896 2012-03-22 Chong Yidong <cyd@gnu.org>
7898 * dispextern.h (struct it): New member string_from_prefix_prop_p.
7900 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
7901 Mark string as coming from a prefix property.
7902 (handle_face_prop): Use default face for prefix strings (Bug#4281).
7903 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
7905 2012-03-21 Chong Yidong <cyd@gnu.org>
7907 * xfaces.c (Vface_remapping_alist): Doc fix.
7909 2012-03-20 Eli Zaretskii <eliz@gnu.org>
7911 * w32proc.c (Fw32_set_console_codepage)
7912 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
7915 2012-03-20 Chong Yidong <cyd@gnu.org>
7917 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
7918 to reflect default non-nil value of redisplay-dont-pause.
7920 2012-03-19 Kenichi Handa <handa@m17n.org>
7922 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
7923 it fit in a valid range (Bug#11003).
7925 2012-03-18 Eli Zaretskii <eliz@gnu.org>
7927 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
7928 that is not from display property, accept the row as a "cursor
7929 row" if one of the string's character has a non-nil `cursor'
7930 property. Fixes cursor positioning when there are newlines in
7931 overlay strings, e.g. in icomplete.el. (Bug#11035)
7933 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
7935 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
7937 2012-03-12 Chong Yidong <cyd@gnu.org>
7939 * eval.c (inhibit_lisp_code): Rename from
7940 inhibit_window_configuration_change_hook; move from window.c.
7942 * xfns.c (unwind_create_frame_1, Fx_create_frame):
7943 * window.c (run_window_configuration_change_hook)
7944 (syms_of_window): Callers changed.
7946 2012-03-11 Chong Yidong <cyd@gnu.org>
7948 * keymap.c (Fkey_description): Doc fix (Bug#9700).
7950 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
7952 2012-03-10 Chong Yidong <cyd@gnu.org>
7954 * frame.c (other_visible_frames): Don't assume the selected frame
7955 is visible (Bug#10955).
7957 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
7959 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
7961 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
7963 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
7964 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
7967 2012-03-03 Glenn Morris <rgm@gnu.org>
7969 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
7971 2012-03-02 Eli Zaretskii <eliz@gnu.org>
7973 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
7974 position past the first glyph_row that ends at ZV. (Bug#10902)
7975 (redisplay_window, next_element_from_string): Fix typos in
7977 (redisplay_window): Pass to move_it_vertically the margin in
7978 pixels, not in screen lines.
7980 2012-03-02 Glenn Morris <rgm@gnu.org>
7982 * buffer.c (buffer-list-update-hook): Doc fix.
7984 2012-02-29 Eli Zaretskii <eliz@gnu.org>
7986 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
7987 push_it before setting up the iterator for the first overlay
7988 string, even if we have an empty string loaded.
7989 (next_overlay_string): If there's an empty string on the iterator
7990 stack, pop the stack. (Bug#10903)
7992 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
7994 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
7995 Suggested by Stefan Monnier in
7996 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
7997 * alloc.c (widen_to_Lisp_Object): New static function.
7998 (mark_memory): Also mark Lisp_Objects by fetching pointer words
7999 and widening them to Lisp_Objects. This would work even if
8000 USE_LSB_TAG is defined and wide integers are used, which might
8001 happen in a future version of Emacs.
8003 2012-02-25 Chong Yidong <cyd@gnu.org>
8005 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
8008 * xselect.c (Fx_selection_exists_p): Doc fix.
8009 (x_clipboard_manager_save_all): Print an informative message
8010 before saving to clipboard manager.
8012 2012-02-24 Chong Yidong <cyd@gnu.org>
8014 * keyboard.c (process_special_events): Handle all X selection
8015 requests in kbd_buffer, not just the next one (Bug#8869).
8017 2012-02-23 Chong Yidong <cyd@gnu.org>
8019 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
8020 call when setting menu-bar-lines and tool-bar-lines parameters.
8021 (unwind_create_frame_1): New helper function.
8023 * window.c (inhibit_window_configuration_change_hook): New var.
8024 (run_window_configuration_change_hook): Obey it.
8025 (syms_of_window): Initialize it.
8027 2012-02-22 Chong Yidong <cyd@gnu.org>
8029 * xterm.c (x_draw_image_relief): Add missing type check for
8030 Vtool_bar_button_margin (Bug#10743).
8032 2012-02-21 Chong Yidong <cyd@gnu.org>
8034 * fileio.c (Vfile_name_handler_alist): Doc fix.
8036 * buffer.c (Fget_file_buffer): Protect against invalid file
8037 handler return value.
8039 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
8041 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
8042 when computing $valmask.
8044 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
8045 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
8046 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
8047 It's useless in that case, and it can cause problems on hosts
8048 that allocate halves of EMACS_INT values separately.
8049 Reported by Dan Horák. Diagnosed by Andreas Schwab in
8050 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
8051 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
8052 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
8053 it avoids undefined behavior on hosts where shifting right by more
8054 than the word width has undefined behavior.
8056 2012-02-19 Chong Yidong <cyd@gnu.org>
8058 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
8059 (Funhandled_file_name_directory, Ffile_name_as_directory)
8060 (Fdirectory_file_name, Fexpand_file_name)
8061 (Fsubstitute_in_file_name): Protect against invalid file handler
8062 return values (Bug#10845).
8064 2012-02-18 Eli Zaretskii <eliz@gnu.org>
8066 * .gdbinit (pitx): Fix incorrect references to fields of the
8069 2012-02-17 Chong Yidong <cyd@gnu.org>
8071 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
8073 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
8075 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
8076 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
8078 2012-02-15 Chong Yidong <cyd@gnu.org>
8080 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
8081 marked as special. Also, starting docstrings with * is obsolete.
8083 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
8085 * gnutls.c (emacs_gnutls_write): Fix last change.
8087 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
8089 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
8092 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
8094 * keymap.c (Fsingle_key_description): Handle char ranges.
8096 2012-02-12 Chong Yidong <cyd@gnu.org>
8098 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
8099 as that creates a dangerous corner case.
8101 * window.c (Fdelete_window_internal): Invalidate the mouse
8102 highlight (Bug#9904).
8104 2012-02-12 Glenn Morris <rgm@gnu.org>
8106 * xselect.c (Fx_own_selection_internal)
8107 (Fx_get_selection_internal, Fx_disown_selection_internal)
8108 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
8109 * nsselect.m (Fx_own_selection_internal)
8110 (Fx_disown_selection_internal, Fx_selection_exists_p)
8111 (Fx_selection_owner_p, Fx_get_selection_internal):
8112 Sync docs and argument specs with the xselect.c versions.
8114 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
8116 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
8118 2012-02-11 Eli Zaretskii <eliz@gnu.org>
8120 * w32select.c (Fx_selection_exists_p): Sync doc string and
8121 argument list with xselect.c. (Bug#10783)
8123 * w16select.c (Fx_selection_exists_p): Sync doc string and
8124 argument list with xselect.c. (Bug#10783)
8126 2012-02-10 Glenn Morris <rgm@gnu.org>
8128 * fns.c (Fsecure_hash): Doc fix.
8130 2012-02-09 Kenichi Handa <handa@m17n.org>
8132 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
8134 2012-02-07 Chong Yidong <cyd@gnu.org>
8136 * buffer.c (Fbuffer_local_variables)
8137 (buffer_lisp_local_variables): Handle unbound vars correctly;
8138 don't let Qunbound leak into Lisp.
8140 2012-02-07 Glenn Morris <rgm@gnu.org>
8142 * image.c (Fimagemagick_types): Doc fix.
8144 * image.c (imagemagick-render-type): Change it from a lisp object
8145 to an integer. Move the doc here from the lisp manual.
8146 Treat all values not equal to 0 the same.
8148 2012-02-06 Chong Yidong <cyd@gnu.org>
8150 * doc.c (store_function_docstring): Avoid applying docstring of
8151 alias to base function (Bug#2603).
8153 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
8155 * .gdbinit (pp1, pv1): Remove redundant defines.
8158 2012-02-04 Chong Yidong <cyd@gnu.org>
8160 * nsterm.m: Declare a global (Bug#10694).
8162 2012-02-04 Eli Zaretskii <eliz@gnu.org>
8164 * w32.c (get_emacs_configuration_options):
8165 Include --enable-checking, if specified, in the return value.
8167 2012-02-04 Martin Rudalics <rudalics@gmx.at>
8169 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
8170 after rounding frame sizes. (Bug#9723)
8172 2012-02-04 Eli Zaretskii <eliz@gnu.org>
8174 * keyboard.c (adjust_point_for_property): Don't position point
8175 before BEGV. (Bug#10696)
8177 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
8179 Handle overflow when computing char display width (Bug#9496).
8180 * character.c (char_width): Return EMACS_INT, not int.
8181 (char_width, c_string_width): Check for overflow when
8182 computing the width; this is possible now that individual
8183 characters can have unbounded width. Problem introduced
8184 by merge from Emacs 23 on 2012-01-19.
8186 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
8188 * dbusbind.c (Fdbus_register_method): Mention the return value
8189 :ignore in the docstring.
8191 2012-02-02 Glenn Morris <rgm@gnu.org>
8193 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
8195 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
8196 Unconditionally set to t. (Bug#10673)
8197 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
8198 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
8199 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
8201 2012-02-02 Kenichi Handa <handa@m17n.org>
8203 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
8204 0, do not call append_composite_glyph.
8206 2012-02-02 Kenichi Handa <handa@m17n.org>
8208 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
8210 (x_produce_glyphs): If the component of a composition is a null
8211 string, set it->pixel_width to 1 to avoid zero-width glyph.
8213 2012-02-01 Eli Zaretskii <eliz@gnu.org>
8215 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
8216 first 2 arguments are identical. This makes inserting large
8217 output from a subprocess an order of magnitude faster on
8218 MS-Windows, where all sbrk'ed memory is always contiguous.
8220 2012-01-31 Glenn Morris <rgm@gnu.org>
8222 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
8223 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
8224 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
8226 2012-01-29 Glenn Morris <rgm@gnu.org>
8228 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
8230 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
8232 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
8234 2012-01-28 Chong Yidong <cyd@gnu.org>
8236 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
8238 2012-01-26 Chong Yidong <cyd@gnu.org>
8240 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
8242 * search.c (Fsearch_forward, Fsearch_backward): Document negative
8243 repeat counts (Bug#10507).
8245 2012-01-26 Glenn Morris <rgm@gnu.org>
8247 * lread.c (syms_of_lread): Doc fix.
8249 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
8251 * coding.c (encode_designation_at_bol): Change return value to
8254 2012-01-25 Chong Yidong <cyd@gnu.org>
8256 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
8258 2012-01-21 Chong Yidong <cyd@gnu.org>
8260 * floatfns.c (Fcopysign): Make the second argument non-optional,
8261 since nil is not allowed anyway.
8263 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
8265 * process.c (read_process_output): Use p instead of XPROCESS (proc).
8266 (send_process): Likewise.
8268 2012-01-19 Martin Rudalics <rudalics@gmx.at>
8270 * window.c (save_window_save, Fcurrent_window_configuration)
8271 (Vwindow_persistent_parameters): Do not use Qstate.
8272 Rewrite doc-strings.
8274 2012-01-19 Kenichi Handa <handa@m17n.org>
8276 * character.c (char_width): New function.
8277 (Fchar_width, c_string_width, lisp_string_width):
8278 Use char_width (Bug#9496).
8280 2012-01-16 Martin Rudalics <rudalics@gmx.at>
8282 * window.c (Vwindow_persistent_parameters): New variable.
8283 (Fset_window_configuration, save_window_save): Handle persistent
8286 2012-01-14 Eli Zaretskii <eliz@gnu.org>
8288 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
8289 thrashing the stack of the thread. (Bug#9087)
8291 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
8293 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
8295 2012-01-11 Eli Zaretskii <eliz@gnu.org>
8297 * xdisp.c (rows_from_pos_range): Handle the case where the
8298 highlight ends on a newline. (Bug#10464)
8299 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
8300 he end column for display of highlight that ends on a newline
8303 2012-01-11 Glenn Morris <rgm@gnu.org>
8305 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
8306 from load-path also when installation-directory is nil. (Bug#10208)
8308 2012-01-10 Glenn Morris <rgm@gnu.org>
8310 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
8312 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
8313 Update template values to be closer to their typical values these days.
8315 2012-01-09 Eli Zaretskii <eliz@gnu.org>
8317 * xdisp.c (rows_from_pos_range): Accept additional argument
8318 DISP_STRING, and accept any glyph in a row whose object is that
8319 string as eligible for mouse highlight. Fixes mouse highlight of
8320 display strings from overlays. (Bug#10464)
8322 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
8324 emacs: fix an auto-save permissions race condition (Bug#10400)
8325 * fileio.c (auto_saving_dir_umask): New static var.
8326 (Fmake_directory_internal): Use it.
8327 (do_auto_save_make_dir): Set it, instead of invoking chmod after
8328 creating the directory. The old code temporarily assigns
8329 too-generous permissions to the directory.
8330 (do_auto_save_eh): Clear it.
8331 (Fdo_auto_save): Catch all errors, not just file errors, so
8332 that the var is always cleared.
8334 2012-01-07 Eli Zaretskii <eliz@gnu.org>
8336 * search.c (scan_buffer): Pass character positions to
8337 know_region_cache, not byte positions. (Bug#6540)
8339 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
8341 * w32.c (sys_rename): Report EXDEV when rename of a directory
8342 fails because the target is on another logical disk. (Bug#10284)
8344 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
8346 * xterm.c (x_embed_request_focus): New function.
8348 * xterm.h: Add prototype.
8350 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
8352 2012-01-05 Glenn Morris <rgm@gnu.org>
8354 * emacs.c (emacs_copyright): Update short copyright year to 2012.
8356 2012-01-01 Eli Zaretskii <eliz@gnu.org>
8358 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
8359 Load gnutls_transport_set_lowat only if GnuTLS version is below
8361 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
8362 GnuTLS versions below 2.11.1.
8364 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
8366 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
8367 to the doc string advising against its use for altering the way
8368 windows are scrolled.
8370 2011-12-28 Kenichi Handa <handa@m17n.org>
8372 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
8373 coding-system ASCII compatible only when it does not produce BOM
8374 on encoding (Bug#10383).
8376 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
8378 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
8380 (create_and_show_popup_menu): Always use menu_position_func for
8383 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
8385 * callint.c (Fcall_interactively): Don't truncate prompt string.
8387 2011-12-23 Eli Zaretskii <eliz@gnu.org>
8389 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
8390 property that ends at ZV, so that the bidi iteration could be
8391 resumed from there (after widening). (Bug#10360)
8393 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
8395 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
8397 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
8399 * nsterm.m (x_free_frame_resources):
8400 Release f->output_data.ns->miniimage.
8401 (ns_index_color): Fix indentation. Do not retain
8402 color_table->colors[i].
8404 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
8407 * nsfns.m (x_set_background_color): Assign return value from
8408 ns_index_color to face-background instead of NSColor*.
8409 (ns_implicitly_set_icon_type): Fix indentation.
8410 Change assignment in for loop to comparison.
8412 * emacs.c (ns_pool): New variable.
8413 (main): Assign ns_pool.
8414 (Fkill_emacs): Call ns_release_autorelease_pool.
8416 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
8417 autorelease fdesc, release fdAttrs and tdict.
8418 (ns_get_covering_families): Release charset.
8419 (ns_findfonts): Release NSFontDescriptor created with new.
8420 (ns_uni_to_glyphs): Fix indentation.
8421 (setString): Release attrStr before assigning new value.
8423 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
8425 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
8427 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
8428 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
8430 2011-12-18 David Reitter <reitter@cmu.edu>
8432 * nsterm.m (ns_term_init): Subscribe for notifications
8433 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
8434 to method trackingNotification in EmacsMenu.
8436 * nsmenu.m (trackingMenu): New variable.
8437 (trackingNotification): New method (from Aquamacs).
8438 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
8439 from Aquamacs (Bug#7030).
8441 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
8443 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
8444 (symbol_to_nsstring): Fix indentation.
8445 (ns_symbol_to_pb): New function.
8446 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
8447 (Fns_rotate_cut_buffers_internal): Remove.
8448 (Fns_store_selection_internal): Rename from
8449 Fns_store_cut_buffer_internal.
8450 (ns_get_foreign_selection, Fx_own_selection_internal)
8451 (Fx_disown_selection_internal, Fx_selection_exists_p)
8452 (Fns_get_selection_internal, Fns_store_selection_internal):
8453 Use ns_symbol_to_pb and check if return value is nil.
8454 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
8455 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
8456 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
8457 renamed to Sns_store_selection_internal.
8458 (ns_handle_selection_request): Move code to Fx_own_selection_internal
8459 and remove this function.
8460 (ns_handle_selection_clear): Remove, never used.
8461 (Fx_own_selection_internal): Move code from ns_handle_selection_request
8464 2011-12-17 Ken Brown <kbrown@cornell.edu>
8466 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
8467 GID is unknown (Bug#10257).
8469 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
8471 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
8472 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
8473 which caused a build failure on GNU/Linux IA-64. This problem was
8474 introduced by my 2011-10-07 patch.
8476 2011-12-15 Juri Linkov <juri@jurta.org>
8478 * image.c (imagemagick_error): New function. (Bug#10112)
8479 (imagemagick_load_image): Comment out `MagickSetResolution' call.
8480 Use `imagemagick_error' where ImageMagick functions return
8482 (Fimagemagick_types): Add `Fnreverse' to return the list in the
8485 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8487 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
8488 fill background (Bug#8992).
8490 2011-12-13 Martin Rudalics <rudalics@gmx.at>
8492 * window.c (Vwindow_combination_resize)
8493 (Vwindow_combination_limit): Use t instead of non-nil in
8495 (Vrecenter_redisplay): Add first sentence of doc-string on
8497 (Frecenter): Fix doc-string typo.
8499 2011-12-11 Kenichi Handa <handa@m17n.org>
8501 * coding.c (Funencodable_char_position): Pay attention to the
8502 buffer text relocation (Bug#9389).
8504 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
8506 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
8507 gtk_init (Bug#10100).
8509 2011-12-10 Eli Zaretskii <eliz@gnu.org>
8511 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
8512 IT->string is nil. (Bug#10263)
8514 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
8516 * nsterm.h (x_free_frame_resources): Declare.
8518 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
8519 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
8521 * nsterm.h (ns_get_defaults_value): Declare.
8523 * nsterm.m (ns_default): Call ns_get_defaults_value.
8525 2011-12-09 Eli Zaretskii <eliz@gnu.org>
8527 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
8530 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8532 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
8533 that where the value of an _OBJC_* symbol points to is in the .bss
8534 section (Bug#10240).
8536 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
8538 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
8539 after the loop to call ccl_driver at least once (Bug#8619).
8541 2011-12-08 Kenichi Handa <handa@m17n.org>
8543 * ftfont.c (get_adstyle_property): Fix previous change
8546 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
8548 * w32.c (init_environment): If no_site_lisp, remove site-lisp
8549 dirs from the default value of EMACSLOADPATH (bug#10208).
8551 2011-12-07 Glenn Morris <rgm@gnu.org>
8553 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
8554 installation and source directories as well. (Bug#10208)
8556 2011-12-06 Chong Yidong <cyd@gnu.org>
8558 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
8560 2011-12-06 Glenn Morris <rgm@gnu.org>
8562 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
8563 as an error, not just -1. (Bug#10217)
8565 2011-12-05 Chong Yidong <cyd@gnu.org>
8567 * keyboard.c (process_special_events): New function.
8568 (swallow_events, Finput_pending_p): Use it (Bug#10195).
8570 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
8572 * coding.c (encode_designation_at_bol): Don't use uninitialized
8573 local variable (Bug#9318).
8575 2011-12-05 Kenichi Handa <handa@m17n.org>
8577 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
8578 return Qnil (Bug#8046, Bug#10193).
8580 2011-12-05 Kenichi Handa <handa@m17n.org>
8582 * coding.c (encode_designation_at_bol): New args charbuf_end and
8583 dst. Return the number of produced bytes. Callers changed.
8584 (coding_set_source): Return how many bytes coding->source was
8586 (coding_set_destination): Return how many bytes
8587 coding->destination was relocated.
8588 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
8589 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
8591 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
8593 * coding.c (CODING_CHAR_CHARSET_P): New macro.
8594 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
8597 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
8599 The following changes are to fix Bug#9318.
8601 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
8602 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
8603 (encode_coding_iso_2022, encode_coding_sjis)
8604 (encode_coding_big5, encode_coding_charset): Use the above macros.
8606 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
8608 * lisp.h (process_quit_flag): Fix external declaration.
8610 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
8612 Don't macro-inline non-performance-critical code.
8613 * eval.c (process_quit_flag): New function.
8614 * lisp.h (QUIT): Use it.
8616 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
8618 * nsfns.m (get_geometry_from_preferences): New function.
8619 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
8621 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
8623 * emacs.c (Qkill_emacs): Define.
8624 (syms_of_emacs): Initialize it.
8625 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
8626 Qquit_flag to `kill-emacs' instead.
8627 (quit_throw_to_read_char): Add parameter `from_signal'.
8628 All callers changed. Call Fkill_emacs if requested and safe.
8629 * lisp.h (QUIT): Call Fkill_emacs if requested.
8631 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
8633 * widget.c (update_wm_hints): Return if wmshell is null.
8634 (widget_update_wm_size_hints): New function.
8636 * widget.h (widget_update_wm_size_hints): Declare.
8638 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
8639 widget_update_wm_size_hints (Bug#10104).
8641 2011-12-03 Eli Zaretskii <eliz@gnu.org>
8643 * xdisp.c (handle_invisible_prop): If the invisible text ends just
8644 before a newline, prepare the bidi iterator for consuming the
8645 newline, and keep the current paragraph direction. (Bug#10183)
8646 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
8648 2011-12-02 Juri Linkov <juri@jurta.org>
8650 * search.c (Fword_search_regexp): New Lisp function created from
8651 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
8652 (Fword_search_backward, Fword_search_forward)
8653 (Fword_search_backward_lax, Fword_search_forward_lax):
8654 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
8655 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
8657 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
8659 * fileio.c (Finsert_file_contents): Move after-change-function call
8660 to before the "handled:" label, since all "goto handled" appear in
8661 cases where the *-change-functions have already been properly called
8664 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
8666 * keyboard.c (interrupt_signal): Don't call kill-emacs when
8667 waiting for input. (Bug#10169)
8669 2011-11-30 Eli Zaretskii <eliz@gnu.org>
8671 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
8672 verifies glyph row's hash code--we have just reallocated the
8673 glyphs, so their contents can be complete garbage. (Bug#10164)
8675 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
8677 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
8679 2011-11-30 Eli Zaretskii <eliz@gnu.org>
8681 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
8682 attributes are tested _before_ calling verify_row_hash, to protect
8683 against GCC re-ordering of the tests. (Bug#10164)
8685 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
8687 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
8689 * xterm.c (handle_one_xevent): Only set async_visible and friends
8690 if net_wm_state_hidden_seen is non-zero (Bug#10002)
8691 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
8692 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
8694 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
8696 Remove GCPRO-related macros that exist only to avoid shadowing locals.
8697 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
8698 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
8699 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
8700 All uses changed to use GCPRO1 etc.
8701 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
8702 Revert to old implementation (i.e., before 2011-03-11).
8704 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8706 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
8707 of scroll runs so as to avoid assigning disabled bogus rows and
8708 unnecessary graphics copy operations.
8710 2011-11-27 Eli Zaretskii <eliz@gnu.org>
8712 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
8713 (snprintf) [_MSC_VER]: Redirect to _snprintf.
8714 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
8715 (malloc, free, realloc, calloc): Redirect to e_* only when
8718 * lisp.h (GCTYPEBITS): Move before first use.
8719 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
8720 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
8721 this macro definition.
8723 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
8726 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
8728 * gtkutil.c (xg_create_frame_widgets):
8729 Call gtk_window_set_has_resize_grip (FALSE) if that function is
8730 present with Gtk+ 2.0.
8732 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
8734 * fileio.c (Finsert_file_contents): Undo previous change; see
8735 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
8737 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
8739 Rename locals to avoid shadowing.
8740 * fileio.c (Finsert_file_contents):
8741 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
8742 * process.c (wait_reading_process_output):
8743 Rename inner 'proc' to 'p' to avoid shadowing.
8744 Indent for consistency with usual Emacs style.
8746 2011-11-25 Eli Zaretskii <eliz@gnu.org>
8748 * xdisp.c (redisplay_window): If cursor row is not fully visible
8749 after recentering, and scroll-conservatively is set to a large
8750 number, scroll window by a few more lines to make the cursor fully
8751 visible and out of scroll-margin. (Bug#10105)
8752 (start_display): Don't move to the next line if the display should
8753 start at a newline that is part of a display vector or an overlay
8756 2011-11-24 Juri Linkov <juri@jurta.org>
8758 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
8759 after the `MagickPingImage' call. (Bug#10112)
8761 2011-11-23 Chong Yidong <cyd@gnu.org>
8763 * window.c (Fcoordinates_in_window_p): Accept only live windows.
8765 2011-11-23 Martin Rudalics <rudalics@gmx.at>
8767 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
8768 making another buffer current. (Bug#10114)
8770 2011-11-23 Glenn Morris <rgm@gnu.org>
8772 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
8774 2011-11-23 Chong Yidong <cyd@gnu.org>
8776 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
8777 using it (Bug#5984).
8779 2011-11-22 Eli Zaretskii <eliz@gnu.org>
8781 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
8782 and header-lines, as they don't have one computed for them.
8785 * .gdbinit (prow): Make displayed values more self-explaining.
8786 Add row's hash code.
8788 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
8790 * process.c (wait_reading_process_output): Fix asynchrounous
8791 GnuTLS socket handling on some versions of the GnuTLS library.
8792 (wait_reading_process_output): Add comment and URL.
8794 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
8796 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
8798 2011-11-21 Chong Yidong <cyd@gnu.org>
8800 * window.c (Fnext_window, Fprevious_window): Doc fix.
8802 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
8804 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
8806 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
8808 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
8810 2011-11-20 Martin Rudalics <rudalics@gmx.at>
8812 * window.c (Fset_window_combination_limit): Rename argument
8814 (Vwindow_combination_limit): Remove "status" from doc-string.
8816 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
8818 * m/ibms390.h: Remove.
8819 * m/ibms390x.h: Don't include "ibms390.h".
8821 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
8823 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
8824 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
8826 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
8828 * casetab.c (Fset_case_table):
8829 * charset.c (Fcharset_after): Fix typos.
8831 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
8833 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
8834 Otherwise, valgrind does not work on some platforms.
8835 Problem reported by Andreas Schwab in
8836 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
8837 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
8838 is set, removing the need for VIRT_ADDRESS_VARIES.
8839 (PURE_P): Use a more-efficient implementation that needs just one
8840 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
8841 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
8842 to 4 (xorl, subq, cmpq, setbe).
8843 * alloc.c (pure): Always extern now, since that's the
8844 VIRT_ADDR_VARIES behavior.
8845 (PURE_POINTER_P): Use a single comparison, not two, for
8846 consistency with the new puresize.h.
8847 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
8848 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
8849 Remove VIRT_ADDR_VARIES no longer needed.
8851 2011-11-19 Eli Zaretskii <eliz@gnu.org>
8853 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
8854 (erase_phys_cursor, update_window_cursor, show_mouse_face)
8855 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
8856 behave as if the cursor position were at the window margin.
8858 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
8859 and the cursor position is out of bounds, behave as if the cursor
8860 position were at the window margin. (Bug#10075)
8862 2011-11-18 Chong Yidong <cyd@gnu.org>
8864 * window.c (Fwindow_combination_limit): Make first argument
8865 non-optional, since it is meaningless for live windows like the
8868 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
8870 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
8872 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
8874 * intervals.c: Fix grafting over the whole buffer (bug#10071).
8875 (graft_intervals_into_buffer): Simplify.
8877 2011-11-18 Eli Zaretskii <eliz@gnu.org>
8879 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
8880 hash values of the two rows.
8881 (copy_row_except_pointers): Preserve the used[] arrays and the
8882 hash values of the two rows. (Bug#10035)
8883 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
8885 * xdisp.c (row_hash): New function, body extracted from
8886 compute_line_metrics.
8887 (compute_line_metrics): Call row_hash, instead of computing the
8890 * dispnew.c (verify_row_hash): Call row_hash for computing the
8891 hash code of a row, instead of duplicating code from xdisp.c.
8893 * dispextern.h (row_hash): Add prototype.
8895 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
8897 * frame.c (delete_frame): Don't delete the terminal when the last
8898 X frame is closed if emacs is built with GTK toolkit.
8900 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
8902 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
8904 2011-11-17 Martin Rudalics <rudalics@gmx.at>
8906 * window.c (Vwindow_splits): Rename to
8907 Vwindow_combination_resize. Suggested by Juri Linkov.
8908 (Fsplit_window_internal): Use Vwindow_combination_resize instead
8911 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
8913 * nsfns.m (Fns_font_name):
8914 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
8916 2011-11-16 Martin Rudalics <rudalics@gmx.at>
8918 * window.h (window): Rename slot "nest" to "combination_limit".
8919 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
8920 (Fset_window_nest): Rename to Fset_window_combination_limit.
8921 (Vwindow_nest): Rename to Vwindow_combination_limit.
8922 (recombine_windows, make_parent_window, make_window)
8923 (Fsplit_window_internal, saved_window)
8924 (Fset_window_configuration, save_window_save): Rename all
8925 occurrences of window_nest to window_combination_limit.
8927 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
8929 * image.c (imagemagick_load_image): Fix typo.
8931 2011-11-14 Eli Zaretskii <eliz@gnu.org>
8933 * xdisp.c (display_line): Move the call to
8934 highlight_trailing_whitespace before the call to
8935 compute_line_metrics, since the latter needs to see the final
8936 faces of all the glyphs to compute ROW's hash value.
8937 Fixes assertion violations in row_equal_p. (Bug#10035)
8939 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
8941 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
8942 just return (bug#10044).
8944 2011-11-12 Eli Zaretskii <eliz@gnu.org>
8946 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
8947 with user-defined heap size. Bump the default size of the temacs
8948 heap to 27MB, to avoid memory warning when running temacs.
8949 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
8951 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
8952 current_matrix and desired_matrix. (Bug#9990)
8953 (verify_row_hash) [XASSERTS]: New function.
8954 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
8955 that the hash value of glyph rows is correct.
8957 2011-11-12 Martin Rudalics <rudalics@gmx.at>
8959 * window.h (window): Remove splits slot.
8960 * window.c (Fwindow_splits, Fset_window_splits): Remove.
8961 (Fdelete_other_windows_internal, make_parent_window)
8962 (make_window, Fsplit_window_internal, Fdelete_window_internal)
8963 (Fset_window_configuration, save_window_save): Don't deal with
8964 split status of windows.
8965 (saved_window): Remove splits slot.
8966 (Vwindow_splits): Rewrite doc-string.
8968 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
8970 * xfns.c (unwind_create_frame):
8971 * nsfns.m (unwind_create_frame):
8972 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
8973 Vframe_list (Bug#9999).
8975 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
8977 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
8979 2011-11-11 Kenichi Handa <handa@m17n.org>
8981 * callproc.c (Fcall_process): Set the member dst_multibyte of
8984 2011-11-11 Johan Bockgård <bojohan@gnu.org>
8986 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
8987 avoid a crash (bug#9496).
8989 2011-11-09 Chong Yidong <cyd@gnu.org>
8991 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
8992 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
8994 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
8996 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
8998 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
9000 Avoid some portability problems by eschewing 'extern inline' functions.
9001 The trivial performance wins aren't worth the portability hassles; see
9002 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
9004 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
9005 (window_box_width, window_box_left, window_box_left_offset)
9006 (window_box_right, window_box_right_offset): Undo previous change,
9007 by removing the "extern"s.
9008 * intervals.c (adjust_intervals_for_insertion)
9009 (adjust_intervals_for_deletion): Undo previous change,
9010 making these static again.
9011 (offset_intervals, temp_set_point_both, temp_set_point)
9012 (copy_intervals_to_string): No longer inline.
9013 * xdisp.c (window_text_bottom_y, window_box_width)
9014 (window_box_height, window_box_left_offset)
9015 (window_box_right_offset, window_box_left, window_box_right)
9016 (window_box): No longer inline.
9018 2011-11-08 Chong Yidong <cyd@gnu.org>
9020 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
9021 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
9022 Signal an error if not a live window.
9023 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
9024 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
9026 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
9028 * lisp.h (syms_of_abbrev): Remove declaration.
9029 Reported by CHENG Gao <chenggao@royau.me>.
9031 2011-11-07 Eli Zaretskii <eliz@gnu.org>
9033 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
9034 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
9035 of temacs in GUI mode.
9037 2011-11-07 Martin Rudalics <rudalics@gmx.at>
9039 * window.h: Declare delete_all_child_windows instead of
9040 delete_all_subwindows.
9041 * window.c (Fwindow_nest, Fset_window_nest)
9042 (Fset_window_new_total, Fset_window_new_normal)
9043 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
9044 (delete_all_subwindows): Rename to delete_all_child_windows.
9045 (Fdelete_other_windows_internal, Fset_window_configuration):
9046 Call delete_all_child_windows instead of delete_all_subwindows.
9047 * frame.c (delete_frame): Call delete_all_child_windows instead
9048 of delete_all_subwindows.
9050 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
9052 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
9053 This is also needed for porting to any host where GC_MARK_STACK is
9054 not GC_MAKE_GCPROS_NOOPS.
9055 (which_symbols): Use it.
9057 2011-11-07 Kenichi Handa <handa@m17n.org>
9059 * coding.c (coding_set_destination): Check coding->src_pos only
9060 when coding->src_object is a buffer (bug#9910).
9062 * process.c (send_process): Set the member src_multibyte of coding
9063 to 0 (bug#9911) when sending a unibyte text.
9065 * callproc.c (Fcall_process): Set the member src_multibyte of
9066 process_coding to 0 (bug#9912).
9068 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9070 * xmenu.c (cleanup_widget_value_tree): New function.
9071 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
9072 calling free_menubar_widget_value_tree directly (Bug#9830).
9074 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
9076 Fix some portability problems with 'inline'.
9077 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
9078 (window_box_width, window_box_left, window_box_left_offset)
9079 (window_box_right, window_box_right_offset): Declare extern.
9080 Otherwise, these inline functions do not conform to C99 and
9081 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
9082 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
9083 * intervals.c (adjust_intervals_for_insertion)
9084 (adjust_intervals_for_deletion): Now extern, because otherwise the
9085 extern inline functions 'offset_intervals' couldn't refer to it.
9086 (static_offset_intervals): Remove.
9087 (offset_intervals): Rewrite using the old contents of
9088 static_offset_intervals. The old version didn't conform to C99
9089 because an extern inline function contained a reference to an
9090 identifier with static linkage.
9092 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
9094 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
9097 2011-11-06 Eli Zaretskii <eliz@gnu.org>
9099 * xdisp.c (init_iterator, reseat_to_string): Don't set the
9100 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
9101 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
9102 return Qleft_to_right.
9104 2011-11-06 Chong Yidong <cyd@gnu.org>
9106 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
9107 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
9108 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
9109 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
9110 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
9111 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
9112 (Fwindow_vscroll): Doc fix.
9113 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
9114 argument, since it makes no sense to pass a live window and for
9115 consistency with window-child.
9117 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
9119 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
9122 2011-11-05 Jason Rumney <jasonr@gnu.org>
9124 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
9125 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
9127 (add_font_entity_to_list): Fix logic errors in mixed boolean and
9128 bitwise arithmetic preventing use of unicode-sip and non-truetype
9131 2011-11-05 Eli Zaretskii <eliz@gnu.org>
9133 * s/ms-w32.h (fstat, stat, utime): Move redirections to
9136 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
9137 initialization code to keep similarity to xfns.c after changes
9140 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
9142 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
9143 (unwind_create_frame): New function (Bug#9943).
9144 (Fx_create_frame): Restructure code to be more similar to the one in
9145 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
9146 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
9147 Move terminal->reference_count++ just before making the frame official
9150 * nsterm.m (x_free_frame_resources): New function.
9151 (x_destroy_window): Move code to x_free_frame_resources.
9153 * xfns.c (unwind_create_frame): Fix comment.
9154 (Fx_create_frame, x_create_tip_frame):
9155 Move terminal->reference_count++ just before making the frame
9156 official. Move initialization of image_cache_refcount and
9157 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
9159 2011-11-05 Eli Zaretskii <eliz@gnu.org>
9161 Support MSVC build with newer versions of Visual Studio.
9162 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
9163 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
9166 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
9167 which are not supported by MSVC.
9168 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
9169 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
9171 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
9173 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
9175 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
9177 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
9179 Support MSVC build with newer versions of Visual Studio.
9180 * w32.c: Don't include w32api.h for MSVC.
9181 (init_environment) [_MSC_VER]: Call sys_access, not _access.
9183 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
9184 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
9185 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
9186 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
9188 (alloca) [_MSC_VER]: Define to _alloca.
9190 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
9192 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
9194 2011-11-04 Eli Zaretskii <eliz@gnu.org>
9196 * xdisp.c (note_mouse_highlight): If either of
9197 previous/next-single-property-change returns nil, treat that as
9198 the beginning or the end of the buffer. (Bug#9955)
9200 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
9202 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
9203 label is not null (Bug#9951).
9204 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
9207 2011-11-04 Eli Zaretskii <eliz@gnu.org>
9209 * window.c (Fwindow_body_size): Mention in the doc string that the
9210 return value is in frame's canonical units. (Bug#9949)
9212 2011-11-03 Eli Zaretskii <eliz@gnu.org>
9214 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
9216 * w32fns.c (unwind_create_frame): If needed, free the glyph
9217 matrices of the partially constructed frame. (Bug#9943)
9218 * xfns.c (unwind_create_frame): Likewise.
9220 2011-11-01 Eli Zaretskii <eliz@gnu.org>
9222 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
9223 Don't stop backward scan on the continuation glyph, even though
9224 its CHARPOS is positive.
9225 (mouse_face_from_buffer_pos, note_mouse_highlight):
9226 Rename cover_string to disp_string.
9228 2011-11-01 Martin Rudalics <rudalics@gmx.at>
9230 * window.c (temp_output_buffer_show): Don't use
9231 Vtemp_buffer_show_specifiers.
9232 (Vtemp_buffer_show_specifiers): Remove unused variable.
9234 2011-10-30 Eli Zaretskii <eliz@gnu.org>
9236 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
9237 past the beginning of the current glyph matrix.
9239 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
9241 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
9242 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
9243 HAVE_GTK3 (Bug#9869).
9245 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
9246 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
9248 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
9250 * xterm.c: Declare x_handle_net_wm_state to return int.
9251 (handle_one_xevent): Check if we are iconified but don't have
9252 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
9253 (get_current_wm_state): Return non-zero if not hidden,
9254 check for _NET_WM_STATE_HIDDEN (Bug#9893).
9255 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
9256 (x_handle_net_wm_state): Return what get_current_wm_state returns.
9257 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
9259 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
9261 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
9262 so that this new function doesn't get optimized away by a
9263 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
9265 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
9267 * frame.h (MOUSE_HL_INFO): Remove excess parens.
9269 2011-10-29 Eli Zaretskii <eliz@gnu.org>
9271 Fix the `xbytecode' command.
9272 * .gdbinit (xprintbytestr): New command.
9273 (xwhichsymbols): Rename from `which'; all callers changed.
9274 (xbytecode): Print the byte-code string as well.
9276 2011-10-29 Kim Storm <storm@cua.dk>
9278 * alloc.c (which_symbols): New function.
9280 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
9282 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
9285 2011-10-29 Glenn Morris <rgm@gnu.org>
9287 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
9288 Not clear what it was for, and it causes various bugs. (Bug#9839)
9290 2011-10-28 Eli Zaretskii <eliz@gnu.org>
9292 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
9293 possible random value that matches one of those tested as
9294 condition to clear the mouse face.
9296 2011-10-28 Chong Yidong <cyd@gnu.org>
9298 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
9300 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
9302 * window.c (make_window): Initialize phys_cursor_on_p.
9304 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
9306 * lisp.h (struct Lisp_Symbol): Update comments.
9308 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
9310 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
9312 2011-10-28 Eli Zaretskii <eliz@gnu.org>
9314 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
9315 <oslsachem@gmail.com> for helping to debug this.
9317 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
9318 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
9319 (g_b_init_get_glyph_outline_w): New static variables.
9320 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
9321 (GetGlyphOutlineW_Proc): New typedefs.
9322 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
9323 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
9325 (w32font_open_internal, compute_metrics):
9326 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
9327 instead of calling the "wide" APIs directly.
9329 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
9331 * w32.h (syms_of_w32font): Add prototype.
9333 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
9335 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
9336 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
9337 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
9338 (Fmove_to_window_line): Doc fix.
9340 2011-10-27 Chong Yidong <cyd@gnu.org>
9342 * process.c (make_process): Set gnutls_state to NULL.
9344 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
9345 non-NULL, regardless of GNUTLS_INITSTAGE.
9346 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
9347 an error. Set process slots as soon as we allocate them.
9349 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
9351 2011-10-27 Chong Yidong <cyd@gnu.org>
9353 * gnutls.c (emacs_gnutls_deinit): New function.
9354 Deallocate credentials structures as well as calling gnutls_deinit.
9355 (Fgnutls_deinit, Fgnutls_boot): Use it.
9357 * process.c (make_process): Initialize GnuTLS credentials to NULL.
9358 (deactivate_process): Call emacs_gnutls_deinit.
9360 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
9362 * image.c (x_create_x_image_and_pixmap):
9363 * w32.c (sys_rename, w32_delayed_load):
9364 * w32font.c (fill_in_logfont):
9365 * w32reg.c (x_get_string_resource): Silence compiler warnings.
9367 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
9369 * w32fns.c (w32_default_color_map): New function,
9370 extracted from Fw32_default_color_map.
9371 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
9373 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
9375 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
9377 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
9379 * keyboard.c (test_undefined): New function (bug#9751).
9380 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
9382 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
9384 * sysdep.c (init_sys_modes): Fix the check for the controlling
9385 terminal (Bug#6649).
9387 2011-10-20 Eli Zaretskii <eliz@gnu.org>
9389 * dispextern.h (struct bidi_it): New member next_en_type.
9391 * bidi.c (bidi_line_init): Initialize the next_en_type member.
9392 (bidi_resolve_explicit_1): When next_en_pos is valid for the
9393 current character, check also for next_en_type being WEAK_EN.
9394 (bidi_resolve_weak): Don't enter the expensive loop if the current
9395 position is before next_en_pos. Record the bidi type of the first
9396 non-ET, non-BN character we find, in addition to its position.
9397 (bidi_level_of_next_char): Invalidate next_en_type when
9398 next_en_pos is over-stepped.
9400 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
9402 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
9403 * editfns.c: Rewrite current-time-zone so that it invokes
9404 the equivalent of (format-time-string "%Z") to get the time zone name.
9405 This fixes a bug when the time zone name contains characters that
9406 need converting from the system time locale to Emacs internal format.
9407 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
9408 that patch fixed format-time-string to do the conversion, but
9409 I forgot to fix current-time-zone.
9410 (format_time_string): New function, containing most of
9411 what Fformat_time_string used to contain.
9412 (Fformat_time_string): Rewrite in terms of format_time_string.
9413 This doesn't change this function's behavior.
9414 (current-time-zone): Rewrite to use format_time_string.
9415 This fixes the bug reported by Michael Schierl in
9416 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
9417 Jason Rumney's 2007-06-07 change worked around this bug, but
9419 * systime.h (tzname, timezone): Remove no-longer-used declarations.
9421 2011-10-19 Eli Zaretskii <eliz@gnu.org>
9423 * xdisp.c (start_display): If the character at POS is displayed
9424 via a display vector, reset IT->current.dpvec_index to zero.
9425 (try_window_reusing_current_matrix): If a line ends in a display
9426 vector or the next line starts in a display vector, continue
9427 redrawing the window even though the character position of
9428 start_row was reached.
9431 2011-10-18 Chong Yidong <cyd@gnu.org>
9433 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
9434 with nobreak-char-display too.
9436 2011-10-18 Eli Zaretskii <eliz@gnu.org>
9438 Fix part 3 of bug#9771.
9439 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
9440 (bidi_resolve_neutral): Don't enter the expensive loop looking for
9441 non-neutral characters if the current character is a paragraph
9442 separator (a.k.a. Newline). This avoids running the same
9443 expensive loop twice, once when we consume the preceding newline
9444 and the other time when the line actually needs to be displayed.
9445 Avoid the loop when we see neutrals on the base embedding level
9446 following a character whose directionality is the same as the
9447 paragraph's. This avoids running the expensive loop when a line
9448 ends in a long sequence of neutrals, like control characters.
9449 Add assertion against STRONG_AL type. Slightly rearrange code
9450 that determines the type of a neutral given the first non-neutral
9452 (bidi_level_of_next_char): Set next_en_pos to zero when
9453 invalidating its info.
9455 2011-10-17 Eli Zaretskii <eliz@gnu.org>
9457 * xdisp.c (push_display_prop): Determine whether to record string
9458 or buffer position by IT->string, not by IT->method. Allow
9459 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
9460 (move_it_vertically_backward): Don't look for character position
9461 immediately after the newline when in a continuation line.
9464 2011-10-15 Martin Rudalics <rudalics@gmx.at>
9466 * window.c (coordinates_in_window): Rewrite and delabelize
9467 vertical border check. (Bug#5357) (Bug#9618)
9469 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
9471 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
9472 errors in XSetWindowBorder (bug#9310).
9474 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
9476 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
9477 avoid crash when xmalloc overrun checking is enabled.
9479 2011-10-13 Eli Zaretskii <eliz@gnu.org>
9481 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
9482 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
9483 cursor motion with <left> and <right> arrow keys.
9485 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
9486 some callers set that themselves.
9488 2011-10-12 Eli Zaretskii <eliz@gnu.org>
9490 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
9491 display string and the previous row comes from the same string and
9492 is empty. (Bug#9739) (Bug#9738)
9494 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
9496 * doc.c (get_doc_string): Encode file name (bug#9735).
9498 2011-10-12 Eli Zaretskii <eliz@gnu.org>
9500 * bidi.c (bidi_level_of_next_char):
9501 * xdisp.c (get_visually_first_element): Remove old incorrect
9502 comments regarding the Unicode Line Separator character.
9504 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
9506 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
9508 * alloc.c (Fgc_status): Do not access beyond zombies array
9509 boundary if nzombies > MAX_ZOMBIES.
9510 * alloc.c (dump_zombies): Add missing format specifier.
9512 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
9514 * xdisp.c (set_cursor_from_row): Simplify conditionals,
9515 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
9517 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
9518 Some packages use them to denote characters with modifiers.
9520 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
9522 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
9523 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
9524 matching a pp-number. Rename parameter var to var1.
9526 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
9528 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
9530 2011-10-08 Glenn Morris <rgm@gnu.org>
9532 * callint.c (Fcall_interactively): Give a more explicit error for the
9533 'c' case with a non-character input. (Bug#8479)
9535 2011-10-08 Eli Zaretskii <eliz@gnu.org>
9537 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
9539 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
9540 lines that are hscrolled on the left.
9542 * dispnew.c (buffer_posn_from_coords): Account for a possible
9543 presence of header-line. (Bug#4426)
9545 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
9547 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
9548 Don't advertise functionality which we discourage or doesn't work.
9550 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
9552 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
9553 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
9554 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
9555 this makes Emacs dump core during garbage collection on rare
9556 occasions. sizeof is obviously inferior to offsetof here, so
9557 stick with offsetof.
9558 (GC_POINTER_ALIGNMENT): New macro.
9559 (mark_memory): Omit 3rd (offset) arg; caller changed.
9560 Don't assume EMACS_INT alignment is the same as pointer alignment.
9562 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
9564 * keyboard.c (read_key_sequence_remapped): New var.
9565 (read_key_sequence): Compute remapping in the right buffer.
9566 (command_loop_1): Use read_key_sequence's remapping directly.
9568 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
9570 * dired.c (file_name_completion): Don't expand file name.
9571 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
9572 before checking file name handler.
9574 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
9575 they've been requested explicitly (bug#9591).
9577 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
9579 * keymap.c (Fsingle_key_description): Use make_specified_string
9580 instead of build_string to build string from push_key_description.
9583 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
9585 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
9586 This fixes a Y2038 bug on 64-bit hosts.
9587 * buffer.c (reset_buffer):
9588 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
9589 (Fclear_buffer_auto_save_failure):
9590 Use 0, not -1, to represent an unset failure time, since time_t
9591 might not be signed.
9593 Remove dependency on glibc malloc internals.
9594 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
9595 Move back here from lisp.h, but with their new implementations.
9596 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
9597 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
9598 * charset.c (charset_table_init): New static var.
9599 (syms_of_charset): Use it instead of xmalloc. This removes a
9600 dependency on glibc malloc internals. See Eli Zaretskii's comment in
9601 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
9602 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
9603 Move back to alloc.c.
9604 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
9605 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
9607 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
9609 * nsterm.m (windowDidResize): Call x_set_window_size only when
9610 ns_in_resize is true. Otherwise set pixelwidth/height and
9611 call change_frame_size (Bug#9628).
9613 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
9615 Port --enable-checking=all to Fedora 14 x86-64.
9616 * charset.c (syms_of_charset): Also account for glibc malloc's
9617 internal overhead when calculating the initial malloc maximum.
9619 Port --enable-checking=all to Fedora 14 x86.
9620 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
9622 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
9623 (overrun_check_realloc, overrun_check_free):
9624 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
9625 That way, xmalloc returns a properly-aligned pointer even if
9626 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
9627 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
9628 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
9629 into account when calculating the initial malloc maximum.
9630 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
9631 Move here from alloc.c, so that charset.c can use it too.
9632 Properly align; the old code wasn't right for common 32-bit hosts
9633 when configured with --enable-checking=all.
9634 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
9635 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
9637 2011-09-29 Eli Zaretskii <eliz@gnu.org>
9639 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
9642 2011-09-28 Eli Zaretskii <eliz@gnu.org>
9644 * xdisp.c (compute_display_string_end): If there's no display
9645 string at CHARPOS, return -1.
9647 * bidi.c (bidi_fetch_char): When compute_display_string_end
9648 returns a negative value, treat the character as a normal
9649 character not covered by a display string. (Bug#9624)
9651 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
9653 * lread.c (Fread_from_string): Fix typo in docstring.
9655 2011-09-27 Eli Zaretskii <eliz@gnu.org>
9657 * xdisp.c (handle_invisible_prop): If invisible text ends on a
9658 newline, reseat the iterator instead of bidi-iterating there one
9659 character at a time. (Bug#9610)
9660 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
9661 TO_CHARPOS if the bidi iterator is at base embedding level.
9663 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
9665 * lread.c (readevalloop): Use correct code for NBSP.
9666 (read1): Likewise. (Bug#9608)
9668 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
9670 * dbusbind.c (Fdbus_register_signal): When service is not
9671 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
9673 2011-09-25 Glenn Morris <rgm@gnu.org>
9675 * buffer.c (truncate-lines): Doc fix.
9677 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
9679 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
9680 (Fset_window_next_buffers): Doc fix.
9682 2011-09-24 Glenn Morris <rgm@gnu.org>
9684 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
9686 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
9688 Fix minor problems found by static checking.
9689 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
9690 * indent.c (Fvertical_motion): Fix == vs = typo.
9692 2011-09-24 Eli Zaretskii <eliz@gnu.org>
9694 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
9695 Default value is now t. Doc fix.
9697 * indent.c (Fvertical_motion): Compute and apply the overshoot
9698 logic when moving up, not only when moving down. Fix the
9699 confusing name and values of the it_overshoot_expected variable;
9700 logic changes accordingly. (Bug#9254) (Bug#9549)
9702 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
9703 CHARPOS is covered by a display string which includes newlines.
9704 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
9705 is covered by a display string with embedded newlines.
9707 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
9709 * dbusbind.c (Fdbus_register_signal): Add match rule to
9710 Vdbus_registered_objects_table. (Bug#9581)
9711 (Fdbus_register_method, Vdbus_registered_objects_table):
9714 2011-09-24 Jim Meyering <meyering@redhat.com>
9716 do not ignore write error for any output size
9717 The previous change was incomplete.
9718 While it makes emacs --batch detect the vast majority of stdout
9719 write failures, errors were still ignored whenever the output size is
9720 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
9721 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
9722 && echo FAIL: ignored write error
9723 FAIL: ignored write error
9724 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
9725 && echo FAIL: ignored write error
9726 FAIL: ignored write error
9727 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
9729 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
9731 * emacs.c (Fkill_emacs): In noninteractive mode exit
9732 non-successfully if a write error occurred on stdout. (Bug#9574)
9734 2011-09-21 Eli Zaretskii <eliz@gnu.org>
9736 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
9739 * dispextern.h (struct it): Update the comment documenting what
9742 2011-09-20 Eli Zaretskii <eliz@gnu.org>
9744 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
9745 a display string, extend search for cursor position to end of row.
9746 (find_row_edges): If the row ends in a newline from a display
9747 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
9748 Handle the case of a display string with multiple newlines.
9749 (Fcurrent_bidi_paragraph_direction): Fix search for previous
9750 non-empty line. Fixes confusing cursor motion with arrow keys at
9751 the beginning of a line that starts with whitespace.
9753 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
9755 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
9758 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
9760 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
9763 2011-09-18 Eli Zaretskii <eliz@gnu.org>
9765 * xdisp.c (display_line): Record maximum and minimum buffer
9766 positions even if no glyphs were produced (e.g., by a zero-width
9767 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
9768 buffer positions that will be removed from the glyph row because
9770 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
9771 column is beyond frame width: don't subtract 1 "pixel" when
9772 computing width of the stretch.
9773 (reseat_at_next_visible_line_start): Undo the change made on
9774 2011-09-17 that saved paragraph information and restored it after
9775 the call to `reseat'. (Bug#9545)
9777 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9779 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
9780 and turn window cursor on if cleared (Bug#9415).
9782 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
9784 * search.c (boyer_moore): Take unibyte characters from pattern
9785 literally. (Bug#9458)
9787 2011-09-18 Eli Zaretskii <eliz@gnu.org>
9789 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
9791 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
9793 Fix minor problem found by static checking.
9794 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
9795 initialized, to pacify gcc -Wuninitialized.
9797 * fileio.c: Report proper errno when syscall falls.
9798 (Finsert_file_contents): Save and restore errno,
9799 so that report_file_error outputs the correct diagnostic.
9800 (Fwrite_region) [CLASH_DETECTION]: Likewise.
9802 2011-09-18 Eli Zaretskii <eliz@gnu.org>
9804 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
9806 2011-09-17 Eli Zaretskii <eliz@gnu.org>
9808 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
9809 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
9811 2011-09-17 Eli Zaretskii <eliz@gnu.org>
9813 * xdisp.c (reseat_at_next_visible_line_start): Keep information
9814 about the current paragraph and restore it after the call to reseat.
9816 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
9817 (bidi_find_paragraph_start): Search back for paragraph beginning
9818 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
9819 (bidi_move_to_visually_next): Only trigger paragraph-related
9820 computations when the last character is a newline or at EOB, not
9821 just any NEUTRAL_B. (Bug#9470)
9823 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
9824 truncated lines if point is covered by a display string. (Bug#9524)
9826 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
9828 * xselect.c: Relax test for outgoing X longs (Bug#9498).
9829 (cons_to_x_long): New function.
9830 (lisp_data_to_selection_data): Use it. Correct the test for
9831 short-versus-long data; it was negated. Break out of vector
9832 loop, for efficiency, when a long datum is discovered.
9834 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
9836 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
9838 2011-09-16 Eli Zaretskii <eliz@gnu.org>
9840 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
9841 GCC PR/17406) by declaring this function with external scope.
9843 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
9845 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
9846 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
9848 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
9850 * editfns.c (Fformat): Correctly handle text properties on "%%".
9852 2011-09-15 Eli Zaretskii <eliz@gnu.org>
9854 * xterm.c (x_draw_composite_glyph_string_foreground):
9855 * w32term.c (x_draw_composite_glyph_string_foreground):
9856 * term.c (encode_terminal_code):
9857 * composite.c (composition_update_it, get_composition_id):
9858 * xdisp.c (get_next_display_element)
9859 (fill_composite_glyph_string): Add comments about special meaning
9860 of TAB characters in a composition.
9862 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
9864 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
9865 This occurs when processing a multibyte format.
9866 Problem reported by Wolfgang Jenker.
9868 2011-09-15 Johan Bockgård <bojohan@gnu.org>
9870 * xdisp.c (try_cursor_movement): Only check for exact match if
9871 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
9873 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
9875 Remove unused external symbols.
9876 * dispextern.h (calc_pixel_width_or_height): Remove decl.
9877 * xdisp.c (calc_pixel_width_or_height): Now static.
9878 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
9879 * indent.c (check_display_width):
9880 * w32term.c: Fix comment to match code.
9881 * xterm.c, xterm.h (x_catching_errors): Remove.
9883 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
9885 * xselect.c: Use signed conversions more consistently (Bug#9498).
9886 (selection_data_to_lisp_data): Assume incoming selection data are
9887 signed integers, not unsigned. This is to be consistent with
9888 outgoing selection data, which was modified to use signed integers
9889 in as part of the fix to Bug#9196 in response to Jan D.'s comment
9890 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
9891 expects long, not unsigned long.
9893 2011-09-14 Eli Zaretskii <eliz@gnu.org>
9895 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
9896 computation of loop end. Reported by Johan Bockgård
9899 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
9901 * frame.c (Fother_visible_frames_p): Function deleted.
9903 2011-09-12 Eli Zaretskii <eliz@gnu.org>
9905 * indent.c (compute_motion): Process display vector front to back
9906 rather than the other way around. (Bug#2496)
9908 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
9910 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
9912 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
9914 * minibuf.c (Fread_from_minibuffer): Doc fix.
9916 2011-09-11 Eli Zaretskii <eliz@gnu.org>
9918 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
9919 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
9921 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
9923 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
9924 value for non-existent files.
9926 2011-09-11 Eli Zaretskii <eliz@gnu.org>
9928 * fileio.c (Finsert_file_contents): If the file cannot be opened,
9929 set its "size" to -1. This will set the modtime_size field of
9930 the corresponding buffer to -1, which is what
9931 verify-visited-file-modtime expects for files that do not exist.
9934 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
9936 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
9938 * lisp.h: ... from here. push_key_description is no longer
9939 defined in keyboard.c, so its declaration should not be in
9940 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
9941 logically belongs with push_key_description.
9943 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
9945 * buffer.h: Include <sys/types.h> instead of <time.h>.
9946 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
9947 Problem reported by Herbert J. Skuhra.
9949 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
9951 * xml.c (parse_region): Make the parsing work for
9952 non-comment-starting XML files again (bug#9144).
9954 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
9956 * image.c (gif_load): Fix calculation of bottom and right corner.
9959 2011-09-10 Eli Zaretskii <eliz@gnu.org>
9961 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
9962 redisplay in small windows.
9964 2011-09-09 Eli Zaretskii <eliz@gnu.org>
9966 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
9968 2011-09-08 Martin Rudalics <rudalics@gmx.at>
9970 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
9971 Operate on live windows only.
9973 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
9975 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
9977 2011-09-07 Eli Zaretskii <eliz@gnu.org>
9979 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
9980 only under bidi iteration.
9982 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
9984 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
9986 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
9988 isnan: Fix porting problem to Solaris 10 with bundled gcc.
9989 Without this fix, the command to link temacs failed due to an
9990 undefined symbol __builtin_isnan. This is because
9991 /usr/include/iso/math_c99.h #defines isnan(x) to
9992 __builtin_isnan(x), but the bundled gcc, which identifies itself
9993 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
9995 * floatfns.c (isnan): #undef, and then #define to a clone of
9997 (Fisnan): Always define, since it's always available now.
9998 (syms_of_floatfns): Always define isnan at the Lisp level.
10000 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
10002 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
10004 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
10006 * fileio.c: Fix bugs with large file offsets (Bug#9428).
10007 The previous code assumed that file offsets (off_t values) fit in
10008 EMACS_INT variables, which is not true on typical 32-bit hosts.
10009 The code messed up by falsely reporting buffer overflow in cases
10010 such as (insert-file-contents "big" nil 1 2) into an empty buffer
10011 when "big" contains more than 2**29 bytes, even though this
10012 inserts just one byte and does not overflow the buffer.
10013 (Finsert_file_contents): Store file offsets as off_t
10014 values, not as EMACS_INT values. Check for overflow when
10015 converting between EMACS_INT and off_t. When checking for
10016 buffer overflow or for overlap, take the offsets into account.
10017 Don't use EMACS_INT for small values where int suffices.
10018 When checking for overlap, fix a typo: ZV was used where
10019 ZV_BYTE was intended.
10020 (Fwrite_region): Don't assume off_t fits into 'long'.
10021 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
10023 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
10025 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
10027 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
10029 sprintf-related integer and memory overflow issues (Bug#9412).
10031 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
10032 (esprintf, exprintf, evxprintf): New functions.
10033 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
10034 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
10035 (modify_event_symbol): Do not assume that the length of
10036 name_alist_or_stem is safe to alloca and fits in int.
10037 (Fexecute_extended_command): Likewise for function name and binding.
10038 (Frecursion_depth): Wrap around reliably on integer overflow.
10039 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
10040 since some callers pass EMACS_INT values.
10041 (Fsingle_key_description): Don't crash if symbol name contains more
10042 than MAX_ALLOCA bytes.
10043 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
10044 (get_minibuffer): Arg is now EMACS_INT, not int.
10045 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
10046 (esprintf, exprintf, evxprintf): New decls.
10047 * window.h (command_loop_level, minibuf_level): Reflect API changes.
10049 * dbusbind.c (signature_cat): New function.
10050 (xd_signature, Fdbus_register_signal):
10051 Do not overrun buffer; instead, report string overflow.
10053 * dispnew.c (add_window_display_history): Don't overrun buffer.
10054 Truncate instead; this is OK since it's just a log.
10056 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
10057 even if the time zone offset is outlandishly large.
10058 Don't mishandle offset == INT_MIN.
10060 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
10061 when creating daemon; the previous buffer-overflow check was incorrect.
10063 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
10064 which has the guts of the old verror function.
10066 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
10067 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
10069 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
10070 (font_unparse_xlfd): Don't blindly alloca long strings.
10071 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
10072 fits in int, when using sprintf. Use single snprintf to count
10073 length of string rather than counting it via multiple sprintfs;
10074 that's simpler and more reliable.
10075 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
10076 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
10077 sprintf, in case result does not fit in int.
10079 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
10080 (fontset_from_font): Print it.
10082 * frame.c (tty_frame_count): Now printmax_t, not int.
10083 (make_terminal_frame, set_term_frame_name): Print it.
10084 (x_report_frame_params): In X, window IDs are unsigned long,
10085 not signed long, so print them as unsigned.
10086 (validate_x_resource_name): Check for implausibly long names,
10087 and don't assume name length fits in 'int'.
10088 (x_get_resource_string): Don't blindly alloca invocation name;
10089 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
10092 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
10093 (xg_check_special_colors, xg_set_geometry):
10094 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
10096 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
10097 Use esprintf, not sprintf, in case result does not fit in int.
10099 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
10100 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
10101 it as a large positive number.
10102 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
10103 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
10105 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
10106 in case result does not fit in int.
10108 * print.c (float_to_string): Detect width overflow more reliably.
10109 (print_object): Make sprintf buffer a bit bigger, to avoid potential
10110 buffer overrun. Don't assume list length fits in 'int'. Treat
10111 print length of 0 as 0, not as infinity; to be consistent with other
10112 uses of print length in this function. Don't overflow print length
10113 index. Don't assume hash table size fits in 'long', or that
10114 vectorlike size fits in 'unsigned long'.
10116 * process.c (make_process): Use printmax_t, not int, to format
10117 process-name gensyms.
10119 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
10121 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
10122 to avoid potential buffer overrun.
10124 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
10125 if X resource line is longer than 512 bytes.
10127 * xfns.c (x_window): Make sprintf buffer a bit bigger
10128 to avoid potential buffer overrun.
10130 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
10132 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
10134 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
10136 Integer overflow fixes for scrolling, etc.
10137 Without these, Emacs silently mishandles large integers sometimes.
10138 For example, "C-u 4294967297 M-x recenter" was treated as if
10139 it were "C-u 1 M-x recenter" on a typical 64-bit host.
10141 * xdisp.c (try_window_id): Check Emacs fixnum range before
10142 converting to 'int'.
10144 * window.c (window_scroll_line_based, Frecenter):
10145 Check that an Emacs fixnum is in range before assigning it to 'int'.
10146 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
10147 values converted from Emacs fixnums.
10148 (Frecenter): Don't wrap around a line count if it is out of 'int'
10149 range; instead, treat it as an extreme value.
10150 (Fset_window_configuration, compare_window_configurations):
10151 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
10153 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
10154 that can exceed INT_MAX. Check that EMACS_INT value is in range
10155 before assigning it to the (possibly-narrower) index.
10156 (match_limit): Don't assume that a fixnum can fit in 'int'.
10158 * print.c (print_object): Use ptrdiff_t, not int, for index that can
10161 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
10162 (Fvertical_motion): Don't wrap around LINES values that don't fit
10163 in 'int'. Instead, treat them as extreme values. This is good
10164 enough for windows, which can't have more than INT_MAX lines anyway.
10166 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
10168 * Require libxml/parser.h to avoid compilation warning.
10170 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
10172 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
10173 since this reportedly can destroy thread storage.
10175 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
10177 * syntax.c (find_defun_start): Update all cache variables if
10178 exiting early (Bug#9401).
10180 2011-08-30 Eli Zaretskii <eliz@gnu.org>
10182 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
10184 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
10185 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
10186 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
10188 * term.c (tty_append_glyph): New function.
10189 (produce_stretch_glyph): Static function and its prototype deleted.
10191 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
10194 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
10196 * image.c (parse_image_spec): Check for nonnegative, not for positive,
10197 when checking :margin (Bug#9390).
10198 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
10199 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
10200 so that the name doesn't mislead. All uses changed.
10202 2011-08-28 Johan Bockgård <bojohan@gnu.org>
10204 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
10207 2011-08-27 Eli Zaretskii <eliz@gnu.org>
10209 * xdisp.c (move_it_to): Don't bail out early when reaching
10210 position beyond to_charpos, if we are scanning backwards.
10211 (move_it_vertically_backward): When DY == 0, make sure we get to
10212 the first character in the line after the newline.
10214 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
10216 * ccl.c: Improve and simplify overflow checking (Bug#9196).
10217 (ccl_driver): Do not generate an out-of-range pointer.
10218 (Fccl_execute_on_string): Remove unnecessary check for
10219 integer overflow, noted by Stefan Monnier in
10220 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
10221 Remove a FIXME that didn't need fixing.
10222 Simplify the newly-introduced buffer reallocation code.
10224 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
10226 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
10228 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
10230 Integer and memory overflow issues (Bug#9196).
10232 * doc.c (get_doc_string): Rework so that
10233 get_doc_string_buffer_size is the actual buffer size, rather than
10234 being 1 less than the actual buffer size; this makes xpalloc more
10237 * image.c (x_allocate_bitmap_record, cache_image):
10238 * xselect.c (Fx_register_dnd_atom):
10239 Simplify previous changes by using xpalloc.
10241 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
10242 since either will do and ptrdiff_t is convenient with xpalloc.
10244 * charset.c (charset_table_size)
10245 (struct charset_sort_data.priority): Now ptrdiff_t.
10246 (charset_compare): Don't overflow if priorities differ greatly.
10247 (Fsort_charsets): Don't assume list length fits in int.
10248 Check for size-calculation overflow when allocating sort data.
10249 (syms_of_charset): Allocate an initial charset table that is
10250 just under 64 KiB, to avoid problems with glibc malloc and mmap.
10252 * cmds.c (internal_self_insert): Check for size-calculation overflow.
10254 * composite.h (struct composition.glyph_len): Now int, not unsigned.
10255 The actual value is always <= INT_MAX, and leaving it unsigned made
10256 overflow checking harder.
10258 * dispextern.h (struct glyph_matrix.rows_allocated)
10259 (struct face_cache.size): Now ptrdiff_t, for convenience in use
10260 with xpalloc. The values are still always <= INT_MAX.
10262 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
10264 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
10265 (SAFE_NALLOCA): New macro.
10267 * region-cache.c (struct boundary.pos, find_cache_boundary)
10268 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
10269 (set_cache_region, invalidate_region_cache)
10270 (revalidate_region_cache, know_region_cache, region_cache_forward)
10271 (region_cache_backward, pp_cache):
10272 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
10273 so that ptrdiff_t * can be passed to xpalloc.
10274 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
10275 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
10276 (pp_cache): Don't assume cache_len fits in int.
10277 * region-cache.h: Adjust extern decls to match.
10279 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
10280 EMACS_INT, since either will do, for xpalloc.
10282 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
10283 (xnmalloc, xnrealloc, xpalloc): New functions.
10285 * bidi.c (bidi_shelve_header_size): New constant.
10286 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
10287 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
10289 * bidi.c (bidi_cache_shrink):
10290 * buffer.c (overlays_at, overlays_in, record_overlay_string)
10292 Don't update size of array until after memory allocation succeeds,
10293 because xmalloc/xrealloc may not return.
10294 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
10295 now that we have proper integer overflow checking.
10296 (record_overlay_string, overlay_strings): Catch overflows when
10297 calculating size of overlay_str_buf.
10299 * callproc.c (Fcall_process): Check for size overflow when
10300 calculating size of args2.
10301 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
10302 Normally we prefer signed values, but sticking with ptrdiff_t would
10303 require adding more-complicated checks.
10305 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
10306 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
10307 Redo buffer-overflow calculations to avoid integer overflow.
10308 Add a FIXME comment where memory seems to be over-allocated.
10310 * character.c (Fstring): Check for size-calculation overflow.
10312 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
10313 unnecessary integer overflow. Check for size overflow.
10314 (encode_coding_object): Don't update size until xmalloc succeeds.
10316 * composite.c (get_composition_id): Check for overflow in glyph
10317 length calculations.
10319 Integer and memory overflow fixes for display code.
10320 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
10321 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
10322 (scrolling_window): Check for overflow in size calculations.
10323 (line_draw_cost, realloc_glyph_pool, add_row_entry):
10324 Don't assume glyph table len fits in int.
10325 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
10326 (row_table_size): Now ptrdiff_t, not int.
10327 (scrolling_window): Avoid overflow in size calculations.
10328 Don't update size until allocation succeeds.
10329 * fns.c (concat): Check for overflow in size calculations.
10330 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
10331 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
10332 (NEXT_ALMOST_PRIME_LIMIT): New constant.
10334 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
10335 (get_doc_string): Check for size calculation overflow.
10336 Don't update size until allocation succeeds.
10337 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
10338 EMACS_INT, where ptrdiff_t will do.
10339 (Fsubstitute_command_keys): Check for string overflow.
10341 * editfns.c (set_time_zone_rule): Don't assume environment length
10343 (message_length): Now ptrdiff_t, not int.
10344 (Fmessage_box): Don't update size until allocation succeeds.
10345 Don't assume message length fits in int.
10346 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
10348 * emacs.c (main): Do not reallocate argv, since there is a null at
10349 the end that can be overwritten, and this way there's no need to
10350 worry about size-calculation overflow.
10351 (sort_args): Check for size-calculation overflow.
10353 * eval.c (init_eval_once, grow_specpdl): Don't update size until
10355 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
10357 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
10358 (x_set_scroll_bar_width, x_figure_window_size):
10359 Check for integer overflow.
10360 (x_set_alpha): Do not assume XINT fits in int.
10362 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
10363 This is for the members text_lines, text_cols, total_lines, total_cols,
10364 where the system imposes an 'int' limit.
10366 * fringe.c (Fdefine_fringe_bitmap):
10367 Don't update size until alloc works.
10369 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
10370 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
10372 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
10373 Check for size-calculation overflow.
10374 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
10375 do, as we prefer signed integers.
10376 (id_to_widget.max_size, id_to_widget.used)
10377 (xg_store_widget_in_map, xg_remove_widget_from_map)
10378 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
10379 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
10380 Use and return ptrdiff_t, not int.
10381 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
10382 * gtkutil.h: Change prototypes to match the above.
10384 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
10385 are duplicate now that they've been promoted to lisp.h.
10386 (x_allocate_bitmap_record, x_alloc_image_color)
10387 (make_image_cache, cache_image, xpm_load):
10388 Don't update size until alloc is done.
10389 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
10391 Check for size calculation overflow.
10392 (ct_colors_allocated_max): New constant.
10393 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
10396 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
10397 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
10398 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
10399 Use ptrdiff_t, not int, to count maps.
10400 (read_char_minibuf_menu_prompt): Check for overflow in size
10401 calculations. Don't update size until allocation succeeds.
10402 Redo calculations to avoid overflow.
10403 * keyboard.h: Change prototypes to match the above.
10405 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
10407 (current_minor_maps): Check for size calculation overflow.
10408 * keymap.h: Change prototypes to match the above.
10410 * lread.c (read1, init_obarray): Don't update size until alloc done.
10412 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
10413 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
10415 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
10416 Now ptrdiff_t, not int.
10417 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
10418 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
10420 * process.c (Fnetwork_interface_list): Check for overflow
10421 in size calculation.
10423 * region-cache.c (move_cache_gap): Check for size calculation overflow.
10425 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
10426 overflow. Don't bother calling xmalloc when xrealloc will do.
10428 * search.c (Freplace_match): Check for size calculation overflow.
10429 (Fset_match_data): Don't assume list lengths fit in 'int'.
10431 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
10432 for command line length. Do not attempt to address one before the
10433 beginning of an array, as that's not portable.
10435 * term.c (max_frame_lines): Remove; unused.
10436 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
10438 (encode_terminal_code, calculate_costs): Check for size
10439 calculation overflow.
10440 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
10441 table lengths and related sizes. Don't update size until alloc
10442 done. Redo calculations to avoid overflow.
10443 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
10445 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
10446 subtracting pointers.
10447 (gobble_line): Check for overflow more carefully. Don't update size
10450 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
10451 Don't update size until alloc done.
10452 Redo size calculations to avoid overflow.
10453 Check for size calculation overflow.
10454 (main) [DEBUG]: Fix typo in invoking tparam1.
10456 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
10457 Use ptrdiff_t, not int, for sizes.
10458 (store_mode_line_noprop_char): Don't update size until alloc done.
10460 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
10461 Use ptrdiff_t, not int, for sizes.
10462 (Finternal_make_lisp_face, cache_face):
10463 Check for size calculation overflow.
10464 (cache_face): Treat size calculation overflows as if they were
10465 memory exhaustion (the usual treatment), rather than aborting.
10467 * xfns.c (x_encode_text, x_set_name_internal)
10468 (Fx_change_window_property): Use ptrdiff_t, not int, to count
10469 sizes, since they can exceed INT_MAX in size. Check for size
10470 calculation overflow.
10472 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
10473 (xg_select): Check for size calculation overflow.
10474 Don't update size until alloc done.
10476 * xrdb.c (get_environ_db): Don't assume path length fits in int,
10477 as sprintf is limited to int lengths.
10479 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
10480 (X_LONG_MIN): New macros.
10481 Use them to make the following changes clearer.
10482 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
10483 This change doesn't affect the value now, but it may help remind
10484 future maintainers not to raise the value too much later.
10485 (SELECTION_QUANTUM): Remove, replacing with ...
10486 (selection_quantum): ... new function, which avoids overflow.
10488 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
10489 assumption that selection length fits in 'int'.
10490 (x_reply_selection_request, x_handle_selection_request)
10491 (x_get_window_property, receive_incremental_selection)
10492 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
10493 (lisp_data_to_selection_data, clean_local_selection_data):
10494 Use ptrdiff_t, not int, to record length of selection.
10495 (x_reply_selection_request, x_get_window_property)
10496 (receive_incremental_selection, x_property_data_to_lisp):
10497 Redo calculations to avoid overflow.
10498 (x_reply_selection_request): When sending hint, ceiling it at
10499 X_LONG_MAX rather than relying on wraparound overflow to send
10501 (x_get_window_property, receive_incremental_selection)
10502 (lisp_data_to_selection_data, x_property_data_to_lisp):
10503 Check for size-calculation overflow.
10504 (x_get_window_property, receive_incremental_selection)
10505 (lisp_data_to_selection_data, Fx_register_dnd_atom):
10506 Don't store size until memory allocation succeeds.
10507 (x_get_window_property): Plug memory leak on memory exhaustion.
10508 Don't double-block input; malloc is safe here. Don't assume 2**34
10509 - 4 fits in unsigned long. Add an xassert to check
10510 XGetWindowProperty overflow. Be more careful about overflow
10511 calculations, and distinguish size from memory overflow better.
10512 (receive_incremental_selection): When tracing, don't assume
10513 unsigned int is less than INT_MAX.
10514 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
10515 harmful) conversions of unsigned short to int.
10516 (lisp_data_to_selection_data): Don't assume that integers
10517 in the range -65535 through -1 fit in an X unsigned short.
10518 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
10519 result parameters unless successful. Rely on cons_to_unsigned
10520 to report problems with elements; the old code wasn't right anyway.
10521 (x_check_property_data): Check for int overflow; we cannot use
10522 a wider type due to X limits.
10523 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
10525 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
10527 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
10528 (x_term_init): Check for size calculation overflow.
10529 (x_color_cells): Don't store size until memory allocation succeeds.
10530 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
10531 Don't assume alloca size is less than MAX_ALLOCA.
10532 (x_term_init): Don't assume length fits in int (sprintf is limited
10535 Use ptrdiff_t for composition IDs.
10536 * character.c (lisp_string_width):
10537 * composite.c (composition_table_size, n_compositions)
10538 (get_composition_id, composition_gstring_from_id):
10539 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
10540 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
10541 * window.c (Frecenter):
10542 Use ptrdiff_t, not int, for composition IDs.
10543 * composite.c (get_composition_id): Check for integer overflow.
10544 * composite.h: Adjust prototypes to match the above changes.
10546 Use ptrdiff_t for hash table indexes.
10547 * category.c (hash_get_category_set):
10548 * ccl.c (ccl_driver):
10549 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
10550 * coding.c (coding_system_charset_list, detect_coding_system):
10551 * coding.h (struct coding_system.id):
10552 * composite.c (get_composition_id, gstring_lookup_cache):
10553 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
10554 * image.c (xpm_get_color_table_h):
10555 * lisp.h (hash_lookup, hash_put):
10556 * minibuf.c (Ftest_completion):
10557 Use ptrdiff_t for hash table indexes, not int (which is too
10558 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
10559 32-bit --with-wide-int hosts).
10561 * charset.c (Fdefine_charset_internal): Check for integer overflow.
10562 Add a FIXME comment about memory leaks.
10563 (syms_of_charset): Don't assume xmalloc returns.
10565 Don't assume that stated character widths fit in int.
10566 * character.c (Fchar_width, c_string_width, lisp_string_width):
10567 * character.h (CHAR_WIDTH):
10568 * indent.c (MULTIBYTE_BYTES_WIDTH):
10569 Use sanitize_char_width to avoid undefined and/or bad behavior
10570 with outlandish widths.
10571 * character.h (sanitize_tab_width): Rename from sanitize_width,
10572 now that we have two such functions. All uses changed.
10573 (sanitize_char_width): New inline function.
10575 Don't assume that tab-width fits in int.
10576 * character.h (sanitize_width): New inline function.
10577 (SANE_TAB_WIDTH): New macro.
10578 (ASCII_CHAR_WIDTH): Use it.
10579 * indent.c (sane_tab_width): Remove. All uses replaced by
10580 SANE_TAB_WIDTH (current_buffer).
10581 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
10583 * fileio.c: Integer overflow issues with file modes.
10584 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
10586 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
10587 Remove unreachable code.
10588 (read_hex, load_charset_map_from_file): Check for integer overflow.
10590 * xterm.c: Don't go over XClientMessageEvent limit.
10591 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
10592 (x_send_scroll_bar_event): Likewise. Check that the size does not
10593 exceed limits imposed by XClientMessageEvent, as well as the usual
10594 ptrdiff_t and size_t limits.
10596 * keyboard.c: Overflow, signedness and related fixes.
10597 (make_lispy_movement): Use same integer type in forward decl
10598 that is used in the definition.
10599 (read_key_sequence, keyremap_step):
10600 Change bufsize argument back to int, undoing my 2011-03-30 change.
10601 We prefer signed types, and int is wide enough here.
10602 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
10603 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
10604 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
10605 length, not size_t. Use ptrdiff_t for index, not int.
10606 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
10607 possibility of integer overflow.
10609 Overflow, signedness and related fixes for images.
10611 * dispextern.h (struct it.stack[0].u.image.image_id)
10612 (struct_it.image_id, struct image.id, struct image_cache.size)
10613 (struct image_cache.used, struct image_cache.ref_count):
10614 * gtkutil.c (update_frame_tool_bar):
10615 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
10616 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
10617 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
10618 * nsmenu.m (update_frame_tool_bar):
10619 * xdisp.c (calc_pixel_width_or_height):
10620 * xfns.c (image_cache_refcount):
10621 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
10622 on typical 64-bit hosts.
10624 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
10625 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
10626 Omit unnecessary casts to int.
10627 (parse_image_spec): Check that integers fall into 'int' range
10628 when the callers expect that.
10629 (image_ascent): Redo ascent calculation to avoid int overflow.
10630 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
10631 (lookup_image): Remove unnecessary tests.
10632 (xbm_image_p): Locals are now of int, not EMACS_INT,
10633 since parse_image_check makes sure they fit into int.
10634 (png_load, gif_load, svg_load_image):
10635 Prefer int to unsigned where either will do.
10636 (tiff_handler): New function, combining the cores of the
10637 old tiff_error_handler and tiff_warning_handler.
10638 This function is rewritten to use vsnprintf and thereby avoid
10639 stack buffer overflows. It uses only the features of vsnprintf
10640 that are common to both POSIX and native Microsoft.
10641 (tiff_error_handler, tiff_warning_handler): Use it.
10642 (tiff_load, gif_load, imagemagick_load_image):
10643 Don't assume :index value fits in 'int'.
10644 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
10645 (imagemagick_load_image): Check that crop parameters fit into
10646 the integer types that MagickCropImage accepts. Don't assume
10647 Vimagemagick_render_type has a nonnegative value. Don't assume
10648 size_t fits in 'long'.
10649 (gs_load): Use printmax_t to print the widest integers possible.
10650 Check for integer overflow when computing image height and width.
10652 2011-08-26 Eli Zaretskii <eliz@gnu.org>
10654 * xdisp.c (redisplay_window): Don't force window start if point
10655 will be invisible in the resulting window. (Bug#9324)
10657 2011-08-25 Eli Zaretskii <eliz@gnu.org>
10659 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
10660 the display spec is of the form `(space ...)'.
10661 (handle_display_spec): Return the value returned by
10662 handle_single_display_spec, not just 1 or zero.
10663 (handle_single_display_spec): If the display spec is of the form
10664 `(space ...)', and specifies display in the text area, return 2
10666 (try_cursor_movement): Check for the need to scroll more
10667 accurately, and prefer exact match for point under bidi.
10668 Don't advance `row' beyond the last row of the window.
10670 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
10671 into disp_prop; all users changed.
10673 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
10674 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
10675 for the text covered by the display property.
10677 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
10679 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
10680 Change return value to nil.
10681 (Frecord_buffer): Delete unused function.
10683 2011-08-24 Eli Zaretskii <eliz@gnu.org>
10685 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
10686 buffers, return left-to-right.
10687 (set_cursor_from_row): Consider candidate row a win if its glyph
10688 represents a newline and point is on that newline. Fixes cursor
10689 positioning on the newline at EOL of R2L text within L2R
10690 paragraph, and vice versa.
10691 (try_cursor_movement): Check continued rows, in addition to
10692 continuation rows. Fixes unwarranted scroll when point enters a
10693 continued line of R2L text within an L2R paragraph, or vice versa.
10694 (cursor_row_p): Consider the case of point being equal to
10695 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
10696 from the end of a short line to the beginning of a continued line
10697 of R2L text within L2R paragraph.
10698 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
10699 composed characters.
10701 * bidi.c (bidi_check_type): Use xassert.
10702 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
10705 2011-08-23 Eli Zaretskii <eliz@gnu.org>
10707 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
10710 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
10712 * nsfont.m (ns_otf_to_script): Fix typo.
10714 2011-08-22 Kenichi Handa <handa@m17n.org>
10716 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
10717 extra slot even if the purpose is char-code-property-table.
10719 2011-08-23 Eli Zaretskii <eliz@gnu.org>
10721 * xdisp.c (redisplay_window): When computing centering_position,
10722 account for the height of the header line. (Bug#8874)
10724 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
10725 instead of CHAR_TO_BYTE. Fixes a crash when a completion
10726 candidate is selected by the mouse, and that candidate has a
10727 composed character under the mouse.
10729 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
10730 coordinates reported by pos-visible-in-window-p for a composed
10731 character in column zero.
10733 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
10735 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
10737 2011-08-22 Eli Zaretskii <eliz@gnu.org>
10739 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
10740 consider it a hit if to_charpos is anywhere in the range of the
10741 composed buffer positions.
10743 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
10745 * image.c (gif_load): Don't assume that each subimage has the same
10746 dimensions as the base image. Handle disposal method that is
10747 "undefined" by the gif spec (Bug#9335).
10749 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
10751 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
10752 (Fcondition_case): Document `debug' symbol in error handler.
10754 2011-08-19 Eli Zaretskii <eliz@gnu.org>
10756 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
10757 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
10758 from an Org mode buffer to a Speedbar frame.
10760 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
10761 a composition, take its buffer position from IT->cmp_it.charpos.
10762 Fixes cursor positioning at the beginning of a line that begins
10763 with a composed character.
10765 2011-08-18 Eli Zaretskii <eliz@gnu.org>
10767 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
10768 character bidirectional type, use STRONG_L instead. Fixes crashes
10769 in a buffer produced by `describe-categories'.
10771 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
10772 members before the level stack, so they would be saved and
10773 restored when copying iterator state. Fixes incorrect reordering
10774 around TABs covered by display properties.
10776 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
10778 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
10780 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
10782 * eval.c (internal_condition_case, internal_condition_case_1)
10783 (internal_condition_case_2, internal_condition_case_n):
10784 Remove unnecessary aborts (Bug#9081).
10786 2011-08-17 Eli Zaretskii <eliz@gnu.org>
10788 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
10789 has no `load' handler, try opening the file locally. (Bug#9311)
10791 2011-08-16 Ken Brown <kbrown@cornell.edu>
10793 * gmalloc.c: Expand comment.
10795 2011-08-16 Eli Zaretskii <eliz@gnu.org>
10797 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
10798 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
10800 2011-08-16 Ken Brown <kbrown@cornell.edu>
10802 Fix memory allocation problems in Cygwin build (Bug#9273).
10804 * unexcw.c ( __malloc_initialized): Declare external variable.
10805 (fixup_executable): Force the dumped emacs to reinitialize malloc.
10807 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
10809 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
10811 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
10812 in the static heap.
10813 [CYGWIN] (special_realloc): New function.
10814 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
10815 requests to realloc storage in the static heap.
10817 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
10819 * bidi.c (bidi_initialize): Remove unused local.
10821 2011-08-15 Eli Zaretskii <eliz@gnu.org>
10824 * biditype.h: Remove file.
10825 * makefile.w32-in ($(BLD)/bidi.$(O)):
10826 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
10828 * dispextern.h: Fix a typo in the comment to bidi_type_t.
10830 * chartab.c: Improve commentary for the uniprop_table API.
10832 * bidi.c (bidi_paragraph_init): Support zero value of
10833 bidi_ignore_explicit_marks_for_paragraph_level.
10834 (bidi_initialize): Use uniprop_table instead of including
10835 biditype.h and bidimirror.h.
10837 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
10838 coordinates of the iterator when restoring from ppos_it.
10841 2011-08-14 Kenichi Handa <handa@m17n.org>
10843 * process.c (create_process): Call setup_process_coding_systems
10844 after the pid of the process is set to -1 (Bug#8162).
10846 2011-08-14 Eli Zaretskii <eliz@gnu.org>
10848 * xdisp.c (move_it_in_display_line_to): Don't invoke
10849 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
10850 ppos_it. Fixes vertical cursor motion when line beginning is
10851 covered by an image. (Bug#9296)
10853 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
10855 * nsterm.h (ns_run_ascript): Declare.
10856 (NSAPP_DATA2_RUNASSCRIPT): Define.
10858 * nsfns.m (as_script, as_result, as_status): New static variables.
10859 (ns_run_ascript): New function.
10860 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
10861 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
10862 the event loop. Get status from as_status (Bug#7276).
10864 * nsterm.m (sendEvent): If event is NSApplicationDefined and
10865 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
10866 the event loop (Bug#7276).
10868 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
10870 * gnutls.c (QCgnutls_bootprop_priority)
10871 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
10872 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
10873 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
10874 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
10875 (QCgnutls_bootprop_verify_hostname_error)
10876 (QCgnutls_bootprop_callbacks_verify): Rename from
10877 Qgnutls_bootprop_..., all uses changed.
10879 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
10882 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
10884 * xfaces.c (Qframe_set_background_mode): Now static.
10885 * dispextern.h (Qframe_set_background_mode): Remove decl.
10887 * process.c (Fnetwork_interface_info): Declare local only if needed.
10889 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
10891 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
10892 (Fnetwork_interface_list): Allocate in increments of bytes instead
10893 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
10894 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
10896 (struct ifflag_def): notrailers is smart on OSX.
10897 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
10898 Get hardware address with getifaddrs if available.
10900 2011-08-12 Eli Zaretskii <eliz@gnu.org>
10902 * xdisp.c (iterate_out_of_display_property): xassert that
10903 IT->position is set to within IT->object's boundaries. Break from
10904 the loop as soon as EOB is reached; avoids infloops in redisplay
10905 when IT->position is set up wrongly due to some bug.
10906 Set IT->current to match the bidi iterator unconditionally.
10907 (push_display_prop): Allow GET_FROM_STRING as IT->method on
10908 entry. Force push_it to save on the stack the current
10909 buffer/string position, to be restored by pop_it. Fix flags in
10910 the iterator structure wrt the object coming from a display
10911 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
10912 properties. (Bug#9284)
10914 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
10916 * fontset.c (fontset_get_font_group): Add proper type checks.
10919 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10921 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
10922 and LC_VERSION_MIN_MACOSX.
10923 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
10924 (dump_it) [LC_FUNCTION_STARTS]: Use it.
10926 2011-08-08 Eli Zaretskii <eliz@gnu.org>
10928 * xdisp.c (forward_to_next_line_start): Allow to use the
10929 no-display-properties-and-no-overlays under bidi display.
10930 Set disp_pos in the bidi iterator to avoid searches for display
10931 properties and overlays.
10933 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
10935 * editfns.c (Fset_time_zone_rule): Document relationship with the
10938 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
10939 the font entity extracted from the cache (Bug#8109).
10941 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
10943 * composite.c (autocmp_chars): Don't reset point. That is done by
10944 restore_point_unwind (Bug#5984).
10946 2011-08-07 Juri Linkov <juri@jurta.org>
10948 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
10949 to show the arg `TIME' instead of `TIMEVAL'.
10951 2011-08-06 Eli Zaretskii <eliz@gnu.org>
10953 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
10954 display property strides EOL and includes a newline, as in
10955 longlines-mode. (Bug#9254)
10956 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
10957 word-wrap under bidirectional display. (Bug#9224)
10959 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
10960 is non-zero, even if the data buffer is NULL. Fixes a crash in
10961 vertical-motion with longlines-mode. (Bug#9254)
10963 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10965 * bidi.c <bidi_cache_total_alloc>: Now static.
10966 (bidi_initialize): Initialize bidi_cache_total_alloc.
10968 * xdisp.c (display_line): Release buffer allocated for shelved bidi
10971 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
10972 amount allocated this far in `bidi_cache_total_alloc'.
10973 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
10974 non-zero, only free the data buffer without restoring the cache
10975 contents. All callers changed.
10977 * dispextern.h (bidi_unshelve_cache): Update prototype.
10979 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
10980 (move_it_in_display_line, move_it_to)
10981 (move_it_vertically_backward, move_it_by_lines): Replace the call
10982 to xfree to an equivalent call to bidi_unshelve_cache.
10983 (move_it_in_display_line_to): Fix logic of returning
10984 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
10986 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10988 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
10989 came from a string character with a `cursor' property. (Bug#9229)
10991 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
10993 * Makefile.in (LIB_PTHREAD): New variable.
10994 (LIBES): Add LIB_PTHREAD (Bug#9216).
10996 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
10997 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
10999 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
11001 * regex.c (re_iswctype): Remove some redundant boolean conversions.
11003 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
11005 * xterm.c (x_find_topmost_parent): New function.
11006 (x_set_frame_alpha): Find topmost parent window with
11007 x_find_topmost_parent and set the property there also (bug#9181).
11008 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
11010 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
11012 * callproc.c (Fcall_process): Avoid vfork clobbering
11013 the local vars buffer, coding_systems, current_dir.
11015 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
11017 * keymap.c (Fmake_composed_keymap): Move to subr.el.
11019 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
11021 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
11022 so that it is not optimized away.
11024 * xdisp.c (compute_display_string_pos): Remove unused local.
11026 2011-08-02 Eli Zaretskii <eliz@gnu.org>
11028 Fix slow cursor motion and scrolling in large buffers with
11029 selective display, like Org Mode buffers. (Bug#9218)
11031 * dispextern.h (struct bidi_it): New member disp_prop_p.
11033 * xdisp.c: Remove one-slot cache of display string positions.
11034 (compute_display_string_pos): Accept an additional argument
11035 DISP_PROP_P; callers changed. Scan at most 5K characters forward
11036 for a display string or property. If found, set DISP_PROP_P
11039 * bidi.c (bidi_fetch_char): Accept an additional argument
11040 DISP_PROP_P, and pass it to compute_display_string_pos.
11041 Only handle text covered by a display string if DISP_PROP_P is returned
11042 non-zero. All callers of bidi_fetch_char changed.
11044 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
11046 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
11048 2010-12-03 Don March <don@ohspite.net>
11050 * keymap.c (Fdefine_key): Fix non-prefix key error message when
11051 last character M-[char] is translated to ESC [char] (bug#7541).
11053 2011-08-02 Kenichi Handa <handa@m17n.org>
11055 * lisp.h (uniprop_table): Extern it.
11057 * chartab.c (uniprop_table): Make it non-static.
11059 2011-08-01 Eli Zaretskii <eliz@gnu.org>
11061 * xdisp.c (forward_to_next_line_start): Accept additional argument
11062 BIDI_IT_PREV, and store into it the state of the bidi iterator had
11064 (reseat_at_next_visible_line_start): Use the bidi iterator state
11065 returned by forward_to_next_line_start to restore the state of
11066 it->bidi_it after backing up to previous newline. (Bug#9212)
11068 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
11070 * regex.c (re_comp): Protoize.
11071 (re_exec): Fix return type.
11072 (regexec): Fix type of `ret'. (Bug#9203)
11074 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
11076 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
11077 This is needed if max-image-size is a floating-point number.
11079 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
11081 * print.c (print_object): Print empty symbol as ##.
11083 * lread.c (read1): Read ## as empty symbol.
11085 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
11087 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
11088 setting frame foreground color (Bug#9175).
11089 (x_set_background_color): Likewise.
11091 * nsmenu.m (-setText): Size tooltip dimensions precisely to
11092 contents (Bug#9176).
11093 (EmacsTooltip -init): Remove bezels and add shadows to
11096 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
11097 or scroll bar (Bug#8470).
11099 * nsfont.m (nsfont_open): Remove assignment to voffset and
11100 unnecessary vars hshink, expand, hd, full_height, min_height.
11101 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
11103 * nsterm.h (nsfont_info): Remove voffset field.
11105 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
11107 Implement strike-through and overline on NextStep (Bug#8863).
11109 * nsfont.m (nsfont_open): Use underline position provided by font,
11110 instead of hard-coded value of 2.
11111 (nsfont_draw): Call ns_draw_text_decoration instead.
11113 * nsterm.h: Add declaration for ns_draw_text_decoration.
11115 * nsterm.m (ns_draw_text_decoration): New function for drawing
11116 underline, overline, and strike-through.
11117 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
11118 ns_draw_text_decoration. Change treatment of cursor drawing to
11119 accommodate underlining, etc.
11121 2011-07-28 Eli Zaretskii <eliz@gnu.org>
11123 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
11126 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
11128 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
11129 Without this fix, if a signal arrives just after memory fills up,
11130 'malloc' might be invoked reentrantly.
11132 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
11133 In other words, assume that every image size is allowed, on non-X
11134 hosts. This assumption is probably wrong, but it lets Emacs compile.
11136 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
11138 * regex.c (re_iswctype): Convert return values to boolean.
11140 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
11142 * xdisp.c (compute_display_string_pos): Don't use cached display
11143 string position if the buffer had its restriction changed.
11146 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
11148 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
11150 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
11152 Integer signedness and overflow and related fixes. (Bug#9079)
11154 * bidi.c: Integer size and overflow fixes.
11155 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
11156 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
11157 (bidi_cache_find_level_change, bidi_cache_ensure_space)
11158 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
11159 (bidi_find_other_level_edge):
11160 Use ptrdiff_t instead of EMACS_INT where either will do.
11161 This works better on 32-bit hosts configured --with-wide-int.
11162 (bidi_cache_ensure_space): Check for size-calculation overflow.
11163 Use % rather than repeated addition, for better worst-case speed.
11164 Don't set bidi_cache_size until after xrealloc returns, because it
11166 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
11167 (bidi_cache_ensure_space): Also check that the bidi cache size
11168 does not exceed that of the largest Lisp string or buffer. See Eli
11169 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
11171 * alloc.c (__malloc_size_t): Remove.
11172 All uses replaced by size_t. See Andreas Schwab's note
11173 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
11175 * image.c: Improve checking for integer overflow.
11176 (check_image_size): Assume that f is nonnull, since
11177 it is always nonnull in practice. This is one less thing to
11178 worry about when checking for integer overflow later.
11179 (x_check_image_size): New function, which checks for integer
11180 overflow issues inside X.
11181 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
11182 This removes the need for a memory_full check.
11183 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
11184 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
11185 (xbm_read_bitmap_data): Change locals back to 'int', since
11186 their values must fit in 'int'.
11187 (xpm_load_image, png_load, tiff_load):
11188 Invoke x_create_x_image_and_pixmap earlier,
11189 to avoid much needless work if the image is too large.
11190 (tiff_load): Treat overly large images as if
11191 x_create_x_image_and_pixmap failed, not as malloc failures.
11192 (gs_load): Use x_check_image_size.
11194 * gtkutil.c: Omit integer casts.
11195 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
11196 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
11198 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
11200 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
11201 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
11202 would wrongly return t on a 64-bit host.
11204 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
11205 The plain *_OVERFLOW macros run afoul of GCC bug 49705
11206 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
11207 and therefore cause GCC to emit a bogus diagnostic in some cases.
11209 * image.c: Integer signedness and overflow and related fixes.
11210 This is not an exhaustive set of fixes, but it's time to
11211 record what I've got.
11212 (lookup_pixel_color, check_image_size): Remove redundant decls.
11213 (check_image_size): Don't assume that arbitrary EMACS_INT values
11214 fit in 'int', or that arbitrary 'double' values fit in 'int'.
11215 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
11216 (tiff_load, imagemagick_load_image):
11217 Check for overflow in size calculations.
11218 (x_create_x_image_and_pixmap): Remove unnecessary test for
11219 xmalloc returning NULL; that can't happen.
11220 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
11221 (xpm_color_bucket): Use better integer hashing function.
11222 (xpm_cache_color): Don't possibly over-allocate memory.
11223 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
11224 (gif_memory_source):
11225 Use ptrdiff_t, not int or size_t, to record sizes.
11226 (png_load): Don't assume values greater than 2**31 fit in 'int'.
11227 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
11228 either works, as we prefer signed integers.
11229 (tiff_read_from_memory, tiff_write_from_memory):
11230 Return tsize_t, not size_t, since that's what the TIFF API wants.
11231 (tiff_read_from_memory): Don't fail simply because the read would
11232 go past EOF; instead, return a short read.
11233 (tiff_load): Omit no-longer-needed casts.
11234 (Fimagemagick_types): Don't assume size fits into 'int'.
11236 Improve hashing quality when configured --with-wide-int.
11237 * fns.c (hash_string): New function, taken from sxhash_string.
11238 Do not discard information about ASCII character case; this
11239 discarding is no longer needed.
11240 (sxhash-string): Use it. Change sig to match it. Caller changed.
11241 * lisp.h: Declare it.
11242 * lread.c (hash_string): Remove, since we now use fns.c's version.
11243 The fns.c version returns a wider integer if --with-wide-int is
11244 specified, so this should help the quality of the hashing a bit.
11246 * emacs.c: Integer overflow minor fix.
11247 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
11248 Define only if GNU_LINUX.
11249 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
11251 * dispnew.c: Integer signedness and overflow fixes.
11252 Remove unnecessary forward decls, that were a maintenance hassle.
11253 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
11255 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
11256 (scrolling_window): Use ptrdiff_t, not int, for byte count.
11257 (prepare_desired_row, line_draw_cost):
11258 Use int, not unsigned, where either works.
11259 (save_current_matrix, restore_current_matrix):
11260 Use ptrdiff_t, not size_t, where either works.
11261 (init_display): Check for overflow more accurately, and without
11262 relying on undefined behavior.
11264 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
11265 Remove, replacing with the new symbols in lisp.h. All uses changed.
11266 * fileio.c (make_temp_name):
11267 * filelock.c (lock_file_1, lock_file):
11268 * xdisp.c (message_dolog):
11269 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
11270 Use pMd etc. instead.
11271 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
11272 replacing the pWIDE etc. symbols removed from editfns.c.
11274 * keyboard.h (num_input_events): Now uintmax_t.
11275 This is (very slightly) less likely to mess up due to wraparound.
11278 * buffer.c: Integer signedness fixes.
11279 (alloc_buffer_text, enlarge_buffer_text):
11280 Use ptrdiff_t rather than size_t when either will do, as we prefer
11283 * alloc.c: Integer signedness and overflow fixes.
11284 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
11285 (__malloc_size_t): Default to size_t, not to int.
11286 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
11287 (Fgarbage_collect, mark_object_loop_halt, mark_object):
11288 Prefer ptrdiff_t to size_t when either would do, as we prefer
11290 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
11291 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
11292 Now const. Initialize with values that are in range even if char
11294 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
11295 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
11296 These functions do the right thing with sizes > 2**32.
11297 (check_depth): Now ptrdiff_t, not int.
11298 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
11299 Adjust to new way of storing sizes. Check for size overflow bugs
11301 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
11302 slightly wrong anyway, as it missed one instance of
11303 XMALLOC_OVERRUN_CHECK_OVERHEAD.
11304 (refill_memory_reserve): Omit needless cast to size_t.
11305 (mark_object_loop_halt): Mark as externally visible.
11307 * xselect.c: Integer signedness and overflow fixes.
11308 (Fx_register_dnd_atom, x_handle_dnd_message):
11309 Use ptrdiff_t, not size_t, since we prefer signed.
11310 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
11311 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
11312 x_dnd_atoms_size and x_dnd_atoms_length.
11314 * doprnt.c: Prefer signed to unsigned when either works.
11316 * doprnt.c (doprnt):
11318 * xdisp.c (vmessage):
11319 Use ptrdiff_t, not size_t, when using or implementing doprnt,
11320 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
11321 prefer signed arithmetic to avoid comparison confusion.
11322 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
11323 but is a bit tricky.
11325 Assume freestanding C89 headers, string.h, stdlib.h.
11326 * data.c, doprnt.c, floatfns.c, print.c:
11327 Include float.h unconditionally.
11328 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
11329 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
11330 * regex.c: Likewise for stddef.h, string.h.
11331 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
11332 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
11333 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
11334 (STDC_HEADERS): Remove obsolete defines.
11335 * sysdep.c: Include limits.h unconditionally.
11337 Assume support for memcmp, memcpy, memmove, memset.
11338 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
11339 * regex.c (memcmp, memcpy):
11340 Remove; we assume C89 now.
11342 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
11343 (__malloc_safe_bcopy): Remove; no longer needed.
11345 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
11346 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
11347 well either way, and we prefer signed to unsigned.
11349 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
11351 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
11352 closes the connection while we're reading (bug#9182).
11354 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
11356 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
11357 are specified (Bug#9168).
11359 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
11361 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
11362 Found by GCC static checking and --with-wide-int on a 32-bit host.
11364 2011-07-25 Eli Zaretskii <eliz@gnu.org>
11366 * xdisp.c (compute_display_string_pos): Fix logic of caching
11367 previous display string position. Initialize cached_prev_pos to
11368 -1. Fixes slow-down at the beginning of a buffer.
11370 2011-07-24 Eli Zaretskii <eliz@gnu.org>
11372 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
11373 for attrs[LFACE_FONTSET_INDEX].
11375 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
11377 * xml.c (parse_region): Remove unused local
11378 that was recently introduced.
11380 2011-07-23 Eli Zaretskii <eliz@gnu.org>
11382 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
11383 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
11385 * xdisp.c (move_it_in_display_line_to): Record the best matching
11386 position for TO_CHARPOS while scanning the line, and restore it on
11387 exit if none of the characters scanned was an exact match.
11388 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
11389 when exact match is impossible due to invisible text, and the
11390 lines are truncated.
11392 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
11394 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
11397 2011-07-22 Eli Zaretskii <eliz@gnu.org>
11399 Fix a significant slow-down of cursor motion with C-n, C-p,
11400 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
11401 auto-repeat under bidi redisplay in fontified buffers.
11402 * xdisp.c (compute_stop_pos_backwards): New function.
11403 (next_element_from_buffer): Call compute_stop_pos_backwards to
11404 find a suitable prev_stop when we find ourselves before
11406 (reseat): Don't look for prev_stop, as that could mean a very long
11408 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
11409 <cached_disp_overlay_modiff>: Cache for last found display string
11411 (compute_display_string_pos): Return the cached position if asked
11412 about the same buffer in the same area of character positions, and
11413 the buffer wasn't changed since the time the display string
11414 position was cached.
11416 2011-07-22 Eli Zaretskii <eliz@gnu.org>
11418 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
11419 is an integer, which is important for empty lines. (Bug#9149)
11421 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
11423 * frame.c (Fmodify_frame_parameters): In tty case, update the
11424 default face if necessary (Bug#4238).
11426 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
11428 * editfns.c (Fstring_to_char): No need to explain what a character
11429 is in the docstring (Bug#6576).
11431 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
11433 * xml.c (parse_region): Make sure we always return a tree.
11435 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
11437 * xml.c (parse_region): If a document contains only comments,
11440 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
11442 * xml.c (make_dom): Return comments, too.
11444 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
11447 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
11448 and the surrounding thread.
11449 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
11450 rather than fgets, and retry after EINTR. Otherwise, 'emacs
11451 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
11453 * s/openbsd.h (BROKEN_SIGIO): Define.
11454 * unexelf.c (unexec) [__OpenBSD__]:
11455 Don't update the .mdebug section of the Alpha COFF symbol table.
11457 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11459 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
11462 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
11464 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
11465 This fixes some race conditions on the permissions of any newly
11468 * alloc.c (valid_pointer_p): Use pipe, not open.
11469 This fixes some permissions issues when debugging.
11471 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
11472 If fchown fails to set both uid and gid, try to set just gid,
11473 as that is sometimes allowed. Adjust the file's mode to eliminate
11474 setuid or setgid bits that are inappropriate if fchown fails.
11476 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
11478 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
11479 to compare Lisp_Objects.
11480 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
11481 global_gnutls_log_level, don't mistake it for a Lisp_Object.
11482 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
11484 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
11486 * lread.c (read_integer): Unread even EOF character.
11487 (read1): Likewise. Properly record start position of symbol.
11489 * lread.c (read1): Read `#:' as empty uninterned symbol if no
11490 symbol character follows.
11492 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
11494 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
11495 This works around a problem with the previous change to Fcopy_file.
11496 Recent glibc declares fchown with __attribute__((warn_unused_result)),
11497 and without this change, GCC might complain about discarding
11498 fchown's return value.
11500 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
11502 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
11504 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
11506 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
11508 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
11510 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
11511 it's used from the C level.
11513 * process.c: Use the same condition for POLL_FOR_INPUT in both
11514 keyboard.c and process.c (bug#1858).
11516 2011-07-09 Lawrence Mitchell <wence@gmx.li>
11518 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
11519 (Fgnutls_boot): Use it.
11521 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
11523 * doc.c (Fsubstitute_command_keys): Revert last change.
11525 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
11527 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
11528 quotes the next character, and doesn't affect other longer
11529 sequences (bug#8935).
11531 * lread.c (syms_of_lread): Clarify that is isn't only
11532 `eval-buffer' and `eval-defun' that's affected by
11533 `lexical-binding' (bug#8460).
11535 2011-07-15 Eli Zaretskii <eliz@gnu.org>
11537 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
11538 bidi redisplay when a line includes both an image and is truncated.
11540 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
11542 Fix minor problems found by static checking.
11543 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
11544 (elsz): Now a signed constant, not a size_t var. We prefer signed
11545 types to unsigned, to avoid integer comparison confusion. Without
11546 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
11547 "cannot optimize loop, the loop counter may overflow", a symptom
11549 * indent.c (Fvertical_motion): Mark locals as initialized.
11550 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
11552 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
11554 * search.c (Fre_search_backward): Mention `case-fold-search' in
11555 all the re_search_* functions (bug#8138).
11557 * keyboard.c (Fopen_dribble_file): Document when the file is
11560 2011-07-14 Eli Zaretskii <eliz@gnu.org>
11562 * bidi.c (bidi_dump_cached_states): Fix format of displaying
11565 Support bidi reordering of display and overlay strings.
11566 * xdisp.c (compute_display_string_pos)
11567 (compute_display_string_end): Accept additional argument STRING.
11568 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
11569 (reseat_to_string): Initialize bidi_it->string.s and
11570 bidi_it->string.schars.
11571 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
11572 NULL (avoids a crash in bidi_paragraph_init).
11573 Initialize itb.string.lstring.
11574 (init_iterator): Call bidi_init_it only of a valid
11575 buffer position was specified. Initialize paragraph_embedding to
11577 (reseat_to_string): Initialize the bidi iterator.
11578 (display_string): If we need to ignore text properties of
11579 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
11580 original value of -1 will not work with bidi.)
11581 (compute_display_string_pos): First arg is now struct
11582 `text_pos *'; all callers changed. Support display properties on
11584 (compute_display_string_end): Support display properties on Lisp
11586 (init_iterator, reseat_1, reseat_to_string): Initialize the
11587 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
11588 when iterating on a string not from display properties).
11589 (compute_display_string_pos, compute_display_string_end):
11590 Fix calculation of the object to scan. Fixes an error when using
11592 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
11593 base_level_stop; instead, set base_level_stop to BEGV.
11594 Fixes crashes in vertical-motion.
11595 (next_element_from_buffer): Improve commentary for when
11596 the iterator is before prev_stop.
11597 (init_iterator): Initialize bidi_p from the default value of
11598 bidi-display-reordering, not from buffer-local value. Use the
11599 buffer-local value only if initializing for buffer iteration.
11600 (handle_invisible_prop): Support invisible properties on strings
11601 that are being bidi-reordered.
11602 (set_iterator_to_next): Support bidi reordering of C strings and
11604 (next_element_from_string): Support bidi reordering of Lisp
11606 (handle_stop_backwards): Support Lisp strings as well.
11607 (display_string): Support display of R2L glyph rows.
11608 Use IT_STRING_CHARPOS when displaying from a Lisp string.
11609 (init_iterator): Don't initialize it->bidi_p for strings
11611 (reseat_to_string): Initialize it->bidi_p for strings here.
11612 (next_element_from_string, next_element_from_c_string)
11613 (next_element_from_buffer): Add xassert's for correspondence
11614 between IT's object being iterated and it->bidi_it.string
11616 (face_before_or_after_it_pos): Support bidi iteration.
11617 (next_element_from_c_string): Handle the case of the first string
11618 character that is not the first one in the visual order.
11619 (get_visually_first_element): New function, refactored from common
11620 parts of next_element_from_buffer, next_element_from_string, and
11621 next_element_from_c_string.
11622 (tool_bar_lines_needed, redisplay_tool_bar)
11623 (display_menu_bar): Force left-to-right direction. Add a FIXME
11624 comment for making that be controlled by a user option.
11625 (push_it, pop_it): Save and restore the state of the
11626 bidi iterator. Save and restore the bidi_p flag.
11627 (pop_it): Iterate out of display property for string iteration as
11629 (iterate_out_of_display_property): Support iteration over strings.
11630 (handle_single_display_spec): Set up it->bidi_it for iteration
11631 over a display string, and call bidi_init_it.
11632 (handle_single_display_spec, next_overlay_string)
11633 (get_overlay_strings_1, push_display_prop): Set up the bidi
11634 iterator for displaying display or overlay strings.
11635 (forward_to_next_line_start): Don't use the shortcut if
11637 (back_to_previous_visible_line_start): If handle_display_prop
11638 pushed the iterator stack, restore the internal state of the bidi
11639 iterator by calling bidi_pop_it same number of times.
11640 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
11641 and we are bidi-iterating, don't decrement the iterator position;
11642 instead, set the first_elt flag in the bidi iterator, to produce
11644 (reseat_1): Remove redundant setting of string_from_display_prop_p.
11645 (push_display_prop): xassert that we are iterating a buffer.
11646 (push_it, pop_it): Save and restore paragraph_embedding member.
11647 (handle_single_display_spec, next_overlay_string)
11648 (get_overlay_strings_1, reseat_1, reseat_to_string)
11649 (push_display_prop): Set up the `unibyte' member of bidi_it.string
11650 correctly. Don't assume unibyte strings are not bidi-reordered.
11651 (compute_display_string_pos)
11652 (compute_display_string_end): Fix handling the case of C string.
11653 (push_it, pop_it): Save and restore from_disp_prop_p.
11654 (handle_single_display_spec, push_display_prop): Set the
11655 from_disp_prop_p flag.
11656 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
11657 (pop_it): Call iterate_out_of_display_property only if we are
11658 popping after iteration over a string that came from a display
11659 property. Fix a typo in popping stretch info. Add an assertion
11660 for verifying that the iterator position is in sync with the bidi
11662 (handle_single_display_spec, get_overlay_strings_1)
11663 (push_display_prop): Fix initialization of paragraph direction for
11664 string when that of the parent object is not yet determined.
11665 (reseat_1): Call bidi_init_it to resync the bidi
11666 iterator with IT's position. (Bug#7616)
11667 (find_row_edges): If ROW->start.pos gives position
11668 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
11669 (handle_stop, back_to_previous_visible_line_start, reseat_1):
11670 Reset the from_disp_prop_p flag.
11671 (SAVE_IT, RESTORE_IT): New macros.
11672 (pos_visible_p, face_before_or_after_it_pos)
11673 (back_to_previous_visible_line_start)
11674 (move_it_in_display_line_to, move_it_in_display_line)
11675 (move_it_to, move_it_vertically_backward, move_it_by_lines)
11676 (try_scrolling, redisplay_window, display_line): Use them when
11677 saving a temporary copy of the iterator and restoring it back.
11678 (back_to_previous_visible_line_start, reseat_1)
11679 (init_iterator): Empty the bidi cache "stack".
11680 (move_it_in_display_line_to): If iterator ended up at
11681 EOL, but we never saw any buffer positions smaller than
11682 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
11683 motion in bidi-reordered lines.
11684 (move_it_in_display_line_to): Record prev_method and prev_pos
11685 immediately before the call to set_iterator_to_next. Fixes cursor
11686 motion in bidi-reordered lines with stretch glyphs and strings
11687 displayed in margins. (Bug#8133) (Bug#8867)
11688 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
11690 (pos_visible_p): Support positions in bidi-reordered lines.
11691 Save and restore bidi cache.
11693 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
11694 (bidi_paragraph_info): Delete unused struct.
11695 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
11696 (bidi_cache_start): New variable.
11697 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
11699 (bidi_cache_fetch_state, bidi_cache_search)
11700 (bidi_cache_find_level_change, bidi_cache_iterator_state)
11701 (bidi_cache_find, bidi_peek_at_next_level)
11702 (bidi_level_of_next_char, bidi_find_other_level_edge)
11703 (bidi_move_to_visually_next): Compare cache index with
11704 bidi_cache_start rather than with zero.
11705 (bidi_fetch_char): Accept new argument STRING; all callers
11706 changed. Support iteration over a string. Support strings with
11707 display properties. Support unibyte strings. Fix the type of
11708 `len' according to what STRING_CHAR_AND_LENGTH expects.
11709 (bidi_paragraph_init, bidi_resolve_explicit_1)
11710 (bidi_resolve_explicit, bidi_resolve_weak)
11711 (bidi_level_of_next_char, bidi_move_to_visually_next):
11712 Support iteration over a string.
11713 (bidi_set_sor_type, bidi_resolve_explicit_1)
11714 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
11715 can now be zero (for strings); special values 0 and -1 were
11716 changed to -1 and -2, respectively.
11717 (bidi_char_at_pos): New function.
11718 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
11719 Call it instead of FETCH_MULTIBYTE_CHAR.
11720 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
11721 initialized to valid values.
11722 (bidi_init_it): Don't initialize charpos and bytepos with invalid
11724 (bidi_level_of_next_char): Allow the sentinel "position" to pass
11725 the test for valid cached positions. Fix the logic for looking up
11726 the sentinel state in the cache. GCPRO the Lisp string we are
11728 (bidi_push_it, bidi_pop_it): New functions.
11729 (bidi_initialize): Initialize the bidi cache start stack pointer.
11730 (bidi_cache_ensure_space): New function, refactored from part of
11731 bidi_cache_iterator_state. Don't assume the required size is just
11732 one BIDI_CACHE_CHUNK away.
11733 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
11734 (bidi_count_bytes, bidi_char_at_pos): New functions.
11735 (bidi_cache_search): Don't assume bidi_cache_last_idx is
11736 always valid if bidi_cache_idx is valid.
11737 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
11738 is valid if it's going to be used.
11739 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
11740 (bidi_cache_fetch_state, bidi_cache_search)
11741 (bidi_cache_find_level_change, bidi_cache_ensure_space)
11742 (bidi_cache_iterator_state, bidi_cache_find)
11743 (bidi_find_other_level_edge, bidi_cache_start_stack):
11744 All variables related to cache indices are now EMACS_INT.
11746 * dispextern.h (struct bidi_string_data): New structure.
11747 (struct bidi_it): New member `string'. Make flag members be 1-bit
11748 fields, and put them last in the struct.
11749 (compute_display_string_pos, compute_display_string_end):
11751 (bidi_push_it, bidi_pop_it): Add prototypes.
11752 (struct iterator_stack_entry): New members bidi_p,
11753 paragraph_embedding, and from_disp_prop_p.
11754 (struct it): Member bidi_p is now a bit field 1 bit wide.
11755 (bidi_shelve_cache, bidi_unshelve_cache):
11756 Declare prototypes.
11758 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
11759 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
11760 and vector-like objects.
11762 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
11763 cache around display iteration.
11765 * window.c (Fwindow_end, window_scroll_pixel_based)
11766 (displayed_window_lines, Frecenter): Save and restore the bidi
11767 cache around display iteration.
11769 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
11771 * editfns.c (Fdelete_region): Clarify the use of the named
11772 parameters (bug#6788).
11774 2011-07-14 Martin Rudalics <rudalics@gmx.at>
11776 * indent.c (Fvertical_motion): Set and restore w->pointm when
11777 saving and restoring the window's buffer (Bug#9006).
11779 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
11781 * editfns.c (Fstring_to_char): Clarify just what is returned
11782 (bug#6576). Text by Eli Zaretskii.
11784 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
11786 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
11788 2011-07-13 Eli Zaretskii <eliz@gnu.org>
11790 * buffer.c (mmap_find): Fix a typo.
11792 2011-07-13 Johan Bockgård <bojohan@gnu.org>
11794 Fix execution of x selection hooks.
11795 * xselect.c (Qx_lost_selection_functions)
11796 (Qx_sent_selection_functions): New vars.
11797 (syms_of_xselect): DEFSYM them.
11798 (x_handle_selection_request): Pass Qx_sent_selection_functions
11799 rather than Vx_sent_selection_functions to Frun_hook_with_args.
11800 (x_handle_selection_clear,x_clear_frame_selections):
11801 Pass Qx_lost_selection_functions rather than
11802 Vx_lost_selection_functions to Frun_hook_with_args.
11804 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
11806 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
11807 The old code sometimes used this field without initializing it.
11809 * alloc.c (gc_sweep): Don't read past end of array.
11810 In theory, the old code could also have corrupted Emacs internals,
11811 though it'd be very unlikely.
11813 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
11815 * character.c (Fcharacterp): Don't advertise optional ignored
11816 argument. (Bug#4026)
11818 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
11820 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
11823 * window.c (Fset_window_start): Doc fix (bug#4199).
11824 (Fset_window_hscroll): Ditto.
11826 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
11828 Fix minor new problems caught by GCC 4.6.1.
11829 * term.c (init_tty): Remove unused local.
11830 * xsettings.c (store_monospaced_changed): Define this function only
11831 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
11832 not used otherwise.
11834 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
11836 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
11838 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
11840 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
11841 are the mini-buffer and the echo area (bug#3320).
11843 * term.c (init_tty): Remove support for supdup, c10 and perq
11844 terminals, which are no longer supported (bug#1482).
11846 2011-07-10 Johan Bockgård <bojohan@gnu.org>
11848 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
11850 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
11852 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
11853 for non-popups (Bug#3642).
11855 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
11857 * alloc.c (reset_malloc_hooks): Protoize.
11858 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
11859 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
11860 * cm.c (losecursor): Likewise.
11861 * data.c (fmod): Likewise.
11862 * dispnew.c (swap_glyphs_in_rows): Likewise.
11863 * emacs.c (memory_warning_signal): Likewise.
11864 * floatfns.c (float_error): Likewise.
11865 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
11866 (otf_open, font_otf_capability, generate_otf_features)
11867 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
11869 * image.c (pbm_read_file): Likewise.
11870 * indent.c (string_display_width): Likewise.
11871 * intervals.c (check_for_interval, search_for_interval)
11872 (inc_interval_count, count_intervals, root_interval)
11873 (adjust_intervals_for_insertion, make_new_interval): Likewise.
11874 * lread.c (defalias): Likewise.
11875 * ralloc.c (r_alloc_check): Likewise.
11876 * regex.c (set_image_of_range_1, set_image_of_range)
11877 (regex_grow_registers): Likewise.
11878 * sysdep.c (strerror): Likewise.
11879 * termcap.c (valid_filename_p, tprint, main): Likewise.
11880 * tparam.c (main): Likewise.
11881 * unexhp9k800.c (run_time_remap, save_data_space)
11882 (update_file_ptrs, read_header, write_header, calculate_checksum)
11883 (copy_file, copy_rest, display_header): Likewise.
11884 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
11886 * xdisp.c (check_it): Likewise.
11887 * xfaces.c (register_color, unregister_color, unregister_colors):
11889 * xfns.c (print_fontset_result): Likewise.
11890 * xrdb.c (member, fatal, main): Likewise.
11892 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
11894 Fix minor problems found by static checking (Bug#9031).
11895 * chartab.c (char_table_set_range, map_sub_char_table):
11896 Remove unused locals.
11897 (uniprop_table): Now static.
11898 * composite.c (_work_char): Remove unused static var.
11900 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
11902 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
11904 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
11906 * gtkutil.c (qttip_cb): Remove code without function.
11908 2011-07-09 Eli Zaretskii <eliz@gnu.org>
11910 * w32.c (pthread_sigmask): New stub.
11912 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
11914 Use pthread_sigmask, not sigprocmask (Bug#9010).
11915 sigprocmask is portable only for single-threaded applications, and
11916 Emacs can be multi-threaded when it uses GTK.
11917 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
11919 * callproc.c (Fcall_process):
11920 * process.c (create_process):
11921 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
11922 Use pthread_sigmask, not sigprocmask.
11924 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
11926 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
11927 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
11930 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
11932 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
11933 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
11934 (xg_hide_tooltip): Fix comment.
11936 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
11937 in registerServicesMenuSendTypes.
11938 (validRequestorForSendType): Don't check ns_return_types.
11940 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
11943 2011-07-08 Jason Rumney <jasonr@gnu.org>
11945 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
11946 SH_SHOW for hidden windows (Bug#5482).
11948 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
11949 frame struct members of non-existent frames (Bug#6284).
11951 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
11953 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
11954 variable firstTime not needed on OSX >= 10.6.
11955 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
11956 >= 10.5. Use setKnobProportion, setDoubleValue.
11958 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
11959 (MAC_OS_X_VERSION_10_5): Define if not defined.
11960 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
11961 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
11962 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
11964 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
11965 cString and lossyCString on OSX >= 10.4.
11967 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
11968 sizeToFit on OSX >= 10.2.
11970 * nsimage.m (allocInitFromFile): Don't use deprecated method
11971 bestRepresentationForDevice on OSX >= 10.6.
11973 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
11976 * emacs.c: Declare unexec_init_emacs_zone.
11978 * nsgui.h: Fix compiler warning about gnulib redefining verify.
11980 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
11982 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
11983 on svcsMenu (Bug#8842).
11985 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
11987 (Fns_list_services): Just return Qnil on 10.6, code not working there.
11989 * nsterm.m (QUTF8_STRING): Declare.
11990 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
11991 (validRequestorForSendType): Return type is (id).
11992 Change indexOfObjectIdenticalTo to indexOfObject.
11993 Check if we have local selection before returning self (Bug#8842).
11994 (writeSelectionToPasteboard): Put local selection into paste board
11995 if we have a local selection (Bug#8842).
11996 (syms_of_nsterm): DEFSYM QUTF8_STRING.
11998 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
11999 (ns_get_local_selection): Declare.
12001 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
12003 * keymap.c (describe_map_tree): Don't insert a double newline at
12004 the end of the buffer (bug#1169) and return whether we inserted
12007 * callint.c (Fcall_interactively): Change "reading args" to
12008 "providing args" to try to clarify what it does (bug#1010).
12010 2011-07-07 Kenichi Handa <handa@m17n.org>
12012 * composite.c (composition_compute_stop_pos): Ignore a static
12013 composition starting before CHARPOS (Bug#8915).
12015 * xdisp.c (handle_composition_prop): Likewise.
12017 2011-07-07 Eli Zaretskii <eliz@gnu.org>
12019 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
12022 2011-07-07 Kenichi Handa <handa@m17n.org>
12024 * character.h (unicode_category_t): New enum type.
12026 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
12027 (Qchar_code_property_table): New variable.
12028 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
12029 (UNIPROP_COMPRESSED_FORM_P): New macros.
12030 (char_table_ascii): Uncompress the compressed values.
12031 (sub_char_table_ref): New arg is_uniprop. Callers changed.
12032 Uncompress the compressed values.
12033 (sub_char_table_ref_and_range): Likewise.
12034 (char_table_ref_and_range): Uncompress the compressed values.
12035 (sub_char_table_set): New arg is_uniprop. Callers changed.
12036 Uncompress the compressed values.
12037 (sub_char_table_set_range): Args changed. Callers changed.
12038 (char_table_set_range): Adjuted for the above change.
12039 (map_sub_char_table): Delete args default_val and parent. Add arg
12040 top. Give decoded values to a Lisp function.
12041 (map_char_table): Adjust for the above change. Give decoded
12042 values to a Lisp function. Gcpro more variables.
12043 (uniprop_table_uncompress)
12044 (uniprop_decode_value_run_length): New functions.
12045 (uniprop_decoder, uniprop_decoder_count): New variables.
12046 (uniprop_get_decoder, uniprop_encode_value_character)
12047 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
12049 (uniprop_encoder, uniprop_encoder_count): New variables.
12050 (uniprop_get_encoder, uniprop_table)
12051 (Funicode_property_table_internal, Fget_unicode_property_internal)
12052 (Fput_unicode_property_internal): New functions.
12053 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
12054 Sunicode_property_table_internal, Sget_unicode_property_internal,
12055 and Sput_unicode_property_internal. Defvar_lisp
12056 char-code-property-alist.
12058 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
12059 Vunicode_category_table.
12061 * font.c (font_range): Adjust for the change of
12062 Vunicode_category_table.
12064 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
12066 * m/iris4d.h: Remove file, move contents ...
12067 * s/irix6-5.h: ... here.
12069 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
12071 Remove unportable assumption about struct layout (Bug#8884).
12072 * alloc.c (mark_buffer):
12073 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
12074 (clone_per_buffer_values): Don't assume that
12075 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
12076 This isn't true in general, and it's particularly not true
12077 if Emacs is configured with --with-wide-int.
12078 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
12079 New macros, used in the buffer.c change.
12081 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
12083 * xsettings.c: Use both GConf and GSettings if both are available.
12084 (store_config_changed_event): Add comment.
12085 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
12086 (store_tool_bar_style_changed): New functions.
12087 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
12088 (struct xsettings): Move font inside HAVE_XFT.
12089 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
12090 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
12091 Move inside HAVE_XFT.
12092 (something_changed_gsettingsCB): Rename from something_changedCB.
12093 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
12095 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
12096 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
12097 (something_changed_gconfCB): Rename from something_changedCB.
12098 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
12099 (parse_settings): Move check for font inside HAVE_XFT.
12100 (read_settings, apply_xft_settings): Add comment.
12101 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
12102 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
12103 call store_font_name_changed.
12104 (xft_settings_event): Add comment.
12105 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
12106 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
12107 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
12108 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
12109 (xsettings_initialize): Call init_gsettings last.
12110 (xsettings_get_system_font, xsettings_get_system_normal_font):
12113 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
12115 Random fixes. E.g., (random) never returned negative values.
12116 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
12117 subseconds part to the entropy, as that's a bit more random.
12118 Prefer signed to unsigned, since the signedness doesn't matter and
12119 in general we prefer signed. When given a limit, use a
12120 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
12121 latter isn't right if USE_2_TAGS_FOR_INTS.
12122 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
12123 not 0..VALMASK. Don't discard "excess" bits that random () returns.
12125 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
12127 * textprop.c (text_property_stickiness):
12128 Obey Vtext_property_default_nonsticky.
12129 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
12130 * w32fns.c (syms_of_w32fns):
12131 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
12133 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
12135 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
12136 This is more efficient than Ffile_directory_p and avoids a minor race.
12138 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
12140 * buffer.c (Foverlay_put): Say what the return value is
12143 * fileio.c (barf_or_query_if_file_exists): Check first if the file
12144 is a directory before asking whether to use the file name
12146 (barf_or_query_if_file_exists): Make the "File is a directory"
12147 error be more correct.
12149 * fns.c (Frequire): Remove the mention of the .gz files, since
12150 that's installation-specific, but keep the mention of
12151 `get-load-suffixes'.
12153 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
12155 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
12156 Report string overflow if the output is too long.
12158 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
12160 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
12161 (syms_of_gnutls): Remove duplicate DEFSYM for
12162 Qgnutls_bootprop_verify_hostname_error, an error for
12163 Qgnutls_bootprop_verify_error (which is no longer used).
12165 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
12166 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
12167 Also (re)move comments that are misplaced or no longer relevant.
12169 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
12171 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
12173 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
12175 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
12176 and background color parameters if they have been changed.
12178 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
12180 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
12182 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
12184 * xsettings.c (SYSTEM_FONT): Define only when used.
12185 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
12187 * keymap.c (access_keymap_1): Now static.
12189 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
12191 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
12192 leave any prefix arg for the up event (Bug#1586).
12194 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
12196 * lread.c (syms_of_lread): Mention single symbols defined by
12197 `defvar' or `defconst' (bug#7154).
12199 * fns.c (Frequire): Mention .el.gz files (bug#7314).
12200 (Frequire): Mention get-load-suffixes.
12202 2011-07-02 Martin Rudalics <rudalics@gmx.at>
12204 * window.h (window): Remove clone_number slot.
12205 * window.c (Fwindow_clone_number, Fset_window_clone_number):
12207 (make_parent_window, make_window, saved_window)
12208 (Fset_window_configuration, save_window_save): Don't deal with
12210 * buffer.c (Qclone_number): Remove declaration.
12211 (sort_overlays, overlay_strings): Don't deal with clone numbers.
12213 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
12215 Add multiple inheritance to keymaps.
12216 * keymap.c (Fmake_composed_keymap): New function.
12217 (Fset_keymap_parent): Simplify.
12218 (fix_submap_inheritance): Remove.
12219 (access_keymap_1): New function extracted from access_keymap to handle
12220 embedded parents and handle lists of maps.
12221 (access_keymap): Use it.
12222 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
12223 (Fcopy_keymap): Handle embedded parents.
12224 (Fcommand_remapping, define_as_prefix): Simplify.
12225 (Fkey_binding): Simplify.
12226 (syms_of_keymap): Move minibuffer-local-completion-map,
12227 minibuffer-local-filename-completion-map,
12228 minibuffer-local-must-match-map, and
12229 minibuffer-local-filename-must-match-map to Elisp.
12230 (syms_of_keymap): Defsubr make-composed-keymap.
12231 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
12232 (parse_menu_item): Trivial simplification.
12234 2011-07-01 Glenn Morris <rgm@gnu.org>
12236 * Makefile.in (SETTINGS_LIBS): Fix typo.
12238 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
12240 * coding.c (Fencode_coding_string): Record the last coding system
12241 used, as the function doc string says (bug#8738).
12243 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
12245 * xsettings.c (store_monospaced_changed): Take new font as arg and
12246 check for change against current_mono_font.
12247 (EMACS_TYPE_SETTINGS): Remove this and related defines.
12248 (emacs_settings_constructor, emacs_settings_get_property)
12249 (emacs_settings_set_property, emacs_settings_class_init)
12250 (emacs_settings_init, gsettings_obj): Remove.
12251 (something_changedCB): New function for HAVE_GSETTINGS.
12252 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
12253 with value as argument.
12254 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
12255 g_settings_new (Bug#8967). Do not create gsettings_obj.
12256 Remove calls to g_settings_bind. Connect something_changedCB to
12259 * xgselect.c: Add defined (HAVE_GSETTINGS).
12260 (xgselect_initialize): Ditto.
12262 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
12263 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
12266 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
12268 * eval.c (struct backtrace): Simplify and port the data structure.
12269 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
12270 signed bit field, as this assumption is not portable and it makes
12271 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
12272 "char debug_on_exit : 1" as this is not portable either; instead,
12273 use the portable "unsigned int debug_on_exit : 1". Remove unused
12274 member evalargs. Remove obsolete comments about cc bombing out.
12276 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
12278 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
12279 Let HAVE_GSETTINGS override HAVE_GCONF.
12280 (store_monospaced_changed): New function.
12281 (EMACS_SETTINGS): A new type derived from GObject to handle
12282 GSettings notifications.
12283 (emacs_settings_constructor, emacs_settings_get_property)
12284 (emacs_settings_set_property, emacs_settings_class_init):
12286 (gsettings_client, gsettings_obj): New variables.
12287 (GSETTINGS_SCHEMA): New define.
12288 (something_changedCB): Call store_monospaced_changed.
12289 (init_gsettings): New function.
12290 (xsettings_initialize): Call init_gsettings.
12291 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
12294 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
12297 2011-06-29 Martin Rudalics <rudalics@gmx.at>
12299 * window.c (resize_root_window, grow_mini_window)
12300 (shrink_mini_window): Rename Qresize_root_window to
12301 Qwindow_resize_root_window and Qresize_root_window_vertically to
12302 Qwindow_resize_root_window_vertically.
12304 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
12306 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
12308 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
12310 * makefile.w32-in: Redesign dependencies so they reflect more
12311 clearly which files are directly included by each source file,
12312 and not through other includes.
12314 2011-06-27 Martin Rudalics <rudalics@gmx.at>
12316 * buffer.c (Qclone_number): Declare static and DEFSYM it.
12317 (sort_overlays, overlay_strings): When an overlay's clone number
12318 matches the window's clone number process the overlay even if
12319 the overlay's window property doesn't match the current window.
12321 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
12322 (Fwindow_hchild): Rename to Fwindow_left_child.
12323 (Fwindow_next): Rename to Fwindow_next_sibling.
12324 (Fwindow_prev): Rename to Fwindow_prev_sibling.
12325 (resize_window_check): Rename to window_resize_check.
12326 (resize_window_apply): Rename to window_resize_apply.
12327 (Fresize_window_apply): Rename to Fwindow_resize_apply.
12328 (Fdelete_other_windows_internal, resize_frame_windows)
12329 (Fsplit_window_internal, Fdelete_window_internal)
12330 (grow_mini_window, shrink_mini_window)
12331 (Fresize_mini_window_internal): Fix callers accordingly.
12333 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
12335 * emacsgtkfixed.h: State that this is only used with Gtk+3.
12336 (emacs_fixed_set_min_size): Remove.
12337 (emacs_fixed_new): Take frame as argument.
12339 * emacsgtkfixed.c: State that this is only used with Gtk+3.
12340 (_EmacsFixedPrivate): Remove minwidth/height.
12341 Add struct frame *f.
12342 (emacs_fixed_init): Initialize priv->f.
12343 (get_parent_class, emacs_fixed_set_min_size): Remove.
12344 (emacs_fixed_new): Set priv->f to argument.
12345 (emacs_fixed_get_preferred_width)
12346 (emacs_fixed_get_preferred_height): Use min_width/height from
12347 frames size_hint to set minimum and natural (Bug#8919).
12348 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
12349 and use min_width/height from frames size_hint to set
12350 min_width/height (Bug#8919).
12352 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
12353 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
12356 2011-06-26 Eli Zaretskii <eliz@gnu.org>
12358 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
12359 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
12362 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
12364 * process.c (wait_reading_process_output): Bypass select if
12365 waiting for a cell while ignoring keyboard input, and input is
12366 pending. Suggested by Jan Djärv (Bug#8869).
12368 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
12370 Use gnulib's dup2 module instead of rolling our own.
12371 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
12373 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12375 * dispnew.c (scrolling_window): Before scrolling, turn off a
12376 mouse-highlight in the window being scrolled.
12378 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
12380 Move DEFSYM to lisp.h and use everywhere.
12382 * character.h (DEFSYM): Move declaration...
12383 * lisp.h (DEFSYM): ...here.
12389 * w32select.c: Don't include character.h.
12391 * alloc.c (syms_of_alloc):
12392 * buffer.c (syms_of_buffer):
12393 * bytecode.c (syms_of_bytecode):
12394 * callint.c (syms_of_callint):
12395 * casefiddle.c (syms_of_casefiddle):
12396 * casetab.c (init_casetab_once):
12397 * category.c (init_category_once, syms_of_category):
12398 * ccl.c (syms_of_ccl):
12399 * cmds.c (syms_of_cmds):
12400 * composite.c (syms_of_composite):
12401 * dbusbind.c (syms_of_dbusbind):
12402 * dired.c (syms_of_dired):
12403 * dispnew.c (syms_of_display):
12404 * doc.c (syms_of_doc):
12405 * editfns.c (syms_of_editfns):
12406 * emacs.c (syms_of_emacs):
12407 * eval.c (syms_of_eval):
12408 * fileio.c (syms_of_fileio):
12409 * fns.c (syms_of_fns):
12410 * frame.c (syms_of_frame):
12411 * fringe.c (syms_of_fringe):
12412 * insdel.c (syms_of_insdel):
12413 * keymap.c (syms_of_keymap):
12414 * lread.c (init_obarray, syms_of_lread):
12415 * macros.c (syms_of_macros):
12416 * msdos.c (syms_of_msdos):
12417 * print.c (syms_of_print):
12418 * process.c (syms_of_process):
12419 * search.c (syms_of_search):
12420 * sound.c (syms_of_sound):
12421 * syntax.c (init_syntax_once, syms_of_syntax):
12422 * terminal.c (syms_of_terminal):
12423 * textprop.c (syms_of_textprop):
12424 * undo.c (syms_of_undo):
12425 * w32.c (globals_of_w32):
12426 * window.c (syms_of_window):
12427 * xdisp.c (syms_of_xdisp):
12428 * xfaces.c (syms_of_xfaces):
12429 * xfns.c (syms_of_xfns):
12430 * xmenu.c (syms_of_xmenu):
12431 * xsettings.c (syms_of_xsettings):
12432 * xterm.c (syms_of_xterm): Use DEFSYM.
12434 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
12436 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
12438 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
12440 Integer and buffer overflow fixes (Bug#8873).
12442 * print.c (printchar, strout): Check for string overflow.
12443 (PRINTPREPARE, printchar, strout):
12444 Don't set size unless allocation succeeds.
12446 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
12447 for sizes. Check for string overflow more accurately.
12448 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
12450 * macros.c: Integer and buffer overflow fixes.
12451 * keyboard.h (struct keyboard.kbd_macro_bufsize):
12452 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
12453 Use ptrdiff_t, not int, for sizes.
12454 Don't increment bufsize until after realloc succeeds.
12455 Check for size-calculation overflow.
12456 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
12458 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
12460 * lread.c: Integer overflow fixes.
12461 (read_integer): Radix is now EMACS_INT, not int,
12462 to improve quality of diagnostics for out-of-range radices.
12463 Calculate buffer size correctly for out-of-range radices.
12464 (read1): Check for integer overflow in radices, and in
12465 read-circle numbers.
12466 (read_escape): Avoid int overflow.
12467 (Fload, openp, read_buffer_size, read1)
12468 (substitute_object_recurse, read_vector, read_list, map_obarray):
12469 Use ptrdiff_t, not int, for sizes.
12470 (read1): Use EMACS_INT, not int, for sizes.
12471 Check for size overflow.
12473 * image.c (cache_image): Check for size arithmetic overflow.
12475 * lread.c: Integer overflow issues.
12476 (saved_doc_string_size, saved_doc_string_length)
12477 (prev_saved_doc_string_size, prev_saved_doc_string_length):
12478 Now ptrdiff_t, not int.
12479 (read1): Don't assume doc string length fits in int. Check for
12480 out-of-range doc string lengths.
12481 (read_list): Don't assume file position fits in int.
12482 (read_escape): Check for hex character overflow.
12484 2011-06-22 Leo Liu <sdl.web@gmail.com>
12486 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
12487 Move to minibuffer.el.
12489 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
12491 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
12492 The following patches are for when GLYPH_DEBUG && !XASSERT.
12493 * dispextern.h (trace_redisplay_p, dump_glyph_string):
12494 * dispnew.c (flush_stdout):
12495 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
12496 Mark as externally visible.
12497 * dispnew.c (check_window_matrix_pointers): Now static.
12498 * dispnew.c (window_to_frame_vpos):
12499 * xfns.c (unwind_create_frame):
12500 * xterm.c (x_check_font): Remove unused local.
12501 * scroll.c (CHECK_BOUNDS):
12502 * xfaces.c (cache_fache): Rename local to avoid shadowing.
12503 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
12504 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
12505 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
12506 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
12508 (debug_method_add): Use va_list and vsprintf rather than relying
12509 on undefined behavior with wrong number of arguments.
12510 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
12511 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
12512 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
12513 since we're not interested in debugging glyphs with old libraries.
12514 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
12515 GCC 4.6.0's static checking.
12517 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
12519 Integer overflow and signedness fixes (Bug#8873).
12520 A few related buffer overrun fixes, too.
12522 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
12524 * dispextern.h (struct face.stipple):
12525 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
12526 (x_bitmap_mask, x_allocate_bitmap_record)
12527 (x_create_bitmap_from_data, x_create_bitmap_from_file)
12528 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
12529 (x_create_bitmap_from_xpm_data):
12530 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
12531 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
12533 * xfaces.c (load_pixmap):
12534 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
12535 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
12536 (.bitmaps_last, struct x_output.icon_bitmap):
12537 Use ptrdiff_t, not int, for bitmap indexes.
12538 (x_allocate_bitmap_record): Check for size overflow.
12539 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
12541 Use ptrdiff_t, not int, for overlay counts.
12542 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
12543 * editfns.c (overlays_around, get_pos_property):
12544 * textprop.c (get_char_property_and_overlay):
12545 * xdisp.c (next_overlay_change, note_mouse_highlight):
12546 * xfaces.c (face_at_buffer_position):
12547 * buffer.c (OVERLAY_COUNT_MAX): New macro.
12548 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
12549 (Fnext_overlay_change, Fprevious_overlay_change)
12550 (mouse_face_overlay_overlaps, Foverlays_in):
12551 Use ptrdiff_t, not int, for sizes.
12552 (overlays_at, overlays_in): Check for size-calculation overflow.
12554 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
12556 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
12557 (x_session_initialize): Do not assume string length fits in int.
12559 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
12560 This is unlikely, but can occur if DPI is outlandish.
12562 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
12563 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
12565 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
12566 * xrdb.c (magic_file_p, search_magic_path):
12567 Omit last arg SUFFIX; it was always 0. All callers changed.
12568 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
12570 * xfont.c (xfont_match): Avoid need for strlen.
12572 * xfns.c: Don't assume strlen fits in int.
12573 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
12575 * xdisp.c (message_log_check_duplicate): Return intmax_t,
12576 not unsigned long, as we prefer signed integers. All callers changed.
12577 Detect integer overflow in repeat count.
12578 (message_dolog): Don't assume print length fits in 39 bytes.
12579 (display_mode_element): Don't assume strlen fits in int.
12581 * termcap.c: Don't assume sizes fit in int and never overflow.
12582 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
12583 (gobble_line): Check for size-calculation overflow.
12585 * minibuf.c (Fread_buffer):
12586 * lread.c (intern, intern_c_string):
12587 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
12588 Don't assume string length fits in int.
12590 * keyboard.c (parse_tool_bar_item):
12591 * gtkutil.c (style_changed_cb): Avoid need for strlen.
12593 * font.c: Don't assume string length fits in int.
12594 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
12595 Use ptrdiff_t, not int.
12596 (font_intern_prop): Don't assume string length fits in int.
12597 Don't assume integer property fits in fixnum.
12598 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
12600 * filelock.c: Fix some buffer overrun and integer overflow issues.
12601 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
12602 Reformulate so as not to need the command string.
12603 Invoke gzip -cd rather than gunzip, as it's more portable.
12604 (lock_info_type, lock_file_1, lock_file):
12605 Don't assume pid_t and time_t fit in unsigned long.
12606 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
12607 (current_lock_owner): Prefer signed type for sizes.
12608 Use memcpy, not strncpy, where memcpy is what is really wanted.
12609 Don't assume (via atoi) that time_t and pid_t fit in int.
12610 Check for time_t and/or pid_t out of range, e.g., via a network share.
12611 Don't alloca where an auto var works fine.
12613 * fileio.c: Fix some integer overflow issues.
12614 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
12615 Don't assume string length fits in int.
12616 (directory_file_name): Don't assume string length fits in long.
12617 (make_temp_name): Don't assume pid fits in int, or that its print
12618 length is less than 20.
12620 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
12622 * coding.c (make_subsidiaries): Don't assume string length fits in int.
12624 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
12626 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
12627 We prefer signed integers, even for size calculations.
12629 * emacs.c: Don't assume string length fits in 'int'.
12630 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
12631 (main): Don't invoke strlen when not needed.
12633 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
12634 (XD_DEBUG_MESSAGE): Don't waste a byte.
12636 * callproc.c (getenv_internal_1, getenv_internal)
12637 (Fgetenv_internal):
12638 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
12640 * lread.c (invalid_syntax): Omit length argument.
12641 All uses changed. This doesn't fix a bug, but it simplifies the
12642 code away from its former Hollerith-constant appearance, and it's
12643 one less 'int' to worry about when looking at integer-overflow issues.
12644 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
12646 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
12647 This didn't break anything, but it didn't help either.
12648 It's confusing to put a bogus integer in a place where the actual
12649 value does not matter.
12650 (LIST_END_P): Remove unused macro and its bogus comment.
12651 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
12653 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
12654 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
12656 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
12657 We prefer signed types, and the value cannot exceed the EMACS_INT
12658 range anyway (because otherwise the length would not be representable).
12659 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
12660 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
12661 This avoids a GCC warning when WIDE_EMACS_INT.
12663 * indent.c (sane_tab_width): New function.
12664 (current_column, scan_for_column, Findent_to, position_indentation)
12665 (compute_motion): Use it. This is just for clarity.
12666 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
12668 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
12670 * lisp.h (lint_assume): New macro.
12671 * composite.c (composition_gstring_put_cache):
12672 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
12674 * editfns.c, insdel.c:
12675 Omit unnecessary forward decls, to simplify future changes.
12677 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
12679 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
12681 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
12682 Use much-faster test for byte-length change.
12683 Don't assume string byte-length fits in 'int'.
12684 Check that character arg fits in 'int'.
12685 (mapcar1): Declare byte as byte, for clarity.
12687 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
12689 * fns.c (concat): Catch string overflow earlier.
12690 Do not rely on integer wraparound.
12692 * dispextern.h (struct it.overlay_strings_charpos)
12693 (struct it.selective): Now EMACS_INT, not int.
12694 * xdisp.c (forward_to_next_line_start)
12695 (back_to_previous_visible_line_start)
12696 (reseat_at_next_visible_line_start, next_element_from_buffer):
12697 Don't arbitrarily truncate the value of 'selective' to int.
12699 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
12701 * composite.c: Don't truncate sizes to 'int'.
12702 (composition_gstring_p, composition_reseat_it)
12703 (composition_adjust_point): Use EMACS_INT, not int.
12704 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
12705 not EMACS_UINT, for indexes.
12707 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
12709 * buffer.c: Include <verify.h>.
12710 (struct sortvec.priority, struct sortstr.priority):
12711 Now EMACS_INT, not int.
12712 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
12713 (struct sortstr.size, record_overlay_string)
12714 (struct sortstrlist.size, struct sortlist.used):
12715 Don't truncate size to int.
12716 (record_overlay_string): Check for size-calculation overflow.
12717 (init_buffer_once): Check at compile-time, not run-time.
12719 2011-06-22 Jim Meyering <meyering@redhat.com>
12721 Don't leak an XBM-image-sized buffer
12722 * image.c (xbm_load): Free the image buffer after using it.
12724 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
12727 * composite.c (find_automatic_composition): Omit needless 'return 0;'
12728 that Sun C diagnosed.
12729 * fns.c (secure_hash): Fix pointer signedness issue.
12730 * intervals.c (static_offset_intervals): New function.
12731 (offset_intervals): Use it.
12733 2011-06-21 Leo Liu <sdl.web@gmail.com>
12736 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
12739 * fns.c (secure_hash): Rename from crypto_hash_function and change
12740 the first arg to accept symbols.
12741 (Fsecure_hash): New primitive.
12742 (syms_of_fns): New symbols.
12744 2011-06-20 Deniz Dogan <deniz@dogan.se>
12746 * process.c (Fset_process_buffer): Clarify return value in
12749 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
12751 * dispnew.c (add_window_display_history): Use BVAR.
12753 * xdisp.c (debug_method_add): Use BVAR.
12754 (check_window_end, dump_glyph_matrix, dump_glyph)
12755 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
12757 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
12760 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
12761 check till after the cache is created in init_frame_faces.
12763 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
12765 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
12767 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
12769 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
12770 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
12771 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
12773 Improve buffer-overflow checking (Bug#8873).
12774 * fileio.c (Finsert_file_contents):
12775 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
12776 Remove the old (too-loose) buffer overflow checks.
12777 They weren't needed, since make_gap checks for buffer overflow.
12778 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
12779 The old code merely checked for Emacs fixnum overflow, and relied
12780 on undefined (wraparound) behavior. The new code avoids undefined
12781 behavior, and also checks for ptrdiff_t and/or size_t overflow.
12783 * editfns.c (Finsert_char): Don't dump core with very negative counts.
12784 Tune. Don't use wider integers than needed. Don't use alloca.
12785 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
12787 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
12789 * insdel.c, lisp.h (buffer_overflow): New function.
12790 (insert_from_buffer_1, replace_range, replace_range_2):
12791 * insdel.c (make_gap_larger):
12792 * editfns.c (Finsert_char):
12793 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
12795 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
12797 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
12799 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
12801 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
12802 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
12804 * fileio.c: Don't assume EMACS_INT fits in off_t.
12805 (emacs_lseek): New static function.
12806 (Finsert_file_contents, Fwrite_region): Use it.
12807 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
12809 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
12811 * fns.c: Don't overflow int when computing a list length.
12812 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
12813 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
12814 truncation on 64-bit hosts. Check for QUIT every
12815 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
12816 faster and is responsive enough.
12817 (Flength): Report an error instead of overflowing an integer.
12818 (Fsafe_length): Return a float if the value is not representable
12819 as a fixnum. This shouldn't happen except in contrived situations.
12820 (Fnthcdr, Fsort): Don't assume list length fits in int.
12821 (Fcopy_sequence): Don't assume vector length fits in int.
12823 * alloc.c: Check that resized vectors' lengths fit in fixnums.
12824 (header_size, word_size): New constants.
12825 (allocate_vectorlike): Don't check size overflow here.
12826 (allocate_vector): Check it here instead, since this is the only
12827 caller of allocate_vectorlike that could cause overflow.
12828 Check that the new vector's length is representable as a fixnum.
12830 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
12831 The previous code was bogus. For example, next_almost_prime (32)
12832 returned 39, which is undesirable as it is a multiple of 3; and
12833 next_almost_prime (24) returned 25, which is a multiple of 5 so
12834 why was the code bothering to check for multiples of 7?
12836 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
12838 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
12840 Variadic C functions now count arguments with ptrdiff_t.
12841 This partly undoes my 2011-03-30 change, which replaced int with size_t.
12842 Back then I didn't know that the Emacs coding style prefers signed int.
12843 Also, in the meantime I found a few more instances where arguments
12844 were being counted with int, which may truncate counts on 64-bit
12845 machines, or EMACS_INT, which may be unnecessarily wide.
12846 * lisp.h (struct Lisp_Subr.function.aMANY)
12847 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
12848 Arg counts are now ptrdiff_t, not size_t.
12849 All variadic functions and their callers changed accordingly.
12850 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
12851 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
12852 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
12853 * callint.c (Fcall_interactively): Check arg count for overflow,
12854 to avoid potential buffer overrun. Use signed char, not 'int',
12855 for 'varies' array, so that we needn't bother to check its size
12856 calculation for overflow.
12857 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
12858 * eval.c (apply_lambda):
12859 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
12860 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
12861 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
12863 * callint.c (Fcall_interactively): Don't use index var as event count.
12865 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
12866 * mem-limits.h (SIZE): Remove; no longer used.
12868 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
12870 Remove unnecessary casts.
12871 * xterm.c (x_term_init):
12872 * xfns.c (x_set_border_pixel):
12873 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
12874 These aren't needed now that we assume ANSI C.
12876 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
12877 It's more likely to cause problems (due to unsigned overflow)
12880 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
12882 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
12884 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
12886 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
12888 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
12890 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
12892 GLYPH_CODE_FACE returns EMACS_INT, not int.
12893 * dispextern.h (merge_faces):
12894 * xfaces.c (merge_faces):
12895 * xdisp.c (get_next_display_element, next_element_from_display_vector):
12896 Don't assume EMACS_INT fits in int.
12898 * character.h (CHAR_VALID_P): Remove unused parameter.
12899 * fontset.c, lisp.h, xdisp.c: All uses changed.
12901 * editfns.c (Ftranslate_region_internal): Omit redundant test.
12903 * fns.c (concat): Minor tuning based on overflow analysis.
12904 This doesn't fix any bugs. Use int to hold character, instead
12905 of constantly refetching from Emacs object. Use XFASTINT, not
12906 XINT, for value known to be a character. Don't bother comparing
12907 a single byte to 0400, as it's always less.
12909 * floatfns.c (Fexpt):
12910 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
12912 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
12915 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
12917 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
12918 Without this fix, on a 64-bit host (aset S 0 4294967386) would
12919 incorrectly succeed when S was a string, because 4294967386 was
12920 truncated before it was used.
12922 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
12923 Otherwise, an out-of-range integer could cause undefined behavior
12926 * composite.c: Use int, not EMACS_INT, for characters.
12927 (fill_gstring_body, composition_compute_stop_pos): Use int, not
12928 EMACS_INT, for values that are known to be in character range.
12929 This doesn't fix any bugs but is the usual style inside Emacs and
12930 may generate better code on 32-bit machines.
12932 Make sure a 64-bit char is never passed to ENCODE_CHAR.
12933 This is for reasons similar to the recent CHAR_STRING fix.
12934 * charset.c (Fencode_char): Check that character arg is actually
12935 a character. Pass an int to ENCODE_CHAR.
12936 * charset.h (ENCODE_CHAR): Verify that the character argument is no
12937 wider than 'int', as a compile-time check to prevent future regressions
12940 * character.c (char_string): Remove unnecessary casts.
12942 Make sure a 64-bit char is never passed to CHAR_STRING.
12943 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
12944 by silently ignoring the top 32 bits, allowing some values
12945 that were far too large to be valid characters.
12946 * character.h: Include <verify.h>.
12947 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
12948 arguments are no wider than unsigned, as a compile-time check
12949 to prevent future regressions in this area.
12951 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
12952 (Fsubst_char_in_region):
12954 * xdisp.c (decode_mode_spec_coding):
12955 Adjust to CHAR_STRING's new requirement.
12956 * editfns.c (Finsert_char, Fsubst_char_in_region):
12957 * fns.c (concat): Check that character args are actually
12958 characters. Without this test, these functions did the wrong
12959 thing with wildly out-of-range values on 64-bit hosts.
12961 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
12962 These casts should not be needed on 32-bit hosts, either.
12963 * keyboard.c (read_char):
12964 * lread.c (Fload): Remove casts to unsigned.
12966 * lisp.h (UNSIGNED_CMP): New macro.
12967 This fixes comparison bugs on 64-bit hosts.
12968 (ASCII_CHAR_P): Use it.
12969 * casefiddle.c (casify_object):
12970 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
12971 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
12972 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
12973 * dispextern.h (FACE_FROM_ID):
12974 * keyboard.c (read_char): Use UNSIGNED_CMP.
12976 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
12977 not to EMACS_INT, to avoid GCC warning.
12979 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
12981 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
12982 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
12983 isn't needed on 32-bit machines.
12985 * buffer.c (Fgenerate_new_buffer_name):
12986 Use EMACS_INT for count, not int.
12987 (advance_to_char_boundary): Return EMACS_INT, not int.
12989 * data.c (Qcompiled_function): Now static.
12991 * window.c (window_body_lines): Now static.
12993 * image.c (gif_load): Rename local to avoid shadowing.
12995 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
12996 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
12997 * alloc.c (make_save_value): Integer argument is now of type
12998 ptrdiff_t, not int.
12999 (mark_object): Use ptrdiff_t, not int.
13000 * lisp.h (pD): New macro.
13001 * print.c (print_object): Use it.
13003 * alloc.c: Use EMACS_INT, not int, to count objects.
13004 (total_conses, total_markers, total_symbols, total_vector_size)
13005 (total_free_conses, total_free_markers, total_free_symbols)
13006 (total_free_floats, total_floats, total_free_intervals)
13007 (total_intervals, total_strings, total_free_strings):
13008 Now EMACS_INT, not int. All uses changed.
13009 (Fgarbage_collect): Compute overall total using a double, so that
13010 integer overflow is less likely to be a problem. Check for overflow
13011 when converting back to an integer.
13012 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
13013 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
13014 These were 'int' variables that could overflow on 64-bit hosts;
13015 they were never used, so remove them instead of repairing them.
13016 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
13017 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
13018 Previously, this ceilinged at INT_MAX, but that doesn't work on
13020 (allocate_pseudovector): Don't use EMACS_INT when int would do.
13022 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
13023 (allocate_vectorlike): Check for ptrdiff_t overflow.
13024 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
13025 when a (possibly-narrower) signed value would do just as well.
13026 We prefer using signed arithmetic, to avoid comparison confusion.
13028 * alloc.c: Catch some string size overflows that we were missing.
13029 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
13030 for convenience in STRING_BYTES_MAX.
13031 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
13032 The definition here is exact; the one in lisp.h was approximate.
13033 (allocate_string_data): Check for string overflow. This catches
13034 some instances we weren't catching before. Also, it catches
13035 size_t overflow on (unusual) hosts where SIZE_MAX <= min
13036 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
13037 and ptrdiff_t and EMACS_INT are both 64 bits.
13039 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
13040 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
13041 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
13043 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
13045 * alloc.c (Fmake_string): Check for out-of-range init.
13047 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
13049 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
13051 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
13053 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
13054 xg_get_default_scrollbar_width.
13056 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
13057 (int_gtk_range_get_value): Move to the scroll bar part of the file.
13058 (style_changed_cb): Call update_theme_scrollbar_width and call
13059 x_set_scroll_bar_default_width and xg_frame_set_char_size for
13060 all frames (Bug#8505).
13061 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
13062 Call gtk_window_set_resizable if HAVE_GTK3.
13063 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
13064 and height if HAVE_GTK3 (Bug#8505).
13065 (scroll_bar_width_for_theme): New variable.
13066 (update_theme_scrollbar_width): New function.
13067 (xg_get_default_scrollbar_width): Move code to
13068 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
13069 (xg_initialize): Call update_theme_scrollbar_width.
13071 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
13073 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
13075 2011-06-12 Martin Rudalics <rudalics@gmx.at>
13077 * frame.c (make_frame): Call other_buffer_safely instead of
13080 * window.c (temp_output_buffer_show): Call display_buffer with
13081 second argument Vtemp_buffer_show_specifiers and reset latter
13082 immediately after the call.
13083 (Vtemp_buffer_show_specifiers): New variable.
13084 (auto_window_vscroll_p, next_screen_context_lines)
13085 (Vscroll_preserve_screen_position): Remove leading asterisks from
13088 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
13090 Fix minor problems found by GCC 4.6.0 static checking.
13091 * buffer.c (Qclone_number): Remove for now, as it's unused.
13092 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
13093 (record_buffer): Remove unused local.
13094 * frame.c (other_visible_frames, frame_buffer_list): Now static.
13095 (set_frame_buffer_list): Remove; unused.
13096 * frame.h (other_visible_frames): Remove decl.
13097 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
13098 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
13099 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
13101 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
13102 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
13103 Define only if HAVE_GPM.
13104 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
13105 (update_hints_inhibit): Remove; never set. All uses removed.
13106 * widgetprv.h (emacsFrameClassRec): Remove decl.
13107 * window.c (delete_deletable_window): Now returns void, since it
13108 wasn't returning anything.
13109 (compare_window_configurations): Remove unused locals.
13110 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
13111 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
13112 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
13113 the same widths as pointers. This follows up on the 2011-05-06 patch.
13114 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
13115 * xterm.h: Likewise.
13116 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
13118 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
13120 * makefile.w32-in: Update dependencies.
13121 (LISP_H): Add lib/intprops.h.
13123 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
13125 * image.c (gif_load): Add animation frame delay to the metadata.
13126 (syms_of_image): Use DEFSYM. New symbol `delay'.
13128 2011-06-11 Martin Rudalics <rudalics@gmx.at>
13130 * window.c (delete_deletable_window): Re-add.
13131 (Fset_window_configuration): Rewrite to handle dead buffers and
13132 consequently deletable windows.
13133 (window_tree, Fwindow_tree): Remove. Supply functionality in
13135 (compare_window_configurations): Simplify code.
13137 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
13139 * image.c (imagemagick_load_image): Fix type mismatch.
13140 (Fimagemagick_types): Likewise.
13142 * window.h (replace_buffer_in_windows): Declare.
13144 2011-06-11 Martin Rudalics <rudalics@gmx.at>
13146 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
13147 Qclone_number. Remove external declaration of Qdelete_window.
13148 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
13150 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
13151 Run Qbuffer_list_update_hook if allowed.
13152 (Fother_buffer): Rewrite doc-string. Major rewrite for new
13153 buffer list implementation.
13154 (other_buffer_safely): New function.
13155 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
13156 calls to replace_buffer_in_windows and
13157 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
13159 (record_buffer): Inhibit quitting and rewrite using quittable
13160 functions. Run Qbuffer_list_update_hook if allowed.
13161 (Frecord_buffer, Funrecord_buffer): New functions.
13162 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
13163 Move switch-to-buffer to window.el.
13164 (bury-buffer): Move to window.el.
13165 (Vbuffer_list_update_hook): New variable.
13167 * lisp.h (other_buffer_safely): Add prototype in buffer.c
13170 * window.h (resize_frame_windows): Move up in code.
13171 (Fwindow_frame): Remove EXFUN.
13172 (replace_buffer_in_all_windows): Remove prototype.
13173 (replace_buffer_in_windows_safely): Add prototype.
13175 * window.c: Declare Qdelete_window static again. Move down
13176 declaration of select_count.
13177 (Fnext_window, Fprevious_window): Rewrite doc-strings.
13178 (Fother_window): Move to window.el.
13179 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
13180 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
13181 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
13183 (replace_buffer_in_windows): Implement by calling
13184 Qreplace_buffer_in_windows.
13185 (replace_buffer_in_all_windows): Remove with some functionality
13186 moved into replace_buffer_in_windows_safely.
13187 (replace_buffer_in_windows_safely): New function.
13188 (select_window_norecord, select_frame_norecord): Move in front
13189 of run_window_configuration_change_hook. Remove now obsolete
13191 (Fset_window_buffer): Rewrite doc-string.
13192 Call Qrecord_window_buffer.
13193 (keys_of_window): Move binding for other-window to window.el.
13195 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
13197 * dispextern.h (struct image): Replace data member, whose int_val
13198 and ptr_val fields were not used by anything, with a single
13201 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
13202 (gif_clear_image, gif_load, imagemagick_load_image)
13203 (gs_clear_image, gs_load): Callers changed.
13205 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
13207 * buffer.h: Include <time.h>, for time_t.
13208 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
13210 Fix minor problems found by static checking.
13212 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
13214 Make identifiers static if they are not used in other modules.
13215 * data.c (Qcompiled_function, Qframe, Qvector):
13216 * image.c (QimageMagick, Qsvg):
13217 * minibuf.c (Qmetadata):
13218 * window.c (resize_window_check, resize_root_window): Now static.
13219 * window.h (resize_window_check, resize_root_window): Remove decls.
13221 * window.c (window_deletion_count, delete_deletable_window):
13223 (window_body_lines): Now static.
13224 (Fdelete_other_windows_internal): Mark vars as initialized.
13225 Make sure 'resize_failed' is initialized.
13226 (run_window_configuration_change_hook): Rename local to avoid shadowing.
13227 (resize_window_apply): Remove unused local.
13228 * window.h (delete_deletable_window): Remove decl.
13230 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
13231 (imagemagick_load_image): Fix pointer signedness problem by changing
13232 last arg from unsigned char * to char *. All uses changed.
13233 Also, fix a local for similar reasons.
13234 Remove unused locals. Remove locals to avoid shadowing.
13235 (fn_rsvg_handle_free): Remove; unused.
13236 (svg_load, svg_load_image): Fix pointer signedness problem.
13237 (imagemagick_load_image): Don't use garbage pointer image_wand.
13239 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
13241 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
13243 * image.c (gif_load): Fix omitted cast error introduced by
13246 2011-06-10 Martin Rudalics <rudalics@gmx.at>
13248 * window.h (resize_proportionally, orig_total_lines)
13249 (orig_top_line): Remove from window structure.
13250 (set_window_height, set_window_width, change_window_heights)
13251 (Fdelete_window): Remove prototypes.
13252 (resize_frame_windows): Remove duplicate declaration.
13254 2011-06-10 Eli Zaretskii <eliz@gnu.org>
13256 * window.h (resize_frame_windows, resize_window_check)
13257 (delete_deletable_window, resize_root_window)
13258 (resize_frame_windows): Declare prototypes.
13260 * window.c (resize_window_apply): Make definition be "static" to
13261 match the prototype.
13263 2011-06-10 Martin Rudalics <rudalics@gmx.at>
13265 * window.c: Remove declarations of Qwindow_size_fixed,
13266 window_min_size_1, window_min_size_2, window_min_size,
13267 size_window, window_fixed_size_p, enlarge_window, delete_window.
13268 Remove static from declaration of Qdelete_window, it's
13269 temporarily needed by Fbury_buffer.
13270 (replace_window): Don't assign orig_top_line and
13272 (Fdelete_window, delete_window): Remove. Window deletion is
13273 handled by window.el.
13274 (window_loop): Remove DELETE_OTHER_WINDOWS case.
13275 Replace Fdelete_window calls with calls to Qdelete_window.
13276 (Fdelete_other_windows): Remove. Deleting other windows is
13277 handled by window.el.
13278 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
13279 handled in window.el.
13280 (window_min_size_2, window_min_size_1, window_min_size): Remove.
13281 Window minimum sizes are handled in window.el.
13282 (shrink_windows, size_window, set_window_height)
13283 (set_window_width, change_window_heights, window_height)
13284 (window_width, CURBEG, CURSIZE, enlarge_window)
13285 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
13286 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
13287 handled in window.el.
13288 (make_dummy_parent): Rename to make_parent_window and give it a
13289 second argument horflag.
13290 (make_window): Don't set resize_proportionally any more.
13291 (Fsplit_window): Remove. Windows are split in window.el.
13292 (save_restore_action, save_restore_orig_size)
13293 (shrink_window_lowest_first, save_restore_orig_size): Remove.
13294 Resize mini windows in window.el.
13295 (grow_mini_window, shrink_mini_window): Implement by calling
13296 Qresize_root_window_vertically, resize_window_check and
13297 resize_window_apply.
13298 (saved_window, Fset_window_configuration, save_window_save):
13299 Do not handle orig_top_line, orig_total_lines, and
13300 resize_proportionally.
13301 (window_min_height, window_min_width): Move to window.el.
13302 (keys_of_window): Move bindings for delete-other-windows,
13303 split-window, delete-window and enlarge-window to window.el.
13305 * buffer.c: Temporarily extern Qdelete_window.
13306 (Fbury_buffer): Temporarily call Qdelete_window instead of
13307 Fdelete_window (Fbury_buffer will move to window.el soon).
13309 * frame.c (set_menu_bar_lines_1): Remove code handling
13310 orig_top_line and orig_total_lines.
13312 * dispnew.c (adjust_frame_glyphs_initially): Don't use
13313 set_window_height but set heights directly.
13314 (change_frame_size_1): Use resize_frame_windows.
13316 * xdisp.c (init_xdisp): Don't use set_window_height but set
13319 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
13320 Use resize_frame_windows instead of change_window_heights and run
13321 run_window_configuration_change_hook.
13323 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
13324 instead of change_window_heights and run
13325 run_window_configuration_change_hook.
13327 2011-06-09 Martin Rudalics <rudalics@gmx.at>
13329 * window.c (replace_window): Rename second argument REPLACEMENT to
13330 NEW. New third argument SETFLAG. Rewrite.
13331 (delete_window, make_dummy_parent): Call replace_window with
13333 (window_list_1): Move down in code.
13334 (run_window_configuration_change_hook): Move set_buffer part
13335 before select_frame_norecord part in order to unwind correctly.
13336 Rename count1 to count.
13337 (recombine_windows, delete_deletable_window, resize_root_window)
13338 (Fdelete_other_windows_internal)
13339 (Frun_window_configuration_change_hook, make_parent_window)
13340 (resize_window_check, resize_window_apply, Fresize_window_apply)
13341 (resize_frame_windows, Fsplit_window_internal)
13342 (Fdelete_window_internal, Fresize_mini_window_internal):
13344 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
13346 2011-06-08 Martin Rudalics <rudalics@gmx.at>
13348 * window.h (window): Add some new members to window structure -
13349 normal_lines, normal_cols, new_total, new_normal, clone_number,
13350 splits, nest, prev_buffers, next_buffers.
13351 (WINDOW_TOTAL_SIZE): Move here from window.c.
13352 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
13354 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
13356 (make_dummy_parent): Set new members of windows structure.
13357 (make_window): Move down in code. Handle new members of window
13359 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
13360 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
13361 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
13362 (Fset_window_prev_buffers, Fwindow_next_buffers)
13363 (Fset_window_next_buffers, Fset_window_clone_number):
13365 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
13366 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
13368 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
13369 Argument WINDOW can be now internal window too.
13370 (Fwindow_use_time): Move up in code.
13371 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
13372 Rewrite doc-string.
13373 (Fset_window_configuration, saved_window)
13374 (Fcurrent_window_configuration, save_window_save): Handle new
13375 members of window structure.
13376 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
13377 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
13378 (syms_of_window): New Lisp objects Qrecord_window_buffer,
13379 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
13380 Qget_mru_window, Qresize_root_window,
13381 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
13382 Qauto_buffer_name; staticpro them.
13384 2011-06-07 Martin Rudalics <rudalics@gmx.at>
13386 * window.c (Fwindow_total_size, Fwindow_left_column)
13387 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
13388 (Fwindow_list_1): New functions.
13389 (window_box_text_cols): Replace with window_body_cols.
13390 (Fwindow_width, Fscroll_left, Fscroll_right):
13391 Use window_body_cols instead of window_box_text_cols.
13392 (delete_window, Fset_window_configuration):
13393 Call delete_all_subwindows with window as argument.
13394 (delete_all_subwindows): Take a window as argument and not a
13395 structure. Rewrite.
13396 (window_loop): Remove handling of GET_LRU_WINDOW and
13397 GET_LARGEST_WINDOW.
13398 (Fget_lru_window, Fget_largest_window): Move to window.el.
13400 * window.h: Extern window_body_cols instead of
13401 window_box_text_cols. delete_all_subwindows now takes a
13402 Lisp_Object as argument.
13404 * indent.c (compute_motion, Fcompute_motion):
13405 Use window_body_cols instead of window_box_text_cols.
13407 * frame.c (delete_frame): Call delete_all_subwindows with root
13408 window as argument.
13410 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
13412 * fns.c (Fputhash): Document return value.
13414 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
13416 * image.c (gif_load): Implement gif89a spec "no disposal" method.
13418 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
13420 Cons<->int and similar integer overflow fixes (Bug#8794).
13422 Check for overflow when converting integer to cons and back.
13423 * charset.c (Fdefine_charset_internal, Fdecode_char):
13424 Use cons_to_unsigned to catch overflow.
13425 (Fencode_char): Use INTEGER_TO_CONS.
13426 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
13427 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
13428 * data.c (long_to_cons, cons_to_long): Remove.
13429 (cons_to_unsigned, cons_to_signed): New functions.
13430 These signal an error for invalid or out-of-range values.
13431 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
13432 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
13433 * font.c (Ffont_variation_glyphs):
13434 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
13435 * lisp.h: Include <intprops.h>.
13436 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
13437 (cons_to_signed, cons_to_unsigned): New decls.
13438 (long_to_cons, cons_to_long): Remove decls.
13439 * undo.c (record_first_change): Use INTEGER_TO_CONS.
13440 (Fprimitive_undo): Use CONS_TO_INTEGER.
13441 * xfns.c (Fx_window_property): Likewise.
13442 * xselect.c: Include <limits.h>.
13443 (x_own_selection, selection_data_to_lisp_data):
13444 Use INTEGER_TO_CONS.
13445 (x_handle_selection_request, x_handle_selection_clear)
13446 (x_get_foreign_selection, Fx_disown_selection_internal)
13447 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
13448 (lisp_data_to_selection_data): Use cons_to_unsigned.
13449 (x_fill_property_data): Use cons_to_signed.
13450 Report values out of range.
13452 Check for buffer and string overflow more precisely.
13453 * buffer.h (BUF_BYTES_MAX): New macro.
13454 * lisp.h (STRING_BYTES_MAX): New macro.
13455 * alloc.c (Fmake_string):
13456 * character.c (string_escape_byte8):
13457 * coding.c (coding_alloc_by_realloc):
13458 * doprnt.c (doprnt):
13459 * editfns.c (Fformat):
13461 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
13462 since they may not be the same number.
13463 * editfns.c (Finsert_char):
13464 * fileio.c (Finsert_file_contents):
13465 Likewise for BUF_BYTES_MAX.
13467 * image.c: Use ptrdiff_t, not int, for sizes.
13468 (slurp_file): Switch from int to ptrdiff_t.
13470 (slurp_file): Check that file size fits in both size_t (for
13471 malloc) and ptrdiff_t (for sanity and safety).
13473 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
13474 if b->modtime has its maximal value.
13476 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
13478 Don't assume time_t can fit into int.
13479 * buffer.h (struct buffer.modtime): Now time_t, not int.
13480 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
13481 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
13483 Minor fixes for signed vs unsigned integers.
13484 * character.h (MAYBE_UNIFY_CHAR):
13485 * charset.c (maybe_unify_char):
13486 * keyboard.c (read_char, reorder_modifiers):
13487 XINT -> XFASTINT, since the integer must be nonnegative.
13488 * ftfont.c (ftfont_spec_pattern):
13489 * keymap.c (access_keymap, silly_event_symbol_error):
13490 XUINT -> XFASTINT, since the integer must be nonnegative.
13491 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
13492 since it makes no difference and we prefer signed.
13493 * keyboard.c (record_char): Use XUINT when all the neighbors do.
13494 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
13497 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
13499 * window.h (Fwindow_frame): Declare.
13501 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
13503 * alloc.c: Simplify handling of large-request failures (Bug#8800).
13504 (SPARE_MEMORY): Always define.
13505 (LARGE_REQUEST): Remove.
13506 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
13508 2011-06-06 Martin Rudalics <rudalics@gmx.at>
13510 * lisp.h: Move EXFUNS for Fframe_root_window,
13511 Fframe_first_window and Fset_frame_selected_window to window.h.
13513 * window.h: Move EXFUNS for Fframe_root_window,
13514 Fframe_first_window and Fset_frame_selected_window here from
13517 * frame.c (Fwindow_frame, Fframe_first_window)
13518 (Fframe_root_window, Fframe_selected_window)
13519 (Fset_frame_selected_window): Move to window.c.
13520 (Factive_minibuffer_window): Move to minibuf.c.
13521 (Fother_visible_frames_p): New function.
13523 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
13525 * window.c (decode_window, decode_any_window): Move up in code.
13526 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
13527 (inhibit_frame_unsplittable): Remove unused variable.
13528 (Fwindow_buffer): Move up and rewrite doc-string.
13529 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
13530 (Fwindow_prev): New functions.
13531 (Fwindow_frame): Move here from frame.c. Accept any window as
13533 (Fframe_root_window, Fframe_first_window)
13534 (Fframe_selected_window): Move here from frame.c. Accept frame
13535 or arbitrary window as argument. Update doc-strings.
13536 (Fminibuffer_window): Move up in code.
13537 (Fwindow_minibuffer_p): Move up in code and simplify.
13538 (Fset_frame_selected_window): Move here from frame.c.
13540 (Fselected_window, select_window, Fselect_window): Move up in
13541 code. Minor doc-string fixes.
13543 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
13545 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
13546 Do not assume that spare memory exists; that assumption is valid
13547 only if SYSTEM_MALLOC.
13548 (LARGE_REQUEST): New macro, so that the issue of large requests
13549 is separated from the issue of spare memory.
13551 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
13553 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
13556 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
13558 * xfns.c (x_set_scroll_bar_default_width): Move declarations
13561 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
13563 * gtkutil.c (xg_get_default_scrollbar_width): New function.
13565 * gtkutil.h: Declare xg_get_default_scrollbar_width.
13567 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
13568 min width by calling x_set_scroll_bar_default_width (Bug#8505).
13570 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
13572 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
13574 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
13576 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
13577 (x_clipboard_manager_save): Add return value.
13578 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
13579 New error handlers.
13580 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
13581 Obey Vx_select_enable_clipboard_manager. Catch errors in
13582 x_clipboard_manager_save (Bug#8779).
13583 (Vx_select_enable_clipboard_manager): New variable.
13584 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
13586 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
13588 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
13590 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13592 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
13593 in the current matrix if keep_current_p is non-zero.
13595 2011-06-04 Eli Zaretskii <eliz@gnu.org>
13597 * bidi.c (bidi_level_of_next_char): Fix last change.
13599 2011-06-03 Eli Zaretskii <eliz@gnu.org>
13601 Support bidi reordering of text covered by display properties.
13603 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
13604 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
13605 (bidi_cache_search, bidi_cache_iterator_state)
13606 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
13607 (bidi_level_of_next_char, bidi_move_to_visually_next):
13608 Support character positions inside a run of characters covered by a
13610 (bidi_paragraph_init, bidi_resolve_explicit_1)
13611 (bidi_level_of_next_char): Call bidi_fetch_char and
13612 bidi_fetch_char_advance instead of FETCH_CHAR and
13613 FETCH_CHAR_ADVANCE.
13614 (bidi_init_it): Initialize new members.
13615 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
13617 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
13618 instead of using explicit *_CHAR codes.
13619 (bidi_resolve_explicit, bidi_resolve_weak):
13620 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
13621 bidirectional text is supported only in multibyte buffers.
13622 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
13623 it to initialize the frame_window_p member of struct bidi_it.
13624 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
13625 (bidi_resolve_explicit, bidi_resolve_weak)
13626 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
13627 bidi_it->nchars is non-positive.
13628 (bidi_level_of_next_char): Don't try to lookup the cache for the
13629 next/previous character if nothing is cached there yet, or if we
13630 were just reseat()'ed to a new position.
13632 * xdisp.c (set_cursor_from_row): Set start and stop points
13633 according to the row's direction when priming the loop that looks
13634 for the glyph on which to display cursor.
13635 (single_display_spec_intangible_p): Function deleted.
13636 (display_prop_intangible_p): Reimplement to call
13637 handle_display_spec instead of single_display_spec_intangible_p.
13638 Accept 3 additional arguments needed by handle_display_spec.
13639 This fixes incorrect cursor motion across display property with complex
13640 values: lists, `(when COND...)' forms, etc.
13641 (single_display_spec_string_p): Support property values that are
13642 lists with the argument STRING its top-level element.
13643 (display_prop_string_p): Fix the condition for processing a
13644 property that is a list to be consistent with handle_display_spec.
13645 (handle_display_spec): New function, refactored from the
13646 last portion of handle_display_prop.
13647 (compute_display_string_pos): Accept additional argument
13648 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
13649 value of a `display' property is a "replacing spec".
13650 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
13651 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
13652 the display property, but just return a value indicating whether
13653 the display property will replace the characters it covers.
13654 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
13655 frame_window_p members of struct bidi_it.
13656 (compute_display_string_pos, compute_display_string_end):
13658 (push_it): Accept second argument POSITION, where pop_it should
13659 jump to continue iteration.
13660 (reseat_1): Initialize bidi_it.disp_pos.
13662 * keyboard.c (adjust_point_for_property): Adjust the call to
13663 display_prop_intangible_p to its new signature.
13665 * dispextern.h (struct bidi_it): New member frame_window_p.
13666 (bidi_init_it): Update prototypes.
13667 (display_prop_intangible_p): Update prototype.
13668 (compute_display_string_pos, compute_display_string_end):
13669 Declare prototypes.
13670 (struct bidi_it): New members nchars and disp_pos. ch_len is now
13673 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
13675 Malloc failure behavior now depends on size of allocation.
13676 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
13677 * lisp.h: Change signatures accordingly.
13678 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
13679 All callers changed. (Bug#8762)
13681 * gnutls.c: Use Emacs's memory allocators.
13682 Without this change, the gnutls library would invoke malloc etc.
13683 directly, which causes problems on non-SYNC_INPUT hosts, and which
13684 runs afoul of improving memory_full behavior. (Bug#8761)
13685 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
13686 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
13687 xfree instead of the default malloc, realloc, free.
13688 (Fgnutls_boot): No need to check for memory allocation failure,
13689 since xmalloc does that for us.
13691 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
13692 * category.c (hash_get_category_set):
13693 * ccl.c (ccl_driver):
13694 * charset.c (Fdefine_charset_internal):
13695 * charset.h (struct charset.hash_index):
13696 * composite.c (get_composition_id, gstring_lookup_cache)
13697 (composition_gstring_put_cache):
13698 * composite.h (struct composition.hash_index):
13699 * dispextern.h (struct image.hash):
13700 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
13701 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
13702 (hashfn_equal, hashfn_user_defined, make_hash_table)
13703 (maybe_resize_hash_table, hash_lookup, hash_put)
13704 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
13705 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
13706 (Fsxhash, Fgethash, Fputhash, Fmaphash):
13707 * image.c (make_image, search_image_cache, lookup_image)
13708 (xpm_put_color_table_h):
13709 * lisp.h (struct Lisp_Hash_Table):
13710 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
13711 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
13712 for hashes and hash indexes, instead of 'unsigned' and 'int'.
13713 * alloc.c (allocate_vectorlike):
13714 Check for overflow in vector size calculations.
13715 * ccl.c (ccl_driver):
13716 Check for overflow when converting EMACS_INT to int.
13717 * fns.c, image.c: Remove unnecessary static decls that would otherwise
13718 need to be updated by these changes.
13719 * fns.c (make_hash_table, maybe_resize_hash_table):
13720 Check for integer overflow with large hash tables.
13721 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
13722 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
13723 (SXHASH_REDUCE): New macro.
13724 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
13725 Use it instead of discarding useful hash info with large hash values.
13726 (sxhash_float): New function.
13727 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
13728 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
13729 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
13730 Rewrite to use FIXNUM_BITS, as this simplifies things.
13731 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
13732 Adjust signatures to match updated version of code.
13733 (consing_since_gc): Now EMACS_INT, since a single hash table can
13734 use more than INT_MAX bytes.
13736 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
13738 Make it possible to build with GCC-4.6+ -O2 -flto.
13740 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
13742 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
13744 * minibuf.c (get_minibuffer, read_minibuf_unwind):
13745 Call minibuffer-inactive-mode.
13747 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
13749 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
13750 Update dependencies.
13752 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
13754 * data.c (init_data): Remove code for UTS, this system is not
13757 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
13759 Don't force ./temacs to start in terminal mode.
13761 * frame.c (make_initial_frame): Initialize faces in all cases, not
13762 only when CANNOT_DUMP is defined.
13763 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
13765 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
13767 * dispnew.c (add_window_display_history): Use const for the string
13768 pointer. Remove declaration, not needed.
13770 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
13772 Use 'inline', not 'INLINE'.
13773 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
13774 * alloc.c, fontset.c (INLINE): Remove.
13775 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
13776 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
13777 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
13778 * gmalloc.c (register_heapinfo): Use inline unconditionally.
13779 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
13781 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
13783 Make it possible to run ./temacs.
13785 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
13786 syms_of_callproc does the same thing. Remove test for
13787 "initialized", do it in the caller.
13788 * emacs.c (main): Avoid calling set_initial_environment when dumping.
13790 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
13792 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
13793 (read_minibuf): Use get_minibuffer.
13794 (syms_of_minibuf): Use DEFSYM.
13795 (Qmetadata): New var.
13796 * data.c (Qbuffer): Don't make it static.
13797 (syms_of_data): Use DEFSYM.
13799 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
13801 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
13802 (CCL_CODE_MIN): New macro.
13804 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
13806 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
13808 * eval.c (Qdebug): Now static.
13809 * lisp.h (Qdebug): Remove decl. This reverts a part of the
13810 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
13811 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
13813 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
13815 * image.c: Various fixes to ImageMagick code comments.
13816 (Fimagemagick_types): Doc fix.
13818 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
13820 Minor fixes prompted by GCC 4.6.0 warnings.
13822 * xselect.c (converted_selections, conversion_fail_tag): Now static.
13824 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
13825 (x_clipboard_manager_save_all): Move extern decl to ...
13826 * xterm.h: ... here, so that it can be checked for consistency.
13828 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
13830 * xselect.c (x_clipboard_manager_save_frame)
13831 (x_clipboard_manager_save_all): New functions.
13832 (Fx_clipboard_manager_save): Lisp function deleted.
13834 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
13835 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
13837 * xterm.h: Update prototype.
13839 2011-05-28 William Xu <william.xwl@gmail.com>
13841 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
13842 exiting (Bug#8239).
13844 2011-05-28 Jim Meyering <meyering@redhat.com>
13846 Avoid a sign-extension bug in crypto_hash_function.
13847 * fns.c (to_uchar): Define.
13848 (crypto_hash_function): Use it to convert some newly-signed
13849 variables to unsigned, to avoid sign-extension bugs. For example,
13850 without this change, (md5 "truc") would evaluate to
13851 45723a2aff78ff4fff7fff1114760e62 rather than the expected
13852 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
13853 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
13855 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
13857 Integer overflow fixes.
13859 * dbusbind.c: Serial number integer overflow fixes.
13860 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
13861 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
13862 to hold a serial number that is too large for a fixnum.
13863 (Fdbus_method_return_internal, Fdbus_method_error_internal):
13864 Check for serial numbers out of range. Decode any serial number
13865 that was so large that it became a float. (Bug#8722)
13867 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
13868 (Fdbus_call_method, Fdbus_call_method_asynchronously):
13869 Use XFASTINT rather than XUINT when numbers are nonnegative.
13870 (xd_append_arg, Fdbus_method_return_internal):
13871 (Fdbus_method_error_internal): Likewise. Also, for unsigned
13872 arguments, check that Lisp number is nonnegative, rather than
13873 silently wrapping negative numbers around. (Bug#8722)
13874 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
13877 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
13879 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
13881 ccl: Add integer overflow checks.
13882 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
13883 (IN_INT_RANGE): New macros.
13884 (ccl_driver): Use them to check for integer overflow when
13885 decoding a CCL program. Many of the new checks are whether XINT (x)
13886 fits in int; it doesn't always, on 64-bit hosts. The new version
13887 doesn't catch all possible integer overflows, but it's an
13888 improvement. (Bug#8719)
13890 * alloc.c (make_event_array): Use XINT, not XUINT.
13891 There's no need for unsigned here.
13893 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
13894 This follows up to the 2011-05-06 change that substituted uintptr_t
13895 for EMACS_INT. This case wasn't caught back then.
13897 Rework Fformat to avoid integer overflow issues.
13898 * editfns.c: Include <float.h> unconditionally, as it's everywhere
13899 now (part of C89). Include <verify.h>.
13900 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
13901 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
13902 (Fformat): Avoid the prepass trying to compute sizes; it was only
13903 approximate and thus did not catch overflow reliably. Instead, walk
13904 through the format just once, formatting and computing sizes as we go,
13905 checking for integer overflow at every step, and allocating a larger
13906 buffer as needed. Keep track separately whether the format is
13907 multibyte. Keep only the most-recently calculated precision, rather
13908 than them all. Record whether each argument has been converted to
13909 string. Use EMACS_INT, not int, for byte and char and arg counts.
13910 Support field widths and precisions larger than INT_MAX. Avoid
13911 sprintf's undefined behavior with conversion specifications such as %#d
13912 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
13913 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
13914 formatting out-of-range floating point numbers with int
13915 formats. (Bug#8668)
13917 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
13919 * data.c: Avoid integer truncation in expressions involving floats.
13920 * data.c: Include <intprops.h>.
13921 (arith_driver): When there's an integer overflow in an expression
13922 involving floating point, convert the integers to floating point
13923 so that the resulting value does not suffer from catastrophic
13924 integer truncation. For example, on a 64-bit host (* 4
13925 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
13926 Do not rely on undefined behavior after integer overflow.
13928 merge count_size_as_multibyte, parse_str_to_multibyte
13929 * character.c, character.h (count_size_as_multibyte):
13930 Rename from parse_str_to_multibyte; all uses changed.
13931 Check for integer overflow.
13932 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
13933 since it's now a duplicate of the other. This is more of
13934 a character than a buffer op, so better that it's in character.c.
13935 * fns.c, print.c: Adjust to above changes.
13937 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
13939 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
13941 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
13943 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
13944 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
13945 (x_clipboard_manager_save): Now static.
13946 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
13948 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
13949 (crypto_hash_function): Now static.
13950 Fix pointer signedness problems. Avoid unnecessary initializations.
13952 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
13954 * termhooks.h (Vselection_alist): Make it terminal-local.
13956 * terminal.c (create_terminal): Initialize it.
13958 * xselect.c: Support for clipboard managers.
13959 (Vselection_alist): Move to termhooks.h as terminal-local var.
13960 (LOCAL_SELECTION): New macro.
13961 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
13962 (symbol_to_x_atom): Remove gratuitous arg.
13963 (x_handle_selection_request, lisp_data_to_selection_data)
13964 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
13965 (x_own_selection, x_get_local_selection, x_convert_selection):
13966 New arg, specifying work frame. Use terminal-local Vselection_alist.
13967 (some_frame_on_display): Delete unused function.
13968 (Fx_own_selection_internal, Fx_get_selection_internal)
13969 (Fx_disown_selection_internal, Fx_selection_owner_p)
13970 (Fx_selection_exists_p): New optional frame arg.
13971 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
13972 (x_handle_selection_clear): Don't treat other terminals with the
13973 same keyboard specially. Use the terminal-local Vselection_alist.
13974 (x_clear_frame_selections): Use Frun_hook_with_args.
13976 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
13978 * xterm.h: Add support for those atoms.
13980 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
13982 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
13983 (converted_selections, conversion_fail_tag): New global variables.
13984 (x_selection_request_lisp_error): Free the above.
13985 (x_get_local_selection): Remove unnecessary code.
13986 (x_reply_selection_request): Args changed; handle arbitrary array
13987 of converted selections stored in converted_selections.
13988 Separate the XChangeProperty and SelectionNotify steps.
13989 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
13990 (x_convert_selection): New function.
13991 (x_handle_selection_event): Simplify.
13992 (x_get_foreign_selection): Don't ignore incoming requests while
13993 waiting for an answer; this will fail when we implement
13994 SAVE_TARGETS, and seems unnecessary anyway.
13995 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
13996 (Vx_sent_selection_functions): Doc fix.
13998 2011-05-26 Leo Liu <sdl.web@gmail.com>
14000 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
14002 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14004 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
14006 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
14007 for fringe update if it has periodic bitmap.
14008 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
14009 and fringe_bitmap_periodic_p.
14011 * fringe.c (get_fringe_bitmap_data): New function.
14012 (draw_fringe_bitmap_1, update_window_fringes): Use it.
14013 (update_window_fringes): Record periodicity of fringe bitmap in glyph
14014 row. Mark glyph row for fringe update if periodicity changed.
14016 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
14017 for fringe update unless it has periodic bitmap.
14019 2011-05-25 Kenichi Handa <handa@m17n.org>
14021 * xdisp.c (get_next_display_element): Set correct it->face_id for
14022 a static composition.
14024 2011-05-24 Leo Liu <sdl.web@gmail.com>
14027 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
14029 * fns.c (crypto_hash_function, Fsha1): New function.
14030 (Fmd5): Use crypto_hash_function.
14031 (syms_of_fns): Add Ssha1.
14033 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
14035 * gnutls.c: Remove unused macros.
14036 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
14037 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
14038 Remove macros that are defined and never used.
14039 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
14041 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
14043 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
14044 (Fx_get_selection_internal): Minor cleanup.
14045 (Fx_own_selection_internal): Rename arguments for consistency with
14048 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
14050 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
14052 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
14054 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
14056 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14058 * dispnew.c (scrolling_window): Don't exclude the case that the
14059 last enabled row in the desired matrix touches the bottom boundary.
14061 2011-05-21 Glenn Morris <rgm@gnu.org>
14063 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
14064 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
14065 and add some more files.
14067 2011-05-20 Eli Zaretskii <eliz@gnu.org>
14069 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
14070 report_file_error introduced by the change from 2011-05-07.
14072 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
14074 * systime.h (Time): Define only if emacs is defined.
14075 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
14076 where the include path doesn't have X11/X.h by default. See
14077 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
14079 2011-05-20 Kenichi Handa <handa@m17n.org>
14081 * composite.c (find_automatic_composition): Fix previous change.
14083 2011-05-20 Glenn Morris <rgm@gnu.org>
14085 * lisp.mk: New file, split from Makefile.in.
14086 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
14087 (shortlisp): Remove.
14088 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
14090 2011-05-19 Glenn Morris <rgm@gnu.org>
14092 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
14093 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
14094 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
14095 (lisp): Set the order to that of loadup.el.
14096 (shortlisp): Make it a copy of $lisp.
14097 (SOME_MACHINE_LISP): Remove.
14098 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
14099 Use just $shortlisp, not $SOME_MACHINE_LISP too.
14101 2011-05-18 Kenichi Handa <handa@m17n.org>
14103 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
14104 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
14105 (find_automatic_composition): Mostly rewrite for efficiency.
14107 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
14109 * makefile.w32-in: Update dependencies.
14111 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
14113 * menu.c: Include limits.h (fixes the MS-Windows build broken by
14114 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
14116 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
14118 Fix some integer overflow issues, such as string length overflow.
14120 * insdel.c (count_size_as_multibyte): Check for string overflow.
14122 * character.c (lisp_string_width): Check for string overflow.
14123 Use EMACS_INT, not int, for string indexes and lengths; in
14124 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
14125 the resulting string length overflows an EMACS_INT; instead,
14126 report a string overflow if no precision given. When checking for
14127 precision exhaustion, use a check that cannot possibly have
14128 integer overflow. (Bug#8675)
14129 * character.h (lisp_string_width): Adjust to new signature.
14131 * alloc.c (string_overflow): New function.
14132 (Fmake_string): Use it. This doesn't change behavior, but saves
14133 a few bytes and will simplify future changes.
14134 * character.c (string_escape_byte8): Likewise.
14135 * lisp.h (string_overflow): New decl.
14137 Fixups, following up to the user-interface timestamp change.
14138 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
14139 for UI timestamps, instead of unsigned long.
14140 * msdos.c (mouse_get_pos): Likewise.
14141 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
14142 * w32gui.h (Time): Define by including "systime.h" rather than by
14143 declaring it ourselves. (Bug#8664)
14145 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
14146 * image.c (clear_image_cache): Likewise.
14148 * term.c (term_mouse_position): Don't assume time_t wraparound.
14150 Be more systematic about user-interface timestamps.
14151 Before, the code sometimes used 'Time', sometimes 'unsigned long',
14152 and sometimes 'EMACS_UINT', to represent these timestamps.
14153 This change causes it to use 'Time' uniformly, as that's what X uses.
14154 This makes the code easier to follow, and makes it easier to catch
14155 integer overflow bugs such as Bug#8664.
14156 * frame.c (Fmouse_position, Fmouse_pixel_position):
14157 Use Time, not unsigned long, for user-interface timestamps.
14158 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
14159 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
14160 * keyboard.h (last_event_timestamp): Likewise.
14161 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
14162 * menu.h (xmenu_show): Likewise.
14163 * term.c (term_mouse_position): Likewise.
14164 * termhooks.h (struct input_event.timestamp): Likewise.
14165 (struct terminal.mouse_position_hook): Likewise.
14166 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
14167 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
14168 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
14169 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
14170 what it was before.
14171 * menu.h, termhooks.h: Include "systime.h", for Time.
14173 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
14174 Don't assume that the difference between two unsigned long values
14175 can fit into an integer. At this point, we know button_down_time
14176 <= event->timestamp, so the difference must be nonnegative, so
14177 there's no need to cast the result if double-click-time is
14178 nonnegative, as it should be; check that it's nonnegative, just in
14179 case. This bug is triggered when events are more than 2**31 ms
14180 apart (about 25 days). (Bug#8664)
14182 * xselect.c (last_event_timestamp): Remove duplicate decl.
14183 (x_own_selection): Remove needless cast to unsigned long.
14185 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
14186 that always fit in int. Use a sentinel instead of a counter, to
14187 avoid a temp and to allay GCC's concerns about possible int overflow.
14188 * frame.h (struct frame): Use int for menu_bar_items_used
14189 instead of EMACS_INT, since it always fits in int.
14191 * menu.c (grow_menu_items): Check for int overflow.
14193 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
14195 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
14196 Before, the code was not consistent. These values cannot exceed
14197 2**31 - 1 so there's no need to make them unsigned.
14198 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
14199 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
14200 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
14202 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
14204 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
14205 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
14206 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
14207 presumably because the widths might not match.
14209 * window.c (size_window): Avoid needless test at loop start.
14211 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
14213 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
14215 2011-05-12 Drew Adams <drew.adams@oracle.com>
14217 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
14219 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14221 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
14222 `width' to `bar_area_x' and `bar_area_width', respectively.
14223 (x_scroll_run): Take account of fringe background extension.
14225 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
14226 Rename local vars `left' and `width' to `bar_area_x' and
14227 `bar_area_width', respectively.
14228 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
14229 background extension.
14231 2011-05-10 Jim Meyering <meyering@redhat.com>
14233 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
14235 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
14237 * image.c (Finit_image_library): Return t for built-in image types,
14238 like pbm and xbm. (Bug#8640)
14240 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
14242 * w32menu.c (set_frame_menubar): Fix submenu allocation.
14244 2011-05-07 Eli Zaretskii <eliz@gnu.org>
14246 * w32console.c (Fset_screen_color): Doc fix.
14247 (Fget_screen_color): New function.
14248 (syms_of_ntterm): Defsubr it.
14250 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
14251 unlink the temporary file if Fcall_process didn't create it in the
14253 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
14254 child process will be redirected to a file specified with `:file'.
14255 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
14256 cue to call_process_cleanup not to close that handle.
14258 2011-05-07 Ben Key <bkey76@gmail.com>
14260 * makefile.w32-in: The bootstrap-temacs rule now makes use of
14261 one of two shell specific rules, either bootstrap-temacs-CMD or
14262 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
14263 to the previous implementation of the bootstrap-temacs rule.
14264 The bootstrap-temacs-CMD rule is similar to the previous
14265 implementation of the bootstrap-temacs rule except that it
14266 makes use of the ESC_CFLAGS variable instead of the CFLAGS
14269 These changes, along with some changes to nt/configure.bat,
14270 nt/gmake.defs, and nt/nmake.defs, are required to extend my
14271 earlier fix to add support for --cflags and --ldflags options
14272 that include quotes so that it works whether make uses cmd or
14275 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
14277 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
14278 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
14280 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
14281 a string. Handle both cases.
14282 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
14283 (Fdbus_register_method): Use Qinvalid_function.
14285 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
14287 * makefile.w32-in: Update dependencies.
14288 (LISP_H): Add inttypes.h and stdin.h.
14289 (PROCESS_H): Add unistd.h.
14291 2011-05-06 Eli Zaretskii <eliz@gnu.org>
14293 * lread.c: Include limits.h (fixes the MS-Windows build broken by
14294 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
14296 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
14298 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
14300 * term.c (vfatal): Remove stray call to va_end.
14301 It's not needed and the C Standard doesn't allow it here anyway.
14303 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
14304 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
14306 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
14309 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
14311 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
14313 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
14315 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
14317 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
14319 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
14320 * charset.c (Fdefine_charset_internal): Don't initialize
14321 charset.code_space[15]. The value was garbage, on hosts with
14322 32-bit int (Bug#8600).
14324 * lread.c (read_integer): Be more consistent with string-to-number.
14325 Use string_to_number to do the actual conversion; this avoids
14326 rounding errors and fixes some other screwups. Without this fix,
14327 for example, #x1fffffffffffffff was misread as -2305843009213693952.
14328 (digit_to_number): Move earlier, for benefit of read_integer.
14329 Return -1 if the digit is out of range for the base, -2 if it is
14330 not a digit in any supported base. (Bug#8602)
14332 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
14334 * dispnew.c (scrolling_window): Return 1 if we scrolled,
14335 to match comment at start of function. This also removes a
14336 GCC warning about overflow in a 32+64-bit port.
14338 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
14340 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
14341 Reported by Stefan Monnier in
14342 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
14343 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
14344 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
14346 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
14347 (EMACS_UINTPTR): Likewise, with uintptr_t.
14349 * lisp.h: Prefer 64-bit EMACS_INT if available.
14350 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
14351 on 32-bit hosts that have 64-bit int, so that they can access
14353 However, temporarily disable this change unless the temporary
14354 symbol WIDE_EMACS_INT is defined.
14356 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
14358 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
14359 This removes an assumption that EMACS_INT and long are the same
14360 width as pointers. The assumption is true for Emacs porting targets
14361 now, but we want to make other targets possible.
14362 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
14363 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
14364 In the rest of the code, change types of integers that hold casted
14365 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
14366 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
14367 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
14368 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
14369 No need to cast type when ORing.
14370 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
14371 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
14372 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
14373 assume EMACS_INT is the same width as char *.
14374 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
14375 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
14376 Remove no-longer-needed casts.
14377 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
14378 (xg_tool_bar_help_callback, xg_make_tool_item):
14379 Use EMACS_INTPTR to hold an integer
14380 that will be cast to void *; this can avoid a GCC warning
14381 if EMACS_INT is not the same width as void *.
14382 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
14383 * xdisp.c (display_echo_area_1, resize_mini_window_1):
14384 (current_message_1, set_message_1):
14385 Use a local to convert to proper width without a cast.
14386 * xmenu.c (dialog_selection_callback): Likewise.
14388 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
14389 Also, don't assume VALBITS / RAND_BITS is less than 5,
14390 and don't rely on undefined behavior when shifting a 1 left into
14392 * lisp.h (get_random): Change signature to match.
14394 * lread.c (hash_string): Use size_t, not int, for hash computation.
14395 Normally we prefer signed values; but hashing is special, because
14396 it's better to use unsigned division on hash table sizes so that
14397 the remainder is nonnegative. Also, size_t is the natural width
14398 for hashing into memory. The previous code used 'int', which doesn't
14399 retain enough info to hash well into very large tables.
14400 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
14402 * dbusbind.c: Don't possibly lose pointer info when converting.
14403 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
14404 Use XPNTR rather than XHASH, so that the high-order bits of
14405 the pointer aren't lost when converting through void *.
14407 * eval.c (Fautoload): Don't double-shift a pointer.
14409 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
14411 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
14413 * gnutls.c (DEF_GNUTLS_FN):
14414 * image.c (DEF_IMGLIB_FN): Make function pointers static.
14416 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
14418 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
14421 2011-05-05 Eli Zaretskii <eliz@gnu.org>
14423 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
14424 New version that can reserve upto 2GB of heap space.
14426 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
14428 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
14430 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
14432 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
14433 `gnutls_certificate_set_x509_key_file'.
14435 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
14437 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
14438 Update dependencies.
14440 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
14442 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
14443 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
14444 Remove unused parameter `fildes'.
14445 * process.c (read_process_output, send_process): Don't pass it.
14447 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
14449 Fix previous change: the library cache is defined in w32.c.
14450 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
14451 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
14453 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
14455 Implement dynamic loading of GnuTLS on Windows.
14457 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
14458 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
14459 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
14462 * gnutls.c (Qgnutls_dll): Define.
14463 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
14464 (gnutls_*): Declare function pointers.
14465 (init_gnutls_functions): New function to initialize function pointers.
14466 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
14467 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
14468 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
14469 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
14470 (emacs_gnutls_write, emacs_gnutls_read)
14471 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
14472 (Fgnutls_available_p): New function.
14473 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
14474 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
14475 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
14477 * image.c: Include w32.h.
14478 (Vimage_type_cache): Delete.
14479 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
14480 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
14481 (w32_delayed_load): Move to w32.c.
14483 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
14485 * w32.c (QCloaded_from, Vlibrary_cache): Define.
14486 (w32_delayed_load): Move from image.c. When loading a library, record
14487 its filename in the :loaded-from property of the library id.
14488 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
14489 Initialize and staticpro them.
14490 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
14492 * process.c: Include lisp.h before w32.h, not after.
14493 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
14494 instead of gnutls_record_check_pending.
14496 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
14498 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
14500 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
14501 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
14504 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
14506 * xterm.c (x_set_frame_alpha): Do not set property on anything
14507 else than FRAME_X_OUTER_WINDOW (Bug#8608).
14509 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
14511 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
14513 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
14515 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
14516 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
14517 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
14518 (gnutls_global_initialized, Qgnutls_bootprop_priority)
14519 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
14520 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
14521 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
14522 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
14523 (Qgnutls_bootprop_callbacks_verify): Make static.
14525 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
14527 * callproc.c: Indentation fixup.
14529 * sysdep.c (wait_for_termination_1): Make static.
14530 (wait_for_termination, interruptible_wait_for_termination):
14531 Move after wait_for_termination_1.
14533 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
14535 * sysdep.c (interruptible_wait_for_termination): New function
14536 which is like wait_for_termination, but allows keyboard
14539 * callproc.c (Fcall_process): Add (:file "file") as an option for
14541 (Fcall_process_region): Ditto.
14543 2011-04-30 Eli Zaretskii <eliz@gnu.org>
14545 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
14546 rather than `XVECTOR (FOO)->size'.
14548 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
14549 inttypes.h, as a gnulib replacement is used if it not available in
14552 2011-04-21 Eli Zaretskii <eliz@gnu.org>
14554 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
14555 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
14556 of MOST_POSITIVE_FIXNUM. (Bug#8528)
14558 * coding.c (coding_alloc_by_realloc): Error out if destination
14559 will grow beyond MOST_POSITIVE_FIXNUM.
14560 (decode_coding_emacs_mule): Abort if there isn't enough place in
14561 charbuf for the composition carryover bytes. Reserve an extra
14562 space for up to 2 characters produced in a loop.
14563 (decode_coding_iso_2022): Abort if there isn't enough place in
14564 charbuf for the composition carryover bytes.
14566 2011-04-21 Eli Zaretskii <eliz@gnu.org>
14568 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
14569 aborting when %lld or %lll format is passed.
14570 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
14571 %llo or %llx format is passed. (Bug#8545)
14573 * window.c (window_scroll_line_based): Use a marker instead of
14574 simple variables to record original value of point. (Bug#7952)
14576 * doprnt.c (doprnt): Fix the case where a multibyte sequence
14577 produced by %s or %c overflows available buffer space. (Bug#8545)
14579 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
14581 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
14582 (SIZE_MAX): Move defn after all includes, as they might #define it.
14584 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
14586 * w32.c (init_environment): Warn about defaulting HOME to C:\.
14588 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
14590 * keyboard.c (Qdelayed_warnings_hook): Define.
14591 (command_loop_1): Run `delayed-warnings-hook'
14592 if Vdelayed_warnings_list is non-nil.
14593 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
14594 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
14596 2011-04-28 Eli Zaretskii <eliz@gnu.org>
14598 * doprnt.c (doprnt): Don't return value smaller than the buffer
14599 size if the message was truncated. (Bug#8545).
14601 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
14603 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
14604 (Fx_window_property): #if-0 the whole functions, not just the bodies.
14606 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
14608 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
14610 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
14612 * makefile.w32-in: Update dependencies.
14614 2011-04-27 Eli Zaretskii <eliz@gnu.org>
14616 Improve `doprnt' and its usage. (Bug#8545)
14617 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
14618 `format_end'. Remove support for %l as a conversion specifier.
14619 Don't use xrealloc. Improve diagnostics when the %l size modifier
14620 is used. Update the commentary.
14622 * eval.c (verror): Simplify calculation of size_t.
14624 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
14627 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
14629 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
14632 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
14634 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
14635 This makes this file independent of the recent pseudovector change.
14637 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
14639 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
14641 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
14642 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
14643 Remove unused local.
14644 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
14646 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
14647 GCC 4.6.0 optimizes based on type-based alias analysis.
14648 For example, if b is of type struct buffer * and v of type struct
14649 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
14650 != &v->size, and therefore "v->size = 1; b->size = 2; return
14651 v->size;" must therefore return 1. This assumption is incorrect
14652 for Emacs, since it type-puns struct Lisp_Vector * with many other
14653 types. To fix this problem, this patch adds a new type struct
14654 vectorlike_header that documents the constraints on layout of vectors
14655 and pseudovectors, and helps optimizing compilers not get fooled
14656 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
14657 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
14658 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
14660 (XSETPVECTYPE): Rewrite in terms of new macro.
14661 (XSETPVECTYPESIZE): New macro, specifying both type and size.
14662 This is a bit clearer, and further avoids the possibility of
14663 undesirable aliasing.
14664 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
14665 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
14666 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
14667 since Lisp_Subr is a special case (no "next" field).
14668 (ASIZE): Now uses header.size rather than size.
14669 All previous uses of XVECTOR (foo)->size replaced to use this macro,
14670 to avoid the hassle of writing XVECTOR (foo)->header.size.
14671 (struct vectorlike_header): New type.
14672 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
14673 object, to help avoid aliasing.
14674 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
14675 (SUBRP): Likewise, since Lisp_Subr is a special case.
14676 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
14677 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
14678 (struct Lisp_Hash_Table): Combine first two members into a single
14679 struct vectorlike_header member. All uses of "size" and "next" members
14680 changed to be "header.size" and "header.next".
14681 * buffer.h (struct buffer): Likewise.
14682 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
14683 * frame.h (struct frame): Likewise.
14684 * process.h (struct Lisp_Process): Likewise.
14685 * termhooks.h (struct terminal): Likewise.
14686 * window.c (struct save_window_data, struct saved_window): Likewise.
14687 * window.h (struct window): Likewise.
14688 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
14689 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
14690 * buffer.c (init_buffer_once): Likewise.
14691 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
14693 * process.c (Fformat_network_address): Use local var for size,
14696 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
14698 Make the Lisp reader and string-to-float more consistent (Bug#8525)
14699 * data.c (atof): Remove decl; no longer used or needed.
14700 (digit_to_number): Move to lread.c.
14701 (Fstring_to_number): Use new string_to_number function, to be
14702 consistent with how the Lisp reader treats infinities and NaNs.
14703 Do not assume that floating-point numbers represent EMACS_INT
14704 without losing information; this is not true on most 64-bit hosts.
14705 Avoid double-rounding errors, by insisting on integers when
14706 parsing non-base-10 numbers, as the documentation specifies.
14707 * lisp.h (string_to_number): New decl, replacing ...
14708 (isfloat_string): Remove.
14709 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
14710 (read1): Do not accept +. and -. as integers; this
14711 appears to have been a coding error. Similarly, do not accept
14712 strings like +-1e0 as floating point numbers. Do not report
14713 overflow for integer overflows unless the base is not 10 which
14714 means we have no simple and reliable way to continue.
14715 Break out the floating-point parsing into a new
14716 function string_to_number, so that Fstring_to_number parses
14717 floating point numbers consistently with the Lisp reader.
14718 (digit_to_number): Move here from data.c. Make it static inline.
14719 (E_CHAR, EXP_INT): Remove, replacing with ...
14720 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
14721 (string_to_number): New function, replacing isfloat_string.
14722 This function checks for valid syntax and produces the resulting
14723 Lisp float number too. Rework it so that string-to-number
14724 no longer mishandles examples like "1.0e+". Use strtoumax,
14725 so that overflow for non-base-10 numbers is reported only when
14726 there's no portable and simple way to convert to floating point.
14728 * textprop.c (set_text_properties_1): Rewrite for clarity,
14729 and to avoid GCC warning about integer overflow.
14731 * intervals.h (struct interval): Use EMACS_INT for members
14732 where EMACS_UINT might cause problems. See
14733 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
14734 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
14735 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
14737 (offset_intervals): Tell GCC not to worry about length overflow
14738 when negating a negative length.
14740 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
14741 (overrun_check_free): Likewise.
14743 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
14744 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
14747 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
14748 (gnutls_make_error): Rename local to avoid shadowing.
14749 (gnutls_emacs_global_deinit): ifdef out; not used.
14750 (Fgnutls_boot): Use const for pointer to readonly storage.
14751 Comment out unused local. Fix pointer signedness problems.
14753 * lread.c (openp): Don't stuff size_t into an 'int'.
14754 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
14755 about possible signed overflow.
14757 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
14758 (GDK_KEY_g): Don't define if already defined.
14759 (xg_prepare_tooltip): Avoid pointer signedness problem.
14760 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
14762 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
14763 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
14765 * xfns.c (Fx_window_property): Simplify a bit,
14766 to make a bit faster and to avoid GCC 4.6.0 warning.
14767 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
14769 * fns.c (internal_equal): Don't assume size_t fits in int.
14771 * alloc.c (compact_small_strings): Tighten assertion a little.
14773 Replace pEd with more-general pI, and fix some printf arg casts.
14774 * lisp.h (pI): New macro, generalizing old pEd macro to other
14775 conversion specifiers. For example, use "...%"pI"d..." rather
14776 than "...%"pEd"...".
14777 (pEd): Remove. All uses replaced with similar uses of pI.
14778 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
14779 * alloc.c (check_pure_size): Don't overflow by converting size to int.
14780 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
14781 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
14782 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
14783 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
14784 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
14786 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
14787 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
14788 * print.c (safe_debug_print, print_object): Likewise.
14789 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
14791 Use pI instead of if-then-else-abort. Use %p to avoid casts,
14792 avoiding the 0 flag, which is not portable.
14793 * process.c (Fmake_network_process): Use pI to avoid cast.
14794 * region-cache.c (pp_cache): Likewise.
14795 * xdisp.c (decode_mode_spec): Likewise.
14796 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
14797 behavior on 64-bit hosts with printf arg.
14798 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
14799 (x_stop_queuing_selection_requests): Likewise.
14800 (x_get_window_property): Don't truncate byte count to an 'int'
14803 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
14804 here, since it parses constructs like leading '-' and spaces,
14805 which are not wanted; and it overflows with large numbers.
14806 Instead, simply match F[0-9]+, which is what is wanted anyway.
14808 * alloc.c: Remove unportable assumptions about struct layout.
14809 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
14810 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
14811 (allocate_vectorlike, make_pure_vector): Use the new macros,
14812 plus offsetof, to remove unportable assumptions about struct layout.
14813 These assumptions hold on all porting targets that I know of, but
14814 they are not guaranteed, they're easy to remove, and removing them
14815 makes further changes easier.
14817 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
14818 This doesn't fix a bug but makes the code clearer.
14819 (string_overrun_cookie): Now const. Use initializers that
14820 don't formally overflow signed char, to avoid warnings.
14821 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
14822 can cause Emacs to crash when string overrun checking is enabled.
14823 (allocate_buffer): Don't assume sizeof (struct buffer) is a
14824 multiple of sizeof (EMACS_INT); it need not be, if
14825 alignof(EMACS_INT) < sizeof (EMACS_INT).
14826 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
14828 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
14830 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
14832 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
14834 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
14835 supposed to be handshaking. (Bug#8556)
14836 Reported by Paul Eggert <eggert@cs.ucla.edu>.
14838 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
14840 * lisp.h (Qdebug): List symbol.
14841 * eval.c (Qdebug): Restore global linkage.
14842 * keyboard.c (debug-on-event): New variable.
14843 (handle_user_signal): Break into debugger when debug-on-event
14844 matches the current signal symbol.
14846 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
14848 * alloc.c (check_sblock, check_string_bytes)
14849 (check_string_free_list): Convert to standard C.
14851 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
14853 * w32.c (emacs_gnutls_push): Fix typo.
14855 2011-04-25 Eli Zaretskii <eliz@gnu.org>
14857 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
14858 "cast to pointer from integer of different size".
14860 Improve doprnt and its use in verror. (Bug#8545)
14861 * doprnt.c (doprnt): Document the set of format control sequences
14862 supported by the function. Use SAFE_ALLOCA instead of always
14865 * eval.c (verror): Don't limit the buffer size at size_max-1, that
14866 is one byte too soon. Don't use xrealloc; instead xfree and
14869 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
14871 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
14874 * gnutls.c: Renamed global_initialized to
14875 gnutls_global_initialized. Added internals for the
14876 :verify-hostname-error, :verify-error, and :verify-flags
14877 parameters of `gnutls-boot' and documented those parameters in the
14878 docstring. Start callback support.
14879 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
14880 unless a fatal error occurred. Call gnutls_alert_send_appropriate
14881 on error. Return error code.
14882 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
14883 (emacs_gnutls_read): Likewise.
14884 (Fgnutls_boot): Return handshake error code.
14885 (emacs_gnutls_handle_error): New function.
14886 (wsaerror_to_errno): Likewise.
14888 * w32.h (emacs_gnutls_pull): Add prototype.
14889 (emacs_gnutls_push): Likewise.
14891 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
14892 (emacs_gnutls_push): Likewise.
14894 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
14896 * process.c (wait_reading_process_output): Check if GnuTLS
14897 buffered some data internally if no FDs are set for TLS
14900 * makefile.w32-in (OBJ2): Add gnutls.$(O).
14901 (LIBS): Link to USER_LIBS.
14902 ($(BLD)/gnutls.$(0)): New target.
14904 2011-04-24 Eli Zaretskii <eliz@gnu.org>
14906 * xdisp.c (handle_single_display_spec): Rename the
14907 display_replaced_before_p argument into display_replaced_p, to
14908 make it consistent with the commentary. Fix typos in the
14911 * textprop.c (syms_of_textprop): Remove dead code.
14912 (copy_text_properties): Delete obsolete commentary about an
14913 interface that was deleted long ago. Fix typos in the description
14916 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
14917 to changes in oldXMenu/XMenu.h from 2011-04-16.
14918 <menu_help_message, prev_menu_help_message>: Constify.
14919 (IT_menu_make_room): menu->help_text is now `const char **';
14922 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
14923 to changes in oldXMenu/XMenu.h from 2011-04-16.
14924 (struct XMenu): Declare `help_text' `const char **'.
14926 * xfaces.c <Qunspecified>: Make extern again.
14928 * syntax.c: Include sys/types.h before including regex.h, as
14931 * doc.c (get_doc_string): Improve the format passed to `error'.
14933 * doprnt.c (doprnt): Improve commentary.
14935 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
14937 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
14940 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
14941 changes in globals.h immediately force recompilation.
14942 (TAGS): Depend on $(CURDIR)/m/intel386.h and
14943 $(CURDIR)/s/ms-w32.h.
14944 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
14946 * character.c (Fchar_direction): Function deleted.
14947 (syms_of_character): Don't defsubr it.
14948 <char-direction-table>: Deleted.
14950 2011-04-23 Eli Zaretskii <eliz@gnu.org>
14952 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
14953 * doprnt.c: Include limits.h.
14954 (SIZE_MAX): New macro.
14955 (doprnt): Return a size_t value. 2nd arg is now size_t.
14956 Many local variables are now size_t instead of int or unsigned.
14957 Improve overflow protection. Support `l' modifier for integer
14958 conversions. Support %l conversion. Don't assume an EMACS_INT
14959 argument for integer conversions and for %c.
14961 * lisp.h (doprnt): Restore prototype.
14963 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
14964 $(SRC)/character.h.
14966 * Makefile.in (base_obj): Add back doprnt.o.
14968 * deps.mk (doprnt.o): Add back prerequisites.
14969 (callint.o): Depend on character.h.
14971 * eval.c (internal_lisp_condition_case): Include the handler
14972 representation in the error message.
14973 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
14974 when breaking from the loop.
14976 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
14978 * callint.c (Fcall_interactively): When displaying error message
14979 about invalid control letter, pass the character's codepoint, not
14980 a pointer to its multibyte form. Improve display of the character
14981 in octal and display also its hex code.
14983 * character.c (char_string): Use %x to display the (unsigned)
14984 codepoint of an invalid character, to avoid displaying a bogus
14987 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
14988 `error', not SYMBOL_NAME itself.
14990 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
14991 character arguments to `error'.
14993 * charset.c (check_iso_charset_parameter): Fix incorrect argument
14994 to `error' in error message about FINAL_CHAR argument. Make sure
14995 FINAL_CHAR is a character, and use %c when it is passed as
14996 argument to `error'.
14998 2011-04-23 Eli Zaretskii <eliz@gnu.org>
15000 * s/ms-w32.h (localtime): Redirect to sys_localtime.
15002 * w32.c: Include <time.h>.
15003 (sys_localtime): New function.
15005 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
15007 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
15009 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
15011 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
15013 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
15014 zombies (Bug#8467).
15016 2011-04-19 Eli Zaretskii <eliz@gnu.org>
15018 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
15019 gl_state.e_property when gl_state.object is Qt.
15021 * insdel.c (make_gap_larger): Remove limitation of buffer size
15024 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
15026 * xdisp.c (lookup_glyphless_char_display)
15027 (produce_glyphless_glyph): Handle cons cell entry in
15028 glyphless-char-display.
15029 (Vglyphless_char_display): Document it.
15031 * term.c (produce_glyphless_glyph): Handle cons cell entry in
15032 glyphless-char-display.
15034 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
15036 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
15038 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
15040 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
15041 definition for no-X builds.
15043 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
15045 Static checks with GCC 4.6.0 and non-default toolkits.
15047 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
15049 * process.c (keyboard_bit_set): Define only if SIGIO.
15050 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
15051 (send_process): Repair possible setjmp clobbering.
15053 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
15055 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
15057 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
15059 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
15060 Define only if needed.
15062 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
15063 by pacifying GCC about it. Maybe it's time to retire it?
15064 * xfaces.c (USG, __TIMEVAL__): Likewise.
15066 * dispextern.h (struct redisplay_interface): Rename param
15067 to avoid shadowing.
15068 * termhooks.h (struct terminal): Likewise.
15069 * xterm.c (xembed_send_message): Likewise.
15071 * insdel.c (make_gap_smaller): Define only if
15072 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
15074 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
15077 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
15078 so that we aren't warned about unused symbols.
15080 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
15082 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
15084 * xfns.c (x_real_positions): Mark locals as initialized.
15086 * xmenu.c (xmenu_show): Don't use uninitialized vars.
15088 * xterm.c: Fix problems found by static analysis with other toolkits.
15089 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
15090 (x_dispatch_event): Declare static if USE_GTK, and
15091 define if USE_GTK || USE_X_TOOLKIT.
15092 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
15093 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
15094 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
15095 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
15097 * xmenu.c (menu_help_callback): Pointer type fixes.
15098 Use const pointers when pointing at readonly data. Avoid pointer
15099 signedness clashes.
15100 (FALSE): Remove unused macro.
15101 (update_frame_menubar): Remove unused decl.
15103 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
15105 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
15106 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
15107 (single_menu_item): Rename local to avoid shadowing.
15109 * keyboard.c (make_lispy_event): Remove unused local var.
15111 * frame.c, frame.h (x_get_resource_string): Bring this back, but
15112 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
15114 * bitmaps: Change bitmaps from unsigned char back to the X11
15115 compatible char. Avoid the old compiler warnings about
15116 out-of-range initializers by using, for example, '\xab' rather
15119 * xgselect.c (xgselect_initialize): Check vs interface
15120 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
15122 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
15124 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
15125 to read-only memory.
15127 * fns.c (vector): Remove; this old hack is no longer needed.
15129 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
15131 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
15133 * xrdb.c (x_load_resources): Omit unused local.
15135 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
15136 (x_window): Rename locals to avoid shadowing.
15137 (USG): Use the kludged USG macro, to pacify gcc.
15139 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
15140 (x_term_init): Remove local to avoid shadowing.
15142 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
15144 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
15145 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
15147 2011-04-16 Eli Zaretskii <eliz@gnu.org>
15149 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
15151 Fix regex.c, syntax.c and friends for buffers > 2GB.
15152 * syntax.h (struct gl_state_s): Declare character position members
15155 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
15157 * textprop.c (verify_interval_modification, interval_of):
15158 Declare arguments EMACS_INT.
15160 * intervals.c (adjust_intervals_for_insertion): Declare arguments
15163 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
15165 * indent.c (Fvertical_motion): Local variable it_start is now
15168 * regex.c (re_match, re_match_2, re_match_2_internal)
15169 (bcmp_translate, regcomp, regexec, print_double_string)
15170 (group_in_compile_stack, re_search, re_search_2, regex_compile)
15171 (re_compile_pattern, re_exec): Declare arguments and local
15172 variables `size_t' and `ssize_t' and return values `regoff_t', as
15174 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
15175 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
15176 <compile_stack_type>: `size' and `avail' are now `size_t'.
15178 * regex.h <regoff_t>: Use ssize_t, not int.
15179 (re_search, re_search_2, re_match, re_match_2): Arguments that
15180 specify buffer/string position and length are now ssize_t and
15181 size_t. Return type is regoff_t.
15183 2011-04-16 Ben Key <bkey76@gmail.com>
15185 * nsfont.m: Fixed bugs in ns_get_family and
15186 ns_descriptor_to_entity that were caused by using free to
15187 deallocate memory blocks that were allocated by xmalloc (via
15188 xstrdup). This caused Emacs to crash when compiled with
15189 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
15190 --enable-checking=xmallocoverrun). xfree is now used to
15191 deallocate these memory blocks.
15193 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
15195 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
15197 emacs_write: Accept and return EMACS_INT for sizes.
15198 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
15200 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
15201 Accept and return EMACS_INT.
15202 (emacs_gnutls_write): Return the number of bytes written on
15204 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
15205 (emacs_read, emacs_write): Remove check for negative size, as the
15206 Emacs source code has been audited now.
15207 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
15208 (emacs_read, emacs_write): Use it.
15209 * process.c (send_process): Adjust to the new signatures of
15210 emacs_write and emacs_gnutls_write. Do not attempt to store
15211 a byte offset into an 'int'; it might overflow.
15212 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
15214 * sound.c: Don't assume sizes fit in 'int'.
15215 (struct sound_device.period_size, alsa_period_size):
15216 Return EMACS_INT, not int.
15217 (struct sound_device.write, vox_write, alsa_write):
15218 Accept EMACS_INT, not int.
15219 (wav_play, au_play): Use EMACS_INT to store sizes and to
15220 record read return values.
15222 2011-04-15 Ben Key <bkey76@gmail.com>
15224 * keyboard.c (Qundefined): Don't declare static since it is used
15226 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
15227 static since they are used in nsfont.m.
15229 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
15231 * process.c (Qprocessp): Don't declare static.
15232 * lisp.h (Qprocessp): Declare again.
15234 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
15236 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
15238 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
15240 Improve C-level modularity by making more things 'static'.
15242 Don't publish debugger-only interfaces to other modules.
15243 * lisp.h (safe_debug_print, debug_output_compilation_hack):
15244 (verify_bytepos, count_markers): Move decls to the only modules
15246 * region-cache.h (pp_cache): Likewise.
15247 * window.h (check_all_windows): Likewise.
15248 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
15250 * sysdep.c (croak): Now static, if
15251 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
15252 * syssignal.h (croak): Declare only if not static.
15254 * alloc.c (refill_memory_reserve): Now static if
15255 !defined REL_ALLOC || defined SYSTEM_MALLOC.
15256 * lisp.h (refill_memory_reserve): Declare only if not static.
15258 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
15259 Define only if USE_LUCID.
15261 * xrdb.c (x_customization_string, x_rm_string): Now static.
15263 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
15264 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
15266 * xdisp.c (draw_row_with_mouse_face): Now static.
15267 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
15269 * window.h (check_all_windows): Mark externally visible.
15271 * window.c (window_deletion_count): Now static.
15273 * undo.c: Make symbols static if they're not exported.
15274 (last_undo_buffer, last_boundary_position, pending_boundary):
15277 * textprop.c (interval_insert_behind_hooks): Now static.
15278 (interval_insert_in_front_hooks): Likewise.
15280 * term.c: Make symbols static if they're not exported.
15281 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
15282 (max_frame_lines, tty_set_terminal_modes):
15283 (tty_reset_terminal_modes, tty_turn_off_highlight):
15284 (get_tty_terminal): Now static.
15285 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
15286 * termhooks.h (term_mouse_moveto): Do not declare if
15287 HAVE_WINDOW_SYSTEM.
15288 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
15289 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
15291 * sysdep.c: Make symbols static if they're not exported.
15292 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
15294 (sigprocmask_set, full_mask): Remove; unused.
15295 (wait_debugging): Mark as visible.
15296 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
15297 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
15299 * syntax.c (syntax_temp): Define only if !__GNUC__.
15301 * sound.c (current_sound_device, current_sound): Now static.
15303 * search.c (searchbufs, searchbuf_head): Now static.
15305 * scroll.c (scroll_cost): Remove; unused.
15306 * dispextern.h (scroll_cost): Remove decl.
15308 * region-cache.h (pp_cache): Mark as externally visible.
15310 * process.c: Make symbols static if they're not exported.
15311 (process_tick, update_tick, create_process, chan_process):
15312 (Vprocess_alist, proc_buffered_char, datagram_access):
15313 (fd_callback_data, send_process_frame, process_sent_to): Now static.
15314 (deactivate_process): Mark defn as static, as well as decl.
15315 * lisp.h (create_process): Remove decl.
15316 * process.h (chan_process, Vprocess_alist): Remove decls.
15318 * print.c: Make symbols static if they're not exported.
15319 (print_depth, new_backquote_output, being_printed, print_buffer):
15320 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
15321 (print_interval, print_number_index, initial_stderr_stream):
15323 * lisp.h (Fprinc): Remove decl.
15324 (debug_output_compilation_hack): Mark as externally visible.
15326 * sysdep.c (croak): Move decl from here to syssignal.h.
15327 * syssignal.h (croak): Put it here, so the API can be checked when
15328 'croak' is called from dissociate_if_controlling_tty.
15330 * minibuf.c: Make symbols static if they're not exported.
15331 (minibuf_save_list, choose_minibuf_frame): Now static.
15332 * lisp.h (choose_minibuf_frame): Remove decl.
15334 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
15336 * lread.c: Make symbols static if they're not exported.
15337 (read_objects, initial_obarray, oblookup_last_bucket_number):
15339 (make_symbol): Remove; unused.
15340 * lisp.h (initial_obarray, make_symbol): Remove decls.
15342 * keyboard.c: Make symbols static if they're not exported.
15343 (single_kboard, recent_keys_index, total_keys, recent_keys):
15344 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
15345 (this_single_command_key_start, echoing, last_auto_save):
15346 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
15347 (command_loop, echo_now, keyboard_init_hook, help_char_p):
15348 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
15349 (Vlispy_mouse_stem, double_click_count):
15351 (force_auto_save_soon): Define only if SIGDANGER.
15352 (ignore_mouse_drag_p): Now static if
15353 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
15354 (print_help): Remove; unused.
15355 (stop_character, last_timer_event): Mark as externally visible.
15356 * keyboard.h (ignore_mouse_drag_p): Declare only if
15357 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
15358 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
15359 * lisp.h (echoing): Remove decl.
15360 (force_auto_save_soon): Declare only if SIGDANGER.
15361 * xdisp.c (redisplay_window): Simplify code, to make it more
15362 obvious that ignore_mouse_drag_p is not accessed if !defined
15363 USE_GTK && !defined HAVE_NS.
15365 * intervals.c: Make symbols static if they're not exported.
15366 (merge_properties_sticky, merge_interval_right, delete_interval):
15368 * intervals.h (merge_interval_right, delete_interval): Remove decls.
15370 * insdel.c: Make symbols static if they're not exported.
15371 However, leave prepare_to_modify_buffer alone. It's never
15372 called from outside this function, but that appears to be a bug.
15373 (combine_after_change_list, combine_after_change_buffer):
15374 (adjust_after_replace, signal_before_change): Now static.
15375 (adjust_after_replace_noundo): Remove; unused.
15376 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
15377 (signal_before_change): Remove decls.
15379 * indent.c (val_compute_motion, val_vmotion): Now static.
15381 * image.c: Make symbols static if they're not exported.
15382 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
15384 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
15385 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
15387 * fringe.c (standard_bitmaps): Now static.
15388 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
15390 * frame.c: Make symbols static if they're not exported.
15391 (x_report_frame_params, make_terminal_frame): Now static.
15392 (get_frame_param): Now static, unless HAVE_NS.
15393 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
15394 (x_get_resource_string): Remove; not used.
15395 * frame.h (make_terminal_frame, x_report_frame_params):
15396 (x_get_resource_string); Remove decls.
15397 (x_fullscreen_adjust): Declare only if WINDOWSNT.
15398 * lisp.h (get_frame_param): Declare only if HAVE_NS.
15400 * font.c, fontset.c: Make symbols static if they're not exported.
15401 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
15402 (FACE_SUITABLE_FOR_CHAR_P): Use it.
15403 * font.c (font_close_object): Now static.
15404 * font.h (font_close_object): Remove.
15405 * fontset.c (FONTSET_OBJLIST): Remove.
15406 (free_realized_fontset) #if-0 the body, which does nothing.
15407 (face_suitable_for_char_p): #if-0, as it's never called.
15408 * fontset.h (face_suitable_for_char_p): Remove decl.
15409 * xfaces.c (face_at_string_position):
15410 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
15411 since 0 is always ASCII.
15413 * fns.c (weak_hash_tables): Now static.
15415 * fileio.c: Make symbols static if they're not exported.
15416 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
15417 (Vwrite_region_annotation_buffers): Now static.
15419 * eval.c: Make symbols static if they're not exported.
15420 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
15421 * lisp.h (backtrace_list): Remove decl.
15423 * emacs.c: Make symbols static if they're not exported.
15424 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
15425 (fatal_error_code, fatal_error_signal_hook, standard_args):
15427 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
15428 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
15429 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
15430 * lisp.h (fatal_error_signal_hook): Remove decl.
15431 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
15433 * editfns.c: Move a (normally-unused) function to its only use.
15434 * editfns.c, lisp.h (get_operating_system_release): Remove.
15435 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
15436 worth the hassle of breaking this out.
15438 * xterm.c: Make symbols static if they're not exported.
15439 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
15440 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
15441 (x_destroy_window, x_delete_display):
15443 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
15444 (x_mouse_leave): Remove; unused.
15445 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
15446 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
15447 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
15449 (x_mouse_leave): Declare only if WINDOWSNT.
15450 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
15451 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
15454 * ftxfont.c: Make symbols static if they're not exported.
15455 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
15457 * font.h (ftxfont_driver): Likewise.
15459 * xfns.c: Make symbols static if they're not exported.
15460 (x_last_font_name, x_display_info_for_name):
15461 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
15462 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
15463 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
15464 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
15465 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
15466 (last_show_tip_args): Now static.
15467 (xic_defaut_fontset, xic_create_fontsetname): Define only if
15468 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
15469 (x_screen_planes): Remove; unused.
15470 * dispextern.h (x_screen_planes): Remove decl.
15472 * dispnew.c: Make symbols static if they're not exported.
15473 * dispextern.h (redraw_garbaged_frames, scrolling):
15474 (increment_row_positions): Remove.
15475 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
15476 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
15478 (redraw_garbaged_frames): Remove; unused.
15480 * xfaces.c: Make symbols static if they're not exported.
15481 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
15483 * xterm.h (defined_color): Remove decls.
15484 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
15485 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
15486 (menu_face_changed_default, defined_color, free_realized_face):
15487 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
15488 (ascii_face_of_lisp_face): Remove; unused.
15490 * xdisp.c: Make symbols static if they're not exported.
15491 * dispextern.h (scratch_glyph_row, window_box_edges):
15492 (glyph_to_pixel_coords, set_cursor_from_row):
15493 (get_next_display_element, set_iterator_to_next):
15494 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
15495 (show_mouse_face): Remove decls
15496 * frame.h (message_buf_print): Likewise.
15497 * lisp.h (pop_message, set_message, check_point_in_composition):
15499 * xterm.h (set_vertical_scroll_bar): Likewise.
15500 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
15501 (message_buf_print, scratch_glyph_row, displayed_buffer):
15502 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
15503 (get_next_display_element, show_mouse_face, window_box_edges):
15504 (frame_to_window_pixel_xy, check_point_in_composition):
15505 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
15506 (glyph_to_pixel_coords): Remove; unused.
15508 * dired.c (file_name_completion): Now static.
15510 * dbusbind.c (xd_in_read_queued_messages): Now static.
15512 * lisp.h (circular_list_error, FOREACH): Remove; unused.
15513 * data.c (circular_list_error): Remove.
15515 * commands.h (last_point_position, last_point_position_buffer):
15516 (last_point_position_window): Remove decls.
15517 * keyboard.c: Make these variables static.
15519 * coding.h (coding, code_convert_region, encode_coding_gap):
15521 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
15522 (iso_code_class, detect_coding, code_convert_region): Now static.
15523 (encode_coding_gap): Remove; unused.
15525 * chartab.c (chartab_chars, chartab_bits): Now static.
15527 * charset.h (charset_iso_8859_1): Remove decl.
15528 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
15531 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
15532 * ccl.c (Vccl_program_table): Now static.
15533 (check_ccl_update): Remove; unused.
15535 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
15536 * category.h: ... from here.
15537 * category.c (check_category_table, set_category_set): Now static.
15539 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
15540 * lisp.h: Remove these decls.
15542 * buffer.c (buffer_count): Remove unused var.
15544 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
15545 so that it's not optimized away.
15546 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
15547 * dispextern.h (bidi_dump_cached_states): Remove, since it's
15548 exported only to the debugger.
15550 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
15551 * atimer.h (run_all_atimers): Remove; not exported.
15553 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
15554 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
15555 was inaccessible from Lisp.
15556 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
15557 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
15559 alloc.c: Import and export fewer symbols, and remove unused items.
15560 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
15562 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
15563 it's not optimized away by whole-program optimization.
15564 (message_enable_multibyte, free_misc): Remove.
15565 (catchlist, handlerlist, mark_backtrace):
15566 Declare only if BYTE_MARK_STACK.
15567 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
15568 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
15569 (message_enable_multibyte): Remove decl.
15570 (free_misc, interval_free_list, float_block, float_block_index):
15571 (n_float_blocks, float_free_list, cons_block, cons_block_index):
15572 (cons_free_list, last_marked_index):
15574 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
15575 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
15576 (mark_backtrace): Define only if BYTE_MARK_STACK.
15577 * xdisp.c (message_enable_multibyte): Now static.
15579 Declare Lisp_Object Q* variables to be 'static' if not exported.
15580 This makes it easier for human readers (and static analyzers)
15581 to see whether these variables are used from other modules.
15582 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
15583 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
15584 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
15585 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
15586 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
15587 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
15588 * xmenu.c, xselect.c:
15589 Declare Q* vars static if they are not used in other modules.
15590 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
15591 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
15592 Remove decls of unexported vars.
15593 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
15595 * lisp.h (DEFINE_FUNC): Make sname 'static'.
15597 Make Emacs functions such as Fatom 'static' by default.
15598 This makes it easier for human readers (and static analyzers)
15599 to see whether these functions can be called from other modules.
15600 DEFUN now defines a static function. To make the function external
15601 so that it can be used in other C modules, use the new macro DEFUE.
15602 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
15603 (Finit_image_library):
15604 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
15605 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
15606 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
15607 Remove decls, since these functions are now static.
15608 (Funintern, Fget_internal_run_time): New decls, since these functions
15609 were already external.
15611 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
15612 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
15613 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
15614 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
15615 * keyboard.c, keymap.c, lread.c:
15616 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
15617 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
15618 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
15619 Mark functions with DEFUE instead of DEFUN,
15620 if they are used in other modules.
15621 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
15622 decls for now-static functions.
15623 * buffer.h (Fdelete_overlay): Remove decl.
15624 * callproc.c (Fgetenv_internal): Mark as internal.
15625 * composite.c (Fremove_list_of_text_properties): Remove decl.
15626 (Fcomposition_get_gstring): New forward static decl.
15627 * composite.h (Fcomposite_get_gstring): Remove decl.
15628 * dired.c (Ffile_attributes): New forward static decl.
15629 * doc.c (Fdocumntation_property): New forward static decl.
15630 * eval.c (Ffetch_bytecode): New forward static decl.
15631 (Funintern): Remove extern decl; now in .h file where it belongs.
15632 * fileio.c (Fmake_symbolic_link): New forward static decl.
15633 * image.c (Finit_image_library): New forward static decl.
15634 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
15635 * intervals.h (Fprevious_property_change):
15636 (Fremove_list_of_text_properties): Remove decls.
15637 * keyboard.c (Fthis_command_keys): Remove decl.
15638 (Fcommand_execute): New forward static decl.
15639 * keymap.c (Flookup_key): New forward static decl.
15640 (Fcopy_keymap): Now static.
15641 * keymap.h (Flookup_key): Remove decl.
15642 * process.c (Fget_process): New forward static decl.
15643 (Fprocess_datagram_address): Mark as internal.
15644 * syntax.c (Fsyntax_table_p): New forward static decl.
15645 (skip_chars): Remove duplicate decl.
15646 * textprop.c (Fprevious_property_change): New forward static decl.
15647 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
15649 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
15650 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
15652 * editfns.c (Fformat): Remove unreachable code.
15654 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
15656 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
15659 2011-04-13 Eli Zaretskii <eliz@gnu.org>
15661 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
15662 when at ZV. (Bug#8487)
15664 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
15666 * charset.c (Fclear_charset_maps): Use xfree instead of free.
15668 * keyboard.c (parse_tool_bar_item): Likewise.
15669 * sound.c (sound_cleanup, alsa_close): Likewise.
15670 * termcap.c (tgetent): Likewise.
15671 * xfns.c (x_default_font_parameter): Likewise.
15672 * xsettings.c (read_and_apply_settings): Likewise.
15674 * alloc.c (overrun_check_malloc, overrun_check_realloc)
15675 (overrun_check_free): Protoize.
15677 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
15679 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
15680 since callers should never pass a negative size.
15681 Change the signature to match that of plain 'read' and 'write'; see
15682 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
15683 * lisp.h: Update prototypes of emacs_write and emacs_read.
15685 2011-04-11 Eli Zaretskii <eliz@gnu.org>
15687 * xdisp.c (redisplay_window): Don't try to determine the character
15688 position of the scroll margin if the window start point w->startp
15689 is outside the buffer's accessible region. (Bug#8468)
15691 2011-04-10 Eli Zaretskii <eliz@gnu.org>
15693 Fix write-region and its subroutines for buffers > 2GB.
15694 * fileio.c (a_write, e_write): Modify declaration of arguments and
15695 local variables to support buffers larger than 2GB.
15696 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
15698 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
15699 argument, local variables, and return value.
15701 * lisp.h: Update prototypes of emacs_write and emacs_read.
15703 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
15705 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
15707 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
15709 Fix more problems found by GCC 4.6.0's static checks.
15711 * xdisp.c (vmessage): Use a better test for character truncation.
15713 * charset.c (load_charset_map): <, not <=, for optimization,
15714 and to avoid potential problems with integer overflow.
15715 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
15716 * casetab.c (set_identity, shuffle): Likewise.
15717 * editfns.c (Fformat): Likewise.
15718 * syntax.c (skip_chars): Likewise.
15720 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
15721 This also lets GCC 4.6.0 generate slightly better loop code.
15723 * callint.c (Fcall_interactively): <, not <=, for optimization.
15724 (Fcall_interactively): Count the number of arguments produced,
15725 not the number of arguments given. This is simpler and lets GCC
15726 4.6.0 generate slightly better code.
15728 * ftfont.c: Distingish more carefully between FcChar8 and char.
15729 The previous code passed unsigned char * to a functions like
15730 strlen and xstrcasecmp that expect char *, which does not
15731 conform to the C standard.
15732 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
15733 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
15734 char * when the C standard requires it.
15736 * keyboard.c (read_char): Remove unused var.
15738 * eval.c: Port to Windows vsnprintf (Bug#8435).
15739 Include <limits.h>.
15740 (SIZE_MAX): Define if the headers do not.
15741 (verror): Do not give up if vsnprintf returns a negative count.
15742 Instead, grow the buffer. This ports to Windows vsnprintf, which
15743 does not conform to C99. Problem reported by Eli Zaretskii.
15744 Also, simplify the allocation scheme, by avoiding the need for
15745 calling realloc, and removing the ALLOCATED variable.
15747 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
15749 Remove invocations of doprnt, as Emacs now uses vsnprintf.
15750 But keep the doprint source code for now, as we might revamp it
15751 and use it again (Bug#8435).
15752 * lisp.h (doprnt): Remove.
15753 * Makefile.in (base_obj): Remove doprnt.o.
15754 * deps.mk (doprnt.o): Remove.
15756 error: Print 32- and 64-bit integers portably (Bug#8435).
15757 Without this change, on typical 64-bit hosts error ("...%d...", N)
15758 was used to print both 32- and 64-bit integers N, which relied on
15759 undefined behavior.
15760 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
15761 * lisp.h (error, verror): Mark as printf-like functions.
15762 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
15763 Report overflow in size calculations when allocating printf buffer.
15764 Do not truncate output string at its first null byte.
15765 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
15766 Truncate the output at a character boundary, since vsnprintf does not
15768 * charset.c (check_iso_charset_parameter): Convert internal
15769 character to string before calling 'error', since %c now has the
15771 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
15772 overflow when computing char to be passed to 'error'. Do not
15773 pass Lisp_Object to 'error'; pass the integer instead.
15774 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
15775 formatted with plain %d.
15777 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
15779 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
15781 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
15783 * xterm.c (x_catch_errors): Remove duplicate declaration.
15785 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
15787 * xdisp.c, lisp.h (message_nolog): Remove; unused.
15789 2011-04-10 Jim Meyering <meyering@redhat.com>
15791 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
15792 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
15793 return ssize_t not "int", and use size_t as the buffer length.
15794 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
15795 * gnutls.h: Update declarations.
15796 * process.c (read_process_output): Use ssize_t, to match.
15797 (send_process): Likewise.
15799 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
15801 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
15803 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
15805 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
15806 Use unsigned char, to match FcChar8 type definition.
15808 * xterm.c (handle_one_xevent):
15809 * xmenu.c (create_and_show_popup_menu):
15810 * xselect.c (x_decline_selection_request)
15811 (x_reply_selection_request): Avoid type-punned deref of X events.
15813 2011-04-09 Eli Zaretskii <eliz@gnu.org>
15815 Fix some uses of `int' instead of EMACS_INT.
15816 * search.c (string_match_1, fast_string_match)
15817 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
15818 (scan_buffer, find_next_newline_no_quit)
15819 (find_before_next_newline, search_command, Freplace_match)
15820 (Fmatch_data): Make some `int' variables be EMACS_INT.
15822 * xdisp.c (display_count_lines): 3rd argument and return value now
15823 EMACS_INT. All callers changed.
15824 (pint2hrstr): Last argument is now EMACS_INT.
15826 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
15827 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
15828 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
15829 (decode_coding_utf_16, decode_coding_emacs_mule)
15830 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
15831 (decode_coding_ccl, decode_coding_charset)
15832 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
15833 (decode_coding_iso_2022, decode_coding_emacs_mule)
15834 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
15835 <char_offset, last_offset>: Declare EMACS_INT.
15836 (encode_coding_utf_8, encode_coding_utf_16)
15837 (encode_coding_emacs_mule, encode_invocation_designation)
15838 (encode_designation_at_bol, encode_coding_iso_2022)
15839 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
15840 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
15842 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
15843 (encode_invocation_designation): Last argument P_NCHARS is now
15845 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
15846 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
15848 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
15851 * ccl.c (Fccl_execute_on_string): Declare some variables
15854 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
15856 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
15858 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
15860 * process.c (Fformat_network_address): Doc fix.
15862 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
15864 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
15866 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
15868 * keyboard.c (read_char): Call Lisp function help-form-show,
15869 instead of using internal_with_output_to_temp_buffer.
15870 (Qhelp_form_show): New var.
15871 (syms_of_keyboard): Use DEFSYM macro.
15873 * print.c (internal_with_output_to_temp_buffer): Function deleted.
15875 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
15877 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
15879 * process.c (Flist_processes): Remove to Lisp.
15880 (list_processes_1): Delete.
15882 2011-04-06 Eli Zaretskii <eliz@gnu.org>
15884 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
15886 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
15888 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
15890 Fix more problems found by GCC 4.6.0's static checks.
15892 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
15894 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
15896 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
15898 * xdisp.c (vmessage): Mark as a printf-like function.
15900 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
15902 * sound.c (sound_warning): Don't crash if arg contains a printf format.
15904 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
15905 printf-like functions.
15906 (tiff_load): Add casts to remove these marks before passing them
15907 to system-supplied API.
15909 * eval.c (Fsignal): Remove excess argument to 'fatal'.
15911 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
15912 This avoids several warnings with gcc -Wstrict-overflow.
15913 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
15914 directly, rather than having caller test rule sign. This avoids
15915 some unnecessary tests.
15916 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
15917 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
15918 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
15920 * xfont.c (xfont_text_extents): Remove var that was set but not used.
15921 (xfont_open): Avoid unnecessary tests.
15923 * composite.c (composition_gstring_put_cache): Use unsigned integer.
15925 * composite.h, composite.c (composition_gstring_put_cache):
15926 Use EMACS_INT, not int, for length.
15928 * composite.h (COMPOSITION_DECODE_REFS): New macro,
15929 breaking out part of COMPOSITION_DECODE_RULE.
15930 (COMPOSITION_DECODE_RULE): Use it.
15931 * composite.c (get_composition_id): Remove unused local vars,
15932 by using the new macro.
15934 * textprop.c (set_text_properties_1): Change while to do-while,
15935 since the condition is always true at first.
15937 * intervals.c (graft_intervals_into_buffer): Mark var as used.
15938 (interval_deletion_adjustment): Return unsigned value.
15941 * process.c (list_processes_1, create_pty, read_process_output):
15942 (exec_sentinel): Remove vars that were set but not used.
15943 (create_pty): Remove unnecessary "volatile"s.
15944 (Fnetwork_interface_info): Avoid possibility of int overflow.
15945 (read_process_output): Do adaptive read buffering even if carryover.
15946 (read_process_output): Simplify nbytes computation if buffered.
15948 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
15950 * syntax.c (scan_words): Remove var that was set but not used.
15951 (update_syntax_table): Use unsigned instead of int.
15953 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
15954 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
15955 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
15957 * print.c (print_error_message): Avoid int overflow.
15959 * font.c (font_list_entities): Redo for clarity,
15960 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
15962 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
15963 (font_score): Avoid potential overflow in diff calculation.
15965 * fns.c (substring_both): Remove var that is set but not used.
15966 (sxhash): Redo loop for clarity and to avoid wraparound warning.
15968 * eval.c (funcall_lambda): Rename local to avoid shadowing.
15970 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
15971 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
15972 can always succeed if overflow has undefined behavior.
15974 * search.c (boyer_moore, wordify): Remove vars set but not used.
15975 (wordify): Omit three unnecessary tests.
15977 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
15978 All callers changed. This avoids the need for an unused var.
15980 * casefiddle.c (casify_region): Remove var that is set but not used.
15982 * dired.c (file_name_completion): Remove var that is set but not used.
15984 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
15986 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
15987 (Finsert_file_contents): Remove unnecessary code checking fd.
15989 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
15990 Check for integer overflow on size calculations.
15992 * buffer.c (Fprevious_overlay_change): Remove var that is set
15995 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
15996 Remove vars that are set but not used.
15997 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
15998 (timer_check_2): Mark vars as initialized.
16000 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
16002 * image.c (lookup_image): Remove var that is set but not used.
16003 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
16005 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
16006 that are set but not used.
16008 * xfns.c (make_invisible_cursor): Don't return garbage
16009 if XCreateBitmapFromData fails (Bug#8410).
16011 * xselect.c (x_get_local_selection, x_handle_property_notify):
16012 Remove vars that are set but not used.
16014 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
16015 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
16017 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
16018 Remove var that is set but not used.
16019 (scroll_bar_windows_size): Now size_t, not int.
16020 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
16021 Check for overflow.
16023 * xfaces.c (realize_named_face): Remove vars that are set but not used.
16024 (map_tty_color) [!defined MSDOS]: Likewise.
16026 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
16028 * coding.c: Remove vars that are set but not used.
16029 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
16030 All callers changed.
16031 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
16032 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
16033 (decode_coding_charset): Remove vars that are set but not used.
16035 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
16036 that is set but not used.
16038 * print.c (print_object): Remove var that is set but not used.
16040 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
16041 The gnulib version avoids calling malloc in the usual case,
16042 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
16043 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
16044 * filelock.c (current_lock_owner): Likewise.
16045 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
16046 * sysdep.c: Include allocator.h, careadlinkat.h.
16047 (emacs_no_realloc_allocator): New static constant.
16048 (emacs_readlink): New function.
16049 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
16050 ../lib/careadlinkat.h.
16052 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
16054 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
16055 first non-nil return value).
16057 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
16059 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
16060 if not defined (Bug#8403).
16062 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
16064 * xdisp.c (display_count_lines): Remove parameter `start',
16065 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
16066 (get_char_face_and_encoding): Remove parameter `multibyte_p',
16067 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
16068 (fill_stretch_glyph_string): Remove parameters `row' and `area',
16069 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
16070 and thereabouts. All callers changed.
16071 (get_per_char_metric): Remove parameter `f', unused since
16072 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
16074 2011-04-02 Jim Meyering <meyering@redhat.com>
16076 do not dereference NULL upon failed strdup
16077 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
16078 (ns_get_family): Likewise.
16080 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
16082 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
16084 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
16086 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
16089 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
16091 Add lexical binding.
16093 * window.c (Ftemp_output_buffer_show): New fun.
16094 (Fsave_window_excursion):
16095 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
16097 * lread.c (lisp_file_lexically_bound_p): New function.
16098 (Fload): Bind Qlexical_binding.
16099 (readevalloop): Remove `evalfun' arg.
16100 Bind Qinternal_interpreter_environment.
16101 (Feval_buffer): Bind Qlexical_binding.
16102 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
16104 (syms_of_lread): Declare `lexical-binding'.
16106 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
16108 * keyboard.c (eval_dyn): New fun.
16109 (menu_item_eval_property): Use it.
16111 * image.c (parse_image_spec): Use Ffunctionp.
16113 * fns.c (concat, mapcar1): Accept byte-code-functions.
16115 * eval.c (Fsetq): Handle lexical vars.
16116 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
16117 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
16118 (FletX, Flet): Obey lexical binding.
16119 (Fcommandp): Handle closures.
16120 (Feval): New `lexical' arg.
16121 (eval_sub): New function extracted from Feval. Use it almost
16122 everywhere where Feval was used. Look up vars in lexical env.
16124 (Ffunctionp): Move from subr.el.
16125 (Ffuncall): Handle closures.
16126 (apply_lambda): Remove `eval_flags'.
16127 (funcall_lambda): Handle closures and new byte-code-functions.
16128 (Fspecial_variable_p): New function.
16129 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
16130 but without exporting it to Lisp.
16132 * doc.c (Fdocumentation, store_function_docstring):
16133 * data.c (Finteractive_form): Handle closures.
16135 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
16138 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
16140 (exec_byte_code): New function extracted from Fbyte_code to handle new
16141 calling convention for byte-code-functions. Add new byte-codes.
16143 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
16145 * alloc.c (Fmake_symbol): Init new `declared_special' field.
16147 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
16149 * xdisp.c (redisplay_internal): Fix prototype.
16151 2011-03-31 Eli Zaretskii <eliz@gnu.org>
16153 * xdisp.c (SCROLL_LIMIT): New macro.
16154 (try_scrolling): Use it when setting scroll_limit.
16155 Limit scrolling to 100 screen lines.
16156 (redisplay_window): Even when falling back on "recentering",
16157 position point in the window according to scroll-conservatively,
16158 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
16160 (try_scrolling): When point is above the window, allow searching
16161 as far as scroll_max, or one screenful, to compute vertical
16162 distance from PT to the scroll margin position. This prevents
16163 try_scrolling from unnecessarily failing when
16164 scroll-conservatively is set to a value slightly larger than the
16165 window height. Clean up the case of PT below the margin at bottom
16166 of window: scroll_max can no longer be INT_MAX. When aggressive
16167 scrolling is in use, don't let point enter the opposite scroll
16168 margin as result of the scroll.
16169 (syms_of_xdisp) <scroll-conservatively>: Document the
16170 threshold of 100 lines for never-recentering scrolling.
16172 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
16174 * dispextern.h (move_it_by_lines):
16175 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
16176 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
16177 (message_log_check_duplicate): Remove parameters `prev_bol' and
16178 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
16179 (redisplay_internal): Remove parameter `preserve_echo_area',
16180 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
16182 * indent.c (Fvertical_motion):
16183 * window.c (window_scroll_pixel_based, Frecenter):
16184 Don't pass `need_y_p' to `move_it_by_lines'.
16186 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
16188 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
16189 steal a few bits to be more compact.
16190 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
16191 Remove unneeded casts.
16193 * bytecode.c (Fbyte_code): CAR and CDR can GC.
16195 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
16197 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
16198 binding" message (bug#7967).
16200 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
16202 Fix more problems found by GCC 4.6.0's static checks.
16204 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
16205 Remove unused local var.
16207 * editfns.c (Fmessage_box): Remove unused local var.
16209 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
16210 (note_mode_line_or_margin_highlight, note_mouse_highlight):
16211 Omit unused local vars.
16212 * window.c (shrink_windows): Omit unused local var.
16213 * menu.c (digest_single_submenu): Omit unused local var.
16214 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
16215 Omit unused local var.
16217 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
16218 Don't assume string length fits in int.
16219 (keyremap_step, read_key_sequence): Use size_t for sizes.
16220 (read_key_sequence): Don't check last_real_key_start redundantly.
16222 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
16223 instead of alloca (Bug#8344).
16225 * eval.c (Fbacktrace): Don't assume nargs fits in int.
16226 (Fbacktrace_frame): Don't assume nframes fits in int.
16228 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
16230 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
16233 * term.c (produce_glyphless_glyph): Remove unnecessary test.
16235 * cm.c (calccost): Turn while-do into do-while, for clarity.
16237 * keyboard.c (syms_of_keyboard): Use the same style as later
16238 in this function when indexing through an array. This also
16239 works around GCC bug 48267.
16241 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
16243 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
16245 * chartab.c (sub_char_table_ref_and_range): Redo for slight
16246 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
16248 * keyboard.c, keyboard.h (num_input_events): Now size_t.
16249 This avoids undefined behavior on integer overflow, and is a bit
16250 more convenient anyway since it is compared to a size_t variable.
16252 Variadic C functions now count arguments with size_t, not int.
16253 This avoids an unnecessary limitation on 64-bit machines, which
16254 caused (substring ...) to crash on large vectors (Bug#8344).
16255 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
16256 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
16257 All variadic functions and their callers changed accordingly.
16258 (struct gcpro.nvars): Now size_t, not int. All uses changed.
16259 * data.c (arith_driver, float_arith_driver): Likewise.
16260 * editfns.c (general_insert_function): Likewise.
16261 * eval.c (struct backtrace.nargs, interactive_p)
16262 (internal_condition_case_n, run_hook_with_args, apply_lambda)
16263 (funcall_lambda, mark_backtrace): Likewise.
16264 * fns.c (concat): Likewise.
16265 * frame.c (x_set_frame_parameters): Likewise.
16266 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
16267 0 if not found, not -1. All callers changed.
16269 * alloc.c (garbage_collect): Don't assume stack size fits in int.
16270 (stack_copy_size): Now size_t, not int.
16271 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
16273 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
16275 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
16276 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
16277 All callers changed.
16279 * lisp.h (multibyte_char_to_unibyte):
16280 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
16281 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
16282 * character.h (CHAR_TO_BYTE8):
16283 * cmds.c (internal_self_insert):
16284 * editfns.c (general_insert_function):
16285 * keymap.c (push_key_description):
16286 * search.c (Freplace_match):
16287 * xdisp.c (message_dolog, set_message_1): All callers changed.
16289 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
16291 * keyboard.c (safe_run_hook_funcall): New function.
16292 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
16293 don't set the hook to nil, but remove the offending function instead.
16294 (Qcommand_hook_internal): Remove, unused.
16295 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
16296 Vcommand_hook_internal.
16298 * eval.c (enum run_hooks_condition): Remove.
16299 (funcall_nil, funcall_not): New functions.
16300 (run_hook_with_args): Call each function through a `funcall' argument.
16301 Remove `cond' argument, now redundant.
16302 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
16303 (Frun_hook_with_args_until_failure): Adjust accordingly.
16304 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
16306 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
16308 * dispextern.h (string_buffer_position): Remove declaration.
16310 * print.c (strout): Remove parameter `multibyte', unused since
16311 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
16313 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
16314 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
16315 All callers changed.
16317 * w32.c (_wsa_errlist): Use braces for struct initializers.
16319 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
16320 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
16321 All callers changed.
16322 (string_buffer_position): Likewise. Also, make static (it's never
16323 used outside xdisp.c).
16324 (cursor_row_p): Remove parameter `w', unused since
16325 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
16326 (decode_mode_spec): Remove parameter `precision', introduced during
16327 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
16328 All callers changed.
16330 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
16332 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
16334 2011-03-27 Anders Lindgren <andlind@gmail.com>
16336 * nsterm.m (ns_menu_bar_is_hidden): New variable.
16337 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
16338 (ns_update_auto_hide_menu_bar): New functions.
16339 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
16340 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
16341 ns_constrain_all_frames.
16342 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
16343 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
16345 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
16347 * nsmenu.m (runDialogAt): Remove argument to timer_check.
16349 2011-03-27 Glenn Morris <rgm@gnu.org>
16351 * syssignal.h: Replace RETSIGTYPE with void.
16352 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
16353 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
16354 Replace SIGTYPE with void everywhere.
16355 * s/usg5-4-common.h (SIGTYPE): Remove definition.
16356 * s/template.h (SIGTYPE): Remove commented out definition.
16358 2011-03-26 Eli Zaretskii <eliz@gnu.org>
16360 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
16361 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
16363 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
16365 * w32.c (read_unc_volume): Use parameter `henum', instead of
16366 global variable `wget_enum_handle'.
16368 * keymap.c (describe_vector): Remove parameters `indices' and
16369 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
16370 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
16372 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
16374 * keyboard.c (timer_check): Remove parameter `do_it_now',
16375 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
16376 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
16377 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
16379 * keyboard.c (read_char):
16380 * w32menu.c (w32_menu_display_help):
16381 * xmenu.c (show_help_event, menu_help_callback):
16382 Adjust calls to `show_help_echo'.
16384 * gtkutil.c (xg_maybe_add_timer):
16385 * keyboard.c (readable_events):
16386 * process.c (wait_reading_process_output):
16387 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
16389 * insdel.c (adjust_markers_gap_motion):
16390 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
16391 (gap_left, gap_right): Don't call it.
16393 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
16395 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
16396 incurred during fontification.
16398 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
16400 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
16401 (DEFVAR_PER_BUFFER): Don't pass it.
16403 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
16404 (scrolling_window): Don't pass it.
16406 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
16408 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
16410 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
16412 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
16413 of variables specific to SELinux and computation of `encoded_absname'.
16415 * image.c (XPutPixel): Remove unused variable `height'.
16417 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
16419 * unexw32.c (get_section_info): Remove unused variable `section'.
16421 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
16422 (system_process_attributes): Remove unused variable `sess'.
16423 (sys_read): Remove unused variable `err'.
16425 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
16426 (w32_wnd_proc): Remove unused variable `isdead'.
16427 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
16428 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
16429 (x_create_tip_frame): Remove unused variable `tem'.
16431 * w32inevt.c (w32_console_read_socket):
16432 Remove unused variable `no_events'.
16434 * w32term.c (x_draw_composite_glyph_string_foreground):
16435 Remove unused variable `width'.
16437 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
16439 * w32term.c (x_set_glyph_string_clipping):
16440 Don't pass uninitialized region to CombineRgn.
16442 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
16444 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
16445 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
16446 (Fx_close_connection): Remove unused variable `i'.
16448 * w32font.c (w32font_draw): Return number of glyphs.
16449 (w32font_open_internal): Remove unused variable `i'.
16450 (w32font_driver): Add missing initializer.
16452 * w32menu.c (utf8to16): Remove unused variable `utf16'.
16453 (fill_in_menu): Remove unused variable `items_added'.
16455 * w32term.c (last_mouse_press_frame): Remove static global variable.
16456 (w32_clip_to_row): Remove unused variable `f'.
16457 (x_delete_terminal): Remove unused variable `i'.
16459 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
16460 (NOTHING): Remove unused static global variable.
16461 (uniscribe_check_otf): Remove unused variable `table'.
16462 (uniscribe_font_driver): Add missing initializers.
16464 2011-03-23 Julien Danjou <julien@danjou.info>
16466 * term.c (Fsuspend_tty, Fresume_tty):
16467 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
16468 * window.c (temp_output_buffer_show):
16469 * insdel.c (signal_before_change):
16470 * frame.c (Fhandle_switch_frame):
16471 * fileio.c (Fdo_auto_save):
16472 * emacs.c (Fkill_emacs):
16473 * editfns.c (save_excursion_restore):
16474 * cmds.c (internal_self_insert):
16475 * callint.c (Fcall_interactively):
16476 * buffer.c (Fkill_all_local_variables):
16477 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
16479 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
16480 unconditionally since it does the check itself.
16482 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
16484 Fix more problems found by GCC 4.5.2's static checks.
16486 * coding.c (encode_coding_raw_text): Avoid unnecessary test
16487 the first time through the loop, since we know p0 < p1 then.
16488 This also avoids a gcc -Wstrict-overflow warning.
16490 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
16491 leading to a memory leak, possible in functions like
16492 load_charset_map_from_file that can allocate an unbounded number
16493 of objects (Bug#8318).
16495 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
16496 that could (at least in theory) be that large.
16498 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
16499 This is less likely to overflow, and avoids undefined behavior if
16500 overflow does occur. All callers changed. Use strtoul to scan
16501 for the unsigned long integer.
16502 (pint2hrstr): Simplify and tune code slightly.
16503 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
16505 * scroll.c (do_scrolling): Work around GCC bug 48228.
16506 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
16508 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
16509 This also avoids a warning with gcc -Wstrict-overflow.
16510 (validate_x_resource_name): Simplify count usage.
16511 This also avoids a warning with gcc -Wstrict-overflow.
16513 * fileio.c (Fcopy_file): Report error if fchown or fchmod
16516 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
16518 * process.c (Fmake_network_process): Use socklen_t, not int,
16519 where POSIX says socklen_t is required in portable programs.
16520 This fixes a porting bug on hosts like 64-bit HP-UX, where
16521 socklen_t is wider than int (Bug#8277).
16522 (Fmake_network_process, server_accept_connection):
16523 (wait_reading_process_output, read_process_output):
16526 * process.c: Rename or move locals to avoid shadowing.
16527 (list_processes_1, Fmake_network_process):
16528 (read_process_output_error_handler, exec_sentinel_error_handler):
16529 Rename or move locals.
16530 (Fmake_network_process): Define label "retry_connect" only if needed.
16531 (Fnetwork_interface_info): Fix pointer signedness.
16532 (process_send_signal): Add cast to avoid pointer signedness problem.
16533 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
16534 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
16536 Make tparam.h and terminfo.c consistent.
16537 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
16538 Include tparam.h instead, since it declares them.
16539 * cm.h (PC): Remove extern decl; tparam.h now does this.
16540 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
16541 * terminfo.c: Include tparam.h, to check interfaces.
16542 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
16543 (tparam): Adjust signature to match interface in tparam.h;
16544 this removes some undefined behavior. Check that outstring and len
16545 are zero, which they always are with Emacs.
16546 * tparam.h (PC, BC, UP): New extern decls.
16548 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
16549 (xftfont_open): Rename locals to avoid shadowing.
16551 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
16552 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
16553 (OTF_TAG_SYM): Omit macro if not needed.
16554 (ftfont_list): Remove unused local.
16555 (get_adstyle_property, ftfont_pattern_entity):
16556 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
16557 Rename locals to avoid shadowing.
16559 * xfont.c (xfont_list_family): Mark var as initialized.
16561 * xml.c (make_dom): Now static.
16563 * composite.c (composition_compute_stop_pos): Rename local to
16565 (composition_reseat_it): Remove unused locals.
16566 (find_automatic_composition, composition_adjust_point): Likewise.
16567 (composition_update_it): Mark var as initialized.
16568 (find_automatic_composition): Mark vars as initialized,
16569 with a FIXME (Bug#8290).
16571 character.h: Rename locals to avoid shadowing.
16572 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
16573 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
16574 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
16575 (BUF_DEC_POS): Be more systematic about renaming local temporaries
16576 to avoid shadowing.
16578 * textprop.c (property_change_between_p): Remove; unused.
16580 * intervals.c (interval_start_pos): Now static.
16582 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
16584 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
16585 Rename locals to avoid shadowing.
16587 * sound.c (wav_play, au_play, Fplay_sound_internal):
16588 Fix pointer signedness.
16589 (alsa_choose_format): Remove unused local var.
16590 (wav_play): Initialize a variable to 0, to prevent undefined
16591 behavior (Bug#8278).
16593 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
16595 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
16597 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
16598 clobbering (Bug#8298).
16599 * sysdep.c (sys_subshell): Likewise.
16600 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
16602 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
16603 This should get cleaned up, so that child_setup has the
16604 same signature on all platforms.
16606 * callproc.c (call_process_cleanup): Now static.
16607 (relocate_fd): Rename locals to avoid shadowing.
16609 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
16611 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
16612 not to be necessary, and produces flickering.
16614 2011-03-20 Glenn Morris <rgm@gnu.org>
16616 * config.in: Remove file.
16618 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
16620 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
16621 are now in src/globals.h.
16622 (syms_of_minibuf): Remove spurious & from previous change.
16624 2011-03-20 Leo Liu <sdl.web@gmail.com>
16626 * minibuf.c (completing-read-function): New variable.
16627 (completing-read-default): Rename from completing-read.
16628 (completing-read): Call completing-read-function.
16630 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
16632 * xfaces.c (Fx_load_color_file):
16633 Read color file from absolute filename (bug#8250).
16635 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
16637 * makefile.w32-in: Update dependencies.
16639 2011-03-17 Eli Zaretskii <eliz@gnu.org>
16641 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
16643 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
16645 Fix more problems found by GCC 4.5.2's static checks.
16647 * process.c (make_serial_process_unwind, send_process_trap):
16648 (sigchld_handler): Now static.
16650 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
16651 That way, the code declares only the vars that it needs.
16652 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
16653 * s/cygwin.h (PTY_ITERATION): Likewise.
16654 * s/darwin.h (PTY_ITERATION): Likewise.
16655 * s/gnu-linux.h (PTY_ITERATION): Likewise.
16657 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
16658 * process.c (allocate_pty): Don't declare stb unless it's needed.
16660 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
16661 (CONSTANTLIM): Remove; unused.
16662 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
16663 Define only if needed.
16665 * unexelf.c (unexec): Name an expression,
16666 to avoid gcc -Wbad-function-cast warning.
16667 Use a different way to cause a compilation error if anyone uses
16668 n rather than nn, a way that does not involve shadowing.
16669 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
16671 * deps.mk (unexalpha.o): Remove; unused.
16673 New file unexec.h, the (simple) interface for unexec (Bug#8267).
16674 * unexec.h: New file.
16675 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
16676 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
16677 Depend on unexec.h.
16678 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
16679 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
16680 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
16681 Change as necessary to match prototype in unexec.h.
16683 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
16685 (back_comment, skip_chars): Mark vars as initialized.
16687 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
16688 Rename locals to avoid shadowing.
16690 * lread.c (read1): Rewrite so as not to use empty "else".
16691 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
16693 * print.c (Fredirect_debugging_output): Fix pointer signedess.
16695 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
16696 warning when compiling print.c.
16698 * font.c (font_unparse_fcname): Abort in an "impossible" situation
16699 instead of using an uninitialized var.
16700 (font_sort_entities): Mark var as initialized.
16702 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
16704 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
16705 pointers to constants.
16706 (font_parse_fcname): Remove unused vars.
16707 (font_delete_unmatched): Now static.
16708 (font_get_spec): Remove; unused.
16709 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
16710 (font_update_drivers, Ffont_get_glyphs, font_add_log):
16711 Rename or move locals to avoid shadowing.
16713 * fns.c (require_nesting_list, require_unwind): Now static.
16714 (Ffillarray): Rename locals to avoid shadowing.
16716 * floatfns.c (domain_error2): Define only if needed.
16717 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
16719 * alloc.c (mark_backtrace): Move decl from here ...
16720 * lisp.h: ... to here, so that it can be checked.
16722 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
16723 (Fdefvar): Rewrite so as not to use empty "else".
16724 (lisp_indirect_variable): Name an expression,
16725 to avoid gcc -Wbad-function-cast warning.
16726 (Fdefvar): Rename locals to avoid shadowing.
16728 * callint.c (quotify_arg, quotify_args): Now static.
16729 (Fcall_interactively): Rename locals to avoid shadowing.
16730 Use const pointer when appropriate.
16732 * lisp.h (get_system_name, get_operating_system_release):
16733 Move decls here, to check interfaces.
16734 * process.c (get_operating_system_release): Move decl to lisp.h.
16735 * xrdb.c (get_system_name): Likewise.
16736 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
16737 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
16738 some of which prompt warnings from gcc -Wbad-function-cast.
16739 (Fformat_time_string, Fencode_time, Finsert_char):
16740 (Ftranslate_region_internal, Fformat):
16741 Rename or remove local vars to avoid shadowing.
16742 (Ftranslate_region_internal): Mark var as initialized.
16744 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
16747 * lisp.h (eassert): Check that the argument compiles, even if
16748 ENABLE_CHECKING is not defined.
16750 * data.c (Findirect_variable): Name an expression, to avoid
16751 gcc -Wbad-function-cast warning.
16752 (default_value, arithcompare, arith_driver, arith_error): Now static.
16753 (store_symval_forwarding): Rename local to avoid shadowing.
16754 (Fmake_variable_buffer_local, Fmake_local_variable):
16755 Mark variables as initialized.
16756 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
16758 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
16759 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
16760 Rename locals to avoid shadowing.
16761 (mark_stack): Move local variables into the #ifdef region where
16763 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
16764 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
16766 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
16767 (GC_STRING_CHARS): Remove; not used.
16768 (Fmemory_limit): Cast sbrk's returned value to char *.
16770 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
16771 avoids undefined behavior in theory.
16773 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
16775 Use functions, not macros, for up- and down-casing (Bug#8254).
16776 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
16777 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
16778 to use the following functions instead of these macros.
16779 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
16780 EMACS_INT, since callers assume the returned value fits in int.
16781 (upcase1): Likewise, for UPCASE_TABLE.
16782 (uppercasep, lowercasep, upcase): New static inline functions.
16783 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
16784 the race-condition problem in the old DOWNCASE.
16786 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
16787 Rename locals to avoid shadowing.
16788 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
16789 (regex_compile, re_search_2, re_match_2_internal):
16790 Remove unused local vars.
16791 (FREE_VAR): Rewrite so as not to use empty "else",
16792 which gcc can warn about.
16793 (regex_compile, re_match_2_internal): Mark locals as initialized.
16794 (RETALLOC_IF): Define only if needed.
16795 (WORDCHAR_P): Likewise. This one is never needed, but is used
16796 only in a comment talking about a compiler bug, so put inside
16797 the #if 0 of that comment.
16798 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
16799 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
16802 * search.c (boyer_moore): Rename locals to avoid shadowing.
16803 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
16804 (PREV_CHAR_BOUNDARY): Likewise.
16806 * search.c (simple_search): Remove unused var.
16808 * dired.c (compile_pattern): Move decl from here ...
16809 * lisp.h: ... to here, so that it can be checked.
16810 (struct re_registers): New forward decl.
16812 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
16814 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
16816 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
16817 Rename locals to avoid shadowing.
16818 (Fvertical_motion): Mark locals as initialized.
16820 * casefiddle.c (casify_object, casify_region): Now static.
16821 (casify_region): Mark local as initialized.
16823 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
16825 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
16826 New macros, so that the caller can use some names other than
16827 gcpro1, gcpro2, etc.
16828 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
16830 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
16831 argument, for consistency with GCPRO2_VAR, etc: it is now the
16832 prefix of the variable, not the variable itself. All uses
16834 * dired.c (directory_files_internal, file_name_completion):
16835 Rename locals to avoid shadowing.
16837 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
16838 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
16839 dired.c's scmp function, had undefined behavior.
16840 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
16841 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
16842 * buffer.h: ... to here, because these macros use current_buffer,
16843 and the new implementation with inline functions needs to have
16844 current_buffer in scope now, rather than later when the macros
16846 (downcase, upcase1): New static inline functions.
16847 (DOWNCASE, UPCASE1): Reimplement using these functions.
16848 This avoids undefined behavior in expressions like
16849 DOWNCASE (x) == DOWNCASE (y), which previously suffered
16850 from race conditions in accessing the global variables
16851 case_temp1 and case_temp2.
16852 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
16853 * lisp.h (case_temp1, case_temp2): Remove their decls.
16854 * character.h (ASCII_CHAR_P): Move from here ...
16855 * lisp.h: ... to here, so that the inline functions mentioned
16856 above can use them.
16858 * dired.c (directory_files_internal_unwind): Now static.
16860 * fileio.c (file_name_as_directory, directory_file_name):
16861 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
16863 (file_name_as_directory): Use const pointers when appropriate.
16864 (Fexpand_file_name): Likewise. In particular, newdir might
16865 point at constant storage, so make it a const pointer.
16866 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
16867 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
16869 (Fset_file_times, Finsert_file_contents, auto_save_error):
16870 Rename locals to avoid shadowing.
16872 * minibuf.c (choose_minibuf_frame_1): Now static.
16873 (Ftry_completion, Fall_completions): Rename or remove locals
16874 to avoid shadowing.
16876 * marker.c (bytepos_to_charpos): Remove; unused.
16878 * lisp.h (verify_bytepos, count_markers): New decls,
16879 so that gcc does not warn that these functions aren't declared.
16881 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
16882 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
16883 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
16884 (copy_text): Remove unused local var.
16886 * filelock.c (within_one_second): Now static.
16887 (lock_file_1): Rename local to avoid shadowing.
16889 * buffer.c (fix_overlays_before): Mark locals as initialized.
16890 (fix_start_end_in_overlays): Likewise. This function should be
16891 simplified by using pointers-to-pointers, but that's a different
16893 (switch_to_buffer_1): Now static.
16894 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
16895 (report_overlay_modification): Rename locals to avoid shadowing.
16897 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
16898 Fix pointer signedness issue.
16899 (sys_subshell): Mark local as volatile if checking for lint,
16900 to suppress a gcc -Wclobbered warning that does not seem to be right.
16901 (MAXPATHLEN): Define only if needed.
16903 * process.c (serial_open, serial_configure): Move decls from here ...
16904 * systty.h: ... to here, so that they can be checked.
16906 * fns.c (get_random, seed_random): Move extern decls from here ...
16907 * lisp.h: ... to here, so that they can be checked.
16909 * sysdep.c (reset_io): Now static.
16910 (wait_for_termination_signal): Remove; unused.
16912 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
16913 (copy_keymap_item, append_key, push_text_char_description):
16915 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
16916 (DENSE_TABLE_SIZE): Remove; unused.
16917 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
16918 (describe_map_tree):
16919 Rename locals to avoid shadowing.
16921 * keyboard.c: Declare functions static if they are not used elsewhere.
16922 (echo_char, echo_dash, cmd_error, top_level_2):
16923 (poll_for_input, handle_async_input): Now static.
16924 (read_char, kbd_buffer_get_event, make_lispy_position):
16925 (make_lispy_event, make_lispy_movement, apply_modifiers):
16926 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
16927 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
16928 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
16929 (read_key_sequence, read_char): Mark locals as initialized.
16930 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
16932 * keyboard.h (make_ctrl_char): New decl.
16933 (mark_kboards): Move decl here ...
16934 * alloc.c (mark_kboards): ... from here.
16936 * lisp.h (force_auto_save_soon): New decl.
16938 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
16939 (DEFINE_DUMMY_FUNCTION): New macro.
16940 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
16942 (main): Add casts to avoid warnings
16943 if GCC considers string literals to be constants.
16945 * lisp.h (fatal_error_signal): Add decl, since it's exported.
16947 * dbusbind.c: Pointer signedness fixes.
16948 (xd_signature, xd_append_arg, xd_initialize):
16949 (Fdbus_call_method, Fdbus_call_method_asynchronously):
16950 (Fdbus_method_return_internal, Fdbus_method_error_internal):
16951 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
16952 (Fdbus_register_signal): Use SSDATA when the context wants char *.
16954 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
16955 if GCC considers string literals to be constants.
16956 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
16958 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
16960 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
16961 (print_preprocess, print_object): New macro to fix last change.
16963 * print.c (print_preprocess): Don't forget font objects.
16965 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
16967 * emacs.c (USAGE3): Doc fixes.
16969 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
16971 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
16974 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
16976 * lisp.h (VWindow_system, Qfile_name_history):
16977 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
16978 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
16979 (w32_system_caret_x, w32_system_caret_y): Declare extern.
16981 * w32select.c: Don't #include "keyboard.h".
16982 (run_protected): Add extern declaration for waiting_for_input.
16984 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
16985 * w32console.c (detect_input_pending, read_input_pending)
16986 (encode_terminal_code):
16987 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
16988 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
16989 (w32_system_caret_y, Qfile_name_history):
16990 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
16991 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
16992 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
16993 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
16994 * w32proc.c (Qlocal, report_file_error):
16995 * w32term.c (Vwindow_system, updating_frame):
16996 * w32uniscribe.c (initialized, uniscribe_font_driver):
16997 Remove unneeded extern declarations.
16999 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
17001 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
17003 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
17005 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
17006 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
17007 These macros can no longer be used for assignment.
17009 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
17010 Assign struct members directly, instead of using BUF_BEGV etc.
17011 (record_buffer_markers, fetch_buffer_markers): New functions for
17012 recording and fetching special buffer markers.
17013 (set_buffer_internal_1, set_buffer_temp): Use them.
17015 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
17017 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
17019 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
17020 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
17022 * xdisp.c (hscroll_window_tree):
17023 (reconsider_clip_changes): Use PT instead of BUF_PT.
17025 2011-03-13 Eli Zaretskii <eliz@gnu.org>
17027 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
17028 $(EMACS_ROOT)/lib/intprops.h.
17030 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
17032 Fix more problems found by GCC 4.5.2's static checks.
17034 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
17035 to unsigned char * to avoid compiler diagnostic.
17036 (xg_free_frame_widgets): Make it clear that a local variable is
17037 needed only if USE_GTK_TOOLTIP.
17038 (gdk_window_get_screen): Make it clear that this macro is needed
17039 only if USE_GTK_TOOLTIP.
17040 (int_gtk_range_get_value): New function, which avoids a diagnostic
17041 from gcc -Wbad-function-cast.
17042 (xg_set_toolkit_scroll_bar_thumb): Use it.
17043 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
17044 diagnostic from gcc -Wbad-function-cast.
17045 (get_utf8_string, xg_get_file_with_chooser):
17046 Rename locals to avoid shadowing.
17047 (create_dialog): Move locals to avoid shadowing.
17049 * xgselect.c (xg_select): Remove unused var.
17051 * image.c (four_corners_best): Mark locals as initialized.
17052 (gif_load): Initialize transparent_p to zero (Bug#8238).
17053 Mark another local as initialized.
17054 (my_png_error, my_error_exit): Mark with NO_RETURN.
17056 * image.c (clear_image_cache): Now static.
17057 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
17058 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
17059 (x_edge_detection): Remove unnecessary cast that
17060 gcc -Wbad-function-cast diagnoses.
17061 (gif_load): Fix pointer signedness.
17062 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
17063 (jpeg_load, gif_load): Rename locals to avoid shadowing.
17065 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
17067 Improve quality of tests for time stamp overflow.
17068 For example, without this patch (encode-time 0 0 0 1 1
17069 1152921504606846976) returns the obviously-bogus value (-948597
17070 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
17071 reports time overflow. See
17072 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
17073 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
17074 * editfns.c: Include limits.h and intprops.h.
17075 (TIME_T_MIN, TIME_T_MAX): New macros.
17076 (time_overflow): Move earlier, to before first use.
17077 (hi_time, lo_time): New functions, for an accurate test for
17078 out-of-range times.
17079 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
17080 (Fget_internal_run_time): Don't assume time_t fits in int.
17081 (make_time): Use list2 instead of Fcons twice.
17082 (Fdecode_time): More accurate test for out-of-range times.
17083 (check_tm_member): New function.
17084 (Fencode_time): Use it, to test for out-of-range times.
17085 (lisp_time_argument): Don't rely on undefined left-shift and
17086 right-shift behavior when checking for time stamp overflow.
17088 * editfns.c (time_overflow): New function, refactoring common code.
17089 (Fformat_time_string, Fdecode_time, Fencode_time):
17090 (Fcurrent_time_string): Use it.
17092 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
17093 * dired.c (make_time): Move to ...
17094 * editfns.c (make_time): ... here.
17095 * systime.h: Note the move.
17097 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
17099 * fringe.c (update_window_fringes): Remove unused variables.
17101 * unexmacosx.c (copy_data_segment): Also copy __got section.
17104 2011-03-12 Eli Zaretskii <eliz@gnu.org>
17106 * termcap.c [MSDOS]: Include "msdos.h".
17107 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
17108 Constify `char *' arguments and their references according to
17109 prototypes in tparam.h.
17111 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
17113 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
17114 Adapt all references accordingly.
17116 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
17118 2011-03-11 Tom Tromey <tromey@redhat.com>
17120 * buffer.c (syms_of_buffer): Remove obsolete comment.
17122 2011-03-11 Eli Zaretskii <eliz@gnu.org>
17124 * termhooks.h (encode_terminal_code): Declare prototype.
17126 * msdos.c (encode_terminal_code): Don't declare prototype.
17128 * term.c (encode_terminal_code): Now external again, used by
17129 w32console.c and msdos.c.
17131 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
17132 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
17134 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
17136 Fix some minor problems found by GCC 4.5.2's static checks.
17138 * fringe.c (update_window_fringes): Mark locals as initialized
17140 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
17142 * alloc.c (mark_fringe_data): Move decl from here ...
17143 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
17144 to check its interface.
17145 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
17147 * fontset.c (free_realized_fontset): Now static.
17148 (Fset_fontset_font): Rename local to avoid shadowing.
17149 (fontset_font): Mark local as initialized.
17150 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
17152 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
17154 * xselect.c (x_disown_buffer_selections): Remove; not used.
17155 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
17156 (x_own_selection, Fx_disown_selection_internal): Rename locals
17157 to avoid shadowing.
17158 (x_handle_dnd_message): Remove local to avoid shadowing.
17160 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
17161 so that the caller can use some name other than gcpro1.
17162 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
17163 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
17164 (Fx_backspace_delete_keys_p):
17165 Use them to avoid shadowing, and rename vars to avoid shadowing.
17166 (x_decode_color, x_set_name, x_window): Now static.
17167 (Fx_create_frame): Add braces to silence GCC warning.
17168 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
17169 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
17170 Remove unused locals.
17171 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
17172 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
17173 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
17176 * xterm.h (x_mouse_leave): New decl.
17178 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
17179 Remove unused functions.
17180 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
17181 (x_calc_absolute_position): Now static.
17182 (XTread_socket): Don't define label "out" unless it's used.
17183 Don't declare local "event" unless it's used.
17184 (x_iconify_frame, x_free_frame_resources): Don't declare locals
17185 unless they are used.
17186 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
17187 (x_fatal_error_signal): Remove; not used.
17188 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
17189 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
17190 (x_error_catcher, x_connection_closed, x_error_handler):
17191 (x_error_quitter, xembed_send_message, x_iconify_frame):
17192 (my_log_handler): Rename locals to avoid shadowing.
17193 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
17194 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
17196 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
17197 Rename or move locals to avoid shadowing.
17198 (tty_defined_color, merge_face_heights): Now static.
17199 (free_realized_faces_for_fontset): Remove; not used.
17200 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
17201 does not deduce is never used uninitialized.
17202 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
17203 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
17205 * terminal.c (store_terminal_param): Now static.
17207 * xmenu.c (menu_highlight_callback): Now static.
17208 (set_frame_menubar): Remove unused local.
17209 (xmenu_show): Rename parameter to avoid shadowing.
17210 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
17211 since they might point to immutable storage.
17212 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
17213 since it's unused otherwise.
17215 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
17216 Add a FIXME, since the code still doesn't look right. (Bug#8215)
17217 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
17218 avoids a gcc -Wuninitialized diagnostic.
17219 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
17220 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
17221 does not deduce are never used uninitialized.
17223 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
17225 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
17226 * window.c (window_loop, size_window):
17227 (run_window_configuration_change_hook, enlarge_window): Likewise.
17229 * window.c (display_buffer): Now static.
17230 (size_window): Mark variables that gcc -Wuninitialized
17231 does not deduce are never used uninitialized.
17232 * window.h (check_all_windows): New decl, to forestall
17233 gcc -Wmissing-prototypes diagnostic.
17234 * dispextern.h (bidi_dump_cached_states): Likewise.
17236 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
17238 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
17239 Include <limits.h>.
17240 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
17241 and to avoid gcc -Wuninitialized warning.
17242 (load_charset_map): Mark variables that gcc -Wuninitialized
17243 does not deduce are never used uninitialized.
17244 (load_charset): Abort instead of using uninitialized var (Bug#8229).
17246 * coding.c (coding_set_source, coding_set_destination):
17247 Use "else { /* comment */ }" rather than "else /* comment */;"
17248 for clarity, and to avoid gcc -Wempty-body warning.
17249 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
17250 a block, when the outer 'i' will do.
17251 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
17252 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
17253 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
17254 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
17255 (Fdecode_sjis_char, Fdefine_coding_system_internal):
17256 Rename locals to avoid shadowing.
17257 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
17258 * coding.c (emacs_mule_char, encode_invocation_designation):
17259 Now static, since they're not used elsewhere.
17260 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
17261 (decode_coding_object, encode_coding_object, detect_coding_system):
17262 (decode_coding_emacs_mule): Mark variables that gcc
17263 -Wuninitialized does not deduce are never used uninitialized.
17264 (detect_coding_iso_2022): Initialize a local variable that might
17265 be used uninitialized. Leave a FIXME because it's not clear that
17266 this initialization is needed. (Bug#8211)
17267 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
17268 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
17269 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
17270 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
17271 Remove unused macros.
17273 * category.c (hash_get_category_set): Remove unused local var.
17274 (copy_category_table): Now static, since it's not used elsewhere.
17275 * character.c (string_count_byte8): Likewise.
17277 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
17278 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
17280 * chartab.c (copy_sub_char_table): Now static, since it's not used
17282 (sub_char_table_ref_and_range, char_table_ref_and_range):
17283 Rename locals to avoid shadowing.
17284 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
17286 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
17287 (BIDI_BOB): Remove unused macro.
17289 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
17290 deduce are never used uninitialized.
17291 * term.c (encode_terminal_code): Likewise.
17293 * term.c (encode_terminal_code): Now static. Remove unused local.
17295 * tparam.h: New file.
17296 * term.c, tparam.h: Include it.
17297 * deps.mk (term.o, tparam.o): Depend on tparam.h.
17298 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
17299 Move these decls to tparam.h, and make them agree with what
17300 is actually in tparam.c. The previous trick of using incompatible
17301 decls in different modules does not conform to the C standard.
17302 All callers of tparam changed to use tparam's actual API.
17303 * tparam.c (tparam1, tparam, tgoto):
17304 Use const pointers where appropriate.
17306 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
17307 * cm.h (struct cm): Likewise.
17308 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
17309 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
17310 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
17311 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
17312 (turn_on_face, init_tty): Likewise.
17313 * termchar.h (struct tty_display_info): Likewise.
17315 * term.c (term_mouse_position): Rename local to avoid shadowing.
17317 * alloc.c (mark_ttys): Move decl from here ...
17318 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
17320 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
17322 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
17324 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
17326 * search.c (compile_pattern_1): Remove argument regp, unused since
17327 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
17328 (compile_pattern): Don't pass it.
17330 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
17332 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
17333 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
17335 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
17337 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
17339 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
17340 gdk_window_get_screen, gdk_window_get_geometry,
17341 gdk_x11_window_lookup_for_display and GDK_KEY_g.
17342 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
17343 (xg_get_pixbuf_from_pixmap): New function.
17344 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
17345 to Pixmap, take frame as parameter, remove GdkColormap parameter.
17346 Call xg_get_pixbuf_from_pixmap instead of
17347 gdk_pixbuf_get_from_drawable.
17348 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
17349 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
17350 (xg_check_special_colors): Use GtkStyleContext and its functions
17352 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
17353 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
17354 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
17355 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
17356 Call gtk_widget_get_preferred_size.
17357 (xg_frame_resized): gdk_window_get_geometry only takes 5
17359 (xg_win_to_widget, xg_event_is_for_menubar):
17360 Call gdk_x11_window_lookup_for_display.
17361 (xg_set_widget_bg): New function.
17362 (delete_cb): New function.
17363 (xg_create_frame_widgets): Connect delete-event to delete_cb.
17364 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
17365 (xg_set_background_color): Call xg_set_widget_bg.
17366 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
17367 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
17368 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
17369 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
17371 (update_frame_tool_bar): Call gtk_widget_hide.
17372 (xg_initialize): Use GDK_KEY_g.
17374 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
17376 (x_session_initialize): Call gdk_x11_set_sm_client_id.
17378 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
17379 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
17380 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
17382 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
17384 * w32xfns.c (select_palette): Check success of RealizePalette against
17385 GDI_ERROR, not zero.
17387 See ChangeLog.11 for earlier changes.
17389 ;; Local Variables:
17393 Copyright (C) 2011-2012 Free Software Foundation, Inc.
17395 This file is part of GNU Emacs.
17397 GNU Emacs is free software: you can redistribute it and/or modify
17398 it under the terms of the GNU General Public License as published by
17399 the Free Software Foundation, either version 3 of the License, or
17400 (at your option) any later version.
17402 GNU Emacs is distributed in the hope that it will be useful,
17403 but WITHOUT ANY WARRANTY; without even the implied warranty of
17404 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17405 GNU General Public License for more details.
17407 You should have received a copy of the GNU General Public License
17408 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.