1 2012-09-15 Kenichi Handa <handa@gnu.org>
3 * font.c (Ffont_shape_gstring): Don't adjust grapheme cluster
4 here, but just check the validity of glyphs in the glyph-string.
6 2012-09-14 Martin Rudalics <rudalics@gmx.at>
8 * xdisp.c (Fformat_mode_line): Unconditionally save/restore
9 current buffer (Bug#12387).
11 2012-09-14 Juanma Barranquero <lekktu@gmail.com>
13 * makefile.w32-in ($(BLD)/alloc.$(O)): Update dependencies.
15 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
17 Use a more backwards-compatible timer format (Bug#12430).
18 * keyboard.c (decode_timer): Get PSECS from the 8th (origin-0)
19 vector element, not from the 4th, since PSECS is now at the end.
20 (Fcurrent_idle_time): Doc fix.
22 2012-09-13 Dmitry Antipov <dmantipov@yandex.ru>
24 Function to mark objects and remove killed buffers at once.
25 * alloc.c (discard_killed_buffers): Rename to ...
26 (mark_discard_killed buffers) ... new name. Add marking
27 of remaining objects. Fix comment. Adjust users.
28 (mark_object): Do not touch frame buffer lists here.
29 * frame.c (delete_frame): Reset frame buffer lists here.
31 2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
33 Better workaround for GNOME bug when --enable-gcc-warnings.
34 * emacsgtkfixed.c (G_STATIC_ASSERT): Remove, undoing last change.
35 Instead, disable -Wunused-local-typedefs. See Dmitry Antipov in
36 <http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00335.html>.
38 Simplify SIGIO usage (Bug#12408).
39 The code that dealt with SIGIO was crufty and confusing, e.g., it
40 played tricks like "#undef SIGIO" but these tricks were not used
41 consistently. Simplify mostly by not #undeffing standard symbols,
42 e.g., use "defined USABLE_SIGIO" (our symbol, which we can define
43 or not as we please) rather than "defined SIGIO" (standard symbol
44 that we probably shouldn't #undef).
45 * conf_post.h [USG5_4]: Do not include <sys/wait.h> here.
46 Modules that need it can include it.
47 [USG5_4 && emacs]: Likewise, do not include the streams stuff here.
48 * dispextern.h (ignore_sigio): New decl.
49 * emacs.c (shut_down_emacs): Invoke unrequest_sigio
50 unconditionally, since it's now a no-op if !USABLE_SIGIO.
51 * emacs.c (shut_down_emacs):
52 * keyboard.c (kbd_buffer_store_event_hold):
53 Use ignore_sigio rather than invoking 'signal' directly.
54 * keyboard.c (USABLE_FIONREAD && USG5_4): Include <sys/filio.h>,
56 (FIONREAD, SIGIO): Do not #undef.
57 (tty_read_avail_input): Use #error rather than a syntax error.
58 * process.c [USG5_4]: Include <sys/stream.h> and <sys/stropts.h>,
59 for I_PIPE, used by SETUP_SLAVE_PTY.
60 (DATAGRAM_SOCKETS): Simplify defn, based on USABLE_FIONREAD.
61 * sysdep.c (croak): Remove; no longer needed. This bit of
62 temporary code, with Fred N. Fish's comment that it's temporary,
63 has been in Emacs since at least 1992!
64 (init_sigio, reset_sigio, request_sigio, unrequest_sigio):
65 Arrange for them to be no-ops in all cases when ! USABLE_SIGIO.
66 * syssignal.h (croak): Remove decl.
67 (SIGIO, SIGPOO, SIGAIO, SIGPTY): Do not #undef; that's too fragile.
68 * systty.h [!NO_TERMIO]: Do not include <termio.h>; no longer needed
69 now that we're termios-only.
70 (FIONREAD, ASYNC) [BROKEN_FIONREAD]: Do not #undef.
71 * term.c (dissociate_if_controlling_tty): Use #error rather than
74 Work around GCC and GNOME bugs when --enable-gcc-warnings.
75 * emacsgtkfixed.c (G_STATIC_ASSERT): Redefine to use 'verify',
76 to work around GNOME bug 683906.
77 * image.c (jpeg_load_body) [HAVE_JPEG && lint]: Pacify gcc -Wclobber.
78 (struct my_jpeg_error_mgr) [HAVE_JPEG && lint]: New member fp.
79 This works around GCC bug 54561.
81 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
83 More fixes for 'volatile' and setjmp/longjmp.
84 * eval.c (Fdefvar, Fcondition_case): Remove unnecessary 'volatile's.
85 * image.c (struct png_load_context) [HAVE_PNG]: New type.
86 (png_load_body) [HAVE_PNG]:
87 (jpeg_load_body) [HAVE_JPEG]:
88 New function, with most of the old parent function's body.
89 (png_load) [HAVE_PNG]:
90 (jpeg_load) [HAVE_JPEG]:
91 Invoke the new function, to avoid longjmp munging our locals.
92 (struct my_jpeg_error_mgr) [HAVE_JPEG]: New members cinfo, failure_code.
93 (my_error_exit) [HAVE_JPEG]: Don't trust 'setjmp' to return 2 when
94 longjmp is passed 2, as the C standard doesn't guarantee this.
95 Instead, store the failure code into mgr->failure_code.
97 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
99 * keyboard.c (read_char, requeued_events_pending_p, Finput_pending_p)
100 (Fdiscard_input, quit_throw_to_read_char, init_keyboard)
101 (syms_of_keyboard): Remove support for unread-command-char.
103 2012-09-12 Eli Zaretskii <eliz@gnu.org>
105 * w32proc.c (sys_kill): If PID is our process ID and the signal is
106 SIGABRT, call emacs_abort. Avoids silently exiting upon assertion
107 violation. (Bug#12426)
109 2012-09-12 Paul Eggert <eggert@cs.ucla.edu>
111 * image.c (jpeg_memory_src): Don't assume string len fits in unsigned.
113 2012-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
115 * eval.c: Add `inhibit-debugger'.
116 (Qinhibit_debugger): New symbol.
117 (call_debugger): Bind it instead of Qdebug_on_error.
118 (maybe_call_debugger): Test Vinhibit_debugger.
119 (syms_of_eval): Define inhibit-debugger.
120 * xdisp.c (set_message): Don't bind Qinhibit_debug_on_message.
121 (syms_of_xdisp): Remove inhibit-debug-on-message.
123 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
125 Avoid _setjmp/_longjmp problems with local nonvolatile variables.
126 If a nonvolatile local variable is written before a _longjmp to
127 the frame containing the variable, and is read after the _longjmp,
128 the value read is indeterminate. Some local variables of type
129 'struct handler' and 'struct catchtag' are used in this way, so
130 mark each of their slots as volatile if the slot can be set before
131 _longjmp and read afterwards.
132 * lisp.h (struct handler): var and chosen_clause are now volatile.
133 (struct catchtag): val, next, and pdlcount are now volatile.
135 * bidi.c (bidi_push_it, bidi_pop_it):
136 * fns.c (copy_hash_table):
137 * image.c (define_image_type):
138 * keyboard.c (kbd_buffer_store_event_hold):
139 * process.c (Fprocess_send_eof):
140 * xfaces.c (x_create_gc) [HAVE_NS]:
141 * xgselect.c (xg_select):
142 Prefer assignment to memcpy when either will do.
144 * alloc.c (discard_killed_buffers): Tune and simplify a bit.
145 Use pointer-to-a-pointer to simplify and avoid a NILP check each
146 time an item is removed. No need to mark this function 'inline';
147 the compiler knows better than we do.
149 2012-09-11 Jan Djärv <jan.h.d@swipnet.se>
151 * nsterm.m (ns_judge_scroll_bars): Pass NO to updateFrameSize.
152 (updateFrameSize:): Add delay parameter to updateFrameSize, send it
153 to change_frame_size (Bug#12388).
154 (windowDidResize:): Pass YES to updateFrameSize.
156 * nsterm.h: Add delay parameter to updateFrameSize.
158 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
160 Discard killed buffers from deleted window and frame objects.
161 This reduces an amount of references to killed buffers and
162 helps GC to reclaim them faster.
163 * alloc.c (discard_killed_buffers): New function.
164 (mark_object): Use it for deleted windows and frames.
165 (mark_object): If symbol's value is set up for a killed buffer
166 or deleted frame, restore it's global binding.
167 * data.c (swap_in_global_binding): Add GC notice.
168 (swap_in_symval_forwarding): Use convenient set_blv_where.
169 * window.c (wset_next_buffers, wset_prev_buffers): Move ...
170 * window.h: ... to here.
172 2012-09-11 Dmitry Antipov <dmantipov@yandex.ru>
174 Convenient macro to check whether the buffer is live.
175 * buffer.h (BUFFER_LIVE_P): New macro.
176 * alloc.c, buffer.c, editfns.c, insdel.c, lread.c, marker.c:
177 * minibuf.c, print.c, process.c, window.c, xdisp.c: Use it.
179 2012-09-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
181 * xdisp.c (right_overwritten, right_overwriting): Also handle gstring
182 composition cases (Bug#12364).
184 * xterm.c (x_draw_glyph_string): Avoid overwriting inverted left
185 overhang of succeeding glyphs overlapping box cursor.
187 * w32term.c (x_draw_glyph_string): Likewise.
189 2012-09-11 Paul Eggert <eggert@cs.ucla.edu>
191 Simplify, document, and port floating-point (Bug#12381).
192 The porting part of this patch fixes bugs on non-IEEE platforms
193 with frexp, ldexp, logb.
194 * data.c, lisp.h (Qdomain_error, Qsingularity_error, Qunderflow_error):
196 * floatfns.c: Simplify discussion of functions that Emacs doesn't
197 support, by removing commented-out code and briefly listing the
198 C89 functions excluded. The commented-out stuff was confusing
199 maintenance, e.g., we thought we needed cbrt but it was commented out.
200 (logb): Remove decl; no longer needed.
201 (isfinite): New macro, if not already supplied.
202 (isnan): Don't replace any existing macro.
203 (Ffrexp, Fldexp): Define even if !HAVE_COPYSIGN, as frexp and ldexp
204 are present on all C89 platforms.
205 (Ffrexp): Do not special-case zero, as frexp does the right thing
207 (Flogb): Do not use logb, as it doesn't have the desired meaning
208 on hosts that use non-base-2 floating point. Instead, stick with
209 frexp, which is C89 anyway. Do not pass an infinity or a NaN to
210 frexp, to avoid getting an unspecified result.
212 * xdisp.c (Qinhibit_debug_on_message): Now static.
214 2012-09-10 Jan Djärv <jan.h.d@swipnet.se>
216 * nsterm.m (ns_update_begin): Set clip path to whole view by using
217 NSBezierPath (Bug#12131).
219 2012-09-10 Chong Yidong <cyd@gnu.org>
221 * fns.c (Fdelq, Fdelete): Doc fix.
223 2012-09-10 Paul Eggert <eggert@cs.ucla.edu>
225 * lisp.h (XSETINT, XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL)
226 (XSETFLOAT, XSETMISC): Parenthesize macro bodies.
228 2012-09-09 Stefan Monnier <monnier@iro.umontreal.ca>
230 * lisp.h (make_lisp_ptr): New macro to replace XSET.
231 (XSETCONS, XSETVECTOR, XSETSTRING, XSETSYMBOL, XSETFLOAT, XSETMISC):
234 2012-09-09 Eli Zaretskii <eliz@gnu.org>
236 * fringe.c (draw_fringe_bitmap_1): Don't reduce the width of the
237 left fringe if the window has a left margin. This avoids leaving
238 traces of the cursor because its leftmost pixel is not drawn over.
240 * dispnew.c (update_window_line): When the left margin area of a
241 screen line is updated, set the redraw_fringe_bitmaps_p flag of
242 that screen line. (Bug#12277)
244 2012-09-09 Paul Eggert <eggert@cs.ucla.edu>
246 Assume C89 or later for math functions (Bug#12381).
247 This simplifies the code, and makes it a bit smaller and faster,
248 and (most important) makes it easier to clean up signal handling
249 since we can stop worring about floating-point exceptions in
250 library code. That was a problem before C89, but the problem
251 went away many years ago on all practical Emacs targets.
252 * data.c, image.c, lread.c, print.c:
253 Don't include <math.h>; no longer needed.
254 * data.c, floatfns.c (IEEE_FLOATING_POINT): Don't worry that it
255 might be autoconfigured, as that never happens.
257 * doprnt.c (DBL_MAX_10_EXP):
259 Remove. C89 or later always defines these.
260 * floatfns.c (HAVE_MATHERR, FLOAT_CHECK_ERRNO, FLOAT_CHECK_DOMAIN)
261 (in_float, float_error_arg, float_error_arg2, float_error_fn_name)
262 (arith_error, domain_error, domain_error2):
263 Remove all this pre-C89 cruft. Do not include <errno.h> as that's
264 no longer needed -- we simply return what C returns. All uses removed.
265 (IN_FLOAT, IN_FLOAT2): Remove. All uses replaced with
267 (FLOAT_TO_INT, FLOAT_TO_INT2, range_error, range_error2):
268 Remove. All uses expanded, as these macros are no longer used
269 more than once and are now more trouble than they're worth.
270 (Ftan): Use tan, not sin / cos.
271 (Flogb): Assume C89 frexp.
272 (fmod_float): Assume C89 fmod.
273 (matherr) [HAVE_MATHERR]: Remove; no longer needed.
274 (init_floatfns): Remove. All uses removed.
276 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
278 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Take back
279 compositeToPoint for OSX < 10.6 (Bug#12390).
281 2012-09-08 Paul Eggert <eggert@cs.ucla.edu>
283 * floatfns.c (Ftan): Use tan (x), not (sin (x) / cos (x)).
284 This produces more-accurate results.
286 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
288 * nsterm.m (updateFrameSize): Call setFrame: on the view when size
291 2012-09-08 Chong Yidong <cyd@gnu.org>
293 * syntax.c (Fstring_to_syntax): Doc fix.
295 2012-09-08 Jan Djärv <jan.h.d@swipnet.se>
297 * nsterm.m (ns_clip_to_row): Remove code that deals with drawing fringe
298 in the internal border.
299 (x_set_window_size): Remove static variables and their usage.
300 (ns_redraw_scroll_bars): Fix NSTRACE arg.
301 (ns_after_update_window_line, ns_draw_fringe_bitmap): Remove
302 fringe/internal border adjustment (Bug#11052).
303 (ns_draw_fringe_bitmap): Make code more like other terms (xterm.c).
304 (ns_draw_window_cursor): Remove fringe/internal border adjustment.
305 (ns_fix_rect_ibw): Remove.
306 (ns_get_glyph_string_clip_rect): Remove call to ns_fix_rect_ibw.
307 (ns_dumpglyphs_box_or_relief): Ditto.
308 (ns_maybe_dumpglyphs_background): Remove fringe/internal border
310 (ns_dumpglyphs_image): Ditto.
311 (ns_dumpglyphs_stretch): Fix coding style. Remove fringe/internal
313 (ns_set_vertical_scroll_bar): Remove variables barOnVeryLeft/Right and
314 their usage. Add fringe_extended_p and its use as in other terms.
315 (ns_judge_scroll_bars): Code style fix. Call updateFrameSize if
316 scroll bar was removed.
317 (updateFrameSize): New function.
318 (windowDidResize): Move code to updateFrameSize and call it.
320 * nsterm.h (EmacsView): Add updateFrameSize.
322 2012-09-07 Chong Yidong <cyd@gnu.org>
324 * textprop.c (Fget_text_property): Minor doc fix (Bug#12323).
326 * data.c (Flocal_variable_if_set_p): Doc fix (Bug#10713).
328 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
330 More signal-handler cleanup (Bug#12327).
331 * emacs.c (main): Convert three 'signal' calls to 'sigaction' calls.
332 Problem introduced when merging patches. Noted by Eli Zaretskii in
333 <http://bugs.gnu.org/12327#67>.
334 * floatfns.c: Comment fix.
335 * lisp.h (force_auto_save_soon): Declare regardless of SIGDANGER.
336 SIGDANGER might not be in scope so "#ifdef SIGDANGER" is not right,
337 and anyway the declaration is harmless even if SIGDANGER is not defined.
338 * syssignal.h (SIGIO): Also #undef if (! defined FIONREAD ||
339 defined BROKEN_FIONREAD). systty.h formerly did this, but other
340 source files not surprisingly expected syssignal.h to define, or
341 not define, SIGIO, and it's cleaner to do it that way, for consistency.
342 Include <sys/ioctl.h>, for FIONREAD.
343 * systty.h (SIGIO): Do not #undef here; it's now syssignal.h's job.
344 This eliminates a problem whereby other files mysteriously had
345 to include "syssignal.h" before including "systty.h" if they
346 wanted to use "#ifdef SIGIO".
348 2012-09-07 Eli Zaretskii <eliz@gnu.org>
350 * w32proc.c (sigaction): New function, emulates Posix 'sigaction'.
352 * w32.c (sigemptyset): Empty the set.
353 (sigsetmask, sigmask, sigblock, sigunblock): Remove unused functions.
355 * alloc.c [ENABLE_CHECKING]: Include signal.h, since we need SIGABRT.
357 2012-09-07 Dmitry Antipov <dmantipov@yandex.ru>
359 * alloc.c (mark_buffer): Revert unsafe marking optimization.
360 (mark_object): Likewise for frame objects.
362 2012-09-07 Paul Eggert <eggert@cs.ucla.edu>
364 * syssignal.h (handle_on_main_thread): Always declare,
365 even if FORWARD_SIGNAL_TO_MAIN_THREAD is not defined.
366 This ports to platforms without HAVE_PTHREAD.
368 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
370 Signal-handler cleanup (Bug#12327).
371 Emacs's signal handlers were written in the old 4.2BSD style with
372 sigblock and sigmask and so forth, and this led to some
373 inefficiencies and confusion. Rewrite these to use
374 pthread_sigmask etc. without copying signal sets around. Also,
375 get rid of the confusing macros 'SIGNAL_THREAD_CHECK' and
376 'signal', and instead use functions that do not attempt to take
377 over the system name space. This patch causes Emacs's text
378 segment to shrink by 0.7% on my platform, Fedora 17 x86-64.
379 * alloc.c, emacsgtkfixed.c, nsfns.m, widget.c, xmenu.c:
380 Do not include <signal.h> or "syssignal.h", as these
381 modules do not use signals.
382 * atimer.c, callproc.c, data.c, dispnew.c, emacs.c, floatfns.c:
383 * gtkutil.c, keyboard.c, process.c, sound.c, sysdep.c, term.c, xterm.c:
384 Do not include <signal.h>, as "syssignal.h" does that for us now.
385 * atimer.c (sigmask_atimers): New function.
386 (block_atimers, unblock_atimers): New functions,
387 replacing the old macros BLOCK_ATIMERS and UNBLOCK_ATIMERS.
389 * conf_post.h [SIGNAL_H_AHB]: Do not include <signal.h>;
390 no longer needed here.
391 * emacs.c (main): Inspect existing signal handler with sigaction,
392 so that there's no need to block and unblock SIGHUP.
393 * sysdep.c (struct save_signal): New member 'action', replacing
394 old member 'handler'.
395 (save_signal_handlers, restore_signal_handlers):
396 Use sigaction instead of 'signal' to save and restore.
397 (get_set_sighandler, set_sighandler) [!WINDOWSNT]:
398 New function. All users of 'signal' modified to use set_sighandler
399 if they're writeonly, and to use sys_signal if they're read+write.
400 (emacs_sigaction_init, forwarded_signal): New functions.
401 (sys_signal): Remove. All uses replaced by calls to sigaction
402 and emacs_sigaction_init, or by direct calls to 'signal'.
403 (sys_sigmask) [!__GNUC__]: Remove; no longer needed.
404 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove;
405 all uses replaced by pthread_sigmask etc. calls.
406 * syssignal.h: Include <signal.h>.
407 (emacs_sigaction_init, forwarded_signal): New decls.
408 (SIGMASKTYPE): Remove. All uses replaced by its definiens, sigset_t.
409 (SIGEMPTYMASK): Remove; all uses replaced by its definiens, empty_mask.
410 (sigmask, sys_sigmask): Remove; no longer needed.
411 (sigpause): Remove. All uses replaced by its definiens, sigsuspend.
412 (sigblock, sigunblock, sigfree):
413 (sigsetmask) [!defined sigsetmask]:
414 Remove. All uses replaced by pthread_sigmask.
415 (signal): Remove. Its remaining uses (with SIG_DFL and SIG_IGN)
416 no longer need to be replaced, and its typical old uses
417 are now done via emacs_sigaction_init and sigaction.
418 (sys_sigblock, sys_sigunblock, sys_sigsetmask): Remove decls.
419 (sys_sigdel): Remove; unused.
420 (NSIG): Remove a FIXME; the code's fine. Remove an unnecessary ifdef.
422 2012-09-06 Eli Zaretskii <eliz@gnu.org>
424 * process.c (CAN_HANDLE_MULTIPLE_CHILDREN): Fix a typo that broke
425 SIGCHLD handling on systems that don't have WNOHANG. (Bug#12327)
427 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
429 Explicitly mark buffer_defaults and buffer_local_symbols.
430 * alloc.c (Fgarbage_collect): Mark buffer_defaults and
431 mark_local_symbols here.
432 (mark_object): If GC_CHECK_MARKED_OBJECTS, simplify checking
433 since special buffers aren't marked here any more.
434 (allocate_buffer): Chain new buffer with all_buffers here...
435 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer): ...and
437 (Vbuffer_defaults, Vbuffer_local_symbols): Remove.
438 (syms_of_buffer): Remove staticpro of the above.
439 (init_buffer_once): Set names for buffer_defaults and
440 buffer_local_symbols.
442 2012-09-06 Paul Eggert <eggert@cs.ucla.edu>
444 Use bool for booleans in font-related modules.
445 * font.c (font_intern_prop, font_style_to_value)
446 (font_style_symbolic, font_parse_xlfd, font_parse_fcname)
447 (generate_otf_features, font_check_otf_features, font_check_otf)
448 (font_match_p, font_list_entities, font_at):
449 * fontset.c (fontset_id_valid_p, reorder_font_vector
450 (fontset_find_font, Fset_fontset_font)
451 (face_suitable_for_char_p) [0]:
452 * ftfont.c (fc_initialized, ftfont_get_open_type_spec)
453 (ftfont_open, ftfont_text_extents, ftfont_check_otf):
454 (m17n_flt_initialized, ftfont_shape_by_flt):
455 * ftxfont.c (ftxfont_draw_bitmap, ftxfont_draw):
456 * nsfont.m (nsfont_draw):
457 * w32font.c (w32font_draw):
458 * w32term.c (x_draw_glyphless_glyph_string_foreground):
459 Use bool for booleans.
460 * font.h: Adjust to above API changes.
461 (struct font, struct font_driver, struct font_driver_list):
462 Use bool for booleans.
463 (struct font): Remove useless member encoding_type.
465 * fontset.c, xftfont.c: Omit unnecessary static decls.
467 2012-09-06 Dmitry Antipov <dmantipov@yandex.ru>
469 * alloc.c (mark_object): Revert window marking code
470 since it's unsafe for the Fset_window_configuration.
472 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
474 Fix race conditions with signal handlers and errno (Bug#12327).
475 Be more systematic about preserving errno whenever a signal
476 handler returns, even if it's not in the main thread. Do this by
477 renaming signal handlers to distinguish between signal delivery
478 and signal handling. All uses changed.
479 * atimer.c (deliver_alarm_signal): Rename from alarm_signal_handler.
480 * data.c (deliver_arith_signal): Rename from arith_error.
481 * dispnew.c (deliver_window_change_signal): Rename from
482 window_change_signal.
483 * emacs.c (deliver_error_signal): Rename from fatal_error_signal.
484 (deliver_danger_signal) [SIGDANGER]: Rename from memory_warning_signal.
485 * keyboard.c (deliver_input_available_signal): Rename from
486 input_available_signal.
487 (deliver_user_signal): Rename from handle_user_signal.
488 (deliver_interrupt_signal): Rename from interrupt_signal.
489 * process.c (deliver_pipe_signal): Rename from send_process_trap.
490 (deliver_child_signal): Rename from sigchld_handler.
491 * atimer.c (handle_alarm_signal):
492 * data.c (handle_arith_signal):
493 * dispnew.c (handle_window_change_signal):
494 * emacs.c (handle_fatal_signal, handle_danger_signal):
495 * keyboard.c (handle_input_available_signal):
496 * keyboard.c (handle_user_signal, handle_interrupt_signal):
497 * process.c (handle_pipe_signal, handle_child_signal):
498 New functions, with the actual signal-handling code taken from the
499 original respective signal handlers, sans the sporadic attempts to
500 preserve errno, since that's now done by handle_on_main_thread.
501 * atimer.c (alarm_signal_handler): Remove unnecessary decl.
502 * emacs.c, floatfns.c, lisp.h: Remove unused FLOAT_CATCH_SIGKILL cruft.
503 * emacs.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
505 (main) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
506 Move initialization of main_thread to sysdep.c's init_signals.
507 * process.c (waitpid) [!WNOHANG]: #define to wait; that's good enough for
508 our usage, and simplifies the mainline code.
509 (record_child_status_change): New static function, as a helper
510 for handle_child_signal, and with most of the old child handler's
512 (CAN_HANDLE_MULTIPLE_CHILDREN): New constant.
513 (handle_child_signal): Use the above.
514 * sysdep.c (main_thread) [FORWARD_SIGNAL_TO_MAIN_THREAD]:
515 Moved here from emacs.c.
516 (init_signals) [FORWARD_SIGNAL_TO_MAIN_THREAD]: Initialize it;
517 code moved here from emacs.c's main function.
518 * sysdep.c, syssignal.h (handle_on_main_thread): New function,
519 replacing the old SIGNAL_THREAD_CHECK. All uses changed. This
520 lets callers save and restore errno properly.
522 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
524 Remove redundant or unused things here and there.
525 * lisp.h (CYCLE_CHECK, CHAR_TABLE_TRANSLATE): Remove.
526 * conf_post.h (RE_TRANSLATE): Use char_table_translate.
527 * editfns.c (Fcompare_buffer_substrings): Likewise.
528 * frame.h (struct terminal, struct font_driver_list):
529 Remove redundant declarations.
530 * window.h (Qleft, Qright): Likewise.
532 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
534 Do not mark objects from deleted buffers, windows and frames.
535 * alloc.c (mark_buffer): Mark just the buffer if it is dead.
536 (mark_object): Likewise for windows and frames.
538 2012-09-05 Dmitry Antipov <dmantipov@yandex.ru>
540 * alloc.c (valid_lisp_object_p): Treat killed buffers,
541 buffer_defaults and buffer_local_symbols as valid objects.
542 Return special value to denote them.
544 2012-09-05 Paul Eggert <eggert@cs.ucla.edu>
546 * fileio.c, filelock.c, floatfns.c, fns.c: Use bool for boolean.
547 * fileio.c (auto_saving, auto_save_error_occurred, make_temp_name)
548 (Fexpand_file_name, barf_or_query_if_file_exists, Fcopy_file)
549 (file_name_absolute_p, Fsubstitute_in_file_name):
550 (check_executable, check_writable, Ffile_accessible_directory_p)
551 (Fset_file_selinux_context, Fdefault_file_modes)
552 (Finsert_file_contents, choose_write_coding_system)
553 (Fwrite_region, build_annotations, a_write, e_write)
555 * filelock.c (boot_time_initialized, get_boot_time)
556 (get_boot_time_1, lock_file_1, within_one_second):
557 * floatfns.c (in_float):
558 * fns.c (concat, internal_equal, Frequire, base64_encode_1)
559 (base64_decode_1, cmpfn_eql, cmpfn_user_defined)
560 (sweep_weak_table, sweep_weak_hash_tables, secure_hash):
561 * lisp.h (struct Lisp_Hash_Table.cmpfn):
562 * window.c (compare_window_configurations):
563 Use bool for booleans.
564 * fileio.c (auto_saving_dir_umask, auto_saving_mode_bits)
565 (Fdefault_file_modes): Now mode_t, not int, for modes.
566 (Fdo_auto_save): Set a boolean to 1 rather than using ++.
567 (internal_delete_file): Now returns void, not a (boolean) int,
568 since nobody was looking at the return value.
569 * lisp.h, window.h: Adjust to above API changes.
571 * xdisp.c (set_message): Simplify and reindent last change.
573 2012-09-05 Juanma Barranquero <lekktu@gmail.com>
575 * makefile.w32-in ($(BLD)/sysdep.$(O)): Update dependencies.
577 2012-09-04 Lars Ingebrigtsen <larsi@gnus.org>
579 * eval.c (call_debugger): Make the function non-static so that we
580 can call it from set_message.
582 * xdisp.c (set_message): Implement the new variable `debug-on-message'.
583 (syms_of_xdisp): Defvar it and `inhibit-debug-on-message'.
585 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
587 Give more-useful info on a fatal error (Bug#12328).
588 * alloc.c [ENABLE_CHECKING]: Do not include <execinfo.h>.
589 (die) [ENABLE_CHECKING]: Call fatal_error_backtrace instead
590 of doing the work ourselves.
591 * emacs.c (fatal_error_signal): Let fatal_error_backtrace
593 (fatal_error_backtrace): New function, taken from the guts
594 of the old fatal_error_signal, but with a new option to output
596 (shut_down_emacs) [!DOS_NT]: Use strsignal to give more-useful
597 info about the signal than just its number.
598 * lisp.h (fatal_error_backtrace, emacs_backtrace): New decls.
599 * sysdep.c: Include <execinfo.h>
600 (emacs_backtrace): New function, taken partly from the previous
601 code of the 'die' function.
602 (emacs_abort): Call fatal_error_backtrace rather than abort.
604 2012-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
606 * lread.c (readevalloop): Call internal-macroexpand-for-load to perform
607 eager (load-time) macro-expansion.
608 * lisp.mk (lisp): Add macroexp.
610 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
612 Simplify redefinition of 'abort' (Bug#12316).
613 Do not try to redefine the 'abort' function. Instead, redo
614 the code so that it calls 'emacs_abort' rather than 'abort'.
615 This removes the need for the NO_ABORT configure-time macro
616 and makes it easier to change the abort code to do a backtrace.
617 * .gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
618 * emacs.c (abort) [!DOS_NT && !NO_ABORT]:
619 Remove; sysdep.c's emacs_abort now takes its place.
620 * lisp.h (emacs_abort): New decl. All calls from Emacs code to
621 'abort' changed to use 'emacs_abort'.
622 * msdos.c (dos_abort) [defined abort]: Remove; not used.
623 (abort) [!defined abort]: Rename to ...
624 (emacs_abort): ... new name.
625 * sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
626 the place of the old 'abort' in emacs.c.
627 * w32.c, w32fns.c (abort): Do not #undef.
628 * w32.c (emacs_abort): Rename from w32_abort.
630 2012-09-04 Eli Zaretskii <eliz@gnu.org>
632 * w32uniscribe.c (uniscribe_shape): Reverse the sign of
633 offsets[j].dv, since the y axis of the screen coordinates points
634 down, while the y axis of the font definition coordinates points
635 up. This fixes display of Arabic diacritics such as KASRA and
636 KASRATAN. (Bug#11860)
638 2012-09-04 Paul Eggert <eggert@cs.ucla.edu>
640 Be more systematic about _setjmp vs setjmp.
641 * alloc.c (test_setjmp, mark_stack):
642 * image.c (PNG_LONGJMP) [PNG_LIBPNG_VER < 10500]:
643 (PNG_JMPBUF) [! (PNG_LIBPNG_VER < 10500)]:
644 (png_load, my_error_exit, jpeg_load):
645 * process.c (send_process_trap, send_process):
646 Uniformly prefer _setjmp and _longjmp to setjmp and longjmp.
647 The underscored versions are up to 30x faster on some hosts.
648 Formerly, the code used setjmp+longjmp sometimes and
649 _setjmp+_longjmp at other times, with no particular reason to
650 prefer setjmp+longjmp.
652 2012-09-03 Paul Eggert <eggert@cs.ucla.edu>
654 Fix minor problem found by static checking.
655 * buffer.c (Fdelete_all_overlays): Return nil.
657 2012-09-03 Martin Rudalics <rudalics@gmx.at>
659 * buffer.c (Fdelete_all_overlays): New function.
661 2012-09-03 Chong Yidong <cyd@gnu.org>
663 * gtkutil.c: Add extern decl for Qxft.
665 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
667 * emacs.c, eval.c: Use bool for boolean.
668 * emacs.c (initialized, inhibit_window_system, running_asynch_code):
669 (malloc_using_checking) [DOUG_LEA_MALLOC]:
670 (display_arg) [HAVE_X_WINDOWS || HAVE_NS]:
671 (noninteractive, no_site_lisp, fatal_error_in_progress, argmatch)
672 (main, decode_env_path, Fdaemon_initialized):
673 * eval.c (call_debugger, Finteractive_p, interactive_p):
674 (unwind_to_catch, Fsignal, wants_debugger, skip_debugger)
675 (maybe_call_debugger, Fbacktrace):
676 * process.c (read_process_output, exec_sentinel):
677 Use bool for booleans.
678 * emacs.c (shut_down_emacs): Omit unused boolean argument NO_X.
680 * eval.c (interactive_p): Omit always-true boolean argument
681 EXCLUDE_SUBRS_P. All callers changed.
682 * dispextern.h, lisp.h: Reflect above API changes.
683 * firstfile.c (dummy): Use the address of 'main', whose signature
684 won't change, instead of the address of 'initialize', whose
685 signature just changed from int to bool.
686 * lisp.h (fatal_error_in_progress): New decl of boolean, moved here ...
687 * msdos.c (fatal_error_in_progress): ... from here.
688 * xdisp.c (redisplaying_p): Now a boolean. Set it to 1 instead
690 (redisplay_internal, unwind_redisplay): Simply clear
691 REDISPLAYING_P when unwinding, instead of saving its previous,
692 always-false value and then restoring it.
694 Clean up some extern decls.
695 Mostly, this hoists extern decls out of .c files and into .h files.
696 That way, we're more likely to catch errors if the interfaces change.
697 * alloc.c [USE_GTK]: Include "gtkutil.h" so that we need not
698 declare xg_mark_data.
699 * dispextern.h (x_frame_parm_handlers):
701 * lisp.h (Qlexical_binding, Qinternal_interpreter_environment)
702 (Qextra_light, Qlight, Qsemi_light, Qsemi_bold, Qbold, Qextra_bold)
703 (Qultra_bold, Qoblique, Qitalic):
704 Move extern decl here from .c file.
705 * alloc.c (xg_mark_data) [USE_GTK]:
707 * eval.c (Qlexical_binding):
708 * fns.c (time) [!HAVE_UNISTD_H]:
709 * gtkutil.c (Qxft, Qnormal, Qextra_light, Qlight, Qsemi_light)
710 (Qsemi_bold, Qbold, Qextra_bold, Qultra_bold, Qoblique, Qitalic):
711 * image.c (Vlibrary_cache, QCloaded_from) [HAVE_NTGUI]:
712 * lread.c (Qinternal_interpreter_environment):
713 * minibuf.c (Qbuffer):
714 * process.c (QCfamily, QCfilter):
715 * widget.c (free_frame_faces):
716 * xfaces.c (free_frame_menubar) [USE_X_TOOLKIT]:
717 * xfont.c (x_clear_errors):
718 * xterm.c (x_frame_parm_handlers):
719 Remove now-redundant extern decls.
720 * keyboard.c, keyboard.h (ignore_mouse_drag_p) [USE_GTK || HAVE_NS]:
721 * xfaces.c (Qultra_light, Qreverse_oblique, Qreverse_italic):
723 * xfaces.c: Remove unnecessary static decls.
724 * xterm.c (updating_frame): Remove decl of nonexistent object.
726 * Makefile.in (gl-stamp): Don't scan $(SOME_MACHINE_OBJECTS)
727 when building globals.h, as the objects that are not built on
728 this host are not needed to compile C files on this host.
730 2012-09-02 Jan Djärv <jan.h.d@swipnet.se>
732 * gtkutil.h: Remove prototype for x_wm_set_size_hint.
734 * frame.h: Add missing prototype for x_wm_set_size_hint.
736 2012-09-02 Paul Eggert <eggert@cs.ucla.edu>
738 * doc.c, editfns.c, insdel.c, intervals.c: Use bool for boolean.
739 * doc.c (read_bytecode_char, get_doc_string, reread_doc_file)
740 (Fdocumentation, Fdocumentation_property, Fsnarf_documentation)
741 (Fsubstitute_command_keys):
742 * editfns.c (region_limit, find_field, Fconstrain_to_field)
743 (save_excursion_save, save_excursion_restore)
744 (disassemble_lisp_time, decode_time_components, emacs_nmemftime)
745 (format_time_string, general_insert_function)
746 (make_buffer_string, make_buffer_string_both)
747 (Fsubst_char_in_region, Ftranslate_region_internal, Fformat):
748 * insdel.c (check_markers, gap_left, adjust_markers_for_insert)
749 (copy_text, insert_1, insert_1_both, insert_from_string)
750 (insert_from_string_before_markers, insert_from_string_1)
751 (insert_from_buffer, insert_from_buffer_1, replace_range)
752 (replace_range_2, del_range_1, del_range_byte, del_range_both)
753 (del_range_2, modify_region):
754 * intervals.c (intervals_equal, balance_possible_root_interval)
755 (adjust_intervals_for_insertion, merge_properties_sticky)
756 (graft_intervals_into_buffer, lookup_char_property)
757 (adjust_for_invis_intang, set_point_both)
758 (get_property_and_range, compare_string_intervals)
759 (set_intervals_multibyte_1, set_intervals_multibyte):
760 * keyboard.c (decode_timer):
761 Use bool for boolean.
762 * intervals.h, lisp.h, systime.h: Reflect above API changes.
763 * editfns.c (struct info): Use 1-bit unsigned bitfields for booleans.
765 2012-09-02 Chong Yidong <cyd@gnu.org>
767 * keymap.c (push_key_description): Print M-TAB as C-M-i
770 2012-09-02 Juanma Barranquero <lekktu@gmail.com>
772 * makefile.w32-in (CCL_H, W32FONT_H): New macros.
773 (ATIMER_H, FONT_H, $(BLD)/alloc.$(O), $(BLD)/callproc.$(O))
774 ($(BLD)/editfns.$(O), $(BLD)/ccl.$(O), $(BLD)/chartab.$(O))
775 ($(BLD)/coding.$(O), $(BLD)/sysdep.$(O), $(BLD)/fontset.$(O))
776 ($(BLD)/sysdep.$(O), $(BLD)/w32fns.$(O), $(BLD)/keyboard.$(O))
777 ($(BLD)/w32term.$(O), $(BLD)/w32menu.$(O), $(BLD)/process.$(O))
778 ($(BLD)/w32font.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
780 2012-09-01 Eli Zaretskii <eliz@gnu.org>
782 * w32uniscribe.c (uniscribe_shape): Handle correctly the case of
783 more than one grapheme cluster passed to the shaper: compute the
784 offset adjustment values separately for each cluster. (Bug#11860)
786 * image.c: Restore mistakenly removed inclusion of w32.h. Without
787 it, GCC doesn't see prototypes of w32_delayed_load, and complains
788 about implicit conversions from integer to pointer.
790 2012-09-01 Daniel Colascione <dancol@dancol.org>
792 * w32fns.c (x_display_info_for_name): Prevent crash if w32 window
793 system used too early.
795 2012-09-01 Paul Eggert <eggert@cs.ucla.edu>
797 Better seed support for (random).
798 * emacs.c (main): Call init_random.
799 * fns.c (Frandom): Set the seed from a string argument, if given.
800 Remove long-obsolete Gentzel cruft.
801 * lisp.h, sysdep.c (seed_random): Now takes address and size, not long.
802 (init_random): New function.
804 2012-09-01 Daniel Colascione <dancol@dancol.org>
806 * xterm.h: Add header guards. Declare x_menubar_window_to_frame.
807 Remove x_set_frame_alpha, x_bitmap_icon, x_make_frame_visible,
808 x_make_frame_invisible, x_iconify_frame, x_free_frame_resources,
809 x_wm_set_size_hint, x_query_colors, x_real_positions,
810 x_set_menu_bar_lines, x_char_width, x_char_height, x_sync,
811 x_set_tool_bar_lines, x_activate_menubar, and free_frame_menubar,
812 all of which have been moved to common code.
814 * xfaces.c: Include TERM_HEADER instead of listing all possible
815 window-system headers.
817 * w32xfns.c (x_sync): Correct definition of x_sync (a no-op here)
820 * w32term.h (FRAME_X_WINDOW): Use FRAME_W32_WINDOW instead of
821 directly accessing frame internals.
823 * w32font.h: Include font.h. Define syms_of_w32font and
826 * process.c: Include TERM_HEADER instead of listing all possible
827 window-system headers.
829 * nsterm.h: Remove declarations now in frame.h. Define
830 FRAME_X_SCREEN, FRAME_X_VISUAL.
832 * menu.c: Include TERM_HEADER instead of listing all possible
833 window-system headers.
835 * keyboard.h: Declare ignore_mouse_drag_p whenever we have a
838 * keyboard.c: Include TERM_HEADER instead of listing all possible
839 window-system headers.
841 * image.c: Include TERM_HEADER instead of listing all possible
842 window-system headers. Declare Vlibrary_cache when compiling for
845 * gtkutil.h (xg_list_node_): Include xterm.h to pick up needed
846 window system declarations.
848 * frame.h: Move common functions here: set_frame_menubar,
849 x_set_window_size, x_sync, x_get_focus_frame,
850 x_set_mouse_position, x_set_mouse_pixel_position,
851 x_make_frame_visible, x_make_frame_invisible, x_iconify_frame,
852 x_char_width, x_char_height, x_pixel_width, x_pixel_height,
853 x_set_frame_alpha, x_set_menu_bar_lines, x_set_tool_bar_lines,
854 x_activate_menubar, x_real_positions, x_bitmap_icon,
855 x_set_menu_bar_lines, free_frame_menubar, x_free_frame_resources,
858 * frame.c: Include TERM_HEADER instead of listing all possible
859 window-system headers.
861 * font.c: Include TERM_HEADER instead of listing all possible
862 window-system headers.
864 * emacs.c: Include TERM_HEADER.
866 * dispnew.c: Include TERM_HEADER instead of listing all possible
867 window-system headers.
869 * ccl.h: Include character.h.
871 * Makefile.in: Define WINDOW_SYSTEM_OBJ to hold objects needed for
872 the current window system; include in list of objects to link into
875 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
877 Remove mark_ttys function and fix tty_display_info initialization.
878 * lisp.h (mark_ttys): Remove prototype.
879 * alloc.c (Fgarbage_collect): Remove redundant (and the only) call
880 to mark_ttys because all possible values of 'top_frame' slot are
881 the frames which are reachable from Vframe_list.
882 * term.c (mark_ttys): Remove.
883 (init_tty): Safely initialize 'top_frame' slot with Qnil.
885 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
887 Change struct frame bitfields from unsigned char to unsigned.
888 * frame.h (struct frame): Change type of 'display_preempted',
889 'visible', 'iconified', 'has_minibuffer', 'wants_modeline',
890 'auto_raise', 'auto_lower', 'no_split', 'explicit_name',
891 'window_sizes_changed', 'mouse_moved' and 'pointer_invisible'
892 bitfields from unsigned char to unsigned.
894 2012-08-31 Dmitry Antipov <dmantipov@yandex.ru>
896 Remove unused member of struct x_output and struct w32_output.
897 * xterm.h (struct x_output): Remove unused field 'needs_exposure'.
898 * w32term.h (struct w32_output): Likewise.
900 2012-08-30 Jan Djärv <jan.h.d@swipnet.se>
902 * gtkutil.c (x_wm_set_size_hint): Use 1 col for base_width so it
903 does not become zero (Bug#12234).
905 2012-08-30 Paul Eggert <eggert@cs.ucla.edu>
907 * dispnew.c (update_frame_1): Pacify gcc -Wstrict-overflow
908 for GCC 4.7.1 x86-64.
910 2012-08-30 Glenn Morris <rgm@gnu.org>
912 * lread.c (init_lread): For out-of-tree builds, only add the
913 source directory's site-lisp dir to the load-path if it exists,
914 consistent with in-tree builds. (Bug#12302)
916 2012-08-28 Jan Djärv <jan.h.d@swipnet.se>
918 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
919 button_values to NULL. Call setStykeMask so dialogs get a close button.
920 (windowShouldClose:): Set window_closed.
921 (dealloc): New member, free button_values.
922 (process_dialog:): Make member function. Remove window argument,
923 replace window with self. Count buttons and allocate and store values
925 (addButton:value:row:): value is int with the name tag. Call setTag
926 with tag. Remove return self, declare return value as void.
927 (addString:row:): Remove return self, declare return value as void.
928 (addSplit): Remove return self, declare return value as void.
929 (clicked:): Remove return self, declare return value as void.
930 Set dialog_return to button_values[seltag]. Code formatting change.
931 (initFromContents:isQuestion:): Adjust call to process_dialog.
932 Code formatting change.
933 (timeout_handler:): Set timer_fired to YES.
934 (runDialogAt:): Set timer_fired to NO.
935 Handle click on close button as quit.
937 * nsterm.h (EmacsDialogPanel): Make timer_fired BOOL.
938 Add window_closed and button_values. Add void as return value for
939 add(Button|String|Split). addButton takes int instead of Lisp_Object.
940 Add process_dialog as new member.
942 2012-08-28 Eli Zaretskii <eliz@gnu.org>
944 * ralloc.c (free_bloc): Don't dereference a 'heap' structure if it
945 is not one of the heaps we manage. (Bug#12242)
947 2012-08-28 Glenn Morris <rgm@gnu.org>
949 * eval.c (Fcalled_interactively_p): Doc fix. (Bug#11747)
951 2012-08-28 Martin Rudalics <rudalics@gmx.at>
953 * window.c (Fset_window_configuration): Remove handling of
954 auto-buffer-name window parameter. Install revision of reverted
957 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
959 Do not allow to set major mode for a dead buffer.
960 * buffer.c (Fset_buffer_major_mode): Signal an error
961 if the buffer is dead.
962 (Fother_buffer, other_buffer_safely): Remove redundant
965 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
967 Always use set_buffer_if_live to restore original buffer at unwind.
968 * buffer.h (record_unwind_current_buffer): New function.
969 * bytecode.c, dispnew.c, editfns.c, fileio.c, fns.c, insdel.c:
970 * keyboard.c, keymap.c, minibuf.c, print.c, process.c, textprop.c:
971 * undo.c, window.c: Adjust users.
972 * buffer.c (set_buffer_if_live): Fix comment.
974 2012-08-28 Dmitry Antipov <dmantipov@yandex.ru>
976 Fix usage of set_buffer_internal.
977 * buffer.h (set_buffer_internal): Make it BUFFER_INLINE.
978 * buffer.c (set_buffer_if_live): Use set_buffer_internal.
979 * coding.c (decode_coding): Omit redundant test.
980 * fileio.c (decide_coding_unwind): Likewise.
981 * fns.c (secure_hash): Likewise.
982 * insdel.c (modify_region): Likewise.
983 * keyboard.c (command_loop_1): Likewise.
984 * print.c (PRINTFINISH): Likewise.
985 * xdisp.c (run_window_scroll_functions): Use set_buffer_internal.
987 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
989 * dispnew.c: Use bool for boolean.
990 (frame_garbaged, display_completed, delayed_size_change)
991 (fonts_changed_p, add_window_display_history)
992 (add_frame_display_history, verify_row_hash)
993 (adjust_glyph_matrix, clear_window_matrices, glyph_row_slice_p)
994 (row_equal_p, realloc_glyph_pool)
995 (allocate_matrices_for_frame_redisplay)
996 (showing_window_margins_p)
997 (adjust_frame_glyphs_for_frame_redisplay)
998 (build_frame_matrix_from_leaf_window, make_current)
999 (mirrored_line_dance, mirror_line_dance, update_frame)
1000 (update_window_tree, update_single_window)
1001 (check_current_matrix_flags, update_window, update_text_area)
1002 (update_window_line, set_window_update_flags, scrolling_window)
1003 (update_frame_1, scrolling, buffer_posn_from_coords)
1004 (do_pending_window_change, change_frame_size)
1005 (change_frame_size_1, sit_for):
1006 Use bool for boolean.
1007 (clear_glyph_matrix_rows): Rename from enable_glyph_matrix_rows,
1008 and remove last int (actually boolean) argument, which was always 0.
1009 All callers changed.
1010 * dispextern.h, frame.h, lisp.h: Reflect above API changes.
1011 * dispextern.h (struct composition_it): Use bool for boolean.
1012 (struct glyph_matrix): Don't assume buffer sizes can fit in 'int'.
1013 (struct bidi_it): Use unsigned:1, not int, for boolean prev_was_pdf.
1014 * dired.c (file_name_completion):
1015 Use bool for boolean. (This was missed in an earlier change.)
1017 2012-08-27 Martin Rudalics <rudalics@gmx.at>
1019 * window.c (Fset_window_configuration): Revert first part of
1022 2012-08-27 Jan Djärv <jan.h.d@swipnet.se>
1024 * nsterm.h (NSPanel): New class variable dialog_return.
1026 * nsmenu.m (initWithContentRect:styleMask:backing:defer:): Initialize
1028 (windowShouldClose:): Use stop instead of stopModalWithCode.
1029 (clicked:): Ditto, and also set dialog_return (Bug#12258).
1030 (timeout_handler:): Use stop instead of abortModal. Send a dummy
1032 (runDialogAt:): Make ret Lisp_Object. Set it from dialog_return when
1035 2012-08-27 Paul Eggert <eggert@cs.ucla.edu>
1037 * composite.c, data.c, dbusbind.c, dired.c: Use bool for booleans.
1038 * composite.c (find_composition, composition_gstring_p)
1039 (composition_reseat_it, find_automatic_composition):
1040 * data.c (let_shadows_buffer_binding_p)
1041 (let_shadows_global_binding_p, set_internal, make_blv)
1042 (Fmake_variable_buffer_local, Fmake_local_variable)
1043 (Fmake_variable_frame_local, arithcompare, cons_to_unsigned)
1044 (cons_to_signed, arith_driver):
1045 * dbusbind.c (xd_in_read_queued_messages):
1046 * dired.c (directory_files_internal, file_name_completion):
1047 Use bool for booleans.
1048 * dired.c (file_name_completion):
1049 * process.h (fd_callback):
1050 Omit int (actually boolean) argument. It wasn't being used.
1052 * composite.h, lisp.h: Reflect above API changes.
1054 * cmds.c, coding.c: Use bool for booleans.
1055 * cmds.c (move_point, Fself_insert_command):
1056 * coding.h (struct composition status, struct coding_system):
1057 * coding.c (detect_coding_utf_8, encode_coding_utf_8)
1058 (detect_coding_utf_16, encode_coding_utf_16, detect_coding_emacs_mule)
1059 (emacs_mule_char, decode_coding_emacs_mule)
1060 (encode_coding_emacs_mule, detect_coding_iso_2022)
1061 (decode_coding_iso_2022, encode_invocation_designation)
1062 (encode_designation_at_bol, encode_coding_iso_2022)
1063 (detect_coding_sjis, detect_coding_big5, decode_coding_sjis)
1064 (decode_coding_big5, encode_coding_sjis, encode_coding_big5)
1065 (detect_coding_ccl, encode_coding_ccl, decode_coding_raw_text)
1066 (encode_coding_raw_text, detect_coding_charset)
1067 (decode_coding_charset, encode_coding_charset, detect_eol)
1068 (detect_coding, get_translation_table, produce_chars)
1069 (consume_chars, reused_workbuf_in_use)
1070 (make_conversion_work_buffer, code_conversion_save)
1071 (decode_coding_object, encode_coding_object)
1072 (detect_coding_system, char_encodable_p)
1073 (Funencodable_char_position, code_convert_region)
1074 (code_convert_string, code_convert_string_norecord)
1075 (Fset_coding_system_priority):
1076 * fileio.c (Finsert_file_contents):
1077 Use bool for booleans.
1078 * coding.h, lisp.h: Reflect above API changes.
1079 * coding.c: Remove unnecessary static function decls.
1080 (detect_coding): Use unsigned, not signed, to copy an unsigned field.
1081 (decode_coding, encode_coding, decode_coding_gap): Return 'void',
1082 not a boolean 'int', since callers never look at the return value.
1083 (ALLOC_CONVERSION_WORK_AREA): Assume caller returns 'void', not 'int'.
1084 * coding.h (decoding_buffer_size, encoding_buffer_size)
1085 (emacs_mule_string_char): Remove unused extern decls.
1086 (struct iso_2022_spec, struct coding_system):
1087 Use 'unsigned int : 1' for boolean fields, since there's more than one.
1088 (struct emacs_mule_spec): Remove unused field 'full_support'.
1089 All initializations removed.
1090 * cmds.c (internal_self_insert): Don't assume EMACS_INT fits in 'int'.
1092 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
1094 Fix spare memory change (Bug#12286).
1095 * alloc.c (mark_maybe_pointer): Handle MEM_TYPE_SPARE.
1096 (valid_lisp_object_p): Likewise.
1098 2012-08-27 Martin Rudalics <rudalics@gmx.at>
1100 * window.c (Fset_window_configuration): Record any window's old
1101 buffer if it's replaced (see Bug#8789). If the new current
1102 buffer doesn't appear in the selected window, go to its old
1105 2012-08-27 Dmitry Antipov <dmantipov@yandex.ru>
1107 Special MEM_TYPE_SPARE to denote reserved memory.
1108 * alloc.c (enum mem_type): New memory type.
1109 (refill_memory_reserve): Use new type for spare memory.
1110 This prevents live_cons_p and live_string_p from incorrect
1111 detection of uninitialized objects from spare memory as live.
1113 2012-08-26 Paul Eggert <eggert@cs.ucla.edu>
1116 * Makefile.in (.PHONY): versioclean -> versionclean.
1118 Remove unused external symbols.
1119 * data.c (Qcons, Qfloat, Qmisc, Qstring, Qvector):
1120 * window.c (Qwindow_valid_p, decode_valid_window):
1121 Now static, not extern.
1122 * data.c (Qinterval): Remove; unused.
1123 (syms_of_data): Do not define 'interval'.
1124 * lisp.h (Qinteger, Qstring, Qmisc, Qvector, Qfloat, Qcons):
1125 * window.h (decode_valid_window):
1128 * character.c, charset.c, chartab.c: Use bool for booleans.
1129 * character.c (lisp_string_width, string_count_byte8)
1130 (string_escape_byte8):
1131 * charset.c (charset_map_loaded, load_charset_map, read_hex):
1132 (load_charset_map_from_file, map_charset_chars)
1133 (Fdefine_charset_internal, define_charset_internal)
1134 (Fdeclare_equiv_charset, find_charsets_in_text)
1135 (Ffind_charset_region, char_charset, Fiso_charset):
1136 * chartab.c (sub_char_table_ref, sub_char_table_ref_and_range)
1137 (sub_char_table_set, sub_char_table_set_range)
1138 (char_table_set_range, optimize_sub_char_table)
1139 (map_sub_char_table):
1140 Use bool for boolean.
1141 * character.c (str_to_unibyte): Omit last boolean argument; it was
1142 always 0. All callers changed.
1143 * character.h, charset.h: Adjust to match previous changes.
1144 * character.h (char_printable_p): Remove decl of nonexistent function.
1145 * charset.h (struct charset): Members code_linear_p, iso_chars_96,
1146 ascii_compatible_p, supplementary_p, compact_codes_p, unified_p
1147 are all boolean, so make them single-bit bitfields.
1149 * lisp.h (ASET): Remove attempt to detect side effects.
1150 It was meant to be temporary and it often doesn't work,
1151 because when IDX has side effects the behavior of IDX==IDX
1152 is undefined. See Stefan Monnier in
1153 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00762.html>.
1155 2012-08-26 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
1157 * lisp.h (functionp): New function (extracted from Ffunctionp).
1158 (FUNCTIONP): Use it.
1159 * eval.c (Ffunctionp): Use it.
1161 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
1163 * xgselect.c (xg_select): Use auto storage for the GPollFD buffer
1164 as that's faster and simpler than static storage. Don't bother
1165 with the g_main_context_query overhead if g_main_context_pending
1166 says no events are pending.
1167 (gfds, gfds_size): Remove these static vars.
1168 (xgselect_initialize): Remove; no longer needed.
1169 All uses and decls removed.
1171 * emacs.c (fatal_error_signal_hook): Remove.
1172 All uses removed. This leftover from old code was always 0.
1174 * casefiddle.c, casetab.c, category.c: Use bool for boolean.
1175 * casefiddle.c (casify_object, casify_region):
1176 * casetab.c (set_case_table):
1177 * category.c, category.h (word_boundary_p):
1178 * category.h (CHAR_HAS_CATEGORY):
1179 Use bool for booleans, instead of int.
1181 2012-08-25 Eli Zaretskii <eliz@gnu.org>
1183 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on $(GNU_LIB)/execinfo.h.
1185 2012-08-25 Paul Eggert <eggert@cs.ucla.edu>
1187 On assertion failure, print backtrace if available.
1188 * alloc.c [ENABLE_CHECKING]: Include <execinfo.h>.
1189 (die) [ENABLE_CHECKING]: Print a backtrace if available.
1190 * Makefile.in (LIB_EXECINFO): New macro.
1193 * bytecode.c, callint.c, callproc.c: Use bool for boolean.
1194 * bytecode.c (exec_byte_code):
1195 * callint.c (check_mark, Fcall_interactively):
1196 * callproc.c (Fcall_process, add_env, child_setup, getenv_internal_1)
1197 (getenv_internal, sync_process_alive, call_process_exited):
1198 * lisp.h (USE_SAFE_ALLOCA):
1199 Use bool for booleans, instead of int.
1200 * lisp.h, process.h: Adjust prototypes to match above changes.
1201 * callint.c (Fcall_interactively): Don't assume the mark's
1202 offset fits in 'int'.
1204 2012-08-24 Paul Eggert <eggert@cs.ucla.edu>
1206 * buffer.c, buffer.h: Use bool for boolean.
1207 * buffer.c (reset_buffer_local_variables)
1208 (buffer_lisp_local_variables, Fset_buffer_modified_p)
1209 (Frestore_buffer_modified_p, Fset_buffer_multibyte):
1210 (overlays_at, overlays_in, mouse_face_overlay_overlaps)
1211 (overlay_touches_p, overlay_strings, Foverlay_put)
1212 (report_overlay_modification, call_overlay_mod_hooks):
1213 (mmap_enlarge, mmap_set_vars):
1214 * buffer.h (buffer_has_overlays, uppercasep, lowercasep):
1215 Use bool for booleans, instead of int.
1216 * buffer.c (compact_buffer, mmap_free_1): Return void, not int,
1217 since the 1-or-0 return value is always ignored anyway.
1218 (mmap_initialized_p):
1219 * buffer.h (struct buffer_text.inhibit_shrinking): Now bool, not int.
1220 * buffer.h, lisp.h: Adjust prototypes to match above changes.
1222 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
1224 * bidi.c: Use bool for boolean.
1225 This is a bit more readable, and makes the text segment of bidi.o
1226 0.4% smaller on my platform (GCC 4.7.1 x86-64, Fedora 15).
1227 Presumably it's faster too.
1228 (bidi_initialized, bidi_ignore_explicit_marks_for_paragraph_level):
1230 (bidi_cache_find_level_change, bidi_cache_iterator_state)
1231 (bidi_unshelve_cache, bidi_init_it, bidi_count_bytes)
1232 (bidi_char_at_pos, bidi_fetch_char, bidi_paragraph_init)
1233 (bidi_explicit_dir_char, bidi_level_of_next_char)
1234 (bidi_find_other_level_edge, bidi_move_to_visually_next):
1235 Use bool for booleans, instead of int.
1236 * dispextern.h (bidi_init_it, bidi_paragraph_init)
1237 (bidi_unshelve_cache): Adjust decls to match code.
1239 2012-08-23 Martin Rudalics <rudalics@gmx.at>
1241 * keyboard.c (Fposn_at_x_y): Do not allow internal window as
1244 2012-08-23 Paul Eggert <eggert@cs.ucla.edu>
1246 * atimer.c, atimer.h (turn_on_atimers): Use bool for boolean.
1247 * atimer.h: Include <stdbool.h>.
1249 2012-08-22 Dan Nicolaescu <dann@gnu.org>
1251 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_NS_P): Change to
1252 compile time tests instead of run time tests on systems that do
1254 (FRAME_MAC_P): Remove leftover from deleted code.
1255 * frame.c (syms_of_frame): Remove leftover from deleted code.
1257 2012-08-22 Jan Djärv <jan.h.d@swipnet.se>
1259 * nsterm.m (insertText:): Don't clear modifiers if code is space.
1261 2012-08-22 Paul Eggert <eggert@cs.ucla.edu>
1263 * fontset.c (FONTSET_ADD): Return void, not Lisp_Object.
1264 Otherwise, the compiler complains about (A?B:C) where B is void
1265 and C is Lisp_Object. This fixes an incompatibility with Sun C 5.12.
1266 (fontset_add): Return void, for FONTSET_ADD.
1268 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
1270 * alloc.c: Use bool for booleans.
1271 (gc_in_progress, abort_on_gc)
1272 (setjmp_tested_p) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
1273 (dont_register_blocks) [GC_MALLOC_CHECK]:
1274 (suppress_checking) [ENABLE_CHECKING]: Now bool, not int.
1275 (check_string_bytes, make_specified_string, memory_full)
1276 (live_string_p, live_cons_p, live_symbol_p, live_float_p)
1277 (live_misc_p, live_vector_p, live_buffer_p, mark_maybe_object)
1278 (mark_stack, valid_pointer_p, make_pure_string)
1279 (Fgarbage_collect, survives_gc_p, gc_sweep):
1280 Use bool for booleans, instead of int.
1281 (test_setjmp) [!GC_SAVE_REGISTERS_ON_STACK && !GC_SETJMP_WORKS]:
1282 Remove unused local.
1283 * alloc.c (PURE_POINTER_P):
1284 * lisp.h (STRING_MULTIBYTE): Document that it returns a boolean.
1285 * editfns.c (Fformat):
1286 * fileio.c (Fexpand_file_name, Fsubstitute_in_file_name)
1288 * fns.c (sweep_weak_table):
1289 * lisp.h (suppress_checking, push_message, survives_gc_p)
1290 (make_pure_string, gc_in_progress, abort_on_gc):
1291 * lread.c (readchar, read1):
1292 * print.c (Fprin1_to_string):
1293 * xdisp.c (push_message):
1294 Use bool for booleans affected directly or indirectly by
1297 Make recently-introduced setters macros.
1298 * fontset.c (set_fontset_id, set_fontset_name, set_fontset_ascii)
1299 (set_fontset_base, set_fontset_frame, set_fontset_nofont_face)
1300 (set_fontset_default, set_fontset_fallback): Rename from their
1301 upper-case counterparts, and make them functions rather than macros.
1302 This is more consistent with the other recently-introduced setters.
1303 These don't need to be inline, since they're local.
1305 2012-08-21 Jan Djärv <jan.h.d@swipnet.se>
1307 * nsterm.m (fd_handler:): Alloc and release a NSAutoreleasePool in
1308 the loop (Bug#12247).
1310 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
1312 * lisp.h (vcopy): Use memcpy rather than our own loop.
1313 This fixes a performance regression introduced by the recent
1314 addition of vcopy. This means 'vcopy' will need to be modified
1315 for a copying collector, but that's OK. Also, tighten the
1316 checking in the assertion.
1318 2012-08-21 Eli Zaretskii <eliz@gnu.org>
1320 * w32uniscribe.c (uniscribe_shape): Fix producing gstring
1321 components for RTL text (Bug#11860). Adjust X-OFFSET of each
1322 non-base glyph for the width of the base character, according to
1323 what x_draw_composite_glyph_string_foreground expects.
1324 Generate WADJUST value according to composition_gstring_width's
1325 expectations, to produce correct width of the composed character.
1326 Reverse the sign of the DU offset produced by ScriptPlace.
1328 2012-08-21 Paul Eggert <eggert@cs.ucla.edu>
1330 * dbusbind.c (xd_remove_watch): Do not assume C99 comments.
1332 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
1334 Avoid direct writes to contents member of struct Lisp_Vector.
1335 * lisp.h (vcopy): New function to copy data into vector.
1336 * dispnew.c (Fframe_or_buffer_changed_p): Use AREF and ASET.
1337 * fns.c (Ffillarray): Use ASET.
1338 * keyboard.c (timer_check_2): Use AREF and ASET.
1339 (append_tool_bar_item, Frecent_keys): Use vcopy.
1340 * lread.c (read_vector): Use ASET.
1341 * msdos.c (Frecent_doskeys): Use vcopy.
1342 * xface.c (Finternal_copy_lisp_face): Use vcopy.
1343 (Finternal_merge_in_global_face): Use ASET and vcopy.
1344 * xfont.c (xfont_list_pattern): Likewise.
1346 2012-08-21 Martin Rudalics <rudalics@gmx.at>
1348 * window.c (Fwindow_point): For the selected window always return
1349 the position of its buffer's point.
1350 (Fset_window_point): For the selected window always go in its
1351 buffer to the specified position.
1353 2012-08-21 Dmitry Antipov <dmantipov@yandex.ru>
1355 Setter macros for fontsets.
1356 * fontset.c (SET_FONTSET_ID, SET_FONTSET_NAME, SET_FONTSET_ASCII)
1357 (SET_FONTSET_BASE, SET_FONTSET_FRAME, SET_FONTSET_NOFONT_FACE)
1358 (SET_FONTSET_DEFAULT, SET_FONTSET_FALLBACK): New macros.
1361 2012-08-20 Glenn Morris <rgm@gnu.org>
1363 * Makefile.in (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
1364 Don't assume that `ln -f' works.
1366 2012-08-20 Eli Zaretskii <eliz@gnu.org>
1368 * .gdbinit: Use "set $dummy = ..." to avoid warnings from GDB 7.5
1369 and later about non-assignments with no effect. See discussion at
1370 http://sourceware.org/ml/gdb-patches/2012-08/msg00518.html for
1373 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
1375 Inline setter functions for Lisp_Objects slots of struct specbinding.
1376 * eval.c (set_specpdl_symbol, set_specpdl_old_value): New functions.
1379 2012-08-20 Martin Rudalics <rudalics@gmx.at>
1381 * window.c (select_window): Always make selected window's buffer
1384 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
1386 Use AREF and ASET for docstrings of category tables.
1387 * category.h (CATEGORY_DOCSTRING): Use AREF.
1388 (SET_CATEGORY_DOCSTRING): Use ASET.
1389 * category.c (Fdefine_category): Use SET_CATEGORY_DOCSTRING.
1391 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
1393 Inline setter functions for hash table members.
1394 * lisp.h (set_hash_key, set_hash_value, set_hash_next)
1395 (set_hash_hash, set_hash_index): Rename with _slot suffix.
1396 (set_hash_key_and_value, set_hash_index, set_hash_next)
1397 (set_hash_hash): New functions.
1398 * charset.c, fns.c: Adjust users.
1400 2012-08-20 Dmitry Antipov <dmantipov@yandex.ru>
1402 Inline getter and setter functions for per-buffer values.
1403 * buffer.h (per_buffer_default, set_per_buffer_default)
1404 (per_buffer_value, set_per_buffer_value): New functions.
1405 (PER_BUFFER_VALUE, PER_BUFFER_DEFAULT): Remove.
1406 * buffer.c, data.c: Adjust users.
1408 2012-08-20 Juanma Barranquero <lekktu@gmail.com>
1410 * makefile.w32-in ($(BLD)/vm-limit.$(O)): Update dependencies.
1412 2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
1414 Rely on <config.h> + <unistd.h> to declare 'environ',
1415 as gnulib does this if the system doesn't.
1416 * callproc.c, editfns.c, process.c (environ) [!USE_CRT_DLL]:
1417 Remove declaration. MS-Windows declares it on stdlib.h which is
1418 included by conf_post.h.
1419 * emacs.c (environ) [DOUG_LEA_MALLOC]:
1420 * vm-limit.c (environ) [ORDINARY_LINK]: Remove decl.
1421 * vm-limit.c: Include <unistd.h>, for 'environ'.
1423 * unexaix.c, unexcoff.c: Include "mem-limits.h".
1424 (start_of_data): Remove decl; mem-limits.h provides it.
1426 * xdisp.c (handle_invisible_prop): Make it a bit faster
1427 and avoid a gcc -Wmaybe-uninitialized diagnostic.
1429 2012-08-19 Chong Yidong <cyd@gnu.org>
1431 * xdisp.c (handle_invisible_prop): Fix ellipses at overlay string
1434 2012-08-19 Andreas Schwab <schwab@linux-m68k.org>
1436 * .gdbinit: Use call instead of set when calling a function in the
1439 * data.c (set_internal): Don't use set_blv_found.
1440 (Fkill_local_variable): Likewise.
1442 2012-08-18 Alp Aker <alp.tekin.aker@gmail.com>
1444 * nsfont.m (ns_ascii_average_width): Ensure the string
1445 ascii_printable is initialized with a null-terminated character
1446 array. Otherwise, it can contain undesired extra characters.
1448 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
1450 port new setting code to Sun C 5.8 2005/10/13
1451 * chartab.c, lisp.h (char_table_set, char_table_set_range):
1452 Return void, not Lisp_Object. Otherwise, the compiler
1453 complains about (A?B:C) where B is void and C is Lisp_Object
1454 when compiling CHAR_TABLE_SET, due to the recent change to
1455 the API of sub_char_table_set_contents.
1457 2012-08-18 Chong Yidong <cyd@gnu.org>
1459 * xdisp.c (handle_invisible_prop): Obey TEXT_PROP_MEANS_INVISIBLE
1460 for the string case (Bug#3874).
1462 2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
1464 * buffer.h (BSET): Remove (Bug#12215).
1465 Replace all uses with calls to new setter functions.
1466 (bset_bidi_paragraph_direction, bset_case_canon_table)
1467 (bset_case_eqv_table, bset_directory, bset_display_count)
1468 (bset_display_time, bset_downcase_table)
1469 (bset_enable_multibyte_characters, bset_filename, bset_keymap)
1470 (bset_last_selected_window, bset_local_var_alist)
1471 (bset_mark_active, bset_point_before_scroll, bset_read_only)
1472 (bset_truncate_lines, bset_undo_list, bset_upcase_table)
1474 * buffer.c (bset_abbrev_mode, bset_abbrev_table)
1475 (bset_auto_fill_function, bset_auto_save_file_format)
1476 (bset_auto_save_file_name, bset_backed_up, bset_begv_marker)
1477 (bset_bidi_display_reordering, bset_buffer_file_coding_system)
1478 (bset_cache_long_line_scans, bset_case_fold_search)
1479 (bset_ctl_arrow, bset_cursor_in_non_selected_windows)
1480 (bset_cursor_type, bset_display_table, bset_extra_line_spacing)
1481 (bset_file_format, bset_file_truename, bset_fringe_cursor_alist)
1482 (bset_fringe_indicator_alist, bset_fringes_outside_margins)
1483 (bset_header_line_format, bset_indicate_buffer_boundaries)
1484 (bset_indicate_empty_lines, bset_invisibility_spec)
1485 (bset_left_fringe_width, bset_major_mode, bset_mark)
1486 (bset_minor_modes, bset_mode_line_format, bset_mode_name)
1487 (bset_name, bset_overwrite_mode, bset_pt_marker)
1488 (bset_right_fringe_width, bset_save_length)
1489 (bset_scroll_bar_width, bset_scroll_down_aggressively)
1490 (bset_scroll_up_aggressively, bset_selective_display)
1491 (bset_selective_display_ellipses, bset_vertical_scroll_bar_type)
1492 (bset_word_wrap, bset_zv_marker):
1493 * category.c (bset_category_table):
1494 * syntax.c (bset_syntax_table):
1495 New setter functions.
1497 * process.h (PSET): Remove (Bug#12215).
1498 Replace all uses with calls to new setter functions.
1499 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
1500 (PROCESS_INLINE): New macro.
1501 (pset_childp): New setter function.
1502 (pset_gnutls_cred_type) [HAVE_GNUTLS]: New setter function.
1503 * process.c (PROCESS_INLINE):
1504 Define to EXTERN_INLINE, so that the corresponding functions
1505 are compiled into code.
1506 (pset_buffer, pset_command, pset_decode_coding_system)
1507 (pset_decoding_buf, pset_encode_coding_system)
1508 (pset_encoding_buf, pset_filter, pset_log, pset_mark, pset_name)
1509 (pset_plist, pset_sentinel, pset_status, pset_tty_name)
1510 (pset_type, pset_write_queue): New setter functions.
1512 * window.h (WSET): Remove (Bug#12215).
1513 Replace all uses with calls to new setter functions.
1514 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
1515 (WINDOW_INLINE): New macro.
1516 (wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
1517 (wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
1518 (wset_total_lines, wset_vertical_scroll_bar)
1519 (wset_window_end_pos, wset_window_end_valid)
1520 (wset_window_end_vpos): New setter functions.
1521 * window.c (WINDOW_INLINE):
1522 Define to EXTERN_INLINE, so that the corresponding functions
1523 are compiled into code.
1524 (wset_combination_limit, wset_dedicated, wset_display_table)
1525 (wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
1526 (wset_new_normal, wset_new_total, wset_next_buffers)
1527 (wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
1528 (wset_prev_buffers, wset_right_fringe_width)
1529 (wset_right_margin_cols, wset_scroll_bar_width, wset_start)
1530 (wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
1531 (wset_window_parameters):
1532 * xdisp.c (wset_base_line_number, wset_base_line_pos)
1533 (wset_column_number_displayed, wset_region_showing):
1534 New setter functions.
1536 * termhooks.h (TSET): Remove (Bug#12215).
1537 Replace all uses with calls to new setter functions.
1538 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
1539 (TERMHOOKS_INLINE): New macro.
1540 (tset_charset_list, tset_selection_alist): New setter functions.
1541 * terminal.c (TERMHOOKS_INLINE):
1542 Define to EXTERN_INLINE, so that the corresponding functions
1543 are compiled into code.
1544 (tset_param_alist): New setter function.
1546 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
1548 * keyboard.h (KSET): Remove (Bug#12215).
1549 Replace all uses with calls to new setter functions.
1550 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
1551 (KEYBOARD_INLINE): New macro.
1552 (kset_default_minibuffer_frame, kset_defining_kbd_macro)
1553 (kset_input_decode_map, kset_last_command, kset_last_kbd_macro)
1554 (kset_prefix_arg, kset_system_key_alist, kset_window_system):
1555 New setter functions.
1556 * keyboard.c (KEYBOARD_INLINE):
1557 Define to EXTERN_INLINE, so that the corresponding functions
1558 are compiled into code.
1559 (kset_echo_string, kset_kbd_queue)
1560 (kset_keyboard_translate_table, kset_last_prefix_arg)
1561 (kset_last_repeatable_command, kset_local_function_key_map)
1562 (kset_overriding_terminal_local_map, kset_real_last_command)
1563 (kset_system_key_syms): New setter functions.
1565 * frame.h (FSET): Remove (Bug#12215).
1566 Replace all uses with calls to new setter functions.
1567 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
1568 (FRAME_INLINE): New macro.
1569 (fset_buffer_list, fset_buried_buffer_list, fset_condemned_scroll_bars)
1570 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
1571 (fset_face_alist, fset_focus_frame, fset_icon_name, fset_menu_bar_items)
1572 (fset_menu_bar_vector, fset_menu_bar_window, fset_name)
1573 (fset_param_alist, fset_root_window, fset_scroll_bars)
1574 (fset_selected_window, fset_title, fset_tool_bar_items)
1575 (fset_tool_bar_position, fset_tool_bar_window): New functions.
1576 * frame.c (FRAME_INLINE):
1577 Define to EXTERN_INLINE, so that the corresponding functions
1578 are compiled into code.
1579 (fset_buffer_predicate, fset_minibuffer_window): New setter functions.
1581 A few more naming-convention fixes for getters and setters.
1582 * buffer.c (set_buffer_overlays_before): Move here from buffer.h,
1583 and rename from buffer_overlays_set_before.
1584 (set_buffer_overlays_after): Move here from buffer.h, and rename
1585 from buffer_overlays_set_after.
1586 * buffer.h (buffer_intervals): Rename from buffer_get_intervals.
1588 (set_buffer_intervals): Rename from buffer_set_intervals.
1589 * intervals.c (set_interval_object): Move here from intervals.h,
1590 and rename from interval_set_object.
1591 (set_interval_left): Move here from intervals.h, and rename from
1593 (set_interval_right): Move here from intervals.h, and rename from
1595 (copy_interval_parent): Move here from intervals.h, and rename from
1596 interval_copy_parent.
1597 * intervals.h (set_interval_parent): Rename from interval_set_parent.
1598 (set_interval_plist): Rename from interval_set_plist.
1599 Return void, not Lisp_Object, since no caller uses the result.
1600 * lisp.h (string_intervals): Rename from string_get_intervals.
1601 (set_string_intervals): Rename from string_set_intervals.
1603 * lisp.h (set_char_table_extras): Rename from char_table_set_extras.
1604 (set_char_table_contents): Rename from char_table_set_contents.
1605 (set_sub_char_table_contents): Rename from sub_char_table_set_contents.
1606 All uses changed. See the end of
1607 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00549.html>.
1609 * lisp.h (CSET): Remove (Bug#12215).
1610 (set_char_table_ascii, set_char_table_defalt, set_char_table_parent)
1611 (set_char_table_purpose): New functions,
1612 replacing CSET. All uses changed. For example, replace
1613 "CSET (XCHAR_TABLE (char_table), parent, parent);" with
1614 "set_char_table_parent (char_table, parent);".
1615 The old version was confusing because it used the same name
1616 'parent' for two different things.
1618 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
1620 Functions to get and set Lisp_Object fields of buffer-local variables.
1621 * lisp.h (blv_found, set_blv_found, blv_value, set_blv_value)
1622 (set_blv_where, set_blv_defcell, set_blv_valcell): New functions.
1623 (BLV_FOUND, SET_BLV_FOUND, BLV_VALUE, SET_BLV_VALUE): Remove.
1624 * data.c, eval.c, frame.c: Adjust users.
1626 2012-08-17 Chong Yidong <cyd@gnu.org>
1628 * xfaces.c (merge_face_vectors): If the target font specfies a
1629 font spec, make the font's attributes take precedence over
1630 directly-specified attributes.
1631 (merge_face_ref): Recognize :font.
1633 2012-08-17 Dmitry Antipov <dmantipov@yandex.ru>
1635 Do not use memcpy for copying intervals.
1636 * intervals.c (reproduce_interval): New function.
1637 (reproduce_tree, reproduce_tree_obj): Use it.
1638 (reproduce_tree_obj): Remove prototype.
1640 2012-08-17 Paul Eggert <eggert@cs.ucla.edu>
1642 * lisp.h (duration_to_sec_usec): Remove unused decl.
1644 2012-08-17 Alp Aker <alp.tekin.aker@gmail.com>
1646 * nsfont.m (ns_ascii_average_width): Send initWithFormat selector
1647 to an allocated instance of NSString, not to the class itself.
1649 2012-08-17 Juanma Barranquero <lekktu@gmail.com>
1651 * makefile.w32-in (C_CTYPE_H): New macro.
1652 (LISP_H, $(BLD)/ccl.$(O), $(BLD)/doc.$(O), $(BLD)/w32console.$(O)):
1653 ($(BLD)/fontset.$(O), $(BLD)/frame.$(O), $(BLD)/composite.$(O)):
1654 ($(BLD)/sysdep.$(O), $(BLD)/w32uniscribe.$(O)): Update dependencies.
1656 2012-08-16 Paul Eggert <eggert@cs.ucla.edu>
1658 Use ASCII tests for character types.
1659 * category.c, dispnew.c, doprnt.c, editfns.c, syntax.c, term.c:
1661 Don't include <ctype.h>; was not needed.
1662 * charset.c, doc.c, fileio.c, font.c, frame.c, gtkutil.c, image.c:
1663 * sysdep.c, xfaces.c:
1664 Include <c-ctype.h> instead of <ctype.h>.
1665 * nsterm.m: Include <c-ctype.h>.
1666 * charset.c (read_hex):
1667 * doc.c (Fsnarf_documentation):
1668 * fileio.c (IS_DRIVE) [WINDOWSNT]:
1669 (DRIVE_LETTER) [DOS_NT]:
1670 (Ffile_name_directory, Fexpand_file_name)
1671 (Fsubstitute_in_file_name):
1672 * font.c (font_parse_xlfd, font_parse_fcname):
1673 * frame.c (x_set_font_backend):
1674 * gtkutil.c (xg_get_font):
1675 * image.c (xbm_scan, xpm_scan, pbm_scan_number):
1676 * nsimage.m (hexchar):
1677 * nsterm.m (ns_xlfd_to_fontname):
1678 * sysdep.c (system_process_attributes):
1679 * xfaces.c (hash_string_case_insensitive):
1680 Use C-locale tests instead of locale-specific tests for character
1681 types, since we want the ASCII interpretation here, not the
1682 interpretation suitable for whatever happens to be the current locale.
1684 2012-08-16 Martin Rudalics <rudalics@gmx.at>
1686 Consistently check windows for validity/liveness
1687 (Bug#11984, Bug#12025, Bug#12026).
1688 * lisp.h (CHECK_VALID_WINDOW): New macro.
1689 * window.c (decode_window): Rename to decode_live_window.
1690 (decode_valid_window, Fwindow_valid_p): New functions.
1691 (Fwindow_frame, Fframe_root_window, Fwindow_minibuffer_p)
1692 (Fframe_first_window, Fframe_selected_window, Fwindow_parent)
1693 (Fwindow_top_child, Fwindow_left_child, Fwindow_next_sibling)
1694 (Fwindow_prev_sibling, Fwindow_combination_limit)
1695 (Fset_window_combination_limit, Fwindow_use_time)
1696 (Fwindow_total_height, Fwindow_total_width, Fwindow_new_total)
1697 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_left_column)
1698 (Fwindow_top_line, Fwindow_body_height, Fwindow_body_width)
1699 (Fwindow_hscroll, Fset_window_hscroll)
1700 (Fwindow_redisplay_end_trigger)
1701 (Fset_window_redisplay_end_trigger, Fwindow_edges)
1702 (Fwindow_pixel_edges, Fwindow_absolute_pixel_edges)
1703 (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
1704 (Fcoordinates_in_window_p, Fwindow_point, Fwindow_start)
1705 (Fwindow_end, Fset_window_point, Fset_window_start)
1706 (Fpos_visible_in_window_p, Fwindow_line_height)
1707 (Fwindow_dedicated_p, Fset_window_dedicated_p)
1708 (Fwindow_prev_buffers, Fset_window_prev_buffers)
1709 (Fwindow_next_buffers, Fwindow_parameters, Fwindow_parameter)
1710 (Fset_window_parameter, Fwindow_display_table)
1711 (Fset_window_display_table, Fdelete_other_windows_internal)
1712 (Fset_window_buffer, Fset_window_new_total)
1713 (Fset_window_new_normal, Fdelete_window_internal)
1714 (Fwindow_text_height, Fset_window_margins, Fwindow_margins)
1715 (Fset_window_fringes, Fwindow_fringes, Fset_window_scroll_bars)
1716 (Fwindow_scroll_bars): Check whether argument window is a valid or
1717 live window. Update doc-strings.
1718 (syms_of_window): New symbol Qwindow_valid_p.
1719 * keyboard.c (Fposn_at_x_y): Check whether argument
1720 frame_or_window denotes a valid window.
1722 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
1724 Fix previous char table change.
1725 * lisp.h (CHAR_TABLE_SET): Use sub_char_table_set_contents.
1726 * chartab.c (optimize_sub_char_table): Likewise.
1728 2012-08-16 Chong Yidong <cyd@gnu.org>
1730 * gtkutil.c (xg_get_font): Demand an Xft font (Bug#3228).
1732 * xfont.c (xfont_open):
1733 * xftfont.c (xftfont_open): Set the font's max_width field.
1735 * nsfont.m (nsfont_open): Similar to the Xft backend, set
1736 min_width to space_width and average_width to the average over
1737 printable ASCII characters.
1738 (ns_char_width): Code cleanup.
1739 (ns_ascii_average_width): New utility function.
1741 * font.h (struct font): Update comments.
1743 2012-08-16 Dmitry Antipov <dmantipov@yandex.ru>
1745 Simple interface to set Lisp_Object fields of character tables.
1746 * lisp.h (CSET): New macro.
1747 (char_table_set_extras, char_table_set_contents)
1748 (sub_char_table_set_contents): New function.
1749 * casetab.c, category.c, chartab.c, fns.c, fontset.c, search.c:
1750 * syntax.c: Adjust users.
1752 2012-08-16 Stefan Monnier <monnier@iro.umontreal.ca>
1754 * eval.c (eval_sub): Bind lexical-binding.
1755 * lread.c (Qlexical_binding): Make non-static.
1757 2012-08-15 Jan Djärv <jan.h.d@swipnet.se>
1759 * nsmenu.m (popupSession): Remove.
1760 (pop_down_menu): Remove endModalSession.
1761 (timeout_handler:): New method.
1762 (runDialogAt:): Get next timeout. Start a NSTimer with that timeout.
1763 Call runModalForWindow. Check timer_fired when it returns.
1764 If not set, cancel timer and break out of loop.
1765 Otherwise loop again, with a new timeout.
1767 * nsterm.m: Include fcntl.h if present.
1768 (fd_entry, t_readfds, inNsSelect): Remove.
1769 (select_writefds, select_valid, select_timeout, selfds)
1770 (select_mutex, apploopnr): Add.
1771 (EV_TRAILER): Call kbd_buffer_store_event_hold only if q_event_ptr.
1772 Otherwise call kbd_buffer_store_event.
1773 (ns_send_appdefined): Remove release of fd_entry.
1774 (ns_read_socket): Always send appdefined. Remove inNsSelect check.
1775 Increment and decrement apploopnr.
1776 (ns_select): If no file descriptors, just do a NSTimer.
1777 Otherwise copy read/write masks and start select thread (fd_handler).
1778 Start main loop and wait for application defined event.
1779 Inform select thread to stop selecting after main loop is exited.
1780 (ns_term_init): Create selfds pipe and set non-blocking.
1781 Initialize select_mutex. Start the select thread (fd_handler).
1782 (fd_handler:): Loop forever, wait for info from the main thread
1783 to either start or stop selecting. When select returns, send
1784 and appdefined event.
1785 (sendScrollEventAtLoc:fromEvent:): Check if q_event_ptr is set.
1786 If not call kbd_buffer_store_event.
1788 * nsterm.h (EmacsApp): fd_handler takes id argument.
1789 (EmacsDialogPanel): Add timer_fired and timeout_handler.
1791 * gtkutil.c (xg_mark_data): Use FRAME_X_P.
1793 2012-08-15 Eli Zaretskii <eliz@gnu.org>
1795 * region-cache.c (move_cache_gap): Update gap_len using the actual
1796 growth of the boundaries array. Do not change cache_len.
1799 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
1801 Generalize and cleanup font subsystem checks.
1802 * font.h (FONT_DEBUG, font_assert): Remove.
1803 * font.c, fontset.c, w32font.c, xfont.c, xftfont.c:
1804 Change font_assert to eassert. Use eassert where appropriate.
1806 2012-08-15 Dmitry Antipov <dmantipov@yandex.ru>
1808 * gtkutil.c (xg_get_font): Use pango_units_to_double.
1810 2012-08-15 Chong Yidong <cyd@gnu.org>
1812 * gtkutil.c (xg_get_font): Rename from xg_get_font_name.
1813 When using the new font chooser, use gtk_font_chooser_get_font_desc to
1814 extract the font descriptor instead of just the font name.
1815 In that case, return a font spec instead of a string.
1816 (x_last_font_name): Move to this file from xfns.c.
1818 * xfns.c (Fx_select_font): The return value can also be a font
1819 spec. Move x_last_font_name management to gtkutil.c.
1821 * xfaces.c: Make font weight and style symbols non-static.
1823 2012-08-15 Stefan Monnier <monnier@iro.umontreal.ca>
1825 * minibuf.c (read_minibuf): Ignore caller's inhibit-read-only
1828 2012-08-14 Stefan Monnier <monnier@iro.umontreal.ca>
1830 * alloc.c (Fgarbage_collect): Use plural form consistently.
1832 2012-08-14 Eli Zaretskii <eliz@gnu.org>
1834 * keyboard.c (command_loop_1): Reset ignore_mouse_drag_p flag each
1835 iteration through the command loop. Fixes a problem whereby mouse
1836 movements are ignored until the first mouse click.
1838 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
1840 Use bool, not int, for Lisp booleans.
1841 This is more natural, and on my platform (GCC 4.7.1 x86-64) it
1842 makes Emacs a bit smaller and presumably a bit faster.
1843 * lisp.h: Include <stdbool.h>.
1844 (struct Lisp_Boolfwd, defvar_bool):
1845 * lread.c (defvar_bool): Use bool, not int, for Lisp booleans.
1846 * regex.c [!emacs]: Include <stdbool.h>.
1847 (false, true): Remove; <stdbool.h> does this for us now.
1849 2012-08-14 Chong Yidong <cyd@gnu.org>
1851 * character.c (Fcharacterp): Doc fix (Bug#12076).
1853 * data.c (Findirect_variable): Doc fix (Bug#11040).
1855 * chartab.c (Fmap_char_table): Doc fix (Bug#12061).
1857 * editfns.c (Fformat): Doc fix (Bug#12059).
1858 (Fsave_current_buffer): Doc fix (Bug#11542).
1860 2012-08-14 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
1862 * keyboard.c (access_keymap_keyremap): Accept anonymous functions
1865 2012-08-14 Martin Rudalics <rudalics@gmx.at>
1867 * frame.c (make_frame_without_minibuffer, make_minibuffer_frame)
1868 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
1869 * minibuf.c (choose_minibuf_frame, read_minibuf):
1870 * w32fns.c (x_create_tip_frame):
1871 * xfns.c (x_create_tip_frame): Call set_window_buffer instead of
1872 Fset_window_buffer (Bug#11984, Bug#12025, Bug#12026).
1874 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
1876 * intervals.c (offset_intervals): Remove obsolete comment.
1878 2012-08-14 Andreas Schwab <schwab@linux-m68k.org>
1880 * gtkutil.c (find_rtl_image, update_frame_tool_bar): Use NILP.
1882 2012-08-14 Gergely Risko <gergely@risko.hu>
1884 * coding.c (decode_coding): Record buffer modification before
1885 disabling undo_list (Bug#11773).
1887 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
1889 Revert and cleanup some recent overlay changes.
1890 * buffer.h (enum overlay_type): Remove.
1891 (buffer_get_overlays, buffer_set_overlays): Likewise.
1892 (buffer_set_overlays_before, buffer_set_overlays_after):
1893 New function. Adjust users.
1894 (unchain_both): Add eassert.
1896 2012-08-14 Dmitry Antipov <dmantipov@yandex.ru>
1898 * gtkutil.c (update_frame_tool_bar): Use EQ where appropriate.
1900 2012-08-14 Paul Eggert <eggert@cs.ucla.edu>
1902 * gtkutil.c (xg_mark_data): Don't assume C99.
1904 2012-08-13 Jan Djärv <jan.h.d@swipnet.se>
1906 * gtkutil.c (xg_frame_tb_info): New struct.
1907 (TB_INFO_KEY): New define.
1908 (xg_free_frame_widgets): Free xg_frame_tb_info for frame if present.
1909 (xg_mark_data): Mark Lisp_Objects in xg_frame_tb_info.
1910 (xg_create_tool_bar): Allocate and initialize a xg_frame_tb_info
1912 (update_frame_tool_bar): Return early if data in xg_frame_tb_info
1913 is up to date. Otherwise store new data.
1914 (free_frame_tool_bar): Free xg_frame_tb_info if present.
1916 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
1918 Use KSET for write access to Lisp_Object members of struct kboard.
1919 * keyboard.h (KSET): New macro.
1920 * callint.c, category.c, frame.c, keyboard.c, keyboard.h, macros.c:
1921 * msdos.c, nsfns.m, nsterm.m, term.c, w32fns.c, w32term.c, xfns.c:
1922 * xterm.c: Adjust users.
1924 2012-08-13 Dmitry Antipov <dmantipov@yandex.ru>
1926 Use BSET for write access to Lisp_Object members of struct buffer.
1927 * buffer.h (BSET): New macro.
1928 * buffer.c, casetab.c, cmds.c, coding.c, data.c, editfns.c:
1929 * fileio.c, frame.c, indent.c, insdel.c, intervals.c, keymap.c:
1930 * minibuf.c, print.c, process.c, syntax.c, undo.c, w32fns.c:
1931 * window.c, xdisp.c, xfns.c: Adjust users.
1933 2012-08-11 BT Templeton <bpt@hcoop.net> (tiny change)
1935 * lread.c (syms_of_lread): Initialize Vlexical_binding.
1937 2012-08-11 Jan Djärv <jan.h.d@swipnet.se>
1939 * nsterm.m (not_in_argv): New function.
1940 (application:openFile, application:openTempFile:):
1941 (application:openFileWithoutUI:, application:openFiles:): Open file
1942 if not_in_argv returns non-zero (bug#12171).
1944 * gtkutil.c (gtk_font_chooser_dialog_new, GTK_FONT_CHOOSER)
1945 (gtk_font_chooser_set_font, gtk_font_chooser_get_font):
1946 Define for Gtk+ versions less than 3.2.
1947 (xg_get_font_name): Use those functions/macros here.
1948 Reported by Frans Oilinki <moilinki@gmail.com>.
1950 2012-08-11 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1952 * unexmacosx.c (copy_data_segment): Copy initialized data in
1953 statically linked libraries from input file rather than memory.
1955 * unexmacosx.c (print_load_command_name): Add cases LC_MAIN,
1956 LC_SOURCE_VERSION, and LC_DYLIB_CODE_SIGN_DRS.
1957 (dump_it) [LC_DYLIB_CODE_SIGN_DRS]: Call copy_linkedit_data.
1959 2012-08-10 Glenn Morris <rgm@gnu.org>
1961 * conf_post.h (IF_LINT, lint_assume): Move here from lisp.h.
1962 * lisp.h (IF_LINT, lint_assume): Move to conf_post.h.
1964 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
1966 Fix last change to allow compilation with low optimization levels.
1967 * intervals.c (INTERVALS_INLINE): Define to EXTERN_INLINE.
1968 Reported by Jan Djärv <jan.h.d@swipnet.se>.
1970 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
1972 Use common inline syntax in intervals.h.
1973 * intervals.h (INTERVALS_INLINE): New macro.
1974 Change all users from LISP_INLINE.
1976 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
1978 Define Qnone once for all platforms.
1979 * frame.c (Qnone): Define here.
1980 (syms_of_frame): DEFSYM it.
1981 * lisp.h (Qnone): New declaration.
1982 * nsfns.m, nsterm.h, nsterm.m, w32fns.c, w32font.c:
1983 * xfns.c: Remove duplication. Adjust users.
1985 2012-08-10 Dmitry Antipov <dmantipov@yandex.ru>
1987 Remove unused macros from intervals.h.
1988 * intervals.h (MERGE_INSERTIONS, DISPLAY_INVISIBLE_GLYPH): Remove.
1989 * intervals.c: Adjust comment.
1991 2012-08-10 Eli Zaretskii <eliz@gnu.org>
1993 * w32fns.c <w32_unicode_gui>: New static variable.
1994 (globals_of_w32fns): Initialize it according to os_subtype.
1995 (w32_init_class, w32_msg_pump, w32_wnd_proc): Use it instead of
1998 2012-08-10 Joakim Hårsman <joakim.harsman@gmail.com> (tiny change)
1999 Eli Zaretskii <eliz@gnu.org>
2001 Fix bug #10299 with Unicode characters sent by customized
2002 keyboards created by MSKLC.
2003 * w32fns.c (INIT_WINDOW_CLASS): New macro.
2004 (w32_init_class): Use it to initialize the Emacs class with either
2005 ANSI or Unicode API calls.
2006 (w32_msg_pump): Call GetMessageW and DispatchMessageW on NT and
2008 (w32_wnd_proc): If the character code sent by WM_CHAR or
2009 WM_SYSCHAR is above 255, post a WM_UNICHAR message, not the
2010 original message. Call DefWindowProcW on NT and later.
2012 2012-08-10 Glenn Morris <rgm@gnu.org>
2014 * Makefile.in (config_h): Fix conf_post.h out-of-tree build location.
2016 * lisp.h (DIRECTORY_SEP): Let configure set it.
2018 2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
2020 Use TSET for write access to Lisp_Object slots of struct terminal.
2021 * termhooks.h (TSET): New macro.
2022 * coding.c, terminal.c, xselect.c: Adjust users.
2024 2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
2026 * xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
2027 the failing expression, include them in the error message.
2028 * eval.c (internal_condition_case_n): Pass nargs and args to hfun.
2029 * lisp.h (internal_condition_case_n): Update declaration.
2031 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2033 Inline functions to examine and change buffer overlays.
2034 * buffer.c (unchain_both): New function.
2035 * buffer.h (buffer_get_overlays, buffer_set_overlays):
2036 (buffer_has_overlays): New function.
2037 (enum overlay_type): New enum.
2038 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c:
2039 * insdel.c, intervals.c, print.c, xdisp.c: Adjust users.
2041 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2043 Inline functions to examine and change buffer intervals.
2044 * alloc.c (mark_interval_tree): Remove.
2045 (MARK_INTERVAL_TREE): Simplify.
2046 (UNMARK_BALANCE_INTERVALS): Remove. Adjust users.
2047 * intervals.c (buffer_balance_intervals): New function.
2048 (graft_intervals_into_buffer): Adjust indentation.
2049 (set_intervals_multibyte): Simplify.
2050 * buffer.h (BUF_INTERVALS): Remove.
2051 (buffer_get_intervals, buffer_set_intervals): New function.
2052 * alloc.c, buffer.c, editfns.c, fileio.c, indent.c, insdel.c:
2053 * intervals.c, textprop.c: Adjust users.
2055 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2057 Inline functions to examine and change string intervals.
2058 * lisp.h (STRING_INTERVALS, STRING_SET_INTERVALS): Remove.
2059 (string_get_intervals, string_set_intervals): New function.
2060 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
2061 * lread.c, print.c, textprop.c: Adjust users.
2063 2012-08-08 Glenn Morris <rgm@gnu.org>
2065 * lisp.mk (lisp): Remove language/persian.elc.
2067 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2070 * intervals.h (NULL_INTERVAL, DEFAULT_INTERVAL): Remove.
2071 (NULL_INTERVAL_P): Likewise. Adjust users.
2072 (FRONT_STICKY_P, END_NONSTICKY_P, FRONT_NONSTICKY_P):
2073 Adjust comment. Move under #if 0.
2074 * alloc.c, buffer.c, editfns.c, fns.c, insdel.c, intervals.c:
2075 * print.c, syntax.c, textprop.c, xdisp.c: Adjust users.
2077 2012-08-08 Dmitry Antipov <dmantipov@yandex.ru>
2079 Check total length of intervals with eassert.
2080 * intervals.h (CHECK_TOTAL_LENGTH): Remove.
2081 * intervals.c: Change all users to eassert.
2083 2012-08-07 Eli Zaretskii <eliz@gnu.org>
2085 * .gdbinit (xframe, xwindow, nextcons, xcar, xcdr, xlist):
2086 Rename fields to match removal of FGET and WGET and disuse of
2087 INTERNAL_FIELD in Lisp_Cons.
2089 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2091 Revert and cleanup Lisp_Cons, Lisp_Misc and Lisp_Symbol things.
2092 * lisp.h (struct Lisp_Symbol): Change xname to meaningful
2093 name since all xname users are fixed long time ago. Do not
2095 (set_symbol_name, set_symbol_function, set_symbol_plist):
2096 (set_symbol_next, set_overlay_plist): New function.
2097 (struct Lisp_Cons): Do not use INTERNAL_FIELD.
2098 (struct Lisp_Overlay): Likewise.
2099 (CVAR, MVAR, SVAR): Remove.
2100 * alloc.c, buffer.c, buffer.h, bytecode.c, cmds.c, data.c:
2101 * doc.c, eval.c, fns.c, keyboard.c, lread.c, nsselect.m:
2102 * xterm.c: Adjust users.
2103 * .gdbinit: Change to use name field of struct Lisp_Symbol
2106 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2108 Basic functions to set Lisp_Object and pointer slots of intervals.
2109 * intervals.h (interval_set_parent, interval_set_object):
2110 (interval_set_left, interval_set_right, interval_set_plist):
2111 (interval_copy_parent): New function.
2112 (SET_INTERVAL_OBJECT, SET_INTERVAL_PARENT, INTERVAL_PTR_SIZE): Remove.
2113 (RESET_INTERVAL, COPY_INTERVAL_CACHE, MERGE_INTERVAL_CACHE):
2115 (INTERVAL_SIZE): Remove. Adjust users.
2116 * alloc.c, intervals.c, lread.c, textprop.c: Use new functions.
2118 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2120 Drop PGET and revert read access to Lisp_Objects slots of Lisp_Process.
2121 * process.h (PGET): Remove.
2122 (struct Lisp_Process): Do not use INTERNAL_FIELD.
2123 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
2125 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2127 Drop WGET and revert read access to Lisp_Objects slots of struct window.
2128 * window.h (WGET): Remove.
2129 (struct window): Do not use INTERNAL_FIELD.
2130 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
2131 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
2132 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
2133 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
2134 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
2137 2012-08-07 Chong Yidong <cyd@gnu.org>
2139 * window.c (Fwindow_edges, Fwindow_pixel_edges)
2140 (Fwindow_absolute_pixel_edges, Fdelete_other_windows_internal)
2141 (Fdelete_window_internal): Signal an error if the window is not on
2142 a live frame (Bug#12025).
2144 2012-08-07 Dmitry Antipov <dmantipov@yandex.ru>
2146 Drop FGET and revert read access to Lisp_Objects slots of struct frame.
2147 * frame.h (FGET): Remove.
2148 (struct frame): Do not use INTERNAL_FIELD.
2149 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
2150 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
2151 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
2152 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
2154 2012-08-06 Juanma Barranquero <lekktu@gmail.com>
2156 * w32.c: Silence compiler warnings.
2157 (map_w32_filename): Remove unused variable `is_fat'.
2158 (chase_symlinks): Add parentheses around expression.
2160 2012-08-06 Glenn Morris <rgm@gnu.org>
2162 * sysdep.c: Respect BROKEN_GETWD.
2164 * dispnew.c (GNU_LIBRARY_PENDING_OUTPUT_COUNT, PENDING_OUTPUT_COUNT):
2165 Let configure handle it.
2166 (stdio_ext.h) [DISPNEW_NEEDS_STDIO_EXT]: Include it.
2168 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2170 Use GCALIGNMENT where appropriate.
2171 * alloc.c (XMALLOC_HEADER_ALIGNMENT, roundup_size):
2172 (union aligned_Lisp_Symbol, union aligned_Lisp_Misc):
2173 (mark_maybe_pointer, pure_alloc): Change to use GCALIGNMENT.
2175 2012-08-06 Eli Zaretskii <eliz@gnu.org>
2177 * w32menu.c (set_frame_menubar, initialize_frame_menubar):
2178 Don't use FRAME_MENU_BAR_ITEMS as an lvalue.
2180 2012-08-06 Stefan Monnier <monnier@iro.umontreal.ca>
2182 * buffer.h (struct buffer): Revert `indirections' to a simple int;
2183 that should be sufficient for everyone.
2185 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
2187 * keyboard.c (timer_check_2): Add break so timer_check returns next
2190 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2192 Fix Windows build errors introduced after converting to WGET and WSET.
2193 * w32term.c (w32_set_vertical_scroll_bar): Change to use WSET.
2194 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
2196 2012-08-06 Jan Djärv <jan.h.d@swipnet.se>
2198 * nsterm.m (ns_frame_rehighlight): Use FSET.
2200 * nsmenu.m (ns_update_menubar): Use FSET.
2202 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2204 Separate read and write access to Lisp_Object slots of Lisp_Process.
2205 * process.h (PGET, PSET): New macros similar to AREF and ASET.
2206 * gnutls.c, print.c, process.c, sysdep.c, w32.c, xdisp.c: Adjust users.
2208 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2210 Separate read and write access to Lisp_Object slots of struct window.
2211 * window.h (WGET, WSET): New macros similar to AREF and ASET.
2212 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
2213 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
2214 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, msdos.c, nsfns.m:
2215 * nsmenu.m, nsterm.m, print.c, textprop.c, w32fns.c, w32menu.c:
2216 * w32term.c, window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c:
2219 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2221 Fix Windows build errors introduced after converting to FGET and FSET.
2222 * w32term.c (x_frame_rehighlight, x_scroll_bar_create):
2223 (w32_condemn_scroll_bars, w32_redeem_scroll_bar):
2224 (w32_judge_scroll_bars): Change to use FSET.
2225 Reported by Andy Moreton <andrewjmoreton@gmail.com>.
2227 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2229 Fix replacement typo.
2230 * window.c (replace_window): Set root_window instead of
2231 selected_window. This fixes a total window subsystem
2232 malfunction reported by Bastien Guerry <bzg@gnu.org>.
2234 2012-08-06 Glenn Morris <rgm@gnu.org>
2236 * lisp.mk (lisp): Add language/persian.elc.
2238 2012-08-06 Dmitry Antipov <dmantipov@yandex.ru>
2240 Separate read and write access to Lisp_Object slots of struct frame.
2241 * frame.h (FGET, FSET): New macros similar to AREF and ASET.
2242 * buffer.c, data.c, dispnew.c, dosfns.c, eval.c, fontset.c, frame.c:
2243 * fringe.c, gtkutil.c, minibuf.c, msdos.c, nsfns.m, nsmenu.m, nsterm.m:
2244 * print.c, term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
2245 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Adjust users.
2247 2012-08-05 Andreas Schwab <schwab@linux-m68k.org>
2249 * emacs.c (decode_env_path): Only use defaulted if WINDOWSNT.
2251 2012-08-05 Dmitry Antipov <dmantipov@yandex.ru>
2253 Generalize common compile-time constants.
2254 * lisp.h (header_size, bool_header_size, word_size): Now here.
2255 (struct Lisp_Vector): Add comment.
2256 (struct Lisp_Bool_Vector): Move up to define handy constants.
2257 (VECSIZE, PSEUDOVECSIZE): Simplify.
2258 (SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
2259 * buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
2260 * font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
2261 * msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
2262 * xfont.c, xmenu.c: Use word_size where appropriate.
2264 2012-08-05 Lawrence Mitchell <wence@gmx.li>
2266 * search.c (Freplace_match): Treat \? in the replacement text
2267 literally (Bug#8161).
2269 2012-08-05 Chong Yidong <cyd@gnu.org>
2271 * term.c (Vsuspend_tty_functions, Vresume_tty_functions):
2272 * frame.c (Vdelete_frame_functions):
2273 * emacs.c (Vkill_emacs_hook): Doc fix.
2275 2012-08-04 Eli Zaretskii <eliz@gnu.org>
2277 * xfns.c (x_set_menu_bar_lines): Fix compilation error in
2278 --with-x-toolkit=no builds.
2279 Reported by Carsten Mattner <carstenmattner@gmail.com>.
2281 2012-08-04 Chong Yidong <cyd@gnu.org>
2283 * syntax.c (Fmodify_syntax_entry): Doc fix.
2285 2012-08-04 Eli Zaretskii <eliz@gnu.org>
2287 Fix startup warnings about ../site-lisp on MS-Windows. (Bug#11959)
2288 * w32.c (init_environment): Change the default values of many
2289 environment variables in dflt_envvars[] to NULL, to avoid pushing
2290 them into environment when they were not already defined.
2291 Remove the code that deletes site-lisp subdirectories from the default
2292 value of EMACSLOADPATH, as it is no longer needed.
2293 (check_windows_init_file): Now external, not static.
2294 Use Vload_path as is, without adding anything, as this function is now
2295 called when Vload_path is already set up.
2297 * w32.h (check_windows_init_file): Add prototype.
2299 * emacs.c (init_cmdargs) [WINDOWSNT]: When running from the build
2300 directory, ignore the /*/i386/ tail in Vinvocation_directory, for
2301 compatibility with Posix platforms.
2302 (main): Move the call to check_windows_init_file to here from
2304 (decode_env_path) [WINDOWSNT]: Expand the %emacs_dir%/ prefix, if
2305 any, in the DEFALT argument into the root of the Emacs build or
2306 installation tree, as appropriate.
2308 * callproc.c (init_callproc_1): Call decode_env_path instead of
2309 doing its equivalent by hand.
2310 (init_callproc): Replace DOS_NT condition with MSDOS, thus letting
2311 the code that sets Vexec_path run on MS-Windows.
2313 * lread.c (init_lread): Add comments to #ifdef's.
2315 * msdos.c (dos_set_window_size, IT_update_begin)
2316 (IT_frame_up_to_date, IT_set_frame_parameters): Use FVAR and WVAR
2317 instead of direct references.
2319 2012-08-04 Paul Eggert <eggert@cs.ucla.edu>
2321 Export DEFAULT_REHASH_* to GDB.
2322 * lisp.h (DEFAULT_REHASH_THRESHOLD, DEFAULT_REHASH_SIZE):
2323 Now constants, not macros.
2325 2012-08-03 Paul Eggert <eggert@cs.ucla.edu>
2327 Remove unnecessary casts involving pointers.
2328 These casts are no longer needed now that we assume C89 or later,
2329 since they involve casting to or from void *.
2330 * alloc.c (make_pure_string, make_pure_c_string, pure_cons)
2331 (make_pure_float, make_pure_vector):
2332 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP):
2333 * macros.c (Fstart_kbd_macro):
2334 * menu.c (find_and_return_menu_selection):
2335 * minibuf.c (read_minibuf_noninteractive):
2336 * sysdep.c (closedir):
2337 * xdisp.c (x_produce_glyphs):
2338 * xfaces.c (compare_fonts_by_sort_order):
2339 * xfns.c (x_real_positions, select_visual):
2340 * xselect.c (x_stop_queuing_selection_requests)
2341 (x_get_window_property, x_get_window_property_as_lisp_data):
2342 * xterm.c (x_set_frame_alpha, x_find_modifier_meanings):
2343 Remove unnecessary pointer casts.
2344 * alloc.c (record_xmalloc): New function.
2345 * lisp.h (record_xmalloc): New decl.
2346 (SAFE_ALLOCA): Now takes just one arg -- the size -- and acts
2347 more like a function. This is because the pointer cast is not
2348 needed. All uses changed.
2349 * print.c (print_string, print_error_message): Avoid length recalc.
2351 Improve fix for macroexp crash with debugging (Bug#12118).
2352 * lisp.h (ASET) [ENABLE_CHECKING]: Pay attention to
2353 ARRAY_MARK_FLAG when checking subscripts, because ASET is
2354 not supposed to be invoked from the garbage collector.
2355 See Andreas Schwab in <http://bugs.gnu.org/12118#25>.
2356 (gc_aset): New function, which is like ASET but can be
2357 used in the garbage collector.
2358 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
2359 (set_hash_index): Use it instead of ASET.
2361 2012-08-03 Eli Zaretskii <eliz@gnu.org>
2363 Support symlinks on latest versions of MS-Windows.
2364 * w32.c: Include winioctl.h and aclapi.h.
2365 (is_symlink, chase_symlinks, enable_privilege, restore_privilege)
2366 (revert_to_self): Forward declarations of static functions.
2367 <static BOOL g_b_init_get_security_info>:
2368 <g_b_init_create_symbolic_link>: New static flags.
2369 (globals_of_w32): Initialize them to zero.
2370 (GetSecurityInfo_Proc, CreateSymbolicLink_Proc): New typedefs.
2371 (map_w32_filename): Improve commentary. Simplify switch.
2372 (SYMBOLIC_LINK_FLAG_DIRECTORY): Define if not defined in system
2373 headers (most versions of MinGW w32api don't).
2374 (get_security_info, create_symbolic_link)
2375 (get_file_security_desc_by_handle, is_symlink, chase_symlinks):
2377 (sys_access, sys_chmod): Call 'chase_symlinks' to resolve symlinks
2378 in the argument file name.
2379 (sys_access): Call unc_volume_file_attributes only if
2380 GetFileAttributes fails with network-related error codes.
2381 (sys_rename): Diagnose renaming of a symlink when the user doesn't
2382 have the required privileges.
2383 (get_file_security_desc_by_name): Rename from
2384 get_file_security_desc.
2385 (stat_worker): New function, with most of the guts of 'stat', and
2386 with addition of handling of symlinks and support for 'lstat'.
2387 If possible, get file's attributes and security information by
2388 handle, not by name. Produce S_IFLNK bit for symlinks, when
2389 called from 'lstat'.
2390 (stat, lstat): New functions, call 'stat_worker'.
2391 (symlink, readlink, careadlinkat): Rewritten to create and resolve
2392 symlinks when the underlying filesystem supports them.
2394 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
2396 Fix macroexp crash on Windows with debugging (Bug#12118).
2397 * lisp.h (ASET) [ENABLE_CHECKING]: Ignore ARRAY_MARK_FLAG when
2398 checking subscripts; problem introduced with the recent
2399 "ASET (a, i, v)" rather than "AREF (a, i) = v" patch.
2400 (ARRAY_MARK_FLAG): Now a macro as well as a constant,
2401 since it's used in non-static inline functions now.
2403 * xfaces.c (face_at_buffer_position, face_for_overlay_string):
2404 Don't assume buffer size fits in 'int'. Remove unused local.
2406 Use C99-style 'extern inline' if available.
2407 * buffer.h (BUFFER_INLINE):
2408 * category.h (CATEGORY_INLINE):
2409 * character.h (CHARACTER_INLINE):
2410 * charset.h (CHARSET_INLINE):
2411 * composite.h (COMPOSITE_INLINE):
2412 * dispextern.h (DISPEXTERN_INLINE):
2413 * lisp.h (LISP_INLINE):
2414 * systime.h (SYSTIME_INLINE):
2415 New macro, replacing 'static inline' in this header.
2416 * buffer.h, category.h, character.h, charset.h, composite.h:
2417 * dispextern.h, lisp.h, systime.h:
2418 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
2419 * alloc.c (LISP_INLINE):
2420 * buffer.c (BUFFER_INLINE):
2421 * category.c (CATEGORY_INLINE):
2422 * character.c (CHARACTER_INLINE):
2423 * charset.c (CHARSET_INLINE):
2424 * composite.c (COMPOSITE_INLINE):
2425 * dispnew.c (DISPEXTERN_INLINE):
2426 * sysdep.c (SYSTIME_INLINE):
2427 Define to EXTERN_INLINE, so that the corresponding functions
2428 are compiled into code.
2429 * conf_post.h (INLINE, EXTERN_INLINE, INLINE_HEADER_BEGIN)
2430 (INLINE_HEADER_END): New macros.
2431 * lisp.h (PSEUDOVECTOR_FLAG): Now a macro as well as a constant,
2432 since it's used in non-static inline functions now.
2433 (VALMASK) [!USE_LSB_TAG]: Likewise.
2435 2012-08-02 Glenn Morris <rgm@gnu.org>
2437 * s/: Remove empty directory.
2439 * s/ms-w32.h: Move to ../nt/inc.
2440 * makefile.w32-in (TAGS, TAGS-gmake, MS_W32_H):
2441 Update for new ms-w32.h location.
2443 2012-08-02 Paul Eggert <eggert@cs.ucla.edu>
2446 * syswait.h (WRETCODE): Remove, consistently with ../configure.ac.
2448 2012-08-02 Glenn Morris <rgm@gnu.org>
2450 * nsterm.m (ns_exec_path, ns_load_path): Use SEPCHAR rather than
2451 hard-coding the path separator.
2453 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
2455 Use "ASET (a, i, v)" rather than "AREF (a, i) = v".
2456 This how ASET and AREF are supposed to work, and makes
2457 it easier to think about future improvements. See
2458 <http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00026.html>.
2459 * charset.h (set_charset_attr): New function.
2460 All lvalue-style uses of CHARSET_DECODER etc. changed to use it.
2461 * lisp.h (ASET): Rewrite so as not to use AREF in an lvalue style.
2462 (aref_addr): New function. All uses of &AREF(...) changed.
2463 (set_hash_key, set_hash_value, set_hash_next, set_hash_hash)
2464 (set_hash_index): New functions. All lvalue-style uses of
2465 HASH_KEY etc. changed.
2466 * keyboard.c (set_prop): New function. All lvalue-style uses
2469 2012-08-01 Alp Aker <alp.tekin.aker@gmail.com>
2471 * nsterm.m (ns_set_vertical_scroll_bar, ns_redeem_scroll_bar)
2472 (EmacsWindow-accessibilityAttributeValue, EmacsScroller-initFrame:)
2473 (EmacsScroller-dealloc): Adjust to use WVAR. (Bug#12114)
2474 * nsfns.m (ns_set_name_as_filename): Likewise.
2475 * nsmenu.m (ns_update_menubar): Likewise.
2476 * nsselect.m (symbol_to_nsstring): Adjust to use SVAR.
2478 2012-08-01 Eli Zaretskii <eliz@gnu.org>
2480 * .gdbinit (xcar, xcdr, xlist, xwindow, nextcons, xprintsym):
2481 Adapt to latest changes in field names of the corresponding Lisp
2484 * xdisp.c (try_window_id): Use WVAR in IF_DEBUG code.
2486 2012-08-01 Glenn Morris <rgm@gnu.org>
2488 * s/msdos.h: Remove file.
2489 * conf_post.h [MSDOS]: New section, moved from s/msdos.h.
2490 * Makefile.in (S_FILE): Remove.
2491 (config_h): Remove S_FILE.
2493 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
2495 * s/ms-w32.h (DEVICE_SEP, IS_DIRECTORY_SEP, IS_ANY_SEP):
2496 Remove; moved to nt/config.nt.
2498 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
2500 Use INTERNAL_FIELD for conses and overlays.
2501 * lisp.h (struct Lisp_Cons): Use INTERNAL_FIELD.
2502 Remove obsolete comment.
2504 (struct Lisp_Overlay): Use INTERNAL_FIELD.
2505 * alloc.c, buffer.c, buffer.h, fns.c: Adjust users.
2507 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
2509 Use INTERNAL_FIELD for symbols.
2510 * lisp.h (SVAR): New macro. Adjust users.
2511 * alloc.c, bytecode.c, cmds.c, data.c, doc.c, eval.c:
2512 * fns.c, keyboard.c, lread.c, xterm.c: Users changed.
2514 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
2516 Use INTERNAL_FIELD for processes.
2517 * process.h (PVAR): New macro. Adjust style.
2518 (struct Lisp_Process): Change Lisp_Object members to INTERNAL_FIELD.
2519 * print.c, process.c, sysdep.c, w32.c, xdisp.c: Users changed.
2521 2012-08-01 Dmitry Antipov <dmantipov@yandex.ru>
2523 Use INTERNAL_FIELD for windows.
2524 * window.h (WVAR): New macro.
2525 (struct window): Change Lisp_Object members to INTERNAL_FIELD.
2526 * alloc.c, buffer.c, composite.c, dispextern.h, dispnew.c, editfns.c:
2527 * fileio.c, font.c, fontset.c, frame.c, frame.h, fringe.c, indent.c:
2528 * insdel.c, keyboard.c, keymap.c, lisp.h, minibuf.c, nsterm.m, print.c:
2529 * textprop.c, w32fns.c, w32menu.c, w32term.c, window.c, xdisp.c:
2530 * xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
2532 2012-08-01 Paul Eggert <eggert@cs.ucla.edu>
2534 * coding.h (CODING_ATTR_FLUSHING): Remove; unused and wouldn't work.
2536 2012-08-01 Glenn Morris <rgm@gnu.org>
2538 * lisp.h (IS_DIRECTORY_SEP, IS_DEVICE_SEP, IS_ANY_SEP):
2539 Move to configure.ac.
2541 2012-08-01 Juanma Barranquero <lekktu@gmail.com>
2543 * makefile.w32-in (CONFIG_H): Update dependencies.
2544 (CONF_POST_H): New macro.
2546 * s/ms-w32.h (SEPCHAR, NULL_DEVICE): Remove; moved to nt/config.nt.
2548 2012-07-31 Glenn Morris <rgm@gnu.org>
2550 * Makefile.in (S_FILE): No longer set by configure.
2552 * conf_post.h (config_opsysfile): Move earlier, so that WINDOWSNT
2554 (alloca.h) [WINDOWSNT]: Don't include it on MS Windows.
2556 * process.h (NULL_DEVICE):
2557 * emacs.c (SEPCHAR):
2558 * editfns.c (USER_FULL_NAME): Let configure set them.
2560 * s/README, s/template.h: Remove files.
2562 * conf_post.h [HPUX]: Undefine HAVE_RANDOM and HAVE_RINT.
2564 * conf_post.h (AMPERSAND_FULL_NAME, subprocesses):
2565 Move to configure.ac.
2567 2012-07-31 Eli Zaretskii <eliz@gnu.org>
2569 * .gdbinit (xframe): Adapt to introduction of FVAR and the
2570 resulting renaming of 'struct frame' members.
2572 * w32menu.c (w32_menu_show): Revert bogus introduction of FVAR.
2574 * fontset.c (dump_fontset): Fix compilation with ENABLE_CHECKING
2575 after introduction of FVAR.
2577 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
2579 * nsmenu.m (update_frame_tool_bar): Change key from NSObject* to id.
2581 * nsterm.m (ns_draw_fringe_bitmap, ns_dumpglyphs_image): Use drawInRect
2582 instead of compositeToPoint.
2583 (applicationShouldTerminate): Pass NS String literal to NSRunAlertPanel.
2585 * nsfns.m, nsmenu.m, nsterm.m: Adopt to struct frame/FVAR changes.
2587 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
2589 Generalize INTERNAL_FIELD between buffers, keyboards and frames.
2590 * lisp.h (INTERNAL_FIELD): New macro.
2591 * buffer.h (BUFFER_INTERNAL_FIELD): Remove.
2592 (BVAR): Change to use INTERNAL_FIELD.
2593 * keyboard.h (KBOARD_INTERNAL_FIELD): Likewise.
2594 (KVAR): Change to use INTERNAL_FIELD.
2595 * frame.h (FVAR): New macro.
2596 (struct frame): Use INTERNAL_FIELD for all Lisp_Object fields.
2597 * alloc.c, buffer.c, data.c, dispnew.c, dosfns.c, eval.c, frame.c:
2598 * fringe.c, gtkutil.c, minibuf.c, nsfns.m, nsterm.m, print.c:
2599 * term.c, w32fns.c, w32menu.c, w32term.c, window.c, window.h:
2600 * xdisp.c, xfaces.c, xfns.c, xmenu.c, xterm.c: Users changed.
2602 2012-07-31 Dmitry Antipov <dmantipov@yandex.ru>
2604 Miscellaneous fixes for non-default X toolkits.
2605 * xfns.c (Fx_file_dialog): Change to SSDATA to avoid warnings.
2606 * xterm.c (x_frame_of_widget): Remove redundant prototype.
2607 Move under #ifdef USE_LUCID.
2608 (x_create_toolkit_scroll_bar): Adjust scroll_bar_name
2609 definition and usage to avoid warnings.
2611 2012-07-31 Jan Djärv <jan.h.d@swipnet.se>
2613 * nsterm.m (openFiles): Fix previous checkin.
2615 2012-07-31 Paul Eggert <eggert@cs.ucla.edu>
2617 * indent.c (compute_motion): Remove unused local.
2619 2012-07-31 Glenn Morris <rgm@gnu.org>
2621 * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
2623 * conf_post.h [USG5_4]:
2624 Move remaining contents of s/usg5-4-common.h here.
2625 * s/usg5-4-common.h: Remove file.
2627 * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
2628 * s/irix6-5.h: Remove file.
2630 * conf_post.h [DARWIN_OS]: Move remaining contents of s/darwin.h here.
2631 * s/darwin.h: Remove file.
2633 * conf_post.h [HPUX]: Move random, srandom here from s/hpux10-20.h.
2634 * s/hpux10-20.h: Remove file, which is now empty.
2636 2012-07-30 Glenn Morris <rgm@gnu.org>
2638 * conf_post.h: New, split from configure.ac's AH_BOTTOM.
2639 * Makefile.in (config_h): Add conf_post.h.
2640 * makefile.w32-in (CONFIG_H): Add conf_post.h.
2642 2012-07-30 Jan Djärv <jan.h.d@swipnet.se>
2644 * nsterm.m (ns_do_open_file): New variable.
2645 (ns_term_init): Set ns_do_open_file to YES after run returns.
2646 (openFile, openTempFile, openFileWithoutUI, openFiles):
2647 Open files only if ns_do_open_file.
2649 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
2651 * lisp.h (SWITCH_ENUM_CAST): Remove. All uses removed.
2652 This no-op macro hasn't been needed for many years.
2653 * src/regex.c (SWITCH_ENUM_CAST) [!emacs]: Likewise.
2655 Export DIRECTORY_SEP, TYPEMASK, VALMASK to GDB.
2656 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]: Add lsb_bits.
2657 * lisp.h (enum lsb_bits) [USE_LSB_TAG]: New enum, for
2658 gdb_make_enums_visible.
2659 (TYPEMASK, VALMASK) [USE_LSB_TAGS]: Now enum constants, not macros.
2660 (DIRECTORY_SEP): Now a constant, not a macro.
2662 2012-07-30 Eli Zaretskii <eliz@gnu.org>
2664 * w32fns.c (w32_wnd_proc): Pass w32_keyboard_codepage to
2665 w32_kbd_patch_key as the 2nd arg. (Bug#12082)
2667 * w32term.c <w32_keyboard_codepage>: Renamed from
2668 keyboard_codepage and now external. All users changed.
2670 * w32term.h: Add declaration of w32_keyboard_codepage.
2672 * w32inevt.c (w32_kbd_patch_key): Accept an additional argument --
2673 the codepage to translate keys to Unicode. If this argument is
2674 -1, use the value returned by GetConsoleCP. All callers changed.
2676 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
2678 Update .PHONY listings in makefiles.
2679 * Makefile.in (.PHONY): Add all, mostlyclean, clean,
2680 bootstrap-clean, distclean, maintainer-clean, versioclean,
2683 * lisp.h (STRING_BYTES_BOUND): Cast entire result to ptrdiff_t.
2684 This is a bit clearer. Fix some commentary typos.
2686 2012-07-30 Glenn Morris <rgm@gnu.org>
2688 * s/netbsd.h: Let configure include signal.h if needed.
2689 Remove file, which is now empty.
2691 * s/usg5-4-common.h (_longjmp, _setjmp, TIOCSIGSEND):
2692 Let configure set them.
2693 * s/irix6-5.h (_longjmp, _setjmp, TIOCSIGSEND):
2694 No more need to undefine.
2696 2012-07-30 Andreas Schwab <schwab@linux-m68k.org>
2698 * keymap.c (Fkey_description): Don't remove 0x80 bit from
2699 non-single-byte char when adding meta modifier. (Bug#12090)
2701 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
2703 Convert safe_call to use variable number of arguments.
2704 * xdisp.c (safe_call): Convert to use varargs. Adjust users.
2705 (safe_call2): Fix comment.
2706 * lisp.h (safe_call): Adjust prototype.
2707 * coding.c (encode_coding_object): Change to use safe_call2.
2708 * xfaces.c (merge_face_heights): Change to use safe_call1.
2710 2012-07-30 Glenn Morris <rgm@gnu.org>
2712 * s/aix4-2.h (sigmask): No need to undefine it, since syssignal.h
2713 does that unconditionally. Remove file, which is now empty.
2715 * s/freebsd.h, s/gnu-linux.h, s/sol2-6.h, s/unixware.h:
2718 2012-07-30 Paul Eggert <eggert@cs.ucla.edu>
2720 Export to GDB most of lisp.h's remaining object-like macros.
2721 * lisp.h (min, max): Move earlier, because they're used earlier now.
2722 (INTMASK, ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK)
2723 (CHAR_TABLE_STANDARD_SLOTS, CHARTAB_SIZE_BITS_0)
2724 (CHARTAB_SIZE_BITS_1, CHARTAB_SIZE_BITS_2, CHARTAB_SIZE_BITS_3)
2725 (DEFAULT_HASH_SIZE, COMPILED_ARGLIST, COMPILED_BYTECODE)
2726 (COMPILED_CONSTANTS, COMPILED_STACK_DEPTH, COMPILED_DOC_STRING)
2727 (COMPILED_INTERACTIVE, CHAR_ALT, CHAR_SUPER, CHAR_HYPER, CHAR_SHIFT)
2728 (CHAR_CTL, CHAR_META, CHAR_MODIFIER_MASK, CHARACTERBITS)
2729 (MANY, UNEVALLED, FLOAT_TO_STRING_BUFSIZE, MAX_ALLOCA):
2730 Now constants, for GDB. They need not be macros.
2731 (MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM, STRING_BYTES_BOUND):
2732 Now constants, for GDB, as well as macros, for static initializers.
2733 (CHAR_TABLE_STANDARD_SLOTS, CHAR_TABLE_EXTRA_SLOTS):
2734 Move to after the definition of struct Lisp_Char_Table,
2735 since the former now needs that type defined.
2736 (enum CHARTAB_SIZE_BITS, enum CHAR_TABLE_STANDARD_SLOTS)
2737 (enum DEFAULT_HASH_SIZE, enum Lisp_Compiled, enum char_bits)
2738 (enum maxargs, enum FLOAT_TO_STRING_BUFSIZE, enum MAX_ALLOCA):
2739 New enums, for gdb_make_enums_visible.
2740 (GLYPH_MODE_LINE_FACE): Remove; unused.
2741 * alloc.c (STRING_BYTES_MAX): Now a constant, not a macro.
2742 (gdb_make_enums_visible): Add enum CHARTAB_SIZE_BITS, enum
2743 CHAR_TABLE_STANDARD_SLOTS, enum char_bits, enum DEFAULT_HASH_SIZE,
2744 enum FLOAT_TO_STRING_BUFSIZE, enum Lisp_Bits, enum Lisp_Compiled,
2745 enum maxargs, enum MAX_ALLOCA.
2746 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): Remove.
2747 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Remove;
2748 no longer needed, now that they are done in lisp.h.
2750 2012-07-30 Dmitry Antipov <dmantipov@yandex.ru>
2752 Cleanup string bytes checking.
2753 * alloc.c (GC_STRING_BYTES, CHECK_STRING_BYTES): Remove. Convert
2754 all users to STRING_BYTES or string_bytes if GC_CHECK_STRING_BYTES.
2755 (check_string_bytes): Define to empty if not GC_CHECK_STRING_BYTES.
2756 (check_sblock, compact_small_strings): Simplify.
2758 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
2760 * lisp.h (LISP_INT_TAG, LISP_INT1_TAG, LISP_STRING_TAG): Remove.
2761 These macros are confusing and no longer need to be defined, as
2762 the enum values now suffice. All uses replaced with definiens.
2763 (Lisp_Int1, Lisp_String): Define directly; this is clearer.
2765 2012-07-29 Juanma Barranquero <lekktu@gmail.com>
2767 * makefile.w32-in (LISP_H, $(BLD)/emacs.$(O), $(BLD)/w32inevt.$(O))
2768 ($(BLD)/w32console.$(O)): Update dependencies.
2770 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
2772 Remove HIDE_LISP_IMPLEMENTATION and cleanup cons free list check.
2773 * lisp.h (HIDE_LISP_IMPLEMENTATION): Remove as useless for a long
2775 (CHECK_CONS_LIST): Remove. Convert all users to check_cons_list.
2777 2012-07-29 Jan Djärv <jan.h.d@swipnet.se>
2779 * lread.c (init_lread): Remove if-statement in ifdef HAVE_NS before
2780 setting sitelisp (Bug#12010).
2782 2012-07-29 Eli Zaretskii <eliz@gnu.org>
2784 * w32heap.h (OS_9X): Rename from OS_WINDOWS_95.
2786 * w32heap.c (cache_system_info):
2787 * w32.c (sys_rename):
2788 * w32proc.c (find_child_console, sys_kill): All users changed.
2790 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
2792 * alloc.c (Fgarbage_collect): Indent as per usual Emacs style.
2794 2012-07-29 Eli Zaretskii <eliz@gnu.org>
2796 * makefile.w32-in (LISP_H): Add $(NT_INC)/stdalign.h.
2798 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
2800 Cleanup statistics calculation in Fgarbage_collect.
2801 * alloc.c (Fgarbage_collect): Rename t1 to meaningful start.
2802 Fix zombies percentage calculation. Simplify elapsed time calculation.
2804 2012-07-29 Dmitry Antipov <dmantipov@yandex.ru>
2806 Generalize marker debugging code under MARKER_DEBUG and use eassert.
2807 * insdel.c (CHECK_MARKERS, check_markers_debug_flag): Remove.
2808 (gap_left, gap_right, adjust_markers_for_delete, insert_1_both)
2809 (insert_from_string_1, insert_from_gap, insert_from_buffer_1)
2810 (replace_range, replace_range_2, del_range_2): Change to eassert.
2811 * marker.c (byte_char_debug_check): Adjust style.
2813 2012-07-29 Paul Eggert <eggert@cs.ucla.edu>
2815 Don't use the abbreviation "win" to refer to Windows (Bug#10421).
2816 * regex.c (MAX_BUF_SIZE): Remove some incorrect and
2817 long-ago-commented-out code that talks about "WIN32".
2818 * w32heap.h (OS_WINDOWS_95): Rename from OS_WIN95.
2821 2012-07-28 Paul Eggert <eggert@cs.ucla.edu>
2823 Use Gnulib stdalign module (Bug#9772, Bug#9960).
2824 * alloc.c (XMALLOC_BASE_ALIGNMENT, GC_POINTER_ALIGNMENT, pure_alloc):
2825 Simplify by using alignof.
2826 (pure_alloc) [! USE_LSB_TAG]: Don't over-align EMACS_INT values.
2827 * lisp.h: Include <stdalign.h>.
2828 (GCALIGNMENT): New macro and constant.
2829 (DECL_ALIGN): Remove. All uses replaced by alignas (GCALIGNMENT).
2830 (USE_LSB_TAG): ifdef on alignas, not on DECL_ALIGN.
2831 (stdalign): New macro, if not already defined.
2833 2012-07-28 Eli Zaretskii <eliz@gnu.org>
2835 Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)
2836 * w32inevt.c: Include w32inevt.h.
2837 (w32_read_console_input): New inline function, calls either
2838 ReadConsoleInputA or ReadConsoleInputW, depending on the value of
2839 w32_console_unicode_input.
2840 (fill_queue): Call w32_read_console_input instead of ReadConsoleInput.
2841 (w32_kbd_patch_key, key_event): Use the codepage returned by
2842 GetConsoleCP, rather than the ANSI codepage returned by GetLocaleInfo.
2843 (key_event): use uChar.UnicodeChar only if
2844 w32_console_unicode_input is non-zero.
2846 * w32console.c: Include w32heap.h.
2847 <w32_console_unicode_input>: New global variable.
2848 (initialize_w32_display): Set w32_console_unicode_input to 1 on NT
2849 family of Windows, zero otherwise.
2851 * w32inevt.h: Declare w32_console_unicode_input.
2853 * xdisp.c (init_iterator): Don't reference tip_frame in a build
2854 --without-x. (Bug#11742)
2856 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
2858 Adjust GDB to reflect pvec_type changes (Bug#12036).
2859 * .gdbinit (xvectype, xpr, xbacktrace): Adjust to reflect the
2860 2012-07-04 changes to pseudovector representation.
2861 Problem reported by Eli Zaretskii in <http://bugs.gnu.org/12036#30>.
2863 2012-07-27 Michael Albinus <michael.albinus@gmx.de>
2865 * dbusbind.c (XD_DBUS_VALIDATE_BUS_ADDRESS): Canonicalize session
2867 (xd_close_bus, Fdbus_init_bus): Handle reference counter properly.
2869 2012-07-27 Eli Zaretskii <eliz@gnu.org>
2871 * alloc.c (listn): Fix the order the arguments are consed onto the
2874 * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
2875 enumeration constants, as PURE and HEAP are too general, and clash
2876 with other headers and sources, such as gmalloc.c and the
2877 MS-Windows system headers. All users changed.
2879 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
2881 Revert last save_excursion_save and save_excursion_restore changes.
2882 * alloc.c, editfns.c, marker.c, lisp.h: Revert.
2883 Lots of crashes reported by Chong Yidong <cyd@gnu.org>.
2885 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
2887 Fix recently-introduced typos in Windows port.
2888 Reported by Martin Rudalics <rudalics@gmx.at>.
2889 * w32.c (init_environment): Replace comma with semicolon.
2890 * w32fns.c (syms_of_w32fns): Add missing parenthesis.
2892 2012-07-27 Paul Eggert <eggert@cs.ucla.edu>
2894 Improve GDB symbol export (Bug#12036).
2895 * .gdbinit (xgetptr, xgetint, xgettype): Set $bugfix in different
2896 arms of an 'if', not using conditional expressions; otherwise GDB
2897 complains about the types in the unevaluated arm when the argument
2898 is an integer literal.
2899 (xgetint): Simplify expression.
2900 * alloc.c (gdb_make_enums_visible): New constant. This ports to
2901 GCC 3.4.2 the export of symbols to GDB. Problem reported by Eli
2902 Zaretskii in <http://bugs.gnu.org/12036#13>.
2903 * lisp.h (PUBLISH_TO_GDB): Remove. All uses removed. No longer
2904 needed now that we have gdb_make_enums_visible.
2905 (enum CHECK_LISP_OBJECT_TYPE, enum Lisp_Bits, enum More_Lisp_Bits)
2906 (enum enum_USE_LSB_TAG):
2907 New enum types, packaging up enums that need to be exported to GDB.
2909 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
2911 Utility function to make a list from specified amount of objects.
2912 * lisp.h (enum constype): New datatype.
2913 (listn): New prototype.
2914 * alloc.c (listn): New function.
2915 (Fmemory_use_count, syms_of_alloc): Use it.
2916 * buffer.c (syms_of_buffer): Likewise.
2917 * callint.c (syms_of_callint): Likewise.
2918 * charset.c (define_charset_internal): Likewise.
2919 * coding.c (syms_of_coding): Likewise.
2920 * keymap.c (syms_of_keymap): Likewise.
2921 * search.c (syms_of_search): Likewise.
2922 * syntax.c (syms_of_syntax): Likewise.
2923 * w32.c (init_environment): Likewise.
2924 * w32fns.c (Fw32_battery_status, syms_of_w32fns): Likewise.
2925 * xdisp.c (syms_of_xdisp): Likewise.
2926 * xfns.c (syms_of_xfns): Likewise.
2928 2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
2930 Fast save_excursion_save and save_excursion_restore.
2931 * lisp.h (struct Lisp_Excursion): New data type.
2932 (PVEC_EXCURSION): New pseudovector type.
2933 (XEXCURSION, XSETEXCURSION, EXCURSIONP): Convenient macros
2934 to deal with it. Adjust comments.
2935 (init_marker, attach_marker): New prototype.
2936 (unchain_marker): Adjust prototype.
2937 * marker.c (attach_marker): Change to global.
2938 (init_marker): New function.
2939 * alloc.c (Fmake_marker, build_marker): Use it.
2940 (build_marker): More easserts.
2941 (mark_object): Handle struct Lisp_Excursion.
2942 * editfns.c (save_excursion_save, save_excursion_restore):
2943 Reimplement to use struct Lisp_Excursion. Add comments.
2945 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
2947 Fix export of symbols to GDB (Bug#12036).
2948 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
2949 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
2950 emacs.c, as this is a more-suitable home. Had this been done earlier
2951 the fix for 12036 would have avoided some of the problems noted in
2952 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
2953 would have been more obvious.
2954 * emacs.c: Do not include <verify.h>; no longer needed.
2955 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
2956 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
2957 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
2958 Remove; now done in lisp.h.
2959 * lisp.h (PUBLISH_TO_GDB): New macro.
2960 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
2961 (DATA_SEG_BITS): Use it.
2962 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
2963 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
2964 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
2965 not be usable in #if. This simplifies things.
2967 2012-07-26 Juanma Barranquero <lekktu@gmail.com>
2969 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
2971 2012-07-26 Paul Eggert <eggert@cs.ucla.edu>
2973 Simplify export of symbols to GDB (Bug#12036).
2974 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
2975 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
2976 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
2977 Adjust to changes in lisp.h and emacs.c, by using
2978 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
2979 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
2980 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
2981 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
2982 instead of gdb_valbits.
2983 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
2984 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
2985 instead of gdb_array_mark_flag.
2986 (xboolvector): Get size from $->size, not $->header.size.
2987 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
2988 (xreload, hook-run, hookpost-run): Remove.
2989 * emacs.c: Include <verify.h>.
2990 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
2991 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
2993 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
2994 (gdb_USE_LSB_TAG): New enum constants.
2995 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
2996 Also define these as enum constants, so they're visible to GDB.
2997 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
2998 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
2999 as constants, so they're visible to GDB.
3000 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
3001 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
3002 Now enum constants, not macros, so they're visible to GDB.
3003 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
3004 more convenient now. All uses changed.
3005 (VALMASK) [USE_LSB_TAG]: Also define in this case.
3006 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
3008 2012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
3010 Explicitly free restriction data that are not needed anymore.
3011 * editfns.c (save_restriction_restore): Free restriction data.
3013 2012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
3015 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
3016 add argument, tune behavior, and adjust all callers.
3018 2012-07-25 Paul Eggert <eggert@cs.ucla.edu>
3020 Use typedef for EMACS_INT, EMACS_UINT.
3021 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
3022 than macros. This simplifies debugging in the usual case, since
3023 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
3024 and it allows expressions involving EMACS_INT casts.
3025 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
3027 2012-07-25 Jan Djärv <jan.h.d@swipnet.se>
3029 * nsterm.m (ns_read_socket): Return early if there is a modal
3032 2012-07-25 Martin Rudalics <rudalics@gmx.at>
3034 * frame.c (Fredirect_frame_focus): In doc-string don't mention
3035 that FOCUS-FRAME can be omitted.
3037 2012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
3039 Adjust buffer text indirection counters at the end of Fkill_buffer.
3040 * buffer.c (Fkill_buffer): Adjust indirection counters when the
3041 buffer is definitely dead. This should really fix an issue reported
3042 by Christoph Scholtes again. (Bug#12007).
3043 (init_buffer_once): Initialize indirection counters of
3044 buffer_defaults and buffer_local_symbols (for sanity and safety).
3046 2012-07-24 Eli Zaretskii <eliz@gnu.org>
3048 * xdisp.c (init_iterator): Don't compute dimensions of truncation
3049 and continuation glyphs on tooltip frames, leave them at zero.
3050 Avoids continued lines in tooltips. (Bug#11832)
3052 2012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
3054 Simplify copy_overlay.
3055 * buffer.c (copy_overlay): Simplify. Use build_marker.
3056 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
3058 2012-07-23 Eli Zaretskii <eliz@gnu.org>
3060 * print.c (print_object): Don't crash when a frame's name is nil
3061 or invalid. (Bug#12025)
3063 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
3064 it signals an error when a tooltip frame is being created.
3066 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
3068 Cleanup miscellaneous objects allocation and initialization.
3069 * alloc.c (allocate_misc): Change to static. Add argument to
3070 specify the subtype. Adjust comment and users.
3071 (build_overlay): New function.
3072 * buffer.c (copy_overlays, Fmake_overlay): Use it.
3073 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
3074 (allocate_misc): Remove prototype.
3075 (build_overlay): Add prototype.
3077 2012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
3079 Swap buffer text indirection counters in Fbuffer_swap_text.
3080 * buffer.c (Fbuffer_swap_text): Swap indirections too.
3081 This avoids crash reported by Christoph Scholtes at
3082 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
3084 2012-07-22 Jan Djärv <jan.h.d@swipnet.se>
3086 * nsmenu.m (Popdown_data): New struct.
3087 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
3089 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
3090 (initWithContentRect): Make imgView and contentView non-static
3091 and autorelease them. Also autorelease img and matrix (Bug#12005).
3092 (dealloc): Remove (Bug#12005).
3094 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
3096 Adjust consing_since_gc when objects are explicitly freed.
3097 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
3098 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
3099 (free_cons, free_misc): Subtract object size from consing_since_gc.
3101 2012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
3103 Simplify and cleanup markers positioning code.
3104 * marker.c (attach_marker): More useful eassert.
3105 (live_buffer, set_marker_internal): New function.
3106 (Fset_marker, set_marker_restricted): Use set_marker_internal.
3107 (set_marker_both, set_marker_restricted_both): Use live_buffer.
3109 2012-07-22 Paul Eggert <eggert@cs.ucla.edu>
3111 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
3112 as it's limited by the amount of memory, not by INT_MAX.
3114 2012-07-21 Eli Zaretskii <eliz@gnu.org>
3116 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
3117 in special-event-map. See the discussion at
3118 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
3121 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
3122 info.dwItemData. Fixes crashes on 64-bit Windows.
3123 Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
3125 2012-07-21 Jan Djärv <jan.h.d@swipnet.se>
3127 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
3128 (conversationIdentifier): Return value is NSInteger.
3129 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
3131 2012-07-21 Chong Yidong <cyd@gnu.org>
3133 * window.c (decode_any_window): Signal an error if the window is
3134 on a dead frame (Bug#11984).
3136 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3138 Add indirection counting to speed up Fkill_buffer.
3139 * buffer.h (struct buffer): New member.
3140 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
3141 (Fmake_indirect_buffer): Set indirection counter to -1, increment
3142 base buffer indirection counter.
3143 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
3144 (Fkill_buffer): Adjust indirection counters as needed, don't walk
3145 through buffer list if indirection counter is 0.
3147 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3149 Extend the value returned by Fgarbage_collect with heap statistics.
3150 * alloc.c (Qheap): New symbol.
3151 (syms_of_alloc): DEFSYM it.
3152 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
3153 (Fmemory_free): Remove.
3154 (syms_of_alloc): Don't defsubr it.
3155 * buffer.c (Fcompact_buffer): Remove.
3156 (syms_of_buffer): Don't defsubr it.
3158 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3160 Make maybe_gc inline.
3161 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
3162 * lisp.h (consing_since_gc, gc_relative_threshold)
3163 (memory_full_cons_threshold): Revert declaration.
3164 (maybe_gc): Remove prototype, define as inline.
3165 * alloc.c: Remove old commented-out code.
3166 (consing_since_gc, gc_relative_threshold)
3167 (memory_full_cons_threshold): Revert to global.
3170 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3172 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
3173 * lisp.h (build_unibyte_string): New function.
3174 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
3175 * sysdep.c, w32fns.c, xfns.c: Use it.
3176 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
3177 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
3178 Adjust users accordingly.
3179 * font.h (font_open_by_name): Adjust prototype.
3181 2012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
3183 Cleanup calls to Fgarbage_collect.
3184 * lisp.h (maybe_gc): New prototype.
3185 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
3186 Remove declarations.
3187 * alloc.c (maybe_gc): New function.
3188 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
3190 * bytecode.c (MAYBE_GC): Use maybe_gc.
3191 * eval.c (eval_sub, Ffuncall): Likewise.
3192 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
3193 to avoid dependency from auto-save feature.
3195 2012-07-19 Paul Eggert <eggert@cs.ucla.edu>
3197 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
3198 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
3199 'for_each_per_buffer_object_at'.
3200 All uses changed. It's better to use upper-case for macros that
3201 cannot be implemented as functions, to give the reader a clue
3202 that they're special.
3204 2012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
3206 * alloc.c (Fgarbage_collect): Tweak docstring.
3208 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
3210 Tweak the value returned from Fgarbage_collect again.
3211 * alloc.c (Fgarbage_collect): New return value, as confirmed in
3212 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
3213 Adjust documentation.
3214 (total_vector_bytes): Rename to total_vector_slots, adjust
3216 (total_free_vector_bytes): Rename to total_free_vector_slots,
3218 (Qstring_bytes, Qvector_slots): New symbols.
3219 (syms_of_alloc): DEFSYM them.
3221 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
3223 Buffer compaction primitive which may be used from Lisp.
3224 * buffer.c (compact_buffer, Fcompact_buffer): New function.
3225 (syms_of_buffer): Register Fcompact_buffer.
3226 * alloc.c (Fgarbage_collect): Use compact_buffer.
3227 * buffer.h (compact_buffer): New prototype.
3228 (struct buffer_text): New member.
3230 2012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
3232 New macro to iterate over all buffers, miscellaneous cleanups.
3233 * lisp.h (all_buffers): Remove declaration.
3234 * buffer.h (all_buffers): Add declaration, with comment.
3235 (for_each_buffer): New macro.
3236 * alloc.c (Fgarbage_collect, mark_object): Use it.
3237 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
3238 (init_buffer): Likewise.
3239 * data.c (Fset_default): Likewise.
3240 * coding.c (code_conversion_restore): Remove redundant check
3242 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
3244 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
3246 Fix bug that created negative-length intervals.
3247 * intervals.c (merge_interval_right, merge_interval_left):
3248 Do not zero out this interval if it is absorbed by its children,
3249 as this interval's total length doesn't change in that case. See
3250 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
3252 2012-07-18 Paul Eggert <eggert@cs.ucla.edu>
3254 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
3255 when invoking (make-bool-vector N t) and N is a positive
3256 multiple of 8 -- the last 8 bits were mistakenly cleared.
3258 Remove some struct layout assumptions in bool vectors.
3259 * alloc.c (bool_header_size): New constant.
3260 (header_size, word_size): Move earlier, as they're now used earlier.
3261 Use 'word_size' in a few more places, where it's appropriate.
3262 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
3263 padding before the data member of a bool vector.
3264 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
3265 than doing the check by hand with an abort ().
3267 2012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
3269 * eval.c (Fdefvar): Don't check constants since we only set the var if
3270 it's not yet defined anyway (bug#11904).
3272 * lisp.h (last_undo_boundary): Declare new var.
3273 * keyboard.c (command_loop_1): Set it.
3274 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
3275 were auto-added by the command loop (bug#11774).
3277 2012-07-18 Andreas Schwab <schwab@linux-m68k.org>
3279 * w32font.c (Qsymbol): Remove local definition.
3280 (syms_of_w32font): Don't DEFSYM it.
3282 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
3284 Fix sweep_vectors to handle large bool vectors correctly.
3285 * alloc.c (sweep_vectors): Account total_vector_bytes for
3286 bool vectors larger than VBLOCK_BYTES_MAX.
3288 2012-07-18 Chong Yidong <cyd@gnu.org>
3290 * frame.c (x_set_frame_parameters): Revert bogus change introduced
3291 in 2012-05-25 commit by Paul Eggert (Bug#11738).
3293 2012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
3295 Return more descriptive data from Fgarbage_collect.
3296 Suggested by Stefan Monnier in
3297 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
3298 * alloc.c (bounded_number): New function.
3299 (total_buffers, total_vectors): New variable.
3300 (total_string_size): Rename to total_string_bytes, adjust users.
3301 (total_vector_size): Rename to total_vector_bytes, adjust users.
3302 (sweep_vectors): Account total_vectors and total_vector_bytes.
3303 (Fgarbage_collect): New return value. Adjust documentation.
3304 (gc_sweep): Account total_buffers.
3305 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
3306 (VECTOR_SIZE): Remove.
3307 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
3308 (Qinterval, Qmisc): New symbols.
3309 (syms_of_data): Initialize them.
3310 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
3311 (Qcons, Qbuffer): New declarations.
3313 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
3315 * alloc.c (Fmemory_free): Account for memory-free's own storage.
3316 Round up, not down. Improve doc.
3318 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3320 Restore old code in allocate_string_data to avoid Faset breakage.
3321 Reported by Julien Danjou <julien@danjou.info> in
3322 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
3323 * alloc.c (allocate_string_data): Restore old code with minor
3324 adjustments, fix comment to explain this subtle issue.
3326 2012-07-17 Eli Zaretskii <eliz@gnu.org>
3328 Remove FILE_SYSTEM_CASE.
3329 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
3331 * fileio.c (FILE_SYSTEM_CASE): Don't define.
3332 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
3333 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
3334 call-process-region passes it through expand-file-name.
3336 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
3338 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
3340 Fix crash when creating indirect buffer (Bug#11917)
3341 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
3342 Don't handle unbound variables specially if non-zero.
3343 (Fbuffer_local_variables): Pass zero.
3344 (clone_per_buffer_values): Pass non-zero.
3346 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
3348 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
3349 to make the loop interruptible.
3351 2012-07-17 Andreas Schwab <schwab@linux-m68k.org>
3353 * gnutls.c (emacs_gnutls_handshake): Only retry if
3354 GNUTLS_E_INTERRUPTED.
3356 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3358 Cleanup and convert miscellaneous checks to eassert.
3359 * alloc.c (mark_interval): Fix comment, partially rephrase
3360 old comment from intervals.h (see below).
3361 * intervals.c (find_interval, adjust_intervals_for_insertion)
3362 (delete_interval, adjust_intervals_for_deletion)
3363 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
3365 (adjust_intervals_for_insertion, make_new_interval):
3366 Remove obsolete and unused code.
3367 * intervals.h (struct interval): Remove obsolete comment.
3368 * textprotp.c (erase_properties): Remove unused code.
3369 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
3370 (Fremove_list_of_text_properties): Convert to eassert.
3372 2012-07-17 Chong Yidong <cyd@gnu.org>
3374 * editfns.c (Finsert_char): Doc fix.
3376 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3378 Fix previous change to make Fmemory_free always accurate.
3379 * alloc.c (make_interval): Update total_free_intervals.
3380 (make_float): Likewise for total_free_floats.
3381 (free_cons, Fcons): Likewise for total_free_conses.
3382 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
3383 Likewise for total_free_vector_bytes.
3384 (Fmake_symbol): Likewise for total_free_symbols.
3385 (bytes_free): Remove.
3387 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3389 Simple free memory accounting feature.
3390 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
3391 (sweep_vectors): Accumulate size of free vectors.
3392 (Fgarbage_collect): Setup bytes_free.
3393 (Fmemory_free): New function.
3394 (syms_of_alloc): Register it.
3396 2012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
3398 Cleanup overlays checking.
3399 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
3400 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
3401 eassert and OVERLAYP.
3402 (sort_overlays): Change to use OVERLAYP.
3404 2012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
3406 * editfns.c (Finsert_char): Make it interactive, and make the
3407 second arg optional. Copy interactive spec and docstring from
3410 2012-07-17 Paul Eggert <eggert@cs.ucla.edu>
3412 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
3413 Unlike the other wrapped functions, fabs has an unspecified
3416 2012-07-16 Jan Djärv <jan.h.d@swipnet.se>
3418 * nsterm.m (keyDown): Interpret flags without left/right bits
3419 as the left key (Bug#11670).
3421 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
3423 Remove empty and useless init functions.
3424 * lisp.h (init_character_once, init_fns, init_image)
3425 (init_filelock, init_sound): Remove prototype.
3426 * character.c (init_character_once): Remove.
3427 * filelock.c (init_filelock): Likewise.
3428 * fns.c (init_fns): Likewise.
3429 * image.c (init_image): Likewise.
3430 * sound.c (init_sound): Likewise.
3431 * emacs.c (main): Adjust accordingly.
3433 2012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
3435 * gtkutil.h: Tiny cleanups.
3436 (use_old_gtk_file_dialog): Remove useless declaration.
3437 (xg_uses_old_file_dialog): Add suggested const attribute.
3439 2012-07-15 Eli Zaretskii <eliz@gnu.org>
3441 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
3442 (bidi_paragraph_init): Use it to limit search forward for a strong
3443 directional character in abnormally large paragraphs full of
3444 neutral or weak characters. (Bug#11943)
3446 2012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
3448 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
3449 the toolbar (Bug#9451).
3450 (xg_make_tool_item): Give the widget event box a transparent
3453 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
3455 Cleanup basic allocation variables and functions.
3456 * alloc.c (ignore_warnings, init_intervals, init_float)
3457 (init_cons, init_symbol, init_marker): Remove.
3458 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
3459 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
3460 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
3461 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
3462 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
3463 (staticidx, init_alloc_once, init_strings, free_ablock):
3464 Remove redundant initialization.
3465 * fns.c (init_weak_hash_tables): Remove.
3466 * lisp.h (init_weak_hash_tables): Remove prototype.
3468 2012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
3470 Use zero_vector where appropriate.
3471 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
3473 * lisp.h (zero_vector): New declaration.
3474 * font.c (null_vector): Remove.
3475 (syms_of_font): Remove initialization and staticpro.
3476 (font_list_entities, font_find_for_lface): Change to use zero_vector.
3477 * keymap.c (Faccessible_keymaps): Likewise.
3479 2012-07-15 Leo Liu <sdl.web@gmail.com>
3481 * fringe.c: Fix typo in comments.
3483 2012-07-14 Leo Liu <sdl.web@gmail.com>
3485 * fringe.c: Add a new bitmap exclamation-mark.
3487 2012-07-14 Eli Zaretskii <eliz@gnu.org>
3489 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
3491 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
3492 (HAVE_MENUS): Don't define, defined by editing config.in with
3494 (GMALLOC_INHIBIT_VALLOC): Don't define.
3495 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
3497 2012-07-14 Juanma Barranquero <lekktu@gmail.com>
3499 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
3501 2012-07-14 Glenn Morris <rgm@gnu.org>
3503 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
3504 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
3505 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
3507 2012-07-13 Glenn Morris <rgm@gnu.org>
3509 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
3511 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
3512 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
3514 2012-07-13 Jan Djärv <jan.h.d@swipnet.se>
3516 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
3517 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
3518 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
3519 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
3521 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
3522 as boolean expression.
3523 (x_set_window_size): Remove unused variable toolbar.
3524 (ns_get_color_default, ns_mod_to_lisp): Remove.
3525 (ns_mouse_position): Remove unused variables xchar and ychar.
3526 (ns_compute_glyph_string_overhangs): Remove unused variable face.
3527 (ns_set_vertical_scroll_bar): Remove unused variable count.
3528 (ns_delete_terminal): Remove unused variable i.
3529 (ns_term_init): Remove unused variables r, g and b.
3530 (mouseDown): Remove unused variable window.
3531 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
3532 (initFrameFromEmacs): Remove unused variable vbextra.
3533 (mouseEntered): Remove unused variables p and dpyinfo.
3534 (mouseExited): Remove unused variables p and r.
3535 (ns_define_frame_cursor, ns_clear_frame_area)
3536 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
3537 (menuDown): Assign [sender tag] to variable and cast the variable.
3539 * nsterm.h (menuDown): Add id as type to argument sender.
3540 (ns_display_info_for_name): Add Lisp_Object argument.
3541 (ns_term_init): Add Lisp_Object argument.
3542 (ns_map_event_to_object): Add void argument.
3543 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
3544 prototype with arguments and only declare if __OBJC__.
3545 (nxatoms_of_nsselect): Add void argument.
3546 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
3547 (ns_alloc_autorelease_pool): Add void argument.
3548 (ns_release_autorelease_pool): Add void* argument.
3549 (ns_get_defaults_value): Add const char* argument.
3551 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
3552 (initFromContents): Use SSDATA where appropriate.
3553 (ns_update_menubar): Add braces to ambigous if-else.
3554 (initWithTitle): Put () around assignment in if statement.
3555 (ns_menu_show): Remove unused variables window and keymap.
3556 (update_frame_tool_bar): Remove unused variable selected_p.
3557 (initWithContentRect): Remove unused variable this_cmd_name.
3559 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
3561 (setXBMColor): Remove unused variable len.
3562 (setPixmapData): Put () around assignment in loop statement.
3564 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
3565 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
3567 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
3568 around assignment in loop statement.
3569 (nsfont_open): Remove unused variable i.
3570 (nsfont_open): Remove unused variable len.
3571 (nsfont_draw): Remove unused variable cs.
3573 * nsfns.m (x_set_icon_name, ns_set_name_internal)
3574 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
3575 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
3576 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
3577 (Fns_font_name, Fns_perform_service)
3578 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
3579 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
3580 (ns_set_name): Remove unused variable view.
3581 (x_set_menu_bar_lines): Remove unused variable olines.
3582 (x_set_tool_bar_lines): Remove unused variable root_window.
3583 (Fns_list_colors): Put () around assignment in while statement.
3584 (Fns_perform_service): Remove unused variable len.
3585 (Fns_display_usable_bounds): Remove unused variable top.
3586 (syms_of_nsfns): Remove unused variable i.
3588 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
3591 2012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
3593 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
3594 and free it with DestroyExceptionInfo (Bug#11558).
3596 2012-07-13 Juanma Barranquero <lekktu@gmail.com>
3598 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
3599 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
3600 Set here, not in nt/config.nt.
3602 2012-07-13 Eli Zaretskii <eliz@gnu.org>
3604 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
3605 cursor overflow into the last glyph on display line when the right
3606 fringe is off. (Bug#11832)
3608 2012-07-13 Paul Eggert <eggert@cs.ucla.edu>
3610 * xdisp.c (produce_special_glyphs): Now static.
3611 * dispextern.h (produce_special_glyphs): Remove decl.
3613 2012-07-13 Glenn Morris <rgm@gnu.org>
3615 * s/bsd-common.h, s/cygwin.h: Remove empty files.
3616 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
3618 * s/usg5-4-common.h (USG, USG5):
3619 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
3620 * s/sol2-6.h (SOLARIS2):
3621 * s/irix6-5.h (IRIX6_5):
3622 * s/hpux10-20.h (USG, USG5, HPUX):
3623 * s/gnu-linux.h (USG, GNU_LINUX):
3624 * s/freebsd.h (BSD_SYSTEM):
3625 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
3626 * s/cygwin.h (CYGWIN):
3627 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
3628 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
3630 2012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
3632 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
3634 2012-07-13 Glenn Morris <rgm@gnu.org>
3636 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
3638 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
3640 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
3641 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
3643 2012-07-12 Glenn Morris <rgm@gnu.org>
3645 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
3647 * process.c (init_process_emacs): Rename from init_process.
3648 The old name is also the name of a Mach system call.
3649 * lisp.h, emacs.c: Update for this name change.
3650 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
3653 2012-07-12 Eli Zaretskii <eliz@gnu.org>
3655 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
3656 memmove call that removes glyphs covered by the left truncation
3657 glyph. Improve commentary.
3658 (display_line): Fix display of continuation glyphs on GUI frames
3659 when the right fringe is turned off and variable-size fonts are
3660 used in the window. Move the code that appends a stretch glyph to
3661 produce_special_glyphs, so that it could be used for truncation
3662 and continuation glyphs alike.
3663 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
3664 glyph of a suitably computed width, to align the special glyphs at
3665 the window margin. Code moved from display_line. (Bug#11832)
3667 2012-07-12 Glenn Morris <rgm@gnu.org>
3669 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
3671 * s/gnu-linux.h, s/hpux10-20.h:
3672 Do not unconditionally define HAVE_XRMSETDATABASE.
3674 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
3676 2012-07-12 Paul Eggert <eggert@cs.ucla.edu>
3678 Fix typos that broke OS X build.
3679 Reported by Randal L. Schwartz in
3680 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
3681 * nsterm.m (ns_timeout): Add missing local decl.
3682 (ns_get_color): snprintf -> sprintf, to fix typo.
3684 2012-07-12 Glenn Morris <rgm@gnu.org>
3686 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
3687 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
3688 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
3689 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
3691 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
3692 Move PTY_OPEN to configure.
3694 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
3695 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
3696 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
3698 2012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
3700 Use empty_unibyte_string where applicable.
3701 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
3702 * lread.c (read1): Likewise.
3703 * xsettings.c (syms_of_xsettings): Likewise.
3705 2012-07-12 Glenn Morris <rgm@gnu.org>
3707 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
3708 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
3709 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
3710 * s/hpux10-20.h (RUN_TIME_REMAP):
3711 * s/bsd-common.h (TABDLY): Move to configure.
3713 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
3715 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
3717 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
3718 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
3720 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
3722 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
3723 * s/template.h: Move NARROWPROTO to configure.
3725 2012-07-11 Glenn Morris <rgm@gnu.org>
3727 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
3728 unused since 2011-01-17 change to systty.h.
3730 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
3731 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
3732 Move HAVE_PTYS and HAVE_SOCKETS to configure.
3734 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
3736 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
3738 2012-07-11 Glenn Morris <rgm@gnu.org>
3740 * s/darwin.h, s/gnu-linux.h, s/template.h:
3741 Move INTERRUPT_INPUT to configure.
3743 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
3745 Minor adjustments to interning code.
3746 * lisp.h (intern, intern_c_string): Redefine as static inline
3747 wrappers for intern_1 and intern_c_string_1, respectively.
3748 (intern_1, intern_c_string_1): Rename prototypes.
3749 * lread.c (intern_1, intern_c_string_1, oblookup):
3750 Simplify Vobarray checking.
3751 * font.c (font_intern_prop): Likewise. Adjust comment.
3752 * w32font.c (intern_font_name): Likewise.
3754 2012-07-11 Andreas Schwab <schwab@linux-m68k.org>
3756 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
3758 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
3759 of Fcar/Fcdr if possible.
3760 * font.c (check_otf_features): Likewise.
3761 * fontset.c (Fnew_fontset): Likewise.
3762 * gnutls.c (Fgnutls_boot): Likewise.
3763 * minibuf.c (read_minibuf): Likewise.
3764 * msdos.c (IT_set_frame_parameters): Likewise.
3765 * xmenu.c (Fx_popup_dialog): Likewise.
3766 * w32menu.c (Fx_popup_dialog): Likewise.
3768 2012-07-11 Glenn Morris <rgm@gnu.org>
3770 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
3771 since nothing has defined it on these platforms.
3773 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
3774 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
3776 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
3777 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
3778 Move CLASH_DETECTION to configure.
3780 * s/gnu.h: Remove file, which is now empty.
3782 * s/gnu.h, s/gnu-linux.h:
3783 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
3785 2012-07-11 John Wiegley <johnw@newartisans.com>
3787 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
3788 function attribute, so we only use it if it exists in the
3791 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
3793 Avoid call to strlen in fast_c_string_match_ignore_case.
3794 * search.c (fast_c_string_match_ignore_case): Change to use
3795 length argument. Adjust users accordingly.
3796 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
3798 2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
3800 Assume mkdir, rmdir.
3801 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
3802 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
3805 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
3808 * s/hpux10-20.h (HAVE_PERROR): Remove.
3809 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
3810 Remove dummy definition, as this problem was obsolete long ago.
3813 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
3815 2012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
3817 Avoid calls to strlen in font processing functions.
3818 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
3819 (font_open_by_name): Change to use length argument.
3820 Adjust users accordingly.
3821 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
3823 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
3824 Change to return ptrdiff_t.
3825 (xfont_list_pattern, xfont_match): Use length returned by
3826 xfont_decode_coding_xlfd.
3827 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
3829 2012-07-11 Glenn Morris <rgm@gnu.org>
3831 * s/darwin.h, s/freebsd.h, s/netbsd.h:
3832 Move DONT_REOPEN_PTY to configure.
3834 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
3835 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
3837 2012-07-10 Paul Eggert <eggert@cs.ucla.edu>
3839 Remove "#define unix" that is no longer needed (Bug#11905).
3840 * s/aix4-2.h (unix): Remove; no longer needed.
3842 EMACS_TIME simplification (Bug#11875).
3843 This replaces macros (which typically do not work in GDB)
3844 with functions, typedefs and enums, making the code easier to debug.
3845 The functional style also makes code easier to read and maintain.
3846 * systime.h: Include <sys/time.h> on all hosts, not just if
3847 WINDOWSNT, since 'struct timeval' is needed in general.
3848 (EMACS_TIME): Now a typedef, not a macro.
3849 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
3851 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
3852 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
3853 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
3854 (EMACS_TIME_LE): Now functions, not macros.
3855 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
3856 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
3857 which are not functions. All uses rewritten to use:
3858 (make_emacs_time): New function.
3859 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
3860 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
3861 not functions. All uses rewritten to use the following, respectively:
3862 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
3863 (add_emacs_time, sub_emacs_time): New functions.
3864 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
3865 * fileio.c (Fcopy_file):
3866 * xterm.c (XTflash): Get the current time closer to when it's used.
3867 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
3869 * bytecode.c (targets): Suppress -Woverride-init warnings.
3871 Simplify by avoiding confusing use of strncpy etc.
3872 * doc.c (Fsnarf_documentation):
3873 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
3874 * frame.c (Fmake_terminal_frame):
3875 * gtkutil.c (get_utf8_string):
3877 * nsmenu.m (ns_update_menubar):
3878 * regex.c (regerror):
3879 Prefer memcpy to strncpy and strncat when either will do.
3880 * fileio.c (Fsubstitute_in_file_name):
3881 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
3882 (menu_separator_name_p):
3883 * nsmenu.m (ns_update_menubar):
3884 Prefer memcmp to strncmp when either will do.
3885 * nsterm.m: Include <ftoastr.h>.
3887 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
3888 Prefer snprintf to strncpy.
3889 * nsterm.m (ns_term_init):
3890 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
3891 * nsterm.m (ns_term_init):
3892 Avoid the need for strncpy, by using build_string or
3893 make_unibyte_string directly. Use dtoastr, not snprintf.
3894 * process.c (Fmake_network_process): Diagnose service names that
3895 are too long, rather than silently truncating them or creating
3896 non-null-terminated names.
3897 (Fnetwork_interface_info): Likewise, for interface names.
3898 * sysdep.c (system_process_attributes) [GNU_LINUX]:
3899 Prefer sprintf to strncat.
3900 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
3901 Prefer vsnprintf to vsprintf + strncpy.
3903 2012-07-10 Glenn Morris <rgm@gnu.org>
3905 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
3906 Clarify fallback case.
3908 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
3910 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
3911 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
3912 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
3913 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
3914 where argument type is known to be a Lisp_Cons.
3916 2012-07-10 Tom Tromey <tromey@redhat.com>
3918 * bytecode.c (BYTE_CODE_THREADED): New macro.
3919 (BYTE_CODES): New macro. Replaces all old byte-code defines.
3920 (enum byte_code_op): New type.
3921 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
3922 (exec_byte_code): Use them. Use token threading when applicable.
3924 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
3926 Optimize pure C strings initialization.
3927 * lisp.h (make_pure_string): Fix prototype.
3928 (build_pure_c_string): New function, defined as static inline. This
3929 provides a better opportunity to optimize away calls to strlen when
3930 the function is called with compile-time constant argument.
3931 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
3932 argument, adjust users accordingly. Use build_pure_c_string where
3934 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
3935 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
3936 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
3938 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
3940 Avoid calls to strlen in miscellaneous functions.
3941 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
3942 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
3943 * lread.c (openp): Likewise.
3945 2012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
3947 Avoid calls to strlen in path processing functions.
3948 * fileio.c (file_name_as_directory): Add comment. Change to add
3949 srclen argument and return the length of result. Adjust users
3951 (directory_file_name): Fix comment. Change to add srclen argument,
3952 swap 1st and 2nd arguments to obey the common convention.
3953 Adjust users accordingly.
3954 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
3956 2012-07-10 Glenn Morris <rgm@gnu.org>
3958 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
3959 Move PENDING_OUTPUT_COUNT definition to configure.
3961 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
3962 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
3963 * s/gnu.h (DATA_START): Move definitions to configure.
3965 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
3966 We include usg5-4-common.h, which defines them both.
3968 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
3969 O_RDONLY already includes it).
3971 Stop ns builds setting the EMACSLOADPATH environment variable.
3972 * nsterm.m (ns_load_path): Rename from ns_init_paths.
3973 Now it does not set EMACSLOADPATH, just returns the load-path string.
3974 * nsterm.h: Update accordingly.
3975 * lread.c [HAVE_NS]: Include nsterm.h.
3976 (init_lread) [HAVE_NS]: Use ns_load_path.
3977 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
3979 2012-07-09 Glenn Morris <rgm@gnu.org>
3981 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
3982 since the included bsd-common.h does so.
3984 Stop ns builds setting the EMACSPATH environment variable.
3985 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
3986 (ns_init_paths): Do not set EMACSPATH.
3987 * nsterm.h (ns_exec_path): Add it.
3988 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
3991 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
3993 2012-07-09 Paul Eggert <eggert@cs.ucla.edu>
3995 * process.c (wait_reading_process_output): 'waitchannels' was unset
3996 when read_kbd || !NILP (wait_for_cell); fix this.
3998 Add GCC-style 'const' attribute to functions that can use it.
3999 * character.h (char_resolve_modifier_mask):
4000 * keyboard.h (make_ctrl_char):
4001 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
4002 (init_character_once, next_almost_prime, init_fns, init_image)
4003 (flush_pending_output, init_sound):
4004 * mem-limits.h (start_of_data):
4005 * menu.h (finish_menu_items):
4006 Add ATTRIBUTE_CONST.
4007 * emacs.c (DEFINE_DUMMY_FUNCTION):
4008 Declare the dummy function with ATTRIBUTE_CONST.
4009 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
4010 Add decls with ATTRIBUTE_CONST.
4012 Minor improvements to make_formatted_string.
4013 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
4014 where int is good enough, as vsprintf returns an int.
4015 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
4017 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
4019 Use make_formatted_string to avoid double length calculation.
4020 * lisp.h (make_formatted_string): New prototype.
4021 * alloc.c (make_formatted_string): New function.
4022 * buffer.c (Fgenerate_new_buffer_name): Use it.
4023 * dbus.c (syms_of_dbusbind): Likewise.
4024 * editfns.c (Fcurrent_time_zone): Likewise.
4025 * filelock.c (get_boot_time): Likewise.
4026 * frame.c (make_terminal_frame, set_term_frame_name)
4027 (x_report_frame_params): Likewise.
4028 * image.c (gs_load): Likewise.
4029 * minibuf.c (get_minibuffer): Likewise.
4030 * msdos.c (dos_set_window_size): Likewise.
4031 * process.c (make_process): Likewise.
4032 * xdisp.c (ensure_echo_area_buffers): Likewise.
4033 * xsettings.c (apply_xft_settings): Likewise.
4035 2012-07-09 Glenn Morris <rgm@gnu.org>
4037 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
4038 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
4039 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
4040 * nsterm.h (ns_etc_directory): Add it.
4041 * callproc.c [HAVE_NS]: Include nsterm.h.
4042 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
4044 2012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
4046 Move marker debugging code under MARKER_DEBUG.
4047 * marker.c (MARKER_DEBUG): Move marker debugging code under
4048 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
4049 for bootstrap with --enable-checking (~3x slowdown reported
4050 by Juanma Barranquero <lekktu@gmail.com>).
4051 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
4053 2012-07-08 Paul Eggert <eggert@cs.ucla.edu>
4055 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
4056 See <http://bugs.gnu.org/11825#29>.
4058 2012-07-08 Eli Zaretskii <eliz@gnu.org>
4060 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
4061 has no font, use the frame's font. (Bug#11813)
4062 (display_line): Add commentary about displaying truncation glyphs
4064 (produce_special_glyphs): Move here from term.c.
4066 * term.c (produce_special_glyphs): Move to xdisp.c.
4068 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
4071 2012-07-07 Andreas Schwab <schwab@linux-m68k.org>
4073 * xdisp.c (display_line): Avoid warning about implicit declaration
4076 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
4078 * lisp.h: Remove empty conditional.
4080 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
4082 * lread.c (load_path_check): Now static.
4084 Fix some minor --with-ns problems found by static checking.
4085 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
4086 (x_set_font) [!HAVE_X_WINDOWS]:
4087 * image.c (xpm_load_image) [HAVE_NS]:
4088 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
4089 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
4090 Remove unused local.
4091 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
4092 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
4093 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
4094 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
4095 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
4096 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
4097 Fix pointer signedness problem.
4098 * xfaces.c (FRAME_X_FONT_TABLE):
4099 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
4101 2012-07-07 Glenn Morris <rgm@gnu.org>
4103 * lread.c (load_path_check): New function, split from init_lread.
4104 (init_lread): Reorganize. Motivation:
4105 If EMACSLOADPATH is set, check/warn about that rather than the
4106 defaults, which we are not going to use. Hence we can remove
4107 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
4108 Don't warn if site-lisp directories are missing.
4109 If not installed, start from a blank load-path, since
4110 PATH_LOADSEARCH refers to the eventual installation directories.
4112 2012-07-07 Eli Zaretskii <eliz@gnu.org>
4114 Support truncation and continuation glyphs on GUI frames, when
4115 fringes are disabled. (Bug#11832)
4116 * xdisp.c (init_iterator): Get dimensions of truncation and
4117 continuation glyphs even if on GUI frames.
4118 Adjust it->last_visible_x on GUI frames when the left or right fringes,
4119 or both, are absent.
4120 (start_display, move_it_in_display_line_to): Handle the case of a
4121 GUI frame without a fringe to display continuation or truncation
4123 (insert_left_trunc_glyphs): Support GUI frames: make sure
4124 truncation glyphs overwrite enough glyphs from the current line to
4125 have sufficient space in pixels.
4126 (display_line): Support truncation and continuation glyphs on GUI
4127 frames. If some spare pixels are left on the line after inserting
4128 the truncation glyphs, fill that space with a stretch glyph of a
4129 suitably computed width.
4131 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
4132 produce_glyphs, to support GUI sessions.
4134 2012-07-07 Paul Eggert <eggert@cs.ucla.edu>
4136 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
4138 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
4140 Do not require float-time's arg to fit in time_t (Bug#11825).
4141 This works better on hosts where time_t is unsigned, and where
4142 float-time is applied to the (negative) difference between two times.
4143 * editfns.c (decode_time_components): Last arg is now double *,
4144 not int *, and means to store all the result as a double, without
4145 worrying about whether the seconds part fits in time_t.
4146 All callers changed.
4147 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
4148 All callers changed.
4149 (Ffloat_time): Do not fail merely because the specified time falls
4150 outside of time_t range.
4152 2012-07-07 Glenn Morris <rgm@gnu.org>
4154 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
4155 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
4156 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
4158 2012-07-07 Juanma Barranquero <lekktu@gmail.com>
4160 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
4161 Update dependencies.
4163 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
4165 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
4167 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
4168 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
4169 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
4170 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
4171 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
4172 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
4174 * xfont.c (compare_font_names): Redo to omit the need for casts.
4176 2012-07-06 Andreas Schwab <schwab@linux-m68k.org>
4178 * xfns.c (Fx_change_window_property): Doc fix.
4179 * w32fns.c (Fx_change_window_property): Doc fix.
4181 * w32fns.c (Fx_window_property): Accept the same arguments as the
4182 X Windows version. Doc fix.
4183 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
4185 2012-07-06 Juanma Barranquero <lekktu@gmail.com>
4186 Eli Zaretskii <eliz@gnu.org>
4188 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
4189 Windows-specific code from nt/config.nt moved here.
4190 Obsolete settings removed.
4192 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
4194 * process.c: Avoid unnecessary calls to gettime.
4195 (wait_reading_process_output): Don't get the time of day
4196 when gobbling data immediately and not waiting, as there's no need
4197 for it in that case. This removes a FIXME.
4199 2012-07-06 Jan Djärv <jan.h.d@swipnet.se>
4201 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
4202 is defined (Bug#11768).
4204 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4206 Fix marker debugging code.
4207 * marker.c (byte_char_debug_check): Do not perform the check
4208 if buffer is not multibyte.
4209 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
4210 Call byte_char_debug_check with correct arguments.
4212 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4214 Compile marker debugging code only if ENABLE_CHECKING is defined.
4215 * marker.c (byte_char_debug_check, count_markers):
4216 Use only if ENABLE_CHECKING is defined.
4217 (byte_debug_flag): Remove.
4218 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
4219 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
4221 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4223 Avoid code repetition in marker-related functions.
4224 * marker.c (attach_marker): New function.
4225 (Fset_marker, set_marker_restricted, set_marker_both)
4226 (set_marker_restricted_both): Use it.
4227 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
4228 Consistently rename charno to charpos.
4229 (marker_position): Add eassert.
4230 (marker_byte_position): Convert to eassert.
4232 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4234 Simplify list operations in unchain_overlay and unchain_marker.
4235 * buffer.c (unchain_overlay): Simplify. Add comment.
4236 * marker.c (unchain_marker): Simplify. Fix comments.
4238 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4240 Introduce fast path for the widely used marker operation.
4241 * alloc.c (build_marker): New function.
4242 * lisp.h (build_marker): New prototype.
4243 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
4244 * composite.c (autocmp_chars): Likewise.
4245 * editfns.c (buildmark): Remove.
4246 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
4247 (save_restriction_save): Use build_marker.
4248 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
4249 * window.c (save_window_save): Likewise.
4251 2012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
4253 Do not use Fdelete_overlay in delete_all_overlays
4254 to avoid redundant calls to unchain_overlay.
4255 * buffer.c (drop_overlay): New function.
4256 (delete_all_overlays, Fdelete_overlay): Use it.
4257 * minibuf.c (get_minibuffer): Fix comment.
4259 2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
4261 Port to OpenBSD 5.1 amd64.
4262 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
4263 This is needed for OpenBSD, and should be harmless on all BSD systems.
4264 Also, include <sys/sysctl.h>, as it should be available on all
4265 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
4266 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
4267 use p_pid member, not kp_proc.pid.
4269 2012-07-06 Glenn Morris <rgm@gnu.org>
4271 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
4273 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
4275 More xmalloc and related cleanup.
4276 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
4277 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
4278 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
4279 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
4280 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
4281 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
4282 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
4283 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
4284 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
4286 Omit needless casts involving void * pointers and allocation.
4287 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
4288 as the former is more robust if P's type is changed.
4289 Prefer xzalloc to xmalloc + memset 0.
4290 Simplify malloc-or-realloc to realloc.
4291 Don't worry about xmalloc returning a null pointer.
4292 Prefer xstrdup to xmalloc + strcpy.
4293 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
4295 * keyboard.c (apply_modifiers_uncached): Prefer local array to
4296 alloca of a constant.
4298 2012-07-05 Eli Zaretskii <eliz@gnu.org>
4300 * xdisp.c (display_line): Fix horizontal pixel coordinates when
4301 hscroll is larger than the line width. Fixes long and futile
4302 looping inside extend_face_to_end_of_line (on a TTY) producing
4303 glyphs that are not needed and thrown away.
4305 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
4307 * marker.c (set_marker_restricted_both): Simplify by using
4310 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
4312 * editfns.c (region_limit): Simplify by using clip_to_bounds.
4314 2012-07-05 Jan Djärv <jan.h.d@swipnet.se>
4316 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
4317 not defined (Bug#11768).
4318 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
4319 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
4320 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
4321 followed by gtk_box_set_homogeneous (Bug#11768).
4322 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
4323 (update_theme_scrollbar_width, xg_create_scroll_bar):
4324 Use gtk_scrollbar_new (Bug#11768).
4325 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
4326 (is_box_type): New function (Bug#11768).
4327 (xg_tool_item_stale_p): Call is_box_type.
4328 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
4329 with default display (Bug#11768).
4331 2012-07-05 Eli Zaretskii <eliz@gnu.org>
4333 * xdisp.c (window_hscroll_limited): New function.
4334 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
4335 coordinates when window's hscroll is set to insanely large
4338 2012-07-05 Juanma Barranquero <lekktu@gmail.com>
4340 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
4341 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
4343 2012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
4346 * lisp.h (xzalloc): New prototype. Omit needless casts.
4347 * alloc.c (xzalloc): New function. Omit needless casts.
4348 * charset.c: Omit needless casts. Convert all calls to
4349 xmalloc with following memset to xzalloc.
4350 * dispnew.c: Likewise.
4351 * fringe.c: Likewise.
4352 * image.c: Likewise.
4353 * sound.c: Likewise.
4355 * w32fns.c: Likewise.
4356 * w32font.c: Likewise.
4357 * w32term.c: Likewise.
4358 * xfaces.c: Likewise.
4360 * xterm.c: Likewise.
4361 * atimer.c: Omit needless casts.
4362 * buffer.c: Likewise.
4363 * callproc.c: Likewise.
4365 * coding.c: Likewise.
4366 * composite.c: Likewise.
4368 * doprnt.c: Likewise.
4369 * editfns.c: Likewise.
4370 * emacs.c: Likewise.
4372 * filelock.c: Likewise.
4374 * gtkutil.c: Likewise.
4375 * keyboard.c: Likewise.
4377 * lread.c: Likewise.
4378 * minibuf.c: Likewise.
4379 * msdos.c: Likewise.
4380 * print.c: Likewise.
4381 * process.c: Likewise.
4382 * region-cache.c: Likewise.
4383 * search.c: Likewise.
4384 * sysdep.c: Likewise.
4385 * termcap.c: Likewise.
4386 * terminal.c: Likewise.
4387 * tparam.c: Likewise.
4388 * w16select.c: Likewise.
4390 * w32reg.c: Likewise.
4391 * w32select.c: Likewise.
4392 * w32uniscribe.c: Likewise.
4393 * widget.c: Likewise.
4394 * xdisp.c: Likewise.
4395 * xmenu.c: Likewise.
4397 * xselect.c: Likewise.
4399 2012-07-05 Paul Eggert <eggert@cs.ucla.edu>
4401 * fileio.c (time_error_value): Check the right error number.
4402 Problem reported by Troels Nielsen in
4403 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
4405 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
4407 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
4408 This should be fixed in a better way; see Eli Zaretskii in
4409 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
4410 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
4412 * fileio.c (time_error_value): Rename from special_mtime.
4413 The old name's problems were noted by Eli Zaretskii in
4414 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
4416 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
4417 This variable's comment says Emacs needs at least one GDB-visible
4418 symbol of type enum pvec_type, to work around GDB problems.
4419 The symbol's value doesn't matter.
4421 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
4422 that causes compilation to fail on pre-C99 compilers.
4424 2012-07-04 Juanma Barranquero <lekktu@gmail.com>
4426 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
4427 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
4429 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
4431 * buffer.c (init_buffer_once): Fix initialization of
4432 headers for buffer_defaults and buffer_local_symbols.
4433 Reported by Juanma Barranquero <lekktu@gmail.com>.
4435 2012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
4437 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
4438 * lisp.h (enum pvec_type): Use fewer bits.
4439 (PSEUDOVECTOR_SIZE_BITS): New constant.
4440 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
4441 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
4442 change in pvec_type.
4443 (PSEUDOVECTOR_TYPEP): New macro.
4444 (TYPED_PSEUDOVECTORP): Use it.
4445 * fns.c (internal_equal): Adapt code to extract pvectype.
4446 * emacs.c (gdb_pvec_type): Update type.
4447 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
4448 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
4449 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
4450 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
4451 (sweep_vectors): Use it. Use local var `total_bytes' instead of
4452 abusing vector->header.next.nbytes.
4453 (live_vector_p): Use PVEC_TYPE.
4454 (mark_object): Adapt code to extract pvectype. Use switch.
4456 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
4458 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
4459 Tighten new eassert a bit.
4461 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
4463 Fix compilation with --enable-gcc-warnings and -O1
4465 * doprnt.c (doprnt): Change type of tem to int, initialize
4466 to avoid compiler warning. Add eassert.
4467 * search.c (simple_search): Initialize match_byte to avoid
4468 compiler warning. Add eassert.
4470 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
4472 Avoid weird behavior with large horizontal scrolls.
4473 Without this change, for example, large hscroll values would
4474 mess up Emacs's display on Fedora 15 x86, presumably due to
4475 overflows in int calculations in the display code.
4476 Also, if buffers had long lines, Emacs would freeze.
4477 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
4478 (set_window_hscroll): New function, containing the old guts of
4479 Fset_window_hscroll. Return the clipped value.
4480 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
4481 This avoids the need to check against PTRDIFF_MAX.
4483 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
4485 2012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
4487 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
4489 2012-07-04 Paul Eggert <eggert@cs.ucla.edu>
4491 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
4492 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
4493 since GCC 4.4.6 issues a bogus warning for them.
4495 Fix bugs in file timestamp newness comparisons.
4496 * fileio.c (Ffile_newer_than_file_p):
4497 * lread.c (Fload): Use full timestamp resolution of files,
4498 not just the 1-second resolution, so that files that are only
4499 slightly newer still count as newer.
4500 * fileio.c (Ffile_newer_than_file_p): Don't assume file
4501 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
4503 2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
4505 * fileio.c: Improve handling of file time marker. (Bug#11852)
4506 (special_mtime): New function.
4507 (Finsert_file_contents, Fverify_visited_file_modtime):
4508 Use it to set special mtime values consistently.
4510 2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
4512 * fileio.c (Finsert_file_contents): Properly handle st_mtime
4513 marker for non-existing file. (Bug#11852)
4515 2012-07-03 Glenn Morris <rgm@gnu.org>
4517 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
4518 and did not make it into globals.h).
4520 2012-07-03 Tom Tromey <tromey@redhat.com>
4522 * window.c (Fset_window_margins, Fset_window_fringes)
4523 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
4524 * textprop.c (Fprevious_property_change): No longer static.
4525 * syntax.c (Fsyntax_table_p): No longer static.
4526 * process.c (Fget_process, Fprocess_datagram_address): No longer
4528 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
4529 * keyboard.c (Fcommand_execute): No longer static.
4531 * insdel.c (Fcombine_after_change_execute): No longer static.
4532 * image.c (Finit_image_library): No longer static.
4533 * fileio.c (Fmake_symbolic_link): No longer static.
4534 * eval.c (Ffetch_bytecode): No longer static.
4535 * editfns.c (Fuser_full_name): No longer static.
4536 * doc.c (Fdocumentation_property, Fsnarf_documentation):
4538 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
4540 * dired.c (Ffile_attributes): No longer static.
4541 * composite.c (Fcomposition_get_gstring): No longer static.
4542 * callproc.c (Fgetenv_internal): No longer static.
4544 * ccl.h: Remove EXFUNs.
4545 * buffer.h: Remove EXFUNs.
4546 * dispextern.h: Remove EXFUNs.
4547 * intervals.h: Remove EXFUNs.
4548 * fontset.h: Remove EXFUN.
4549 * font.h: Remove EXFUNs.
4550 * dosfns.c (system_process_attributes): Remove EXFUN.
4551 * keymap.h: Remove EXFUNs.
4552 * lisp.h: Remove EXFUNs.
4553 * w32term.h: Remove EXFUNs.
4554 * window.h: Remove EXFUNs.
4555 * xsettings.h: Remove EXFUN.
4556 * xterm.h: Remove EXFUN.
4558 2012-07-03 Glenn Morris <rgm@gnu.org>
4560 * lisp.h (Frandom): Make it visible to C.
4561 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
4562 buffer for invisible buffers. (Bug#1229)
4564 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
4566 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
4567 values which aren't power of 2.
4568 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro.
4569 Verify it's value and the value of VECTOR_BLOCK_SIZE. Adjust users
4572 2012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
4574 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
4576 * alloc.c (mark_object): Revert part of last patch to use `switch'.
4578 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
4580 * alloc.c (allocate_vector_block): Remove redundant
4581 calls to mallopt if DOUG_LEA_MALLOC is defined.
4582 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
4583 avoid calls to mallopt if zero_vector is returned.
4585 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
4587 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
4588 is enabled, avoid dereferencing NULL current_sblock if
4591 2012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
4593 Cleanup basic buffer management.
4594 * buffer.h (struct buffer): Change layout to use generic vector
4595 marking code. Fix some comments. Change type of 'clip_changed'
4596 to bitfield. Remove unused #ifndef old.
4597 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
4598 (GET_OVERLAYS_AT): Fix indentation.
4599 (for_each_per_buffer_object_at): New macro.
4600 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
4601 (Fbuffer_local_variables): Use it.
4602 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
4603 * alloc.c (allocate_buffer): Adjust to match new layout of
4604 struct buffer. Fix comment.
4605 (mark_overlay): New function.
4606 (mark_buffer): Use it. Use mark_vectorlike to mark normal
4607 Lisp area of struct buffer.
4608 (mark_object): Use it. Adjust marking of misc objects
4609 and related comments.
4611 2012-07-02 Paul Eggert <eggert@cs.ucla.edu>
4613 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
4614 wrapper that is not needed because the wrapped code is a no-op (zero
4615 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
4616 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
4618 2012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
4620 * alloc.c (mark_buffer): Simplify. Remove prototype.
4621 (mark_object): Add comment. Reorganize marking of vector-like
4622 objects. Use CHECK_LIVE for all vector-like objects except buffers
4623 and subroutines when GC_CHECK_MARKED_OBJECTS is defined.
4624 Avoid redundant calls to mark_vectorlike for bool vectors.
4626 2012-06-30 Glenn Morris <rgm@gnu.org>
4628 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
4630 * epaths.in (PATH_SITELOADSEARCH): New.
4631 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
4632 This is rather than relying on --enable-locallisppath elements
4633 having "site-lisp" in their names. (Bug#10208#25, 11658)
4635 2012-06-30 Eli Zaretskii <eliz@gnu.org>
4637 * w32proc.c (sys_select): Accept and ignore one more argument.
4639 * w32.c (emacs_gnutls_pull): Call select with one more argument.
4641 * sysselect.h [DOS_NT]: Don't include sys/select.h.
4642 (pselect) [!MS_DOS]: Redirect to sys_select.
4644 * sysdep.c: Don't include dos.h and dosfns.h.
4646 * process.c (sys_select):
4647 * msdos.c (sys_select): Accept one more argument and ignore it.
4649 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
4650 adapt data types and code to that.
4653 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
4654 which clashes with the gnulib function of the same name.
4656 2012-06-30 Andreas Schwab <schwab@linux-m68k.org>
4658 * font.c (font_style_to_value, font_style_symbolic)
4659 (font_prop_validate_style): Add type checks for values in
4662 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
4664 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
4667 2012-06-29 Eli Zaretskii <eliz@gnu.org>
4669 * xdisp.c (try_window_id): Undo last change.
4671 * w32.c (getwd): Adjust commentary about startup_dir.
4672 (init_environment): Always call sys_access, even in non-MSVC
4673 builds. Don't chdir to the directory of the Emacs executable.
4674 This undoes code from 1997 which was justified by the need to
4675 "avoid conflicts when removing and renaming directories". But its
4676 downside was that every relative file name was being interpreted
4677 relative to the directory of the Emacs executable, which can never
4678 be TRT. In particular, it broke sys_access when called with
4679 relative file names.
4680 (sys_access): Map GetLastError to errno.
4682 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
4684 * window.h (struct window): Change type of 'fringes_outside_margins'
4685 to bitfield. Fix comment. Adjust users accordingly.
4686 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
4688 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
4691 2012-06-29 Andreas Schwab <schwab@linux-m68k.org>
4693 * gnutls.c (emacs_gnutls_handshake):
4694 Add QUIT to make the loop interruptible.
4696 2012-06-29 Glenn Morris <rgm@gnu.org>
4698 * charset.c (init_charset): Make lack of etc/charsets fatal.
4700 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
4702 * editfns.c (region_limit): Fix type mismatch.
4704 2012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
4706 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
4707 undefined. Convert from xassert to eassert.
4708 * nsmenu.m: Convert from xassert to eassert.
4709 * nsterm.m: Likewise.
4711 2012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
4713 * editfns.c (region_limit): Clip to narrowing (bug#11770).
4715 2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
4717 Avoid integer overflow on scroll-left and scroll-right.
4718 * window.c (HSCROLL_MAX): New macro.
4719 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
4720 overflow when requested scroll falls outside ptrdiff_t range.
4722 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
4724 * window.h (struct window): Change type of 'hscroll',
4725 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
4726 'last_modified' and 'last_overlay_modified' to EMACS_INT.
4727 Adjust users accordingly.
4728 * xdisp.c (try_cursor_movement): Replace type check with eassert.
4729 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
4730 from EMACS_INT to ptrdiff_t.
4731 (make_window): Omit redundant initialization.
4733 2012-06-28 Juanma Barranquero <lekktu@gmail.com>
4735 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
4737 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
4739 * window.h (struct window): Change type of 'use_time' and
4740 'sequence_number' from Lisp_Object to int.
4741 * frame.c (make_frame): Adjust users accordingly.
4742 * print.c (print_object): Likewise.
4743 * window.c (select_window, Fwindow_use_time, make_parent_window)
4744 (make_window): Likewise.
4746 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
4748 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
4749 enabled with --enable-checking=[all,glyphs] configure option.
4750 Fix GLYPH_DEBUG usage assuming that it may be undefined,
4751 adjust comments accordingly.
4752 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
4753 undefined, adjust comments accordingly.
4754 * image.c: Likewise.
4755 * scroll.c: Likewise.
4756 * w32fns.c: Likewise.
4757 * w32term.c: Likewise.
4758 * xdisp.c: Likewise.
4759 * xfaces.c: Likewise.
4761 * xterm.c: Likewise.
4763 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
4765 Generalize run-time debugging checks.
4766 * dispextern.h (XASSERTS): Remove.
4767 * fontset.c (xassert): Remove.
4768 Convert from xassert to eassert.
4769 * alloc.c: Convert from xassert to eassert.
4771 * dispnew.c: Likewise.
4773 * fringe.c: Likewise.
4774 * ftfont.c: Likewise.
4775 * gtkutil.c: Likewise.
4776 * image.c: Likewise.
4777 * keyboard.c: Likewise.
4779 * process.c: Likewise.
4780 * scroll.c: Likewise.
4781 * sound.c: Likewise.
4783 * w32console.c: Likewise.
4784 * w32fns.c: Likewise.
4785 * w32term.c: Likewise.
4786 * window.c: Likewise.
4787 * xdisp.c: Likewise.
4788 * xfaces.c: Likewise.
4790 * xselect.c: Likewise.
4791 * xterm.c: Likewise.
4793 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
4795 * fns.c (maybe_resize_hash_table): Output message when growing the
4798 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
4800 * alloc.c (allocate_string_data): Remove dead code.
4801 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
4802 avoid GCC warning about unused macro.
4804 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
4806 * alloc.c (allocate_string): Omit intervals initialization.
4807 * alloc.c (make_uninit_multibyte_string): Initialize intervals
4808 as in make_pure_string and make_pure_c_string.
4810 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
4812 * alloc.c (allocate_string): Fix last change.
4814 2012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
4816 * alloc.c (allocate_string): Remove two redundant calls
4817 to memset, add explicit initialization where appropriate.
4819 2012-06-27 Glenn Morris <rgm@gnu.org>
4821 * lisp.mk (lisp): Remove paths.elc.
4823 2012-06-27 Chong Yidong <cyd@gnu.org>
4825 * doc.c (Fsubstitute_command_keys): Fix punctuation.
4827 2012-06-26 John Wiegley <johnw@newartisans.com>
4829 * unexmacosx.c (copy_data_segment): Add two section names used
4830 on Mac OS X Lion: __mod_init_func and __mod_term_func.
4832 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
4833 when building with Clang.
4835 2012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
4837 * eval.c (Fapply): Allow calling it with a single argument.
4839 2012-06-26 Eli Zaretskii <eliz@gnu.org>
4841 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
4842 _stricmp and _strnicmp.
4843 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
4845 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
4847 * alloc.c (allocate_window): Zero out non-Lisp part of newly
4849 (allocate_process): Likewise for new process.
4850 (allocate_terminal): Change to use offsetof.
4851 (allocate_frame): Likewise.
4852 * frame.c (make_frame): Omit redundant initialization.
4853 * window.c (make_parent_window): Use memset.
4854 (make_window): Omit redundant initialization.
4855 * process.c (make_process): Omit redundant initialization.
4856 * terminal.c (create_terminal): Likewise.
4858 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
4860 * term.c (delete_tty): Remove redundant call to memset.
4862 2012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
4864 * alloc.c: Remove build_string.
4865 * lisp.h: Define build_string as static inline. This provides
4866 a better opportunity to optimize away calls to strlen when the
4867 function is called with compile-time constant argument.
4868 * image.c (imagemagick_error): Convert to build_string.
4869 * w32proc.c (sys_spawnve): Likewise.
4870 * xterm.c (x_term_init): Likewise.
4872 2012-06-26 Paul Eggert <eggert@cs.ucla.edu>
4874 Use sprintf return value instead of invoking strlen on result.
4875 In the old days this wasn't portable, since some sprintf
4876 implementations returned char *. But they died out years ago and
4877 Emacs already assumes sprintf returns int.
4878 Similarly for float_to_string.
4879 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
4880 * ccl.c (ccl_driver):
4881 * character.c (string_escape_byte8):
4882 * data.c (Fnumber_to_string):
4883 * doprnt.c (doprnt):
4884 * print.c (print_object):
4885 * xdisp.c (message_dolog):
4886 * xfns.c (syms_of_xfns):
4887 Use sprintf or float_to_string result to avoid need to call strlen.
4888 * data.c (Fnumber_to_string):
4889 Use make_unibyte_string, since the string must be ASCII.
4890 * lisp.h, print.c (float_to_string): Now returns int length.
4891 * term.c (produce_glyphless_glyph):
4892 Use sprintf result rather than recomputing it.
4894 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
4895 * Makefile.in (ALL_CFLAGS):
4896 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
4897 * gmalloc.c, regex.c: Include <config.h> unconditionally.
4899 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
4901 * dispextern.h (xstrcasecmp): Define to library function
4902 strcasecmp if available.
4903 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
4905 2012-06-25 Andreas Schwab <schwab@linux-m68k.org>
4907 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
4908 Avoid comma operator.
4909 * menu.c (push_submenu_start, push_submenu_end)
4910 (push_left_right_boundary, push_menu_pane): Likewise.
4911 * msdos.c (dos_rawgetc): Likewise.
4913 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
4915 * xfns.c (xic_create_fontsetname): Remove redundant calls
4918 2012-06-25 Paul Eggert <eggert@cs.ucla.edu>
4920 * gtkutil.c (get_utf8_string): Remove redundant assignment.
4921 sprintf already null-terminates its output.
4923 * xfns.c (x_window): Remove redundant cast.
4925 2012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
4927 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
4928 `const char *' to `char *' to avoid compiler warning.
4930 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
4932 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
4933 instead of truncating it to 63 (admittedly a generous limit).
4935 * process.c: Fix spelling and caps in comments.
4937 2012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
4939 * emacs.c (setpgrp): Remove definition, unused.
4940 * sysdep.c (setpgrp): Remove definition, not used in this file.
4942 2012-06-24 Juanma Barranquero <lekktu@gmail.com>
4944 * makefile.w32-in: Update dependencies.
4946 2012-06-24 Eli Zaretskii <eliz@gnu.org>
4948 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
4949 (SYSTIME_H): Add nt/inc/sys/time.h.
4951 * systime.h [WINDOWSNT]: Include sys/time.h.
4953 * s/ms-w32.h (struct timespec): Definition moved from
4954 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
4956 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
4958 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
4959 * buffer.h (buffer_slot_type_mismatch):
4960 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
4961 * eval.c (unwind_to_catch):
4962 * image.c (my_png_error, my_error_exit):
4963 * keyboard.c (quit_throw_to_read_char, user_error)
4964 (Fexit_recursive_edit, Fabort_recursive_edit):
4965 * lisp.h (die, args_out_of_range, args_out_of_range_3)
4966 (wrong_type_argument, buffer_overflow, __executable_start)
4967 (memory_full, buffer_memory_full, string_overflow, Fthrow)
4968 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
4969 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
4971 (child_setup) [!DOS_NT]:
4972 * lread.c (end_of_file_error, invalid_syntax):
4973 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
4974 * puresize.h (pure_write_error):
4975 * search.c (matcher_overflow):
4976 * sound.c (sound_perror, alsa_sound_perror):
4977 * sysdep.c, syssignal.h (croak):
4978 * term.c (maybe_fatal, vfatal):
4979 * textprop.c (text_read_only):
4980 * undo.c (user_error):
4981 * unexmacosx.c (unexec_error):
4982 * xterm.c (x_ins_del_lines, x_delete_glyphs):
4983 Use _Noreturn rather than NO_RETURN.
4984 No need for separate decl merely because of _Noreturn.
4985 * sound.c (sound_warning, parse_sound):
4986 Remove unnecessary forward decls.
4988 2012-06-24 Paul Eggert <eggert@cs.ucla.edu>
4990 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
4991 * lisp.h (WAIT_READING_MAX): New macro.
4992 * dispnew.c (Fsleep_for, sit_for):
4993 * keyboard.c (kbd_buffer_get_event):
4994 * process.c (Faccept_process_output):
4995 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
4996 This improves on the previous patch, which introduced a bug
4997 when time_t is unsigned and as wide as intmax_t.
4998 See <http://bugs.gnu.org/9000#51>.
5000 2012-06-23 Eli Zaretskii <eliz@gnu.org>
5002 * dispnew.c (sit_for, Fsleep_for):
5003 * keyboard.c (kbd_buffer_get_event):
5004 * process.c (Faccept_process_output): Avoid compiler warnings when
5005 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
5007 2012-06-23 Juanma Barranquero <lekktu@gmail.com>
5009 * makefile.w32-in: Update dependencies.
5011 * w32.c (ltime): Add return type and declare static.
5012 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
5014 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
5016 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
5017 Privately reported by Herbert J. Skuhra.
5018 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
5020 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
5021 not make_lisp_timeval, when the argument is of type EMACS_TIME.
5023 2012-06-23 Eli Zaretskii <eliz@gnu.org>
5025 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
5026 last argument of make_unibyte_string.
5028 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
5029 language ID in the event parameters.
5031 * w32term.c (w32_read_socket): Put the new keyboard codepage into
5032 event.code, not the obscure "character set ID".
5034 2012-06-23 Chong Yidong <cyd@gnu.org>
5036 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
5038 2012-06-23 Eli Zaretskii <eliz@gnu.org>
5040 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
5041 * w32.c (fdutimens): New function.
5043 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
5045 * s/ms-w32.h (pselect): Redirect to sys_select.
5047 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
5049 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
5050 in the logic of incrementing and decrementing the value of
5051 use_relocatable_buffers.
5053 2012-06-23 Paul Eggert <eggert@cs.ucla.edu>
5055 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
5056 Privately reported by Herbert J. Skuhra.
5057 [__FreeBSD__]: Remove "*/" typo after "#include".
5058 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
5059 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
5060 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
5061 Don't assume EMACS_TIME and struct timeval are the same type.
5063 2012-06-22 Paul Eggert <eggert@cs.ucla.edu>
5065 Support higher-resolution time stamps (Bug#9000).
5066 The time stamps are only nanosecond-resolution at the C level,
5067 since that's the best that any real-world system supports now.
5068 But they are picosecond-resolution at the Lisp level, as that's
5069 easy, and leaves room for future OS improvements.
5071 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
5074 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
5075 Don't get current time unless it's needed.
5077 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
5078 now provides it if it's absent.
5079 (start_atimer): Port to higher-res time stamps.
5080 Check for time stamp overflow. Don't get current time more
5081 often than is needed.
5083 * buffer.h (struct buffer): Buffer modtime now has high resolution.
5084 Include systime.h, not time.h.
5085 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
5087 * dired.c: Include stat-time.h.
5088 (Ffile-attributes): File times now have higher resolution.
5090 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
5091 (struct image): Timestamp now has higher resolution.
5093 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
5094 has at least microseconds now. All uses removed.
5095 (update_frame, update_single_window, update_window, update_frame_1)
5096 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
5097 (duration_to_sec_usec): Remove; no longer needed.
5099 * editfns.c (time_overflow): Now extern.
5100 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
5101 (float-time, Fformat_time_string, Fcurrent_time_string)
5102 (Fcurrent_time_zone): Accept and generate higher-resolution
5104 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
5105 (decode_time_components, lisp_seconds_argument): New functions.
5106 (make_time): Now static.
5107 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
5108 Report an error if the time is invalid, rather than having the caller
5111 * fileio.c: Include <stat-time.h>
5112 (Fcopy_file): Copy higher-resolution time stamps.
5113 Prefer to set the time stamp via a file descriptor if that works.
5114 (Fset_file_times, Finsert_file_contents, Fwrite_region)
5115 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
5116 (Fvisited_file_modtime, Fset_visited_file_modtime):
5117 Support higher-resolution time stamps.
5119 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
5121 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
5123 * image.c (prepare_image_for_display, clear_image_cache)
5124 (lookup_image): Port to higer-resolution time stamps.
5126 * keyboard.c (start_polling, bind_polling_period):
5127 Check for time stamp overflow.
5128 (read_char, kbd_buffer_get_event, timer_start_idle)
5129 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
5130 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
5131 Port to higher-resolution time stamps. Do not assume time_t is signed.
5132 (decode_timer): New function. Timers are now vectors of length 9,
5133 not 8, to accommodate the picosecond component.
5134 (timer_check_2): Use it.
5136 * nsterm.m (select_timeout, timeval_subtract): Remove.
5137 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
5138 as they're a bit more accurate and handle overflow better.
5139 (ns_select): Change prototype to be compatible with pselect.
5140 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
5141 * nsterm.h (ns_select): Adjust prototype.
5143 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
5144 us-resolution time stamps.
5145 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
5147 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
5149 * lisp.h (time_overflow): New decl.
5150 (wait_reading_process_output): First arg is now intmax_t, not int,
5151 to accommodate larger waits.
5153 * process.h (struct Lisp_Process.read_output_delay):
5154 Now counts nanoseconds, not microseconds.
5155 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
5157 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
5158 (wait_reading_process_output):
5159 Port to ns-resolution time stamps.
5160 (Faccept_process_output, wait_reading_process_output):
5161 Check for time stamp overflow. Do not assume time_t is signed.
5162 (select_wrapper): Remove; we now use pselect.
5163 (Fprocess_attributes): Now generates ns-resolution time stamps.
5165 * sysdep.c: Include utimens.h. Don't include utime.h
5166 or worry about struct utimbuf; gnulib does that for us now.
5167 (gettimeofday): Remove; gnulib provides a substitute.
5168 (make_timeval): New function.
5169 (set_file_times): Now sets ns-resolution time stamps.
5170 New arg FD; all uses changed.
5171 (time_from_jiffies, ltime_from_jiffies, get_up_time)
5172 (system_process_attributes):
5173 Now returns ns-resolution time stamp. All uses changed.
5174 Check for time stamp overflow.
5176 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
5177 provides a substitute now.
5179 * systime.h: Include timespec.h rather than sys/time.h and time.h,
5180 since it guarantees struct timespec.
5181 (EMACS_TIME): Now struct timespec, so that we can support
5182 ns-resolution time stamps.
5183 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
5184 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
5185 (EMACS_USECS): Remove.
5186 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
5187 so multiply the arg by 1000 before storing it.
5188 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
5190 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
5191 Port to ns-resolution time stamps.
5192 (EMACS_TIME_NEG_P): Remove; replaced by....
5193 (EMACS_TIME_SIGN): New macro.
5194 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
5195 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
5196 (set_file_times, make_time, lisp_time_argument): Adjust signature.
5197 (make_timeval, make_lisp_time, decode_time_components): New decls.
5198 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
5199 that it mishandled time_t overflow. You can't compare by subtracting!
5200 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
5201 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
5203 * term.c: Include <sys/time.h>.
5204 (timeval_to_Time): New function, for proper overflow wraparound.
5205 (term_mouse_position, term_mouse_click): Use it.
5207 * undo.c (record_first_change): Support higher-resolution time stamps
5209 (Fprimitive_undo): Use them when restoring time stamps.
5211 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
5212 (w32_get_internal_run_time):
5213 Port to higher-resolution Emacs time stamps.
5214 (ltime): Now accepts single 64-bit integer, as that's more convenient
5217 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
5219 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
5220 for compatibility with pselect. Support ns-resolution time stamps.
5222 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
5224 * xselect.c (wait_for_property_change, x_get_foreign_selection):
5225 Check for time stamp overflow, and support ns-resolution time stamps.
5227 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
5228 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
5229 (timeval_subtract): Remove; no longer needed.
5230 (XTflash, XTring_bell, x_wait_for_event):
5231 Port to ns-resolution time stamps. Don't assume time_t is signed.
5233 2012-06-22 Chong Yidong <cyd@gnu.org>
5235 * xdisp.c (x_consider_frame_title): Revert last change.
5237 2012-06-22 Eli Zaretskii <eliz@gnu.org>
5239 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
5240 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
5241 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
5242 staticidx goes up to 1597 out of 1600 = 0x640.)
5244 2012-06-20 Paul Eggert <eggert@cs.ucla.edu>
5246 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
5247 Otherwise, the umask might be mistakenly 0 while handling input signals.
5249 2012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
5251 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
5253 2012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
5255 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
5256 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
5257 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
5258 access to `contents' member of Lisp_Vector objects with AREF and ASET
5261 2012-06-19 Chong Yidong <cyd@gnu.org>
5263 * frame.c (delete_frame): When selecting a frame on a different
5264 text terminal, do not alter the terminal's top-frame.
5266 * xdisp.c (format_mode_line_unwind_data): Record the target
5267 frame's selected window and its terminal's top-frame.
5268 (unwind_format_mode_line): Restore them.
5269 (x_consider_frame_title, display_mode_line, Fformat_mode_line):
5271 (x_consider_frame_title): Do not condition on HAVE_WINDOW_SYSTEM,
5272 since tty frames can be explicitly named.
5273 (prepare_menu_bars): Likewise.
5275 * term.c (Ftty_top_frame): New function.
5277 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
5279 Port byte-code-meter to modern targets.
5280 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
5281 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
5282 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
5283 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
5284 (METER_1, METER_2): Simplify.
5286 2012-06-18 Stefan Monnier <monnier@iro.umontreal.ca>
5288 * data.c (Fdefalias): Return `symbol' (bug#11686).
5290 2012-06-18 Martin Rudalics <rudalics@gmx.at>
5292 * buffer.c (Fkill_buffer): Don't throw an error when the buffer
5293 gets killed during executing of this function (Bug#11665).
5294 Try to always return Qt when the buffer has been actually killed.
5295 (Vkill_buffer_query_functions): In doc-string say that functions
5296 run by this hook should not change the current buffer.
5298 2012-06-18 Paul Eggert <eggert@cs.ucla.edu>
5300 Fix recently-introduced process.c problems found by static checking.
5301 * process.c (write_queue_push, write_queue_pop, send_process):
5302 Use ptrdiff_t, not int or EMACS_INT, for buffer lengths and offsets.
5303 (write_queue_pop): Fix pointer signedness problem.
5304 (send_process): Remove unused local.
5306 2012-06-17 Chong Yidong <cyd@gnu.org>
5308 * xdisp.c (redisplay_internal): No need to redisplay terminal
5309 frames that are not on top.
5311 2012-06-17 Troels Nielsen <bn.troels@gmail.com>
5313 * process.c (make_process): Initialize write_queue.
5314 (write_queue_push, write_queue_pop): New functions.
5315 (send_process): Use them to maintain correct ordering of process
5318 2012-06-17 Paul Eggert <eggert@cs.ucla.edu>
5320 * lisp.h (eassert): Assume C89 or later.
5321 This removes the need for CHECK.
5322 (CHECK): Remove. Its comments about always evaluating its
5323 argument were confusing, as 'eassert' typically does not evaluate
5326 * coding.c (produce_chars): Use ptrdiff_t, not int.
5328 * xterm.c (x_draw_underwave): Check for integer overflow.
5329 This pacifies gcc 4.7.0 -Wunsafe-loop-optimizations on x86-64.
5331 2012-06-17 Jan Djärv <jan.h.d@swipnet.se>
5333 * nsterm.m (x_free_frame_resources): Move xfree so freed memory isn't
5334 referenced (Bug#11583).
5336 2012-06-16 Aurelien Aptel <aurelien.aptel@gmail.com>
5338 Implement wave-style variant of underlining.
5339 * dispextern.h (face_underline_type): New enum.
5340 (face): Add field for underline type.
5341 * nsterm.m (ns_draw_underwave): New function.
5342 (ns_draw_text_decoration): Use it.
5343 * w32term.c (w32_restore_glyph_string_clip, w32_draw_underwave):
5345 (x_draw_glyph_string): Use them.
5346 * xfaces.c (Qline, Qwave): New Lisp objects.
5347 (check_lface_attrs, merge_face_ref)
5348 (Finternal_set_lisp_face_attribute, realize_x_face):
5349 Handle wave-style underline face attributes.
5350 * xterm.c (x_draw_underwave): New function.
5351 (x_draw_glyph_string): Use it.
5353 2012-06-16 Juanma Barranquero <lekktu@gmail.com>
5355 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/fringe.$(O))
5356 ($(BLD)/xml.$(O), $(BLD)/intervals.$(O), $(BLD)/macros.$(O))
5357 ($(BLD)/minibuf.$(O), $(BLD)/regex.$(O), $(BLD)/region-cache.$(O))
5358 ($(BLD)/textprop.$(O), $(BLD)/undo.$(O), $(BLD)/window.$(O))
5359 ($(BLD)/w32select.$(O)): Update dependencies.
5361 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
5363 * buffer.h (FETCH_MULTIBYTE_CHAR): Define as inline.
5364 (BUF_FETCH_MULTIBYTE_CHAR): Likewise.
5365 * character.c (_fetch_multibyte_char_p): Remove.
5366 * alloc.c: Include "character.h" before "buffer.h".
5368 * buffer.c: Likewise.
5369 * bytecode.c: Likewise.
5370 * callint.c: Likewise.
5371 * callproc.c: Likewise.
5372 * casefiddle.c: Likewise.
5373 * casetab.c: Likewise.
5374 * category.c: Likewise.
5376 * coding.c: Likewise.
5377 * composite.c: Likewise.
5378 * dired.c: Likewise.
5379 * dispnew.c: Likewise.
5381 * dosfns.c: Likewise.
5382 * editfns.c: Likewise.
5383 * emacs.c: Likewise.
5384 * fileio.c: Likewise.
5385 * filelock.c: Likewise.
5387 * fontset.c: Likewise.
5388 * fringe.c: Likewise.
5389 * indent.c: Likewise.
5390 * insdel.c: Likewise.
5391 * intervals.c: Likewise.
5392 * keyboard.c: Likewise.
5393 * keymap.c: Likewise.
5394 * lread.c: Likewise.
5395 * macros.c: Likewise.
5396 * marker.c: Likewise.
5397 * minibuf.c: Likewise.
5398 * nsfns.m: Likewise.
5399 * nsmenu.m: Likewise.
5400 * print.c: Likewise.
5401 * process.c: Likewise.
5402 * regex.c: Likewise.
5403 * region-cache.c: Likewise.
5404 * search.c: Likewise.
5405 * syntax.c: Likewise.
5407 * textprop.c: Likewise.
5409 * unexsol.c: Likewise.
5410 * w16select.c: Likewise.
5411 * w32fns.c: Likewise.
5412 * w32menu.c: Likewise.
5413 * window.c: Likewise.
5414 * xdisp.c: Likewise.
5416 * xmenu.c: Likewise.
5418 * xselect.c: Likewise.
5420 2012-06-16 Eli Zaretskii <eliz@gnu.org>
5422 * xdisp.c (set_cursor_from_row): Don't dereference glyphs_end.
5423 If all the glyphs of the glyph row came from strings, and we have no
5424 cursor positioning clues, put the cursor on the first glyph of the
5426 (handle_face_prop): Use chunk-relative overlay string index when
5427 indexing into it->string_overlays array. (Bug#11653)
5428 (set_cursor_from_row): Use the leftmost glyph as GLYPH_BEFORE, not
5429 the rightmost. (Bug#11720)
5431 2012-06-16 Andreas Schwab <schwab@linux-m68k.org>
5433 * category.h (CHAR_HAS_CATEGORY): Define as inline.
5434 (CATEGORY_MEMBER): Enforce 1/0 value.
5435 * category.c (_temp_category_set): Remove.
5437 2012-06-16 Eli Zaretskii <eliz@gnu.org>
5439 * window.c (Fdelete_other_windows_internal)
5440 (Fdelete_window_internal): Don't access frame's mouse highlight
5441 info of the initial frame. (Bug#11677)
5443 2012-06-14 Paul Eggert <eggert@cs.ucla.edu>
5445 * .gdbinit (xgetint): Fix recently-introduced paren typo.
5446 Assume USE_2_TAGS_FOR_INTS.
5447 (xreload): Adjust $tagmask width to match recent lisp.h change.
5449 Simplify lisp.h in minor ways that should not affect code.
5450 * lisp.h (USE_2_TAGS_FOR_INTS): Remove, as it was always defined.
5451 (LISP_INT_TAG, case_Lisp_Int, LISP_STRING_TAG, LISP_INT_TAG_P)
5452 (LISP_INT1_TAG, enum Lisp_Type, XINT, XUINT, make_number):
5453 Simplify under the assumption that USE_2_TAGS_FOR_INTS is defined.
5454 (INTTYPEBITS): New macro, for clarity.
5455 (INTMASK, MOST_POSITIVE_FIXNUM): Use it.
5456 (LISP_INT1_TAG, LISP_STRING_TAG, LISP_INT_TAG_P):
5457 Simplify now that USE_LSB_TAG is always defined.
5458 (TYPEMASK, XINT) [USE_LSB_TAG]: Remove unnecessary cast.
5459 (make_number) [!USE_LSB_TAG]: Use INTMASK; that's simpler.
5461 2012-06-13 Juanma Barranquero <lekktu@gmail.com>
5463 * makefile.w32-in ($(BLD)/data.$(O)): Update dependencies.
5465 2012-06-13 Glenn Morris <rgm@gnu.org>
5467 * s/bsd-common.h (BSD4_3):
5468 * s/usg5-4-common.h (USG5_4): No longer define; unused.
5470 2012-06-13 Andreas Schwab <schwab@linux-m68k.org>
5472 * lisp.h (Lisp_Object) [CHECK_LISP_OBJECT_TYPE]: Define as struct
5475 (XHASH, XTYPE, XINT, XUINT, make_number, XSET, XPNTR, XUNTAG):
5477 * emacs.c (gdb_use_struct): Rename from gdb_use_union.
5478 * .gdbinit: Check gdb_use_struct instead of gdb_use_union.
5479 * alloc.c (widen_to_Lisp_Object): Remove.
5480 (mark_memory): Use XIL instead of widen_to_Lisp_Object.
5481 * frame.c (delete_frame): Remove outdated comment.
5482 * w32fns.c (Fw32_register_hot_key): Use XLI instead of checking
5483 USE_LISP_UNION_TYPE.
5484 (Fw32_unregister_hot_key): Likewise.
5485 (Fw32_toggle_lock_key): Likewise.
5486 * w32menu.c (add_menu_item): Likewise.
5487 (w32_menu_display_help): Use XIL instead of checking
5488 USE_LISP_UNION_TYPE.
5489 * w32heap.c (allocate_heap): Don't check USE_LISP_UNION_TYPE.
5490 (init_heap): Likewise.
5491 * w32term.c (w32_read_socket): Update comment.
5493 2012-06-13 Glenn Morris <rgm@gnu.org>
5495 * s/usg5-4-common.h, src/s/unixware.h:
5496 Remove define/undef of HAVE_SYSV_SIGPAUSE (not used since 2010-05-04).
5498 * s/gnu.h (POSIX_SIGNALS): Remove (not used since 2010-05-04).
5500 2012-06-13 Paul Eggert <eggert@cs.ucla.edu>
5502 USE_LISP_UNION_TYPE + USE_LSB_TAG cleanup (Bug#11604)
5503 * alloc.c (make_number) [!defined make_number]:
5504 Remove, as lisp.h always defines this now.
5505 (mark_maybe_pointer): Simplify since USE_LSB_TAG is always defined now.
5506 (roundup_size): Verify that it is a power of 2.
5507 * data.c (Fmake_variable_buffer_local, Fmake_local_variable):
5508 * ftfont.c (ftfont_driver): Use LISP_INITIALLY_ZERO.
5509 * lisp.h (USE_LSB_TAG): Allow the builder to compile with
5510 -DUSE_LSB_TAG=0, to override the automatically-selected default.
5511 USE_LSB_TAG now is always defined to be either 0 or 1.
5513 (union Lisp_Object): Don't worry about WORDS_BIGENDIAN; the
5514 code works fine either way, and efficiency is not a concern here,
5515 as the union type is for debugging, not for production.
5516 (LISP_MAKE_RVALUE, make_number) [USE_LISP_UNION_TYPE]:
5517 Use an inline function on all platforms when using the union type,
5518 since this is simpler and 'static inline' can be used portably
5520 (LISP_INITIALLY_ZERO): New macro.
5521 (XFASTINT, XSETFASTINT) [USE_LISP_UNION_TYPE]: Remove.
5522 (XSET) [USE_LISP_UNION_TYPE]: Don't overparenthesize.
5524 2012-06-12 Glenn Morris <rgm@gnu.org>
5526 * s/gnu-kfreebsd.h, s/hpux11.h, s/openbsd.h, s/sol2-10.h: Remove files.
5528 * s/gnu-linux.h (HAVE_PROCFS): Move to configure.
5530 * s/hpux10-20.h, s/openbsd.h, s/usg5-4-common.h:
5531 Move BROKEN_SIGIO to configure.
5533 * s/bsd-common.h, s/darwin.h, s/gnu-kfreebsd.h, s/hpux10-20.h:
5534 Move NO_TERMIO to configure.
5536 2012-06-12 Chong Yidong <cyd@gnu.org>
5538 * image.c (imagemagick_load_image): Use MagickFlattenImage if
5539 MagickMergeImageLayers is undefined. Use pixel pusher loop if
5540 MagickExportImagePixels is undefined.
5542 2012-06-12 Paul Eggert <eggert@cs.ucla.edu>
5544 * image.c (imagemagick_load_image): Remove unused label.
5546 2012-06-11 Glenn Morris <rgm@gnu.org>
5548 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
5549 * s/gnu-kfreebsd.h, s/gnu-linux.h, s/gnu.h, s/hpux10-20.h:
5550 * s/irix6-5.h, s/ms-w32.h, s/msdos.h, s/template.h:
5551 * s/usg5-4-common.h: Move SYSTEM_TYPE to configure.
5553 2012-06-11 Stefan Monnier <monnier@iro.umontreal.ca>
5555 * alloc.c (make_byte_code): New function.
5556 (Fmake_byte_code): Use it. Don't purify here.
5557 * lread.c (read1): Use it as well to avoid extra allocation.
5559 2012-06-11 Chong Yidong <cyd@gnu.org>
5561 * image.c (imagemagick_load_image): Implement transparency.
5563 2012-06-10 Andreas Schwab <schwab@linux-m68k.org>
5565 * regex.c (at_begline_loc_p): Also recognize `(?N:' and correctly
5566 account for preceding backslashes. (Bug#11663)
5568 2012-06-09 Chong Yidong <cyd@gnu.org>
5570 * term.c: Support italics in capable terminals (Bug#9652).
5571 (no_color_bit): Replace unused NC_BLINK with NC_ITALIC.
5572 (turn_on_face): Output using TS_enter_italic_mode if available.
5573 Don't handle unused blinking and alt-charset cases.
5574 (turn_off_face): Handle italic case; discard unused tty_blinking_p
5575 and tty_alt_charset_p cases.
5576 (tty_capable_p, init_tty): Support italics.
5578 * termchar.h (struct tty_display_info): Add field for italics.
5579 Remove unused blink field.
5581 * xfaces.c (tty_supports_face_attributes_p, realize_tty_face):
5584 * dispextern.h: Replace unused TTY_CAP_BLINK with TTY_CAP_ITALIC.
5585 (struct face): Remove unused fields tty_dim_p, tty_blinking_p, and
5586 tty_alt_charset_p. Add tty_italic_p.
5588 2012-06-09 Michael Albinus <michael.albinus@gmx.de>
5590 * dbusbind.c (XD_BASIC_DBUS_TYPE): Use dbus_type_is_valid and
5591 dbus_type_is_basic if available.
5592 (xd_extract_signed, xd_extract_unsigned): Rename from
5593 extract_signed and extract_unsigned, respectively. Adapt callers.
5595 2012-06-09 Chong Yidong <cyd@gnu.org>
5597 * xfaces.c (face_for_overlay_string): Handle face remapping (Bug#2066).
5599 * fringe.c (Fset_fringe_bitmap_face): Handle the noninteractive
5602 2012-06-08 Paul Eggert <eggert@cs.ucla.edu>
5604 * xdisp.c (vmessage): Treat frame message as multibyte.
5605 Without this change, (let ((§ 1)) (make-variable-buffer-local '§))
5606 would generate the diagnostic "Making \302\247 buffer-local while
5609 2012-06-08 Eli Zaretskii <eliz@gnu.org>
5611 * dispnew.c (showing_window_margins_p): Undo last change, which
5612 was done due to an inadvertent commit.
5613 (adjust_frame_glyphs_for_frame_redisplay): Do call
5614 showing_window_margins_p.
5616 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
5618 * eval.c (Fmake_var_non_special): New primitive.
5619 (syms_of_eval): Defsubr it.
5620 * lread.c (syms_of_lread): Mark `values' as lexically scoped.
5622 2012-06-08 Juanma Barranquero <lekktu@gmail.com>
5624 * dispnew.c (showing_window_margins_p): Wrap in #if 0 to prevent unused
5625 function warning (the only call is inside #if 0 since 2012-06-08T08:44:45Z!eliz@gnu.org).
5627 2012-06-08 Eli Zaretskii <eliz@gnu.org>
5629 * alloc.c (allocate_vectorlike): Fix last change.
5631 2012-06-08 Dmitry Antipov <dmantipov@yandex.ru>
5633 Block-based vector allocation of small vectors.
5634 * lisp.h (struct vectorlike_header): New field `nbytes',
5635 adjust comment accordingly.
5636 * alloc.c (enum mem_type): New type `MEM_TYPE_VECTOR_BLOCK'
5637 to denote vector blocks. Adjust users (live_vector_p,
5638 mark_maybe_pointer, valid_lisp_object_p) accordingly.
5639 (COMMON_MULTIPLE): Move outside #if USE_LSB_TAG.
5640 (VECTOR_BLOCK_SIZE, vroundup, VECTOR_BLOCK_BYTES),
5641 (VBLOCK_BYTES_MIN, VBLOCK_BYTES_MAX, VECTOR_MAX_FREE_LIST_INDEX),
5642 (VECTOR_FREE_LIST_FLAG, ADVANCE, VINDEX, SETUP_ON_FREE_LIST),
5643 (VECTOR_SIZE, VECTOR_IN_BLOCK): New macros.
5644 (roundup_size): New constant.
5645 (struct vector_block): New data type.
5646 (vector_blocks, vector_free_lists, zero_vector): New variables.
5647 (all_vectors): Rename to `large_vectors'.
5648 (allocate_vector_from_block, init_vectors, allocate_vector_from_block)
5649 (sweep_vectors): New functions.
5650 (allocate_vectorlike): Return `zero_vector' as the only vector of
5651 0 items. Allocate new vector from block if vector size is less than
5652 or equal to VBLOCK_BYTES_MAX.
5653 (Fgarbage_collect): Move all vector sweeping code to sweep_vectors.
5654 (init_alloc_once): Add call to init_vectors.
5656 2012-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
5658 * eval.c (Fmacroexpand): Stop if the macro returns the same form.
5660 2012-06-07 Paul Eggert <eggert@cs.ucla.edu>
5662 * doprnt.c (doprnt): Truncate multibyte char correctly.
5663 Without this change, doprnt (buf, 2, "%s", FORMAT_END, AP)
5664 would mishandle a string argument "Xc" if X was a multibyte
5665 character of length 2: it would truncate after X's first byte
5666 rather than including all of X.
5668 2012-06-06 Chong Yidong <cyd@gnu.org>
5670 * buffer.c (word_wrap): Doc fix.
5672 2012-06-04 Paul Eggert <eggert@cs.ucla.edu>
5674 * xdisp.c (note_mode_line_or_margin_highlight): Pacify gcc -Wall.
5676 2012-06-03 Glenn Morris <rgm@gnu.org>
5678 * xdisp.c (tool-bar-style): Doc fix.
5680 2012-06-03 Ulrich Müller <ulm@gentoo.org>
5682 * Makefile.in (PAXCTL): Define.
5683 (temacs$(EXEEXT)): Disable memory randomization for the temacs
5684 binary via PaX flags if the paxctl utility is available.
5685 (emacs$(EXEEXT), bootstrap-emacs$(EXEEXT)):
5686 Restore PaX flags to their default. (Bug#11398)
5688 2012-06-03 Chong Yidong <cyd@gnu.org>
5690 * xdisp.c (decode_mode_spec_coding): Display a space for a unibyte
5693 2012-06-03 Chong Yidong <cyd@gnu.org>
5695 * xdisp.c (calc_pixel_width_or_height): Use Fbuffer_local_value.
5696 (note_mode_line_or_margin_highlight): If there is no help echo,
5697 use mode-line-default-help-echo. Handle the case where the mouse
5698 position is past the end of the mode line string.
5700 * buffer.c (buffer_local_value_1): New function, split from
5701 Fbuffer_local_value; can return Qunbound.
5702 (Fbuffer_local_value): Use it.
5703 (Vmode_line_format): Docstring tweaks.
5705 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
5707 * sysdep.c (system_process_attributes): Improve comment.
5709 2012-06-02 Stefan Monnier <monnier@iro.umontreal.ca>
5711 * keyboard.c: Export real-this-command to Elisp.
5712 (syms_of_keyboard): Rename real_this_command to Vreal_this_command
5713 and DEFVAR it. Update all users.
5715 2012-06-02 Paul Eggert <eggert@cs.ucla.edu>
5717 * minibuf.c (Fassoc_string): Remove duplicate declaration.
5719 * sysdep.c (system_process_attributes) [SOLARIS2 && HAVE_PROCFS]:
5720 Convert pctcpu and pctmem to Lisp float properly.
5721 Let the compiler fold better, as 100.0/0x8000 is exact.
5723 2012-06-02 Andreas Schwab <schwab@linux-m68k.org>
5725 * alloc.c (CONS_BLOCK_SIZE): Account for padding at the end of
5728 2012-06-01 Paul Eggert <eggert@cs.ucla.edu>
5730 * xfns.c (x_set_tool_bar_lines) [USE_GTK]: Adjust to bitfield change.
5732 2012-06-01 Dmitry Antipov <dmantipov@yandex.ru>
5734 For a 'struct window', replace some Lisp_Object fields to
5735 bitfields where appropriate, remove unused fields.
5736 * window.h (struct window): Remove unused 'last_mark_x' and
5737 'last_mark_y' fields. Rename 'mini_p' field to 'mini',
5738 change it's type from Lisp_Object to bitfield.
5739 Change type of 'force_start', 'optional_new_start',
5740 'last_had_star', 'update_mode_line' and 'start_at_line_beg'
5741 fields from Lisp_Object to bitfield. Adjust users accordingly.
5743 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
5745 Pacify gcc -Wdouble-precision when using Xaw.
5746 * xterm.c (xaw_jump_callback, x_set_toolkit_scroll_bar_thumb)
5747 [HAVE_X_WINDOWS && USE_TOOLKIT_SCROLL_BARS && !USE_MOTIF && !USE_GTK]:
5748 Use 'float' consistently, rather than 'float' in most places
5749 and 'double' in a couple of places.
5751 2012-05-31 Eli Zaretskii <eliz@gnu.org>
5753 * xdisp.c (handle_stop): Detect whether we have overlay strings
5754 loaded by testing it->current.overlay_string_index to be
5755 non-negative, instead of checking whether n_overlay_strings is
5756 positive. (Bug#11587)
5758 2012-05-31 Chong Yidong <cyd@gnu.org>
5760 * keymap.c (describe_map_tree): Revert 2011-07-07 change (Bug#1169).
5762 * doc.c (Fsubstitute_command_keys): Doc fix.
5764 2012-05-31 Eli Zaretskii <eliz@gnu.org>
5766 * search.c (search_buffer): Remove calls to
5767 r_alloc_inhibit_buffer_relocation, as it is now called by
5768 maybe_unify_char, which was the cause of relocation of buffer text
5771 2012-05-31 Eli Zaretskii <eliz@gnu.org>
5773 * charset.c (maybe_unify_char): Inhibit relocation of buffer text
5774 for the duration of call to load_charset, to avoid problems with
5775 callers of maybe_unify_char that access buffer text through C
5778 * ralloc.c (r_alloc_inhibit_buffer_relocation): Increment and
5779 decrement the inhibition flag, instead of just setting or
5782 2012-05-31 Paul Eggert <eggert@cs.ucla.edu>
5784 Remove obsolete '#define static' cruft.
5785 * s/hpux10-20.h (_FILE_OFFSET_BITS): Don't #undef.
5786 This #undef was "temporary" in 2000; it is no longer needed
5787 now that '#define static' has gone away.
5788 * xfns.c, xterm.h (gray_bitmap_width, gray_bitmap_height)
5789 (gray_bitmap_bits): Remove; no longer needed.
5790 All uses replaced with definiens.
5791 * xterm.c: Include "bitmaps/gray.xbm".
5793 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
5795 Clean up __executable_start, monstartup when --enable-profiling.
5796 The following changes affect the code only when profiling.
5797 * dispnew.c (__executable_start): Rename from safe_bcopy.
5798 Define only on platforms that need it.
5799 * emacs.c: Include <sys/gmon.h> when profiling.
5800 (_mcleanup): Remove decl, since <sys/gmon.h> does it now.
5801 (__executable_start): Remove decl, since lisp.h does it now.
5802 (safe_bcopy): Remove decl; no longer has that name.
5803 (main): Coalesce #if into single bit of code, for simplicity.
5804 Cast pointers to uintptr_t, since standard libraries want integers
5806 * lisp.h (__executable_start): New decl.
5808 2012-05-31 Glenn Morris <rgm@gnu.org>
5810 * image.c (Fimagemagick_types): Doc fix.
5812 2012-05-30 Jim Meyering <meyering@redhat.com>
5814 * callproc.c (Fcall_process_region): Include directory component
5815 in mkstemp error message (Bug#11586).
5817 2012-05-30 Paul Eggert <eggert@cs.ucla.edu>
5819 * alloc.c, lisp.h (make_pure_vector): Now static.
5821 2012-05-30 Stefan Monnier <monnier@iro.umontreal.ca>
5823 * eval.c (Fdefun, Fdefmacro, Vmacro_declaration_function):
5824 Move to byte-run.el.
5825 (Fautoload): Do the hash-doc more carefully.
5826 * data.c (Fdefalias): Purify definition, except for keymaps.
5827 (Qdefun): Move from eval.c.
5828 * lisp.h (Qdefun): Remove.
5829 * lread.c (read1): Tiny simplification.
5831 2012-05-29 Troels Nielsen <bn.troels@gmail.com>
5833 Do not create empty overlays with the evaporate property (Bug#9642).
5834 * buffer.c (Fmove_overlay): Reinstate the earlier fix for
5835 Bug#9642, but explicitly check that the buffer the overlay would
5836 be moved to is live and rearrange lines to make sure that errors
5837 will not put the overlay in an inconsistent state.
5838 (Fdelete_overlay): Cosmetics.
5840 2012-05-28 Eli Zaretskii <eliz@gnu.org>
5842 * w32term.c (my_bring_window_to_top): New function.
5843 (x_raise_frame): Use handle returned by DeferWindowPos, which
5844 could be different from the original one.
5845 Call my_bring_window_to_top instead of my_set_foreground_window.
5848 * w32fns.c (w32_wnd_proc): Accept and process WM_EMACS_BRINGTOTOP
5849 by calling BringWindowToTop.
5851 * w32term.h (WM_EMACS_BRINGTOTOP): New message.
5852 (WM_EMACS_END): Increase by one.
5854 2012-05-28 Paul Eggert <eggert@cs.ucla.edu>
5856 * bidi.c (bidi_mirror_char): Put eassert before conversion to int.
5857 This avoids undefined behavior that might cause the eassert
5858 to not catch an out-of-range value.
5860 2012-05-28 Juanma Barranquero <lekktu@gmail.com>
5862 * makefile.w32-in ($(BLD)/w32inevt.$(O), $(BLD)/w32console.$(O)):
5863 Update dependencies.
5865 2012-05-27 Eli Zaretskii <eliz@gnu.org>
5867 * bidi.c (bidi_mirror_char): Fix last change.
5869 2012-05-27 Andreas Schwab <schwab@linux-m68k.org>
5871 * unexmacosx.c (copy_data_segment): Truncate after 16 characters
5872 when referring to sectname field in printf format.
5874 2012-05-27 Paul Eggert <eggert@cs.ucla.edu>
5876 * lisp.h [REL_ALLOC]: Omit duplicate prototypes.
5877 Only r_alloc_inhibit_buffer_relocation needed to be added;
5878 the others were already declared.
5880 * bidi.c (bidi_mirror_char): Don't possibly truncate the integer
5881 before checking whether it's out of range. Put the check inside
5883 <http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00485.html>.
5885 2012-05-27 Ken Brown <kbrown@cornell.edu>
5887 * callproc.c (Fcall_process): Restore a line that was accidentally
5888 commented out in the 2011-02-13 change (bug#11547).
5890 2012-05-27 Eli Zaretskii <eliz@gnu.org>
5892 * lisp.h [REL_ALLOC]: Add prototypes for external functions
5893 defined on ralloc.c.
5895 * buffer.c [REL_ALLOC]: Remove prototypes of
5896 r_alloc_reset_variable, r_alloc, r_re_alloc, and r_alloc_free,
5897 they are now on lisp.h.
5899 * ralloc.c (r_alloc_inhibit_buffer_relocation): New function.
5901 * search.c (search_buffer): Use it to inhibit relocation of buffer
5902 text while re_search_2 is doing its job, because re_search_2 is
5903 passed C pointers to buffer text. (Bug#11519)
5905 * msdos.c (internal_terminal_init) <Vwindow_system_version>:
5908 * xdisp.c (move_it_to): Under MOVE_TO_Y, when restoring iterator
5909 state after an additional call to move_it_in_display_line_to, keep
5910 the values of it->max_ascent and it->max_descent found for the
5912 (pos_visible_p): Revert the comparison against bottom_y to what it
5913 was in revid eliz@gnu.org-20120513182235-4p6386j761ld0nwb.
5916 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
5918 Fix coding-related core dumps with gcc -ftrapv.
5919 The code was computing A - B, where A and B are pointers, and B is
5920 random garbage. This can lead to core dumps on platforms that
5921 have special pointer registers, and it also leads to core dumps on
5922 x86-64 when compiled with gcc -ftrapv. The fix is to compute
5923 A - B only when B is initialized properly.
5924 * coding.c (coding_set_source, coding_set_destination): Return void.
5925 (coding_change_source, coding_change_destinations): New functions,
5926 with the old behaviors of coding_set_source and coding_set_destination.
5927 All callers that need an offset changed to use these new functions.
5929 2012-05-26 Glenn Morris <rgm@gnu.org>
5931 * nsterm.m (ns_init_paths): Don't mess with INFOPATH. (Bug#2791)
5933 2012-05-26 Eli Zaretskii <eliz@gnu.org>
5935 Extend mouse support on W32 text-mode console.
5936 * xdisp.c (draw_row_with_mouse_face):
5937 Call tty_draw_row_with_mouse_face for WINDOWSNT as well.
5939 * w32console.c: Include window.h.
5940 (w32con_write_glyphs_with_face, tty_draw_row_with_mouse_face):
5942 (initialize_w32_display): Initialize mouse-highlight data.
5944 * w32inevt.c: Include termchar.h and window.h.
5945 (do_mouse_event): Support mouse-autoselect-window. When the mouse
5946 moves, call note_mouse_highlight. If help_echo changed, call
5947 gen_help_event to produce help-echo message in the echo area.
5948 Call clear_mouse_face if mouse_face_hidden is set in the mouse
5951 2012-05-26 Paul Eggert <eggert@cs.ucla.edu>
5953 * lread.c (read1): Simplify slightly to avoid an overflow warning
5954 with GCC 4.7.0 on x86-64.
5956 2012-05-26 Eli Zaretskii <eliz@gnu.org>
5958 * bidi.c (bidi_mirror_char): Revert last change: an int is
5959 definitely wide enough here.
5961 2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
5963 Fix integer width and related bugs (Bug#9874).
5964 * alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
5965 (allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
5966 (string_bytes, check_sblock, allocate_string_data):
5967 (compact_small_strings, Fmake_bool_vector, make_string)
5968 (make_unibyte_string, make_multibyte_string)
5969 (make_string_from_bytes, make_specified_string)
5970 (allocate_vectorlike, Fmake_vector, find_string_data_in_pure)
5971 (make_pure_string, make_pure_c_string, make_pure_vector, Fpurecopy)
5973 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5974 (allocate_pseudovector):
5975 Use int, not EMACS_INT, where int is wide enough.
5976 (inhibit_garbage_collection, Fgarbage_collect):
5977 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
5978 * bidi.c (bidi_mirror_char): Use EMACS_INT, not int, where
5979 int might not be wide enough.
5980 (bidi_cache_search, bidi_cache_find, bidi_init_it)
5981 (bidi_count_bytes, bidi_char_at_pos, bidi_fetch_char)
5982 (bidi_at_paragraph_end, bidi_find_paragraph_start)
5983 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
5984 (bidi_level_of_next_char, bidi_move_to_visually_next):
5985 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5986 * buffer.c (copy_overlays, Fgenerate_new_buffer_name)
5987 (Fkill_buffer, Fset_buffer_major_mode)
5988 (advance_to_char_boundary, Fbuffer_swap_text)
5989 (Fset_buffer_multibyte, overlays_at, overlays_in)
5990 (overlay_touches_p, struct sortvec, record_overlay_string)
5991 (overlay_strings, recenter_overlay_lists)
5992 (adjust_overlays_for_insert, adjust_overlays_for_delete)
5993 (fix_start_end_in_overlays, fix_overlays_before, modify_overlay)
5994 (Fmove_overlay, Fnext_overlay_change, Fprevious_overlay_change)
5995 (Foverlay_recenter, last_overlay_modification_hooks_used)
5996 (report_overlay_modification, evaporate_overlays, enlarge_buffer_text):
5997 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
5998 (validate_region): Omit unnecessary test for b <= e,
5999 since that's guaranteed by the previous test.
6000 (adjust_overlays_for_delete): Avoid pos + length overflow.
6001 (Fmove_overlay, Fdelete_overlay, add_overlay_mod_hooklist)
6002 (report_overlay_modification):
6003 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6004 (Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
6005 Omit pointer cast, which isn't needed anyway, and doesn't work
6006 after the EMACS_INT -> ptrdiff_t change.
6007 (Fmove_overlay): Clip BEG and END to ptrdiff_t to avoid overflow.
6008 * buffer.h: Adjust decls to match defn changes elsewhere.
6009 (struct buffer_text, struct buffer):
6010 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6011 Use EMACS_INT, not int, where int might not be wide enough.
6012 * bytecode.c (unmark_byte_stack, exec_byte_code): Use ptrdiff_t,
6013 not int, to avoid needless 32-bit limit on 64-bit hosts.
6014 (exec_byte_code): Use tighter memory-full test, one that checks
6015 for alloca overflow. Don't compute the address of the object just
6016 before an array, as that's not portable. Use EMACS_INT, not
6017 ptrdiff_t or int, where ptrdiff_t or int might not be wide enough.
6018 * callint.c (Fcall_interactively):
6019 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6020 * callproc.c (call_process_kill, Fcall_process):
6021 Don't assume pid_t fits into an Emacs fixnum.
6022 (call_process_cleanup, Fcall_process, child_setup):
6023 Don't assume pid_t fits into int.
6024 (call_process_cleanup, Fcall_process, delete_temp_file)
6025 (Fcall_process_region):
6026 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6027 (Fcall_process): Simplify handling of volatile integers.
6028 Use int, not EMACS_INT, where int will do.
6029 * casefiddle.c (casify_object, casify_region, operate_on_word)
6030 (Fupcase_word, Fdowncase_word, Fcapitalize_word):
6031 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6032 (casify_object): Avoid integer overflow when overallocating buffer.
6033 * casetab.c (set_identity, shuffle): Prefer int to unsigned when
6034 either works. Use lint_assume to convince GCC 4.6.1 that it's OK.
6035 * category.c (Fchar_category_set): Don't assume fixnum fits in int.
6036 * category.h (CATEGORYP): Don't assume arg is nonnegative.
6037 * ccl.c (GET_CCL_INT): Remove; no longer needed, since the
6038 integers are now checked earlier. All uses replaced with XINT.
6040 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6041 For CCL_MapSingle, check that content and value are in int range.
6042 (ccl_driver, Fregister_code_conversion_map):
6043 Check that Vcode_version_map_vector is a vector.
6044 (resolve_symbol_ccl_program): Check that vector header is in range.
6045 Always copy the vector, so that we can check its contents reliably
6046 now rather than having to recheck each instruction as it's being
6047 executed. Check that vector words fit in 'int'.
6048 (ccl_get_compiled_code, Fregister_ccl_program)
6049 (Fregister_code_conversion_map): Use ptrdiff_t, not int, for
6050 program indexes, to avoid needless 32-bit limit on 64-bit hosts.
6051 (Fccl_execute, Fccl_execute_on_string): Check that initial reg
6052 contents are in range.
6053 (Fccl_execute_on_string): Check that status is in range.
6054 * ccl.h (struct ccl_program.idx): Now ptrdiff_t, not int.
6055 * character.c (char_resolve_modifier_mask, Fchar_resolve_modifiers):
6056 Accept and return EMACS_INT, not int, because callers can pass values
6058 (c_string_width, strwidth, lisp_string_width, chars_in_text)
6059 (multibyte_chars_in_text, parse_str_as_multibyte)
6060 (str_as_multibyte, count_size_as_multibyte, str_to_multibyte)
6061 (str_as_unibyte, str_to_unibyte, string_count_byte8)
6062 (string_escape_byte8, Fget_byte):
6063 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6064 (Funibyte_string): Use CHECK_RANGED_INTEGER, not CHECK_NATNUM, to
6065 avoid mishandling large integers.
6066 * character.h: Adjust decls to match defn changes elsewhere.
6067 * charset.c (load_charset_map_from_file, find_charsets_in_text)
6068 (Ffind_charset_region):
6069 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6070 (load_charset_map_from_file): Redo idx calculation to avoid overflow.
6071 (load_charset_map_from_vector, Fdefine_charset_internal):
6072 Don't assume fixnum fits in int.
6073 (load_charset_map_from_vector, Fmap_charset_chars):
6074 Remove now-unnecessary CHECK_NATNUMs.
6075 (Fdefine_charset_internal): Check ranges here, more carefully.
6076 Don't rely on undefined behavior with signed left shift overflow.
6077 Don't assume unsigned int fits into fixnum, or that fixnum fits
6078 into unsigned int. Don't require max_code to be a valid fixnum;
6079 that's not true for gb10830 4-byte on a 32-bit host. Allow
6080 invalid_code to be a cons, for the same reason. Require code_offset
6081 to be a character. Avoid int overflow if max_char is close
6083 (CODE_POINT_TO_INDEX): On 32-bit hosts, return int, not unsigned;
6084 this is intended anyway and avoids some undefined behavior.
6085 (load_charset_map): Pass unsigned, not int, as 2nd arg of
6086 INDEX_TO_CODE_POINT, as that's what it expects.
6087 (Funify_charset, encode_char): Don't stuff unsigned vals into int vars.
6088 * charset.h (DECODE_CHAR): Return int, not unsigned;
6089 this is what was intended anyway, and it avoids undefined behavior.
6090 (CHARSET_OFFSET): Remove unused macro, instead of fixing its
6091 integer-overflow issues.
6092 (ENCODE_CHAR): Return unsigned on all hosts, not just on 32-bit hosts.
6093 Formerly, it returned EMACS_INT on 64-bit hosts in the common case
6094 where the argument is EMACS_INT, and this behavior is not intended.
6095 * chartab.c (Fmake_char_table, Fset_char_table_range)
6096 (uniprop_get_decoder, uniprop_get_encoder):
6097 Don't assume fixnum fits in int.
6098 * cmds.c (move_point): New function, that does the gist of
6099 Fforward_char and Fbackward_char, but does so while checking
6100 for integer overflow more accurately.
6101 (Fforward_char, Fbackward_char): Use it.
6102 (Fforward_line, Fend_of_line, internal_self_insert)
6103 (internal_self_insert):
6104 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6105 Fix a FIXME, by checking for integer overflow when calculating
6106 target_clm and actual_clm.
6107 * coding.c (detect_coding_XXX, encode_coding_XXX, CODING_DECODE_CHAR)
6108 (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET, CODING_CHAR_CHARSET_P)
6109 (ASSURE_DESTINATION, coding_alloc_by_realloc)
6110 (coding_alloc_by_making_gap, alloc_destination)
6111 (detect_coding_utf_8, encode_coding_utf_8, decode_coding_utf_16)
6112 (encode_coding_utf_16, detect_coding_emacs_mule)
6113 (decode_coding_emacs_mule, encode_coding_emacs_mule)
6114 (detect_coding_iso_2022, decode_coding_iso_2022)
6115 (encode_invocation_designation, encode_designation_at_bol)
6116 (encode_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
6117 (decode_coding_sjis, decode_coding_big5, encode_coding_sjis)
6118 (encode_coding_big5, detect_coding_ccl, decode_coding_ccl)
6119 (encode_coding_ccl, encode_coding_raw_text)
6120 (detect_coding_charset, decode_coding_charset)
6121 (encode_coding_charset, detect_eol, decode_eol, produce_chars)
6122 (produce_composition, produce_charset, produce_annotation)
6123 (decode_coding, handle_composition_annotation)
6124 (handle_charset_annotation, consume_chars, decode_coding_gap)
6125 (decode_coding_object, encode_coding_object, detect_coding_system)
6126 (Ffind_coding_systems_region_internal, Fcheck_coding_systems_region)
6127 (code_convert_region, code_convert_string)
6128 (Fdefine_coding_system_internal)
6129 (coding_set_source, coding_set_destination):
6130 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6131 (setup_iso_safe_charsets, consume_chars, Funencodable_char_position)
6132 (Fdefine_coding_system_internal):
6133 Don't assume fixnums fit in int.
6134 (decode_coding_gap, decode_coding_object, encode_coding_object)
6135 (Fread_coding_system, Fdetect_coding_region)
6136 (Funencodable_char_position, Fcheck_coding_systems_region)
6137 (get_translation, handle_composition_annotation, consume_chars):
6138 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6139 (consume_chars): Rewrite to not calculate an address outside buffer.
6140 (Ffind_operation_coding_system): NATNUMP can eval its arg twice.
6141 Don't access memory outside of the args array.
6142 (Fdefine_coding_system_internal): Check for charset-id overflow.
6143 (ENCODE_ISO_CHARACTER): Use unsigned, not int, to store the unsigned
6144 result of ENCODE_CHAR.
6145 * coding.h: Adjust decls to match defn changes elsewhere.
6146 (struct coding_system):
6147 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6148 * composite.c (get_composition_id, find_composition)
6149 (run_composition_function, update_compositions)
6150 (compose_text, composition_gstring_put_cache)
6151 (composition_gstring_p, composition_gstring_width)
6152 (fill_gstring_header, fill_gstring_body, autocmp_chars)
6153 (composition_compute_stop_pos, composition_reseat_it)
6154 (composition_update_it, struct position_record)
6155 (find_automatic_composition, composition_adjust_point)
6156 (Fcomposition_get_gstring, Ffind_composition_internal):
6157 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6158 (update_compositions):
6159 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6160 * composite.h: Adjust decls to match defn changes elsewhere.
6161 (struct composition):
6162 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6163 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
6164 Do not attempt to compute the address of the object just before a
6165 buffer; this is not portable.
6167 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6168 (Faset): Use int, not EMACS_INT, where int is wide enough.
6169 (Fstring_to_number): Don't assume fixnums fit in int.
6170 (Frem): Don't assume arg is nonnegative.
6171 * dbusbind.c (xd_append_arg): Check for integers out of range.
6172 (Fdbus_call_method): Don't overflow the timeout int.
6173 (extract_signed, extract_unsigned): New functions.
6174 (XD_CHECK_DBUS_SERIAL): Remove; superseded by extract_unsigned.
6175 (xd_get_connection_references): Return ptrdiff_t, not int.
6177 (xd_signature, xd_append_arg, xd_retrieve_arg, Fdbus_message_internal)
6178 (xd_read_message_1):
6179 Use int, not unsigned, where the dbus API uses int.
6180 (Fdbus_message_internal): Don't overflow mtype.
6181 (syms_of_dbusbind): Allocate right-sized buffer for integers.
6182 * dired.c (directory_files_internal, file_name_completion, scmp)
6183 (file_name_completion_stat):
6184 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6185 (file_name_completion): Don't overflow matchcount.
6186 (file_name_completion_stat): Use SAFE_ALLOCA, not alloca.
6187 * dispextern.h: Adjust decls to match defn changes elsewhere.
6188 (struct text_pos, struct glyph, struct bidi_saved_info)
6189 (struct bidi_string_data, struct bidi_it, struct composition_it)
6191 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6192 (struct display_pos, struct composition_it, struct it):
6193 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6194 * dispnew.c (increment_matrix_positions)
6195 (increment_row_positions, mode_line_string)
6196 (marginal_area_string):
6197 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6198 (change_frame_size_1, Fredisplay, Fframe_or_buffer_changed_p):
6199 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6200 (duration_to_sec_usec): New function, to check for overflow better.
6201 (Fsleep_for, sit_for): Use it.
6202 * doc.c (get_doc_string, store_function_docstring):
6203 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6204 (get_doc_string, Fsnarf_documentation):
6205 Use int, not EMACS_INT, where int is wide enough.
6207 Use SAFE_ALLOCA, not alloca.
6208 Check for overflow when converting EMACS_INT to off_t.
6209 * doprnt.c (doprnt):
6210 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6211 * editfns.c (init_editfns, Fuser_uid, Fuser_real_uid):
6212 Don't assume uid_t fits into fixnum.
6213 (buildmark, Fgoto_char, overlays_around, find_field, Fdelete_field)
6214 (Ffield_string, Ffield_string_no_properties, Ffield_beginning)
6215 (Ffield_end, Fconstrain_to_field, Fline_beginning_position)
6216 (Fline_end_position, Fprevious_char, Fchar_after, Fchar_before)
6217 (general_insert_function)
6218 (Finsert_char, make_buffer_string, make_buffer_string_both)
6219 (update_buffer_properties, Fbuffer_substring)
6220 (Fbuffer_substring_no_properties, Fcompare_buffer_substrings)
6221 (Fsubst_char_in_region, check_translation)
6222 (Ftranslate_region_internal, save_restriction_restore, Fformat)
6223 (transpose_markers, Ftranspose_regions):
6224 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6225 (clip_to_bounds): Move to lisp.h as an inline function).
6226 (Fconstrain_to_field): Don't assume integers are nonnegative.
6227 (Fline_beginning_position, Fsave_excursion, Fsave_current_buffer):
6228 (Fsubst_char_in_region, Fsave_restriction):
6229 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6230 (Femacs_pid): Don't assume pid_t fits into fixnum.
6231 (lo_time): Use int, not EMACS_INT, when int suffices.
6232 (lisp_time_argument): Check for usec out of range.
6233 (Fencode_time): Don't assume fixnum fits in int.
6234 (Fuser_login_name, Fuser_full_name): Signal an error
6235 if a uid argument is out of range, rather than relying on
6237 (Fformat_time_string): Remove now-unnecessary check.
6238 lisp_time_argument checks for out-of-range usec now.
6239 Use ptrdiff_t, not size_t, where ptrdiff_t will do.
6240 * emacs.c (gdb_valbits, gdb_gctypebits): Now int, not EMACS_INT.
6241 (gdb_data_seg_bits): Now uintptr_t, not EMACS_INT.
6242 (PVEC_FLAG, gdb_array_mark_flag): Now ptrdiff_t, not EMACS_INT.
6243 (init_cmdargs, Fdump_emacs):
6244 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6245 (Fkill_emacs): Don't assume fixnum fits in int; instead, take just
6246 the bottom (typically) 32 bits of the fixnum.
6247 * eval.c (specpdl_size, call_debugger):
6248 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6249 (when_entered_debugger, Fbacktrace_debug):
6250 Don't assume fixnum can fit in int.
6251 (Fdefvaralias, Fdefvar): Do not attempt to compute the address of
6252 the object just before a buffer; this is not portable.
6253 (FletX, Flet, Funwind_protect, do_autoload, Feval, funcall_lambda)
6254 (grow_specpdl, unbind_to):
6255 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6256 (Fapply, apply_lambda): Don't assume ptrdiff_t can hold fixnum.
6257 (grow_specpdl): Simplify allocation by using xpalloc.
6258 (Fprog1, Fprog2): Don't assume list length fits in int. Simplify.
6259 * fileio.c (Ffind_file_name_handler, Fcopy_file, Frename_file)
6260 (Finsert_file_contents, Fwrite_region, Fdo_auto_save):
6261 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6262 (Ffind_file_name_handler, non_regular_inserted, Finsert_file_contents)
6264 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6265 (Fcopy_file, non_regular_nbytes, read_non_regular)
6266 (Finsert_file_contents):
6267 Use int, not EMACS_INT, where int is wide enough.
6268 (READ_BUF_SIZE): Verify that it fits in int.
6269 (Finsert_file_contents): Check that counts are in proper range,
6270 rather than assuming fixnums fit into ptrdiff_t etc.
6271 Don't assume fixnums fit into int.
6272 * floatfns.c (Fexpt): Avoid undefined signed * signed overflow.
6273 * fns.c (Fcompare_strings, Fstring_lessp, struct textprop_rec, concat)
6274 (string_char_byte_cache_charpos, string_char_byte_cache_bytepos)
6275 (string_char_to_byte, string_byte_to_char)
6276 (string_make_multibyte, string_to_multibyte)
6277 (string_make_unibyte, Fstring_as_unibyte, Fstring_as_multibyte)
6278 (Fstring_to_unibyte, Fsubstring, Fsubstring_no_properties)
6279 (substring_both, Fdelete, internal_equal, Ffillarray)
6280 (Fclear_string, mapcar1)
6281 (Fbase64_encode_region, Fbase64_encode_string, base64_encode_1)
6282 (Fbase64_decode_region, Fbase64_decode_string, base64_decode_1)
6283 (larger_vector, make_hash_table, maybe_resize_hash_table)
6284 (hash_lookup, hash_remove_from_table, hash_clear, sweep_weak_table)
6285 (Fmaphash, secure_hash):
6286 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6287 (concat): Check for string index and length overflow.
6288 (Fmapconcat): Don't assume fixnums fit into ptrdiff_t.
6290 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6291 (larger_vector): New API (vec, incr_min, size_max) replaces old
6292 one (vec, new_size, init). This catches size overflow.
6293 INIT was removed because it was always Qnil.
6294 All callers changed.
6295 (INDEX_SIZE_BOUND): New macro, which calculates more precisely
6296 the upper bound on a hash table index size.
6297 (make_hash_table, maybe_resize_hash_table): Use it.
6298 (secure_hash): Computer start_byte and end_byte only after
6299 they're known to be in ptrdiff_t range.
6300 * font.c (font_intern_prop, font_at, font_range, Ffont_shape_gstring)
6301 (Ffont_get_glyphs, Ffont_at):
6302 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6303 (font_style_to_value, font_prop_validate_style, font_expand_wildcards)
6304 (Flist_fonts, Fopen_font):
6305 Don't assume fixnum can fit in int.
6306 (check_gstring): Don't assume index can fit in int.
6307 (font_match_p): Check that fixnum is a character, not a nonnegative
6308 fixnum, since the later code needs to stuff it into an int.
6309 (font_find_for_lface): Use SAFE_ALLOCA_LISP, not alloca.
6310 (font_fill_lglyph_metrics): Use unsigned, not EMACS_INT, to avoid
6311 conversion overflow issues.
6312 (Fopen_font): Check for integer out of range.
6313 (Ffont_get_glyphs): Don't assume index can fit in int.
6314 * font.h: Adjust decls to match defn changes elsewhere.
6315 * fontset.c (reorder_font_vector): Redo score calculation to avoid
6317 (num_auto_fontsets, fontset_from_font): Use ptrdiff_t, not
6318 printmax_t, where ptrdiff_t is wide enough.
6319 (Finternal_char_font):
6320 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6321 * frame.c (Fset_mouse_position, Fset_mouse_pixel_position)
6322 (Fset_frame_height, Fset_frame_width, Fset_frame_size)
6323 (Fset_frame_position, x_set_frame_parameters)
6324 (x_set_line_spacing, x_set_border_width)
6325 (x_set_internal_border_width, x_set_alpha, x_figure_window_size):
6326 Check that fixnums are in proper range for system types.
6327 (frame_name_fnn_p, Fframe_parameter, Fmodify_frame_parameters):
6328 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6329 (Fmodify_frame_parameters): Don't assume fixnum fits in int.
6330 Use SAFE_ALLOCA_LISP, not alloca.
6331 * frame.h (struct frame): Use intptr_t, not EMACS_INT, where
6332 intptr_t is wide enough.
6333 * fringe.c (lookup_fringe_bitmap, get_logical_fringe_bitmap)
6334 (Fdefine_fringe_bitmap): Don't assume fixnum fits in int.
6335 (Ffringe_bitmaps_at_pos): Don't assume index fits in int.
6336 Check for fixnum out of range.
6337 * ftfont.c (ftfont_list): Don't assume index fits in int.
6338 Check that fixnums are in proper range for system types.
6339 (ftfont_shape_by_flt):
6340 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6341 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
6342 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6343 (Fgnutls_error_fatalp, Fgnutls_error_string, Fgnutls_boot):
6344 Check that fixnums are in proper range for system types.
6345 * gnutls.h: Adjust decls to match defn changes elsewhere.
6346 * gtkutil.c (xg_dialog_run):
6347 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6348 (update_frame_tool_bar):
6349 Check that fixnums are in proper range for system types.
6350 * image.c (parse_image_spec): Redo count calculation to avoid overflow.
6351 (lookup_image): Check that fixnums are in range for system types.
6352 * indent.c (last_known_column, last_known_column_point):
6353 (current_column_bol_cache):
6354 (skip_invisible, current_column, check_display_width):
6355 (check_display_width, scan_for_column, current_column_1)
6356 (Findent_to, Fcurrent_indentation, position_indentation)
6357 (indented_beyond_p, Fmove_to_column, compute_motion):
6358 (Fcompute_motion, Fvertical_motion):
6359 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6360 (last_known_column_modified): Use EMACS_INT, not int.
6361 (check_display_width):
6363 Check that fixnums and floats are in proper range for system types.
6364 (compute_motion): Don't assume index or fixnum fits in int.
6365 (compute_motion, Fcompute_motion):
6366 Use int, not EMACS_INT, when it is wide enough.
6367 (vmotion): Omit local var start_hpos that is always 0; that way
6368 we don't need to worry about overflow in expressions involving it.
6369 * indent.h: Adjust decls to match defn changes elsewhere.
6371 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6372 Use int, not EMACS_INT, where int is wide enough.
6373 Remove unused members ovstring_chars_done and tab_offset;
6375 * insdel.c (move_gap, move_gap_both, gap_left, gap_right)
6376 (adjust_markers_for_delete, adjust_markers_for_insert, adjust_point)
6377 (adjust_markers_for_replace, make_gap_larger, make_gap_smaller)
6378 (make_gap, copy_text, insert, insert_and_inherit)
6379 (insert_before_markers, insert_before_markers_and_inherit)
6380 (insert_1, count_combining_before, count_combining_after)
6381 (insert_1_both, insert_from_string)
6382 (insert_from_string_before_markers, insert_from_string_1)
6383 (insert_from_gap, insert_from_buffer, insert_from_buffer_1)
6384 (adjust_after_replace, adjust_after_insert, replace_range)
6385 (replace_range_2, del_range, del_range_1, del_range_byte)
6386 (del_range_both, del_range_2, modify_region)
6387 (prepare_to_modify_buffer, signal_before_change)
6388 (signal_after_change, Fcombine_after_change_execute):
6389 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6390 * intervals.c (traverse_intervals, rotate_right, rotate_left)
6391 (balance_an_interval, split_interval_right, split_interval_left)
6392 (find_interval, next_interval, update_interval)
6393 (adjust_intervals_for_insertion, delete_node, delete_interval)
6394 (interval_deletion_adjustment, adjust_intervals_for_deletion)
6395 (static_offset_intervals, offset_intervals)
6396 (merge_interval_right, merge_interval_left, make_new_interval)
6397 (graft_intervals_into_buffer, temp_set_point_both)
6398 (temp_set_point, set_point, adjust_for_invis_intang)
6399 (set_point_both, move_if_not_intangible, get_property_and_range)
6400 (get_local_map, copy_intervals, copy_intervals_to_string)
6401 (compare_string_intervals, set_intervals_multibyte_1):
6402 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6403 * intervals.h: Adjust decls to match defn changes elsewhere.
6405 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6406 * keyboard.c (this_command_key_count, this_single_command_key_start)
6407 (before_command_key_count, before_command_echo_length, echo_now)
6408 (echo_length, recursive_edit_1, Frecursive_edit, Ftrack_mouse)
6409 (command_loop_1, safe_run_hooks, read_char, timer_check_2)
6410 (menu_item_eval_property, read_key_sequence, Fread_key_sequence)
6411 (Fread_key_sequence_vector, Fexecute_extended_command, Fsuspend_emacs):
6412 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6413 (last_non_minibuf_size, last_point_position, echo_truncate)
6414 (command_loop_1, adjust_point_for_property, read_char, gen_help_event)
6415 (make_lispy_position, make_lispy_event, parse_modifiers_uncached)
6416 (parse_modifiers, modify_event_symbol, Fexecute_extended_command)
6417 (stuff_buffered_input):
6418 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6419 (last_auto_save, command_loop_1, read_char):
6420 Use EMACS_INT, not int, to avoid integer overflow.
6421 (record_char): Avoid overflow in total_keys computation.
6422 (parse_modifiers_uncached): Redo index calculation to avoid overflow.
6423 * keyboard.h: Adjust decls to match defn changes elsewhere.
6424 * keymap.c (Fdefine_key, Fcurrent_active_maps, accessible_keymaps_1)
6425 (Fkey_description, Fdescribe_vector, Flookup_key):
6426 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6427 (click_position): New function, to check that positions are in range.
6428 (Fcurrent_active_maps):
6430 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6431 (Faccessible_keymaps, Fkey_description):
6432 (preferred_sequence_p):
6433 Don't assume fixnum can fit into int.
6434 (Fkey_description): Use SAFE_ALLOCA_LISP, not alloca.
6435 Check for integer overflow in size calculations.
6436 (Ftext_char_description): Use CHECK_CHARACTER, not CHECK_NUMBER, to
6437 avoid mishandling large integers.
6438 * lisp.h: Adjust decls to match defn changes elsewhere.
6439 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, struct Lisp_String)
6440 (struct vectorlike_header, struct Lisp_Subr, struct Lisp_Hash_Table)
6441 (struct Lisp_Marker):
6442 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6443 (clip_to_bounds): Now an inline function, moved here from editfns.c.
6444 (GLYPH_CODE_P): Check for overflow in system types, subsuming the
6445 need for GLYPH_CODE_CHAR_VALID_P and doing proper checking ourselves.
6446 All callers changed.
6447 (GLYPH_CODE_CHAR, GLYPH_CODE_FACE):
6448 Assume the arg has valid form, since it always does.
6449 (TYPE_RANGED_INTEGERP): Avoid bug when checking against a wide
6450 unsigned integer system type.
6451 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER): New macros.
6452 (struct catchtag, specpdl_size, SPECPDL_INDEX, USE_SAFE_ALLOCA):
6453 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6454 (struct catchtag): Use EMACS_INT, not int, since it may be a fixnum.
6455 (duration_to_sec_usec): New decl.
6456 * lread.c (read_from_string_index, read_from_string_index_byte)
6457 (read_from_string_limit, readchar, unreadchar, openp)
6458 (read_internal_start, read1, oblookup):
6459 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6460 (Fload, readevalloop, Feval_buffer, Feval_region):
6461 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6462 (openp): Check for out-of-range argument to 'access'.
6463 (read1): Use int, not EMACS_INT, where int is wide enough.
6464 Don't assume fixnum fits into int.
6465 Fix off-by-one error that can read outside a buffer.
6466 (read_filtered_event): Use duration_to_sec_usec
6467 to do proper overflow checking on durations.
6468 * macros.c (Fstart_kbd_macro): Use xpalloc to check for overflow
6469 in size calculation.
6470 (Fexecute_kbd_macro):
6471 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6472 * marker.c (cached_charpos, cached_bytepos, CONSIDER)
6473 (byte_char_debug_check, buf_charpos_to_bytepos, verify_bytepos)
6474 (buf_bytepos_to_charpos, Fset_marker, set_marker_restricted)
6475 (set_marker_both, set_marker_restricted_both, marker_position)
6476 (marker_byte_position, Fbuffer_has_markers_at):
6477 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6478 (Fset_marker, set_marker_restricted): Don't assume fixnum fits in int.
6479 * menu.c (ensure_menu_items): Rename from grow_menu_items.
6480 It now merely ensures that the menu is large enough, without
6481 necessarily growing it, as this avoids some integer overflow issues.
6482 All callers changed.
6483 (keymap_panes, parse_single_submenu, Fx_popup_menu):
6484 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6485 (parse_single_submenu, Fx_popup_menu): Don't assume fixnum fits in int.
6486 Use SAFE_ALLOCA_LISP, not alloca.
6487 (find_and_return_menu_selection): Avoid unnecessary casts of pointers
6488 to EMACS_INT. Check that fixnums are in proper range for system types.
6489 * minibuf.c (minibuf_prompt_width, string_to_object)
6490 (Fminibuffer_contents, Fminibuffer_contents_no_properties)
6491 (Fminibuffer_completion_contents, Ftry_completion, Fall_completions):
6492 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6493 (get_minibuffer, read_minibuf_unwind):
6494 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6495 (read_minibuf): Omit unnecessary arg BACKUP_N, which is always nil;
6496 this simplifies overflow checking. All callers changed.
6497 (read_minibuf, Fread_buffer, Ftry_completion, Fall_completions)
6499 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6500 * nsfns.m (check_ns_display_info): Don't assume fixnum fits in long.
6501 (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_create_frame):
6502 Check that fixnums are in proper range for system types.
6503 (Fx_create_frame, Fx_show_tip):
6504 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6505 * nsfont.m (ns_findfonts, nsfont_list_family):
6506 Don't assume fixnum fits in long.
6507 * nsmenu.m (ns_update_menubar, ns_menu_show, ns_popup_dialog):
6508 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6509 (ns_update_menubar): Use intptr_t, not EMACS_INT, when intptr_t is
6511 * nsselect.m (ns_get_local_selection, clean_local_selection_data):
6512 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6513 * print.c (print_buffer_size, print_buffer_pos, print_buffer_pos_byte)
6514 (PRINTDECLARE, PRINTPREPARE):
6515 (strout, print_string):
6516 (print, print_preprocess, print_check_string_charset_prop)
6518 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6520 (temp_output_buffer_setup, Fprin1_to_string, print_object):
6521 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6522 (PRINTPREPARE): Use int, not ptrdiff_t, where int is wide enough.
6523 (printchar, strout): Use xpalloc to catch size calculation overflow.
6524 (Fexternal_debugging_output): Don't overflow EMACS_INT->int conversion.
6525 (print_error_message): Use SAFE_ALLOCA, not alloca.
6526 (print_object): Use int, not EMACS_INT, where int is wide enough.
6527 (print_depth, new_backquote_output, print_number_index):
6528 Use ptrdiff_t, not int, where int might not be wide enough.
6529 * process.c (Fdelete_process): Don't assume pid fits into EMACS_INT.
6530 (Fset_process_window_size, Fformat_network_address)
6531 (get_lisp_to_sockaddr_size, set_socket_option, Fmake_network_process)
6533 Check that fixnums are in proper range for system types.
6534 (Fsignal_process): Simplify by avoiding a goto.
6535 Check for process-ids out of pid_t range rather than relying on
6537 (process_tick, update_tick): Use EMACS_INT, not int.
6538 (Fformat_network_address, read_process_output, send_process)
6539 (Fprocess_send_region, status_notify):
6540 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6541 (Fformat_network_address, Fmake_serial_process, Fmake_network_process)
6542 (wait_reading_process_output, read_process_output, exec_sentinel):
6543 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6544 (conv_lisp_to_sockaddr): Don't assume fixnums fit into int.
6545 (Faccept_process_output): Use duration_to_sec_usec to do proper
6546 overflow checking on durations.
6547 (emacs_get_tty_pgrp, Fprocess_running_child_p, process_send_signal):
6548 Don't assume pid_t fits in int.
6549 * process.h (struct Lisp_Process): Members tick and update_tick
6550 are now of type EMACS_INT, not int.
6551 * puresize.h (PURESIZE_RATIO): Shrink this to 8/6 on 32-bit hosts
6552 configured --with-wide-int.
6553 * scroll.c (calculate_scrolling, calculate_direct_scrolling)
6554 (line_ins_del): Use int, not EMACS_INT, where int is wide enough.
6555 * search.c (looking_at_1, string_match_1):
6556 (fast_string_match, fast_c_string_match_ignore_case)
6557 (fast_string_match_ignore_case, fast_looking_at, scan_buffer)
6558 (scan_newline, find_before_next_newline, search_command)
6559 (trivial_regexp_p, search_buffer, simple_search, boyer_moore)
6560 (set_search_regs, wordify):
6563 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6564 (string_match_1, search_buffer, set_search_regs):
6566 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6567 (wordify): Check for overflow in size calculation.
6568 (Freplace_match): Avoid potential buffer overflow in search_regs.start.
6569 (Fset_match_data): Don't assume fixnum fits in ptrdiff_t.
6570 Check that fixnums are in proper range for system types.
6571 * sound.c (struct sound_device)
6572 (wav_play, au_play, vox_write, alsa_period_size, alsa_write):
6573 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6574 (Fplay_sound_internal):
6575 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6576 * syntax.c (struct lisp_parse_state, find_start_modiff)
6577 (Finternal_describe_syntax_value, scan_lists, scan_sexps_forward):
6578 (Fparse_partial_sexp):
6579 Don't assume fixnums can fit in int.
6580 (struct lisp_parse_state, find_start_pos, find_start_value)
6581 (find_start_value_byte, find_start_begv)
6582 (update_syntax_table, char_quoted, dec_bytepos)
6583 (find_defun_start, prev_char_comend_first, back_comment):
6584 (scan_words, skip_chars, skip_syntaxes, forw_comment, Fforward_comment)
6585 (scan_lists, Fbackward_prefix_chars, scan_sexps_forward):
6586 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6587 (Finternal_describe_syntax_value): Check that match_lisp is a
6588 character, not an integer, since the code stuffs it into int.
6589 (scan_words, scan_sexps_forward):
6590 Check that fixnums are in proper range for system types.
6592 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6593 (scan_sexps_forward):
6594 Use CHARACTERP, not INTEGERP, since the value must fit into int.
6595 (Fparse_partial_sexp): Fix doc; element 8 is not ignored.
6596 * syntax.h: Adjust decls to match defn changes elsewhere.
6597 (struct gl_state_s):
6598 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6599 (SETUP_SYNTAX_TABLE_FOR_OBJECT): Use PTRDIFF_MAX, not
6600 MOST_POSITIVE_FIXNUM.
6601 * sysdep.c (wait_for_termination_1, wait_for_termination)
6602 (interruptible_wait_for_termination, mkdir):
6603 Don't assume pid_t fits in int; on 64-bit AIX pid_t is 64-bit.
6604 (emacs_read, emacs_write):
6605 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6606 (system_process_attributes): Don't assume uid_t, gid_t, EMACS_INT,
6607 and double all fit in int.
6608 * term.c (set_tty_color_mode):
6609 Check that fixnums are in proper range for system types.
6610 * termhooks.h (struct input_event):
6611 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6612 * textprop.c (validate_interval_range, interval_of)
6613 (Fadd_text_properties, set_text_properties_1)
6614 (Fremove_text_properties, Fremove_list_of_text_properties)
6615 (Ftext_property_any, Ftext_property_not_all)
6616 (copy_text_properties, text_property_list, extend_property_ranges)
6617 (verify_interval_modification):
6618 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6619 (Fnext_single_char_property_change)
6620 (Fprevious_single_char_property_change):
6621 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6622 (copy_text_properties):
6623 Check for integer overflow in index calculation.
6624 * undo.c (last_boundary_position, record_point, record_insert)
6625 (record_delete, record_marker_adjustment, record_change)
6626 (record_property_change):
6627 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6628 (truncate_undo_list, Fprimitive_undo): Don't assume fixnum fits in int.
6629 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6630 * w32fns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
6631 (Fx_hide_tip, Fx_file_dialog):
6632 * w32menu.c (set_frame_menubar):
6633 Use ptrdiff_t, not int, for consistency with rest of code.
6634 * window.c (window_scroll_preserve_hpos, window_scroll_preserve_vpos)
6635 (select_window, Fdelete_other_windows_internal)
6636 (window_scroll_pixel_based, window_scroll_line_based)
6637 (Frecenter, Fset_window_configuration):
6638 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6639 (Fset_window_hscroll, run_window_configuration_change_hook)
6640 (set_window_buffer, temp_output_buffer_show, scroll_command)
6641 (Fscroll_other_window, Frecenter):
6642 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6643 (Fwindow_line_height, window_scroll, Fscroll_left, Fscroll_right):
6644 Don't assume fixnum fits in int.
6645 (Fset_window_scroll_bars):
6646 Check that fixnums are in proper range for system types.
6647 * xdisp.c (help_echo_pos, pos_visible_p, string_pos_nchars_ahead)
6648 (string_pos, c_string_pos, number_of_chars, init_iterator)
6649 (in_ellipses_for_invisible_text_p, init_from_display_pos)
6650 (compute_stop_pos, next_overlay_change, compute_display_string_pos)
6651 (compute_display_string_end, handle_face_prop)
6652 (face_before_or_after_it_pos, handle_invisible_prop)
6653 (handle_display_prop, handle_display_spec, handle_single_display_spec)
6654 (display_prop_intangible_p, string_buffer_position_lim)
6655 (string_buffer_position, handle_composition_prop, load_overlay_strings)
6656 (get_overlay_strings_1, get_overlay_strings)
6657 (iterate_out_of_display_property, forward_to_next_line_start)
6658 (back_to_previous_visible_line_start, reseat, reseat_to_string)
6659 (get_next_display_element, set_iterator_to_next)
6660 (get_visually_first_element, compute_stop_pos_backwards)
6661 (handle_stop_backwards, next_element_from_buffer)
6662 (move_it_in_display_line_to, move_it_in_display_line)
6663 (move_it_to, move_it_vertically_backward, move_it_by_lines)
6664 (add_to_log, message_dolog, message_log_check_duplicate)
6665 (message2, message2_nolog, message3, message3_nolog
6666 (with_echo_area_buffer, display_echo_area_1, resize_mini_window_1)
6667 (current_message_1, truncate_echo_area, truncate_message_1)
6668 (set_message, set_message_1, store_mode_line_noprop)
6669 (hscroll_window_tree, debug_delta, debug_delta_bytes, debug_end_vpos)
6670 (text_outside_line_unchanged_p, check_point_in_composition)
6671 (reconsider_clip_changes)
6672 (redisplay_internal, set_cursor_from_row, try_scrolling)
6673 (try_cursor_movement, set_vertical_scroll_bar, redisplay_window)
6674 (redisplay_window, find_last_unchanged_at_beg_row)
6675 (find_first_unchanged_at_end_row, row_containing_pos, try_window_id)
6676 (trailing_whitespace_p, find_row_edges, display_line)
6677 (RECORD_MAX_MIN_POS, Fcurrent_bidi_paragraph_direction)
6678 (display_mode_element, store_mode_line_string)
6679 (pint2str, pint2hrstr, decode_mode_spec)
6680 (display_count_lines, display_string, draw_glyphs)
6681 (x_produce_glyphs, x_insert_glyphs)
6682 (rows_from_pos_range, mouse_face_from_buffer_pos)
6683 (fast_find_string_pos, mouse_face_from_string_pos)
6684 (note_mode_line_or_margin_highlight, note_mouse_highlight):
6685 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6686 (safe_call, init_from_display_pos, handle_fontified_prop)
6687 (handle_single_display_spec, load_overlay_strings)
6688 (with_echo_area_buffer, setup_echo_area_for_printing)
6689 (display_echo_area, echo_area_display)
6690 (x_consider_frame_title, prepare_menu_bars, update_menu_bar)
6691 (update_tool_bar, hscroll_window_tree, redisplay_internal)
6692 (redisplay_window, dump_glyph_row, display_mode_line)
6693 (Fformat_mode_line, decode_mode_spec, on_hot_spot_p):
6694 (handle_display_spec, display_prop_string_p):
6695 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6696 (handle_single_display_spec, build_desired_tool_bar_string)
6697 (redisplay_tool_bar, scroll_window_tree, Fdump_glyph_matrix)
6698 (get_specified_cursor_type):
6699 Check that fixnums are in proper range for system types.
6700 (struct overlay_entry, resize_mini_window, Fdump_glyph_row)
6701 (Flookup_image_map):
6702 Don't assume fixnums fit in int.
6703 (compare_overlay_entries):
6704 Avoid mishandling comparisons due to subtraction overflow.
6705 (load_overlay_strings): Use SAFE_NALLOCA, not alloca.
6706 (last_escape_glyph_face_id, last_glyphless_glyph_face_id):
6707 (handle_tool_bar_click):
6708 Use int, not unsigned, since we prefer signed and the signedness
6709 doesn't matter here.
6710 (get_next_display_element, next_element_from_display_vector):
6711 Use int, not EMACS_INT, when int is wide enough.
6712 (start_hourglass): Use duration_to_sec_usec to do proper
6713 overflow checking on durations.
6714 * xfaces.c (Fbitmap_spec_p):
6715 Check that fixnums are in proper range for system types.
6716 (compare_fonts_by_sort_order):
6717 Avoid mishandling comparisons due to subtraction overflow.
6718 (Fx_family_fonts, realize_basic_faces):
6719 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6721 Don't assume fixnum fits in int.
6722 Use SAFE_ALLOCA_LISP, not alloca.
6723 (merge_face_heights): Remove unnecessary cast to EMACS_INT.
6724 (Finternal_make_lisp_face): Don't allocate more than MAX_FACE_ID.
6725 (face_at_buffer_position, face_for_overlay_string)
6726 (face_at_string_position):
6727 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6728 (merge_faces): Use int, not EMACS_INT, where int is wide enough.
6729 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, x_icon_verify)
6731 Check that fixnums are in proper range for system types.
6732 (Fx_create_frame, x_create_tip_frame, Fx_show_tip)
6733 (Fx_hide_tip, Fx_file_dialog, Fx_select_font):
6734 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6735 (Fx_change_window_property): Don't assume fixnums fit in int.
6736 * xfont.c (xfont_chars_supported):
6737 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6738 * xmenu.c (Fx_popup_dialog, set_frame_menubar)
6739 (create_and_show_popup_menu, create_and_show_dialog, xmenu_show):
6740 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6741 * xml.c (parse_region):
6742 * xrdb.c (magic_file_p):
6743 Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
6744 * xselect.c (TRACE1): Don't assume pid_t promotes to int.
6745 (x_get_local_selection, x_reply_selection_request)
6746 (x_handle_selection_request, wait_for_property_change):
6747 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6748 (selection_data_to_lisp_data): Use short, not EMACS_INT, where
6749 short is wide enough.
6750 (x_send_client_event): Don't assume fixnum fits in int.
6751 * xterm.c (x_x_to_emacs_modifiers):
6752 Don't assume EMACS_INT overflows nicely into int.
6753 (x_emacs_to_x_modifiers): Use EMACS_INT, not int, because values
6755 (handle_one_xevent): NATNUMP can eval its arg twice.
6756 (x_connection_closed):
6757 Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
6758 * xterm.h: Adjust decls to match defn changes elsewhere.
6759 (struct scroll_bar): Use struct vectorlike_header
6760 rather than rolling our own approximation.
6761 (SCROLL_BAR_VEC_SIZE): Remove; not used.
6763 2012-05-25 Glenn Morris <rgm@gnu.org>
6765 * lisp.mk (lisp): Update for more files being compiled now.
6767 2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
6769 * lread.c: Remove `read_pure' which makes no difference.
6770 (read_pure): Remove var.
6771 (unreadpure): Remove function.
6772 (readevalloop): Don't call read_list with -1 flag.
6773 (read1, read_vector): Don't test read_pure any more.
6774 (read_list): Simplify.
6776 * fileio.c, character.h: Minor style tweaks.
6778 2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
6780 * window.h (clip_changed): Remove useless declaration.
6782 2012-05-22 Juanma Barranquero <lekktu@gmail.com>
6784 * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
6785 (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
6787 2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
6790 This directory predates autoconf and is no longer needed nowadays.
6791 Move its few remaining bits of functionality to where they're needed.
6792 * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
6793 * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
6794 * m/template.h: Remove.
6795 * Makefile.in (M_FILE): Remove. All uses removed.
6796 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
6797 * lisp.h (USE_LSB_TAG):
6798 * mem-limits.h (EXCEEDS_LISP_PTR):
6799 Use VAL_MAX, not VALBITS, in #if.
6800 * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
6801 (EMACS_UINT): Define unconditionally now.
6802 (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
6803 (BITS_PER_EMACS_INT): New constants, replacing
6804 what used to be in config.h, but not useful in #if.
6805 (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
6806 define them any more.
6807 (VAL_MAX): New macro.
6809 * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
6810 BITS_PER_EMACS_INT, in #if.
6811 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
6812 (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
6813 * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
6814 * s/ms-w32.h (DATA_START):
6815 Move here from removed file m/intel386.h.
6816 * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
6817 * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
6819 2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
6821 Assume C89 or later.
6822 * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
6823 * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
6825 * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
6826 * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
6827 * textprop.c, tparam.c (NULL): Remove.
6828 * ralloc.c, vm-limit.c (POINTER): Assume void * works.
6829 * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
6830 * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
6831 * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
6832 * xterm.c (input_signal_count): Assume volatile works.
6834 2012-05-21 Ken Brown <kbrown@cornell.edu>
6836 * xgselect.c (xg_select): Fix first argument in call to 'select'
6839 2012-05-20 Ken Brown <kbrown@cornell.edu>
6841 * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
6842 [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
6844 2012-05-19 Ken Brown <kbrown@cornell.edu>
6846 * xfns.c (x_in_use): Remove `static' qualifier.
6847 * xterm.h (x_in_use): Declare.
6848 * xgselect.c: Include xterm.h.
6849 (xg_select): Test `x_in_use' instead of `inhibit_window_system'
6850 and `display_arg' (bug#9754).
6852 2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
6854 * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
6856 * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
6857 * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
6859 2012-05-18 Eli Zaretskii <eliz@gnu.org>
6861 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
6863 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
6864 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
6866 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
6867 reference to image_cache->refcount.
6868 (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
6870 2012-05-17 Juri Linkov <juri@jurta.org>
6872 * search.c (Fword_search_regexp, Fword_search_backward)
6873 (Fword_search_forward, Fword_search_backward_lax)
6874 (Fword_search_forward_lax): Move functions to isearch.el
6875 (bug#10145, bug#11381).
6877 2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
6879 * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
6881 2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
6883 * lread.c (init_obarray): Declare Qt and Qnil as special.
6885 2012-05-14 Glenn Morris <rgm@gnu.org>
6887 * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
6888 Put "libexec" before "bin", for the sake of init_callproc_1.
6890 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
6892 * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
6894 * unexaix.c: Port to more-recent AIX compilers.
6895 (report_error, report_error_1, make_hdr, copy_sym)
6896 (mark_x, adjust_lnnoptrs, unrelocate_symbols):
6897 Make arguments const char *, not char *, to avoid violations of C
6898 standard and to fix some AIX warnings reported by Gilles Pion.
6900 2012-05-14 Eli Zaretskii <eliz@gnu.org>
6902 * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
6903 already have overlays loaded.
6904 (handle_single_display_spec): Before returning without displaying
6905 fringe bitmap, synchronize the bidi iterator with the main display
6906 iterator, by calling iterate_out_of_display_property.
6907 (iterate_out_of_display_property): Detect buffer iteration by
6908 testing that it->string is a Lisp string.
6909 (get_next_display_element): When the current object is exhausted,
6910 and there's something on it->stack, call set_iterator_to_next to
6911 proceed with what's on the stack, instead of returning zero.
6912 (set_iterator_to_next): If called at the end of a Lisp string,
6913 proceed to consider_string_end without incrementing string
6914 position. Don't increment display vector index past the end of
6915 the display vector. (Bug#11417)
6916 (pos_visible_p): Don't report a position visible when move_it_to
6917 stopped at the last line of window, which happens to be scanned
6918 backwards by the bidi iteration. (Bug#11464)
6920 2012-05-14 Eli Zaretskii <eliz@gnu.org>
6922 * xdisp.c (handle_single_display_spec): Return 1 for left-margin
6923 and right-margin display specs even if the spec is invalid or we
6924 are on a TTY, and thus unable to display on the fringes.
6925 That's because the text with the property will not be displayed anyway,
6926 so we need to signal to the caller that this is a "replacing"
6927 display spec. This fixes display when the spec is invalid or we
6930 2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
6932 * unexaix.c (make_hdr): Fix typo in prototype.
6933 This bug broke the build on AIX. Problem reported by Gilles Pion.
6935 2012-05-14 Michael Albinus <michael.albinus@gmx.de>
6937 * keyboard.c (kbd_buffer_get_event): Read special events also in
6938 batch mode. (Bug#11415)
6940 2012-05-12 Glenn Morris <rgm@gnu.org>
6942 * ns.mk: Update for ns_appbindir no longer having trailing "/".
6944 2012-05-12 Eli Zaretskii <eliz@gnu.org>
6946 * lisp.mk (lisp): Add newcomment.elc.
6948 2012-05-12 Glenn Morris <rgm@gnu.org>
6950 * Makefile.in (MKDIR_P): New, set by configure.
6951 * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
6953 2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
6955 Remove unused function hourglass_started.
6956 * dispextern.h (hourglass_started):
6957 * w32fns.c (hourglass_started):
6958 * xdisp.c (hourglass_started): Remove.
6960 2012-05-10 Juanma Barranquero <lekktu@gmail.com>
6962 * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
6963 Update dependencies.
6965 2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
6967 * xgselect.c (xg_select): Put maxfds+1 into a var.
6968 This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
6970 * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
6972 2012-05-10 Dave Abrahams <dave@boostpro.com>
6974 * filelock.c (syms_of_filelock): New boolean create-lockfiles.
6975 (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
6977 2012-05-09 Michael Albinus <michael.albinus@gmx.de>
6979 * dbusbind.c (xd_registered_buses): New internal Lisp object.
6980 Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
6981 (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
6982 Initialize xd_registered_buses.
6984 2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
6986 Untag more efficiently if USE_LSB_TAG.
6987 This is based on a proposal by YAMAMOTO Mitsuharu in
6988 <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
6989 For an admittedly artificial (nth 8000 longlist) benchmark on
6990 Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
6991 Emacs's overall text size by 1%.
6992 * lisp.h (XUNTAG): New macro.
6993 (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
6994 (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
6995 (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
6996 * eval.c (Fautoload):
6997 * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
6998 * frame.h (XFRAME): Use XUNTAG.
7000 Port recent dbusbind.c changes to 32-bit --with-wide-int.
7001 * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
7002 Remove unportable assumptions about print widths of types like
7004 (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
7005 intptr_t when converting between pointer and integer, to avoid GCC
7006 warnings about wrong width.
7008 2012-05-09 Eli Zaretskii <eliz@gnu.org>
7010 * w32proc.c (new_child): Force Windows to reserve only 64KB of
7011 stack for each reader_thread, instead of defaulting to 8MB
7012 determined by the linker. This avoids failures in creating
7013 subprocesses on Windows 7, see the discussion in this thread:
7014 http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
7016 2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
7018 Fix up display of the *Minibuf-0* buffer in the mini window.
7019 * keyboard.c (read_char): Don't clear the echo area if there's no
7021 * xdisp.c (redisplay_internal): Redisplay the mini window (with the
7022 contents of *Minibuf-0*) if there's no message displayed in its stead.
7024 2012-05-07 Michael Albinus <michael.albinus@gmx.de>
7026 * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
7029 2012-05-06 Chong Yidong <cyd@gnu.org>
7031 * lisp.mk (lisp): Update.
7033 2012-05-05 Jim Meyering <meyering@redhat.com>
7035 * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
7037 2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
7039 * data.c (PUT_ERROR): New macro.
7040 (syms_of_data): Use it. Add new error type `user-error'.
7041 * undo.c (user_error): New function.
7042 (Fprimitive_undo): Use it.
7043 * print.c (print_error_message): Adjust print style for `user-error'.
7044 * keyboard.c (user_error): New function.
7045 (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
7047 2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
7049 Do not limit current-time-string to years 1000..9999.
7050 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
7051 (Fcurrent_time_string): Support any year that is supported by the
7052 underlying localtime representation. Don't use asctime, as it
7053 has undefined behavior for years outside the range -999..9999.
7055 2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
7057 Fix race conditions involving setenv, gmtime, localtime, asctime.
7058 Without this fix, interrupts could mess up code that uses these
7059 nonreentrant functions, since setting TZ invalidates existing
7060 tm_zone or tzname values, and since most of these functions return
7061 pointers to static storage.
7062 * editfns.c (format_time_string, Fdecode_time, Fencode_time)
7063 (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
7064 Grow the critical sections to include not just invoking
7065 localtime/gmtime, but also accessing these functions' results
7066 including their tm_zone values if any, and any related TZ setting.
7067 (format_time_string): Last arg is now struct tm *, not struct tm **,
7068 so that the struct tm is saved in the critical section.
7069 All callers changed. Simplify allocation of initial buffer, partly
7070 motivated by the fact that memory allocation needs to be outside
7071 the critical section.
7073 2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
7075 * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
7076 with RESET_INTERVAL.
7078 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
7079 Remove duplicated buffer name initialization.
7081 2012-05-02 Jim Meyering <jim@meyering.net>
7083 * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
7085 * xfns.c (x_window): Use xstrdup (Bug#11375).
7087 2012-05-02 Eli Zaretskii <eliz@gnu.org>
7089 * xdisp.c (pos_visible_p): If already at a newline from the
7090 display string before the 'while' loop, don't walk back the glyphs
7091 from it3.glyph_row. Solves assertion violation when the display
7092 string begins with a newline (egg.el). (Bug#11367)
7094 2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
7096 * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
7099 2012-05-01 Glenn Morris <rgm@gnu.org>
7101 * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
7102 s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
7103 and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
7104 All were removed before 23.1.
7106 * dispnew.c: Remove HAVE_LIBNCURSES test;
7107 it is always true on relevant platforms.
7109 * Makefile.in (LD_SWITCH_X_SITE_RPATH):
7110 Rename from LD_SWITCH_X_SITE_AUX_RPATH.
7112 * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
7114 2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
7116 * .gdbinit (xpr): Remove checks for no longer existing misc types.
7117 (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
7120 2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
7122 Do not avoid creating empty evaporating overlays (Bug#9642).
7123 * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
7124 That is, do not delete an evaporating overlay if it becomes
7125 empty after its bounds are adjusted to fit within its buffer.
7126 This fix caused other problems, and I'm reverting it until we get
7127 to the bottom of them.
7129 2012-04-27 Chong Yidong <cyd@gnu.org>
7131 * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
7133 2012-04-27 Eli Zaretskii <eliz@gnu.org>
7135 * xdisp.c (pos_visible_p): If the window start position is beyond
7136 ZV, start the display from buffer beginning. Prevents assertion
7137 violation in init_iterator when the minibuffer window is scrolled
7140 * window.c (window_scroll_pixel_based): Likewise.
7142 2012-04-27 Chong Yidong <cyd@gnu.org>
7144 * keymap.c (where_is_internal): Doc fix (Bug#10872).
7146 2012-04-27 Glenn Morris <rgm@gnu.org>
7148 * fileio.c (Fcopy_file, Fset_file_selinux_context):
7149 Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
7151 2012-04-27 Eli Zaretskii <eliz@gnu.org>
7153 * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
7154 Don't overrun array limits of glyph row's used[] array. (Bug#11288)
7156 2012-04-26 Eli Zaretskii <eliz@gnu.org>
7158 * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
7159 display element, check also the underlying string or buffer
7160 character. (Bug#11341)
7162 * w32menu.c: Include w32heap.h.
7163 (add_menu_item): If the call to AppendMenuW (via
7164 unicode_append_menu) fails, disable Unicode menus only if we are
7165 running on Windows 9X/Me.
7167 2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
7169 * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
7170 (xgetint): Add missing shift for LSB tags.
7172 2012-04-24 Martin Rudalics <rudalics@gmx.at>
7174 * keyboard.c (read_char): Don't wipe echo area for select window
7175 events: These might get delayed via `mouse-autoselect-window'
7178 2012-04-24 Juanma Barranquero <lekktu@gmail.com>
7180 * gnutls.c (init_gnutls_functions): Protect against (unlikely)
7181 manipulation of :loaded-from data.
7183 2012-04-23 Juanma Barranquero <lekktu@gmail.com>
7185 * gnutls.c (init_gnutls_functions): The value of :loaded-from is
7186 now a cons (bug#11311).
7188 2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
7190 Do not create empty overlays with the evaporate property (Bug#9642).
7191 * buffer.c (Fmove_overlay): Delete an evaporating overlay
7192 if it becomes empty after its bounds are adjusted to fit within
7193 its buffer. Without this fix, in a nonempty buffer (let ((o
7194 (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
7195 yields an empty overlay that has the evaporate property, which is
7196 not supposed to happen.
7198 Fix minor GTK3 problems found by static checking.
7199 * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
7200 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
7201 (struct _EmacsFixedClass, emacs_fixed_get_type):
7202 Move decls here from emacsgtkfixed.h, since they needn't be public.
7203 (emacs_fixed_get_type): Now static.
7204 (emacs_fixed_class_init): Omit unused local.
7205 (emacs_fixed_child_type): Remove; unused.
7206 * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
7207 (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
7208 (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
7209 (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
7210 (EMACS_FIXED_GET_CLASS): Remove; unused.
7211 * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
7213 * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
7214 Problem reported by Juanma Barranquero for Windows -Wunused-function.
7216 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
7218 Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
7219 * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
7220 (__malloc_size_t, __malloc_ptrdiff_t):
7221 Remove. All uses removed, replaced by the definiens if needed,
7222 since we can assume C89 or better now.
7223 Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
7224 (protect_malloc_state, align, get_contiguous_space)
7225 (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
7226 (malloc_atfork_handler_child, malloc_enable_thread)
7227 (malloc_initialize_1, __malloc_initialize, morecore_nolock)
7228 (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
7229 (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
7230 (special_realloc, _realloc_internal_nolock, _realloc_internal)
7231 (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
7232 (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
7233 Define using prototypes, not old style.
7234 (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
7235 Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
7236 (align): Don't assume that signed integer overflow wraps around.
7237 Omit unused local var.
7238 (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
7239 (_free_internal_nolock, memalign, mallochook, reallochook):
7240 Omit no-longer-needed casts.
7241 (valloc): Use getpagesize, not __getpagesize.
7242 (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
7243 (struct hdr): The 'magic' member is now size_t, not unsigned long.
7245 * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
7247 2012-04-22 Michael Albinus <michael.albinus@gmx.de>
7249 Move functions from C to Lisp. Make non-blocking method calls
7250 the default. Implement further D-Bus standard interfaces.
7252 * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
7253 (QCdbus_request_name_allow_replacement)
7254 (QCdbus_request_name_replace_existing)
7255 (QCdbus_request_name_do_not_queue)
7256 (QCdbus_request_name_reply_primary_owner)
7257 (QCdbus_request_name_reply_in_queue)
7258 (QCdbus_request_name_reply_exists)
7259 (QCdbus_request_name_reply_already_owner): Move to dbus.el.
7260 (QCdbus_registered_serial, QCdbus_registered_method)
7261 (QCdbus_registered_signal): New Lisp objects.
7262 (XD_DEBUG_MESSAGE): Use sizeof.
7263 (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
7264 (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
7265 (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
7266 (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
7267 (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
7268 (xd_signature, xd_append_arg): Allow float for integer types.
7269 (xd_get_connection_references): New function.
7270 (xd_get_connection_address): Rename from xd_initialize.
7271 Return cached address.
7272 (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
7273 (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
7275 (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
7276 Return number of refcounts.
7277 (Fdbus_get_unique_name): Make stronger parameter check.
7278 (Fdbus_message_internal): New defun.
7279 (Fdbus_call_method, Fdbus_call_method_asynchronously)
7280 (Fdbus_method_return_internal, Fdbus_method_error_internal)
7281 (Fdbus_send_signal, Fdbus_register_service)
7282 (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
7283 (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
7284 (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
7285 (Vdbus_compiled_version, Vdbus_runtime_version)
7286 (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
7287 (Vdbus_message_type_method_return, Vdbus_message_type_error)
7288 (Vdbus_message_type_signal): New defvars.
7289 (Vdbus_registered_buses, Vdbus_registered_objects_table):
7292 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
7294 Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
7295 * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
7296 Do not assume ptrdiff_t is the same width as 'int'.
7298 * alloc.c: Handle unusual debugging option combinations.
7299 (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
7300 since the two debugging options are incompatible.
7301 (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
7303 (mem_init, mem_insert, mem_insert_fixup):
7304 Define if GC_MARK_STACK || GC_MALLOC_CHECK.
7305 (NEED_MEM_INSERT): Remove; no longer needed.
7307 2012-04-22 Leo Liu <sdl.web@gmail.com>
7309 * sysdep.c (list_system_processes): Support Darwin (Bug#5725).
7311 2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
7313 * sysdep.c [__FreeBSD__]: Minor cleanups.
7314 (list_system_processes, system_process_attributes) [__FreeBSD__]:
7315 Use Emacs indenting style more consistently. Avoid some casts.
7316 Use 'double' consistently rather than mixing 'float' and 'double'.
7318 2012-04-21 Eduard Wiebe <usenet@pusto.de>
7320 * sysdep.c (list_system_processes, system_process_attributes):
7321 Add implementation for FreeBSD (Bug#5243).
7323 2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
7325 * lisp.mk (lisp): Update.
7327 2012-04-20 Paul Eggert <eggert@cs.ucla.edu>
7329 * keyboard.c (process_pending_signals): Define only if SYNC_INPUT.
7330 It is never used otherwise.
7332 2012-04-20 Stefan Monnier <monnier@iro.umontreal.ca>
7334 * print.c (print_preprocess): Only check print_depth if print-circle
7336 (print_object): Check for cycles even when print-circle is nil and
7337 print-gensym is t, but only check print_depth if print-circle is nil.
7339 2012-04-20 Chong Yidong <cyd@gnu.org>
7341 * process.c (wait_reading_process_output): If EIO occurs on a pty,
7342 set the status to "failed" and ensure that sentinel is run.
7344 2012-04-20 Glenn Morris <rgm@gnu.org>
7346 * process.c (Fset_process_inherit_coding_system_flag)
7347 (Fset_process_query_on_exit_flag): Doc fix (mention return value).
7348 (Fmake_network_process, Fmake_serial_process): Doc fix.
7350 2012-04-20 Eli Zaretskii <eliz@gnu.org>
7352 * xdisp.c (string_buffer_position_lim): Limit starting position to
7354 (set_cursor_from_row): If called for a mode-line or header-line
7355 row, return zero immediately.
7356 (try_cursor_movement): If inside continuation line, don't back up
7357 farther than the first row after the header line, if any.
7358 Don't consider the header-line row as "partially visible", even if
7359 MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
7361 2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
7363 * lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n"
7366 2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
7367 2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
7369 configure: new option --enable-gcc-warnings (Bug#11207)
7370 * Makefile.in (C_WARNINGS_SWITCH): Remove.
7371 (WARN_CFLAGS, WERROR_CFLAGS): New macros.
7372 (ALL_CFLAGS): Use new macros rather than old.
7373 * process.c: Ignore -Wstrict-overflow to work around GCC bug 52904.
7374 * regex.c: Ignore -Wstrict-overflow. If !emacs, also ignore
7375 -Wunused-but-set-variable, -Wunused-function, -Wunused-macros,
7376 -Wunused-result, -Wunused-variable. This should go away once
7377 the Emacs and Gnulib regex code is merged.
7378 (xmalloc, xrealloc): Now static.
7380 2012-04-17 Paul Eggert <eggert@cs.ucla.edu>
7382 * dired.c (Fsystem_groups): Remove unused local.
7384 2012-04-17 Glenn Morris <rgm@gnu.org>
7386 * dired.c (Fsystem_users): Doc fix.
7388 2012-04-17 Dmitry Antipov <dmantipov@yandex.ru>
7390 * dired.c (Fsystem_users, Fsystem_groups): New functions. (Bug#7900)
7391 (syms_of_dired): Add them.
7393 2012-04-16 Paul Eggert <eggert@cs.ucla.edu>
7395 Fix minor alloc.c problems found by static checking.
7396 * alloc.c (_malloc_internal, _free_internal) [!DOUG_LEA_MALLOC]:
7397 New extern decls, to avoid calling undeclared functions.
7398 (dont_register_blocks): Define if ((!SYSTEM_MALLOC && !SYNC_INPUT)
7399 && GC_MALLOC_CHECK), not if ((GC_MARK_STACK || defined
7400 GC_MALLOC_CHECK) && GC_MALLOC_CHECK), to match when it's used.
7401 (NEED_MEM_INSERT): New macro.
7402 (mem_insert, mem_insert_fixup) [!NEED_MEM_INSERT]: Remove; unused.
7403 Remove one incorrect comment and fix another.
7405 Fix minor ralloc.c problems found by static checking.
7406 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
7407 * ralloc.c (ALIGNED, ROUND_TO_PAGE, HEAP_PTR_SIZE)
7408 (r_alloc_size_in_use, r_alloc_freeze, r_alloc_thaw): Remove; unused.
7409 (r_alloc_sbrk): Now static.
7411 Improve ralloc.c interface checking.
7412 See http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00720.html
7413 * buffer.c (ralloc_reset_variable, r_alloc, r_re_alloc)
7414 (r_alloc_free) [REL_ALLOC]: Move decls from here ...
7415 * lisp.h (r_alloc, r_alloc_free, r_re_alloc, r_alloc_reset_variable)
7416 [REL_ALLOC]: ... to here, to check interface.
7417 * m/ia64.h (r_alloc, r_alloc_free) [REL_ALLOC && !_MALLOC_INTERNAL]:
7418 Remove decls. This fixes an "It stinks!".
7420 * alloc.c (which_symbols): Fix alignment issue / type clash.
7422 2012-04-15 Andreas Schwab <schwab@linux-m68k.org>
7424 * lisp.h (struct Lisp_Symbol): Remove explicit padding.
7425 (struct Lisp_Misc_Any): Likewise.
7426 (struct Lisp_Free): Likewise.
7427 * alloc.c (union aligned_Lisp_Symbol): Define.
7428 (SYMBOL_BLOCK_SIZE, struct symbol_block): Use union
7429 aligned_Lisp_Symbol instead of struct Lisp_Symbol.
7430 (union aligned_Lisp_Misc): Define.
7431 (MARKER_BLOCK_SIZE, struct marker_block): Use union
7432 aligned_Lisp_Misc instead of union Lisp_Misc.
7433 (Fmake_symbol, allocate_misc, gc_sweep): Adjust.
7435 2012-04-14 Paul Eggert <eggert@cs.ucla.edu>
7437 Make GC_MAKE_GCPROS_NOOPS the default (Bug#9926).
7438 * lisp.h (GC_MARK_STACK): Default to GC_MAKE_GCPROS_NOOPS.
7439 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/gnu.h, s/irix6-5.h, s/msdos.h:
7440 * s/netbsd.h, s/sol2-6.h:
7441 Remove definition of GC_MARK_STACK, since the default now works.
7442 * s/aix4-2.h, s/hpux10-20.h, s/unixware.h:
7443 Define GC_MARK_STACK to GC_USE_GCPROS_AS_BEFORE, since that's
7444 no longer the default.
7445 * s/gnu-linux.h (GC_MARK_STACK): Adjust to change in default.
7447 2012-04-14 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
7449 * lread.c (lisp_file_lexically_bound_p):
7450 Fix hang at ";-*-\n" (bug#11238).
7452 2012-04-14 Eli Zaretskii <eliz@gnu.org>
7454 * xdisp.c (find_last_unchanged_at_beg_row): Don't consider a row
7455 "unchanged" if its end.pos is beyond ZV. (Bug#11199)
7457 2012-04-14 Jan Djärv <jan.h.d@swipnet.se>
7459 * nsterm.m (constrainFrameRect): Always constrain when there is only
7460 one screen (Bug#10962).
7462 2012-04-13 Ken Brown <kbrown@cornell.edu>
7464 * s/cygwin.h (PTY_OPEN): Don't try to close a bogus file descriptor.
7466 2012-04-13 Reuben Thomas <rrt@sc3d.org>
7468 * indent.c (Fmove_to_column): Change interactive spec (Bug#739).
7470 2012-04-11 Daniel Colascione <dancol@dancol.org>
7472 * s/cygwin.h: The vfork the #define in cygwin.h was protecting
7473 against is gone. It's better to use vfork now so that when Cygwin
7474 gains a new, working vfork, we use it automatically (bug#10398).
7476 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
7478 * window.c (save_window_save): Obey window-point-insertion-type.
7480 2012-04-11 Glenn Morris <rgm@gnu.org>
7482 * Makefile.in (GNUSTEP_CFLAGS): Rename from C_SWITCH_X_SYSTEM.
7484 2012-04-11 Stefan Monnier <monnier@iro.umontreal.ca>
7486 * alloc.c (lisp_align_malloc): Remove unneeded prototype.
7488 2012-04-10 Jason S. Cornez <jcornez@ravenpack.com> (tiny change)
7490 * keyboard.c: Override inhibit-quit after the third C-g (bug#6585).
7491 (force_quit_count): New var.
7492 (handle_interrupt): Use it.
7494 2012-04-10 Juanma Barranquero <lekktu@gmail.com>
7496 * w32.c (w32_delayed_load): Record the full path of the library
7497 being loaded (bug#10424).
7499 2012-04-09 Glenn Morris <rgm@gnu.org>
7501 * doc.c (Fsnarf_documentation): Check variables, functions are bound,
7502 not just in the obarray, before snarfing them. (Bug#11036)
7504 * Makefile.in ($(leimdir)/leim-list.el):
7505 Pass EMACS rather than BUILT_EMACS.
7507 2012-04-09 Teodor Zlatanov <tzz@lifelogs.com>
7509 * process.c (make_process):
7510 * process.h: Add integer `gnutls_handshakes_tried' member to
7513 * gnutls.h: Add `GNUTLS_EMACS_HANDSHAKES_LIMIT' upper limit.
7514 Add convenience `GNUTLS_LOG2i' macro.
7516 * gnutls.c (gnutls_log_function2i): Convenience log function.
7517 (emacs_gnutls_read): Use new log functions,
7518 `gnutls_handshakes_tried' process member, and
7519 `GNUTLS_EMACS_HANDSHAKES_LIMIT' to limit the number of handshake
7520 attempts per process (connection).
7522 2012-04-09 Chong Yidong <cyd@gnu.org>
7524 * eval.c (Fuser_variable_p, user_variable_p_eh)
7525 (lisp_indirect_variable): Functions deleted.
7526 (Fdefvar): Caller changed.
7528 * callint.c (Finteractive, Fcall_interactively):
7529 * minibuf.c (Fread_variable): Callers changed.
7531 2012-04-09 Eli Zaretskii <eliz@gnu.org>
7533 * xdisp.c (set_cursor_from_row): If the display string appears in
7534 the buffer at position that is closer to point than the position
7535 after the display string, display the cursor on the first glyph of
7536 the display string. Fixes cursor display when a 'display' text
7537 property immediately follows invisible text. (Bug#11094)
7539 2012-04-09 Paul Eggert <eggert@cs.ucla.edu>
7541 composite.c: use 'double' consistently
7542 * composite.c (get_composition_id): Use 'double' consistently
7543 instead of converting 'float' to 'double' and vice versa; this is
7544 easier to understand and avoids a GCC warning.
7546 2012-04-09 Glenn Morris <rgm@gnu.org>
7548 * Makefile.in: Generate leim-list with bootstrap-emacs, in
7549 preparation for dumping it with emacs. (Bug#4789)
7550 (leimdir): New variable.
7551 ($(leimdir)/leim-list.el): New rule.
7552 (emacs$(EXEEXT)): Depend on leim-list.el.
7554 * buffer.c (Qucs_set_table_for_input): Remove. (Bug#9821)
7555 (Fget_buffer_create): Don't call Qucs_set_table_for_input.
7556 (init_buffer_once, syms_of_buffer): Remove Qucs_set_table_for_input.
7558 2012-04-08 Andreas Schwab <schwab@linux-m68k.org>
7560 * lisp.h (struct Lisp_Symbol): Add explicit padding to ensure
7563 2012-04-07 Juanma Barranquero <lekktu@gmail.com>
7565 * xml.c (init_libxml2_functions) [WINDOWSNT]:
7566 Remove unused local variable.
7568 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
7570 Avoid unnecessary pointer scanning in garbage collection (Bug#10780).
7571 * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS): New macro.
7572 (mark_memory): Mark Lisp_Objects only if pointers might hide in
7573 objects, as mark_maybe_pointer will catch them otherwise.
7574 (GC_LISP_OBJECT_ALIGNMENT): Remove; no longer needed.
7575 * s/gnu-linux.h (GC_LISP_OBJECT_ALIGNMENT) [__mc68000__]: Likewise.
7577 2012-04-07 Paul Eggert <eggert@cs.ucla.edu>
7579 Fix typo that broke non-Windows builds.
7580 * xml.c (libxml2_loaded_p) [!!WINDOWSNT]: 'inine' -> 'inline'.
7582 2012-04-07 Eli Zaretskii <eliz@gnu.org>
7584 Support building on MS-Windows with libxml2.
7586 * makefile.w32-in (OBJ2): Add xml.$(O).
7587 (GLOBAL_SOURCES): Add xml.c.
7588 ($(BLD)/xml.$(O)): New dependency list.
7590 * xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
7591 (fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
7592 (fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
7593 [!WINDOWSNT]: New macros.
7594 (init_libxml2_functions, libxml2_loaded_p): New functions.
7595 (parse_region): Call fn_xmlCheckVersion instead of using the macro
7596 LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
7597 (xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
7598 Calls xmlCleanupParser only if libxml2 was loaded (or statically
7600 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
7601 Call init_libxml2_functions before calling libxml2 functions.
7602 (syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
7604 * emacs.c: Don't include libxml/parser.h.
7605 (shut_down_emacs): Call xml_cleanup_parser, instead of calling
7606 xmlCleanupParser directly.
7608 * lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
7610 2012-04-07 Eli Zaretskii <eliz@gnu.org>
7612 * indent.c (Fvertical_motion): If there is a display string at
7613 point, use it.vpos to compute how many lines to backtrack after
7614 move_it_to point. (Bug#11133)
7616 2012-04-06 Eli Zaretskii <eliz@gnu.org>
7618 * buffer.h (FETCH_CHAR, FETCH_MULTIBYTE_CHAR):
7619 * character.h (STRING_CHAR, STRING_CHAR_AND_LENGTH): Add comments
7620 about subtle differences between FETCH_CHAR* and STRING_CHAR*
7621 macros related to unification of CJK characters. For the details,
7622 see the discussion following the message here:
7623 http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11073#14.
7625 2012-04-04 Chong Yidong <cyd@gnu.org>
7627 * keyboard.c (Vdelayed_warnings_list): Doc fix.
7629 2012-04-01 Eli Zaretskii <eliz@gnu.org>
7631 * w32menu.c (simple_dialog_show, add_menu_item): Use SAFE_ALLOCA
7632 instead of alloca. (Bug#11138)
7634 2012-04-01 Andreas Schwab <schwab@linux-m68k.org>
7636 * w32menu.c (is_simple_dialog): Properly check lisp types.
7639 2012-03-31 Eli Zaretskii <eliz@gnu.org>
7641 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
7642 position we get to after a call to move_it_to fails the
7643 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
7644 only if we wind up in a string from display property. (Bug#11063)
7646 * window.c (Fdelete_other_windows_internal): Invalidate the row
7647 and column information about mouse highlight, so that redisplay
7648 restores it after reallocating the glyph matrices. (Bug#7464)
7650 * xdisp.c (set_cursor_from_row): If `cursor' property on a display
7651 string comes from a `display' text property, use the buffer
7652 position of that property as if we actually saw that position in
7654 (move_it_by_lines): Remove the assertion that
7655 "it->current_x == 0 && it->hpos == 0" which can be legitimately
7656 violated when there's a before-string at the beginning of a line.
7659 2012-03-30 Eli Zaretskii <eliz@gnu.org>
7661 * xdisp.c (append_space_for_newline): If the default face was
7662 remapped, use the remapped face for the appended newline.
7663 (extend_face_to_end_of_line): Use the remapped default face for
7664 extending the face to the end of the line.
7665 (display_line): Call extend_face_to_end_of_line when the default
7666 face was remapped. (Bug#11068)
7668 2012-03-29 Eli Zaretskii <eliz@gnu.org>
7670 * s/ms-w32.h: Discourage from defining HAVE_GETCWD.
7672 2012-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
7674 * keyboard.c (safe_run_hooks_error): Don't unquote strings.
7676 2012-03-27 Glenn Morris <rgm@gnu.org>
7678 * search.c (Fword_search_backward_lax, Fword_search_forward_lax):
7681 2012-03-26 Kenichi Handa <handa@m17n.org>
7683 * dispextern.h (struct glyph): Fix previous change. Change the
7684 bit length of glyphless.ch to 25 (Bug#11082).
7686 2012-03-26 Chong Yidong <cyd@gnu.org>
7688 * keyboard.c (Vselection_inhibit_update_commands): New variable.
7689 (command_loop_1): Use it; inhibit selection update for
7690 handle-select-window too (Bug#8996).
7692 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr>
7694 * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific code.
7696 2012-03-25 Kenichi Handa <handa@m17n.org>
7698 * dispextern.h (struct glyph): Change the bit length of
7699 glyphless.ch to 22 to make the member glyphless fit in 32 bits.
7701 2012-03-24 Eli Zaretskii <eliz@gnu.org>
7703 * s/ms-w32.h (tzname): Include time.h before redirecting to
7704 _tzname. Fixes the MSVC build. (Bug#9960)
7706 2012-03-24 Andreas Schwab <schwab@linux-m68k.org>
7708 * xdisp.c (produce_glyphless_glyph): Limit length of acronym to 6
7711 * xterm.c (XTread_socket): Only modify handling_signal if
7712 !SYNC_INPUT. (Bug#11080)
7714 2012-03-23 Eli Zaretskii <eliz@gnu.org>
7716 * bidi.c (bidi_fetch_char): Use STRING_CHAR_AND_LENGTH instead of
7717 FETCH_MULTIBYTE_CHAR followed by CHAR_BYTES. Prevents crashes
7718 when fetching a multibyte character consumes more bytes than
7719 CHAR_BYTES returns, due to unification of CJK characters in
7720 string_char. (Bug#11073)
7722 2012-03-23 Troels Nielsen <bn.troels@gmail.com> (tiny change)
7724 * process.c (wait_reading_process_output): Handle pty disconnect
7725 by refraining from sending oneself a SIGCHLD (bug#10933).
7727 2012-03-22 Chong Yidong <cyd@gnu.org>
7729 * dispextern.h (struct it): New member string_from_prefix_prop_p.
7731 * xdisp.c (push_prefix_prop): Rename from push_display_prop.
7732 Mark string as coming from a prefix property.
7733 (handle_face_prop): Use default face for prefix strings (Bug#4281).
7734 (pop_it, reseat_1): Save and restore string_from_prefix_prop_p.
7736 2012-03-21 Chong Yidong <cyd@gnu.org>
7738 * xfaces.c (Vface_remapping_alist): Doc fix.
7740 2012-03-20 Eli Zaretskii <eliz@gnu.org>
7742 * w32proc.c (Fw32_set_console_codepage)
7743 (Fw32_set_console_output_codepage, Fw32_get_codepage_charset):
7746 2012-03-20 Chong Yidong <cyd@gnu.org>
7748 * dispnew.c (Fredisplay, Vredisplay_preemption_period): Update doc
7749 to reflect default non-nil value of redisplay-dont-pause.
7751 2012-03-19 Kenichi Handa <handa@m17n.org>
7753 * ftfont.c (ftfont_drive_otf): Mask bits of character code to make
7754 it fit in a valid range (Bug#11003).
7756 2012-03-18 Eli Zaretskii <eliz@gnu.org>
7758 * xdisp.c (cursor_row_p): Even if the glyph row ends in a string
7759 that is not from display property, accept the row as a "cursor
7760 row" if one of the string's character has a non-nil `cursor'
7761 property. Fixes cursor positioning when there are newlines in
7762 overlay strings, e.g. in icomplete.el. (Bug#11035)
7764 2012-03-12 Paul Eggert <eggert@cs.ucla.edu>
7766 * buffer.c (compare_overlays): Don't assume args differ (Bug#6830).
7768 2012-03-12 Chong Yidong <cyd@gnu.org>
7770 * eval.c (inhibit_lisp_code): Rename from
7771 inhibit_window_configuration_change_hook; move from window.c.
7773 * xfns.c (unwind_create_frame_1, Fx_create_frame):
7774 * window.c (run_window_configuration_change_hook)
7775 (syms_of_window): Callers changed.
7777 2012-03-11 Chong Yidong <cyd@gnu.org>
7779 * keymap.c (Fkey_description): Doc fix (Bug#9700).
7781 * editfns.c (Fconstrain_to_field): Doc fix (Bug#9452).
7783 2012-03-10 Chong Yidong <cyd@gnu.org>
7785 * frame.c (other_visible_frames): Don't assume the selected frame
7786 is visible (Bug#10955).
7788 2012-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
7790 * buffer.c (compare_overlays): Avoid qsort's instability (bug#6830).
7792 2012-03-08 Jan Djärv <jan.h.d@swipnet.se>
7794 * gtkutil.c (x_wm_set_size_hint): Use one row in call to
7795 FRAME_TEXT_LINES_TO_PIXEL_HEIGHT so base_height is greater than
7798 2012-03-03 Glenn Morris <rgm@gnu.org>
7800 * alloc.c (Fgarbage_collect, misc-objects-consed): Doc fixes.
7802 2012-03-02 Eli Zaretskii <eliz@gnu.org>
7804 * xdisp.c (try_window_reusing_current_matrix): Don't move cursor
7805 position past the first glyph_row that ends at ZV. (Bug#10902)
7806 (redisplay_window, next_element_from_string): Fix typos in
7808 (redisplay_window): Pass to move_it_vertically the margin in
7809 pixels, not in screen lines.
7811 2012-03-02 Glenn Morris <rgm@gnu.org>
7813 * buffer.c (buffer-list-update-hook): Doc fix.
7815 2012-02-29 Eli Zaretskii <eliz@gnu.org>
7817 * xdisp.c (get_overlay_strings_1): Under bidi redisplay, call
7818 push_it before setting up the iterator for the first overlay
7819 string, even if we have an empty string loaded.
7820 (next_overlay_string): If there's an empty string on the iterator
7821 stack, pop the stack. (Bug#10903)
7823 2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
7825 Generalize fix for crash due to non-contiguous EMACS_INT (Bug#10780).
7826 Suggested by Stefan Monnier in
7827 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00692.html>.
7828 * alloc.c (widen_to_Lisp_Object): New static function.
7829 (mark_memory): Also mark Lisp_Objects by fetching pointer words
7830 and widening them to Lisp_Objects. This would work even if
7831 USE_LSB_TAG is defined and wide integers are used, which might
7832 happen in a future version of Emacs.
7834 2012-02-25 Chong Yidong <cyd@gnu.org>
7836 * fileio.c (Ffile_selinux_context, Fset_file_selinux_context):
7839 * xselect.c (Fx_selection_exists_p): Doc fix.
7840 (x_clipboard_manager_save_all): Print an informative message
7841 before saving to clipboard manager.
7843 2012-02-24 Chong Yidong <cyd@gnu.org>
7845 * keyboard.c (process_special_events): Handle all X selection
7846 requests in kbd_buffer, not just the next one (Bug#8869).
7848 2012-02-23 Chong Yidong <cyd@gnu.org>
7850 * xfns.c (Fx_create_frame): Avoid window-configuration-change-hook
7851 call when setting menu-bar-lines and tool-bar-lines parameters.
7852 (unwind_create_frame_1): New helper function.
7854 * window.c (inhibit_window_configuration_change_hook): New var.
7855 (run_window_configuration_change_hook): Obey it.
7856 (syms_of_window): Initialize it.
7858 2012-02-22 Chong Yidong <cyd@gnu.org>
7860 * xterm.c (x_draw_image_relief): Add missing type check for
7861 Vtool_bar_button_margin (Bug#10743).
7863 2012-02-21 Chong Yidong <cyd@gnu.org>
7865 * fileio.c (Vfile_name_handler_alist): Doc fix.
7867 * buffer.c (Fget_file_buffer): Protect against invalid file
7868 handler return value.
7870 2012-02-20 Paul Eggert <eggert@cs.ucla.edu>
7872 * .gdbinit (xreload): Don't assume EMACS_INT fits in 'long'
7873 when computing $valmask.
7875 Fix crash due to non-contiguous EMACS_INT (Bug#10780).
7876 * lisp.h (VALBITS): Move definition up, so that USE_LSB_TAG can use it.
7877 (USE_LSB_TAG): Do not define if UINTPTR_MAX >> VALBITS == 0.
7878 It's useless in that case, and it can cause problems on hosts
7879 that allocate halves of EMACS_INT values separately.
7880 Reported by Dan Horák. Diagnosed by Andreas Schwab in
7881 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10780#30>.
7882 * mem-limits.h (EXCEEDS_LISP_PTR): Define to 0 on hosts where
7883 UINTPTR_MAX >> VALBITS == 0. This is required by the above change;
7884 it avoids undefined behavior on hosts where shifting right by more
7885 than the word width has undefined behavior.
7887 2012-02-19 Chong Yidong <cyd@gnu.org>
7889 * fileio.c (Ffile_name_directory, Ffile_name_nondirectory)
7890 (Funhandled_file_name_directory, Ffile_name_as_directory)
7891 (Fdirectory_file_name, Fexpand_file_name)
7892 (Fsubstitute_in_file_name): Protect against invalid file handler
7893 return values (Bug#10845).
7895 2012-02-18 Eli Zaretskii <eliz@gnu.org>
7897 * .gdbinit (pitx): Fix incorrect references to fields of the
7900 2012-02-17 Chong Yidong <cyd@gnu.org>
7902 * syntax.c (Fscan_lists): Doc fix (Bug#10833).
7904 2012-02-15 Paul Eggert <eggert@cs.ucla.edu>
7906 * image.c (MAX_IMAGE_SIZE): Increase from 6.0 to 10.0; see
7907 <http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00540.html>.
7909 2012-02-15 Chong Yidong <cyd@gnu.org>
7911 * eval.c (Fdefvar, Fdefconst): Doc fix; note that the variable is
7912 marked as special. Also, starting docstrings with * is obsolete.
7914 2012-02-13 Andreas Schwab <schwab@linux-m68k.org>
7916 * gnutls.c (emacs_gnutls_write): Fix last change.
7918 2012-02-13 Lars Ingebrigtsen <larsi@gnus.org>
7920 * gnutls.c (emacs_gnutls_write): Set errno appropriately for
7923 2012-02-13 Stefan Monnier <monnier@iro.umontreal.ca>
7925 * keymap.c (Fsingle_key_description): Handle char ranges.
7927 2012-02-12 Chong Yidong <cyd@gnu.org>
7929 * xdisp.c (handle_stop): Avoid assigning -1 to it->face_id here,
7930 as that creates a dangerous corner case.
7932 * window.c (Fdelete_window_internal): Invalidate the mouse
7933 highlight (Bug#9904).
7935 2012-02-12 Glenn Morris <rgm@gnu.org>
7937 * xselect.c (Fx_own_selection_internal)
7938 (Fx_get_selection_internal, Fx_disown_selection_internal)
7939 (Fx_selection_owner_p, Fx_selection_exists_p): Doc fixes.
7940 * nsselect.m (Fx_own_selection_internal)
7941 (Fx_disown_selection_internal, Fx_selection_exists_p)
7942 (Fx_selection_owner_p, Fx_get_selection_internal):
7943 Sync docs and argument specs with the xselect.c versions.
7945 2012-02-11 Lars Ingebrigtsen <larsi@gnus.org>
7947 * gnutls.c (emacs_gnutls_write): Don't infloop if sendto fails.
7949 2012-02-11 Eli Zaretskii <eliz@gnu.org>
7951 * w32select.c (Fx_selection_exists_p): Sync doc string and
7952 argument list with xselect.c. (Bug#10783)
7954 * w16select.c (Fx_selection_exists_p): Sync doc string and
7955 argument list with xselect.c. (Bug#10783)
7957 2012-02-10 Glenn Morris <rgm@gnu.org>
7959 * fns.c (Fsecure_hash): Doc fix.
7961 2012-02-09 Kenichi Handa <handa@m17n.org>
7963 * coding.c (produce_chars): Fix updating of src_end (Bug#10701).
7965 2012-02-07 Chong Yidong <cyd@gnu.org>
7967 * buffer.c (Fbuffer_local_variables)
7968 (buffer_lisp_local_variables): Handle unbound vars correctly;
7969 don't let Qunbound leak into Lisp.
7971 2012-02-07 Glenn Morris <rgm@gnu.org>
7973 * image.c (Fimagemagick_types): Doc fix.
7975 * image.c (imagemagick-render-type): Change it from a lisp object
7976 to an integer. Move the doc here from the lisp manual.
7977 Treat all values not equal to 0 the same.
7979 2012-02-06 Chong Yidong <cyd@gnu.org>
7981 * doc.c (store_function_docstring): Avoid applying docstring of
7982 alias to base function (Bug#2603).
7984 2012-02-04 Andreas Schwab <schwab@linux-m68k.org>
7986 * .gdbinit (pp1, pv1): Remove redundant defines.
7989 2012-02-04 Chong Yidong <cyd@gnu.org>
7991 * nsterm.m: Declare a global (Bug#10694).
7993 2012-02-04 Eli Zaretskii <eliz@gnu.org>
7995 * w32.c (get_emacs_configuration_options):
7996 Include --enable-checking, if specified, in the return value.
7998 2012-02-04 Martin Rudalics <rudalics@gmx.at>
8000 * dispnew.c (change_frame_size_1): Calculate new_frame_total_cols
8001 after rounding frame sizes. (Bug#9723)
8003 2012-02-04 Eli Zaretskii <eliz@gnu.org>
8005 * keyboard.c (adjust_point_for_property): Don't position point
8006 before BEGV. (Bug#10696)
8008 2012-02-03 Paul Eggert <eggert@cs.ucla.edu>
8010 Handle overflow when computing char display width (Bug#9496).
8011 * character.c (char_width): Return EMACS_INT, not int.
8012 (char_width, c_string_width): Check for overflow when
8013 computing the width; this is possible now that individual
8014 characters can have unbounded width. Problem introduced
8015 by merge from Emacs 23 on 2012-01-19.
8017 2012-02-02 Michael Albinus <michael.albinus@gmx.de>
8019 * dbusbind.c (Fdbus_register_method): Mention the return value
8020 :ignore in the docstring.
8022 2012-02-02 Glenn Morris <rgm@gnu.org>
8024 * callproc.c (Fcall_process, Fcall_process_region): Doc fix.
8026 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
8027 Unconditionally set to t. (Bug#10673)
8028 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
8029 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
8030 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Doc fix.
8032 2012-02-02 Kenichi Handa <handa@m17n.org>
8034 (x_produce_glyphs): Cancel previous change. If cmp->glyph_len is
8035 0, do not call append_composite_glyph.
8037 2012-02-02 Kenichi Handa <handa@m17n.org>
8039 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING): Initialize first_s to
8041 (x_produce_glyphs): If the component of a composition is a null
8042 string, set it->pixel_width to 1 to avoid zero-width glyph.
8044 2012-02-01 Eli Zaretskii <eliz@gnu.org>
8046 * ralloc.c (resize_bloc, r_alloc_sbrk): Don't call memmove if its
8047 first 2 arguments are identical. This makes inserting large
8048 output from a subprocess an order of magnitude faster on
8049 MS-Windows, where all sbrk'ed memory is always contiguous.
8051 2012-01-31 Glenn Morris <rgm@gnu.org>
8053 * nsterm.m (syms_of_nsterm) <x-toolkit-scroll-bars>:
8054 * w32term.c (syms_of_w32term) <x-toolkit-scroll-bars>:
8055 * xterm.c (syms_of_xterm) <x-toolkit-scroll-bars>: Sync docs.
8057 2012-01-29 Glenn Morris <rgm@gnu.org>
8059 * gnutls.c (syms_of_gnutls): More doc (from etc/NEWS).
8061 2012-01-28 Samuel Thibault <sthibault@debian.org> (tiny change)
8063 * s/gnu.h: Define POSIX_SIGNALS (Bug#10552).
8065 2012-01-28 Chong Yidong <cyd@gnu.org>
8067 * minibuf.c (syms_of_minibuf): Doc fix (Bug#10550).
8069 2012-01-26 Chong Yidong <cyd@gnu.org>
8071 * keyboard.c (Vecho_keystrokes): Document zero value (Bug#10503).
8073 * search.c (Fsearch_forward, Fsearch_backward): Document negative
8074 repeat counts (Bug#10507).
8076 2012-01-26 Glenn Morris <rgm@gnu.org>
8078 * lread.c (syms_of_lread): Doc fix.
8080 2012-01-25 HIROSHI OOTA <nil@mad.dog.cx> (tiny change)
8082 * coding.c (encode_designation_at_bol): Change return value to
8085 2012-01-25 Chong Yidong <cyd@gnu.org>
8087 * eval.c (Fuser_variable_p): Doc fix; mention custom-variable-p.
8089 2012-01-21 Chong Yidong <cyd@gnu.org>
8091 * floatfns.c (Fcopysign): Make the second argument non-optional,
8092 since nil is not allowed anyway.
8094 2012-01-21 Andreas Schwab <schwab@linux-m68k.org>
8096 * process.c (read_process_output): Use p instead of XPROCESS (proc).
8097 (send_process): Likewise.
8099 2012-01-19 Martin Rudalics <rudalics@gmx.at>
8101 * window.c (save_window_save, Fcurrent_window_configuration)
8102 (Vwindow_persistent_parameters): Do not use Qstate.
8103 Rewrite doc-strings.
8105 2012-01-19 Kenichi Handa <handa@m17n.org>
8107 * character.c (char_width): New function.
8108 (Fchar_width, c_string_width, lisp_string_width):
8109 Use char_width (Bug#9496).
8111 2012-01-16 Martin Rudalics <rudalics@gmx.at>
8113 * window.c (Vwindow_persistent_parameters): New variable.
8114 (Fset_window_configuration, save_window_save): Handle persistent
8117 2012-01-14 Eli Zaretskii <eliz@gnu.org>
8119 * w32fns.c (signal_user_input): Don't do a QUIT, to avoid
8120 thrashing the stack of the thread. (Bug#9087)
8122 2012-01-12 Paul Eggert <eggert@cs.ucla.edu>
8124 * xdisp.c (rows_from_pos_range): Add parens as per gcc -Wparentheses.
8126 2012-01-11 Eli Zaretskii <eliz@gnu.org>
8128 * xdisp.c (rows_from_pos_range): Handle the case where the
8129 highlight ends on a newline. (Bug#10464)
8130 (mouse_face_from_buffer_pos): Fix off-by-one error in calculating
8131 he end column for display of highlight that ends on a newline
8134 2012-01-11 Glenn Morris <rgm@gnu.org>
8136 * lread.c (init_lread): If no-site-lisp, remove site-lisp dirs
8137 from load-path also when installation-directory is nil. (Bug#10208)
8139 2012-01-10 Glenn Morris <rgm@gnu.org>
8141 * emacs.c (syms_of_emacs) <installation-directory>: Doc fix.
8143 * epaths.in (PATH_LOADSEARCH, PATH_EXEC, PATH_DATA, PATH_DOC):
8144 Update template values to be closer to their typical values these days.
8146 2012-01-09 Eli Zaretskii <eliz@gnu.org>
8148 * xdisp.c (rows_from_pos_range): Accept additional argument
8149 DISP_STRING, and accept any glyph in a row whose object is that
8150 string as eligible for mouse highlight. Fixes mouse highlight of
8151 display strings from overlays. (Bug#10464)
8153 2012-01-07 Paul Eggert <eggert@cs.ucla.edu>
8155 emacs: fix an auto-save permissions race condition (Bug#10400)
8156 * fileio.c (auto_saving_dir_umask): New static var.
8157 (Fmake_directory_internal): Use it.
8158 (do_auto_save_make_dir): Set it, instead of invoking chmod after
8159 creating the directory. The old code temporarily assigns
8160 too-generous permissions to the directory.
8161 (do_auto_save_eh): Clear it.
8162 (Fdo_auto_save): Catch all errors, not just file errors, so
8163 that the var is always cleared.
8165 2012-01-07 Eli Zaretskii <eliz@gnu.org>
8167 * search.c (scan_buffer): Pass character positions to
8168 know_region_cache, not byte positions. (Bug#6540)
8170 2012-01-07 LynX <_LynX@bk.ru> (tiny change)
8172 * w32.c (sys_rename): Report EXDEV when rename of a directory
8173 fails because the target is on another logical disk. (Bug#10284)
8175 2012-01-07 David Benjamin <davidben@mit.edu> (tiny change)
8177 * xterm.c (x_embed_request_focus): New function.
8179 * xterm.h: Add prototype.
8181 * xfns.c (Fx_focus_frame): Use it for embedded frames (Bug#9977).
8183 2012-01-05 Glenn Morris <rgm@gnu.org>
8185 * emacs.c (emacs_copyright): Update short copyright year to 2012.
8187 2012-01-01 Eli Zaretskii <eliz@gnu.org>
8189 * gnutls.c (init_gnutls_functions): Load gnutls_check_version.
8190 Load gnutls_transport_set_lowat only if GnuTLS version is below
8192 (emacs_gnutls_handshake): Call gnutls_transport_set_lowat only for
8193 GnuTLS versions below 2.11.1.
8195 2011-12-31 Antoine Levitt <antoine.levitt@gmail.com>
8197 * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Add warning
8198 to the doc string advising against its use for altering the way
8199 windows are scrolled.
8201 2011-12-28 Kenichi Handa <handa@m17n.org>
8203 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
8204 coding-system ASCII compatible only when it does not produce BOM
8205 on encoding (Bug#10383).
8207 2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
8209 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
8211 (create_and_show_popup_menu): Always use menu_position_func for
8214 2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
8216 * callint.c (Fcall_interactively): Don't truncate prompt string.
8218 2011-12-23 Eli Zaretskii <eliz@gnu.org>
8220 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
8221 property that ends at ZV, so that the bidi iteration could be
8222 resumed from there (after widening). (Bug#10360)
8224 2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
8226 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
8228 2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
8230 * nsterm.m (x_free_frame_resources):
8231 Release f->output_data.ns->miniimage.
8232 (ns_index_color): Fix indentation. Do not retain
8233 color_table->colors[i].
8235 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
8238 * nsfns.m (x_set_background_color): Assign return value from
8239 ns_index_color to face-background instead of NSColor*.
8240 (ns_implicitly_set_icon_type): Fix indentation.
8241 Change assignment in for loop to comparison.
8243 * emacs.c (ns_pool): New variable.
8244 (main): Assign ns_pool.
8245 (Fkill_emacs): Call ns_release_autorelease_pool.
8247 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
8248 autorelease fdesc, release fdAttrs and tdict.
8249 (ns_get_covering_families): Release charset.
8250 (ns_findfonts): Release NSFontDescriptor created with new.
8251 (ns_uni_to_glyphs): Fix indentation.
8252 (setString): Release attrStr before assigning new value.
8254 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
8256 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
8258 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
8259 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
8261 2011-12-18 David Reitter <reitter@cmu.edu>
8263 * nsterm.m (ns_term_init): Subscribe for notifications
8264 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
8265 to method trackingNotification in EmacsMenu.
8267 * nsmenu.m (trackingMenu): New variable.
8268 (trackingNotification): New method (from Aquamacs).
8269 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
8270 from Aquamacs (Bug#7030).
8272 2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
8274 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
8275 (symbol_to_nsstring): Fix indentation.
8276 (ns_symbol_to_pb): New function.
8277 (Fns_get_selection_internal): Rename from Fns_get_cut_buffer_internal.
8278 (Fns_rotate_cut_buffers_internal): Remove.
8279 (Fns_store_selection_internal): Rename from
8280 Fns_store_cut_buffer_internal.
8281 (ns_get_foreign_selection, Fx_own_selection_internal)
8282 (Fx_disown_selection_internal, Fx_selection_exists_p)
8283 (Fns_get_selection_internal, Fns_store_selection_internal):
8284 Use ns_symbol_to_pb and check if return value is nil.
8285 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove defsubr
8286 Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
8287 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
8288 renamed to Sns_store_selection_internal.
8289 (ns_handle_selection_request): Move code to Fx_own_selection_internal
8290 and remove this function.
8291 (ns_handle_selection_clear): Remove, never used.
8292 (Fx_own_selection_internal): Move code from ns_handle_selection_request
8295 2011-12-17 Ken Brown <kbrown@cornell.edu>
8297 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
8298 GID is unknown (Bug#10257).
8300 2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
8302 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
8303 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
8304 which caused a build failure on GNU/Linux IA-64. This problem was
8305 introduced by my 2011-10-07 patch.
8307 2011-12-15 Juri Linkov <juri@jurta.org>
8309 * image.c (imagemagick_error): New function. (Bug#10112)
8310 (imagemagick_load_image): Comment out `MagickSetResolution' call.
8311 Use `imagemagick_error' where ImageMagick functions return
8313 (Fimagemagick_types): Add `Fnreverse' to return the list in the
8316 2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8318 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
8319 fill background (Bug#8992).
8321 2011-12-13 Martin Rudalics <rudalics@gmx.at>
8323 * window.c (Vwindow_combination_resize)
8324 (Vwindow_combination_limit): Use t instead of non-nil in
8326 (Vrecenter_redisplay): Add first sentence of doc-string on
8328 (Frecenter): Fix doc-string typo.
8330 2011-12-11 Kenichi Handa <handa@m17n.org>
8332 * coding.c (Funencodable_char_position): Pay attention to the
8333 buffer text relocation (Bug#9389).
8335 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
8337 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
8338 gtk_init (Bug#10100).
8340 2011-12-10 Eli Zaretskii <eliz@gnu.org>
8342 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
8343 IT->string is nil. (Bug#10263)
8345 2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
8347 * nsterm.h (x_free_frame_resources): Declare.
8349 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
8350 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
8352 * nsterm.h (ns_get_defaults_value): Declare.
8354 * nsterm.m (ns_default): Call ns_get_defaults_value.
8356 2011-12-09 Eli Zaretskii <eliz@gnu.org>
8358 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
8361 2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8363 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
8364 that where the value of an _OBJC_* symbol points to is in the .bss
8365 section (Bug#10240).
8367 2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
8369 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
8370 after the loop to call ccl_driver at least once (Bug#8619).
8372 2011-12-08 Kenichi Handa <handa@m17n.org>
8374 * ftfont.c (get_adstyle_property): Fix previous change
8377 2011-12-07 Juanma Barranquero <lekktu@gmail.com>
8379 * w32.c (init_environment): If no_site_lisp, remove site-lisp
8380 dirs from the default value of EMACSLOADPATH (bug#10208).
8382 2011-12-07 Glenn Morris <rgm@gnu.org>
8384 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
8385 installation and source directories as well. (Bug#10208)
8387 2011-12-06 Chong Yidong <cyd@gnu.org>
8389 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
8391 2011-12-06 Glenn Morris <rgm@gnu.org>
8393 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
8394 as an error, not just -1. (Bug#10217)
8396 2011-12-05 Chong Yidong <cyd@gnu.org>
8398 * keyboard.c (process_special_events): New function.
8399 (swallow_events, Finput_pending_p): Use it (Bug#10195).
8401 2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
8403 * coding.c (encode_designation_at_bol): Don't use uninitialized
8404 local variable (Bug#9318).
8406 2011-12-05 Kenichi Handa <handa@m17n.org>
8408 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
8409 return Qnil (Bug#8046, Bug#10193).
8411 2011-12-05 Kenichi Handa <handa@m17n.org>
8413 * coding.c (encode_designation_at_bol): New args charbuf_end and
8414 dst. Return the number of produced bytes. Callers changed.
8415 (coding_set_source): Return how many bytes coding->source was
8417 (coding_set_destination): Return how many bytes
8418 coding->destination was relocated.
8419 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
8420 (CODING_CHAR_CHARSET_P): Adjust for the avove changes.
8422 2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
8424 * coding.c (CODING_CHAR_CHARSET_P): New macro.
8425 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
8428 2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
8430 The following changes are to fix Bug#9318.
8432 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
8433 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
8434 (encode_coding_iso_2022, encode_coding_sjis)
8435 (encode_coding_big5, encode_coding_charset): Use the above macros.
8437 2011-12-05 Juanma Barranquero <lekktu@gmail.com>
8439 * lisp.h (process_quit_flag): Fix external declaration.
8441 2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
8443 Don't macro-inline non-performance-critical code.
8444 * eval.c (process_quit_flag): New function.
8445 * lisp.h (QUIT): Use it.
8447 2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
8449 * nsfns.m (get_geometry_from_preferences): New function.
8450 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
8452 2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
8454 * emacs.c (Qkill_emacs): Define.
8455 (syms_of_emacs): Initialize it.
8456 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
8457 Qquit_flag to `kill-emacs' instead.
8458 (quit_throw_to_read_char): Add parameter `from_signal'.
8459 All callers changed. Call Fkill_emacs if requested and safe.
8460 * lisp.h (QUIT): Call Fkill_emacs if requested.
8462 2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
8464 * widget.c (update_wm_hints): Return if wmshell is null.
8465 (widget_update_wm_size_hints): New function.
8467 * widget.h (widget_update_wm_size_hints): Declare.
8469 * xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
8470 widget_update_wm_size_hints (Bug#10104).
8472 2011-12-03 Eli Zaretskii <eliz@gnu.org>
8474 * xdisp.c (handle_invisible_prop): If the invisible text ends just
8475 before a newline, prepare the bidi iterator for consuming the
8476 newline, and keep the current paragraph direction. (Bug#10183)
8477 (redisplay_window): Don't let `margin' become negative. (Bug#10192)
8479 2011-12-02 Juri Linkov <juri@jurta.org>
8481 * search.c (Fword_search_regexp): New Lisp function created from
8482 `wordify'. Change type of arg `lax' from `int' to `Lisp_Object'.
8483 (Fword_search_backward, Fword_search_forward)
8484 (Fword_search_backward_lax, Fword_search_forward_lax):
8485 Use `Fword_search_regexp' instead of `wordify'. Doc fix.
8486 (syms_of_search): Define `Sword_search_regexp'. (Bug#10145)
8488 2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
8490 * fileio.c (Finsert_file_contents): Move after-change-function call
8491 to before the "handled:" label, since all "goto handled" appear in
8492 cases where the *-change-functions have already been properly called
8495 2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
8497 * keyboard.c (interrupt_signal): Don't call kill-emacs when
8498 waiting for input. (Bug#10169)
8500 2011-11-30 Eli Zaretskii <eliz@gnu.org>
8502 * dispnew.c (adjust_glyph_matrix): Remove the assertion that
8503 verifies glyph row's hash code--we have just reallocated the
8504 glyphs, so their contents can be complete garbage. (Bug#10164)
8506 2011-11-30 Juanma Barranquero <lekktu@gmail.com>
8508 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.
8510 2011-11-30 Eli Zaretskii <eliz@gnu.org>
8512 * dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
8513 attributes are tested _before_ calling verify_row_hash, to protect
8514 against GCC re-ordering of the tests. (Bug#10164)
8516 2011-11-29 Jan Djärv <jan.h.d@swipnet.se>
8518 * xterm.h (struct x_output): net_wm_state_hidden_seen is new.
8520 * xterm.c (handle_one_xevent): Only set async_visible and friends
8521 if net_wm_state_hidden_seen is non-zero (Bug#10002)
8522 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
8523 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
8525 2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
8527 Remove GCPRO-related macros that exist only to avoid shadowing locals.
8528 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
8529 (GCPRO6_VAR, UNGCPRO_VAR): Remove. See
8530 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
8531 All uses changed to use GCPRO1 etc.
8532 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
8533 Revert to old implementation (i.e., before 2011-03-11).
8535 2011-11-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8537 * dispnew.c (scrolling_window): Truncate overlaps in copy destination
8538 of scroll runs so as to avoid assigning disabled bogus rows and
8539 unnecessary graphics copy operations.
8541 2011-11-27 Eli Zaretskii <eliz@gnu.org>
8543 * s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
8544 (snprintf) [_MSC_VER]: Redirect to _snprintf.
8545 (strtoll) [_MSC_VER]: Redirect to _strtoi64.
8546 (malloc, free, realloc, calloc): Redirect to e_* only when
8549 * lisp.h (GCTYPEBITS): Move before first use.
8550 (ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
8551 (DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
8552 this macro definition.
8554 * s/ms-w32.h (tzname): Redirect to _tzname for all values of
8557 2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
8559 * gtkutil.c (xg_create_frame_widgets):
8560 Call gtk_window_set_has_resize_grip (FALSE) if that function is
8561 present with Gtk+ 2.0.
8563 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
8565 * fileio.c (Finsert_file_contents): Undo previous change; see
8566 <http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
8568 2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
8570 Rename locals to avoid shadowing.
8571 * fileio.c (Finsert_file_contents):
8572 Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
8573 * process.c (wait_reading_process_output):
8574 Rename inner 'proc' to 'p' to avoid shadowing.
8575 Indent for consistency with usual Emacs style.
8577 2011-11-25 Eli Zaretskii <eliz@gnu.org>
8579 * xdisp.c (redisplay_window): If cursor row is not fully visible
8580 after recentering, and scroll-conservatively is set to a large
8581 number, scroll window by a few more lines to make the cursor fully
8582 visible and out of scroll-margin. (Bug#10105)
8583 (start_display): Don't move to the next line if the display should
8584 start at a newline that is part of a display vector or an overlay
8587 2011-11-24 Juri Linkov <juri@jurta.org>
8589 * image.c (imagemagick_load_image): Move `MagickSetResolution' down
8590 after the `MagickPingImage' call. (Bug#10112)
8592 2011-11-23 Chong Yidong <cyd@gnu.org>
8594 * window.c (Fcoordinates_in_window_p): Accept only live windows.
8596 2011-11-23 Martin Rudalics <rudalics@gmx.at>
8598 * buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
8599 making another buffer current. (Bug#10114)
8601 2011-11-23 Glenn Morris <rgm@gnu.org>
8603 * font.c (font_find_for_lface) [HAVE_NS]: Ignore case. (Bug#2526)
8605 2011-11-23 Chong Yidong <cyd@gnu.org>
8607 * xdisp.c (compute_stop_pos): Check validity of end_charpos before
8608 using it (Bug#5984).
8610 2011-11-22 Eli Zaretskii <eliz@gnu.org>
8612 * dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
8613 and header-lines, as they don't have one computed for them.
8616 * .gdbinit (prow): Make displayed values more self-explaining.
8617 Add row's hash code.
8619 2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
8621 * process.c (wait_reading_process_output): Fix asynchrounous
8622 GnuTLS socket handling on some versions of the GnuTLS library.
8623 (wait_reading_process_output): Add comment and URL.
8625 2011-11-21 Jan Djärv <jan.h.d@swipnet.se>
8627 * xterm.c (x_clear_frame): Reinstate the XClearWindow call.
8629 2011-11-21 Chong Yidong <cyd@gnu.org>
8631 * window.c (Fnext_window, Fprevious_window): Doc fix.
8633 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
8635 * window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.
8637 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
8639 * nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.
8641 2011-11-20 Martin Rudalics <rudalics@gmx.at>
8643 * window.c (Fset_window_combination_limit): Rename argument
8645 (Vwindow_combination_limit): Remove "status" from doc-string.
8647 2011-11-20 Andreas Schwab <schwab@linux-m68k.org>
8649 * m/ibms390.h: Remove.
8650 * m/ibms390x.h: Don't include "ibms390.h".
8652 2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
8654 * fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
8655 Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
8657 2011-11-20 Juanma Barranquero <lekktu@gmail.com>
8659 * casetab.c (Fset_case_table):
8660 * charset.c (Fcharset_after): Fix typos.
8662 2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
8664 Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
8665 Otherwise, valgrind does not work on some platforms.
8666 Problem reported by Andreas Schwab in
8667 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
8668 * puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
8669 is set, removing the need for VIRT_ADDRESS_VARIES.
8670 (PURE_P): Use a more-efficient implementation that needs just one
8671 comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
8672 number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
8673 to 4 (xorl, subq, cmpq, setbe).
8674 * alloc.c (pure): Always extern now, since that's the
8675 VIRT_ADDR_VARIES behavior.
8676 (PURE_POINTER_P): Use a single comparison, not two, for
8677 consistency with the new puresize.h.
8678 * lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
8679 * m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
8680 Remove VIRT_ADDR_VARIES no longer needed.
8682 2011-11-19 Eli Zaretskii <eliz@gnu.org>
8684 * xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
8685 (erase_phys_cursor, update_window_cursor, show_mouse_face)
8686 (cursor_in_mouse_face_p): If the cursor position is out of bounds,
8687 behave as if the cursor position were at the window margin.
8689 * window.c (get_phys_cursor_glyph): If the window is hscrolled,
8690 and the cursor position is out of bounds, behave as if the cursor
8691 position were at the window margin. (Bug#10075)
8693 2011-11-18 Chong Yidong <cyd@gnu.org>
8695 * window.c (Fwindow_combination_limit): Make first argument
8696 non-optional, since it is meaningless for live windows like the
8699 2011-11-18 Dmitry Antipov <dmantipov@yandex.ru>
8701 * keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.
8703 2011-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
8705 * intervals.c: Fix grafting over the whole buffer (bug#10071).
8706 (graft_intervals_into_buffer): Simplify.
8708 2011-11-18 Eli Zaretskii <eliz@gnu.org>
8710 * dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
8711 hash values of the two rows.
8712 (copy_row_except_pointers): Preserve the used[] arrays and the
8713 hash values of the two rows. (Bug#10035)
8714 (add_row_entry): Add xassert to verify that ROW's hash code is valid.
8716 * xdisp.c (row_hash): New function, body extracted from
8717 compute_line_metrics.
8718 (compute_line_metrics): Call row_hash, instead of computing the
8721 * dispnew.c (verify_row_hash): Call row_hash for computing the
8722 hash code of a row, instead of duplicating code from xdisp.c.
8724 * dispextern.h (row_hash): Add prototype.
8726 2011-11-18 Tassilo Horn <tassilo@member.fsf.org>
8728 * frame.c (delete_frame): Don't delete the terminal when the last
8729 X frame is closed if emacs is built with GTK toolkit.
8731 2011-11-17 Juanma Barranquero <lekktu@gmail.com>
8733 * window.c (syms_of_window) <window-combination-resize>: Fix typo.
8735 2011-11-17 Martin Rudalics <rudalics@gmx.at>
8737 * window.c (Vwindow_splits): Rename to
8738 Vwindow_combination_resize. Suggested by Juri Linkov.
8739 (Fsplit_window_internal): Use Vwindow_combination_resize instead
8742 2011-11-16 Juanma Barranquero <lekktu@gmail.com>
8744 * nsfns.m (Fns_font_name):
8745 * window.c (syms_of_window) <window-combination-limit>: Fix typos.
8747 2011-11-16 Martin Rudalics <rudalics@gmx.at>
8749 * window.h (window): Rename slot "nest" to "combination_limit".
8750 * window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
8751 (Fset_window_nest): Rename to Fset_window_combination_limit.
8752 (Vwindow_nest): Rename to Vwindow_combination_limit.
8753 (recombine_windows, make_parent_window, make_window)
8754 (Fsplit_window_internal, saved_window)
8755 (Fset_window_configuration, save_window_save): Rename all
8756 occurrences of window_nest to window_combination_limit.
8758 2011-11-15 Juanma Barranquero <lekktu@gmail.com>
8760 * image.c (imagemagick_load_image): Fix typo.
8762 2011-11-14 Eli Zaretskii <eliz@gnu.org>
8764 * xdisp.c (display_line): Move the call to
8765 highlight_trailing_whitespace before the call to
8766 compute_line_metrics, since the latter needs to see the final
8767 faces of all the glyphs to compute ROW's hash value.
8768 Fixes assertion violations in row_equal_p. (Bug#10035)
8770 2011-11-14 Juanma Barranquero <lekktu@gmail.com>
8772 * w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
8773 just return (bug#10044).
8775 2011-11-12 Eli Zaretskii <eliz@gnu.org>
8777 * makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
8778 with user-defined heap size. Bump the default size of the temacs
8779 heap to 27MB, to avoid memory warning when running temacs.
8780 ($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.
8782 * dispnew.c (scrolling_window): Fix incorrect indices in accessing
8783 current_matrix and desired_matrix. (Bug#9990)
8784 (verify_row_hash) [XASSERTS]: New function.
8785 (adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
8786 that the hash value of glyph rows is correct.
8788 2011-11-12 Martin Rudalics <rudalics@gmx.at>
8790 * window.h (window): Remove splits slot.
8791 * window.c (Fwindow_splits, Fset_window_splits): Remove.
8792 (Fdelete_other_windows_internal, make_parent_window)
8793 (make_window, Fsplit_window_internal, Fdelete_window_internal)
8794 (Fset_window_configuration, save_window_save): Don't deal with
8795 split status of windows.
8796 (saved_window): Remove splits slot.
8797 (Vwindow_splits): Rewrite doc-string.
8799 2011-11-11 Jan Djärv <jan.h.d@swipnet.se>
8801 * xfns.c (unwind_create_frame):
8802 * nsfns.m (unwind_create_frame):
8803 * w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
8804 Vframe_list (Bug#9999).
8806 2011-11-11 Dmitry Antipov <dmantipov@yandex.ru>
8808 * xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
8810 2011-11-11 Kenichi Handa <handa@m17n.org>
8812 * callproc.c (Fcall_process): Set the member dst_multibyte of
8815 2011-11-11 Johan Bockgård <bojohan@gnu.org>
8817 * xdisp.c (fill_composite_glyph_string): Always set s->face, to
8818 avoid a crash (bug#9496).
8820 2011-11-09 Chong Yidong <cyd@gnu.org>
8822 * window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
8823 (Fwindow_inside_absolute_pixel_edges): Only allow live windows.
8825 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
8827 * s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).
8829 2011-11-08 Paul Eggert <eggert@cs.ucla.edu>
8831 Avoid some portability problems by eschewing 'extern inline' functions.
8832 The trivial performance wins aren't worth the portability hassles; see
8833 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
8835 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
8836 (window_box_width, window_box_left, window_box_left_offset)
8837 (window_box_right, window_box_right_offset): Undo previous change,
8838 by removing the "extern"s.
8839 * intervals.c (adjust_intervals_for_insertion)
8840 (adjust_intervals_for_deletion): Undo previous change,
8841 making these static again.
8842 (offset_intervals, temp_set_point_both, temp_set_point)
8843 (copy_intervals_to_string): No longer inline.
8844 * xdisp.c (window_text_bottom_y, window_box_width)
8845 (window_box_height, window_box_left_offset)
8846 (window_box_right_offset, window_box_left, window_box_right)
8847 (window_box): No longer inline.
8849 2011-11-08 Chong Yidong <cyd@gnu.org>
8851 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
8852 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
8853 Signal an error if not a live window.
8854 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
8855 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
8857 2011-11-07 Juanma Barranquero <lekktu@gmail.com>
8859 * lisp.h (syms_of_abbrev): Remove declaration.
8860 Reported by CHENG Gao <chenggao@royau.me>.
8862 2011-11-07 Eli Zaretskii <eliz@gnu.org>
8864 * w32.c (check_windows_init_file): Don't look for term/w32-win.el
8865 if Vpurify_flag is non-nil. Fixes a crash when running w32 build
8866 of temacs in GUI mode.
8868 2011-11-07 Martin Rudalics <rudalics@gmx.at>
8870 * window.h: Declare delete_all_child_windows instead of
8871 delete_all_subwindows.
8872 * window.c (Fwindow_nest, Fset_window_nest)
8873 (Fset_window_new_total, Fset_window_new_normal)
8874 (Fwindow_resize_apply): Don't use term subwindow in doc-strings.
8875 (delete_all_subwindows): Rename to delete_all_child_windows.
8876 (Fdelete_other_windows_internal, Fset_window_configuration):
8877 Call delete_all_child_windows instead of delete_all_subwindows.
8878 * frame.c (delete_frame): Call delete_all_child_windows instead
8879 of delete_all_subwindows.
8881 2011-11-07 Paul Eggert <eggert@cs.ucla.edu>
8883 * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
8884 This is also needed for porting to any host where GC_MARK_STACK is
8885 not GC_MAKE_GCPROS_NOOPS.
8886 (which_symbols): Use it.
8888 2011-11-07 Kenichi Handa <handa@m17n.org>
8890 * coding.c (coding_set_destination): Check coding->src_pos only
8891 when coding->src_object is a buffer (bug#9910).
8893 * process.c (send_process): Set the member src_multibyte of coding
8894 to 0 (bug#9911) when sending a unibyte text.
8896 * callproc.c (Fcall_process): Set the member src_multibyte of
8897 process_coding to 0 (bug#9912).
8899 2011-11-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8901 * xmenu.c (cleanup_widget_value_tree): New function.
8902 (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
8903 calling free_menubar_widget_value_tree directly (Bug#9830).
8905 2011-11-06 Paul Eggert <eggert@cs.ucla.edu>
8907 Fix some portability problems with 'inline'.
8908 * dispextern.h (window_box, window_box_height, window_text_bottom_y)
8909 (window_box_width, window_box_left, window_box_left_offset)
8910 (window_box_right, window_box_right_offset): Declare extern.
8911 Otherwise, these inline functions do not conform to C99 and
8912 are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in
8913 <http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
8914 * intervals.c (adjust_intervals_for_insertion)
8915 (adjust_intervals_for_deletion): Now extern, because otherwise the
8916 extern inline functions 'offset_intervals' couldn't refer to it.
8917 (static_offset_intervals): Remove.
8918 (offset_intervals): Rewrite using the old contents of
8919 static_offset_intervals. The old version didn't conform to C99
8920 because an extern inline function contained a reference to an
8921 identifier with static linkage.
8923 2011-11-06 Andreas Schwab <schwab@linux-m68k.org>
8925 * keyboard.c (interrupt_signal): Don't call kill-emacs while in
8928 2011-11-06 Eli Zaretskii <eliz@gnu.org>
8930 * xdisp.c (init_iterator, reseat_to_string): Don't set the
8931 iterator's bidi_p flag if Vpurify_flag is non-nil. (Bug#9963)
8932 (Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
8933 return Qleft_to_right.
8935 2011-11-06 Chong Yidong <cyd@gnu.org>
8937 * window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
8938 (Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
8939 (Fset_window_splits, Fwindow_nest, Fset_window_nest)
8940 (Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
8941 (Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
8942 (Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
8943 (Fwindow_vscroll): Doc fix.
8944 (Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
8945 argument, since it makes no sense to pass a live window and for
8946 consistency with window-child.
8948 2011-11-05 Christoph Scholtes <cschol2112@googlemail.com>
8950 * makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
8953 2011-11-05 Jason Rumney <jasonr@gnu.org>
8955 * w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
8956 (add_font_entity_to_list): Filter out non-Japanese Shift-JIS
8958 (add_font_entity_to_list): Fix logic errors in mixed boolean and
8959 bitwise arithmetic preventing use of unicode-sip and non-truetype
8962 2011-11-05 Eli Zaretskii <eliz@gnu.org>
8964 * s/ms-w32.h (fstat, stat, utime): Move redirections to
8967 * w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
8968 initialization code to keep similarity to xfns.c after changes
8971 2011-11-05 Jan Djärv <jan.h.d@swipnet.se>
8973 * nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
8974 (unwind_create_frame): New function (Bug#9943).
8975 (Fx_create_frame): Restructure code to be more similar to the one in
8976 xfns.c. Call record_unwind_protect with unwind_create_frame (Bug#9943).
8977 Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
8978 Move terminal->reference_count++ just before making the frame official
8981 * nsterm.m (x_free_frame_resources): New function.
8982 (x_destroy_window): Move code to x_free_frame_resources.
8984 * xfns.c (unwind_create_frame): Fix comment.
8985 (Fx_create_frame, x_create_tip_frame):
8986 Move terminal->reference_count++ just before making the frame
8987 official. Move initialization of image_cache_refcount and
8988 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
8990 2011-11-05 Eli Zaretskii <eliz@gnu.org>
8992 Support MSVC build with newer versions of Visual Studio.
8993 * makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
8994 Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
8997 * lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
8998 which are not supported by MSVC.
8999 (Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
9000 (Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
9002 (Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
9004 (DEFUN) [_MSC_VER]: Define in a different way for MSVC.
9006 * w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
9008 2011-11-05 Fabrice Popineau <fabrice.popineau@supelec.fr> (tiny change)
9010 Support MSVC build with newer versions of Visual Studio.
9011 * w32.c: Don't include w32api.h for MSVC.
9012 (init_environment) [_MSC_VER]: Call sys_access, not _access.
9014 * s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
9015 [_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
9016 (fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
9017 (malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
9019 (alloca) [_MSC_VER]: Define to _alloca.
9021 * lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
9023 * regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
9025 2011-11-04 Eli Zaretskii <eliz@gnu.org>
9027 * xdisp.c (note_mouse_highlight): If either of
9028 previous/next-single-property-change returns nil, treat that as
9029 the beginning or the end of the buffer. (Bug#9955)
9031 2011-11-04 Jan Djärv <jan.h.d@swipnet.se>
9033 * gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
9034 label is not null (Bug#9951).
9035 (xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
9038 2011-11-04 Eli Zaretskii <eliz@gnu.org>
9040 * window.c (Fwindow_body_size): Mention in the doc string that the
9041 return value is in frame's canonical units. (Bug#9949)
9043 2011-11-03 Eli Zaretskii <eliz@gnu.org>
9045 * xdisp.c (note_mouse_highlight): Initialize `area'. (Bug#9947)
9047 * w32fns.c (unwind_create_frame): If needed, free the glyph
9048 matrices of the partially constructed frame. (Bug#9943)
9049 * xfns.c (unwind_create_frame): Likewise.
9051 2011-11-01 Eli Zaretskii <eliz@gnu.org>
9053 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
9054 Don't stop backward scan on the continuation glyph, even though
9055 its CHARPOS is positive.
9056 (mouse_face_from_buffer_pos, note_mouse_highlight):
9057 Rename cover_string to disp_string.
9059 2011-11-01 Martin Rudalics <rudalics@gmx.at>
9061 * window.c (temp_output_buffer_show): Don't use
9062 Vtemp_buffer_show_specifiers.
9063 (Vtemp_buffer_show_specifiers): Remove unused variable.
9065 2011-10-30 Eli Zaretskii <eliz@gnu.org>
9067 * xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
9068 past the beginning of the current glyph matrix.
9070 2011-10-30 Adam Sjøgren <asjo@koldfront.dk> (tiny change)
9072 * xterm.c: Include X11/Xproto.h if HAVE_GTK3.
9073 (x_error_handler): Ignore BadMatch for X_SetInputFocus for
9074 HAVE_GTK3 (Bug#9869).
9076 * gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
9077 type to GDK_NOTHING so valgrind does not complain (Bug#9901).
9079 * xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).
9081 * xterm.c: Declare x_handle_net_wm_state to return int.
9082 (handle_one_xevent): Check if we are iconified but don't have
9083 _NET_WM_STATE_HIDDEN. If do, treat as deiconify (Bug#9893).
9084 (get_current_wm_state): Return non-zero if not hidden,
9085 check for _NET_WM_STATE_HIDDEN (Bug#9893).
9086 (do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
9087 (x_handle_net_wm_state): Return what get_current_wm_state returns.
9088 (x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.
9090 2011-10-29 Paul Eggert <eggert@cs.ucla.edu>
9092 * alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
9093 so that this new function doesn't get optimized away by a
9094 whole-program optimizer. Make the 2nd arg EMACS_INT, not int.
9096 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
9098 * frame.h (MOUSE_HL_INFO): Remove excess parens.
9100 2011-10-29 Eli Zaretskii <eliz@gnu.org>
9102 Fix the `xbytecode' command.
9103 * .gdbinit (xprintbytestr): New command.
9104 (xwhichsymbols): Rename from `which'; all callers changed.
9105 (xbytecode): Print the byte-code string as well.
9107 2011-10-29 Kim Storm <storm@cua.dk>
9109 * alloc.c (which_symbols): New function.
9111 2011-10-29 Andreas Schwab <schwab@linux-m68k.org>
9113 * minibuf.c (read_minibuf_noninteractive): Allow reading empty
9116 2011-10-29 Glenn Morris <rgm@gnu.org>
9118 * process.c (wait_reading_process_output): Revert 2009-08-30 change.
9119 Not clear what it was for, and it causes various bugs. (Bug#9839)
9121 2011-10-28 Eli Zaretskii <eliz@gnu.org>
9123 * xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
9124 possible random value that matches one of those tested as
9125 condition to clear the mouse face.
9127 2011-10-28 Chong Yidong <cyd@gnu.org>
9129 * xdisp.c (note_mouse_highlight): Fix use of uninitialized var.
9131 2011-10-28 Dan Nicolaescu <dann@ics.uci.edu>
9133 * window.c (make_window): Initialize phys_cursor_on_p.
9135 2011-10-28 Stefan Monnier <monnier@iro.umontreal.ca>
9137 * lisp.h (struct Lisp_Symbol): Update comments.
9139 2011-10-28 Juanma Barranquero <lekktu@gmail.com>
9141 * w32font.c (w32_load_unicows_or_gdi32): Add missing return.
9143 2011-10-28 Eli Zaretskii <eliz@gnu.org>
9145 Fix Emacs on Windows 9X (bug#8562). Thanks to oslsachem
9146 <oslsachem@gmail.com> for helping to debug this.
9148 * w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
9149 (g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
9150 (g_b_init_get_glyph_outline_w): New static variables.
9151 (GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
9152 (GetGlyphOutlineW_Proc): New typedefs.
9153 (w32_load_unicows_or_gdi32, get_outline_metrics_w)
9154 (get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
9156 (w32font_open_internal, compute_metrics):
9157 Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
9158 instead of calling the "wide" APIs directly.
9160 * emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.
9162 * w32.h (syms_of_w32font): Add prototype.
9164 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
9166 * window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
9167 (Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
9168 (Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
9169 (Fmove_to_window_line): Doc fix.
9171 2011-10-27 Chong Yidong <cyd@gnu.org>
9173 * process.c (make_process): Set gnutls_state to NULL.
9175 * gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
9176 non-NULL, regardless of GNUTLS_INITSTAGE.
9177 (Fgnutls_boot): Cleanups. Call emacs_gnutls_deinit if we signal
9178 an error. Set process slots as soon as we allocate them.
9180 * gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.
9182 2011-10-27 Chong Yidong <cyd@gnu.org>
9184 * gnutls.c (emacs_gnutls_deinit): New function.
9185 Deallocate credentials structures as well as calling gnutls_deinit.
9186 (Fgnutls_deinit, Fgnutls_boot): Use it.
9188 * process.c (make_process): Initialize GnuTLS credentials to NULL.
9189 (deactivate_process): Call emacs_gnutls_deinit.
9191 2011-10-27 Juanma Barranquero <lekktu@gmail.com>
9193 * image.c (x_create_x_image_and_pixmap):
9194 * w32.c (sys_rename, w32_delayed_load):
9195 * w32font.c (fill_in_logfont):
9196 * w32reg.c (x_get_string_resource): Silence compiler warnings.
9198 2011-10-26 Juanma Barranquero <lekktu@gmail.com>
9200 * w32fns.c (w32_default_color_map): New function,
9201 extracted from Fw32_default_color_map.
9202 (Fw32_default_color_map, Fx_open_connection): Use it. (Bug#9785)
9204 2011-10-25 Paul Eggert <eggert@cs.ucla.edu>
9206 * dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).
9208 2011-10-25 Stefan Monnier <monnier@iro.umontreal.ca>
9210 * keyboard.c (test_undefined): New function (bug#9751).
9211 (read_key_sequence): Use it to detect when a key is bound to `undefined'.
9213 2011-10-25 Enami Tsugutomo <tsugutomo.enami@jp.sony.com>
9215 * sysdep.c (init_sys_modes): Fix the check for the controlling
9216 terminal (Bug#6649).
9218 2011-10-20 Eli Zaretskii <eliz@gnu.org>
9220 * dispextern.h (struct bidi_it): New member next_en_type.
9222 * bidi.c (bidi_line_init): Initialize the next_en_type member.
9223 (bidi_resolve_explicit_1): When next_en_pos is valid for the
9224 current character, check also for next_en_type being WEAK_EN.
9225 (bidi_resolve_weak): Don't enter the expensive loop if the current
9226 position is before next_en_pos. Record the bidi type of the first
9227 non-ET, non-BN character we find, in addition to its position.
9228 (bidi_level_of_next_char): Invalidate next_en_type when
9229 next_en_pos is over-stepped.
9231 2011-10-20 Paul Eggert <eggert@cs.ucla.edu>
9233 Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
9234 * editfns.c: Rewrite current-time-zone so that it invokes
9235 the equivalent of (format-time-string "%Z") to get the time zone name.
9236 This fixes a bug when the time zone name contains characters that
9237 need converting from the system time locale to Emacs internal format.
9238 This fixes a shortcoming that I introduced in my 1999-10-19 patch:
9239 that patch fixed format-time-string to do the conversion, but
9240 I forgot to fix current-time-zone.
9241 (format_time_string): New function, containing most of
9242 what Fformat_time_string used to contain.
9243 (Fformat_time_string): Rewrite in terms of format_time_string.
9244 This doesn't change this function's behavior.
9245 (current-time-zone): Rewrite to use format_time_string.
9246 This fixes the bug reported by Michael Schierl in
9247 <http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
9248 Jason Rumney's 2007-06-07 change worked around this bug, but
9250 * systime.h (tzname, timezone): Remove no-longer-used declarations.
9252 2011-10-19 Eli Zaretskii <eliz@gnu.org>
9254 * xdisp.c (start_display): If the character at POS is displayed
9255 via a display vector, reset IT->current.dpvec_index to zero.
9256 (try_window_reusing_current_matrix): If a line ends in a display
9257 vector or the next line starts in a display vector, continue
9258 redrawing the window even though the character position of
9259 start_row was reached.
9262 2011-10-18 Chong Yidong <cyd@gnu.org>
9264 * xdisp.c (get_next_display_element): Handle U+2010 and U+2011
9265 with nobreak-char-display too.
9267 2011-10-18 Eli Zaretskii <eliz@gnu.org>
9269 Fix part 3 of bug#9771.
9270 * bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
9271 (bidi_resolve_neutral): Don't enter the expensive loop looking for
9272 non-neutral characters if the current character is a paragraph
9273 separator (a.k.a. Newline). This avoids running the same
9274 expensive loop twice, once when we consume the preceding newline
9275 and the other time when the line actually needs to be displayed.
9276 Avoid the loop when we see neutrals on the base embedding level
9277 following a character whose directionality is the same as the
9278 paragraph's. This avoids running the expensive loop when a line
9279 ends in a long sequence of neutrals, like control characters.
9280 Add assertion against STRONG_AL type. Slightly rearrange code
9281 that determines the type of a neutral given the first non-neutral
9283 (bidi_level_of_next_char): Set next_en_pos to zero when
9284 invalidating its info.
9286 2011-10-17 Eli Zaretskii <eliz@gnu.org>
9288 * xdisp.c (push_display_prop): Determine whether to record string
9289 or buffer position by IT->string, not by IT->method. Allow
9290 GET_FROM_DISPLAY_VECTOR as IT->method on entry. (Bug#9771, part 4)
9291 (move_it_vertically_backward): Don't look for character position
9292 immediately after the newline when in a continuation line.
9295 2011-10-15 Martin Rudalics <rudalics@gmx.at>
9297 * window.c (coordinates_in_window): Rewrite and delabelize
9298 vertical border check. (Bug#5357) (Bug#9618)
9300 2011-10-14 Stefan Monnier <monnier@iro.umontreal.ca>
9302 * xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
9303 errors in XSetWindowBorder (bug#9310).
9305 2011-10-13 Dmitry Antipov <dmantipov@yandex.ru>
9307 * editfns.c (Fset_time_zone_rule): Replace free with xfree to
9308 avoid crash when xmalloc overrun checking is enabled.
9310 2011-10-13 Eli Zaretskii <eliz@gnu.org>
9312 * xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
9313 itb.paragraph_dir to NEUTRAL_DIR. Fixes an occasional incorrect
9314 cursor motion with <left> and <right> arrow keys.
9316 * bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
9317 some callers set that themselves.
9319 2011-10-12 Eli Zaretskii <eliz@gnu.org>
9321 * xdisp.c (find_row_edges): Handle the case where ROW comes from a
9322 display string and the previous row comes from the same string and
9323 is empty. (Bug#9739) (Bug#9738)
9325 2011-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
9327 * doc.c (get_doc_string): Encode file name (bug#9735).
9329 2011-10-12 Eli Zaretskii <eliz@gnu.org>
9331 * bidi.c (bidi_level_of_next_char):
9332 * xdisp.c (get_visually_first_element): Remove old incorrect
9333 comments regarding the Unicode Line Separator character.
9335 * bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.
9337 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
9339 * alloc.c (Fgc_status): Do not access beyond zombies array
9340 boundary if nzombies > MAX_ZOMBIES.
9341 * alloc.c (dump_zombies): Add missing format specifier.
9343 2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
9345 * xdisp.c (set_cursor_from_row): Simplify conditionals,
9346 to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.
9348 * lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
9349 Some packages use them to denote characters with modifiers.
9351 2011-10-11 Andreas Schwab <schwab@linux-m68k.org>
9353 * lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
9354 (GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
9355 matching a pp-number. Rename parameter var to var1.
9357 2011-10-11 Stefan Monnier <monnier@iro.umontreal.ca>
9359 * minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).
9361 2011-10-08 Glenn Morris <rgm@gnu.org>
9363 * callint.c (Fcall_interactively): Give a more explicit error for the
9364 'c' case with a non-character input. (Bug#8479)
9366 2011-10-08 Eli Zaretskii <eliz@gnu.org>
9368 * xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
9370 (set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
9371 lines that are hscrolled on the left.
9373 * dispnew.c (buffer_posn_from_coords): Account for a possible
9374 presence of header-line. (Bug#4426)
9376 2011-10-07 Stefan Monnier <monnier@iro.umontreal.ca>
9378 * buffer.c (syms_of_buffer) <enable-multibyte-characters>:
9379 Don't advertise functionality which we discourage or doesn't work.
9381 2011-10-07 Paul Eggert <eggert@cs.ucla.edu>
9383 * alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
9384 or sizeof. __alignof__ gives the wrong answer on Fedora x86-64
9385 with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
9386 this makes Emacs dump core during garbage collection on rare
9387 occasions. sizeof is obviously inferior to offsetof here, so
9388 stick with offsetof.
9389 (GC_POINTER_ALIGNMENT): New macro.
9390 (mark_memory): Omit 3rd (offset) arg; caller changed.
9391 Don't assume EMACS_INT alignment is the same as pointer alignment.
9393 2011-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
9395 * keyboard.c (read_key_sequence_remapped): New var.
9396 (read_key_sequence): Compute remapping in the right buffer.
9397 (command_loop_1): Use read_key_sequence's remapping directly.
9399 2011-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
9401 * dired.c (file_name_completion): Don't expand file name.
9402 (Ffile_name_completion, Ffile_name_all_completions): Expand file name
9403 before checking file name handler.
9405 * minibuf.c (Finternal_complete_buffer): Only show internal buffers if
9406 they've been requested explicitly (bug#9591).
9408 2011-10-01 Andreas Schwab <schwab@linux-m68k.org>
9410 * keymap.c (Fsingle_key_description): Use make_specified_string
9411 instead of build_string to build string from push_key_description.
9414 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
9416 * buffer.h (struct buffer): Use time_t, not int, for a time stamp.
9417 This fixes a Y2038 bug on 64-bit hosts.
9418 * buffer.c (reset_buffer):
9419 * fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
9420 (Fclear_buffer_auto_save_failure):
9421 Use 0, not -1, to represent an unset failure time, since time_t
9422 might not be signed.
9424 Remove dependency on glibc malloc internals.
9425 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
9426 Move back here from lisp.h, but with their new implementations.
9427 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
9428 (XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
9429 * charset.c (charset_table_init): New static var.
9430 (syms_of_charset): Use it instead of xmalloc. This removes a
9431 dependency on glibc malloc internals. See Eli Zaretskii's comment in
9432 <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
9433 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
9434 Move back to alloc.c.
9435 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
9436 (XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.
9438 2011-09-30 Jan Djärv <jan.h.d@swipnet.se>
9440 * nsterm.m (windowDidResize): Call x_set_window_size only when
9441 ns_in_resize is true. Otherwise set pixelwidth/height and
9442 call change_frame_size (Bug#9628).
9444 2011-09-30 Paul Eggert <eggert@cs.ucla.edu>
9446 Port --enable-checking=all to Fedora 14 x86-64.
9447 * charset.c (syms_of_charset): Also account for glibc malloc's
9448 internal overhead when calculating the initial malloc maximum.
9450 Port --enable-checking=all to Fedora 14 x86.
9451 * alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
9453 (xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
9454 (overrun_check_realloc, overrun_check_free):
9455 Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
9456 That way, xmalloc returns a properly-aligned pointer even if
9457 XMALLOC_OVERRUN_CHECK is defined. The old debugging code happened
9458 to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
9459 * charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
9460 into account when calculating the initial malloc maximum.
9461 * lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
9462 Move here from alloc.c, so that charset.c can use it too.
9463 Properly align; the old code wasn't right for common 32-bit hosts
9464 when configured with --enable-checking=all.
9465 (XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
9466 (XMALLOC_OVERRUN_SIZE_SIZE): New macros.
9468 2011-09-29 Eli Zaretskii <eliz@gnu.org>
9470 * sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
9473 2011-09-28 Eli Zaretskii <eliz@gnu.org>
9475 * xdisp.c (compute_display_string_end): If there's no display
9476 string at CHARPOS, return -1.
9478 * bidi.c (bidi_fetch_char): When compute_display_string_end
9479 returns a negative value, treat the character as a normal
9480 character not covered by a display string. (Bug#9624)
9482 2011-09-28 Juanma Barranquero <lekktu@gmail.com>
9484 * lread.c (Fread_from_string): Fix typo in docstring.
9486 2011-09-27 Eli Zaretskii <eliz@gnu.org>
9488 * xdisp.c (handle_invisible_prop): If invisible text ends on a
9489 newline, reseat the iterator instead of bidi-iterating there one
9490 character at a time. (Bug#9610)
9491 (BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
9492 TO_CHARPOS if the bidi iterator is at base embedding level.
9494 2011-09-27 Andreas Schwab <schwab@linux-m68k.org>
9496 * lread.c (readevalloop): Use correct code for NBSP.
9497 (read1): Likewise. (Bug#9608)
9499 2011-09-25 Michael Albinus <michael.albinus@gmx.de>
9501 * dbusbind.c (Fdbus_register_signal): When service is not
9502 registered, use nil in Vdbus_registered_objects_table. (Bug#9581)
9504 2011-09-25 Glenn Morris <rgm@gnu.org>
9506 * buffer.c (truncate-lines): Doc fix.
9508 2011-09-24 Chong Yidong <cyd@stupidchicken.com>
9510 * window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
9511 (Fset_window_next_buffers): Doc fix.
9513 2011-09-24 Glenn Morris <rgm@gnu.org>
9515 * minibuf.c (read_minibuf): Disable line truncation. (Bug#5715)
9517 2011-09-24 Paul Eggert <eggert@cs.ucla.edu>
9519 Fix minor problems found by static checking.
9520 * xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
9521 * indent.c (Fvertical_motion): Fix == vs = typo.
9523 2011-09-24 Eli Zaretskii <eliz@gnu.org>
9525 * dispnew.c (syms_of_display) <redisplay-dont-pause>:
9526 Default value is now t. Doc fix.
9528 * indent.c (Fvertical_motion): Compute and apply the overshoot
9529 logic when moving up, not only when moving down. Fix the
9530 confusing name and values of the it_overshoot_expected variable;
9531 logic changes accordingly. (Bug#9254) (Bug#9549)
9533 * xdisp.c (pos_visible_p): Produce correct pixel coordinates when
9534 CHARPOS is covered by a display string which includes newlines.
9535 (move_it_vertically_backward): Avoid inflooping when START_CHARPOS
9536 is covered by a display string with embedded newlines.
9538 2011-09-24 Michael Albinus <michael.albinus@gmx.de>
9540 * dbusbind.c (Fdbus_register_signal): Add match rule to
9541 Vdbus_registered_objects_table. (Bug#9581)
9542 (Fdbus_register_method, Vdbus_registered_objects_table):
9545 2011-09-24 Jim Meyering <meyering@redhat.com>
9547 do not ignore write error for any output size
9548 The previous change was incomplete.
9549 While it makes emacs --batch detect the vast majority of stdout
9550 write failures, errors were still ignored whenever the output size is
9551 k * (BUFSIZ+1) - 4. E.g., on a system with BUFSIZ of 4096,
9552 $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
9553 && echo FAIL: ignored write error
9554 FAIL: ignored write error
9555 $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
9556 && echo FAIL: ignored write error
9557 FAIL: ignored write error
9558 * emacs.c (Fkill_emacs): Also test ferror. (Bug#9574)
9560 2011-09-23 Andreas Schwab <schwab@linux-m68k.org>
9562 * emacs.c (Fkill_emacs): In noninteractive mode exit
9563 non-successfully if a write error occurred on stdout. (Bug#9574)
9565 2011-09-21 Eli Zaretskii <eliz@gnu.org>
9567 * xdisp.c (pop_it): Allow it->object that is a cons cell to pass
9570 * dispextern.h (struct it): Update the comment documenting what
9573 2011-09-20 Eli Zaretskii <eliz@gnu.org>
9575 * xdisp.c (set_cursor_from_row): If the row ends in a newline from
9576 a display string, extend search for cursor position to end of row.
9577 (find_row_edges): If the row ends in a newline from a display
9578 string, increment its MATRIX_ROW_END_CHARPOS by one. (Bug#9549)
9579 Handle the case of a display string with multiple newlines.
9580 (Fcurrent_bidi_paragraph_direction): Fix search for previous
9581 non-empty line. Fixes confusing cursor motion with arrow keys at
9582 the beginning of a line that starts with whitespace.
9584 2011-09-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
9586 * lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
9589 2011-09-18 Chong Yidong <cyd@stupidchicken.com>
9591 * xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
9594 2011-09-18 Eli Zaretskii <eliz@gnu.org>
9596 * xdisp.c (display_line): Record maximum and minimum buffer
9597 positions even if no glyphs were produced (e.g., by a zero-width
9598 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
9599 buffer positions that will be removed from the glyph row because
9601 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
9602 column is beyond frame width: don't subtract 1 "pixel" when
9603 computing width of the stretch.
9604 (reseat_at_next_visible_line_start): Undo the change made on
9605 2011-09-17 that saved paragraph information and restored it after
9606 the call to `reseat'. (Bug#9545)
9608 2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
9610 * xdisp.c (expose_window): Save original value of phys_cursor_on_p
9611 and turn window cursor on if cleared (Bug#9415).
9613 2011-09-18 Andreas Schwab <schwab@linux-m68k.org>
9615 * search.c (boyer_moore): Take unibyte characters from pattern
9616 literally. (Bug#9458)
9618 2011-09-18 Eli Zaretskii <eliz@gnu.org>
9620 * xdisp.c (reseat_at_next_visible_line_start): Fix last change.
9622 2011-09-18 Paul Eggert <eggert@cs.ucla.edu>
9624 Fix minor problem found by static checking.
9625 * xdisp.c (reseat_at_next_visible_line_start): Mark locals as
9626 initialized, to pacify gcc -Wuninitialized.
9628 * fileio.c: Report proper errno when syscall falls.
9629 (Finsert_file_contents): Save and restore errno,
9630 so that report_file_error outputs the correct diagnostic.
9631 (Fwrite_region) [CLASH_DETECTION]: Likewise.
9633 2011-09-18 Eli Zaretskii <eliz@gnu.org>
9635 * .gdbinit (pgx): Fix references to fields of `struct glyph'.
9637 2011-09-17 Eli Zaretskii <eliz@gnu.org>
9639 * xdisp.c (produce_stretch_glyph): Another fix for changes made on
9640 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9530)
9642 2011-09-17 Eli Zaretskii <eliz@gnu.org>
9644 * xdisp.c (reseat_at_next_visible_line_start): Keep information
9645 about the current paragraph and restore it after the call to reseat.
9647 * bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
9648 (bidi_find_paragraph_start): Search back for paragraph beginning
9649 at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
9650 (bidi_move_to_visually_next): Only trigger paragraph-related
9651 computations when the last character is a newline or at EOB, not
9652 just any NEUTRAL_B. (Bug#9470)
9654 * xdisp.c (set_cursor_from_row): Don't invoke special treatment of
9655 truncated lines if point is covered by a display string. (Bug#9524)
9657 2011-09-16 Paul Eggert <eggert@cs.ucla.edu>
9659 * xselect.c: Relax test for outgoing X longs (Bug#9498).
9660 (cons_to_x_long): New function.
9661 (lisp_data_to_selection_data): Use it. Correct the test for
9662 short-versus-long data; it was negated. Break out of vector
9663 loop, for efficiency, when a long datum is discovered.
9665 2011-09-16 Stefan Monnier <monnier@iro.umontreal.ca>
9667 * eval.c (Fquote): Document its non-consing behavior (bug#9482).
9669 2011-09-16 Eli Zaretskii <eliz@gnu.org>
9671 * image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
9672 GCC PR/17406) by declaring this function with external scope.
9674 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
9676 * editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
9677 Don't mishandle (length (format "%%")) and (format "%4000s%%" "").
9679 2011-09-15 Andreas Schwab <schwab@linux-m68k.org>
9681 * editfns.c (Fformat): Correctly handle text properties on "%%".
9683 2011-09-15 Eli Zaretskii <eliz@gnu.org>
9685 * xterm.c (x_draw_composite_glyph_string_foreground):
9686 * w32term.c (x_draw_composite_glyph_string_foreground):
9687 * term.c (encode_terminal_code):
9688 * composite.c (composition_update_it, get_composition_id):
9689 * xdisp.c (get_next_display_element)
9690 (fill_composite_glyph_string): Add comments about special meaning
9691 of TAB characters in a composition.
9693 2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
9695 * editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
9696 This occurs when processing a multibyte format.
9697 Problem reported by Wolfgang Jenker.
9699 2011-09-15 Johan Bockgård <bojohan@gnu.org>
9701 * xdisp.c (try_cursor_movement): Only check for exact match if
9702 cursor hpos found by set_cursor_from_row is valid. (Bug#9495)
9704 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
9706 Remove unused external symbols.
9707 * dispextern.h (calc_pixel_width_or_height): Remove decl.
9708 * xdisp.c (calc_pixel_width_or_height): Now static.
9709 * doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
9710 * indent.c (check_display_width):
9711 * w32term.c: Fix comment to match code.
9712 * xterm.c, xterm.h (x_catching_errors): Remove.
9714 2011-09-14 Paul Eggert <eggert@cs.ucla.edu>
9716 * xselect.c: Use signed conversions more consistently (Bug#9498).
9717 (selection_data_to_lisp_data): Assume incoming selection data are
9718 signed integers, not unsigned. This is to be consistent with
9719 outgoing selection data, which was modified to use signed integers
9720 in as part of the fix to Bug#9196 in response to Jan D.'s comment
9721 in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
9722 expects long, not unsigned long.
9724 2011-09-14 Eli Zaretskii <eliz@gnu.org>
9726 * xdisp.c (try_window_reusing_current_matrix): Fix incorrect
9727 computation of loop end. Reported by Johan Bockgård
9730 2011-09-13 Chong Yidong <cyd@stupidchicken.com>
9732 * frame.c (Fother_visible_frames_p): Function deleted.
9734 2011-09-12 Eli Zaretskii <eliz@gnu.org>
9736 * indent.c (compute_motion): Process display vector front to back
9737 rather than the other way around. (Bug#2496)
9739 2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca>
9741 * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.
9743 2011-09-11 Chong Yidong <cyd@stupidchicken.com>
9745 * minibuf.c (Fread_from_minibuffer): Doc fix.
9747 2011-09-11 Eli Zaretskii <eliz@gnu.org>
9749 * xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
9750 2011-08-30T17:32:44Z!eliz@gnu.org. (Bug#9475)
9752 2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
9754 * fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
9755 value for non-existent files.
9757 2011-09-11 Eli Zaretskii <eliz@gnu.org>
9759 * fileio.c (Finsert_file_contents): If the file cannot be opened,
9760 set its "size" to -1. This will set the modtime_size field of
9761 the corresponding buffer to -1, which is what
9762 verify-visited-file-modtime expects for files that do not exist.
9765 2011-09-11 Paul Eggert <eggert@cs.ucla.edu>
9767 * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
9769 * lisp.h: ... from here. push_key_description is no longer
9770 defined in keyboard.c, so its declaration should not be in
9771 lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
9772 logically belongs with push_key_description.
9774 2011-09-10 Paul Eggert <eggert@cs.ucla.edu>
9776 * buffer.h: Include <sys/types.h> instead of <time.h>.
9777 Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
9778 Problem reported by Herbert J. Skuhra.
9780 2011-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
9782 * xml.c (parse_region): Make the parsing work for
9783 non-comment-starting XML files again (bug#9144).
9785 2011-09-10 Andreas Schwab <schwab@linux-m68k.org>
9787 * image.c (gif_load): Fix calculation of bottom and right corner.
9790 2011-09-10 Eli Zaretskii <eliz@gnu.org>
9792 * xdisp.c (MAX_DISP_SCAN): Decrease to 250. Prevents sluggish
9793 redisplay in small windows.
9795 2011-09-09 Eli Zaretskii <eliz@gnu.org>
9797 * frame.c (x_report_frame_params): Cast to avoid compiler warnings.
9799 2011-09-08 Martin Rudalics <rudalics@gmx.at>
9801 * window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
9802 Operate on live windows only.
9804 2011-09-08 Juanma Barranquero <lekktu@gmail.com>
9806 * emacs.c (my_heap_start): #ifdef to avoid warnings when unused.
9808 2011-09-07 Eli Zaretskii <eliz@gnu.org>
9810 * xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
9811 only under bidi iteration.
9813 2011-09-07 Jan Djärv <jan.h.d@swipnet.se>
9815 * gtkutil.c (xg_make_tool_item): Insert comment about eventbox.
9817 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
9819 isnan: Fix porting problem to Solaris 10 with bundled gcc.
9820 Without this fix, the command to link temacs failed due to an
9821 undefined symbol __builtin_isnan. This is because
9822 /usr/include/iso/math_c99.h #defines isnan(x) to
9823 __builtin_isnan(x), but the bundled gcc, which identifies itself
9824 as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
9826 * floatfns.c (isnan): #undef, and then #define to a clone of
9828 (Fisnan): Always define, since it's always available now.
9829 (syms_of_floatfns): Always define isnan at the Lisp level.
9831 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
9833 * Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).
9835 2011-09-06 Paul Eggert <eggert@cs.ucla.edu>
9837 * fileio.c: Fix bugs with large file offsets (Bug#9428).
9838 The previous code assumed that file offsets (off_t values) fit in
9839 EMACS_INT variables, which is not true on typical 32-bit hosts.
9840 The code messed up by falsely reporting buffer overflow in cases
9841 such as (insert-file-contents "big" nil 1 2) into an empty buffer
9842 when "big" contains more than 2**29 bytes, even though this
9843 inserts just one byte and does not overflow the buffer.
9844 (Finsert_file_contents): Store file offsets as off_t
9845 values, not as EMACS_INT values. Check for overflow when
9846 converting between EMACS_INT and off_t. When checking for
9847 buffer overflow or for overlap, take the offsets into account.
9848 Don't use EMACS_INT for small values where int suffices.
9849 When checking for overlap, fix a typo: ZV was used where
9850 ZV_BYTE was intended.
9851 (Fwrite_region): Don't assume off_t fits into 'long'.
9852 * buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.
9854 2011-09-05 Michael Albinus <michael.albinus@gmx.de>
9856 * dbusbind.c (xd_signature_cat): Rename from signature_cat.
9858 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
9860 sprintf-related integer and memory overflow issues (Bug#9412).
9862 * doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
9863 (esprintf, exprintf, evxprintf): New functions.
9864 * keyboard.c (command_loop_level): Now EMACS_INT, not int.
9865 (cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
9866 (modify_event_symbol): Do not assume that the length of
9867 name_alist_or_stem is safe to alloca and fits in int.
9868 (Fexecute_extended_command): Likewise for function name and binding.
9869 (Frecursion_depth): Wrap around reliably on integer overflow.
9870 * keymap.c (push_key_description): First arg is now EMACS_INT, not int,
9871 since some callers pass EMACS_INT values.
9872 (Fsingle_key_description): Don't crash if symbol name contains more
9873 than MAX_ALLOCA bytes.
9874 * minibuf.c (minibuf_level): Now EMACS_INT, not int.
9875 (get_minibuffer): Arg is now EMACS_INT, not int.
9876 * lisp.h (get_minibuffer, push_key_description): Reflect API changes.
9877 (esprintf, exprintf, evxprintf): New decls.
9878 * window.h (command_loop_level, minibuf_level): Reflect API changes.
9880 * dbusbind.c (signature_cat): New function.
9881 (xd_signature, Fdbus_register_signal):
9882 Do not overrun buffer; instead, report string overflow.
9884 * dispnew.c (add_window_display_history): Don't overrun buffer.
9885 Truncate instead; this is OK since it's just a log.
9887 * editfns.c (Fcurrent_time_zone): Don't overrun buffer
9888 even if the time zone offset is outlandishly large.
9889 Don't mishandle offset == INT_MIN.
9891 * emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
9892 when creating daemon; the previous buffer-overflow check was incorrect.
9894 * eval.c (verror): Simplify by rewriting in terms of evxprintf,
9895 which has the guts of the old verror function.
9897 * filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
9898 use SAFE_ALLOCA instead. Use esprintf to avoid int-overflow issues.
9900 * font.c: Include <float.h>, for DBL_MAX_10_EXP.
9901 (font_unparse_xlfd): Don't blindly alloca long strings.
9902 Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
9903 fits in int, when using sprintf. Use single snprintf to count
9904 length of string rather than counting it via multiple sprintfs;
9905 that's simpler and more reliable.
9906 (font_unparse_fcname): Use it to avoid sprintf buffer overrun.
9907 (generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
9908 sprintf, in case result does not fit in int.
9910 * fontset.c (num_auto_fontsets): Now printmax_t, not int.
9911 (fontset_from_font): Print it.
9913 * frame.c (tty_frame_count): Now printmax_t, not int.
9914 (make_terminal_frame, set_term_frame_name): Print it.
9915 (x_report_frame_params): In X, window IDs are unsigned long,
9916 not signed long, so print them as unsigned.
9917 (validate_x_resource_name): Check for implausibly long names,
9918 and don't assume name length fits in 'int'.
9919 (x_get_resource_string): Don't blindly alloca invocation name;
9920 use SAFE_ALLOCA. Use esprintf, not sprintf, in case result does
9923 * gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
9924 (xg_check_special_colors, xg_set_geometry):
9925 Make sprintf buffers a bit bigger, to avoid potential buffer overrun.
9927 * lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
9928 Use esprintf, not sprintf, in case result does not fit in int.
9930 * macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
9931 (Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
9932 it as a large positive number.
9933 (Fexecute_kbd_macro): Don't assume repeat count fits in int.
9934 * macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.
9936 * nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
9937 in case result does not fit in int.
9939 * print.c (float_to_string): Detect width overflow more reliably.
9940 (print_object): Make sprintf buffer a bit bigger, to avoid potential
9941 buffer overrun. Don't assume list length fits in 'int'. Treat
9942 print length of 0 as 0, not as infinity; to be consistent with other
9943 uses of print length in this function. Don't overflow print length
9944 index. Don't assume hash table size fits in 'long', or that
9945 vectorlike size fits in 'unsigned long'.
9947 * process.c (make_process): Use printmax_t, not int, to format
9948 process-name gensyms.
9950 * sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.
9952 * term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
9953 to avoid potential buffer overrun.
9955 * xfaces.c (x_update_menu_appearance): Don't overrun buffer
9956 if X resource line is longer than 512 bytes.
9958 * xfns.c (x_window): Make sprintf buffer a bit bigger
9959 to avoid potential buffer overrun.
9961 * xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.
9963 * xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.
9965 2011-09-04 Paul Eggert <eggert@cs.ucla.edu>
9967 Integer overflow fixes for scrolling, etc.
9968 Without these, Emacs silently mishandles large integers sometimes.
9969 For example, "C-u 4294967297 M-x recenter" was treated as if
9970 it were "C-u 1 M-x recenter" on a typical 64-bit host.
9972 * xdisp.c (try_window_id): Check Emacs fixnum range before
9973 converting to 'int'.
9975 * window.c (window_scroll_line_based, Frecenter):
9976 Check that an Emacs fixnum is in range before assigning it to 'int'.
9977 (Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
9978 values converted from Emacs fixnums.
9979 (Frecenter): Don't wrap around a line count if it is out of 'int'
9980 range; instead, treat it as an extreme value.
9981 (Fset_window_configuration, compare_window_configurations):
9982 Use ptrdiff_t, not int, for index that might exceed 2 GiB.
9984 * search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
9985 that can exceed INT_MAX. Check that EMACS_INT value is in range
9986 before assigning it to the (possibly-narrower) index.
9987 (match_limit): Don't assume that a fixnum can fit in 'int'.
9989 * print.c (print_object): Use ptrdiff_t, not int, for index that can
9992 * indent.c (position_indentation): Now takes ptrdiff_t, not int.
9993 (Fvertical_motion): Don't wrap around LINES values that don't fit
9994 in 'int'. Instead, treat them as extreme values. This is good
9995 enough for windows, which can't have more than INT_MAX lines anyway.
9997 2011-09-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
9999 * Require libxml/parser.h to avoid compilation warning.
10001 * emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.
10003 * xml.c (parse_region): Don't call xmlCleanupParser after parsing,
10004 since this reportedly can destroy thread storage.
10006 2011-08-30 Chong Yidong <cyd@stupidchicken.com>
10008 * syntax.c (find_defun_start): Update all cache variables if
10009 exiting early (Bug#9401).
10011 2011-08-30 Eli Zaretskii <eliz@gnu.org>
10013 * image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.
10015 * xdisp.c (produce_stretch_glyph): No longer static, compiled also
10016 when HAVE_WINDOW_SYSTEM is not defined. Support both GUI and TTY
10017 frames. Call tty_append_glyph in the TTY case. (Bug#9402)
10019 * term.c (tty_append_glyph): New function.
10020 (produce_stretch_glyph): Static function and its prototype deleted.
10022 * dispextern.h (produce_stretch_glyph, tty_append_glyph):
10025 2011-08-29 Paul Eggert <eggert@cs.ucla.edu>
10027 * image.c (parse_image_spec): Check for nonnegative, not for positive,
10028 when checking :margin (Bug#9390).
10029 (IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR):
10030 Rename from IMAGE_POSITIVE_INTEGER_VALUE_OR_PAIR,
10031 so that the name doesn't mislead. All uses changed.
10033 2011-08-28 Johan Bockgård <bojohan@gnu.org>
10035 * term.c (init_tty) [HAVE_GPM]: Move mouse settings after
10038 2011-08-27 Eli Zaretskii <eliz@gnu.org>
10040 * xdisp.c (move_it_to): Don't bail out early when reaching
10041 position beyond to_charpos, if we are scanning backwards.
10042 (move_it_vertically_backward): When DY == 0, make sure we get to
10043 the first character in the line after the newline.
10045 2011-08-27 Paul Eggert <eggert@cs.ucla.edu>
10047 * ccl.c: Improve and simplify overflow checking (Bug#9196).
10048 (ccl_driver): Do not generate an out-of-range pointer.
10049 (Fccl_execute_on_string): Remove unnecessary check for
10050 integer overflow, noted by Stefan Monnier in
10051 <http://lists.gnu.org/archive/html/emacs-devel/2011-08/msg00979.html>.
10052 Remove a FIXME that didn't need fixing.
10053 Simplify the newly-introduced buffer reallocation code.
10055 2011-08-27 Juanma Barranquero <lekktu@gmail.com>
10057 * makefile.w32-in ($(BLD)/alloc.$(O)): Depend on lib/verify.h.
10059 2011-08-26 Paul Eggert <eggert@cs.ucla.edu>
10061 Integer and memory overflow issues (Bug#9196).
10063 * doc.c (get_doc_string): Rework so that
10064 get_doc_string_buffer_size is the actual buffer size, rather than
10065 being 1 less than the actual buffer size; this makes xpalloc more
10068 * image.c (x_allocate_bitmap_record, cache_image):
10069 * xselect.c (Fx_register_dnd_atom):
10070 Simplify previous changes by using xpalloc.
10072 * buffer.c (overlay_str_len): Now ptrdiff_t, not EMACS_INT,
10073 since either will do and ptrdiff_t is convenient with xpalloc.
10075 * charset.c (charset_table_size)
10076 (struct charset_sort_data.priority): Now ptrdiff_t.
10077 (charset_compare): Don't overflow if priorities differ greatly.
10078 (Fsort_charsets): Don't assume list length fits in int.
10079 Check for size-calculation overflow when allocating sort data.
10080 (syms_of_charset): Allocate an initial charset table that is
10081 just under 64 KiB, to avoid problems with glibc malloc and mmap.
10083 * cmds.c (internal_self_insert): Check for size-calculation overflow.
10085 * composite.h (struct composition.glyph_len): Now int, not unsigned.
10086 The actual value is always <= INT_MAX, and leaving it unsigned made
10087 overflow checking harder.
10089 * dispextern.h (struct glyph_matrix.rows_allocated)
10090 (struct face_cache.size): Now ptrdiff_t, for convenience in use
10091 with xpalloc. The values are still always <= INT_MAX.
10093 * indent.c (compute_motion): Adjust to region_cache_forward sig change.
10095 * lisp.h (xnmalloc, xnrealloc, xpalloc): New decls.
10096 (SAFE_NALLOCA): New macro.
10098 * region-cache.c (struct boundary.pos, find_cache_boundary)
10099 (move_cache_gap, insert_cache_boundary, delete_cache_boundaries)
10100 (set_cache_region, invalidate_region_cache)
10101 (revalidate_region_cache, know_region_cache, region_cache_forward)
10102 (region_cache_backward, pp_cache):
10103 Use ptrdiff_t, not EMACS_INT, since either will do. This is needed
10104 so that ptrdiff_t * can be passed to xpalloc.
10105 (struct region_cache): Similarly, for gap_start, gap_len, cache_len,
10106 beg_unchanged, end_unchanged, buffer_beg, buffer_end members.
10107 (pp_cache): Don't assume cache_len fits in int.
10108 * region-cache.h: Adjust extern decls to match.
10110 * search.c (scan_buffer, Freplace_match): Use ptrdiff_t, not
10111 EMACS_INT, since either will do, for xpalloc.
10113 * alloc.c: Include verify.h, and check that int fits in ptrdiff_t.
10114 (xnmalloc, xnrealloc, xpalloc): New functions.
10116 * bidi.c (bidi_shelve_header_size): New constant.
10117 (bidi_cache_ensure_space, bidi_shelve_cache): Use it.
10118 (bidi_cache_ensure_space): Avoid integer overflow when allocating.
10120 * bidi.c (bidi_cache_shrink):
10121 * buffer.c (overlays_at, overlays_in, record_overlay_string)
10123 Don't update size of array until after memory allocation succeeds,
10124 because xmalloc/xrealloc may not return.
10125 (struct sortstrlist.bytes): Now ptrdiff_t, as EMACS_INT doesn't help
10126 now that we have proper integer overflow checking.
10127 (record_overlay_string, overlay_strings): Catch overflows when
10128 calculating size of overlay_str_buf.
10130 * callproc.c (Fcall_process): Check for size overflow when
10131 calculating size of args2.
10132 (child_setup): Avoid overflow by using size_t rather than ptrdiff_t.
10133 Normally we prefer signed values, but sticking with ptrdiff_t would
10134 require adding more-complicated checks.
10136 * ccl.c (Fccl_execute_on_string): Check for memory overflow.
10137 Use ptrdiff_t rather than EMACS_INT where ptrdiff_t will do.
10138 Redo buffer-overflow calculations to avoid integer overflow.
10139 Add a FIXME comment where memory seems to be over-allocated.
10141 * character.c (Fstring): Check for size-calculation overflow.
10143 * coding.c (produce_chars): Redo buffer-overflow calculations to avoid
10144 unnecessary integer overflow. Check for size overflow.
10145 (encode_coding_object): Don't update size until xmalloc succeeds.
10147 * composite.c (get_composition_id): Check for overflow in glyph
10148 length calculations.
10150 Integer and memory overflow fixes for display code.
10151 * dispextern.h (struct glyph_pool.nglyphs): Now ptrdiff_t, not int.
10152 * dispnew.c (adjust_glyph_matrix, realloc_glyph_pool)
10153 (scrolling_window): Check for overflow in size calculations.
10154 (line_draw_cost, realloc_glyph_pool, add_row_entry):
10155 Don't assume glyph table len fits in int.
10156 (struct row_entry.bucket, row_entry_pool_size, row_entry_idx)
10157 (row_table_size): Now ptrdiff_t, not int.
10158 (scrolling_window): Avoid overflow in size calculations.
10159 Don't update size until allocation succeeds.
10160 * fns.c (concat): Check for overflow in size calculations.
10161 (next_almost_prime): Verify NEXT_ALMOST_PRIME_LIMIT.
10162 * lisp.h (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
10163 (NEXT_ALMOST_PRIME_LIMIT): New constant.
10165 * doc.c (get_doc_string_buffer_size): Now ptrdiff_t, not int.
10166 (get_doc_string): Check for size calculation overflow.
10167 Don't update size until allocation succeeds.
10168 (get_doc_string, Fsubstitute_command_keys): Use ptrdiff_t, not
10169 EMACS_INT, where ptrdiff_t will do.
10170 (Fsubstitute_command_keys): Check for string overflow.
10172 * editfns.c (set_time_zone_rule): Don't assume environment length
10174 (message_length): Now ptrdiff_t, not int.
10175 (Fmessage_box): Don't update size until allocation succeeds.
10176 Don't assume message length fits in int.
10177 (Fformat): Use ptrdiff_t, not EMACS_INT, where ptrdiff_t will do.
10179 * emacs.c (main): Do not reallocate argv, since there is a null at
10180 the end that can be overwritten, and this way there's no need to
10181 worry about size-calculation overflow.
10182 (sort_args): Check for size-calculation overflow.
10184 * eval.c (init_eval_once, grow_specpdl): Don't update size until
10186 (call_debugger, grow_specpdl): Redo calculations to avoid overflow.
10188 * frame.c (set_menu_bar_lines, x_set_frame_parameters)
10189 (x_set_scroll_bar_width, x_figure_window_size):
10190 Check for integer overflow.
10191 (x_set_alpha): Do not assume XINT fits in int.
10193 * frame.h (struct frame): Use int, not EMACS_INT, where int works.
10194 This is for the members text_lines, text_cols, total_lines, total_cols,
10195 where the system imposes an 'int' limit.
10197 * fringe.c (Fdefine_fringe_bitmap):
10198 Don't update size until alloc works.
10200 * ftfont.c (ftfont_get_open_type_spec, setup_otf_gstring)
10201 (ftfont_shape_by_flt): Check for integer overflow in size calculations.
10203 * gtkutil.c (get_utf8_string, xg_store_widget_in_map):
10204 Check for size-calculation overflow.
10205 (get_utf8_string): Use ptrdiff_t, not size_t, where either will
10206 do, as we prefer signed integers.
10207 (id_to_widget.max_size, id_to_widget.used)
10208 (xg_store_widget_in_map, xg_remove_widget_from_map)
10209 (xg_get_widget_from_map, xg_get_scroll_id_for_window)
10210 (xg_remove_scroll_bar, xg_update_scrollbar_pos):
10211 Use and return ptrdiff_t, not int.
10212 (xg_gtk_scroll_destroy): Don't assume ptrdiff_t fits in int.
10213 * gtkutil.h: Change prototypes to match the above.
10215 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): Remove; these
10216 are duplicate now that they've been promoted to lisp.h.
10217 (x_allocate_bitmap_record, x_alloc_image_color)
10218 (make_image_cache, cache_image, xpm_load):
10219 Don't update size until alloc is done.
10220 (xpm_load, lookup_rgb_color, lookup_pixel_color, x_to_xcolors)
10222 Check for size calculation overflow.
10223 (ct_colors_allocated_max): New constant.
10224 (x_to_xcolors, x_detect_edges): Reorder multiplicands to avoid
10227 * keyboard.c (read_char, menu_bar_items, tool_bar_items)
10228 (read_char_x_menu_prompt, read_char_minibuf_menu_width)
10229 (read_char_minibuf_menu_prompt, follow_key, read_key_sequence):
10230 Use ptrdiff_t, not int, to count maps.
10231 (read_char_minibuf_menu_prompt): Check for overflow in size
10232 calculations. Don't update size until allocation succeeds.
10233 Redo calculations to avoid overflow.
10234 * keyboard.h: Change prototypes to match the above.
10236 * keymap.c (cmm_size, current_minor_maps): Use ptrdiff_t, not int,
10238 (current_minor_maps): Check for size calculation overflow.
10239 * keymap.h: Change prototypes to match the above.
10241 * lread.c (read1, init_obarray): Don't update size until alloc done.
10243 * macros.c (Fstart_kbd_macro): Don't update size until alloc done.
10244 (store_kbd_macro_char): Reorder multiplicands to avoid overflow.
10246 * nsterm.h (struct ns_color_table.size, struct ns_color_table.avail):
10247 Now ptrdiff_t, not int.
10248 * nsterm.m (ns_index_color): Use ptrdiff_t, not int, for table indexes.
10249 (ns_draw_fringe_bitmap): Rewrite to avoid overflow.
10251 * process.c (Fnetwork_interface_list): Check for overflow
10252 in size calculation.
10254 * region-cache.c (move_cache_gap): Check for size calculation overflow.
10256 * scroll.c (do_line_insertion_deletion_costs): Check for size calc
10257 overflow. Don't bother calling xmalloc when xrealloc will do.
10259 * search.c (Freplace_match): Check for size calculation overflow.
10260 (Fset_match_data): Don't assume list lengths fit in 'int'.
10262 * sysdep.c (system_process_attributes): Use ptrdiff_t, not int,
10263 for command line length. Do not attempt to address one before the
10264 beginning of an array, as that's not portable.
10266 * term.c (max_frame_lines): Remove; unused.
10267 (encode_terminal_src_size, encode_terminal_dst_size): Now ptrdiff_t,
10269 (encode_terminal_code, calculate_costs): Check for size
10270 calculation overflow.
10271 (encode_terminal_code): Use ptrdiff_t, not int, to record glyph
10272 table lengths and related sizes. Don't update size until alloc
10273 done. Redo calculations to avoid overflow.
10274 (calculate_costs): Don't bother calling xmalloc when xrealloc will do.
10276 * termcap.c (tgetent): Use ptrdiff_t, not int, to record results of
10277 subtracting pointers.
10278 (gobble_line): Check for overflow more carefully. Don't update size
10281 * tparam.c (tparam1): Use ptrdiff_t, not int, for sizes.
10282 Don't update size until alloc done.
10283 Redo size calculations to avoid overflow.
10284 Check for size calculation overflow.
10285 (main) [DEBUG]: Fix typo in invoking tparam1.
10287 * xdisp.c (store_mode_line_noprop_char, x_consider_frame_title):
10288 Use ptrdiff_t, not int, for sizes.
10289 (store_mode_line_noprop_char): Don't update size until alloc done.
10291 * xfaces.c (lface_id_to_name_size, Finternal_make_lisp_face):
10292 Use ptrdiff_t, not int, for sizes.
10293 (Finternal_make_lisp_face, cache_face):
10294 Check for size calculation overflow.
10295 (cache_face): Treat size calculation overflows as if they were
10296 memory exhaustion (the usual treatment), rather than aborting.
10298 * xfns.c (x_encode_text, x_set_name_internal)
10299 (Fx_change_window_property): Use ptrdiff_t, not int, to count
10300 sizes, since they can exceed INT_MAX in size. Check for size
10301 calculation overflow.
10303 * xgselect.c (gfds_size): Now ptrdiff_t, for convenience with xpalloc.
10304 (xg_select): Check for size calculation overflow.
10305 Don't update size until alloc done.
10307 * xrdb.c (get_environ_db): Don't assume path length fits in int,
10308 as sprintf is limited to int lengths.
10310 * xselect.c (X_LONG_SIZE, X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX)
10311 (X_LONG_MIN): New macros.
10312 Use them to make the following changes clearer.
10313 (MAX_SELECTION_QUANTUM): Make the other bounds on this value clearer.
10314 This change doesn't affect the value now, but it may help remind
10315 future maintainers not to raise the value too much later.
10316 (SELECTION_QUANTUM): Remove, replacing with ...
10317 (selection_quantum): ... new function, which avoids overflow.
10319 (struct selection_data.size): Now ptrdiff_t, not int, to avoid
10320 assumption that selection length fits in 'int'.
10321 (x_reply_selection_request, x_handle_selection_request)
10322 (x_get_window_property, receive_incremental_selection)
10323 (x_get_window_property_as_lisp_data, selection_data_to_lisp_data)
10324 (lisp_data_to_selection_data, clean_local_selection_data):
10325 Use ptrdiff_t, not int, to record length of selection.
10326 (x_reply_selection_request, x_get_window_property)
10327 (receive_incremental_selection, x_property_data_to_lisp):
10328 Redo calculations to avoid overflow.
10329 (x_reply_selection_request): When sending hint, ceiling it at
10330 X_LONG_MAX rather than relying on wraparound overflow to send
10332 (x_get_window_property, receive_incremental_selection)
10333 (lisp_data_to_selection_data, x_property_data_to_lisp):
10334 Check for size-calculation overflow.
10335 (x_get_window_property, receive_incremental_selection)
10336 (lisp_data_to_selection_data, Fx_register_dnd_atom):
10337 Don't store size until memory allocation succeeds.
10338 (x_get_window_property): Plug memory leak on memory exhaustion.
10339 Don't double-block input; malloc is safe here. Don't assume 2**34
10340 - 4 fits in unsigned long. Add an xassert to check
10341 XGetWindowProperty overflow. Be more careful about overflow
10342 calculations, and distinguish size from memory overflow better.
10343 (receive_incremental_selection): When tracing, don't assume
10344 unsigned int is less than INT_MAX.
10345 (x_selection_data_to_lisp_data): Remove unnecessary (and in theory
10346 harmful) conversions of unsigned short to int.
10347 (lisp_data_to_selection_data): Don't assume that integers
10348 in the range -65535 through -1 fit in an X unsigned short.
10349 Don't assume that ULONG_MAX == X_ULONG_MAX. Don't store into
10350 result parameters unless successful. Rely on cons_to_unsigned
10351 to report problems with elements; the old code wasn't right anyway.
10352 (x_check_property_data): Check for int overflow; we cannot use
10353 a wider type due to X limits.
10354 (x_handle_dnd_message): Use unsigned int, to avoid int overflow.
10356 * xsmfns.c (smc_save_yourself_CB): Check for size calc overflow.
10358 * xterm.c (x_color_cells, x_send_scrollbar_event, handle_one_xevent)
10359 (x_term_init): Check for size calculation overflow.
10360 (x_color_cells): Don't store size until memory allocation succeeds.
10361 (handle_one_xevent): Use ptrdiff_t, not int, for byte counts.
10362 Don't assume alloca size is less than MAX_ALLOCA.
10363 (x_term_init): Don't assume length fits in int (sprintf is limited
10366 Use ptrdiff_t for composition IDs.
10367 * character.c (lisp_string_width):
10368 * composite.c (composition_table_size, n_compositions)
10369 (get_composition_id, composition_gstring_from_id):
10370 * dispextern.h (struct glyph_string.cmp_id, struct composition_it.id):
10371 * xdisp.c (BUILD_COMPOSITE_GLYPH_STRING):
10372 * window.c (Frecenter):
10373 Use ptrdiff_t, not int, for composition IDs.
10374 * composite.c (get_composition_id): Check for integer overflow.
10375 * composite.h: Adjust prototypes to match the above changes.
10377 Use ptrdiff_t for hash table indexes.
10378 * category.c (hash_get_category_set):
10379 * ccl.c (ccl_driver):
10380 * charset.h (struct charset.hash_index, CHECK_CHARSET_GET_ID):
10381 * coding.c (coding_system_charset_list, detect_coding_system):
10382 * coding.h (struct coding_system.id):
10383 * composite.c (get_composition_id, gstring_lookup_cache):
10384 * fns.c (hash_lookup, hash_put, Fgethash, Fputhash):
10385 * image.c (xpm_get_color_table_h):
10386 * lisp.h (hash_lookup, hash_put):
10387 * minibuf.c (Ftest_completion):
10388 Use ptrdiff_t for hash table indexes, not int (which is too
10389 narrow, on 64-bit hosts) or EMACS_INT (which is too wide, on
10390 32-bit --with-wide-int hosts).
10392 * charset.c (Fdefine_charset_internal): Check for integer overflow.
10393 Add a FIXME comment about memory leaks.
10394 (syms_of_charset): Don't assume xmalloc returns.
10396 Don't assume that stated character widths fit in int.
10397 * character.c (Fchar_width, c_string_width, lisp_string_width):
10398 * character.h (CHAR_WIDTH):
10399 * indent.c (MULTIBYTE_BYTES_WIDTH):
10400 Use sanitize_char_width to avoid undefined and/or bad behavior
10401 with outlandish widths.
10402 * character.h (sanitize_tab_width): Rename from sanitize_width,
10403 now that we have two such functions. All uses changed.
10404 (sanitize_char_width): New inline function.
10406 Don't assume that tab-width fits in int.
10407 * character.h (sanitize_width): New inline function.
10408 (SANE_TAB_WIDTH): New macro.
10409 (ASCII_CHAR_WIDTH): Use it.
10410 * indent.c (sane_tab_width): Remove. All uses replaced by
10411 SANE_TAB_WIDTH (current_buffer).
10412 * xdisp.c (init_iterator): Use SANE_TAB_WIDTH.
10414 * fileio.c: Integer overflow issues with file modes.
10415 (Fset_file_modes, auto_save_1): Don't assume EMACS_INT fits in int.
10417 * charset.c (read_hex): New arg OVERFLOW. All uses changed.
10418 Remove unreachable code.
10419 (read_hex, load_charset_map_from_file): Check for integer overflow.
10421 * xterm.c: Don't go over XClientMessageEvent limit.
10422 (scroll_bar_windows_size): Now ptrdiff_t, as we prefer signed.
10423 (x_send_scroll_bar_event): Likewise. Check that the size does not
10424 exceed limits imposed by XClientMessageEvent, as well as the usual
10425 ptrdiff_t and size_t limits.
10427 * keyboard.c: Overflow, signedness and related fixes.
10428 (make_lispy_movement): Use same integer type in forward decl
10429 that is used in the definition.
10430 (read_key_sequence, keyremap_step):
10431 Change bufsize argument back to int, undoing my 2011-03-30 change.
10432 We prefer signed types, and int is wide enough here.
10433 (parse_tool_bar_item): Don't assume tool_bar_max_label_size is less
10434 than TYPE_MAXIMUM (EMACS_INT) / 2. Don't let the label size grow
10435 larger than STRING_BYTES_BOUND. Use ptrdiff_t for Emacs string
10436 length, not size_t. Use ptrdiff_t for index, not int.
10437 (keyremap_step, read_key_sequence): Redo bufsize check to avoid
10438 possibility of integer overflow.
10440 Overflow, signedness and related fixes for images.
10442 * dispextern.h (struct it.stack[0].u.image.image_id)
10443 (struct_it.image_id, struct image.id, struct image_cache.size)
10444 (struct image_cache.used, struct image_cache.ref_count):
10445 * gtkutil.c (update_frame_tool_bar):
10446 * image.c (x_reference_bitmap, Fimage_size, Fimage_mask_p)
10447 (Fimage_metadata, free_image_cache, clear_image_cache, lookup_image)
10448 (cache_image, mark_image_cache, x_kill_gs_process, Flookup_image):
10449 * nsmenu.m (update_frame_tool_bar):
10450 * xdisp.c (calc_pixel_width_or_height):
10451 * xfns.c (image_cache_refcount):
10452 Image IDs are now ptrdiff_t, not int, to avoid arbitrary limits
10453 on typical 64-bit hosts.
10455 * image.c (RANGED_INTEGERP, TYPE_RANGED_INTEGERP): New macros.
10456 (x_bitmap_pixmap, x_create_x_image_and_pixmap):
10457 Omit unnecessary casts to int.
10458 (parse_image_spec): Check that integers fall into 'int' range
10459 when the callers expect that.
10460 (image_ascent): Redo ascent calculation to avoid int overflow.
10461 (clear_image_cache): Avoid overflow when sqrt (INT_MAX) < nimages.
10462 (lookup_image): Remove unnecessary tests.
10463 (xbm_image_p): Locals are now of int, not EMACS_INT,
10464 since parse_image_check makes sure they fit into int.
10465 (png_load, gif_load, svg_load_image):
10466 Prefer int to unsigned where either will do.
10467 (tiff_handler): New function, combining the cores of the
10468 old tiff_error_handler and tiff_warning_handler.
10469 This function is rewritten to use vsnprintf and thereby avoid
10470 stack buffer overflows. It uses only the features of vsnprintf
10471 that are common to both POSIX and native Microsoft.
10472 (tiff_error_handler, tiff_warning_handler): Use it.
10473 (tiff_load, gif_load, imagemagick_load_image):
10474 Don't assume :index value fits in 'int'.
10475 (gif_load): Omit unnecessary cast to double, and avoid double-rounding.
10476 (imagemagick_load_image): Check that crop parameters fit into
10477 the integer types that MagickCropImage accepts. Don't assume
10478 Vimagemagick_render_type has a nonnegative value. Don't assume
10479 size_t fits in 'long'.
10480 (gs_load): Use printmax_t to print the widest integers possible.
10481 Check for integer overflow when computing image height and width.
10483 2011-08-26 Eli Zaretskii <eliz@gnu.org>
10485 * xdisp.c (redisplay_window): Don't force window start if point
10486 will be invisible in the resulting window. (Bug#9324)
10488 2011-08-25 Eli Zaretskii <eliz@gnu.org>
10490 * xdisp.c (compute_display_string_pos): Return 2 in DISP_PROP when
10491 the display spec is of the form `(space ...)'.
10492 (handle_display_spec): Return the value returned by
10493 handle_single_display_spec, not just 1 or zero.
10494 (handle_single_display_spec): If the display spec is of the form
10495 `(space ...)', and specifies display in the text area, return 2
10497 (try_cursor_movement): Check for the need to scroll more
10498 accurately, and prefer exact match for point under bidi.
10499 Don't advance `row' beyond the last row of the window.
10501 * dispextern.h (struct bidi_it): Rename the disp_prop_p member
10502 into disp_prop; all users changed.
10504 * bidi.c (bidi_fetch_char): If compute_display_string_pos returns
10505 DISP_PROP = 2, substitute the u+2029 PARAGRAPH SEPARATOR character
10506 for the text covered by the display property.
10508 2011-08-25 Chong Yidong <cyd@stupidchicken.com>
10510 * buffer.c (Fbury_buffer_internal): Rename from Funrecord_buffer.
10511 Change return value to nil.
10512 (Frecord_buffer): Delete unused function.
10514 2011-08-24 Eli Zaretskii <eliz@gnu.org>
10516 * xdisp.c (Fcurrent_bidi_paragraph_direction): For unibyte
10517 buffers, return left-to-right.
10518 (set_cursor_from_row): Consider candidate row a win if its glyph
10519 represents a newline and point is on that newline. Fixes cursor
10520 positioning on the newline at EOL of R2L text within L2R
10521 paragraph, and vice versa.
10522 (try_cursor_movement): Check continued rows, in addition to
10523 continuation rows. Fixes unwarranted scroll when point enters a
10524 continued line of R2L text within an L2R paragraph, or vice versa.
10525 (cursor_row_p): Consider the case of point being equal to
10526 MATRIX_ROW_END_CHARPOS. Prevents cursor being stuck when moving
10527 from the end of a short line to the beginning of a continued line
10528 of R2L text within L2R paragraph.
10529 (RECORD_MAX_MIN_POS): For max_pos, use IT_CHARPOS even for
10530 composed characters.
10532 * bidi.c (bidi_check_type): Use xassert.
10533 (bidi_cache_iterator_state): Update the disp_pos and disp_prop_p
10536 2011-08-23 Eli Zaretskii <eliz@gnu.org>
10538 * bidi.c (bidi_get_type): Abort if we get zero as the bidi type of
10541 2011-08-23 Chong Yidong <cyd@stupidchicken.com>
10543 * nsfont.m (ns_otf_to_script): Fix typo.
10545 2011-08-22 Kenichi Handa <handa@m17n.org>
10547 * chartab.c (Fset_char_table_extra_slot): Do not inhibit setting a
10548 extra slot even if the purpose is char-code-property-table.
10550 2011-08-23 Eli Zaretskii <eliz@gnu.org>
10552 * xdisp.c (redisplay_window): When computing centering_position,
10553 account for the height of the header line. (Bug#8874)
10555 * dispnew.c (buffer_posn_from_coords): Use buf_charpos_to_bytepos
10556 instead of CHAR_TO_BYTE. Fixes a crash when a completion
10557 candidate is selected by the mouse, and that candidate has a
10558 composed character under the mouse.
10560 * xdisp.c (x_produce_glyphs): Set it->nglyphs to 1. Fixes pixel
10561 coordinates reported by pos-visible-in-window-p for a composed
10562 character in column zero.
10564 2011-08-23 Stefan Monnier <monnier@iro.umontreal.ca>
10566 * cmds.c (Fself_insert_command): Mention post-self-insert-hook.
10568 2011-08-22 Eli Zaretskii <eliz@gnu.org>
10570 * xdisp.c (BUFFER_POS_REACHED_P): If this is a composition,
10571 consider it a hit if to_charpos is anywhere in the range of the
10572 composed buffer positions.
10574 2011-08-22 Chong Yidong <cyd@stupidchicken.com>
10576 * image.c (gif_load): Don't assume that each subimage has the same
10577 dimensions as the base image. Handle disposal method that is
10578 "undefined" by the gif spec (Bug#9335).
10580 2011-08-20 Chong Yidong <cyd@stupidchicken.com>
10582 * eval.c (Fsignal): Handle `debug' symbol in error handler (Bug#9329).
10583 (Fcondition_case): Document `debug' symbol in error handler.
10585 2011-08-19 Eli Zaretskii <eliz@gnu.org>
10587 * xfaces.c (face_at_buffer_position): Avoid repeated evaluation of
10588 face ID by FACE_FROM_ID, and avoid a crash when mouse is moved
10589 from an Org mode buffer to a Speedbar frame.
10591 * xdisp.c (RECORD_MAX_MIN_POS): If the display element comes from
10592 a composition, take its buffer position from IT->cmp_it.charpos.
10593 Fixes cursor positioning at the beginning of a line that begins
10594 with a composed character.
10596 2011-08-18 Eli Zaretskii <eliz@gnu.org>
10598 * bidi.c (bidi_get_type): If bidi_type_table reports zero as the
10599 character bidirectional type, use STRONG_L instead. Fixes crashes
10600 in a buffer produced by `describe-categories'.
10602 * dispextern.h (struct bidi_it): Move disp_pos and disp_prop_p
10603 members before the level stack, so they would be saved and
10604 restored when copying iterator state. Fixes incorrect reordering
10605 around TABs covered by display properties.
10607 2011-08-18 Andreas Schwab <schwab@linux-m68k.org>
10609 * process.c (Fnetwork_interface_list): Correctly determine buffer size.
10611 2011-08-17 Chong Yidong <cyd@stupidchicken.com>
10613 * eval.c (internal_condition_case, internal_condition_case_1)
10614 (internal_condition_case_2, internal_condition_case_n):
10615 Remove unnecessary aborts (Bug#9081).
10617 2011-08-17 Eli Zaretskii <eliz@gnu.org>
10619 * lread.c (Fload) [DOS_NT]: If `openp' returns -2, but the file
10620 has no `load' handler, try opening the file locally. (Bug#9311)
10622 2011-08-16 Ken Brown <kbrown@cornell.edu>
10624 * gmalloc.c: Expand comment.
10626 2011-08-16 Eli Zaretskii <eliz@gnu.org>
10628 * xdisp.c (set_cursor_from_row): Don't accept a previous candidate
10629 if it fails the cursor_row_p test. Fixes cursor positioning at ZV.
10631 2011-08-16 Ken Brown <kbrown@cornell.edu>
10633 Fix memory allocation problems in Cygwin build (Bug#9273).
10635 * unexcw.c ( __malloc_initialized): Declare external variable.
10636 (fixup_executable): Force the dumped emacs to reinitialize malloc.
10638 * gmalloc.c [CYGWIN] (bss_sbrk_heapbase, bss_sbrk_heapinfo):
10640 (malloc_initialize_1) [CYGWIN]: Prepare for reinitializing the
10642 (_free_internal_nolock) [CYGWIN]: Ignore requests to free storage
10643 in the static heap.
10644 [CYGWIN] (special_realloc): New function.
10645 (_realloc_internal_nolock) [CYGWIN]: Use the new function on
10646 requests to realloc storage in the static heap.
10648 2011-08-15 Paul Eggert <eggert@cs.ucla.edu>
10650 * bidi.c (bidi_initialize): Remove unused local.
10652 2011-08-15 Eli Zaretskii <eliz@gnu.org>
10655 * biditype.h: Remove file.
10656 * makefile.w32-in ($(BLD)/bidi.$(O)):
10657 * deps.mk (bidi.o): Remove biditype.h and bidimirror.h.
10659 * dispextern.h: Fix a typo in the comment to bidi_type_t.
10661 * chartab.c: Improve commentary for the uniprop_table API.
10663 * bidi.c (bidi_paragraph_init): Support zero value of
10664 bidi_ignore_explicit_marks_for_paragraph_level.
10665 (bidi_initialize): Use uniprop_table instead of including
10666 biditype.h and bidimirror.h.
10668 * xdisp.c (move_it_in_display_line_to): Don't reset pixel
10669 coordinates of the iterator when restoring from ppos_it.
10672 2011-08-14 Kenichi Handa <handa@m17n.org>
10674 * process.c (create_process): Call setup_process_coding_systems
10675 after the pid of the process is set to -1 (Bug#8162).
10677 2011-08-14 Eli Zaretskii <eliz@gnu.org>
10679 * xdisp.c (move_it_in_display_line_to): Don't invoke
10680 IT_RESET_X_ASCENT_DESCENT when iterator position was restored from
10681 ppos_it. Fixes vertical cursor motion when line beginning is
10682 covered by an image. (Bug#9296)
10684 2011-08-14 Jan Djärv <jan.h.d@swipnet.se>
10686 * nsterm.h (ns_run_ascript): Declare.
10687 (NSAPP_DATA2_RUNASSCRIPT): Define.
10689 * nsfns.m (as_script, as_result, as_status): New static variables.
10690 (ns_run_ascript): New function.
10691 (Fns_do_applescript): Set variables as_*. Make an NSApplicationDefined
10692 event with data2 set to NSAPP_DATA2_RUNASSCRIPT, post it and then start
10693 the event loop. Get status from as_status (Bug#7276).
10695 * nsterm.m (sendEvent): If event is NSApplicationDefined and
10696 data2 is NSAPP_DATA2_RUNASSCRIPT, call ns_run_ascript and then exit
10697 the event loop (Bug#7276).
10699 2011-08-14 Andreas Schwab <schwab@linux-m68k.org>
10701 * gnutls.c (QCgnutls_bootprop_priority)
10702 (QCgnutls_bootprop_trustfiles, QCgnutls_bootprop_keylist)
10703 (QCgnutls_bootprop_crlfiles, QCgnutls_bootprop_callbacks)
10704 (QCgnutls_bootprop_loglevel, QCgnutls_bootprop_hostname)
10705 (QCgnutls_bootprop_min_prime_bits, QCgnutls_bootprop_verify_flags)
10706 (QCgnutls_bootprop_verify_hostname_error)
10707 (QCgnutls_bootprop_callbacks_verify): Rename from
10708 Qgnutls_bootprop_..., all uses changed.
10710 * xfaces.c (QCignore_defface): Rename from Qignore_defface, all
10713 2011-08-14 Paul Eggert <eggert@cs.ucla.edu>
10715 * xfaces.c (Qframe_set_background_mode): Now static.
10716 * dispextern.h (Qframe_set_background_mode): Remove decl.
10718 * process.c (Fnetwork_interface_info): Declare local only if needed.
10720 2011-08-13 Jan Djärv <jan.h.d@swipnet.se>
10722 * process.c: Include ifaddrs.h and net/if_dl.h if available (Bug#8477).
10723 (Fnetwork_interface_list): Allocate in increments of bytes instead
10724 of sizeof (struct ifreq). Iterate over ifconf.ifc_req by counting
10725 bytes (Bug#8477). Count bytes correctly when ifr_addr is a struct
10727 (struct ifflag_def): notrailers is smart on OSX.
10728 (Fnetwork_interface_info): Handle case when ifr_flags is negative.
10729 Get hardware address with getifaddrs if available.
10731 2011-08-12 Eli Zaretskii <eliz@gnu.org>
10733 * xdisp.c (iterate_out_of_display_property): xassert that
10734 IT->position is set to within IT->object's boundaries. Break from
10735 the loop as soon as EOB is reached; avoids infloops in redisplay
10736 when IT->position is set up wrongly due to some bug.
10737 Set IT->current to match the bidi iterator unconditionally.
10738 (push_display_prop): Allow GET_FROM_STRING as IT->method on
10739 entry. Force push_it to save on the stack the current
10740 buffer/string position, to be restored by pop_it. Fix flags in
10741 the iterator structure wrt the object coming from a display
10742 property, as `line-prefix' and `wrap-prefix' are not ``replacing''
10743 properties. (Bug#9284)
10745 2011-08-09 Andreas Schwab <schwab@linux-m68k.org>
10747 * fontset.c (fontset_get_font_group): Add proper type checks.
10750 2011-08-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10752 * unexmacosx.c (print_load_command_name): Add cases LC_FUNCTION_STARTS
10753 and LC_VERSION_MIN_MACOSX.
10754 (copy_linkedit_data) [LC_FUNCTION_STARTS]: New function.
10755 (dump_it) [LC_FUNCTION_STARTS]: Use it.
10757 2011-08-08 Eli Zaretskii <eliz@gnu.org>
10759 * xdisp.c (forward_to_next_line_start): Allow to use the
10760 no-display-properties-and-no-overlays under bidi display.
10761 Set disp_pos in the bidi iterator to avoid searches for display
10762 properties and overlays.
10764 2011-08-08 Chong Yidong <cyd@stupidchicken.com>
10766 * editfns.c (Fset_time_zone_rule): Document relationship with the
10769 * ftfont.c (ftfont_pattern_entity): Copy the extras argument to
10770 the font entity extracted from the cache (Bug#8109).
10772 2011-08-07 Chong Yidong <cyd@stupidchicken.com>
10774 * composite.c (autocmp_chars): Don't reset point. That is done by
10775 restore_point_unwind (Bug#5984).
10777 2011-08-07 Juri Linkov <juri@jurta.org>
10779 * editfns.c (Fformat_time_string): Doc fix, add tag `usage:'
10780 to show the arg `TIME' instead of `TIMEVAL'.
10782 2011-08-06 Eli Zaretskii <eliz@gnu.org>
10784 * xdisp.c (set_cursor_from_row): Fix cursor positioning when a
10785 display property strides EOL and includes a newline, as in
10786 longlines-mode. (Bug#9254)
10787 (move_it_in_display_line_to): Fix vertical-motion in a buffer with
10788 word-wrap under bidirectional display. (Bug#9224)
10790 * bidi.c (bidi_unshelve_cache): Don't reset the cache if JUST_FREE
10791 is non-zero, even if the data buffer is NULL. Fixes a crash in
10792 vertical-motion with longlines-mode. (Bug#9254)
10794 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10796 * bidi.c <bidi_cache_total_alloc>: Now static.
10797 (bidi_initialize): Initialize bidi_cache_total_alloc.
10799 * xdisp.c (display_line): Release buffer allocated for shelved bidi
10802 * bidi.c (bidi_shelve_cache, bidi_unshelve_cache): Track total
10803 amount allocated this far in `bidi_cache_total_alloc'.
10804 (bidi_unshelve_cache): Accept an additional argument JUST_FREE; if
10805 non-zero, only free the data buffer without restoring the cache
10806 contents. All callers changed.
10808 * dispextern.h (bidi_unshelve_cache): Update prototype.
10810 * xdisp.c (SAVE_IT, pos_visible_p, move_it_in_display_line_to)
10811 (move_it_in_display_line, move_it_to)
10812 (move_it_vertically_backward, move_it_by_lines): Replace the call
10813 to xfree to an equivalent call to bidi_unshelve_cache.
10814 (move_it_in_display_line_to): Fix logic of returning
10815 MOVE_POS_MATCH_OR_ZV in the bidi case. (Bug#9224)
10817 2011-08-05 Eli Zaretskii <eliz@gnu.org>
10819 * xdisp.c (set_cursor_from_row): Prefer the candidate glyph that
10820 came from a string character with a `cursor' property. (Bug#9229)
10822 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
10824 * Makefile.in (LIB_PTHREAD): New variable.
10825 (LIBES): Add LIB_PTHREAD (Bug#9216).
10827 * alloc.c, emacs.c, gmalloc.c, gtkutil.c, keyboard.c, syssignal.h:
10828 Rename HAVE_GTK_AND_PTHREAD to HAVE_PTHREAD (Bug#9216).
10830 2011-08-04 Andreas Schwab <schwab@linux-m68k.org>
10832 * regex.c (re_iswctype): Remove some redundant boolean conversions.
10834 2011-08-04 Jan Djärv <jan.h.d@swipnet.se>
10836 * xterm.c (x_find_topmost_parent): New function.
10837 (x_set_frame_alpha): Find topmost parent window with
10838 x_find_topmost_parent and set the property there also (bug#9181).
10839 (handle_one_xevent): Call x_set_frame_alpha on ReparentNotify.
10841 2011-08-04 Paul Eggert <eggert@cs.ucla.edu>
10843 * callproc.c (Fcall_process): Avoid vfork clobbering
10844 the local vars buffer, coding_systems, current_dir.
10846 2011-08-03 Stefan Monnier <monnier@iro.umontreal.ca>
10848 * keymap.c (Fmake_composed_keymap): Move to subr.el.
10850 2011-08-03 Paul Eggert <eggert@cs.ucla.edu>
10852 * fontset.c (dump_fontset) [FONTSET_DEBUG]: Declare EXTERNALLY_VISIBLE
10853 so that it is not optimized away.
10855 * xdisp.c (compute_display_string_pos): Remove unused local.
10857 2011-08-02 Eli Zaretskii <eliz@gnu.org>
10859 Fix slow cursor motion and scrolling in large buffers with
10860 selective display, like Org Mode buffers. (Bug#9218)
10862 * dispextern.h (struct bidi_it): New member disp_prop_p.
10864 * xdisp.c: Remove one-slot cache of display string positions.
10865 (compute_display_string_pos): Accept an additional argument
10866 DISP_PROP_P; callers changed. Scan at most 5K characters forward
10867 for a display string or property. If found, set DISP_PROP_P
10870 * bidi.c (bidi_fetch_char): Accept an additional argument
10871 DISP_PROP_P, and pass it to compute_display_string_pos.
10872 Only handle text covered by a display string if DISP_PROP_P is returned
10873 non-zero. All callers of bidi_fetch_char changed.
10875 2011-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
10877 * keymap.c (Fdefine_key): Fix Lisp_Object/int mixup; apply some CSE.
10879 2010-12-03 Don March <don@ohspite.net>
10881 * keymap.c (Fdefine_key): Fix non-prefix key error message when
10882 last character M-[char] is translated to ESC [char] (bug#7541).
10884 2011-08-02 Kenichi Handa <handa@m17n.org>
10886 * lisp.h (uniprop_table): Extern it.
10888 * chartab.c (uniprop_table): Make it non-static.
10890 2011-08-01 Eli Zaretskii <eliz@gnu.org>
10892 * xdisp.c (forward_to_next_line_start): Accept additional argument
10893 BIDI_IT_PREV, and store into it the state of the bidi iterator had
10895 (reseat_at_next_visible_line_start): Use the bidi iterator state
10896 returned by forward_to_next_line_start to restore the state of
10897 it->bidi_it after backing up to previous newline. (Bug#9212)
10899 2011-07-30 Andreas Schwab <schwab@linux-m68k.org>
10901 * regex.c (re_comp): Protoize.
10902 (re_exec): Fix return type.
10903 (regexec): Fix type of `ret'. (Bug#9203)
10905 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
10907 * image.c (check_image_size): Use 1024x1024 if unknown frame (Bug#9189).
10908 This is needed if max-image-size is a floating-point number.
10910 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
10912 * print.c (print_object): Print empty symbol as ##.
10914 * lread.c (read1): Read ## as empty symbol.
10916 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
10918 * nsfns.m (x_set_foreground_color): Set f->foreground_pixel when
10919 setting frame foreground color (Bug#9175).
10920 (x_set_background_color): Likewise.
10922 * nsmenu.m (-setText): Size tooltip dimensions precisely to
10923 contents (Bug#9176).
10924 (EmacsTooltip -init): Remove bezels and add shadows to
10927 * nsterm.m (ns_dumpglyphs_stretch): Avoid overwriting left fringe
10928 or scroll bar (Bug#8470).
10930 * nsfont.m (nsfont_open): Remove assignment to voffset and
10931 unnecessary vars hshink, expand, hd, full_height, min_height.
10932 (nsfont_draw): Use s->ybase as baseline for glyph drawing (Bug#8913).
10934 * nsterm.h (nsfont_info): Remove voffset field.
10936 2011-07-28 Alp Aker <alp.tekin.aker@gmail.com>
10938 Implement strike-through and overline on NextStep (Bug#8863).
10940 * nsfont.m (nsfont_open): Use underline position provided by font,
10941 instead of hard-coded value of 2.
10942 (nsfont_draw): Call ns_draw_text_decoration instead.
10944 * nsterm.h: Add declaration for ns_draw_text_decoration.
10946 * nsterm.m (ns_draw_text_decoration): New function for drawing
10947 underline, overline, and strike-through.
10948 (ns_dumpglyphs_image, ns_dumpglyphs_stretch): Add call to
10949 ns_draw_text_decoration. Change treatment of cursor drawing to
10950 accommodate underlining, etc.
10952 2011-07-28 Eli Zaretskii <eliz@gnu.org>
10954 * buffer.c (init_buffer_once): Set bidi-display-reordering to t by
10957 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
10959 * alloc.c (memory_full) [!SYNC_INPUT]: Fix signal-related race.
10960 Without this fix, if a signal arrives just after memory fills up,
10961 'malloc' might be invoked reentrantly.
10963 * image.c (x_check_image_size) [!HAVE_X_WINDOWS]: Return 1.
10964 In other words, assume that every image size is allowed, on non-X
10965 hosts. This assumption is probably wrong, but it lets Emacs compile.
10967 2011-07-28 Andreas Schwab <schwab@linux-m68k.org>
10969 * regex.c (re_iswctype): Convert return values to boolean.
10971 2011-07-28 Eli Zaretskii <eliz@fencepost.gnu.org>
10973 * xdisp.c (compute_display_string_pos): Don't use cached display
10974 string position if the buffer had its restriction changed.
10977 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
10979 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
10981 2011-07-28 Paul Eggert <eggert@cs.ucla.edu>
10983 Integer signedness and overflow and related fixes. (Bug#9079)
10985 * bidi.c: Integer size and overflow fixes.
10986 (bidi_cache_size, bidi_cache_idx, bidi_cache_last_idx)
10987 (bidi_cache_start, bidi_cache_fetch_state, bidi_cache_search)
10988 (bidi_cache_find_level_change, bidi_cache_ensure_space)
10989 (bidi_cache_iterator_state, bidi_cache_find, bidi_cache_start_stack)
10990 (bidi_find_other_level_edge):
10991 Use ptrdiff_t instead of EMACS_INT where either will do.
10992 This works better on 32-bit hosts configured --with-wide-int.
10993 (bidi_cache_ensure_space): Check for size-calculation overflow.
10994 Use % rather than repeated addition, for better worst-case speed.
10995 Don't set bidi_cache_size until after xrealloc returns, because it
10997 (bidi_dump_cached_states): Use ptrdiff_t, not int, to avoid overflow.
10998 (bidi_cache_ensure_space): Also check that the bidi cache size
10999 does not exceed that of the largest Lisp string or buffer. See Eli
11000 Zaretskii in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#29>.
11002 * alloc.c (__malloc_size_t): Remove.
11003 All uses replaced by size_t. See Andreas Schwab's note
11004 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9079#8>.
11006 * image.c: Improve checking for integer overflow.
11007 (check_image_size): Assume that f is nonnull, since
11008 it is always nonnull in practice. This is one less thing to
11009 worry about when checking for integer overflow later.
11010 (x_check_image_size): New function, which checks for integer
11011 overflow issues inside X.
11012 (x_create_x_image_and_pixmap, xbm_read_bitmap_data): Use it.
11013 This removes the need for a memory_full check.
11014 (xbm_image_p): Rewrite to avoid integer multiplication overflow.
11015 (Create_Pixmap_From_Bitmap_Data, xbm_load): Use x_check_image_size.
11016 (xbm_read_bitmap_data): Change locals back to 'int', since
11017 their values must fit in 'int'.
11018 (xpm_load_image, png_load, tiff_load):
11019 Invoke x_create_x_image_and_pixmap earlier,
11020 to avoid much needless work if the image is too large.
11021 (tiff_load): Treat overly large images as if
11022 x_create_x_image_and_pixmap failed, not as malloc failures.
11023 (gs_load): Use x_check_image_size.
11025 * gtkutil.c: Omit integer casts.
11026 (xg_get_pixbuf_from_pixmap): Remove unnecessary cast.
11027 (xg_set_toolkit_scroll_bar_thumb): Rewrite to avoid need for cast.
11029 * image.c (png_load): Don't assume height * row_bytes fits in 'int'.
11031 * xfaces.c (Fbitmap_spec_p): Fix integer overflow bug.
11032 Without this fix, (bitmap-spec-p '(34359738368 1 "x"))
11033 would wrongly return t on a 64-bit host.
11035 * dispnew.c (init_display): Use *_RANGE_OVERFLOW macros.
11036 The plain *_OVERFLOW macros run afoul of GCC bug 49705
11037 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49705>
11038 and therefore cause GCC to emit a bogus diagnostic in some cases.
11040 * image.c: Integer signedness and overflow and related fixes.
11041 This is not an exhaustive set of fixes, but it's time to
11042 record what I've got.
11043 (lookup_pixel_color, check_image_size): Remove redundant decls.
11044 (check_image_size): Don't assume that arbitrary EMACS_INT values
11045 fit in 'int', or that arbitrary 'double' values fit in 'int'.
11046 (x_alloc_image_color, x_create_x_image_and_pixmap, png_load)
11047 (tiff_load, imagemagick_load_image):
11048 Check for overflow in size calculations.
11049 (x_create_x_image_and_pixmap): Remove unnecessary test for
11050 xmalloc returning NULL; that can't happen.
11051 (xbm_read_bitmap_data): Don't assume sizes fit into 'int'.
11052 (xpm_color_bucket): Use better integer hashing function.
11053 (xpm_cache_color): Don't possibly over-allocate memory.
11054 (struct png_memory_storage, tiff_memory_source, tiff_seek_in_memory)
11055 (gif_memory_source):
11056 Use ptrdiff_t, not int or size_t, to record sizes.
11057 (png_load): Don't assume values greater than 2**31 fit in 'int'.
11058 (our_stdio_fill_input_buffer): Prefer ptrdiff_t to size_t when
11059 either works, as we prefer signed integers.
11060 (tiff_read_from_memory, tiff_write_from_memory):
11061 Return tsize_t, not size_t, since that's what the TIFF API wants.
11062 (tiff_read_from_memory): Don't fail simply because the read would
11063 go past EOF; instead, return a short read.
11064 (tiff_load): Omit no-longer-needed casts.
11065 (Fimagemagick_types): Don't assume size fits into 'int'.
11067 Improve hashing quality when configured --with-wide-int.
11068 * fns.c (hash_string): New function, taken from sxhash_string.
11069 Do not discard information about ASCII character case; this
11070 discarding is no longer needed.
11071 (sxhash-string): Use it. Change sig to match it. Caller changed.
11072 * lisp.h: Declare it.
11073 * lread.c (hash_string): Remove, since we now use fns.c's version.
11074 The fns.c version returns a wider integer if --with-wide-int is
11075 specified, so this should help the quality of the hashing a bit.
11077 * emacs.c: Integer overflow minor fix.
11078 (heap_bss_diff): Now uprintmax_t, not unsigned long. All used changed.
11079 Define only if GNU_LINUX.
11080 (main, Fdump_emacs): Set and use heap_bss_diff only if GNU_LINUX.
11082 * dispnew.c: Integer signedness and overflow fixes.
11083 Remove unnecessary forward decls, that were a maintenance hassle.
11084 (history_tick): Now uprintmax_t, so it's more likely to avoid overflow.
11086 (adjust_glyph_matrix, realloc_glyph_pool, adjust_frame_message_buffer)
11087 (scrolling_window): Use ptrdiff_t, not int, for byte count.
11088 (prepare_desired_row, line_draw_cost):
11089 Use int, not unsigned, where either works.
11090 (save_current_matrix, restore_current_matrix):
11091 Use ptrdiff_t, not size_t, where either works.
11092 (init_display): Check for overflow more accurately, and without
11093 relying on undefined behavior.
11095 * editfns.c (pWIDE, pWIDElen, signed_wide, unsigned_wide):
11096 Remove, replacing with the new symbols in lisp.h. All uses changed.
11097 * fileio.c (make_temp_name):
11098 * filelock.c (lock_file_1, lock_file):
11099 * xdisp.c (message_dolog):
11100 Don't assume PRIdMAX etc. works; this isn't portable to pre-C99 hosts.
11101 Use pMd etc. instead.
11102 * lisp.h (printmax_t, uprintmax_t, pMd, pMu): New types and macros,
11103 replacing the pWIDE etc. symbols removed from editfns.c.
11105 * keyboard.h (num_input_events): Now uintmax_t.
11106 This is (very slightly) less likely to mess up due to wraparound.
11109 * buffer.c: Integer signedness fixes.
11110 (alloc_buffer_text, enlarge_buffer_text):
11111 Use ptrdiff_t rather than size_t when either will do, as we prefer
11114 * alloc.c: Integer signedness and overflow fixes.
11115 Do not impose an arbitrary 32-bit limit on malloc sizes when debugging.
11116 (__malloc_size_t): Default to size_t, not to int.
11117 (pure_size, pure_bytes_used_before_overflow, stack_copy_size)
11118 (Fgarbage_collect, mark_object_loop_halt, mark_object):
11119 Prefer ptrdiff_t to size_t when either would do, as we prefer
11121 (XMALLOC_OVERRUN_CHECK_OVERHEAD): New macro.
11122 (xmalloc_overrun_check_header, xmalloc_overrun_check_trailer):
11123 Now const. Initialize with values that are in range even if char
11125 (XMALLOC_PUT_SIZE, XMALLOC_GET_SIZE): Remove, replacing with ...
11126 (xmalloc_put_size, xmalloc_get_size): New functions. All uses changed.
11127 These functions do the right thing with sizes > 2**32.
11128 (check_depth): Now ptrdiff_t, not int.
11129 (overrun_check_malloc, overrun_check_realloc, overrun_check_free):
11130 Adjust to new way of storing sizes. Check for size overflow bugs
11132 (STRING_BYTES_MAX): Adjust to new overheads. The old code was
11133 slightly wrong anyway, as it missed one instance of
11134 XMALLOC_OVERRUN_CHECK_OVERHEAD.
11135 (refill_memory_reserve): Omit needless cast to size_t.
11136 (mark_object_loop_halt): Mark as externally visible.
11138 * xselect.c: Integer signedness and overflow fixes.
11139 (Fx_register_dnd_atom, x_handle_dnd_message):
11140 Use ptrdiff_t, not size_t, since we prefer signed.
11141 (Fx_register_dnd_atom): Check for ptrdiff_t (and size_t) overflow.
11142 * xterm.h (struct x_display_info): Use ptrdiff_t, not size_t, for
11143 x_dnd_atoms_size and x_dnd_atoms_length.
11145 * doprnt.c: Prefer signed to unsigned when either works.
11147 * doprnt.c (doprnt):
11149 * xdisp.c (vmessage):
11150 Use ptrdiff_t, not size_t, when using or implementing doprnt,
11151 since the sizes cannot exceed ptrdiff_t bounds anyway, and we
11152 prefer signed arithmetic to avoid comparison confusion.
11153 * doprnt.c (doprnt): Avoid a "+ 1" that can't overflow,
11154 but is a bit tricky.
11156 Assume freestanding C89 headers, string.h, stdlib.h.
11157 * data.c, doprnt.c, floatfns.c, print.c:
11158 Include float.h unconditionally.
11159 * gmalloc.c: Assume C89-at-least behavior for preprocessor,
11160 limits.h, stddef.h, string.h. Use memset instead of 'flood'.
11161 * regex.c: Likewise for stddef.h, string.h.
11162 (ISASCII): Remove; can assume it returns 1 now. All uses removed.
11163 * s/aix4-2.h (HAVE_STRING_H): Remove obsolete undef.
11164 * s/ms-w32.h (HAVE_LIMITS_H, HAVE_STRING_H, HAVE_STDLIB_H)
11165 (STDC_HEADERS): Remove obsolete defines.
11166 * sysdep.c: Include limits.h unconditionally.
11168 Assume support for memcmp, memcpy, memmove, memset.
11169 * lisp.h, sysdep.c (memcmp, memcpy, memmove, memset):
11170 * regex.c (memcmp, memcpy):
11171 Remove; we assume C89 now.
11173 * gmalloc.c (memcpy, memset, memmove): Remove; we assume C89 now.
11174 (__malloc_safe_bcopy): Remove; no longer needed.
11176 * lisp.h (struct vectorlike_header, struct Lisp_Subr): Signed sizes.
11177 Use EMACS_INT, not EMACS_UINT, for sizes. The code works equally
11178 well either way, and we prefer signed to unsigned.
11180 2011-07-27 Lars Magne Ingebrigtsen <larsi@gnus.org>
11182 * gnutls.c (emacs_gnutls_read): Don't message anything if the peer
11183 closes the connection while we're reading (bug#9182).
11185 2011-07-25 Jan Djärv <jan.h.d@swipnet.se>
11187 * nsmenu.m (ns_popup_dialog): Add an "ok" button if no buttons
11188 are specified (Bug#9168).
11190 2011-07-25 Paul Eggert <eggert@cs.ucla.edu>
11192 * bidi.c (bidi_dump_cached_states): Fix printf format mismatch.
11193 Found by GCC static checking and --with-wide-int on a 32-bit host.
11195 2011-07-25 Eli Zaretskii <eliz@gnu.org>
11197 * xdisp.c (compute_display_string_pos): Fix logic of caching
11198 previous display string position. Initialize cached_prev_pos to
11199 -1. Fixes slow-down at the beginning of a buffer.
11201 2011-07-24 Eli Zaretskii <eliz@gnu.org>
11203 * xfaces.c (check_lface_attrs) [HAVE_WINDOW_SYSTEM]: Allow `nil'
11204 for attrs[LFACE_FONTSET_INDEX].
11206 2011-07-23 Paul Eggert <eggert@cs.ucla.edu>
11208 * xml.c (parse_region): Remove unused local
11209 that was recently introduced.
11211 2011-07-23 Eli Zaretskii <eliz@gnu.org>
11213 * xfns.c (unwind_create_frame) [GLYPH_DEBUG]: Adapt to changes in
11214 2008-02-22T17:42:09Z!monnier@iro.umontreal.ca.
11216 * xdisp.c (move_it_in_display_line_to): Record the best matching
11217 position for TO_CHARPOS while scanning the line, and restore it on
11218 exit if none of the characters scanned was an exact match.
11219 Fixes vertical-motion and pos-visible-in-window-p under bidi redisplay
11220 when exact match is impossible due to invisible text, and the
11221 lines are truncated.
11223 2011-07-23 Jan Djärv <jan.h.d@swipnet.se>
11225 * nsterm.m (initFrameFromEmacs): Set NSTitledWindowMask in styleMask
11228 2011-07-22 Eli Zaretskii <eliz@gnu.org>
11230 Fix a significant slow-down of cursor motion with C-n, C-p,
11231 C-f/C-b, and C-v/M-v that couldn't keep up with keyboard
11232 auto-repeat under bidi redisplay in fontified buffers.
11233 * xdisp.c (compute_stop_pos_backwards): New function.
11234 (next_element_from_buffer): Call compute_stop_pos_backwards to
11235 find a suitable prev_stop when we find ourselves before
11237 (reseat): Don't look for prev_stop, as that could mean a very long
11239 <cached_disp_pos, cached_disp_buffer, cached_disp_modiff>
11240 <cached_disp_overlay_modiff>: Cache for last found display string
11242 (compute_display_string_pos): Return the cached position if asked
11243 about the same buffer in the same area of character positions, and
11244 the buffer wasn't changed since the time the display string
11245 position was cached.
11247 2011-07-22 Eli Zaretskii <eliz@gnu.org>
11249 * xdisp.c (rows_from_pos_range): Don't ignore glyphs whose object
11250 is an integer, which is important for empty lines. (Bug#9149)
11252 2011-07-22 Chong Yidong <cyd@stupidchicken.com>
11254 * frame.c (Fmodify_frame_parameters): In tty case, update the
11255 default face if necessary (Bug#4238).
11257 2011-07-21 Chong Yidong <cyd@stupidchicken.com>
11259 * editfns.c (Fstring_to_char): No need to explain what a character
11260 is in the docstring (Bug#6576).
11262 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
11264 * xml.c (parse_region): Make sure we always return a tree.
11266 2011-07-20 HAMANO Kiyoto <khiker.mail@gmail.com>
11268 * xml.c (parse_region): If a document contains only comments,
11271 2011-07-20 Lars Magne Ingebrigtsen <larsi@gnus.org>
11273 * xml.c (make_dom): Return comments, too.
11275 2011-07-19 Paul Eggert <eggert@cs.ucla.edu>
11278 See http://lists.gnu.org/archive/html/emacs-devel/2011-07/msg00688.html
11279 and the surrounding thread.
11280 * minibuf.c (read_minibuf_noninteractive): Rewrite to use getchar
11281 rather than fgets, and retry after EINTR. Otherwise, 'emacs
11282 --batch -f byte-compile-file' fails on OpenBSD if an inactivity
11284 * s/openbsd.h (BROKEN_SIGIO): Define.
11285 * unexelf.c (unexec) [__OpenBSD__]:
11286 Don't update the .mdebug section of the Alpha COFF symbol table.
11288 2011-07-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
11290 * lread.c (syms_of_lread): Clarify when `lexical-binding' is used
11293 2011-07-18 Paul Eggert <eggert@cs.ucla.edu>
11295 * fileio.c (Fcopy_file) [!MSDOS]: Tighten created file's mask.
11296 This fixes some race conditions on the permissions of any newly
11299 * alloc.c (valid_pointer_p): Use pipe, not open.
11300 This fixes some permissions issues when debugging.
11302 * fileio.c (Fcopy_file): Adjust mode if fchown fails. (Bug#9002)
11303 If fchown fails to set both uid and gid, try to set just gid,
11304 as that is sometimes allowed. Adjust the file's mode to eliminate
11305 setuid or setgid bits that are inappropriate if fchown fails.
11307 2011-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
11309 * xdisp.c (next_element_from_string, next_element_from_buffer): Use EQ
11310 to compare Lisp_Objects.
11311 * gnutls.c (syms_of_gnutls): Rename Vgnutls_log_level to
11312 global_gnutls_log_level, don't mistake it for a Lisp_Object.
11313 (init_gnutls_functions, emacs_gnutls_handle_error): Fix up uses.
11315 2011-07-17 Andreas Schwab <schwab@linux-m68k.org>
11317 * lread.c (read_integer): Unread even EOF character.
11318 (read1): Likewise. Properly record start position of symbol.
11320 * lread.c (read1): Read `#:' as empty uninterned symbol if no
11321 symbol character follows.
11323 2011-07-17 Paul Eggert <eggert@cs.ucla.edu>
11325 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
11326 This works around a problem with the previous change to Fcopy_file.
11327 Recent glibc declares fchown with __attribute__((warn_unused_result)),
11328 and without this change, GCC might complain about discarding
11329 fchown's return value.
11331 2011-07-16 Juanma Barranquero <lekktu@gmail.com>
11333 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059).
11335 2011-07-16 Paul Eggert <eggert@cs.ucla.edu>
11337 * fileio.c (Fcopy_file): Don't diagnose fchown failures. (Bug#9002)
11339 2011-07-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
11341 * gnutls.c (syms_of_gnutls): Define `gnutls-log-level' here, since
11342 it's used from the C level.
11344 * process.c: Use the same condition for POLL_FOR_INPUT in both
11345 keyboard.c and process.c (bug#1858).
11347 2011-07-09 Lawrence Mitchell <wence@gmx.li>
11349 * gnutls.c (Qgnutls_bootprop_min_prime_bits): New variable.
11350 (Fgnutls_boot): Use it.
11352 2011-07-15 Andreas Schwab <schwab@linux-m68k.org>
11354 * doc.c (Fsubstitute_command_keys): Revert last change.
11356 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
11358 * doc.c (Fsubstitute_command_keys): Clarify that \= really only
11359 quotes the next character, and doesn't affect other longer
11360 sequences (bug#8935).
11362 * lread.c (syms_of_lread): Clarify that is isn't only
11363 `eval-buffer' and `eval-defun' that's affected by
11364 `lexical-binding' (bug#8460).
11366 2011-07-15 Eli Zaretskii <eliz@gnu.org>
11368 * xdisp.c (move_it_in_display_line_to): Fix vertical motion with
11369 bidi redisplay when a line includes both an image and is truncated.
11371 2011-07-14 Paul Eggert <eggert@cs.ucla.edu>
11373 Fix minor problems found by static checking.
11374 * bidi.c (bidi_cache_size): Now EMACS_INT, not size_t.
11375 (elsz): Now a signed constant, not a size_t var. We prefer signed
11376 types to unsigned, to avoid integer comparison confusion. Without
11377 this change, GCC 4.6.1 with -Wunsafe-loop-optimizations complains
11378 "cannot optimize loop, the loop counter may overflow", a symptom
11380 * indent.c (Fvertical_motion): Mark locals as initialized.
11381 * xdisp.c (reseat_to_string): Fix pointer signedness issue.
11383 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
11385 * search.c (Fre_search_backward): Mention `case-fold-search' in
11386 all the re_search_* functions (bug#8138).
11388 * keyboard.c (Fopen_dribble_file): Document when the file is
11391 2011-07-14 Eli Zaretskii <eliz@gnu.org>
11393 * bidi.c (bidi_dump_cached_states): Fix format of displaying
11396 Support bidi reordering of display and overlay strings.
11397 * xdisp.c (compute_display_string_pos)
11398 (compute_display_string_end): Accept additional argument STRING.
11399 (init_iterator, reseat_1): Initialize bidi_it->string.s to NULL.
11400 (reseat_to_string): Initialize bidi_it->string.s and
11401 bidi_it->string.schars.
11402 (Fcurrent_bidi_paragraph_direction): Initialize itb.string.s to
11403 NULL (avoids a crash in bidi_paragraph_init).
11404 Initialize itb.string.lstring.
11405 (init_iterator): Call bidi_init_it only of a valid
11406 buffer position was specified. Initialize paragraph_embedding to
11408 (reseat_to_string): Initialize the bidi iterator.
11409 (display_string): If we need to ignore text properties of
11410 LISP_STRING, set IT->stop_charpos to IT->end_charpos. (The
11411 original value of -1 will not work with bidi.)
11412 (compute_display_string_pos): First arg is now struct
11413 `text_pos *'; all callers changed. Support display properties on
11415 (compute_display_string_end): Support display properties on Lisp
11417 (init_iterator, reseat_1, reseat_to_string): Initialize the
11418 string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS
11419 when iterating on a string not from display properties).
11420 (compute_display_string_pos, compute_display_string_end):
11421 Fix calculation of the object to scan. Fixes an error when using
11423 (next_element_from_buffer): Don't abort when IT_CHARPOS is before
11424 base_level_stop; instead, set base_level_stop to BEGV.
11425 Fixes crashes in vertical-motion.
11426 (next_element_from_buffer): Improve commentary for when
11427 the iterator is before prev_stop.
11428 (init_iterator): Initialize bidi_p from the default value of
11429 bidi-display-reordering, not from buffer-local value. Use the
11430 buffer-local value only if initializing for buffer iteration.
11431 (handle_invisible_prop): Support invisible properties on strings
11432 that are being bidi-reordered.
11433 (set_iterator_to_next): Support bidi reordering of C strings and
11435 (next_element_from_string): Support bidi reordering of Lisp
11437 (handle_stop_backwards): Support Lisp strings as well.
11438 (display_string): Support display of R2L glyph rows.
11439 Use IT_STRING_CHARPOS when displaying from a Lisp string.
11440 (init_iterator): Don't initialize it->bidi_p for strings
11442 (reseat_to_string): Initialize it->bidi_p for strings here.
11443 (next_element_from_string, next_element_from_c_string)
11444 (next_element_from_buffer): Add xassert's for correspondence
11445 between IT's object being iterated and it->bidi_it.string
11447 (face_before_or_after_it_pos): Support bidi iteration.
11448 (next_element_from_c_string): Handle the case of the first string
11449 character that is not the first one in the visual order.
11450 (get_visually_first_element): New function, refactored from common
11451 parts of next_element_from_buffer, next_element_from_string, and
11452 next_element_from_c_string.
11453 (tool_bar_lines_needed, redisplay_tool_bar)
11454 (display_menu_bar): Force left-to-right direction. Add a FIXME
11455 comment for making that be controlled by a user option.
11456 (push_it, pop_it): Save and restore the state of the
11457 bidi iterator. Save and restore the bidi_p flag.
11458 (pop_it): Iterate out of display property for string iteration as
11460 (iterate_out_of_display_property): Support iteration over strings.
11461 (handle_single_display_spec): Set up it->bidi_it for iteration
11462 over a display string, and call bidi_init_it.
11463 (handle_single_display_spec, next_overlay_string)
11464 (get_overlay_strings_1, push_display_prop): Set up the bidi
11465 iterator for displaying display or overlay strings.
11466 (forward_to_next_line_start): Don't use the shortcut if
11468 (back_to_previous_visible_line_start): If handle_display_prop
11469 pushed the iterator stack, restore the internal state of the bidi
11470 iterator by calling bidi_pop_it same number of times.
11471 (reseat_at_next_visible_line_start): If ON_NEWLINE_P is non-zero,
11472 and we are bidi-iterating, don't decrement the iterator position;
11473 instead, set the first_elt flag in the bidi iterator, to produce
11475 (reseat_1): Remove redundant setting of string_from_display_prop_p.
11476 (push_display_prop): xassert that we are iterating a buffer.
11477 (push_it, pop_it): Save and restore paragraph_embedding member.
11478 (handle_single_display_spec, next_overlay_string)
11479 (get_overlay_strings_1, reseat_1, reseat_to_string)
11480 (push_display_prop): Set up the `unibyte' member of bidi_it.string
11481 correctly. Don't assume unibyte strings are not bidi-reordered.
11482 (compute_display_string_pos)
11483 (compute_display_string_end): Fix handling the case of C string.
11484 (push_it, pop_it): Save and restore from_disp_prop_p.
11485 (handle_single_display_spec, push_display_prop): Set the
11486 from_disp_prop_p flag.
11487 (get_overlay_strings_1): Reset the from_disp_prop_p flag.
11488 (pop_it): Call iterate_out_of_display_property only if we are
11489 popping after iteration over a string that came from a display
11490 property. Fix a typo in popping stretch info. Add an assertion
11491 for verifying that the iterator position is in sync with the bidi
11493 (handle_single_display_spec, get_overlay_strings_1)
11494 (push_display_prop): Fix initialization of paragraph direction for
11495 string when that of the parent object is not yet determined.
11496 (reseat_1): Call bidi_init_it to resync the bidi
11497 iterator with IT's position. (Bug#7616)
11498 (find_row_edges): If ROW->start.pos gives position
11499 smaller than min_pos, use it as ROW->minpos. (Bug#7616)
11500 (handle_stop, back_to_previous_visible_line_start, reseat_1):
11501 Reset the from_disp_prop_p flag.
11502 (SAVE_IT, RESTORE_IT): New macros.
11503 (pos_visible_p, face_before_or_after_it_pos)
11504 (back_to_previous_visible_line_start)
11505 (move_it_in_display_line_to, move_it_in_display_line)
11506 (move_it_to, move_it_vertically_backward, move_it_by_lines)
11507 (try_scrolling, redisplay_window, display_line): Use them when
11508 saving a temporary copy of the iterator and restoring it back.
11509 (back_to_previous_visible_line_start, reseat_1)
11510 (init_iterator): Empty the bidi cache "stack".
11511 (move_it_in_display_line_to): If iterator ended up at
11512 EOL, but we never saw any buffer positions smaller than
11513 to_charpos, return MOVE_POS_MATCH_OR_ZV. Fixes vertical cursor
11514 motion in bidi-reordered lines.
11515 (move_it_in_display_line_to): Record prev_method and prev_pos
11516 immediately before the call to set_iterator_to_next. Fixes cursor
11517 motion in bidi-reordered lines with stretch glyphs and strings
11518 displayed in margins. (Bug#8133) (Bug#8867)
11519 Return MOVE_POS_MATCH_OR_ZV only if iterator position is past
11521 (pos_visible_p): Support positions in bidi-reordered lines.
11522 Save and restore bidi cache.
11524 * bidi.c (bidi_level_of_next_char): clen should be EMACS_NT, not int.
11525 (bidi_paragraph_info): Delete unused struct.
11526 (bidi_cache_idx, bidi_cache_last_idx): Declare EMACS_INT.
11527 (bidi_cache_start): New variable.
11528 (bidi_cache_reset): Reset bidi_cache_idx to bidi_cache_start, not
11530 (bidi_cache_fetch_state, bidi_cache_search)
11531 (bidi_cache_find_level_change, bidi_cache_iterator_state)
11532 (bidi_cache_find, bidi_peek_at_next_level)
11533 (bidi_level_of_next_char, bidi_find_other_level_edge)
11534 (bidi_move_to_visually_next): Compare cache index with
11535 bidi_cache_start rather than with zero.
11536 (bidi_fetch_char): Accept new argument STRING; all callers
11537 changed. Support iteration over a string. Support strings with
11538 display properties. Support unibyte strings. Fix the type of
11539 `len' according to what STRING_CHAR_AND_LENGTH expects.
11540 (bidi_paragraph_init, bidi_resolve_explicit_1)
11541 (bidi_resolve_explicit, bidi_resolve_weak)
11542 (bidi_level_of_next_char, bidi_move_to_visually_next):
11543 Support iteration over a string.
11544 (bidi_set_sor_type, bidi_resolve_explicit_1)
11545 (bidi_resolve_explicit, bidi_type_of_next_char): ignore_bn_limit
11546 can now be zero (for strings); special values 0 and -1 were
11547 changed to -1 and -2, respectively.
11548 (bidi_char_at_pos): New function.
11549 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak):
11550 Call it instead of FETCH_MULTIBYTE_CHAR.
11551 (bidi_move_to_visually_next): Abort if charpos or bytepos were not
11552 initialized to valid values.
11553 (bidi_init_it): Don't initialize charpos and bytepos with invalid
11555 (bidi_level_of_next_char): Allow the sentinel "position" to pass
11556 the test for valid cached positions. Fix the logic for looking up
11557 the sentinel state in the cache. GCPRO the Lisp string we are
11559 (bidi_push_it, bidi_pop_it): New functions.
11560 (bidi_initialize): Initialize the bidi cache start stack pointer.
11561 (bidi_cache_ensure_space): New function, refactored from part of
11562 bidi_cache_iterator_state. Don't assume the required size is just
11563 one BIDI_CACHE_CHUNK away.
11564 (bidi_cache_start_stack, bidi_push_it): Use IT_STACK_SIZE.
11565 (bidi_count_bytes, bidi_char_at_pos): New functions.
11566 (bidi_cache_search): Don't assume bidi_cache_last_idx is
11567 always valid if bidi_cache_idx is valid.
11568 (bidi_cache_find_level_change): xassert that bidi_cache_last_idx
11569 is valid if it's going to be used.
11570 (bidi_shelve_cache, bidi_unshelve_cache): New functions.
11571 (bidi_cache_fetch_state, bidi_cache_search)
11572 (bidi_cache_find_level_change, bidi_cache_ensure_space)
11573 (bidi_cache_iterator_state, bidi_cache_find)
11574 (bidi_find_other_level_edge, bidi_cache_start_stack):
11575 All variables related to cache indices are now EMACS_INT.
11577 * dispextern.h (struct bidi_string_data): New structure.
11578 (struct bidi_it): New member `string'. Make flag members be 1-bit
11579 fields, and put them last in the struct.
11580 (compute_display_string_pos, compute_display_string_end):
11582 (bidi_push_it, bidi_pop_it): Add prototypes.
11583 (struct iterator_stack_entry): New members bidi_p,
11584 paragraph_embedding, and from_disp_prop_p.
11585 (struct it): Member bidi_p is now a bit field 1 bit wide.
11586 (bidi_shelve_cache, bidi_unshelve_cache):
11587 Declare prototypes.
11589 * .gdbinit (xvectype, xvector, xcompiled, xchartable, xboolvector)
11590 (xpr, xfont, xbacktrace): Use "header.size" when accessing vectors
11591 and vector-like objects.
11593 * dispnew.c (buffer_posn_from_coords): Save and restore the bidi
11594 cache around display iteration.
11596 * window.c (Fwindow_end, window_scroll_pixel_based)
11597 (displayed_window_lines, Frecenter): Save and restore the bidi
11598 cache around display iteration.
11600 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
11602 * editfns.c (Fdelete_region): Clarify the use of the named
11603 parameters (bug#6788).
11605 2011-07-14 Martin Rudalics <rudalics@gmx.at>
11607 * indent.c (Fvertical_motion): Set and restore w->pointm when
11608 saving and restoring the window's buffer (Bug#9006).
11610 2011-07-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
11612 * editfns.c (Fstring_to_char): Clarify just what is returned
11613 (bug#6576). Text by Eli Zaretskii.
11615 2011-07-13 Juanma Barranquero <lekktu@gmail.com>
11617 * gnutls.c (init_gnutls_functions): Honor gnutls_log_level (bug#9059).
11619 2011-07-13 Eli Zaretskii <eliz@gnu.org>
11621 * buffer.c (mmap_find): Fix a typo.
11623 2011-07-13 Johan Bockgård <bojohan@gnu.org>
11625 Fix execution of x selection hooks.
11626 * xselect.c (Qx_lost_selection_functions)
11627 (Qx_sent_selection_functions): New vars.
11628 (syms_of_xselect): DEFSYM them.
11629 (x_handle_selection_request): Pass Qx_sent_selection_functions
11630 rather than Vx_sent_selection_functions to Frun_hook_with_args.
11631 (x_handle_selection_clear,x_clear_frame_selections):
11632 Pass Qx_lost_selection_functions rather than
11633 Vx_lost_selection_functions to Frun_hook_with_args.
11635 2011-07-13 Paul Eggert <eggert@cs.ucla.edu>
11637 * buffer.c (Fget_buffer_create): Initialize inhibit_shrinking.
11638 The old code sometimes used this field without initializing it.
11640 * alloc.c (gc_sweep): Don't read past end of array.
11641 In theory, the old code could also have corrupted Emacs internals,
11642 though it'd be very unlikely.
11644 2011-07-12 Andreas Schwab <schwab@linux-m68k.org>
11646 * character.c (Fcharacterp): Don't advertise optional ignored
11647 argument. (Bug#4026)
11649 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
11651 * keymap.c (syms_of_keymap): Clarify that "modifier" is "modifier
11654 * window.c (Fset_window_start): Doc fix (bug#4199).
11655 (Fset_window_hscroll): Ditto.
11657 2011-07-12 Paul Eggert <eggert@cs.ucla.edu>
11659 Fix minor new problems caught by GCC 4.6.1.
11660 * term.c (init_tty): Remove unused local.
11661 * xsettings.c (store_monospaced_changed): Define this function only
11662 if (defined HAVE_GSETTINGS || defined HAVE_GCONF), as it's
11663 not used otherwise.
11665 2011-07-12 Chong Yidong <cyd@stupidchicken.com>
11667 * xdisp.c (Vresize_mini_windows): Minor doc fix (Bug#3300).
11669 2011-07-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
11671 * xdisp.c (syms_of_xdisp): Make it explicit that the mini-windows
11672 are the mini-buffer and the echo area (bug#3320).
11674 * term.c (init_tty): Remove support for supdup, c10 and perq
11675 terminals, which are no longer supported (bug#1482).
11677 2011-07-10 Johan Bockgård <bojohan@gnu.org>
11679 * xdisp.c (Ftool_bar_lines_needed): Fix WINDOWP check.
11681 2011-07-10 Jan Djärv <jan.h.d@swipnet.se>
11683 * xmenu.c (menu_highlight_callback): Only pass frame to show_help_event
11684 for non-popups (Bug#3642).
11686 2011-07-10 Andreas Schwab <schwab@linux-m68k.org>
11688 * alloc.c (reset_malloc_hooks): Protoize.
11689 * buffer.c (mmap_init, mmap_find, mmap_free_1, mmap_enlarge)
11690 (mmap_set_vars, mmap_alloc, mmap_free, mmap_realloc): Likewise.
11691 * cm.c (losecursor): Likewise.
11692 * data.c (fmod): Likewise.
11693 * dispnew.c (swap_glyphs_in_rows): Likewise.
11694 * emacs.c (memory_warning_signal): Likewise.
11695 * floatfns.c (float_error): Likewise.
11696 * font.c (check_gstring, check_otf_features, otf_tag_symbol)
11697 (otf_open, font_otf_capability, generate_otf_features)
11698 (font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
11700 * image.c (pbm_read_file): Likewise.
11701 * indent.c (string_display_width): Likewise.
11702 * intervals.c (check_for_interval, search_for_interval)
11703 (inc_interval_count, count_intervals, root_interval)
11704 (adjust_intervals_for_insertion, make_new_interval): Likewise.
11705 * lread.c (defalias): Likewise.
11706 * ralloc.c (r_alloc_check): Likewise.
11707 * regex.c (set_image_of_range_1, set_image_of_range)
11708 (regex_grow_registers): Likewise.
11709 * sysdep.c (strerror): Likewise.
11710 * termcap.c (valid_filename_p, tprint, main): Likewise.
11711 * tparam.c (main): Likewise.
11712 * unexhp9k800.c (run_time_remap, save_data_space)
11713 (update_file_ptrs, read_header, write_header, calculate_checksum)
11714 (copy_file, copy_rest, display_header): Likewise.
11715 * widget.c (mark_shell_size_user_specified, create_frame_gcs):
11717 * xdisp.c (check_it): Likewise.
11718 * xfaces.c (register_color, unregister_color, unregister_colors):
11720 * xfns.c (print_fontset_result): Likewise.
11721 * xrdb.c (member, fatal, main): Likewise.
11723 2011-07-10 Paul Eggert <eggert@cs.ucla.edu>
11725 Fix minor problems found by static checking (Bug#9031).
11726 * chartab.c (char_table_set_range, map_sub_char_table):
11727 Remove unused locals.
11728 (uniprop_table): Now static.
11729 * composite.c (_work_char): Remove unused static var.
11731 2011-07-09 Juanma Barranquero <lekktu@gmail.com>
11733 * chartab.c (uniprop_table_uncompress): Remove unused local variable.
11735 2011-07-09 Jan Djärv <jan.h.d@swipnet.se>
11737 * gtkutil.c (qttip_cb): Remove code without function.
11739 2011-07-09 Eli Zaretskii <eliz@gnu.org>
11741 * w32.c (pthread_sigmask): New stub.
11743 2011-07-08 Paul Eggert <eggert@cs.ucla.edu>
11745 Use pthread_sigmask, not sigprocmask (Bug#9010).
11746 sigprocmask is portable only for single-threaded applications, and
11747 Emacs can be multi-threaded when it uses GTK.
11748 * Makefile.in (LIB_PTHREAD_SIGMASK): New macro.
11750 * callproc.c (Fcall_process):
11751 * process.c (create_process):
11752 * sysdep.c (sys_sigblock, sys_sigunblock, sys_sigsetmask):
11753 Use pthread_sigmask, not sigprocmask.
11755 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
11757 * gtkutil.c (qttip_cb): Set line wrap to FALSE for tooltip widget.
11758 (xg_prepare_tooltip): Revert text in x->ttip_lbl, margins was
11761 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
11763 * gtkutil.c (xg_prepare_tooltip): Fix indentation and comment.
11764 Put text in x->ttip_lbl instead of gtk_tooltip_set_text (Bug#8591).
11765 (xg_hide_tooltip): Fix comment.
11767 * nsterm.m (initFrameFromEmacs): Don't use ns_return_types
11768 in registerServicesMenuSendTypes.
11769 (validRequestorForSendType): Don't check ns_return_types.
11771 * nsfns.m (Fx_open_connection): Put NSStringPboardType into
11774 2011-07-08 Jason Rumney <jasonr@gnu.org>
11776 * w32term.c (x_make_frame_visible): Use SH_SHOWNORMAL rather than
11777 SH_SHOW for hidden windows (Bug#5482).
11779 * w32fns.c (w32_wnd_proc) [WM_TIMER, WM_SET_CURSOR]: Avoid using
11780 frame struct members of non-existent frames (Bug#6284).
11782 2011-07-08 Jan Djärv <jan.h.d@swipnet.se>
11784 * nsterm.m (keyDown): Call to wantsToDelayTextChangeNotifications and
11785 variable firstTime not needed on OSX >= 10.6.
11786 (setPosition): setFloatValue:knobProportion: is deprecated on OSX
11787 >= 10.5. Use setKnobProportion, setDoubleValue.
11789 * nsterm.h (MAC_OS_X_VERSION_10_3, MAC_OS_X_VERSION_10_4)
11790 (MAC_OS_X_VERSION_10_5): Define if not defined.
11791 (EmacsView, EmacsTooltip): Implements NSWindowDelegate on OSX >= 10.6.
11792 (EmacsMenu): Implements NSMenuDelegate on OSX >= 10.6.
11793 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
11795 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
11796 cString and lossyCString on OSX >= 10.4.
11798 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
11799 sizeToFit on OSX >= 10.2.
11801 * nsimage.m (allocInitFromFile): Don't use deprecated method
11802 bestRepresentationForDevice on OSX >= 10.6.
11804 * nsfns.m (check_ns_display_info): Cast to long and use %ld in error
11807 * emacs.c: Declare unexec_init_emacs_zone.
11809 * nsgui.h: Fix compiler warning about gnulib redefining verify.
11811 * nsselect.m (ns_get_local_selection): Change to extern (Bug#8842).
11813 * nsmenu.m (ns_update_menubar): Remove useless setDelegate call
11814 on svcsMenu (Bug#8842).
11816 * nsfns.m (Fx_open_connection): Remove NSStringPboardType from
11818 (Fns_list_services): Just return Qnil on 10.6, code not working there.
11820 * nsterm.m (QUTF8_STRING): Declare.
11821 (initFrameFromEmacs): Call registerServicesMenuSendTypes.
11822 (validRequestorForSendType): Return type is (id).
11823 Change indexOfObjectIdenticalTo to indexOfObject.
11824 Check if we have local selection before returning self (Bug#8842).
11825 (writeSelectionToPasteboard): Put local selection into paste board
11826 if we have a local selection (Bug#8842).
11827 (syms_of_nsterm): DEFSYM QUTF8_STRING.
11829 * nsterm.h (MAC_OS_X_VERSION_10_6): Define here instead of nsterm.m.
11830 (ns_get_local_selection): Declare.
11832 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
11834 * keymap.c (describe_map_tree): Don't insert a double newline at
11835 the end of the buffer (bug#1169) and return whether we inserted
11838 * callint.c (Fcall_interactively): Change "reading args" to
11839 "providing args" to try to clarify what it does (bug#1010).
11841 2011-07-07 Kenichi Handa <handa@m17n.org>
11843 * composite.c (composition_compute_stop_pos): Ignore a static
11844 composition starting before CHARPOS (Bug#8915).
11846 * xdisp.c (handle_composition_prop): Likewise.
11848 2011-07-07 Eli Zaretskii <eliz@gnu.org>
11850 * term.c (produce_glyphs) <xassert>: Allow IT_GLYPHLESS in it->what.
11853 2011-07-07 Kenichi Handa <handa@m17n.org>
11855 * character.h (unicode_category_t): New enum type.
11857 * chartab.c (uniprop_decoder_t, uniprop_encoder_t): New types.
11858 (Qchar_code_property_table): New variable.
11859 (UNIPROP_TABLE_P, UNIPROP_GET_DECODER)
11860 (UNIPROP_COMPRESSED_FORM_P): New macros.
11861 (char_table_ascii): Uncompress the compressed values.
11862 (sub_char_table_ref): New arg is_uniprop. Callers changed.
11863 Uncompress the compressed values.
11864 (sub_char_table_ref_and_range): Likewise.
11865 (char_table_ref_and_range): Uncompress the compressed values.
11866 (sub_char_table_set): New arg is_uniprop. Callers changed.
11867 Uncompress the compressed values.
11868 (sub_char_table_set_range): Args changed. Callers changed.
11869 (char_table_set_range): Adjuted for the above change.
11870 (map_sub_char_table): Delete args default_val and parent. Add arg
11871 top. Give decoded values to a Lisp function.
11872 (map_char_table): Adjust for the above change. Give decoded
11873 values to a Lisp function. Gcpro more variables.
11874 (uniprop_table_uncompress)
11875 (uniprop_decode_value_run_length): New functions.
11876 (uniprop_decoder, uniprop_decoder_count): New variables.
11877 (uniprop_get_decoder, uniprop_encode_value_character)
11878 (uniprop_encode_value_run_length, uniprop_encode_value_numeric):
11880 (uniprop_encoder, uniprop_encoder_count): New variables.
11881 (uniprop_get_encoder, uniprop_table)
11882 (Funicode_property_table_internal, Fget_unicode_property_internal)
11883 (Fput_unicode_property_internal): New functions.
11884 (syms_of_chartab): DEFSYM Qchar_code_property_table, defsubr
11885 Sunicode_property_table_internal, Sget_unicode_property_internal,
11886 and Sput_unicode_property_internal. Defvar_lisp
11887 char-code-property-alist.
11889 * composite.c (CHAR_COMPOSABLE_P): Adjust for the change of
11890 Vunicode_category_table.
11892 * font.c (font_range): Adjust for the change of
11893 Vunicode_category_table.
11895 2011-07-07 Dan Nicolaescu <dann@ics.uci.edu>
11897 * m/iris4d.h: Remove file, move contents ...
11898 * s/irix6-5.h: ... here.
11900 2011-07-06 Paul Eggert <eggert@cs.ucla.edu>
11902 Remove unportable assumption about struct layout (Bug#8884).
11903 * alloc.c (mark_buffer):
11904 * buffer.c (reset_buffer_local_variables, Fbuffer_local_variables)
11905 (clone_per_buffer_values): Don't assume that
11906 sizeof (struct buffer) is a multiple of sizeof (Lisp_Object).
11907 This isn't true in general, and it's particularly not true
11908 if Emacs is configured with --with-wide-int.
11909 * buffer.h (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER):
11910 New macros, used in the buffer.c change.
11912 2011-07-05 Jan Djärv <jan.h.d@swipnet.se>
11914 * xsettings.c: Use both GConf and GSettings if both are available.
11915 (store_config_changed_event): Add comment.
11916 (dpyinfo_valid, store_font_name_changed, map_tool_bar_style)
11917 (store_tool_bar_style_changed): New functions.
11918 (store_monospaced_changed): Add comment. Call dpyinfo_valid.
11919 (struct xsettings): Move font inside HAVE_XFT.
11920 (GSETTINGS_TOOL_BAR_STYLE, GSETTINGS_FONT_NAME): New defines.
11921 (GSETTINGS_MONO_FONT): Rename from SYSTEM_MONO_FONT.
11922 Move inside HAVE_XFT.
11923 (something_changed_gsettingsCB): Rename from something_changedCB.
11924 Check for changes in GSETTINGS_TOOL_BAR_STYLE and GSETTINGS_FONT_NAME
11926 (GCONF_TOOL_BAR_STYLE, GCONF_FONT_NAME): New defines.
11927 (GCONF_MONO_FONT): Rename from SYSTEM_MONO_FONT. Move inside HAVE_XFT.
11928 (something_changed_gconfCB): Rename from something_changedCB.
11929 Check for changes in GCONF_TOOL_BAR_STYLE and GCONF_FONT_NAME also.
11930 (parse_settings): Move check for font inside HAVE_XFT.
11931 (read_settings, apply_xft_settings): Add comment.
11932 (read_and_apply_settings): Add comment. Call map_tool_bar_style and
11933 store_tool_bar_style_changed. Move check for font inside HAVE_XFT and
11934 call store_font_name_changed.
11935 (xft_settings_event): Add comment.
11936 (init_gsettings): Add comment. Get values for GSETTINGS_TOOL_BAR_STYLE
11937 and GSETTINGS_FONT_NAME. Move check for fonts within HAVE_XFT.
11938 (init_gconf): Add comment. Get values for GCONF_TOOL_BAR_STYLE
11939 and GCONF_FONT_NAME. Move check for fonts within HAVE_XFT.
11940 (xsettings_initialize): Call init_gsettings last.
11941 (xsettings_get_system_font, xsettings_get_system_normal_font):
11944 2011-07-05 Paul Eggert <eggert@cs.ucla.edu>
11946 Random fixes. E.g., (random) never returned negative values.
11947 * fns.c (Frandom): Use GET_EMACS_TIME for random seed, and add the
11948 subseconds part to the entropy, as that's a bit more random.
11949 Prefer signed to unsigned, since the signedness doesn't matter and
11950 in general we prefer signed. When given a limit, use a
11951 denominator equal to INTMASK + 1, not to VALMASK + 1, because the
11952 latter isn't right if USE_2_TAGS_FOR_INTS.
11953 * sysdep.c (get_random): Return a value in the range 0..INTMASK,
11954 not 0..VALMASK. Don't discard "excess" bits that random () returns.
11956 2011-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
11958 * textprop.c (text_property_stickiness):
11959 Obey Vtext_property_default_nonsticky.
11960 (syms_of_textprop): Add `display' to Vtext_property_default_nonsticky.
11961 * w32fns.c (syms_of_w32fns):
11962 * xfns.c (syms_of_xfns): Don't Add `display' since it's there by default.
11964 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
11966 * fileio.c (barf_or_query_if_file_exists): Use S_ISDIR.
11967 This is more efficient than Ffile_directory_p and avoids a minor race.
11969 2011-07-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
11971 * buffer.c (Foverlay_put): Say what the return value is
11974 * fileio.c (barf_or_query_if_file_exists): Check first if the file
11975 is a directory before asking whether to use the file name
11977 (barf_or_query_if_file_exists): Make the "File is a directory"
11978 error be more correct.
11980 * fns.c (Frequire): Remove the mention of the .gz files, since
11981 that's installation-specific, but keep the mention of
11982 `get-load-suffixes'.
11984 2011-07-04 Paul Eggert <eggert@cs.ucla.edu>
11986 * editfns.c (Fformat_time_string): Don't assume strlen fits in int.
11987 Report string overflow if the output is too long.
11989 2011-07-04 Juanma Barranquero <lekktu@gmail.com>
11991 * gnutls.c (Fgnutls_boot): Don't mention :verify-error.
11992 (syms_of_gnutls): Remove duplicate DEFSYM for
11993 Qgnutls_bootprop_verify_hostname_error, an error for
11994 Qgnutls_bootprop_verify_error (which is no longer used).
11996 * eval.c (find_handler_clause): Remove parameters `sig' and `data',
11997 unused since 2011-01-26T20:02:07Z!monnier@iro.umontreal.ca. All callers changed.
11998 Also (re)move comments that are misplaced or no longer relevant.
12000 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
12002 * callint.c (Finteractive): Clarify the meaning of "@" (bug#8813).
12004 2011-07-03 Chong Yidong <cyd@stupidchicken.com>
12006 * xfaces.c (Finternal_merge_in_global_face): Modify the foreground
12007 and background color parameters if they have been changed.
12009 2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
12011 * editfns.c (Fformat): Clarify the - and 0 flags (bug#6659).
12013 2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
12015 * xsettings.c (SYSTEM_FONT): Define only when used.
12016 No need to define when HAVE_GSETTINGS || !HAVE_XFT.
12018 * keymap.c (access_keymap_1): Now static.
12020 2011-07-02 Chong Yidong <cyd@stupidchicken.com>
12022 * keyboard.c (command_loop_1): If a down-mouse event is unbound,
12023 leave any prefix arg for the up event (Bug#1586).
12025 2011-07-02 Lars Magne Ingebrigtsen <larsi@gnus.org>
12027 * lread.c (syms_of_lread): Mention single symbols defined by
12028 `defvar' or `defconst' (bug#7154).
12030 * fns.c (Frequire): Mention .el.gz files (bug#7314).
12031 (Frequire): Mention get-load-suffixes.
12033 2011-07-02 Martin Rudalics <rudalics@gmx.at>
12035 * window.h (window): Remove clone_number slot.
12036 * window.c (Fwindow_clone_number, Fset_window_clone_number):
12038 (make_parent_window, make_window, saved_window)
12039 (Fset_window_configuration, save_window_save): Don't deal with
12041 * buffer.c (Qclone_number): Remove declaration.
12042 (sort_overlays, overlay_strings): Don't deal with clone numbers.
12044 2011-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
12046 Add multiple inheritance to keymaps.
12047 * keymap.c (Fmake_composed_keymap): New function.
12048 (Fset_keymap_parent): Simplify.
12049 (fix_submap_inheritance): Remove.
12050 (access_keymap_1): New function extracted from access_keymap to handle
12051 embedded parents and handle lists of maps.
12052 (access_keymap): Use it.
12053 (Fkeymap_prompt, map_keymap_internal, map_keymap, store_in_keymap)
12054 (Fcopy_keymap): Handle embedded parents.
12055 (Fcommand_remapping, define_as_prefix): Simplify.
12056 (Fkey_binding): Simplify.
12057 (syms_of_keymap): Move minibuffer-local-completion-map,
12058 minibuffer-local-filename-completion-map,
12059 minibuffer-local-must-match-map, and
12060 minibuffer-local-filename-must-match-map to Elisp.
12061 (syms_of_keymap): Defsubr make-composed-keymap.
12062 * keyboard.c (menu_bar_items): Use map_keymap_canonical.
12063 (parse_menu_item): Trivial simplification.
12065 2011-07-01 Glenn Morris <rgm@gnu.org>
12067 * Makefile.in (SETTINGS_LIBS): Fix typo.
12069 2011-07-01 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
12071 * coding.c (Fencode_coding_string): Record the last coding system
12072 used, as the function doc string says (bug#8738).
12074 2011-07-01 Jan Djärv <jan.h.d@swipnet.se>
12076 * xsettings.c (store_monospaced_changed): Take new font as arg and
12077 check for change against current_mono_font.
12078 (EMACS_TYPE_SETTINGS): Remove this and related defines.
12079 (emacs_settings_constructor, emacs_settings_get_property)
12080 (emacs_settings_set_property, emacs_settings_class_init)
12081 (emacs_settings_init, gsettings_obj): Remove.
12082 (something_changedCB): New function for HAVE_GSETTINGS.
12083 (something_changedCB): HAVE_GCONF: Call store_monospaced_changed
12084 with value as argument.
12085 (init_gsettings): Check that GSETTINGS_SCHEMA exists before calling
12086 g_settings_new (Bug#8967). Do not create gsettings_obj.
12087 Remove calls to g_settings_bind. Connect something_changedCB to
12090 * xgselect.c: Add defined (HAVE_GSETTINGS).
12091 (xgselect_initialize): Ditto.
12093 * process.c: Add defined (HAVE_GSETTINGS) for xgselect.h
12094 (wait_reading_process_output): Add defined (HAVE_GSETTINGS) for
12097 2011-07-01 Paul Eggert <eggert@cs.ucla.edu>
12099 * eval.c (struct backtrace): Simplify and port the data structure.
12100 Do not assume that "int nargs : BITS_PER_INT - 2;" produces a
12101 signed bit field, as this assumption is not portable and it makes
12102 Emacs crash when compiled with Sun C 5.8 on sparc. Do not use
12103 "char debug_on_exit : 1" as this is not portable either; instead,
12104 use the portable "unsigned int debug_on_exit : 1". Remove unused
12105 member evalargs. Remove obsolete comments about cc bombing out.
12107 2011-06-30 Jan Djärv <jan.h.d@swipnet.se>
12109 * xsettings.c: Include glib-object.h, gio/gio.h if HAVE_GSETTINGS.
12110 Let HAVE_GSETTINGS override HAVE_GCONF.
12111 (store_monospaced_changed): New function.
12112 (EMACS_SETTINGS): A new type derived from GObject to handle
12113 GSettings notifications.
12114 (emacs_settings_constructor, emacs_settings_get_property)
12115 (emacs_settings_set_property, emacs_settings_class_init):
12117 (gsettings_client, gsettings_obj): New variables.
12118 (GSETTINGS_SCHEMA): New define.
12119 (something_changedCB): Call store_monospaced_changed.
12120 (init_gsettings): New function.
12121 (xsettings_initialize): Call init_gsettings.
12122 (syms_of_xsettings): Initialize gsettings_client, gsettings_obj
12125 * Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Rename from
12128 2011-06-29 Martin Rudalics <rudalics@gmx.at>
12130 * window.c (resize_root_window, grow_mini_window)
12131 (shrink_mini_window): Rename Qresize_root_window to
12132 Qwindow_resize_root_window and Qresize_root_window_vertically to
12133 Qwindow_resize_root_window_vertically.
12135 2011-06-28 Paul Eggert <eggert@cs.ucla.edu>
12137 * gnutls.c (Qgnutls_bootprop_verify_error): Remove unused var.
12139 2011-06-27 Juanma Barranquero <lekktu@gmail.com>
12141 * makefile.w32-in: Redesign dependencies so they reflect more
12142 clearly which files are directly included by each source file,
12143 and not through other includes.
12145 2011-06-27 Martin Rudalics <rudalics@gmx.at>
12147 * buffer.c (Qclone_number): Declare static and DEFSYM it.
12148 (sort_overlays, overlay_strings): When an overlay's clone number
12149 matches the window's clone number process the overlay even if
12150 the overlay's window property doesn't match the current window.
12152 * window.c (Fwindow_vchild): Rename to Fwindow_top_child.
12153 (Fwindow_hchild): Rename to Fwindow_left_child.
12154 (Fwindow_next): Rename to Fwindow_next_sibling.
12155 (Fwindow_prev): Rename to Fwindow_prev_sibling.
12156 (resize_window_check): Rename to window_resize_check.
12157 (resize_window_apply): Rename to window_resize_apply.
12158 (Fresize_window_apply): Rename to Fwindow_resize_apply.
12159 (Fdelete_other_windows_internal, resize_frame_windows)
12160 (Fsplit_window_internal, Fdelete_window_internal)
12161 (grow_mini_window, shrink_mini_window)
12162 (Fresize_mini_window_internal): Fix callers accordingly.
12164 2011-06-26 Jan Djärv <jan.h.d@swipnet.se>
12166 * emacsgtkfixed.h: State that this is only used with Gtk+3.
12167 (emacs_fixed_set_min_size): Remove.
12168 (emacs_fixed_new): Take frame as argument.
12170 * emacsgtkfixed.c: State that this is only used with Gtk+3.
12171 (_EmacsFixedPrivate): Remove minwidth/height.
12172 Add struct frame *f.
12173 (emacs_fixed_init): Initialize priv->f.
12174 (get_parent_class, emacs_fixed_set_min_size): Remove.
12175 (emacs_fixed_new): Set priv->f to argument.
12176 (emacs_fixed_get_preferred_width)
12177 (emacs_fixed_get_preferred_height): Use min_width/height from
12178 frames size_hint to set minimum and natural (Bug#8919).
12179 (XSetWMSizeHints, XSetWMNormalHints): Override these functions
12180 and use min_width/height from frames size_hint to set
12181 min_width/height (Bug#8919).
12183 * gtkutil.c (xg_create_frame_widgets): Pass f to emacs_fixed_new.
12184 (x_wm_set_size_hint): Remove call to emacs_fixed_set_min_size.
12187 2011-06-26 Eli Zaretskii <eliz@gnu.org>
12189 * bidi.c (bidi_paragraph_init): Test for ZV_BYTE before calling
12190 bidi_at_paragraph_end, since fast_looking_at doesn't like to be
12193 2011-06-26 Chong Yidong <cyd@stupidchicken.com>
12195 * process.c (wait_reading_process_output): Bypass select if
12196 waiting for a cell while ignoring keyboard input, and input is
12197 pending. Suggested by Jan Djärv (Bug#8869).
12199 2011-06-25 Paul Eggert <eggert@cs.ucla.edu>
12201 Use gnulib's dup2 module instead of rolling our own.
12202 * sysdep.c (dup2) [!HAVE_DUP2]: Remove; gnulib now does this.
12204 2011-06-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12206 * dispnew.c (scrolling_window): Before scrolling, turn off a
12207 mouse-highlight in the window being scrolled.
12209 2011-06-24 Juanma Barranquero <lekktu@gmail.com>
12211 Move DEFSYM to lisp.h and use everywhere.
12213 * character.h (DEFSYM): Move declaration...
12214 * lisp.h (DEFSYM): ...here.
12220 * w32select.c: Don't include character.h.
12222 * alloc.c (syms_of_alloc):
12223 * buffer.c (syms_of_buffer):
12224 * bytecode.c (syms_of_bytecode):
12225 * callint.c (syms_of_callint):
12226 * casefiddle.c (syms_of_casefiddle):
12227 * casetab.c (init_casetab_once):
12228 * category.c (init_category_once, syms_of_category):
12229 * ccl.c (syms_of_ccl):
12230 * cmds.c (syms_of_cmds):
12231 * composite.c (syms_of_composite):
12232 * dbusbind.c (syms_of_dbusbind):
12233 * dired.c (syms_of_dired):
12234 * dispnew.c (syms_of_display):
12235 * doc.c (syms_of_doc):
12236 * editfns.c (syms_of_editfns):
12237 * emacs.c (syms_of_emacs):
12238 * eval.c (syms_of_eval):
12239 * fileio.c (syms_of_fileio):
12240 * fns.c (syms_of_fns):
12241 * frame.c (syms_of_frame):
12242 * fringe.c (syms_of_fringe):
12243 * insdel.c (syms_of_insdel):
12244 * keymap.c (syms_of_keymap):
12245 * lread.c (init_obarray, syms_of_lread):
12246 * macros.c (syms_of_macros):
12247 * msdos.c (syms_of_msdos):
12248 * print.c (syms_of_print):
12249 * process.c (syms_of_process):
12250 * search.c (syms_of_search):
12251 * sound.c (syms_of_sound):
12252 * syntax.c (init_syntax_once, syms_of_syntax):
12253 * terminal.c (syms_of_terminal):
12254 * textprop.c (syms_of_textprop):
12255 * undo.c (syms_of_undo):
12256 * w32.c (globals_of_w32):
12257 * window.c (syms_of_window):
12258 * xdisp.c (syms_of_xdisp):
12259 * xfaces.c (syms_of_xfaces):
12260 * xfns.c (syms_of_xfns):
12261 * xmenu.c (syms_of_xmenu):
12262 * xsettings.c (syms_of_xsettings):
12263 * xterm.c (syms_of_xterm): Use DEFSYM.
12265 2011-06-24 Teodor Zlatanov <tzz@lifelogs.com>
12267 * gnutls.c (syms_of_gnutls): Use the DEFSYM macro from character.h.
12269 2011-06-23 Paul Eggert <eggert@cs.ucla.edu>
12271 Integer and buffer overflow fixes (Bug#8873).
12273 * print.c (printchar, strout): Check for string overflow.
12274 (PRINTPREPARE, printchar, strout):
12275 Don't set size unless allocation succeeds.
12277 * minibuf.c (read_minibuf_noninteractive): Use ptrdiff_t, not int,
12278 for sizes. Check for string overflow more accurately.
12279 Simplify newline removal at end; this suppresses a GCC 4.6.0 warning.
12281 * macros.c: Integer and buffer overflow fixes.
12282 * keyboard.h (struct keyboard.kbd_macro_bufsize):
12283 * macros.c (Fstart_kbd_macro, store_kbd_macro_char):
12284 Use ptrdiff_t, not int, for sizes.
12285 Don't increment bufsize until after realloc succeeds.
12286 Check for size-calculation overflow.
12287 (Fstart_kbd_macro): Use EMACS_INT, not int, for XINT result.
12289 * lisp.h (DEFVAR_KBOARD): Use offsetof instead of char * finagling.
12291 * lread.c: Integer overflow fixes.
12292 (read_integer): Radix is now EMACS_INT, not int,
12293 to improve quality of diagnostics for out-of-range radices.
12294 Calculate buffer size correctly for out-of-range radices.
12295 (read1): Check for integer overflow in radices, and in
12296 read-circle numbers.
12297 (read_escape): Avoid int overflow.
12298 (Fload, openp, read_buffer_size, read1)
12299 (substitute_object_recurse, read_vector, read_list, map_obarray):
12300 Use ptrdiff_t, not int, for sizes.
12301 (read1): Use EMACS_INT, not int, for sizes.
12302 Check for size overflow.
12304 * image.c (cache_image): Check for size arithmetic overflow.
12306 * lread.c: Integer overflow issues.
12307 (saved_doc_string_size, saved_doc_string_length)
12308 (prev_saved_doc_string_size, prev_saved_doc_string_length):
12309 Now ptrdiff_t, not int.
12310 (read1): Don't assume doc string length fits in int. Check for
12311 out-of-range doc string lengths.
12312 (read_list): Don't assume file position fits in int.
12313 (read_escape): Check for hex character overflow.
12315 2011-06-22 Leo Liu <sdl.web@gmail.com>
12317 * minibuf.c (Fcompleting_read_default, Vcompleting_read_function):
12318 Move to minibuffer.el.
12320 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
12322 Fixes for GLYPH_DEBUG found by GCC 4.6.0 static checking.
12323 The following patches are for when GLYPH_DEBUG && !XASSERT.
12324 * dispextern.h (trace_redisplay_p, dump_glyph_string):
12325 * dispnew.c (flush_stdout):
12326 * xdisp.c (dump_glyph_row, dump_glyph_matrix, dump_glyph):
12327 Mark as externally visible.
12328 * dispnew.c (check_window_matrix_pointers): Now static.
12329 * dispnew.c (window_to_frame_vpos):
12330 * xfns.c (unwind_create_frame):
12331 * xterm.c (x_check_font): Remove unused local.
12332 * scroll.c (CHECK_BOUNDS):
12333 * xfaces.c (cache_fache): Rename local to avoid shadowing.
12334 * xfns.c, w32fns.c (image_cache_refcount, dpyinfo_refcount): Now static.
12335 * xdisp.c (check_window_end): Now a no-op if !XASSERTS.
12336 (debug_first_unchanged_at_end_vpos, debug_last_unchanged_at_beg_vpos)
12337 (debug_dvpos, debug_dy, debug_delta, debug_delta_bytes, debug_end_vpos):
12339 (debug_method_add): Use va_list and vsprintf rather than relying
12340 on undefined behavior with wrong number of arguments.
12341 (dump_glyph, dump_glyph_row, Fdump_glyph_matrix):
12342 Don't assume ptrdiff_t and EMACS_INT are the same width as int.
12343 In this code, it's OK to assume C99 behavior for ptrdiff_t formats
12344 since we're not interested in debugging glyphs with old libraries.
12345 * xfaces.c (cache_face): Move debugging code earlier; this pacifies
12346 GCC 4.6.0's static checking.
12348 2011-06-22 Paul Eggert <eggert@cs.ucla.edu>
12350 Integer overflow and signedness fixes (Bug#8873).
12351 A few related buffer overrun fixes, too.
12353 * font.c (font_score): Use EMACS_INT, not int, to store XINT value.
12355 * dispextern.h (struct face.stipple):
12356 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
12357 (x_bitmap_mask, x_allocate_bitmap_record)
12358 (x_create_bitmap_from_data, x_create_bitmap_from_file)
12359 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
12360 (x_create_bitmap_from_xpm_data):
12361 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
12362 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
12364 * xfaces.c (load_pixmap):
12365 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
12366 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
12367 (.bitmaps_last, struct x_output.icon_bitmap):
12368 Use ptrdiff_t, not int, for bitmap indexes.
12369 (x_allocate_bitmap_record): Check for size overflow.
12370 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
12372 Use ptrdiff_t, not int, for overlay counts.
12373 * buffer.h (overlays_at, sort_overlays, GET_OVERLAYS_AT):
12374 * editfns.c (overlays_around, get_pos_property):
12375 * textprop.c (get_char_property_and_overlay):
12376 * xdisp.c (next_overlay_change, note_mouse_highlight):
12377 * xfaces.c (face_at_buffer_position):
12378 * buffer.c (OVERLAY_COUNT_MAX): New macro.
12379 (overlays_at, overlays_in, sort_overlays, Foverlays_at)
12380 (Fnext_overlay_change, Fprevious_overlay_change)
12381 (mouse_face_overlay_overlaps, Foverlays_in):
12382 Use ptrdiff_t, not int, for sizes.
12383 (overlays_at, overlays_in): Check for size-calculation overflow.
12385 * xterm.c (xim_initialize, same_x_server): Strlen may not fit in int.
12387 * xsmfns.c (smc_save_yourself_CB, x_session_initialize): Avoid strlen.
12388 (x_session_initialize): Do not assume string length fits in int.
12390 * xsettings.c (apply_xft_settings): Fix potential buffer overrun.
12391 This is unlikely, but can occur if DPI is outlandish.
12393 * xsettings.c (Ffont_get_system_normal_font, Ffont_get_system_font):
12394 * xselect.c (Fx_get_atom_name): Avoid need for strlen.
12396 * xrdb.c: Don't assume strlen fits in int; avoid some strlens.
12397 * xrdb.c (magic_file_p, search_magic_path):
12398 Omit last arg SUFFIX; it was always 0. All callers changed.
12399 (magic_file_p): Use ptrdiff_t, not int. Check for size overflow.
12401 * xfont.c (xfont_match): Avoid need for strlen.
12403 * xfns.c: Don't assume strlen fits in int.
12404 (xic_create_fontsetname, x_window): Use ptrdiff_t, not int.
12406 * xdisp.c (message_log_check_duplicate): Return intmax_t,
12407 not unsigned long, as we prefer signed integers. All callers changed.
12408 Detect integer overflow in repeat count.
12409 (message_dolog): Don't assume print length fits in 39 bytes.
12410 (display_mode_element): Don't assume strlen fits in int.
12412 * termcap.c: Don't assume sizes fit in int and never overflow.
12413 (struct termcap_buffer, tgetent): Use ptrdiff_t, not int, for sizes.
12414 (gobble_line): Check for size-calculation overflow.
12416 * minibuf.c (Fread_buffer):
12417 * lread.c (intern, intern_c_string):
12418 * image.c (xpm_scan) [HAVE_NS && !HAVE_XPM]:
12419 Don't assume string length fits in int.
12421 * keyboard.c (parse_tool_bar_item):
12422 * gtkutil.c (style_changed_cb): Avoid need for strlen.
12424 * font.c: Don't assume string length fits in int.
12425 (font_parse_xlfd, font_parse_fcname, font_unparse_fcname):
12426 Use ptrdiff_t, not int.
12427 (font_intern_prop): Don't assume string length fits in int.
12428 Don't assume integer property fits in fixnum.
12429 * font.h (font_intern_prop): 2nd arg is now ptrdiff_t, not int.
12431 * filelock.c: Fix some buffer overrun and integer overflow issues.
12432 (get_boot_time): Don't assume gzip command string fits in 100 bytes.
12433 Reformulate so as not to need the command string.
12434 Invoke gzip -cd rather than gunzip, as it's more portable.
12435 (lock_info_type, lock_file_1, lock_file):
12436 Don't assume pid_t and time_t fit in unsigned long.
12437 (LOCK_PID_MAX): Remove; we now use more-reliable bounds.
12438 (current_lock_owner): Prefer signed type for sizes.
12439 Use memcpy, not strncpy, where memcpy is what is really wanted.
12440 Don't assume (via atoi) that time_t and pid_t fit in int.
12441 Check for time_t and/or pid_t out of range, e.g., via a network share.
12442 Don't alloca where an auto var works fine.
12444 * fileio.c: Fix some integer overflow issues.
12445 (file_name_as_directory, Fexpand_file_name, Fsubstitute_in_file_name):
12446 Don't assume string length fits in int.
12447 (directory_file_name): Don't assume string length fits in long.
12448 (make_temp_name): Don't assume pid fits in int, or that its print
12449 length is less than 20.
12451 * data.c (Fsubr_name): Rewrite to avoid a strlen call.
12453 * coding.c (make_subsidiaries): Don't assume string length fits in int.
12455 * callproc.c (child_setup): Rewrite to avoid two strlen calls.
12457 * process.c (Fformat_network_address): Use EMACS_INT, not EMACS_UINT.
12458 We prefer signed integers, even for size calculations.
12460 * emacs.c: Don't assume string length fits in 'int'.
12461 (DEFINE_DUMMY_FUNCTION, sort_args): Use ptrdiff_t, not int.
12462 (main): Don't invoke strlen when not needed.
12464 * dbusbind.c (XD_ERROR): Don't arbitrarily truncate string.
12465 (XD_DEBUG_MESSAGE): Don't waste a byte.
12467 * callproc.c (getenv_internal_1, getenv_internal)
12468 (Fgetenv_internal):
12469 * buffer.c (init_buffer): Don't assume string length fits in 'int'.
12471 * lread.c (invalid_syntax): Omit length argument.
12472 All uses changed. This doesn't fix a bug, but it simplifies the
12473 code away from its former Hollerith-constant appearance, and it's
12474 one less 'int' to worry about when looking at integer-overflow issues.
12475 (string_to_number): Simplify 2011-04-26 change by invoking xsignal1.
12477 * lisp.h (DEFUN): Remove bogus use of sizeof (struct Lisp_Subr).
12478 This didn't break anything, but it didn't help either.
12479 It's confusing to put a bogus integer in a place where the actual
12480 value does not matter.
12481 (LIST_END_P): Remove unused macro and its bogus comment.
12482 (make_fixnum_or_float): Remove unnecessary cast to EMACS_INT.
12484 * lisp.h (union Lisp_Object.i): EMACS_INT, not EMACS_UINT.
12485 This is for consistency with the ordinary, non-USE_LISP_UNION_TYPE,
12487 (struct Lisp_Bool_Vector.size): EMACS_INT, not EMACS_UINT.
12488 We prefer signed types, and the value cannot exceed the EMACS_INT
12489 range anyway (because otherwise the length would not be representable).
12490 (XSET) [USE_LISP_UNION_TYPE]: Use uintptr_t and intptr_t,
12491 not EMACS_UINT and EMACS_INT, when converting pointer to integer.
12492 This avoids a GCC warning when WIDE_EMACS_INT.
12494 * indent.c (sane_tab_width): New function.
12495 (current_column, scan_for_column, Findent_to, position_indentation)
12496 (compute_motion): Use it. This is just for clarity.
12497 (Fcompute_motion): Don't assume hscroll and tab offset fit in int.
12499 * image.c (xbm_image_p): Don't assume stated width, height fit in int.
12501 * lisp.h (lint_assume): New macro.
12502 * composite.c (composition_gstring_put_cache):
12503 * ftfont.c (ftfont_shape_by_flt): Use it to pacify GCC 4.6.0.
12505 * editfns.c, insdel.c:
12506 Omit unnecessary forward decls, to simplify future changes.
12508 * ftfont.c (ftfont_shape_by_flt): Use signed integers for lengths.
12510 * font.c (Ffont_shape_gstring): Don't assume glyph len fits in 'int'.
12512 * fns.c (Ffillarray): Don't assume bool vector size fits in 'int'.
12513 Use much-faster test for byte-length change.
12514 Don't assume string byte-length fits in 'int'.
12515 Check that character arg fits in 'int'.
12516 (mapcar1): Declare byte as byte, for clarity.
12518 * alloc.c (Fmake_bool_vector): Avoid unnecessary multiplication.
12520 * fns.c (concat): Catch string overflow earlier.
12521 Do not rely on integer wraparound.
12523 * dispextern.h (struct it.overlay_strings_charpos)
12524 (struct it.selective): Now EMACS_INT, not int.
12525 * xdisp.c (forward_to_next_line_start)
12526 (back_to_previous_visible_line_start)
12527 (reseat_at_next_visible_line_start, next_element_from_buffer):
12528 Don't arbitrarily truncate the value of 'selective' to int.
12530 * xdisp.c (init_iterator): Use XINT, not XFASTINT; it might be < 0.
12532 * composite.c: Don't truncate sizes to 'int'.
12533 (composition_gstring_p, composition_reseat_it)
12534 (composition_adjust_point): Use EMACS_INT, not int.
12535 (get_composition_id, composition_gstring_put_cache): Use EMACS_INT,
12536 not EMACS_UINT, for indexes.
12538 * category.h (CATEGORY_SET_P): Remove unnecessary cast to EMACS_INT.
12540 * buffer.c: Include <verify.h>.
12541 (struct sortvec.priority, struct sortstr.priority):
12542 Now EMACS_INT, not int.
12543 (compare_overlays, cmp_for_strings): Avoid subtraction overflow.
12544 (struct sortstr.size, record_overlay_string)
12545 (struct sortstrlist.size, struct sortlist.used):
12546 Don't truncate size to int.
12547 (record_overlay_string): Check for size-calculation overflow.
12548 (init_buffer_once): Check at compile-time, not run-time.
12550 2011-06-22 Jim Meyering <meyering@redhat.com>
12552 Don't leak an XBM-image-sized buffer
12553 * image.c (xbm_load): Free the image buffer after using it.
12555 2011-06-21 Paul Eggert <eggert@cs.ucla.edu>
12558 * composite.c (find_automatic_composition): Omit needless 'return 0;'
12559 that Sun C diagnosed.
12560 * fns.c (secure_hash): Fix pointer signedness issue.
12561 * intervals.c (static_offset_intervals): New function.
12562 (offset_intervals): Use it.
12564 2011-06-21 Leo Liu <sdl.web@gmail.com>
12567 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha256.h and
12570 * fns.c (secure_hash): Rename from crypto_hash_function and change
12571 the first arg to accept symbols.
12572 (Fsecure_hash): New primitive.
12573 (syms_of_fns): New symbols.
12575 2011-06-20 Deniz Dogan <deniz@dogan.se>
12577 * process.c (Fset_process_buffer): Clarify return value in
12580 2011-06-18 Chong Yidong <cyd@stupidchicken.com>
12582 * dispnew.c (add_window_display_history): Use BVAR.
12584 * xdisp.c (debug_method_add): Use BVAR.
12585 (check_window_end, dump_glyph_matrix, dump_glyph)
12586 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
12588 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
12591 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
12592 check till after the cache is created in init_frame_faces.
12594 2011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
12596 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
12598 2011-06-16 Paul Eggert <eggert@cs.ucla.edu>
12600 * lisp.h: Include <limits.h>, for INT_MAX, LONG_MAX, LLONG_MAX.
12601 Without this, prin1 mishandles Lisp_Misc_Save_Value printing on
12602 hosts with pre-C99 libraries, because pD is wrongly defined to "t".
12604 Improve buffer-overflow checking (Bug#8873).
12605 * fileio.c (Finsert_file_contents):
12606 * insdel.c (insert_from_buffer_1, replace_range, replace_range_2):
12607 Remove the old (too-loose) buffer overflow checks.
12608 They weren't needed, since make_gap checks for buffer overflow.
12609 * insdel.c (make_gap_larger): Catch buffer overflows that were missed.
12610 The old code merely checked for Emacs fixnum overflow, and relied
12611 on undefined (wraparound) behavior. The new code avoids undefined
12612 behavior, and also checks for ptrdiff_t and/or size_t overflow.
12614 * editfns.c (Finsert_char): Don't dump core with very negative counts.
12615 Tune. Don't use wider integers than needed. Don't use alloca.
12616 Use a bigger 'string' buffer. Rewrite to avoid 'n > 0' test.
12618 * insdel.c (replace_range): Fix buf overflow when insbytes < outgoing.
12620 * insdel.c, lisp.h (buffer_overflow): New function.
12621 (insert_from_buffer_1, replace_range, replace_range_2):
12622 * insdel.c (make_gap_larger):
12623 * editfns.c (Finsert_char):
12624 * fileio.c (Finsert_file_contents): Use it, to normalize wording.
12626 * buffer.h (BUF_BYTES_MAX): Cast to ptrdiff_t so that it's signed.
12628 2011-06-15 Paul Eggert <eggert@cs.ucla.edu>
12630 Integer overflow and signedness fixes (Bug#8873, Bug#8828).
12632 * ccl.c (ASCENDING_ORDER): New macro, to work around GCC bug 43772.
12633 (GET_CCL_RANGE, IN_INT_RANGE): Use it.
12635 * fileio.c: Don't assume EMACS_INT fits in off_t.
12636 (emacs_lseek): New static function.
12637 (Finsert_file_contents, Fwrite_region): Use it.
12638 Use SEEK_SET, SEEK_CUR, SEEK_END as appropriate.
12640 * fns.c (Fload_average): Don't assume 100 * load average fits in int.
12642 * fns.c: Don't overflow int when computing a list length.
12643 * fns.c (QUIT_COUNT_HEURISTIC): New constant.
12644 (Flength, Fsafe_length): Use EMACS_INT, not int, to avoid unwanted
12645 truncation on 64-bit hosts. Check for QUIT every
12646 QUIT_COUNT_HEURISTIC entries rather than every other entry; that's
12647 faster and is responsive enough.
12648 (Flength): Report an error instead of overflowing an integer.
12649 (Fsafe_length): Return a float if the value is not representable
12650 as a fixnum. This shouldn't happen except in contrived situations.
12651 (Fnthcdr, Fsort): Don't assume list length fits in int.
12652 (Fcopy_sequence): Don't assume vector length fits in int.
12654 * alloc.c: Check that resized vectors' lengths fit in fixnums.
12655 (header_size, word_size): New constants.
12656 (allocate_vectorlike): Don't check size overflow here.
12657 (allocate_vector): Check it here instead, since this is the only
12658 caller of allocate_vectorlike that could cause overflow.
12659 Check that the new vector's length is representable as a fixnum.
12661 * fns.c (next_almost_prime): Don't return a multiple of 3 or 5.
12662 The previous code was bogus. For example, next_almost_prime (32)
12663 returned 39, which is undesirable as it is a multiple of 3; and
12664 next_almost_prime (24) returned 25, which is a multiple of 5 so
12665 why was the code bothering to check for multiples of 7?
12667 * bytecode.c (exec_byte_code): Use ptrdiff_t, not int, for vector length.
12669 * eval.c, doprnt.c (SIZE_MAX): Remove; inttypes.h defines this now.
12671 Variadic C functions now count arguments with ptrdiff_t.
12672 This partly undoes my 2011-03-30 change, which replaced int with size_t.
12673 Back then I didn't know that the Emacs coding style prefers signed int.
12674 Also, in the meantime I found a few more instances where arguments
12675 were being counted with int, which may truncate counts on 64-bit
12676 machines, or EMACS_INT, which may be unnecessarily wide.
12677 * lisp.h (struct Lisp_Subr.function.aMANY)
12678 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call):
12679 Arg counts are now ptrdiff_t, not size_t.
12680 All variadic functions and their callers changed accordingly.
12681 (struct gcpro.nvars): Now size_t, not size_t. All uses changed.
12682 * bytecode.c (exec_byte_code): Check maxdepth for overflow,
12683 to avoid potential buffer overrun. Don't assume arg counts fit in 'int'.
12684 * callint.c (Fcall_interactively): Check arg count for overflow,
12685 to avoid potential buffer overrun. Use signed char, not 'int',
12686 for 'varies' array, so that we needn't bother to check its size
12687 calculation for overflow.
12688 * editfns.c (Fformat): Use ptrdiff_t, not EMACS_INT, to count args.
12689 * eval.c (apply_lambda):
12690 * fns.c (Fmapconcat): Use XFASTINT, not XINT, to get args length.
12691 (struct textprop_rec.argnum): Now ptrdiff_t, not int. All uses changed.
12692 (mapconcat): Use ptrdiff_t, not int and EMACS_INT, to count args.
12694 * callint.c (Fcall_interactively): Don't use index var as event count.
12696 * vm-limit.c (check_memory_limits): Fix incorrect extern function decls.
12697 * mem-limits.h (SIZE): Remove; no longer used.
12699 * xterm.c (x_alloc_nearest_color_1): Prefer int to long when int works.
12701 Remove unnecessary casts.
12702 * xterm.c (x_term_init):
12703 * xfns.c (x_set_border_pixel):
12704 * widget.c (create_frame_gcs): Remove casts to unsigned long etc.
12705 These aren't needed now that we assume ANSI C.
12707 * sound.c (Fplay_sound_internal): Remove cast to unsigned long.
12708 It's more likely to cause problems (due to unsigned overflow)
12711 * dired.c (Ffile_attributes): Don't use 32-bit hack on 64-bit hosts.
12713 * unexelf.c (unexec): Don't assume BSS addr fits in unsigned.
12715 * xterm.c (handle_one_xevent): Omit unnecessary casts to unsigned.
12717 * keyboard.c (modify_event_symbol): Don't limit alist len to UINT_MAX.
12719 * lisp.h (CHAR_TABLE_SET): Omit now-redundant test.
12721 * lread.c (Fload): Don't compare a possibly-garbage time_t value.
12723 GLYPH_CODE_FACE returns EMACS_INT, not int.
12724 * dispextern.h (merge_faces):
12725 * xfaces.c (merge_faces):
12726 * xdisp.c (get_next_display_element, next_element_from_display_vector):
12727 Don't assume EMACS_INT fits in int.
12729 * character.h (CHAR_VALID_P): Remove unused parameter.
12730 * fontset.c, lisp.h, xdisp.c: All uses changed.
12732 * editfns.c (Ftranslate_region_internal): Omit redundant test.
12734 * fns.c (concat): Minor tuning based on overflow analysis.
12735 This doesn't fix any bugs. Use int to hold character, instead
12736 of constantly refetching from Emacs object. Use XFASTINT, not
12737 XINT, for value known to be a character. Don't bother comparing
12738 a single byte to 0400, as it's always less.
12740 * floatfns.c (Fexpt):
12741 * fileio.c (make_temp_name): Omit unnecessary cast to unsigned.
12743 * editfns.c (Ftranslate_region_internal): Use int, not EMACS_INT
12746 * doc.c (get_doc_string): Omit (unsigned)c that mishandled negatives.
12748 * data.c (Faset): If ARRAY is a string, check that NEWELT is a char.
12749 Without this fix, on a 64-bit host (aset S 0 4294967386) would
12750 incorrectly succeed when S was a string, because 4294967386 was
12751 truncated before it was used.
12753 * chartab.c (Fchar_table_range): Use CHARACTERP to check range.
12754 Otherwise, an out-of-range integer could cause undefined behavior
12757 * composite.c: Use int, not EMACS_INT, for characters.
12758 (fill_gstring_body, composition_compute_stop_pos): Use int, not
12759 EMACS_INT, for values that are known to be in character range.
12760 This doesn't fix any bugs but is the usual style inside Emacs and
12761 may generate better code on 32-bit machines.
12763 Make sure a 64-bit char is never passed to ENCODE_CHAR.
12764 This is for reasons similar to the recent CHAR_STRING fix.
12765 * charset.c (Fencode_char): Check that character arg is actually
12766 a character. Pass an int to ENCODE_CHAR.
12767 * charset.h (ENCODE_CHAR): Verify that the character argument is no
12768 wider than 'int', as a compile-time check to prevent future regressions
12771 * character.c (char_string): Remove unnecessary casts.
12773 Make sure a 64-bit char is never passed to CHAR_STRING.
12774 Otherwise, CHAR_STRING would do the wrong thing on a 64-bit platform,
12775 by silently ignoring the top 32 bits, allowing some values
12776 that were far too large to be valid characters.
12777 * character.h: Include <verify.h>.
12778 (CHAR_STRING, CHAR_STRING_ADVANCE): Verify that the character
12779 arguments are no wider than unsigned, as a compile-time check
12780 to prevent future regressions in this area.
12782 * editfns.c (Fchar_to_string, general_insert_function, Finsert_char)
12783 (Fsubst_char_in_region):
12785 * xdisp.c (decode_mode_spec_coding):
12786 Adjust to CHAR_STRING's new requirement.
12787 * editfns.c (Finsert_char, Fsubst_char_in_region):
12788 * fns.c (concat): Check that character args are actually
12789 characters. Without this test, these functions did the wrong
12790 thing with wildly out-of-range values on 64-bit hosts.
12792 Remove incorrect casts to 'unsigned' that lose info on 64-bit hosts.
12793 These casts should not be needed on 32-bit hosts, either.
12794 * keyboard.c (read_char):
12795 * lread.c (Fload): Remove casts to unsigned.
12797 * lisp.h (UNSIGNED_CMP): New macro.
12798 This fixes comparison bugs on 64-bit hosts.
12799 (ASCII_CHAR_P): Use it.
12800 * casefiddle.c (casify_object):
12801 * character.h (ASCII_BYTE_P, CHAR_VALID_P)
12802 (SINGLE_BYTE_CHAR_P, CHAR_STRING):
12803 * composite.h (COMPOSITION_ENCODE_RULE_VALID):
12804 * dispextern.h (FACE_FROM_ID):
12805 * keyboard.c (read_char): Use UNSIGNED_CMP.
12807 * xmenu.c (dialog_selection_callback) [!USE_GTK]: Cast to intptr_t,
12808 not to EMACS_INT, to avoid GCC warning.
12810 * xfns.c (x_set_scroll_bar_default_width): Remove unused 'int' locals.
12812 * buffer.h (PTR_BYTE_POS, BUF_PTR_BYTE_POS): Remove harmful cast.
12813 The cast incorrectly truncated 64-bit byte offsets to 32 bits, and
12814 isn't needed on 32-bit machines.
12816 * buffer.c (Fgenerate_new_buffer_name):
12817 Use EMACS_INT for count, not int.
12818 (advance_to_char_boundary): Return EMACS_INT, not int.
12820 * data.c (Qcompiled_function): Now static.
12822 * window.c (window_body_lines): Now static.
12824 * image.c (gif_load): Rename local to avoid shadowing.
12826 * lisp.h (SAFE_ALLOCA_LISP): Check for integer overflow.
12827 (struct Lisp_Save_Value): Use ptrdiff_t, not int, for 'integer' member.
12828 * alloc.c (make_save_value): Integer argument is now of type
12829 ptrdiff_t, not int.
12830 (mark_object): Use ptrdiff_t, not int.
12831 * lisp.h (pD): New macro.
12832 * print.c (print_object): Use it.
12834 * alloc.c: Use EMACS_INT, not int, to count objects.
12835 (total_conses, total_markers, total_symbols, total_vector_size)
12836 (total_free_conses, total_free_markers, total_free_symbols)
12837 (total_free_floats, total_floats, total_free_intervals)
12838 (total_intervals, total_strings, total_free_strings):
12839 Now EMACS_INT, not int. All uses changed.
12840 (Fgarbage_collect): Compute overall total using a double, so that
12841 integer overflow is less likely to be a problem. Check for overflow
12842 when converting back to an integer.
12843 (n_interval_blocks, n_string_blocks, n_float_blocks, n_cons_blocks)
12844 (n_vectors, n_symbol_blocks, n_marker_blocks): Remove.
12845 These were 'int' variables that could overflow on 64-bit hosts;
12846 they were never used, so remove them instead of repairing them.
12847 (nzombies, ngcs, max_live, max_zombies): Now EMACS_INT, not 'int'.
12848 (inhibit_garbage_collection): Set gc_cons_threshold to max value.
12849 Previously, this ceilinged at INT_MAX, but that doesn't work on
12851 (allocate_pseudovector): Don't use EMACS_INT when int would do.
12853 * alloc.c (Fmake_bool_vector): Don't assume vector size fits in int.
12854 (allocate_vectorlike): Check for ptrdiff_t overflow.
12855 (mark_vectorlike, mark_char_table, mark_object): Avoid EMACS_UINT
12856 when a (possibly-narrower) signed value would do just as well.
12857 We prefer using signed arithmetic, to avoid comparison confusion.
12859 * alloc.c: Catch some string size overflows that we were missing.
12860 (XMALLOC_OVERRUN_CHECK_SIZE) [!XMALLOC_OVERRUN_CHECK]: Define to 0,
12861 for convenience in STRING_BYTES_MAX.
12862 (STRING_BYTES_MAX): New macro, superseding the old one in lisp.h.
12863 The definition here is exact; the one in lisp.h was approximate.
12864 (allocate_string_data): Check for string overflow. This catches
12865 some instances we weren't catching before. Also, it catches
12866 size_t overflow on (unusual) hosts where SIZE_MAX <= min
12867 (PTRDIFF_MAX, MOST_POSITIVE_FIXNUM), e.g., when size_t is 32 bits
12868 and ptrdiff_t and EMACS_INT are both 64 bits.
12870 * character.c, coding.c, doprnt.c, editfns.c, eval.c:
12871 All uses of STRING_BYTES_MAX replaced by STRING_BYTES_BOUND.
12872 * lisp.h (STRING_BYTES_BOUND): Rename from STRING_BYTES_MAX.
12874 * character.c (string_escape_byte8): Fix nbytes/nchars typo.
12876 * alloc.c (Fmake_string): Check for out-of-range init.
12878 2011-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
12880 * eval.c (Fdefvaralias): Also mark the target as variable-special-p.
12882 2011-06-14 Jan Djärv <jan.h.d@swipnet.se>
12884 * xfns.c (x_set_scroll_bar_default_width): Remove argument to
12885 xg_get_default_scrollbar_width.
12887 * gtkutil.c: Include emacsgtkfixed.h if HAVE_GTK3.
12888 (int_gtk_range_get_value): Move to the scroll bar part of the file.
12889 (style_changed_cb): Call update_theme_scrollbar_width and call
12890 x_set_scroll_bar_default_width and xg_frame_set_char_size for
12891 all frames (Bug#8505).
12892 (xg_create_frame_widgets): Call emacs_fixed_new if HAVE_GTK3 (Bug#8505).
12893 Call gtk_window_set_resizable if HAVE_GTK3.
12894 (x_wm_set_size_hint): Call emacs_fixed_set_min_size with min width
12895 and height if HAVE_GTK3 (Bug#8505).
12896 (scroll_bar_width_for_theme): New variable.
12897 (update_theme_scrollbar_width): New function.
12898 (xg_get_default_scrollbar_width): Move code to
12899 update_theme_scrollbar_width, just return scroll_bar_width_for_theme.
12900 (xg_initialize): Call update_theme_scrollbar_width.
12902 * gtkutil.h (xg_get_default_scrollbar_width): Remove argument.
12904 * emacsgtkfixed.c, emacsgtkfixed.h: New files.
12906 2011-06-12 Martin Rudalics <rudalics@gmx.at>
12908 * frame.c (make_frame): Call other_buffer_safely instead of
12911 * window.c (temp_output_buffer_show): Call display_buffer with
12912 second argument Vtemp_buffer_show_specifiers and reset latter
12913 immediately after the call.
12914 (Vtemp_buffer_show_specifiers): New variable.
12915 (auto_window_vscroll_p, next_screen_context_lines)
12916 (Vscroll_preserve_screen_position): Remove leading asterisks from
12919 2011-06-12 Paul Eggert <eggert@cs.ucla.edu>
12921 Fix minor problems found by GCC 4.6.0 static checking.
12922 * buffer.c (Qclone_number): Remove for now, as it's unused.
12923 (record_buffer, Funrecord_buffer): Rename local to avoid shadowing.
12924 (record_buffer): Remove unused local.
12925 * frame.c (other_visible_frames, frame_buffer_list): Now static.
12926 (set_frame_buffer_list): Remove; unused.
12927 * frame.h (other_visible_frames): Remove decl.
12928 * keyboard.h (menu_items_inuse): Declare only if USE_GTK || USE_MOTIF.
12929 * lisp.h (frame_buffer_list, set_frame_buffer_list): Remove decls.
12930 (add_gpm_wait_descriptor, delete_gpm_wait_descriptor): Declare only
12932 * menu.c (menu_items_inuse): Now static unless USE_GTK || USE_MOTIF.
12933 * process.c (add_gpm_wait_descriptor, delete_gpm_wait_descriptor):
12934 Define only if HAVE_GPM.
12935 * widget.c (EmacsFrameResize, emacsFrameClassRec): Now static.
12936 (update_hints_inhibit): Remove; never set. All uses removed.
12937 * widgetprv.h (emacsFrameClassRec): Remove decl.
12938 * window.c (delete_deletable_window): Now returns void, since it
12939 wasn't returning anything.
12940 (compare_window_configurations): Remove unused locals.
12941 * xfns.c (x_set_scroll_bar_default_width): Remove unused locals.
12942 * xmenu.c (x_menu_set_in_use): Define only if USE_GTK || USE_MOTIF.
12943 (dialog_selection_callback) [!USE_GTK]: Prefer intptr_t for integers
12944 the same widths as pointers. This follows up on the 2011-05-06 patch.
12945 * xterm.c (x_alloc_lighter_color_for_widget): Define only if USE_LUCID.
12946 * xterm.h: Likewise.
12947 (x_menu_set_in_use): Declare only if USE_GTK || USE_MOTIF.
12949 2011-06-12 Juanma Barranquero <lekktu@gmail.com>
12951 * makefile.w32-in: Update dependencies.
12952 (LISP_H): Add lib/intprops.h.
12954 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
12956 * image.c (gif_load): Add animation frame delay to the metadata.
12957 (syms_of_image): Use DEFSYM. New symbol `delay'.
12959 2011-06-11 Martin Rudalics <rudalics@gmx.at>
12961 * window.c (delete_deletable_window): Re-add.
12962 (Fset_window_configuration): Rewrite to handle dead buffers and
12963 consequently deletable windows.
12964 (window_tree, Fwindow_tree): Remove. Supply functionality in
12966 (compare_window_configurations): Simplify code.
12968 2011-06-11 Andreas Schwab <schwab@linux-m68k.org>
12970 * image.c (imagemagick_load_image): Fix type mismatch.
12971 (Fimagemagick_types): Likewise.
12973 * window.h (replace_buffer_in_windows): Declare.
12975 2011-06-11 Martin Rudalics <rudalics@gmx.at>
12977 * buffer.c: New Lisp objects Qbuffer_list_update_hook and
12978 Qclone_number. Remove external declaration of Qdelete_window.
12979 (Fbuffer_list): Rewrite doc-string. Minor restructuring of
12981 (Fget_buffer_create, Fmake_indirect_buffer, Frename_buffer):
12982 Run Qbuffer_list_update_hook if allowed.
12983 (Fother_buffer): Rewrite doc-string. Major rewrite for new
12984 buffer list implementation.
12985 (other_buffer_safely): New function.
12986 (Fkill_buffer): Replace call to replace_buffer_in_all_windows by
12987 calls to replace_buffer_in_windows and
12988 replace_buffer_in_windows_safely. Run Qbuffer_list_update_hook
12990 (record_buffer): Inhibit quitting and rewrite using quittable
12991 functions. Run Qbuffer_list_update_hook if allowed.
12992 (Frecord_buffer, Funrecord_buffer): New functions.
12993 (switch_to_buffer_1, Fswitch_to_buffer): Remove.
12994 Move switch-to-buffer to window.el.
12995 (bury-buffer): Move to window.el.
12996 (Vbuffer_list_update_hook): New variable.
12998 * lisp.h (other_buffer_safely): Add prototype in buffer.c
13001 * window.h (resize_frame_windows): Move up in code.
13002 (Fwindow_frame): Remove EXFUN.
13003 (replace_buffer_in_all_windows): Remove prototype.
13004 (replace_buffer_in_windows_safely): Add prototype.
13006 * window.c: Declare Qdelete_window static again. Move down
13007 declaration of select_count.
13008 (Fnext_window, Fprevious_window): Rewrite doc-strings.
13009 (Fother_window): Move to window.el.
13010 (window_loop): Remove DELETE_BUFFER_WINDOWS and UNSHOW_BUFFER
13011 cases. Add REPLACE_BUFFER_IN_WINDOWS_SAFELY case.
13012 (Fdelete_windows_on, Freplace_buffer_in_windows): Move to
13014 (replace_buffer_in_windows): Implement by calling
13015 Qreplace_buffer_in_windows.
13016 (replace_buffer_in_all_windows): Remove with some functionality
13017 moved into replace_buffer_in_windows_safely.
13018 (replace_buffer_in_windows_safely): New function.
13019 (select_window_norecord, select_frame_norecord): Move in front
13020 of run_window_configuration_change_hook. Remove now obsolete
13022 (Fset_window_buffer): Rewrite doc-string.
13023 Call Qrecord_window_buffer.
13024 (keys_of_window): Move binding for other-window to window.el.
13026 2011-06-11 Chong Yidong <cyd@stupidchicken.com>
13028 * dispextern.h (struct image): Replace data member, whose int_val
13029 and ptr_val fields were not used by anything, with a single
13032 * image.c (Fimage_metadata, make_image, mark_image, tiff_load)
13033 (gif_clear_image, gif_load, imagemagick_load_image)
13034 (gs_clear_image, gs_load): Callers changed.
13036 2011-06-10 Paul Eggert <eggert@cs.ucla.edu>
13038 * buffer.h: Include <time.h>, for time_t.
13039 Needed to build on FreeBSD 8.2. Problem reported by Herbert J. Skuhra.
13041 Fix minor problems found by static checking.
13043 * image.c (PixelGetMagickColor): Declare if ImageMagick headers don't.
13045 Make identifiers static if they are not used in other modules.
13046 * data.c (Qcompiled_function, Qframe, Qvector):
13047 * image.c (QimageMagick, Qsvg):
13048 * minibuf.c (Qmetadata):
13049 * window.c (resize_window_check, resize_root_window): Now static.
13050 * window.h (resize_window_check, resize_root_window): Remove decls.
13052 * window.c (window_deletion_count, delete_deletable_window):
13054 (window_body_lines): Now static.
13055 (Fdelete_other_windows_internal): Mark vars as initialized.
13056 Make sure 'resize_failed' is initialized.
13057 (run_window_configuration_change_hook): Rename local to avoid shadowing.
13058 (resize_window_apply): Remove unused local.
13059 * window.h (delete_deletable_window): Remove decl.
13061 * image.c (gif_load, svg_load_image): Rename locals to avoid shadowing.
13062 (imagemagick_load_image): Fix pointer signedness problem by changing
13063 last arg from unsigned char * to char *. All uses changed.
13064 Also, fix a local for similar reasons.
13065 Remove unused locals. Remove locals to avoid shadowing.
13066 (fn_rsvg_handle_free): Remove; unused.
13067 (svg_load, svg_load_image): Fix pointer signedness problem.
13068 (imagemagick_load_image): Don't use garbage pointer image_wand.
13070 * ftfont.c (ftfont_get_metrics, ftfont_drive_otf): Remove unused locals.
13072 2011-06-10 Chong Yidong <cyd@stupidchicken.com>
13074 * image.c (gif_load): Fix omitted cast error introduced by
13077 2011-06-10 Martin Rudalics <rudalics@gmx.at>
13079 * window.h (resize_proportionally, orig_total_lines)
13080 (orig_top_line): Remove from window structure.
13081 (set_window_height, set_window_width, change_window_heights)
13082 (Fdelete_window): Remove prototypes.
13083 (resize_frame_windows): Remove duplicate declaration.
13085 2011-06-10 Eli Zaretskii <eliz@gnu.org>
13087 * window.h (resize_frame_windows, resize_window_check)
13088 (delete_deletable_window, resize_root_window)
13089 (resize_frame_windows): Declare prototypes.
13091 * window.c (resize_window_apply): Make definition be "static" to
13092 match the prototype.
13094 2011-06-10 Martin Rudalics <rudalics@gmx.at>
13096 * window.c: Remove declarations of Qwindow_size_fixed,
13097 window_min_size_1, window_min_size_2, window_min_size,
13098 size_window, window_fixed_size_p, enlarge_window, delete_window.
13099 Remove static from declaration of Qdelete_window, it's
13100 temporarily needed by Fbury_buffer.
13101 (replace_window): Don't assign orig_top_line and
13103 (Fdelete_window, delete_window): Remove. Window deletion is
13104 handled by window.el.
13105 (window_loop): Remove DELETE_OTHER_WINDOWS case.
13106 Replace Fdelete_window calls with calls to Qdelete_window.
13107 (Fdelete_other_windows): Remove. Deleting other windows is
13108 handled by window.el.
13109 (window_fixed_size_p): Remove. Fixed-sizeness of windows is
13110 handled in window.el.
13111 (window_min_size_2, window_min_size_1, window_min_size): Remove.
13112 Window minimum sizes are handled in window.el.
13113 (shrink_windows, size_window, set_window_height)
13114 (set_window_width, change_window_heights, window_height)
13115 (window_width, CURBEG, CURSIZE, enlarge_window)
13116 (adjust_window_trailing_edge, Fadjust_window_trailing_edge)
13117 (Fenlarge_window, Fshrink_window): Remove. Window resizing is
13118 handled in window.el.
13119 (make_dummy_parent): Rename to make_parent_window and give it a
13120 second argument horflag.
13121 (make_window): Don't set resize_proportionally any more.
13122 (Fsplit_window): Remove. Windows are split in window.el.
13123 (save_restore_action, save_restore_orig_size)
13124 (shrink_window_lowest_first, save_restore_orig_size): Remove.
13125 Resize mini windows in window.el.
13126 (grow_mini_window, shrink_mini_window): Implement by calling
13127 Qresize_root_window_vertically, resize_window_check and
13128 resize_window_apply.
13129 (saved_window, Fset_window_configuration, save_window_save):
13130 Do not handle orig_top_line, orig_total_lines, and
13131 resize_proportionally.
13132 (window_min_height, window_min_width): Move to window.el.
13133 (keys_of_window): Move bindings for delete-other-windows,
13134 split-window, delete-window and enlarge-window to window.el.
13136 * buffer.c: Temporarily extern Qdelete_window.
13137 (Fbury_buffer): Temporarily call Qdelete_window instead of
13138 Fdelete_window (Fbury_buffer will move to window.el soon).
13140 * frame.c (set_menu_bar_lines_1): Remove code handling
13141 orig_top_line and orig_total_lines.
13143 * dispnew.c (adjust_frame_glyphs_initially): Don't use
13144 set_window_height but set heights directly.
13145 (change_frame_size_1): Use resize_frame_windows.
13147 * xdisp.c (init_xdisp): Don't use set_window_height but set
13150 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
13151 Use resize_frame_windows instead of change_window_heights and run
13152 run_window_configuration_change_hook.
13154 * w32fns.c (x_set_tool_bar_lines): Use resize_frame_windows
13155 instead of change_window_heights and run
13156 run_window_configuration_change_hook.
13158 2011-06-09 Martin Rudalics <rudalics@gmx.at>
13160 * window.c (replace_window): Rename second argument REPLACEMENT to
13161 NEW. New third argument SETFLAG. Rewrite.
13162 (delete_window, make_dummy_parent): Call replace_window with
13164 (window_list_1): Move down in code.
13165 (run_window_configuration_change_hook): Move set_buffer part
13166 before select_frame_norecord part in order to unwind correctly.
13167 Rename count1 to count.
13168 (recombine_windows, delete_deletable_window, resize_root_window)
13169 (Fdelete_other_windows_internal)
13170 (Frun_window_configuration_change_hook, make_parent_window)
13171 (resize_window_check, resize_window_apply, Fresize_window_apply)
13172 (resize_frame_windows, Fsplit_window_internal)
13173 (Fdelete_window_internal, Fresize_mini_window_internal):
13175 (syms_of_window): New variables Vwindow_splits and Vwindow_nest.
13177 2011-06-08 Martin Rudalics <rudalics@gmx.at>
13179 * window.h (window): Add some new members to window structure -
13180 normal_lines, normal_cols, new_total, new_normal, clone_number,
13181 splits, nest, prev_buffers, next_buffers.
13182 (WINDOW_TOTAL_SIZE): Move here from window.c.
13183 (MIN_SAFE_WINDOW_WIDTH, MIN_SAFE_WINDOW_HEIGHT): Define here.
13185 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
13187 (make_dummy_parent): Set new members of windows structure.
13188 (make_window): Move down in code. Handle new members of window
13190 (Fwindow_clone_number, Fwindow_splits, Fset_window_splits)
13191 (Fwindow_nest, Fset_window_nest, Fwindow_new_total)
13192 (Fwindow_normal_size, Fwindow_new_normal, Fwindow_prev_buffers)
13193 (Fset_window_prev_buffers, Fwindow_next_buffers)
13194 (Fset_window_next_buffers, Fset_window_clone_number):
13196 (Fwindow_hscroll, Fwindow_at, Fwindow_point, Fwindow_start)
13197 (Fwindow_end, Fwindow_line_height, Fset_window_dedicated_p):
13199 (Fwindow_parameters, Fwindow_parameter, Fset_window_parameter):
13200 Argument WINDOW can be now internal window too.
13201 (Fwindow_use_time): Move up in code.
13202 (Fget_buffer_window): Rename argument FRAME to ALL-FRAMES.
13203 Rewrite doc-string.
13204 (Fset_window_configuration, saved_window)
13205 (Fcurrent_window_configuration, save_window_save): Handle new
13206 members of window structure.
13207 (WINDOW_TOTAL_SIZE, MIN_SAFE_WINDOW_WIDTH)
13208 (MIN_SAFE_WINDOW_HEIGHT): Move to window.h.
13209 (syms_of_window): New Lisp objects Qrecord_window_buffer,
13210 Qwindow_deletable_p, Qdelete_window, Qreplace_buffer_in_windows,
13211 Qget_mru_window, Qresize_root_window,
13212 Qresize_root_window_vertically, Qsafe, Qabove, Qbelow,
13213 Qauto_buffer_name; staticpro them.
13215 2011-06-07 Martin Rudalics <rudalics@gmx.at>
13217 * window.c (Fwindow_total_size, Fwindow_left_column)
13218 (Fwindow_top_line, window_body_lines, Fwindow_body_size)
13219 (Fwindow_list_1): New functions.
13220 (window_box_text_cols): Replace with window_body_cols.
13221 (Fwindow_width, Fscroll_left, Fscroll_right):
13222 Use window_body_cols instead of window_box_text_cols.
13223 (delete_window, Fset_window_configuration):
13224 Call delete_all_subwindows with window as argument.
13225 (delete_all_subwindows): Take a window as argument and not a
13226 structure. Rewrite.
13227 (window_loop): Remove handling of GET_LRU_WINDOW and
13228 GET_LARGEST_WINDOW.
13229 (Fget_lru_window, Fget_largest_window): Move to window.el.
13231 * window.h: Extern window_body_cols instead of
13232 window_box_text_cols. delete_all_subwindows now takes a
13233 Lisp_Object as argument.
13235 * indent.c (compute_motion, Fcompute_motion):
13236 Use window_body_cols instead of window_box_text_cols.
13238 * frame.c (delete_frame): Call delete_all_subwindows with root
13239 window as argument.
13241 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
13243 * fns.c (Fputhash): Document return value.
13245 2011-06-06 Chong Yidong <cyd@stupidchicken.com>
13247 * image.c (gif_load): Implement gif89a spec "no disposal" method.
13249 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
13251 Cons<->int and similar integer overflow fixes (Bug#8794).
13253 Check for overflow when converting integer to cons and back.
13254 * charset.c (Fdefine_charset_internal, Fdecode_char):
13255 Use cons_to_unsigned to catch overflow.
13256 (Fencode_char): Use INTEGER_TO_CONS.
13257 * composite.h (LGLYPH_CODE): Use cons_to_unsigned.
13258 (LGLYPH_SET_CODE): Use INTEGER_TO_CONS.
13259 * data.c (long_to_cons, cons_to_long): Remove.
13260 (cons_to_unsigned, cons_to_signed): New functions.
13261 These signal an error for invalid or out-of-range values.
13262 * dired.c (Ffile_attributes): Use INTEGER_TO_CONS.
13263 * fileio.c (Fset_visited_file_modtime): Use CONS_TO_INTEGER.
13264 * font.c (Ffont_variation_glyphs):
13265 * fontset.c (Finternal_char_font): Use INTEGER_TO_CONS.
13266 * lisp.h: Include <intprops.h>.
13267 (INTEGER_TO_CONS, CONS_TO_INTEGER): New macros.
13268 (cons_to_signed, cons_to_unsigned): New decls.
13269 (long_to_cons, cons_to_long): Remove decls.
13270 * undo.c (record_first_change): Use INTEGER_TO_CONS.
13271 (Fprimitive_undo): Use CONS_TO_INTEGER.
13272 * xfns.c (Fx_window_property): Likewise.
13273 * xselect.c: Include <limits.h>.
13274 (x_own_selection, selection_data_to_lisp_data):
13275 Use INTEGER_TO_CONS.
13276 (x_handle_selection_request, x_handle_selection_clear)
13277 (x_get_foreign_selection, Fx_disown_selection_internal)
13278 (Fx_get_atom_name, x_send_client_event): Use CONS_TO_INTEGER.
13279 (lisp_data_to_selection_data): Use cons_to_unsigned.
13280 (x_fill_property_data): Use cons_to_signed.
13281 Report values out of range.
13283 Check for buffer and string overflow more precisely.
13284 * buffer.h (BUF_BYTES_MAX): New macro.
13285 * lisp.h (STRING_BYTES_MAX): New macro.
13286 * alloc.c (Fmake_string):
13287 * character.c (string_escape_byte8):
13288 * coding.c (coding_alloc_by_realloc):
13289 * doprnt.c (doprnt):
13290 * editfns.c (Fformat):
13292 Use STRING_BYTES_MAX, not MOST_POSITIVE_FIXNUM,
13293 since they may not be the same number.
13294 * editfns.c (Finsert_char):
13295 * fileio.c (Finsert_file_contents):
13296 Likewise for BUF_BYTES_MAX.
13298 * image.c: Use ptrdiff_t, not int, for sizes.
13299 (slurp_file): Switch from int to ptrdiff_t.
13301 (slurp_file): Check that file size fits in both size_t (for
13302 malloc) and ptrdiff_t (for sanity and safety).
13304 * fileio.c (Fverify_visited_file_modtime): Avoid time overflow
13305 if b->modtime has its maximal value.
13307 * dired.c (Ffile_attributes): Don't assume EMACS_INT has >32 bits.
13309 Don't assume time_t can fit into int.
13310 * buffer.h (struct buffer.modtime): Now time_t, not int.
13311 * fileio.c (Fvisited_file_modtime): No need for time_t cast now.
13312 * undo.c (Fprimitive_undo): Use time_t, not int, for time_t value.
13314 Minor fixes for signed vs unsigned integers.
13315 * character.h (MAYBE_UNIFY_CHAR):
13316 * charset.c (maybe_unify_char):
13317 * keyboard.c (read_char, reorder_modifiers):
13318 XINT -> XFASTINT, since the integer must be nonnegative.
13319 * ftfont.c (ftfont_spec_pattern):
13320 * keymap.c (access_keymap, silly_event_symbol_error):
13321 XUINT -> XFASTINT, since the integer must be nonnegative.
13322 (Fsingle_key_description, preferred_sequence_p): XUINT -> XINT,
13323 since it makes no difference and we prefer signed.
13324 * keyboard.c (record_char): Use XUINT when all the neighbors do.
13325 (access_keymap): NATNUMP -> INTEGERP, since the integer must be
13328 2011-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
13330 * window.h (Fwindow_frame): Declare.
13332 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
13334 * alloc.c: Simplify handling of large-request failures (Bug#8800).
13335 (SPARE_MEMORY): Always define.
13336 (LARGE_REQUEST): Remove.
13337 (memory_full): Use SPARE_MEMORY rather than LARGE_REQUEST.
13339 2011-06-06 Martin Rudalics <rudalics@gmx.at>
13341 * lisp.h: Move EXFUNS for Fframe_root_window,
13342 Fframe_first_window and Fset_frame_selected_window to window.h.
13344 * window.h: Move EXFUNS for Fframe_root_window,
13345 Fframe_first_window and Fset_frame_selected_window here from
13348 * frame.c (Fwindow_frame, Fframe_first_window)
13349 (Fframe_root_window, Fframe_selected_window)
13350 (Fset_frame_selected_window): Move to window.c.
13351 (Factive_minibuffer_window): Move to minibuf.c.
13352 (Fother_visible_frames_p): New function.
13354 * minibuf.c (Factive_minibuffer_window): Move here from frame.c.
13356 * window.c (decode_window, decode_any_window): Move up in code.
13357 (Fwindowp, Fwindow_live_p): Rewrite doc-strings.
13358 (inhibit_frame_unsplittable): Remove unused variable.
13359 (Fwindow_buffer): Move up and rewrite doc-string.
13360 (Fwindow_parent, Fwindow_vchild, Fwindow_hchild, Fwindow_next)
13361 (Fwindow_prev): New functions.
13362 (Fwindow_frame): Move here from frame.c. Accept any window as
13364 (Fframe_root_window, Fframe_first_window)
13365 (Fframe_selected_window): Move here from frame.c. Accept frame
13366 or arbitrary window as argument. Update doc-strings.
13367 (Fminibuffer_window): Move up in code.
13368 (Fwindow_minibuffer_p): Move up in code and simplify.
13369 (Fset_frame_selected_window): Move here from frame.c.
13371 (Fselected_window, select_window, Fselect_window): Move up in
13372 code. Minor doc-string fixes.
13374 2011-06-06 Paul Eggert <eggert@cs.ucla.edu>
13376 * alloc.c (memory_full) [SYSTEM_MALLOC]: Port to MacOS (Bug#8800).
13377 Do not assume that spare memory exists; that assumption is valid
13378 only if SYSTEM_MALLOC.
13379 (LARGE_REQUEST): New macro, so that the issue of large requests
13380 is separated from the issue of spare memory.
13382 2011-06-05 Andreas Schwab <schwab@linux-m68k.org>
13384 * editfns.c (Fformat): Correctly handle zero flag with hexadecimal
13387 * gtkutil.c (xg_get_default_scrollbar_width): Avoid warning.
13389 * xfns.c (x_set_scroll_bar_default_width): Move declarations
13392 2011-06-05 Jan Djärv <jan.h.d@swipnet.se>
13394 * gtkutil.c (xg_get_default_scrollbar_width): New function.
13396 * gtkutil.h: Declare xg_get_default_scrollbar_width.
13398 * xfns.c (x_set_scroll_bar_default_width): If USE_GTK, get
13399 min width by calling x_set_scroll_bar_default_width (Bug#8505).
13401 2011-06-05 Juanma Barranquero <lekktu@gmail.com>
13403 * xdisp.c (single_display_spec_intangible_p): Remove declaration.
13405 2011-06-04 Chong Yidong <cyd@stupidchicken.com>
13407 * xselect.c (x_clipboard_manager_save): Remove redundant arg.
13408 (x_clipboard_manager_save): Add return value.
13409 (x_clipboard_manager_error_1, x_clipboard_manager_error_2):
13410 New error handlers.
13411 (x_clipboard_manager_save_frame, x_clipboard_manager_save_all):
13412 Obey Vx_select_enable_clipboard_manager. Catch errors in
13413 x_clipboard_manager_save (Bug#8779).
13414 (Vx_select_enable_clipboard_manager): New variable.
13415 (x_get_foreign_selection): Reduce scope of x_catch_errors (Bug#8790).
13417 2011-06-04 Dan Nicolaescu <dann@ics.uci.edu>
13419 * emacs.c (main): Warn when starting a GTK emacs in daemon mode.
13421 2011-06-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13423 * fringe.c (update_window_fringes): Don't update overlay arrow bitmap
13424 in the current matrix if keep_current_p is non-zero.
13426 2011-06-04 Eli Zaretskii <eliz@gnu.org>
13428 * bidi.c (bidi_level_of_next_char): Fix last change.
13430 2011-06-03 Eli Zaretskii <eliz@gnu.org>
13432 Support bidi reordering of text covered by display properties.
13434 * bidi.c (bidi_copy_it): Use offsetof instead of emulating it.
13435 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
13436 (bidi_cache_search, bidi_cache_iterator_state)
13437 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
13438 (bidi_level_of_next_char, bidi_move_to_visually_next):
13439 Support character positions inside a run of characters covered by a
13441 (bidi_paragraph_init, bidi_resolve_explicit_1)
13442 (bidi_level_of_next_char): Call bidi_fetch_char and
13443 bidi_fetch_char_advance instead of FETCH_CHAR and
13444 FETCH_CHAR_ADVANCE.
13445 (bidi_init_it): Initialize new members.
13446 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
13448 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
13449 instead of using explicit *_CHAR codes.
13450 (bidi_resolve_explicit, bidi_resolve_weak):
13451 Use FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
13452 bidirectional text is supported only in multibyte buffers.
13453 (bidi_init_it): Accept additional argument FRAME_WINDOW_P and use
13454 it to initialize the frame_window_p member of struct bidi_it.
13455 (bidi_cache_iterator_state, bidi_resolve_explicit_1)
13456 (bidi_resolve_explicit, bidi_resolve_weak)
13457 (bidi_level_of_next_char, bidi_move_to_visually_next): Abort if
13458 bidi_it->nchars is non-positive.
13459 (bidi_level_of_next_char): Don't try to lookup the cache for the
13460 next/previous character if nothing is cached there yet, or if we
13461 were just reseat()'ed to a new position.
13463 * xdisp.c (set_cursor_from_row): Set start and stop points
13464 according to the row's direction when priming the loop that looks
13465 for the glyph on which to display cursor.
13466 (single_display_spec_intangible_p): Function deleted.
13467 (display_prop_intangible_p): Reimplement to call
13468 handle_display_spec instead of single_display_spec_intangible_p.
13469 Accept 3 additional arguments needed by handle_display_spec.
13470 This fixes incorrect cursor motion across display property with complex
13471 values: lists, `(when COND...)' forms, etc.
13472 (single_display_spec_string_p): Support property values that are
13473 lists with the argument STRING its top-level element.
13474 (display_prop_string_p): Fix the condition for processing a
13475 property that is a list to be consistent with handle_display_spec.
13476 (handle_display_spec): New function, refactored from the
13477 last portion of handle_display_prop.
13478 (compute_display_string_pos): Accept additional argument
13479 FRAME_WINDOW_P. Call handle_display_spec to determine whether the
13480 value of a `display' property is a "replacing spec".
13481 (handle_single_display_spec): Accept 2 additional arguments BUFPOS
13482 and FRAME_WINDOW_P. If IT is NULL, don't set up the iterator from
13483 the display property, but just return a value indicating whether
13484 the display property will replace the characters it covers.
13485 (Fcurrent_bidi_paragraph_direction): Initialize the nchars and
13486 frame_window_p members of struct bidi_it.
13487 (compute_display_string_pos, compute_display_string_end):
13489 (push_it): Accept second argument POSITION, where pop_it should
13490 jump to continue iteration.
13491 (reseat_1): Initialize bidi_it.disp_pos.
13493 * keyboard.c (adjust_point_for_property): Adjust the call to
13494 display_prop_intangible_p to its new signature.
13496 * dispextern.h (struct bidi_it): New member frame_window_p.
13497 (bidi_init_it): Update prototypes.
13498 (display_prop_intangible_p): Update prototype.
13499 (compute_display_string_pos, compute_display_string_end):
13500 Declare prototypes.
13501 (struct bidi_it): New members nchars and disp_pos. ch_len is now
13504 2011-06-02 Paul Eggert <eggert@cs.ucla.edu>
13506 Malloc failure behavior now depends on size of allocation.
13507 * alloc.c (buffer_memory_full, memory_full): New arg NBYTES.
13508 * lisp.h: Change signatures accordingly.
13509 * alloc.c, buffer.c, editfns.c, menu.c, minibuf.c, xterm.c:
13510 All callers changed. (Bug#8762)
13512 * gnutls.c: Use Emacs's memory allocators.
13513 Without this change, the gnutls library would invoke malloc etc.
13514 directly, which causes problems on non-SYNC_INPUT hosts, and which
13515 runs afoul of improving memory_full behavior. (Bug#8761)
13516 (fn_gnutls_global_set_mem_functions): New macro or function pointer.
13517 (emacs_gnutls_global_init): Use it to specify xmalloc, xrealloc,
13518 xfree instead of the default malloc, realloc, free.
13519 (Fgnutls_boot): No need to check for memory allocation failure,
13520 since xmalloc does that for us.
13522 Remove arbitrary limit of 2**31 entries in hash tables. (Bug#8771)
13523 * category.c (hash_get_category_set):
13524 * ccl.c (ccl_driver):
13525 * charset.c (Fdefine_charset_internal):
13526 * charset.h (struct charset.hash_index):
13527 * composite.c (get_composition_id, gstring_lookup_cache)
13528 (composition_gstring_put_cache):
13529 * composite.h (struct composition.hash_index):
13530 * dispextern.h (struct image.hash):
13531 * fns.c (next_almost_prime, larger_vector, cmpfn_eql)
13532 (cmpfn_equal, cmpfn_user_defined, hashfn_eq, hashfn_eql)
13533 (hashfn_equal, hashfn_user_defined, make_hash_table)
13534 (maybe_resize_hash_table, hash_lookup, hash_put)
13535 (hash_remove_from_table, hash_clear, sweep_weak_table, SXHASH_COMBINE)
13536 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector)
13537 (Fsxhash, Fgethash, Fputhash, Fmaphash):
13538 * image.c (make_image, search_image_cache, lookup_image)
13539 (xpm_put_color_table_h):
13540 * lisp.h (struct Lisp_Hash_Table):
13541 * minibuf.c (Ftry_completion, Fall_completions, Ftest_completion):
13542 * print.c (print): Use 'EMACS_UINT' and 'EMACS_INT'
13543 for hashes and hash indexes, instead of 'unsigned' and 'int'.
13544 * alloc.c (allocate_vectorlike):
13545 Check for overflow in vector size calculations.
13546 * ccl.c (ccl_driver):
13547 Check for overflow when converting EMACS_INT to int.
13548 * fns.c, image.c: Remove unnecessary static decls that would otherwise
13549 need to be updated by these changes.
13550 * fns.c (make_hash_table, maybe_resize_hash_table):
13551 Check for integer overflow with large hash tables.
13552 (make_hash_table, maybe_resize_hash_table, Fmake_hash_table):
13553 Prefer the faster XFLOAT_DATA to XFLOATINT where either will do.
13554 (SXHASH_REDUCE): New macro.
13555 (sxhash_string, sxhash_list, sxhash_vector, sxhash_bool_vector):
13556 Use it instead of discarding useful hash info with large hash values.
13557 (sxhash_float): New function.
13558 (sxhash): Use it. No more need for "& INTMASK" due to above changes.
13559 * lisp.h (FIXNUM_BITS): New macro, useful for SXHASH_REDUCE etc.
13560 (MOST_NEGATIVE_FIXNUM, MOST_POSITIVE_FIXNUM, INTMASK):
13561 Rewrite to use FIXNUM_BITS, as this simplifies things.
13562 (next_almost_prime, larger_vector, sxhash, hash_lookup, hash_put):
13563 Adjust signatures to match updated version of code.
13564 (consing_since_gc): Now EMACS_INT, since a single hash table can
13565 use more than INT_MAX bytes.
13567 2011-06-01 Dan Nicolaescu <dann@ics.uci.edu>
13569 Make it possible to build with GCC-4.6+ -O2 -flto.
13571 * emacs.c (__malloc_initialize_hook): Mark as EXTERNALLY_VISIBLE.
13573 2011-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
13575 * minibuf.c (get_minibuffer, read_minibuf_unwind):
13576 Call minibuffer-inactive-mode.
13578 2011-05-31 Juanma Barranquero <lekktu@gmail.com>
13580 * makefile.w32-in ($(BLD)/data.$(O), $(BLD)/editfns.$(O)):
13581 Update dependencies.
13583 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
13585 * data.c (init_data): Remove code for UTS, this system is not
13588 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
13590 Don't force ./temacs to start in terminal mode.
13592 * frame.c (make_initial_frame): Initialize faces in all cases, not
13593 only when CANNOT_DUMP is defined.
13594 * dispnew.c (init_display): Remove CANNOT_DUMP condition.
13596 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
13598 * dispnew.c (add_window_display_history): Use const for the string
13599 pointer. Remove declaration, not needed.
13601 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
13603 Use 'inline', not 'INLINE'.
13604 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00914.html>
13605 * alloc.c, fontset.c (INLINE): Remove.
13606 * alloc.c, bidi.c, charset.c, coding.c, dispnew.c, fns.c, image.c:
13607 * intervals.c, keyboard.c, process.c, syntax.c, textprop.c, w32term.c:
13608 * xdisp.c, xfaces.c, xterm.c: Replace all uses of INLINE with inline.
13609 * gmalloc.c (register_heapinfo): Use inline unconditionally.
13610 * lisp.h (LISP_MAKE_RVALUE): Use inline, not __inline__.
13612 2011-05-31 Dan Nicolaescu <dann@ics.uci.edu>
13614 Make it possible to run ./temacs.
13616 * callproc.c (set_initial_environment): Remove CANNOT_DUMP code,
13617 syms_of_callproc does the same thing. Remove test for
13618 "initialized", do it in the caller.
13619 * emacs.c (main): Avoid calling set_initial_environment when dumping.
13621 2011-05-31 Stefan Monnier <monnier@iro.umontreal.ca>
13623 * minibuf.c (Finternal_complete_buffer): Return `category' metadata.
13624 (read_minibuf): Use get_minibuffer.
13625 (syms_of_minibuf): Use DEFSYM.
13626 (Qmetadata): New var.
13627 * data.c (Qbuffer): Don't make it static.
13628 (syms_of_data): Use DEFSYM.
13630 2011-05-31 Paul Eggert <eggert@cs.ucla.edu>
13632 * ccl.c (CCL_CODE_RANGE): Allow negative numbers. (Bug#8751)
13633 (CCL_CODE_MIN): New macro.
13635 2011-05-30 Paul Eggert <eggert@cs.ucla.edu>
13637 * alloc.c (lisp_align_malloc): Omit unnecessary val==NULL tests.
13639 * eval.c (Qdebug): Now static.
13640 * lisp.h (Qdebug): Remove decl. This reverts a part of the
13641 2011-04-26T11:26:05Z!dan.colascione@gmail.com that inadvertently undid part of
13642 2011-04-14T06:48:41Z!eggert@cs.ucla.edu.
13644 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
13646 * image.c: Various fixes to ImageMagick code comments.
13647 (Fimagemagick_types): Doc fix.
13649 2011-05-29 Paul Eggert <eggert@cs.ucla.edu>
13651 Minor fixes prompted by GCC 4.6.0 warnings.
13653 * xselect.c (converted_selections, conversion_fail_tag): Now static.
13655 * emacs.c [HAVE_X_WINDOWS]: Include "xterm.h".
13656 (x_clipboard_manager_save_all): Move extern decl to ...
13657 * xterm.h: ... here, so that it can be checked for consistency.
13659 2011-05-29 Chong Yidong <cyd@stupidchicken.com>
13661 * xselect.c (x_clipboard_manager_save_frame)
13662 (x_clipboard_manager_save_all): New functions.
13663 (Fx_clipboard_manager_save): Lisp function deleted.
13665 * emacs.c (Fkill_emacs): Call x_clipboard_manager_save_all.
13666 * frame.c (delete_frame): Call x_clipboard_manager_save_frame.
13668 * xterm.h: Update prototype.
13670 2011-05-28 William Xu <william.xwl@gmail.com>
13672 * nsterm.m (ns_term_shutdown): Synchronize user defaults before
13673 exiting (Bug#8239).
13675 2011-05-28 Jim Meyering <meyering@redhat.com>
13677 Avoid a sign-extension bug in crypto_hash_function.
13678 * fns.c (to_uchar): Define.
13679 (crypto_hash_function): Use it to convert some newly-signed
13680 variables to unsigned, to avoid sign-extension bugs. For example,
13681 without this change, (md5 "truc") would evaluate to
13682 45723a2aff78ff4fff7fff1114760e62 rather than the expected
13683 45723a2af3788c4ff17f8d1114760e62. Reported by Antoine Levitt in
13684 https://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00883.html.
13686 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
13688 Integer overflow fixes.
13690 * dbusbind.c: Serial number integer overflow fixes.
13691 (CHECK_DBUS_SERIAL_GET_SERIAL): New macro.
13692 (Fdbus_call_method_asynchronously, xd_read_message_1): Use a float
13693 to hold a serial number that is too large for a fixnum.
13694 (Fdbus_method_return_internal, Fdbus_method_error_internal):
13695 Check for serial numbers out of range. Decode any serial number
13696 that was so large that it became a float. (Bug#8722)
13698 * dbusbind.c: Use XFASTINT rather than XUINT, and check for nonneg.
13699 (Fdbus_call_method, Fdbus_call_method_asynchronously):
13700 Use XFASTINT rather than XUINT when numbers are nonnegative.
13701 (xd_append_arg, Fdbus_method_return_internal):
13702 (Fdbus_method_error_internal): Likewise. Also, for unsigned
13703 arguments, check that Lisp number is nonnegative, rather than
13704 silently wrapping negative numbers around. (Bug#8722)
13705 (xd_read_message_1): Don't assume dbus_uint32_t can fit in int.
13708 * data.c (arith_driver, Flsh): Avoid unnecessary casts to EMACS_UINT.
13710 * ccl.c (ccl_driver): Redo slightly to avoid the need for 'unsigned'.
13712 ccl: Add integer overflow checks.
13713 * ccl.c (CCL_CODE_MAX, GET_CCL_RANGE, GET_CCL_CODE, GET_CCL_INT):
13714 (IN_INT_RANGE): New macros.
13715 (ccl_driver): Use them to check for integer overflow when
13716 decoding a CCL program. Many of the new checks are whether XINT (x)
13717 fits in int; it doesn't always, on 64-bit hosts. The new version
13718 doesn't catch all possible integer overflows, but it's an
13719 improvement. (Bug#8719)
13721 * alloc.c (make_event_array): Use XINT, not XUINT.
13722 There's no need for unsigned here.
13724 * mem-limits.h (EXCEEDS_LISP_PTR) [!USE_LSB_TAG]: EMACS_UINT -> uintptr_t
13725 This follows up to the 2011-05-06 change that substituted uintptr_t
13726 for EMACS_INT. This case wasn't caught back then.
13728 Rework Fformat to avoid integer overflow issues.
13729 * editfns.c: Include <float.h> unconditionally, as it's everywhere
13730 now (part of C89). Include <verify.h>.
13731 (MAX_10_EXP, CONVERTED_BYTE_SIZE): Remove; no longer needed.
13732 (pWIDE, pWIDElen, signed_wide, unsigned_wide): New defns.
13733 (Fformat): Avoid the prepass trying to compute sizes; it was only
13734 approximate and thus did not catch overflow reliably. Instead, walk
13735 through the format just once, formatting and computing sizes as we go,
13736 checking for integer overflow at every step, and allocating a larger
13737 buffer as needed. Keep track separately whether the format is
13738 multibyte. Keep only the most-recently calculated precision, rather
13739 than them all. Record whether each argument has been converted to
13740 string. Use EMACS_INT, not int, for byte and char and arg counts.
13741 Support field widths and precisions larger than INT_MAX. Avoid
13742 sprintf's undefined behavior with conversion specifications such as %#d
13743 and %.0c. Fix bug with strchr succeeding on '\0' when looking for
13744 flags. Fix bug with (format "%c" 256.0). Avoid integer overflow when
13745 formatting out-of-range floating point numbers with int
13746 formats. (Bug#8668)
13748 * lisp.h (FIXNUM_OVERFLOW_P): Work even if arg is a NaN.
13750 * data.c: Avoid integer truncation in expressions involving floats.
13751 * data.c: Include <intprops.h>.
13752 (arith_driver): When there's an integer overflow in an expression
13753 involving floating point, convert the integers to floating point
13754 so that the resulting value does not suffer from catastrophic
13755 integer truncation. For example, on a 64-bit host (* 4
13756 most-negative-fixnum 0.5) should yield about -4.6e+18, not zero.
13757 Do not rely on undefined behavior after integer overflow.
13759 merge count_size_as_multibyte, parse_str_to_multibyte
13760 * character.c, character.h (count_size_as_multibyte):
13761 Rename from parse_str_to_multibyte; all uses changed.
13762 Check for integer overflow.
13763 * insdel.c, lisp.h (count_size_as_multibyte): Remove,
13764 since it's now a duplicate of the other. This is more of
13765 a character than a buffer op, so better that it's in character.c.
13766 * fns.c, print.c: Adjust to above changes.
13768 2011-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
13770 * xselect.c (x_convert_selection): Yet another int/Lisp_Object mixup.
13772 2011-05-27 Paul Eggert <eggert@cs.ucla.edu>
13774 * xselect.c: Fix minor problems prompted by GCC 4.6.0 warnings.
13775 (x_handle_selection_request, frame_for_x_selection): Remove unused vars.
13776 (x_clipboard_manager_save): Now static.
13777 (Fx_clipboard_manager_save): Rename local to avoid shadowing.
13779 * fns.c: Fix minor problems prompted by GCC 4.6.0 warnings.
13780 (crypto_hash_function): Now static.
13781 Fix pointer signedness problems. Avoid unnecessary initializations.
13783 2011-05-27 Chong Yidong <cyd@stupidchicken.com>
13785 * termhooks.h (Vselection_alist): Make it terminal-local.
13787 * terminal.c (create_terminal): Initialize it.
13789 * xselect.c: Support for clipboard managers.
13790 (Vselection_alist): Move to termhooks.h as terminal-local var.
13791 (LOCAL_SELECTION): New macro.
13792 (x_atom_to_symbol): Handle x_display_info_for_display fail case.
13793 (symbol_to_x_atom): Remove gratuitous arg.
13794 (x_handle_selection_request, lisp_data_to_selection_data)
13795 (x_get_foreign_selection, Fx_register_dnd_atom): Callers changed.
13796 (x_own_selection, x_get_local_selection, x_convert_selection):
13797 New arg, specifying work frame. Use terminal-local Vselection_alist.
13798 (some_frame_on_display): Delete unused function.
13799 (Fx_own_selection_internal, Fx_get_selection_internal)
13800 (Fx_disown_selection_internal, Fx_selection_owner_p)
13801 (Fx_selection_exists_p): New optional frame arg.
13802 (frame_for_x_selection, Fx_clipboard_manager_save): New functions.
13803 (x_handle_selection_clear): Don't treat other terminals with the
13804 same keyboard specially. Use the terminal-local Vselection_alist.
13805 (x_clear_frame_selections): Use Frun_hook_with_args.
13807 * xterm.c (x_term_init): Intern ATOM and CLIPBOARD_MANAGER atoms.
13809 * xterm.h: Add support for those atoms.
13811 2011-05-26 Chong Yidong <cyd@stupidchicken.com>
13813 * xselect.c: ICCCM-compliant handling of MULTIPLE targets.
13814 (converted_selections, conversion_fail_tag): New global variables.
13815 (x_selection_request_lisp_error): Free the above.
13816 (x_get_local_selection): Remove unnecessary code.
13817 (x_reply_selection_request): Args changed; handle arbitrary array
13818 of converted selections stored in converted_selections.
13819 Separate the XChangeProperty and SelectionNotify steps.
13820 (x_handle_selection_request): Rewrite to handle MULTIPLE target.
13821 (x_convert_selection): New function.
13822 (x_handle_selection_event): Simplify.
13823 (x_get_foreign_selection): Don't ignore incoming requests while
13824 waiting for an answer; this will fail when we implement
13825 SAVE_TARGETS, and seems unnecessary anyway.
13826 (selection_data_to_lisp_data): Recognize ATOM_PAIR type.
13827 (Vx_sent_selection_functions): Doc fix.
13829 2011-05-26 Leo Liu <sdl.web@gmail.com>
13831 * editfns.c (Ftranspose_regions): Allow empty regions. (Bug#8699)
13833 2011-05-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13835 * dispextern.h (struct glyph_row): New member fringe_bitmap_periodic_p.
13837 * dispnew.c (shift_glyph_matrix, scrolling_window): Mark scrolled row
13838 for fringe update if it has periodic bitmap.
13839 (row_equal_p): Also compare left_fringe_offset, right_fringe_offset,
13840 and fringe_bitmap_periodic_p.
13842 * fringe.c (get_fringe_bitmap_data): New function.
13843 (draw_fringe_bitmap_1, update_window_fringes): Use it.
13844 (update_window_fringes): Record periodicity of fringe bitmap in glyph
13845 row. Mark glyph row for fringe update if periodicity changed.
13847 * xdisp.c (try_window_reusing_current_matrix): Don't mark scrolled row
13848 for fringe update unless it has periodic bitmap.
13850 2011-05-25 Kenichi Handa <handa@m17n.org>
13852 * xdisp.c (get_next_display_element): Set correct it->face_id for
13853 a static composition.
13855 2011-05-24 Leo Liu <sdl.web@gmail.com>
13858 * makefile.w32-in ($(BLD)/fns.$(O)): Include sha1.h.
13860 * fns.c (crypto_hash_function, Fsha1): New function.
13861 (Fmd5): Use crypto_hash_function.
13862 (syms_of_fns): Add Ssha1.
13864 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
13866 * gnutls.c: Remove unused macros.
13867 (fn_gnutls_transport_set_lowat, fn_gnutls_transport_set_pull_function):
13868 (fn_gnutls_transport_set_push_function) [!WINDOWSNT]:
13869 Remove macros that are defined and never used.
13870 Caught by gcc -Wunused-macros (GCC 4.6.0, Fedora 14).
13872 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
13874 * xselect.c (syms_of_xselect): Remove unused symbol SAVE_TARGETS.
13875 (Fx_get_selection_internal): Minor cleanup.
13876 (Fx_own_selection_internal): Rename arguments for consistency with
13879 2011-05-22 Paul Eggert <eggert@cs.ucla.edu>
13881 * xselect.c (QSAVE_TARGETS): New static var, to fix build failure.
13883 2011-05-22 Chong Yidong <cyd@stupidchicken.com>
13885 * xselect.c (syms_of_xselect): Include character.h; use DEFSYM.
13887 2011-05-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
13889 * dispnew.c (scrolling_window): Don't exclude the case that the
13890 last enabled row in the desired matrix touches the bottom boundary.
13892 2011-05-21 Glenn Morris <rgm@gnu.org>
13894 * Makefile.in ($(etc)/DOC): Make second command line even shorter.
13895 (SOME_MACHINE_OBJECTS): Replace FONT_OBJ by its maximal expansion,
13896 and add some more files.
13898 2011-05-20 Eli Zaretskii <eliz@gnu.org>
13900 * callproc.c (Fcall_process) [MSDOS]: Fix arguments to
13901 report_file_error introduced by the change from 2011-05-07.
13903 2011-05-20 Paul Eggert <eggert@cs.ucla.edu>
13905 * systime.h (Time): Define only if emacs is defined.
13906 This is to allow ../lib-src/profile.c to be compiled on FreeBSD,
13907 where the include path doesn't have X11/X.h by default. See
13908 <http://lists.gnu.org/archive/html/emacs-devel/2011-05/msg00561.html>.
13910 2011-05-20 Kenichi Handa <handa@m17n.org>
13912 * composite.c (find_automatic_composition): Fix previous change.
13914 2011-05-20 Glenn Morris <rgm@gnu.org>
13916 * lisp.mk: New file, split from Makefile.in.
13917 * Makefile.in (lisp): Move to separate file, inserted by @lisp_frag@.
13918 (shortlisp): Remove.
13919 ($(etc)/DOC): Edit lisp.mk rather than using $shortlisp.
13921 2011-05-19 Glenn Morris <rgm@gnu.org>
13923 * Makefile.in (MSDOS_SUPPORT_REAL, MSDOS_SUPPORT, NS_SUPPORT)
13924 (REAL_MOUSE_SUPPORT, GPM_MOUSE_SUPPORT, MOUSE_SUPPORT, TOOLTIP_SUPPORT)
13925 (BASE_WINDOW_SUPPORT, X_WINDOW_SUPPORT, WINDOW_SUPPORT): Remove.
13926 (lisp): Set the order to that of loadup.el.
13927 (shortlisp): Make it a copy of $lisp.
13928 (SOME_MACHINE_LISP): Remove.
13929 ($(etc)/DOC): Depend just on $lisp, not $SOME_MACHINE_LISP too.
13930 Use just $shortlisp, not $SOME_MACHINE_LISP too.
13932 2011-05-18 Kenichi Handa <handa@m17n.org>
13934 * composite.c (CHAR_COMPOSABLE_P): Add more check for efficiency.
13935 (BACKWARD_CHAR): Wrap the arg STOP by parenthesis.
13936 (find_automatic_composition): Mostly rewrite for efficiency.
13938 2011-05-18 Juanma Barranquero <lekktu@gmail.com>
13940 * makefile.w32-in: Update dependencies.
13942 2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
13944 * menu.c: Include limits.h (fixes the MS-Windows build broken by
13945 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
13947 2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
13949 Fix some integer overflow issues, such as string length overflow.
13951 * insdel.c (count_size_as_multibyte): Check for string overflow.
13953 * character.c (lisp_string_width): Check for string overflow.
13954 Use EMACS_INT, not int, for string indexes and lengths; in
13955 particular, 2nd arg is now EMACS_INT, not int. Do not crash if
13956 the resulting string length overflows an EMACS_INT; instead,
13957 report a string overflow if no precision given. When checking for
13958 precision exhaustion, use a check that cannot possibly have
13959 integer overflow. (Bug#8675)
13960 * character.h (lisp_string_width): Adjust to new signature.
13962 * alloc.c (string_overflow): New function.
13963 (Fmake_string): Use it. This doesn't change behavior, but saves
13964 a few bytes and will simplify future changes.
13965 * character.c (string_escape_byte8): Likewise.
13966 * lisp.h (string_overflow): New decl.
13968 Fixups, following up to the user-interface timestamp change.
13969 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
13970 for UI timestamps, instead of unsigned long.
13971 * msdos.c (mouse_get_pos): Likewise.
13972 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
13973 * w32gui.h (Time): Define by including "systime.h" rather than by
13974 declaring it ourselves. (Bug#8664)
13976 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
13977 * image.c (clear_image_cache): Likewise.
13979 * term.c (term_mouse_position): Don't assume time_t wraparound.
13981 Be more systematic about user-interface timestamps.
13982 Before, the code sometimes used 'Time', sometimes 'unsigned long',
13983 and sometimes 'EMACS_UINT', to represent these timestamps.
13984 This change causes it to use 'Time' uniformly, as that's what X uses.
13985 This makes the code easier to follow, and makes it easier to catch
13986 integer overflow bugs such as Bug#8664.
13987 * frame.c (Fmouse_position, Fmouse_pixel_position):
13988 Use Time, not unsigned long, for user-interface timestamps.
13989 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
13990 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
13991 * keyboard.h (last_event_timestamp): Likewise.
13992 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
13993 * menu.h (xmenu_show): Likewise.
13994 * term.c (term_mouse_position): Likewise.
13995 * termhooks.h (struct input_event.timestamp): Likewise.
13996 (struct terminal.mouse_position_hook): Likewise.
13997 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
13998 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
13999 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
14000 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
14001 what it was before.
14002 * menu.h, termhooks.h: Include "systime.h", for Time.
14004 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
14005 Don't assume that the difference between two unsigned long values
14006 can fit into an integer. At this point, we know button_down_time
14007 <= event->timestamp, so the difference must be nonnegative, so
14008 there's no need to cast the result if double-click-time is
14009 nonnegative, as it should be; check that it's nonnegative, just in
14010 case. This bug is triggered when events are more than 2**31 ms
14011 apart (about 25 days). (Bug#8664)
14013 * xselect.c (last_event_timestamp): Remove duplicate decl.
14014 (x_own_selection): Remove needless cast to unsigned long.
14016 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
14017 that always fit in int. Use a sentinel instead of a counter, to
14018 avoid a temp and to allay GCC's concerns about possible int overflow.
14019 * frame.h (struct frame): Use int for menu_bar_items_used
14020 instead of EMACS_INT, since it always fits in int.
14022 * menu.c (grow_menu_items): Check for int overflow.
14024 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
14026 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
14027 Before, the code was not consistent. These values cannot exceed
14028 2**31 - 1 so there's no need to make them unsigned.
14029 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
14030 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
14031 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
14033 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
14035 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
14036 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
14037 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
14038 presumably because the widths might not match.
14040 * window.c (size_window): Avoid needless test at loop start.
14042 2011-05-18 Courtney Bane <emacs-bugs-7626@cbane.org> (tiny change)
14044 * term.c (Fresume_tty): Restore hooks before reinitializing (bug#8687).
14046 2011-05-12 Drew Adams <drew.adams@oracle.com>
14048 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).
14050 2011-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14052 * w32term.c (w32_draw_fringe_bitmap): Rename local vars `left' and
14053 `width' to `bar_area_x' and `bar_area_width', respectively.
14054 (x_scroll_run): Take account of fringe background extension.
14056 * xterm.c (x_draw_fringe_bitmap) [USE_TOOLKIT_SCROLL_BARS]:
14057 Rename local vars `left' and `width' to `bar_area_x' and
14058 `bar_area_width', respectively.
14059 (x_scroll_run) [USE_TOOLKIT_SCROLL_BARS]: Take account of fringe
14060 background extension.
14062 2011-05-10 Jim Meyering <meyering@redhat.com>
14064 * xdisp.c (x_intersect_rectangles): Fix typo "the the -> the".
14066 2011-05-10 Juanma Barranquero <lekktu@gmail.com>
14068 * image.c (Finit_image_library): Return t for built-in image types,
14069 like pbm and xbm. (Bug#8640)
14071 2011-05-09 Andreas Schwab <schwab@linux-m68k.org>
14073 * w32menu.c (set_frame_menubar): Fix submenu allocation.
14075 2011-05-07 Eli Zaretskii <eliz@gnu.org>
14077 * w32console.c (Fset_screen_color): Doc fix.
14078 (Fget_screen_color): New function.
14079 (syms_of_ntterm): Defsubr it.
14081 * callproc.c (call_process_cleanup) [MSDOS]: Don't close and
14082 unlink the temporary file if Fcall_process didn't create it in the
14084 (Fcall_process) [MSDOS]: Don't create tempfile if stdout of the
14085 child process will be redirected to a file specified with `:file'.
14086 Don't try to re-open tempfile in that case, and set fd[0] to -1 as
14087 cue to call_process_cleanup not to close that handle.
14089 2011-05-07 Ben Key <bkey76@gmail.com>
14091 * makefile.w32-in: The bootstrap-temacs rule now makes use of
14092 one of two shell specific rules, either bootstrap-temacs-CMD or
14093 bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical
14094 to the previous implementation of the bootstrap-temacs rule.
14095 The bootstrap-temacs-CMD rule is similar to the previous
14096 implementation of the bootstrap-temacs rule except that it
14097 makes use of the ESC_CFLAGS variable instead of the CFLAGS
14100 These changes, along with some changes to nt/configure.bat,
14101 nt/gmake.defs, and nt/nmake.defs, are required to extend my
14102 earlier fix to add support for --cflags and --ldflags options
14103 that include quotes so that it works whether make uses cmd or
14106 2011-05-06 Michael Albinus <michael.albinus@gmx.de>
14108 * dbusbind.c (QCdbus_type_unix_fd): Declare static.
14109 (xd_remove_watch): Don't check QCdbus_type_unix_fd for SYMBOLP, it
14111 (Fdbus_init_bus, xd_read_queued_messages): Bus can be a symbol or
14112 a string. Handle both cases.
14113 (Fdbus_call_method_asynchronously, Fdbus_register_signal)
14114 (Fdbus_register_method): Use Qinvalid_function.
14116 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
14118 * makefile.w32-in: Update dependencies.
14119 (LISP_H): Add inttypes.h and stdin.h.
14120 (PROCESS_H): Add unistd.h.
14122 2011-05-06 Eli Zaretskii <eliz@gnu.org>
14124 * lread.c: Include limits.h (fixes the MS-Windows build broken by
14125 2011-05-06T07:13:19Z!eggert@cs.ucla.edu).
14127 2011-05-06 Paul Eggert <eggert@cs.ucla.edu>
14129 * image.c (Finit_image_library) [!HAVE_NTGUI]: Omit unused local.
14131 * term.c (vfatal): Remove stray call to va_end.
14132 It's not needed and the C Standard doesn't allow it here anyway.
14134 Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
14135 * eval.c (verror): doprnt a copy of ap, not the original. (Bug#8545)
14137 * eval.c (verror): OK to create a string of up to MOST_POSITIVE_FIXNUM
14140 * term.c: Don't include <stdarg.h>, as <lisp.h> does that.
14142 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork clobbering.
14144 * process.c (Fformat_network_address): Fix typo: args2 -> *args2.
14146 * xmenu.c (set_frame_menubar): Fix typo: int * -> int (3 times).
14148 * coding.c (detect_coding_charset): Fix typo: * 2 -> *4 (Bug#8601).
14150 * charset.h (struct charset.code_space): Now has 15 elements, not 16.
14151 * charset.c (Fdefine_charset_internal): Don't initialize
14152 charset.code_space[15]. The value was garbage, on hosts with
14153 32-bit int (Bug#8600).
14155 * lread.c (read_integer): Be more consistent with string-to-number.
14156 Use string_to_number to do the actual conversion; this avoids
14157 rounding errors and fixes some other screwups. Without this fix,
14158 for example, #x1fffffffffffffff was misread as -2305843009213693952.
14159 (digit_to_number): Move earlier, for benefit of read_integer.
14160 Return -1 if the digit is out of range for the base, -2 if it is
14161 not a digit in any supported base. (Bug#8602)
14163 * doprnt.c (doprnt): Support arbitrary pI values, such as "I64".
14165 * dispnew.c (scrolling_window): Return 1 if we scrolled,
14166 to match comment at start of function. This also removes a
14167 GCC warning about overflow in a 32+64-bit port.
14169 * lisp.h (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Simplify.
14171 * dbusbind.c: Do not use XPNTR on a value that may be an integer.
14172 Reported by Stefan Monnier in
14173 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00919.html>.
14174 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
14175 Use SYMBOLP-guarded XSYMBOL, not XPNTR.
14177 * lisp.h (EMACS_INTPTR): Remove. All uses changed to intptr_t.
14178 (EMACS_UINTPTR): Likewise, with uintptr_t.
14180 * lisp.h: Prefer 64-bit EMACS_INT if available.
14181 (EMACS_INT, EMACS_UINT, BITS_PER_EMACS_INT, pI): Define to 64-bit
14182 on 32-bit hosts that have 64-bit int, so that they can access
14184 However, temporarily disable this change unless the temporary
14185 symbol WIDE_EMACS_INT is defined.
14187 * lread.c, process.c: Do not include <inttypes.h>; lisp.h does it now.
14189 Prefer intptr_t/uintptr_t for integers the same widths as pointers.
14190 This removes an assumption that EMACS_INT and long are the same
14191 width as pointers. The assumption is true for Emacs porting targets
14192 now, but we want to make other targets possible.
14193 * lisp.h: Include <inttypes.h>, for INTPTR_MAX, UINTPTR_MAX.
14194 (EMACS_INTPTR, EMACS_UINTPTR): New macros.
14195 In the rest of the code, change types of integers that hold casted
14196 pointers to EMACS_INTPTR and EMACS_UINTPTR, systematically
14197 replacing EMACS_INT, long, EMACS_UINT, and unsigned long.
14198 (XTYPE): Don't cast arg to EMACS_UINT; normally is not needed.
14199 (XSET): Cast type of XTYPE arg to EMACS_INTPTR; it is needed here.
14200 No need to cast type when ORing.
14201 (XPNTR): Return a value of type EMACS_INTPTR or EMACS_UINTPTR.
14202 * alloc.c (lisp_align_malloc): Remove a no-longer-needed cast.
14203 * doc.c (store_function_docstring): Use EMACS_INTPTR, so as not to
14204 assume EMACS_INT is the same width as char *.
14205 * gtkutil.c (xg_gtk_scroll_destroy, xg_tool_bar_button_cb):
14206 (xg_tool_bar_callback, xg_tool_bar_help_callback, xg_make_tool_item):
14207 Remove no-longer-needed casts.
14208 (xg_create_scroll_bar, xg_tool_bar_button_cb, xg_tool_bar_callback):
14209 (xg_tool_bar_help_callback, xg_make_tool_item):
14210 Use EMACS_INTPTR to hold an integer
14211 that will be cast to void *; this can avoid a GCC warning
14212 if EMACS_INT is not the same width as void *.
14213 * menu.c (find_and_call_menu_selection): Remove no-longer-needed cast.
14214 * xdisp.c (display_echo_area_1, resize_mini_window_1):
14215 (current_message_1, set_message_1):
14216 Use a local to convert to proper width without a cast.
14217 * xmenu.c (dialog_selection_callback): Likewise.
14219 * sysdep.c (get_random): Don't assume EMACS_INT is no wider than long.
14220 Also, don't assume VALBITS / RAND_BITS is less than 5,
14221 and don't rely on undefined behavior when shifting a 1 left into
14223 * lisp.h (get_random): Change signature to match.
14225 * lread.c (hash_string): Use size_t, not int, for hash computation.
14226 Normally we prefer signed values; but hashing is special, because
14227 it's better to use unsigned division on hash table sizes so that
14228 the remainder is nonnegative. Also, size_t is the natural width
14229 for hashing into memory. The previous code used 'int', which doesn't
14230 retain enough info to hash well into very large tables.
14231 (oblookup, oblookup_last_bucket_number, Funintern): Likewise.
14233 * dbusbind.c: Don't possibly lose pointer info when converting.
14234 (xd_remove_watch, Fdbus_init_bus, xd_read_queued_messages):
14235 Use XPNTR rather than XHASH, so that the high-order bits of
14236 the pointer aren't lost when converting through void *.
14238 * eval.c (Fautoload): Don't double-shift a pointer.
14240 * fns.c (Frandom): Let EMACS_UINT be wider than unsigned long.
14242 2011-05-06 Juanma Barranquero <lekktu@gmail.com>
14244 * gnutls.c (DEF_GNUTLS_FN):
14245 * image.c (DEF_IMGLIB_FN): Make function pointers static.
14247 2011-05-05 Andreas Schwab <schwab@linux-m68k.org>
14249 * lread.c (lisp_file_lexically_bound_p): Stop scanning at end
14252 2011-05-05 Eli Zaretskii <eliz@gnu.org>
14254 * w32heap.c (allocate_heap) [USE_LISP_UNION_TYPE || USE_LSB_TAG]:
14255 New version that can reserve upto 2GB of heap space.
14257 2011-05-05 Chong Yidong <cyd@stupidchicken.com>
14259 * nsfns.m (Fns_read_file_name): Doc fix (Bug#8534).
14261 2011-05-05 Teodor Zlatanov <tzz@lifelogs.com>
14263 * gnutls.c (fn_gnutls_certificate_set_x509_key_file): Add alias to
14264 `gnutls_certificate_set_x509_key_file'.
14266 2011-05-05 Juanma Barranquero <lekktu@gmail.com>
14268 * makefile.w32-in ($(BLD)/image.$(O), $(BLD)/process.$(O)):
14269 Update dependencies.
14271 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
14273 * gnutls.h (emacs_gnutls_write, emacs_gnutls_read):
14274 * gnutls.c (emacs_gnutls_write, emacs_gnutls_read):
14275 Remove unused parameter `fildes'.
14276 * process.c (read_process_output, send_process): Don't pass it.
14278 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
14280 Fix previous change: the library cache is defined in w32.c.
14281 * image.c (CACHE_IMAGE_TYPE) [!HAVE_NTGUI]: Define to noop.
14282 (Finit_image_library): Wrap Vlibrary_cache on "#ifdef HAVE_NTGUI".
14284 2011-05-04 Juanma Barranquero <lekktu@gmail.com>
14286 Implement dynamic loading of GnuTLS on Windows.
14288 * gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
14289 (emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
14290 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
14293 * gnutls.c (Qgnutls_dll): Define.
14294 (DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
14295 (gnutls_*): Declare function pointers.
14296 (init_gnutls_functions): New function to initialize function pointers.
14297 (emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
14298 (emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
14299 (emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
14300 Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
14301 (emacs_gnutls_write, emacs_gnutls_read)
14302 (emacs_gnutls_handle_error, Fgnutls_error_fatalp)
14303 (Fgnutls_available_p): New function.
14304 (Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
14305 (syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
14306 (syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
14308 * image.c: Include w32.h.
14309 (Vimage_type_cache): Delete.
14310 (syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
14311 (CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
14312 (w32_delayed_load): Move to w32.c.
14314 * w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
14316 * w32.c (QCloaded_from, Vlibrary_cache): Define.
14317 (w32_delayed_load): Move from image.c. When loading a library, record
14318 its filename in the :loaded-from property of the library id.
14319 (globals_of_w32) <QCloaded_from, Vlibrary_cache>:
14320 Initialize and staticpro them.
14321 (emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
14323 * process.c: Include lisp.h before w32.h, not after.
14324 (wait_reading_process_output): Call emacs_gnutls_record_check_pending
14325 instead of gnutls_record_check_pending.
14327 * callproc.c, emacs.c: Include lisp.h before w32.h, not after.
14329 2011-05-04 Teodor Zlatanov <tzz@lifelogs.com>
14331 * gnutls.c (Fgnutls_boot): Support :keylist and :crlfiles options
14332 instead of :keyfiles. Give GnuTLS the keylist and the CRL lists
14335 2011-05-03 Jan Djärv <jan.h.d@swipnet.se>
14337 * xterm.c (x_set_frame_alpha): Do not set property on anything
14338 else than FRAME_X_OUTER_WINDOW (Bug#8608).
14340 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
14342 * sysdep.c (get_tty_size) [WINDOWSNT]: Implement. (Bug#8596)
14344 2011-05-02 Juanma Barranquero <lekktu@gmail.com>
14346 * gnutls.c (Qgnutls_log_level, Qgnutls_code, Qgnutls_anon)
14347 (Qgnutls_x509pki, Qgnutls_e_interrupted, Qgnutls_e_again)
14348 (Qgnutls_e_invalid_session, Qgnutls_e_not_ready_for_handshake)
14349 (gnutls_global_initialized, Qgnutls_bootprop_priority)
14350 (Qgnutls_bootprop_trustfiles, Qgnutls_bootprop_keyfiles)
14351 (Qgnutls_bootprop_callbacks, Qgnutls_bootprop_loglevel)
14352 (Qgnutls_bootprop_hostname, Qgnutls_bootprop_verify_flags)
14353 (Qgnutls_bootprop_verify_error, Qgnutls_bootprop_verify_hostname_error)
14354 (Qgnutls_bootprop_callbacks_verify): Make static.
14356 2011-05-01 Andreas Schwab <schwab@linux-m68k.org>
14358 * callproc.c: Indentation fixup.
14360 * sysdep.c (wait_for_termination_1): Make static.
14361 (wait_for_termination, interruptible_wait_for_termination):
14362 Move after wait_for_termination_1.
14364 2011-05-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
14366 * sysdep.c (interruptible_wait_for_termination): New function
14367 which is like wait_for_termination, but allows keyboard
14370 * callproc.c (Fcall_process): Add (:file "file") as an option for
14372 (Fcall_process_region): Ditto.
14374 2011-04-30 Eli Zaretskii <eliz@gnu.org>
14376 * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Use `ASIZE (FOO)'
14377 rather than `XVECTOR (FOO)->size'.
14379 * process.c: Remove HAVE_INTTYPES_H condition from inclusion of
14380 inttypes.h, as a gnulib replacement is used if it not available in
14383 2011-04-21 Eli Zaretskii <eliz@gnu.org>
14385 Lift the MOST_POSITIVE_FIXNUM/4 limitation on visited files.
14386 * fileio.c (Finsert_file_contents): Don't limit file size to 1/4
14387 of MOST_POSITIVE_FIXNUM. (Bug#8528)
14389 * coding.c (coding_alloc_by_realloc): Error out if destination
14390 will grow beyond MOST_POSITIVE_FIXNUM.
14391 (decode_coding_emacs_mule): Abort if there isn't enough place in
14392 charbuf for the composition carryover bytes. Reserve an extra
14393 space for up to 2 characters produced in a loop.
14394 (decode_coding_iso_2022): Abort if there isn't enough place in
14395 charbuf for the composition carryover bytes.
14397 2011-04-21 Eli Zaretskii <eliz@gnu.org>
14399 * doprnt.c (doprnt) [!HAVE_LONG_LONG_INT]: Error out instead of
14400 aborting when %lld or %lll format is passed.
14401 [!HAVE_UNSIGNED_LONG_LONG_INT]: Error out instead of aborting when
14402 %llo or %llx format is passed. (Bug#8545)
14404 * window.c (window_scroll_line_based): Use a marker instead of
14405 simple variables to record original value of point. (Bug#7952)
14407 * doprnt.c (doprnt): Fix the case where a multibyte sequence
14408 produced by %s or %c overflows available buffer space. (Bug#8545)
14410 2011-04-28 Paul Eggert <eggert@cs.ucla.edu>
14412 * doprnt.c (doprnt): Omit useless test; int overflow check (Bug#8545).
14413 (SIZE_MAX): Move defn after all includes, as they might #define it.
14415 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
14417 * w32.c (init_environment): Warn about defaulting HOME to C:\.
14419 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
14421 * keyboard.c (Qdelayed_warnings_hook): Define.
14422 (command_loop_1): Run `delayed-warnings-hook'
14423 if Vdelayed_warnings_list is non-nil.
14424 (syms_of_keyboard) <delayed-warnings-hook>: DEFSYM it.
14425 (syms_of_keyboard) <delayed-warnings-list>: DEFVAR_LISP it.
14427 2011-04-28 Eli Zaretskii <eliz@gnu.org>
14429 * doprnt.c (doprnt): Don't return value smaller than the buffer
14430 size if the message was truncated. (Bug#8545).
14432 2011-04-28 Juanma Barranquero <lekktu@gmail.com>
14434 * w32fns.c (Fx_change_window_property, Fx_delete_window_property)
14435 (Fx_window_property): #if-0 the whole functions, not just the bodies.
14437 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
14439 * doprnt.c (doprnt): Support "ll" length modifier, for long long.
14441 2011-04-27 Juanma Barranquero <lekktu@gmail.com>
14443 * makefile.w32-in: Update dependencies.
14445 2011-04-27 Eli Zaretskii <eliz@gnu.org>
14447 Improve `doprnt' and its usage. (Bug#8545)
14448 * doprnt.c (doprnt): Make sure `format' is never accessed beyond
14449 `format_end'. Remove support for %l as a conversion specifier.
14450 Don't use xrealloc. Improve diagnostics when the %l size modifier
14451 is used. Update the commentary.
14453 * eval.c (verror): Simplify calculation of size_t.
14455 * coding.c (Ffind_operation_coding_system): Fix diagnostic error
14458 2011-04-27 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> (tiny change)
14460 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Adjust to aliasing
14463 2011-04-27 Paul Eggert <eggert@cs.ucla.edu>
14465 * nsmenu.m: Replace all uses of XVECTOR with ASIZE and AREF.
14466 This makes this file independent of the recent pseudovector change.
14468 2011-04-26 Paul Eggert <eggert@cs.ucla.edu>
14470 * keyboard.c (handle_user_signal): Fix pointer signedness problem.
14472 * gnutls.c (emacs_gnutls_handle_error): Remove unused local.
14473 (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *.
14474 Remove unused local.
14475 (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0.
14477 * lisp.h: Fix a problem with aliasing and vector headers. (Bug#8546)
14478 GCC 4.6.0 optimizes based on type-based alias analysis.
14479 For example, if b is of type struct buffer * and v of type struct
14480 Lisp_Vector *, then gcc -O2 was incorrectly assuming that &b->size
14481 != &v->size, and therefore "v->size = 1; b->size = 2; return
14482 v->size;" must therefore return 1. This assumption is incorrect
14483 for Emacs, since it type-puns struct Lisp_Vector * with many other
14484 types. To fix this problem, this patch adds a new type struct
14485 vectorlike_header that documents the constraints on layout of vectors
14486 and pseudovectors, and helps optimizing compilers not get fooled
14487 by Emacs's type punning. It also adds the macros XSETTYPED_PVECTYPE
14488 XSETTYPED_PSEUDOVECTOR, TYPED_PSEUDOVECTORP, for similar reasons.
14489 * lisp.h (XSETTYPED_PVECTYPE): New macro, specifying the name of
14491 (XSETPVECTYPE): Rewrite in terms of new macro.
14492 (XSETPVECTYPESIZE): New macro, specifying both type and size.
14493 This is a bit clearer, and further avoids the possibility of
14494 undesirable aliasing.
14495 (XSETTYPED_PSEUDOVECTOR): New macro, specifying the size.
14496 (XSETPSEUDOVECTOR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR.
14497 (XSETSUBR): Rewrite in terms of XSETTYPED_PSEUDOVECTOR and XSIZE,
14498 since Lisp_Subr is a special case (no "next" field).
14499 (ASIZE): Now uses header.size rather than size.
14500 All previous uses of XVECTOR (foo)->size replaced to use this macro,
14501 to avoid the hassle of writing XVECTOR (foo)->header.size.
14502 (struct vectorlike_header): New type.
14503 (TYPED_PSEUDOVECTORP): New macro, also specifying the C type of the
14504 object, to help avoid aliasing.
14505 (PSEUDOVECTORP): Rewrite in terms of TYPED_PSEUDOVECTORP.
14506 (SUBRP): Likewise, since Lisp_Subr is a special case.
14507 * lisp.h (struct Lisp_Vector, struct Lisp_Char_Table):
14508 (struct Lisp_Sub_Char_Table, struct Lisp_Bool_Vector):
14509 (struct Lisp_Hash_Table): Combine first two members into a single
14510 struct vectorlike_header member. All uses of "size" and "next" members
14511 changed to be "header.size" and "header.next".
14512 * buffer.h (struct buffer): Likewise.
14513 * font.h (struct font_spec, struct font_entity, struct font): Likewise.
14514 * frame.h (struct frame): Likewise.
14515 * process.h (struct Lisp_Process): Likewise.
14516 * termhooks.h (struct terminal): Likewise.
14517 * window.c (struct save_window_data, struct saved_window): Likewise.
14518 * window.h (struct window): Likewise.
14519 * alloc.c (allocate_buffer, Fmake_bool_vector, allocate_pseudovector):
14520 Use XSETPVECTYPESIZE, not XSETPVECTYPE, to avoid aliasing problems.
14521 * buffer.c (init_buffer_once): Likewise.
14522 * lread.c (defsubr): Use XSETTYPED_PVECTYPE, since Lisp_Subr is a
14524 * process.c (Fformat_network_address): Use local var for size,
14527 * bytecode.c (exec_byte_code): Don't use XVECTOR before CHECK_VECTOR.
14529 Make the Lisp reader and string-to-float more consistent (Bug#8525)
14530 * data.c (atof): Remove decl; no longer used or needed.
14531 (digit_to_number): Move to lread.c.
14532 (Fstring_to_number): Use new string_to_number function, to be
14533 consistent with how the Lisp reader treats infinities and NaNs.
14534 Do not assume that floating-point numbers represent EMACS_INT
14535 without losing information; this is not true on most 64-bit hosts.
14536 Avoid double-rounding errors, by insisting on integers when
14537 parsing non-base-10 numbers, as the documentation specifies.
14538 * lisp.h (string_to_number): New decl, replacing ...
14539 (isfloat_string): Remove.
14540 * lread.c: Include <inttypes.h>, for uintmax_t and strtoumax.
14541 (read1): Do not accept +. and -. as integers; this
14542 appears to have been a coding error. Similarly, do not accept
14543 strings like +-1e0 as floating point numbers. Do not report
14544 overflow for integer overflows unless the base is not 10 which
14545 means we have no simple and reliable way to continue.
14546 Break out the floating-point parsing into a new
14547 function string_to_number, so that Fstring_to_number parses
14548 floating point numbers consistently with the Lisp reader.
14549 (digit_to_number): Move here from data.c. Make it static inline.
14550 (E_CHAR, EXP_INT): Remove, replacing with ...
14551 (E_EXP): New macro, to solve the "1.0e+" problem mentioned below.
14552 (string_to_number): New function, replacing isfloat_string.
14553 This function checks for valid syntax and produces the resulting
14554 Lisp float number too. Rework it so that string-to-number
14555 no longer mishandles examples like "1.0e+". Use strtoumax,
14556 so that overflow for non-base-10 numbers is reported only when
14557 there's no portable and simple way to convert to floating point.
14559 * textprop.c (set_text_properties_1): Rewrite for clarity,
14560 and to avoid GCC warning about integer overflow.
14562 * intervals.h (struct interval): Use EMACS_INT for members
14563 where EMACS_UINT might cause problems. See
14564 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html>.
14565 (CHECK_TOTAL_LENGTH): Remove cast to EMACS_INT; no longer needed.
14566 * intervals.c (interval_deletion_adjustment): Now returns EMACS_INT.
14568 (offset_intervals): Tell GCC not to worry about length overflow
14569 when negating a negative length.
14571 * alloc.c (overrun_check_malloc, overrun_check_realloc): Now static.
14572 (overrun_check_free): Likewise.
14574 * alloc.c (SDATA_SIZE) [!GC_CHECK_STRING_BYTES]: Avoid runtime check
14575 in the common case where SDATA_DATA_OFFSET is a multiple of Emacs
14578 * gnutls.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
14579 (gnutls_make_error): Rename local to avoid shadowing.
14580 (gnutls_emacs_global_deinit): ifdef out; not used.
14581 (Fgnutls_boot): Use const for pointer to readonly storage.
14582 Comment out unused local. Fix pointer signedness problems.
14584 * lread.c (openp): Don't stuff size_t into an 'int'.
14585 Use <= on length, not < on length + 1, to avoid GCC 4.6.0 warning
14586 about possible signed overflow.
14588 * gtkutil.c: Fix problems found by GCC 4.6.0 on Ubuntu 10.10.
14589 (GDK_KEY_g): Don't define if already defined.
14590 (xg_prepare_tooltip): Avoid pointer signedness problem.
14591 (xg_set_toolkit_scroll_bar_thumb): Redo to avoid two casts.
14593 * process.c (Fnetwork_interface_info): Avoid left-shift undefined
14594 behavior with 1 << 31. GCC 4.6.0 warns about this on 32-bit hosts.
14596 * xfns.c (Fx_window_property): Simplify a bit,
14597 to make a bit faster and to avoid GCC 4.6.0 warning.
14598 * xselect.c (x_get_window_property, x_handle_dnd_message): Likewise.
14600 * fns.c (internal_equal): Don't assume size_t fits in int.
14602 * alloc.c (compact_small_strings): Tighten assertion a little.
14604 Replace pEd with more-general pI, and fix some printf arg casts.
14605 * lisp.h (pI): New macro, generalizing old pEd macro to other
14606 conversion specifiers. For example, use "...%"pI"d..." rather
14607 than "...%"pEd"...".
14608 (pEd): Remove. All uses replaced with similar uses of pI.
14609 * m/amdx86-64.h, m/ia64.h, m/ibms390x.h: Likewise.
14610 * alloc.c (check_pure_size): Don't overflow by converting size to int.
14611 * bidi.c (bidi_dump_cached_states): Use pI to avoid cast.
14612 * data.c (Fnumber_to_string): Use pI instead of if-then-else-abort.
14613 * dbusbind.c (xd_append_arg): Use pI to avoid cast.
14614 (Fdbus_method_return_internal, Fdbus_method_error_internal): Likewise.
14615 * font.c (font_unparse_xlfd): Avoid potential buffer overrun on
14617 (font_unparse_xlfd, font_unparse_fcname): Use pI to avoid casts.
14618 * keyboard.c (record_char, modify_event_symbol): Use pI to avoid casts.
14619 * print.c (safe_debug_print, print_object): Likewise.
14620 (print_object): Don't overflow by converting EMACS_INT or EMACS_UINT
14622 Use pI instead of if-then-else-abort. Use %p to avoid casts,
14623 avoiding the 0 flag, which is not portable.
14624 * process.c (Fmake_network_process): Use pI to avoid cast.
14625 * region-cache.c (pp_cache): Likewise.
14626 * xdisp.c (decode_mode_spec): Likewise.
14627 * xrdb.c (x_load_resources) [USE_MOTIF]: Use pI to avoid undefined
14628 behavior on 64-bit hosts with printf arg.
14629 * xselect.c (x_queue_event): Use %p to avoid casts, avoiding 0 flag.
14630 (x_stop_queuing_selection_requests): Likewise.
14631 (x_get_window_property): Don't truncate byte count to an 'int'
14634 * frame.c (frame_name_fnn_p): Get rid of strtol, which isn't right
14635 here, since it parses constructs like leading '-' and spaces,
14636 which are not wanted; and it overflows with large numbers.
14637 Instead, simply match F[0-9]+, which is what is wanted anyway.
14639 * alloc.c: Remove unportable assumptions about struct layout.
14640 (SDATA_SELECTOR, SDATA_DATA_OFFSET): New macros.
14641 (SDATA_OF_STRING, SDATA_SIZE, allocate_string_data):
14642 (allocate_vectorlike, make_pure_vector): Use the new macros,
14643 plus offsetof, to remove unportable assumptions about struct layout.
14644 These assumptions hold on all porting targets that I know of, but
14645 they are not guaranteed, they're easy to remove, and removing them
14646 makes further changes easier.
14648 * alloc.c (BLOCK BYTES): Fix typo by changing "ablock" to "ablocks".
14649 This doesn't fix a bug but makes the code clearer.
14650 (string_overrun_cookie): Now const. Use initializers that
14651 don't formally overflow signed char, to avoid warnings.
14652 (allocate_string_data) [GC_CHECK_STRING_OVERRUN]: Fix typo that
14653 can cause Emacs to crash when string overrun checking is enabled.
14654 (allocate_buffer): Don't assume sizeof (struct buffer) is a
14655 multiple of sizeof (EMACS_INT); it need not be, if
14656 alignof(EMACS_INT) < sizeof (EMACS_INT).
14657 (check_sblock, check_string_bytes, check_string_free_list): Protoize.
14659 2011-04-26 Juanma Barranquero <lekktu@gmail.com>
14661 * keyboard.c (QCrtl): Rename from Qrtl. All uses changed.
14663 2011-04-26 Teodor Zlatanov <tzz@lifelogs.com>
14665 * gnutls.c (emacs_gnutls_handshake): Return an error if we're not
14666 supposed to be handshaking. (Bug#8556)
14667 Reported by Paul Eggert <eggert@cs.ucla.edu>.
14669 2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
14671 * lisp.h (Qdebug): List symbol.
14672 * eval.c (Qdebug): Restore global linkage.
14673 * keyboard.c (debug-on-event): New variable.
14674 (handle_user_signal): Break into debugger when debug-on-event
14675 matches the current signal symbol.
14677 2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
14679 * alloc.c (check_sblock, check_string_bytes)
14680 (check_string_free_list): Convert to standard C.
14682 2011-04-25 Teodor Zlatanov <tzz@lifelogs.com>
14684 * w32.c (emacs_gnutls_push): Fix typo.
14686 2011-04-25 Eli Zaretskii <eliz@gnu.org>
14688 * gnutls.c (emacs_gnutls_handshake): Avoid compiler warnings about
14689 "cast to pointer from integer of different size".
14691 Improve doprnt and its use in verror. (Bug#8545)
14692 * doprnt.c (doprnt): Document the set of format control sequences
14693 supported by the function. Use SAFE_ALLOCA instead of always
14696 * eval.c (verror): Don't limit the buffer size at size_max-1, that
14697 is one byte too soon. Don't use xrealloc; instead xfree and
14700 2011-04-24 Teodor Zlatanov <tzz@lifelogs.com>
14702 * gnutls.h: Add GNUTLS_STAGE_CALLBACKS enum to denote we're in the
14705 * gnutls.c: Renamed global_initialized to
14706 gnutls_global_initialized. Added internals for the
14707 :verify-hostname-error, :verify-error, and :verify-flags
14708 parameters of `gnutls-boot' and documented those parameters in the
14709 docstring. Start callback support.
14710 (emacs_gnutls_handshake): Add Woe32 support. Retry handshake
14711 unless a fatal error occurred. Call gnutls_alert_send_appropriate
14712 on error. Return error code.
14713 (emacs_gnutls_write): Call emacs_gnutls_handle_error.
14714 (emacs_gnutls_read): Likewise.
14715 (Fgnutls_boot): Return handshake error code.
14716 (emacs_gnutls_handle_error): New function.
14717 (wsaerror_to_errno): Likewise.
14719 * w32.h (emacs_gnutls_pull): Add prototype.
14720 (emacs_gnutls_push): Likewise.
14722 * w32.c (emacs_gnutls_pull): New function for GnuTLS on Woe32.
14723 (emacs_gnutls_push): Likewise.
14725 2011-04-24 Claudio Bley <claudio.bley@gmail.com> (tiny change)
14727 * process.c (wait_reading_process_output): Check if GnuTLS
14728 buffered some data internally if no FDs are set for TLS
14731 * makefile.w32-in (OBJ2): Add gnutls.$(O).
14732 (LIBS): Link to USER_LIBS.
14733 ($(BLD)/gnutls.$(0)): New target.
14735 2011-04-24 Eli Zaretskii <eliz@gnu.org>
14737 * xdisp.c (handle_single_display_spec): Rename the
14738 display_replaced_before_p argument into display_replaced_p, to
14739 make it consistent with the commentary. Fix typos in the
14742 * textprop.c (syms_of_textprop): Remove dead code.
14743 (copy_text_properties): Delete obsolete commentary about an
14744 interface that was deleted long ago. Fix typos in the description
14747 * msdos.c (XMenuActivate, XMenuAddSelection): Adjust argument list
14748 to changes in oldXMenu/XMenu.h from 2011-04-16.
14749 <menu_help_message, prev_menu_help_message>: Constify.
14750 (IT_menu_make_room): menu->help_text is now `const char **';
14753 * msdos.h (XMenuActivate, XMenuAddSelection): Adjust prototypes
14754 to changes in oldXMenu/XMenu.h from 2011-04-16.
14755 (struct XMenu): Declare `help_text' `const char **'.
14757 * xfaces.c <Qunspecified>: Make extern again.
14759 * syntax.c: Include sys/types.h before including regex.h, as
14762 * doc.c (get_doc_string): Improve the format passed to `error'.
14764 * doprnt.c (doprnt): Improve commentary.
14766 * term.c (init_tty) [MSDOS]: Fix 1st argument to maybe_fatal.
14768 * Makefile.in (TAGS): Depend on $(M_FILE) and $(S_FILE), and scan
14771 * makefile.w32-in (globals.h): Add a dummy recipe, to make any
14772 changes in globals.h immediately force recompilation.
14773 (TAGS): Depend on $(CURDIR)/m/intel386.h and
14774 $(CURDIR)/s/ms-w32.h.
14775 (TAGS-gmake): Scan $(CURDIR)/m/intel386.h and $(CURDIR)/s/ms-w32.h.
14777 * character.c (Fchar_direction): Function deleted.
14778 (syms_of_character): Don't defsubr it.
14779 <char-direction-table>: Deleted.
14781 2011-04-23 Eli Zaretskii <eliz@gnu.org>
14783 Fix doprnt so it could be used again safely in `verror'. (Bug#8435)
14784 * doprnt.c: Include limits.h.
14785 (SIZE_MAX): New macro.
14786 (doprnt): Return a size_t value. 2nd arg is now size_t.
14787 Many local variables are now size_t instead of int or unsigned.
14788 Improve overflow protection. Support `l' modifier for integer
14789 conversions. Support %l conversion. Don't assume an EMACS_INT
14790 argument for integer conversions and for %c.
14792 * lisp.h (doprnt): Restore prototype.
14794 * makefile.w32-in ($(BLD)/callint.$(O)): Depend on
14795 $(SRC)/character.h.
14797 * Makefile.in (base_obj): Add back doprnt.o.
14799 * deps.mk (doprnt.o): Add back prerequisites.
14800 (callint.o): Depend on character.h.
14802 * eval.c (internal_lisp_condition_case): Include the handler
14803 representation in the error message.
14804 (verror): Call doprnt instead of vsnprintf. Fix an off-by-one bug
14805 when breaking from the loop.
14807 * xdisp.c (vmessage): Call doprnt instead of vsnprintf.
14809 * callint.c (Fcall_interactively): When displaying error message
14810 about invalid control letter, pass the character's codepoint, not
14811 a pointer to its multibyte form. Improve display of the character
14812 in octal and display also its hex code.
14814 * character.c (char_string): Use %x to display the (unsigned)
14815 codepoint of an invalid character, to avoid displaying a bogus
14818 * font.c (check_otf_features): Pass SDATA of SYMBOL_NAME to
14819 `error', not SYMBOL_NAME itself.
14821 * coding.c (Fencode_sjis_char, Fencode_big5_char): Use %c for
14822 character arguments to `error'.
14824 * charset.c (check_iso_charset_parameter): Fix incorrect argument
14825 to `error' in error message about FINAL_CHAR argument. Make sure
14826 FINAL_CHAR is a character, and use %c when it is passed as
14827 argument to `error'.
14829 2011-04-23 Eli Zaretskii <eliz@gnu.org>
14831 * s/ms-w32.h (localtime): Redirect to sys_localtime.
14833 * w32.c: Include <time.h>.
14834 (sys_localtime): New function.
14836 2011-04-23 Chong Yidong <cyd@stupidchicken.com>
14838 * xdisp.c (init_xdisp): Initialize echo_area_window (Bug#6451).
14840 * buffer.c (syms_of_buffer): Doc fix (Bug#6902).
14842 2011-04-23 Samuel Thibault <sthibault@debian.org> (tiny change)
14844 * sysdep.c (wait_for_termination): On GNU Hurd, kill returns -1 on
14845 zombies (Bug#8467).
14847 2011-04-19 Eli Zaretskii <eliz@gnu.org>
14849 * syntax.h (SETUP_SYNTAX_TABLE_FOR_OBJECT): Fix setting of
14850 gl_state.e_property when gl_state.object is Qt.
14852 * insdel.c (make_gap_larger): Remove limitation of buffer size
14855 2011-04-18 Chong Yidong <cyd@stupidchicken.com>
14857 * xdisp.c (lookup_glyphless_char_display)
14858 (produce_glyphless_glyph): Handle cons cell entry in
14859 glyphless-char-display.
14860 (Vglyphless_char_display): Document it.
14862 * term.c (produce_glyphless_glyph): Handle cons cell entry in
14863 glyphless-char-display.
14865 2011-04-17 Chong Yidong <cyd@stupidchicken.com>
14867 * xdisp.c (get_next_display_element): Remove unnecessary ifdefs.
14869 * termhooks.h (FRAME_WINDOW_P): Remove duplicated definitions.
14871 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): Add missing
14872 definition for no-X builds.
14874 2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
14876 Static checks with GCC 4.6.0 and non-default toolkits.
14878 * s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF): Protoize decl.
14880 * process.c (keyboard_bit_set): Define only if SIGIO.
14881 (send_process_trap): Mark it with NO_RETURN if it doesn't return.
14882 (send_process): Repair possible setjmp clobbering.
14884 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Don't pass extra arg to 'fatal'.
14886 * eval.c: Include <stdio.h>, for vsnprintf on non-GNU/Linux hosts.
14888 * data.c (arith_error): Mark with NO_RETURN if it doesn't return.
14890 * alloc.c (bytes_used_when_full, SPARE_MEMORY, BYTES_USED):
14891 Define only if needed.
14893 * sysdep.c (_FILE_OFFSET_BITS): Make this hack even uglier
14894 by pacifying GCC about it. Maybe it's time to retire it?
14895 * xfaces.c (USG, __TIMEVAL__): Likewise.
14897 * dispextern.h (struct redisplay_interface): Rename param
14898 to avoid shadowing.
14899 * termhooks.h (struct terminal): Likewise.
14900 * xterm.c (xembed_send_message): Likewise.
14902 * insdel.c (make_gap_smaller): Define only if
14903 USE_MMAP_FOR_BUFFERS || REL_ALLOC || DOUG_LEA_MALLOC.
14905 * keyboard.c (read_char): Make a var volatile so longjmp won't clobber
14908 * emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
14909 so that we aren't warned about unused symbols.
14911 * xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
14913 * xdisp.c (x_produce_glyphs): Mark var as initialized (Bug#8512).
14915 * xfns.c (x_real_positions): Mark locals as initialized.
14917 * xmenu.c (xmenu_show): Don't use uninitialized vars.
14919 * xterm.c: Fix problems found by static analysis with other toolkits.
14920 (toolkit_scroll_bar_interaction): Define and use only if USE_X_TOOLKIT.
14921 (x_dispatch_event): Declare static if USE_GTK, and
14922 define if USE_GTK || USE_X_TOOLKIT.
14923 (SET_SAVED_BUTTON_EVENT): Define only if USE_X_TOOLKIT || USE_GTK.
14924 * xterm.h (x_dispatch_event): Extern only if USE_X_TOOLKIT.
14925 * xterm.c, xterm.h (x_mouse_leave): Bring this function back, but only
14926 if defined HAVE_MENUS && !defined USE_X_TOOLKIT && !defined USE_GTK.
14928 * xmenu.c (menu_help_callback): Pointer type fixes.
14929 Use const pointers when pointing at readonly data. Avoid pointer
14930 signedness clashes.
14931 (FALSE): Remove unused macro.
14932 (update_frame_menubar): Remove unused decl.
14934 * xfns.c (Fx_hide_tip): Move locals to avoid shadowing.
14936 * menu.c (push_submenu_start, push_submenu_end): Do not define unless
14937 USE_X_TOOLKIT || USE_GTK || HAVE_NS || defined HAVE_NTGUI.
14938 (single_menu_item): Rename local to avoid shadowing.
14940 * keyboard.c (make_lispy_event): Remove unused local var.
14942 * frame.c, frame.h (x_get_resource_string): Bring this back, but
14943 only if HAVE_X_WINDOWS && !USE_X_TOOLKIT.
14945 * bitmaps: Change bitmaps from unsigned char back to the X11
14946 compatible char. Avoid the old compiler warnings about
14947 out-of-range initializers by using, for example, '\xab' rather
14950 * xgselect.c (xgselect_initialize): Check vs interface
14951 even if ! (defined (USE_GTK) || defined (HAVE_GCONF)).
14953 * xmenu.c (xmenu_show): Rename parm to avoid shadowing.
14955 * xterm.c (x_create_toolkit_scroll_bar): Use const * for pointers
14956 to read-only memory.
14958 * fns.c (vector): Remove; this old hack is no longer needed.
14960 * xsmfns.c (create_client_leader_window): Rename shadowing arg.
14962 (gdk_x11_set_sm_client_id) [!USE_GTK]: Don't define.
14964 * xrdb.c (x_load_resources): Omit unused local.
14966 * xfns.c (free_frame_menubar, atof): Remove duplicate decls.
14967 (x_window): Rename locals to avoid shadowing.
14968 (USG): Use the kludged USG macro, to pacify gcc.
14970 * xterm.c (x_alloc_nearest_color_for_widget): Remove; unused.
14971 (x_term_init): Remove local to avoid shadowing.
14973 * xfns.c, xterm.c (_XEditResCheckMessages): Protoize decl.
14975 * xdisp.c, dispextern.h (set_vertical_scroll_bar): Now extern if
14976 USE_TOOLKIT_SCROLL_BARS && !USE_GTK, as xterm.c needs it then.
14978 2011-04-16 Eli Zaretskii <eliz@gnu.org>
14980 * gnutls.c (Fgnutls_boot): Don't pass Lisp_Object to `error'.
14982 Fix regex.c, syntax.c and friends for buffers > 2GB.
14983 * syntax.h (struct gl_state_s): Declare character position members
14986 * syntax.c (update_syntax_table): Declare 2nd argument EMACS_INT.
14988 * textprop.c (verify_interval_modification, interval_of):
14989 Declare arguments EMACS_INT.
14991 * intervals.c (adjust_intervals_for_insertion): Declare arguments
14994 * intervals.h (CHECK_TOTAL_LENGTH): Cast to EMACS_INT, not `int'.
14996 * indent.c (Fvertical_motion): Local variable it_start is now
14999 * regex.c (re_match, re_match_2, re_match_2_internal)
15000 (bcmp_translate, regcomp, regexec, print_double_string)
15001 (group_in_compile_stack, re_search, re_search_2, regex_compile)
15002 (re_compile_pattern, re_exec): Declare arguments and local
15003 variables `size_t' and `ssize_t' and return values `regoff_t', as
15005 (POP_FAILURE_REG_OR_COUNT) <pfreg>: Declare `long'.
15006 (CHECK_INFINITE_LOOP) <failure>: Declare `ssize_t'.
15007 <compile_stack_type>: `size' and `avail' are now `size_t'.
15009 * regex.h <regoff_t>: Use ssize_t, not int.
15010 (re_search, re_search_2, re_match, re_match_2): Arguments that
15011 specify buffer/string position and length are now ssize_t and
15012 size_t. Return type is regoff_t.
15014 2011-04-16 Ben Key <bkey76@gmail.com>
15016 * nsfont.m: Fixed bugs in ns_get_family and
15017 ns_descriptor_to_entity that were caused by using free to
15018 deallocate memory blocks that were allocated by xmalloc (via
15019 xstrdup). This caused Emacs to crash when compiled with
15020 XMALLOC_OVERRUN_CHECK defined (when Emacs was configured with
15021 --enable-checking=xmallocoverrun). xfree is now used to
15022 deallocate these memory blocks.
15024 2011-04-15 Paul Eggert <eggert@cs.ucla.edu>
15026 * sysdep.c (emacs_read): Remove unnecessary check vs MAX_RW_COUNT.
15028 emacs_write: Accept and return EMACS_INT for sizes.
15029 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00514.html
15031 * gnutls.c, gnutls.h (emacs_gnutls_read, emacs_gnutls_write):
15032 Accept and return EMACS_INT.
15033 (emacs_gnutls_write): Return the number of bytes written on
15035 * sysdep.c, lisp.h (emacs_read, emacs_write): Likewise.
15036 (emacs_read, emacs_write): Remove check for negative size, as the
15037 Emacs source code has been audited now.
15038 * sysdep.c (MAX_RW_COUNT): New macro, to work around kernel bugs.
15039 (emacs_read, emacs_write): Use it.
15040 * process.c (send_process): Adjust to the new signatures of
15041 emacs_write and emacs_gnutls_write. Do not attempt to store
15042 a byte offset into an 'int'; it might overflow.
15043 See http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00483.html
15045 * sound.c: Don't assume sizes fit in 'int'.
15046 (struct sound_device.period_size, alsa_period_size):
15047 Return EMACS_INT, not int.
15048 (struct sound_device.write, vox_write, alsa_write):
15049 Accept EMACS_INT, not int.
15050 (wav_play, au_play): Use EMACS_INT to store sizes and to
15051 record read return values.
15053 2011-04-15 Ben Key <bkey76@gmail.com>
15055 * keyboard.c (Qundefined): Don't declare static since it is used
15057 * xfaces.c (Qbold, Qexpanded, Qitalic, Qcondensed): Don't declare
15058 static since they are used in nsfont.m.
15060 2011-04-15 Stefan Monnier <monnier@iro.umontreal.ca>
15062 * process.c (Qprocessp): Don't declare static.
15063 * lisp.h (Qprocessp): Declare again.
15065 2011-04-15 Juanma Barranquero <lekktu@gmail.com>
15067 * font.c (Qopentype): Don't make static (used from w32uniscribe.c).
15069 2011-04-14 Paul Eggert <eggert@cs.ucla.edu>
15071 Improve C-level modularity by making more things 'static'.
15073 Don't publish debugger-only interfaces to other modules.
15074 * lisp.h (safe_debug_print, debug_output_compilation_hack):
15075 (verify_bytepos, count_markers): Move decls to the only modules
15077 * region-cache.h (pp_cache): Likewise.
15078 * window.h (check_all_windows): Likewise.
15079 * marker.c, print.c, region-cache.c, window.c: Decls moved here.
15081 * sysdep.c (croak): Now static, if
15082 defined TIOCNOTTY || defined USG5 || defined CYGWIN.
15083 * syssignal.h (croak): Declare only if not static.
15085 * alloc.c (refill_memory_reserve): Now static if
15086 !defined REL_ALLOC || defined SYSTEM_MALLOC.
15087 * lisp.h (refill_memory_reserve): Declare only if not static.
15089 * xsettings.c, xsettings.h (xsettings_get_system_normal_font):
15090 Define only if USE_LUCID.
15092 * xrdb.c (x_customization_string, x_rm_string): Now static.
15094 * xmenu.c (x_menu_wait_for_event): Export only if USE_MOTIF.
15095 * xterm.h (x_menu_wait_for_event): Declare only if USE_MOTIF.
15097 * xdisp.c (draw_row_with_mouse_face): Now static.
15098 * dispextern.h (draw_row_with_mouse_fave): Remove decl.
15100 * window.h (check_all_windows): Mark externally visible.
15102 * window.c (window_deletion_count): Now static.
15104 * undo.c: Make symbols static if they're not exported.
15105 (last_undo_buffer, last_boundary_position, pending_boundary):
15108 * textprop.c (interval_insert_behind_hooks): Now static.
15109 (interval_insert_in_front_hooks): Likewise.
15111 * term.c: Make symbols static if they're not exported.
15112 (tty_turn_off_highlight, get_tty_terminal, max_frame_cols):
15113 (max_frame_lines, tty_set_terminal_modes):
15114 (tty_reset_terminal_modes, tty_turn_off_highlight):
15115 (get_tty_terminal): Now static.
15116 (term_mouse_moveto): Do not define if HAVE_WINDOW_SYSTEM.
15117 * termhooks.h (term_mouse_moveto): Do not declare if
15118 HAVE_WINDOW_SYSTEM.
15119 * dispextern.h (tty_set_terminal_modes, tty_reset_terminal_modes):
15120 (tty_turn_off_highlight, get_tty_terminal): Remove decls.
15122 * sysdep.c: Make symbols static if they're not exported.
15123 (emacs_get_tty, emacs_set_tty, old_fcntl_flags, old_fcntl_owner):
15125 (sigprocmask_set, full_mask): Remove; unused.
15126 (wait_debugging): Mark as visible.
15127 * syssignal.h (SIGFULLMASK, full_mask): Remove decls.
15128 * systty.h (emacs_get_tty, emacs_set_tty): Remove decls.
15130 * syntax.c (syntax_temp): Define only if !__GNUC__.
15132 * sound.c (current_sound_device, current_sound): Now static.
15134 * search.c (searchbufs, searchbuf_head): Now static.
15136 * scroll.c (scroll_cost): Remove; unused.
15137 * dispextern.h (scroll_cost): Remove decl.
15139 * region-cache.h (pp_cache): Mark as externally visible.
15141 * process.c: Make symbols static if they're not exported.
15142 (process_tick, update_tick, create_process, chan_process):
15143 (Vprocess_alist, proc_buffered_char, datagram_access):
15144 (fd_callback_data, send_process_frame, process_sent_to): Now static.
15145 (deactivate_process): Mark defn as static, as well as decl.
15146 * lisp.h (create_process): Remove decl.
15147 * process.h (chan_process, Vprocess_alist): Remove decls.
15149 * print.c: Make symbols static if they're not exported.
15150 (print_depth, new_backquote_output, being_printed, print_buffer):
15151 (print_buffer_size, print_buffer_pos, print_buffer_pos_byte):
15152 (print_interval, print_number_index, initial_stderr_stream):
15154 * lisp.h (Fprinc): Remove decl.
15155 (debug_output_compilation_hack): Mark as externally visible.
15157 * sysdep.c (croak): Move decl from here to syssignal.h.
15158 * syssignal.h (croak): Put it here, so the API can be checked when
15159 'croak' is called from dissociate_if_controlling_tty.
15161 * minibuf.c: Make symbols static if they're not exported.
15162 (minibuf_save_list, choose_minibuf_frame): Now static.
15163 * lisp.h (choose_minibuf_frame): Remove decl.
15165 * lisp.h (verify_bytepos, count_markers): Mark as externally visible.
15167 * lread.c: Make symbols static if they're not exported.
15168 (read_objects, initial_obarray, oblookup_last_bucket_number):
15170 (make_symbol): Remove; unused.
15171 * lisp.h (initial_obarray, make_symbol): Remove decls.
15173 * keyboard.c: Make symbols static if they're not exported.
15174 (single_kboard, recent_keys_index, total_keys, recent_keys):
15175 (this_command_key_count_reset, raw_keybuf, raw_keybuf_count):
15176 (this_single_command_key_start, echoing, last_auto_save):
15177 (read_key_sequence_cmd, dribble, recursive_edit_unwind):
15178 (command_loop, echo_now, keyboard_init_hook, help_char_p):
15179 (quit_throw_to_read_char, command_loop_2, top_level_1, poll_timer):
15180 (Vlispy_mouse_stem, double_click_count):
15182 (force_auto_save_soon): Define only if SIGDANGER.
15183 (ignore_mouse_drag_p): Now static if
15184 !defined HAVE_WINDOW_SYSTEM || defined USE_GTK || defined HAVE_NS.
15185 (print_help): Remove; unused.
15186 (stop_character, last_timer_event): Mark as externally visible.
15187 * keyboard.h (ignore_mouse_drag_p): Declare only if
15188 defined HAVE_WINDOW_SYSTEM && !defined USE_GTK && !defined HAVE_NS.
15189 (echo_now, help_char_p, quit_throw_to_read_char): Remove decls.
15190 * lisp.h (echoing): Remove decl.
15191 (force_auto_save_soon): Declare only if SIGDANGER.
15192 * xdisp.c (redisplay_window): Simplify code, to make it more
15193 obvious that ignore_mouse_drag_p is not accessed if !defined
15194 USE_GTK && !defined HAVE_NS.
15196 * intervals.c: Make symbols static if they're not exported.
15197 (merge_properties_sticky, merge_interval_right, delete_interval):
15199 * intervals.h (merge_interval_right, delete_interval): Remove decls.
15201 * insdel.c: Make symbols static if they're not exported.
15202 However, leave prepare_to_modify_buffer alone. It's never
15203 called from outside this function, but that appears to be a bug.
15204 (combine_after_change_list, combine_after_change_buffer):
15205 (adjust_after_replace, signal_before_change): Now static.
15206 (adjust_after_replace_noundo): Remove; unused.
15207 * lisp.h (adjust_after_replace, adjust_after_replace_noundo):
15208 (signal_before_change): Remove decls.
15210 * indent.c (val_compute_motion, val_vmotion): Now static.
15212 * image.c: Make symbols static if they're not exported.
15213 * dispextern.h (x_create_bitmap_from_xpm_data): Do not declare
15215 * image.c (x_create_bitmap_from_xpm_data): Do not define if USE_GTK.
15216 (xpm_color_cache, ct_table, ct_colors_allocated): Now static.
15218 * fringe.c (standard_bitmaps): Now static.
15219 (max_used_fringe_bitmap): Now static, unless HAVE_NS.
15221 * frame.c: Make symbols static if they're not exported.
15222 (x_report_frame_params, make_terminal_frame): Now static.
15223 (get_frame_param): Now static, unless HAVE_NS.
15224 (x_fullscreen_adjust): Define if WINDOWSNT, not if HAVE_WINDOW_SYSTEM.
15225 (x_get_resource_string): Remove; not used.
15226 * frame.h (make_terminal_frame, x_report_frame_params):
15227 (x_get_resource_string); Remove decls.
15228 (x_fullscreen_adjust): Declare only if WINDOWSNT.
15229 * lisp.h (get_frame_param): Declare only if HAVE_NS.
15231 * font.c, fontset.c: Make symbols static if they're not exported.
15232 * dispextern.h (FACE_SUITABLE_FOR_ASCII_CHAR_P): New macro.
15233 (FACE_SUITABLE_FOR_CHAR_P): Use it.
15234 * font.c (font_close_object): Now static.
15235 * font.h (font_close_object): Remove.
15236 * fontset.c (FONTSET_OBJLIST): Remove.
15237 (free_realized_fontset) #if-0 the body, which does nothing.
15238 (face_suitable_for_char_p): #if-0, as it's never called.
15239 * fontset.h (face_suitable_for_char_p): Remove decl.
15240 * xfaces.c (face_at_string_position):
15241 Use FACE_SUITABLE_FOR_ASCII_CHAR_P, not FACE_SUITABLE_FOR_CHAR_P,
15242 since 0 is always ASCII.
15244 * fns.c (weak_hash_tables): Now static.
15246 * fileio.c: Make symbols static if they're not exported.
15247 (auto_saving, auto_save_mode_bits, auto_save_error_occurred):
15248 (Vwrite_region_annotation_buffers): Now static.
15250 * eval.c: Make symbols static if they're not exported.
15251 (backtrace_list, lisp_eval_depth, when_entered_debugger): Now static.
15252 * lisp.h (backtrace_list): Remove decl.
15254 * emacs.c: Make symbols static if they're not exported.
15255 (malloc_state_ptr, malloc_using_checking, syms_of_emacs):
15256 (fatal_error_code, fatal_error_signal_hook, standard_args):
15258 (fatal_error_signal): Now static, unless FLOAT_CATCH_SIGKILL.
15259 (DEFINE_DUMMY_FUNCTION): Mark function as externally visible.
15260 (__CTOR_LIST__, __DTOR_LIST__): Now externally visible.
15261 * lisp.h (fatal_error_signal_hook): Remove decl.
15262 (fatal_error_signal): Declare only if FLOAT_CATCH_SIGKILL.
15264 * editfns.c: Move a (normally-unused) function to its only use.
15265 * editfns.c, lisp.h (get_operating_system_release): Remove.
15266 * process.c (init_process) [DARWIN_OS]: Do it inline, as it is not
15267 worth the hassle of breaking this out.
15269 * xterm.c: Make symbols static if they're not exported.
15270 (x_raise_frame, x_lower_frame, x_wm_set_window_state):
15271 (x_wm_set_icon_pixmap, x_initialize, XTread_socket_fake_io_error):
15272 (x_destroy_window, x_delete_display):
15274 (x_dispatch_event): Now static if ! (USE_MOTIF || USE_X_TOOLKIT).
15275 (x_mouse_leave): Remove; unused.
15276 * xterm.h (x_display_info_for_name, x_raise_frame, x_lower_frame):
15277 (x_destroy_window, x_wm_set_window_state, x_wm_set_icon_pixmap):
15278 (x_delete_display, x_initialize, x_set_border_pixel, x_screen_planes):
15280 (x_mouse_leave): Declare only if WINDOWSNT.
15281 (x_dispatch_event): Declare only if USE_MOTIF or USE_X_TOOLKIT.
15282 (xic_create_fontsetname): Declare only if HAVE_X_WINDOWS &&
15285 * ftxfont.c: Make symbols static if they're not exported.
15286 (ftxfont_driver): Export only if !defined HAVE_XFT && def8ined
15288 * font.h (ftxfont_driver): Likewise.
15290 * xfns.c: Make symbols static if they're not exported.
15291 (x_last_font_name, x_display_info_for_name):
15292 (x_set_foreground_color, x_set_background_color, x_set_mouse_color):
15293 (x_set_cursor_color, x_set_border_pixel, x_set_border_color):
15294 (x_set_cursor_type, x_set_icon_type, x_set_icon_name):
15295 (x_set_scroll_bar_foreground, x_set_scroll_bar_background):
15296 (x_explicitly_set_name, x_set_title, xic_defaut_fontset, tip_timer):
15297 (last_show_tip_args): Now static.
15298 (xic_defaut_fontset, xic_create_fontsetname): Define only if
15299 defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
15300 (x_screen_planes): Remove; unused.
15301 * dispextern.h (x_screen_planes): Remove decl.
15303 * dispnew.c: Make symbols static if they're not exported.
15304 * dispextern.h (redraw_garbaged_frames, scrolling):
15305 (increment_row_positions): Remove.
15306 * dispnew.c (new_glyph_matrix, increment_row_positions, scrolling):
15307 (delayed_size_change, glyph_matrix_count, glyph_pool_count):
15309 (redraw_garbaged_frames): Remove; unused.
15311 * xfaces.c: Make symbols static if they're not exported.
15312 * dispextern.h (ascii_face_of_lisp_face, free_realized_face):
15314 * xterm.h (defined_color): Remove decls.
15315 (x_free_dpy_colors): Declare only if USE_X_TOOLKIT.
15316 * xfaces.c (tty_suppress_bold_inverse_default_colors_p):
15317 (menu_face_changed_default, defined_color, free_realized_face):
15318 (x_free_dpy_colors): Define only if USE_X_TOOLKIT.
15319 (ascii_face_of_lisp_face): Remove; unused.
15321 * xdisp.c: Make symbols static if they're not exported.
15322 * dispextern.h (scratch_glyph_row, window_box_edges):
15323 (glyph_to_pixel_coords, set_cursor_from_row):
15324 (get_next_display_element, set_iterator_to_next):
15325 (highlight_trailing_whitespace, frame_to_window_pixel_xy):
15326 (show_mouse_face): Remove decls
15327 * frame.h (message_buf_print): Likewise.
15328 * lisp.h (pop_message, set_message, check_point_in_composition):
15330 * xterm.h (set_vertical_scroll_bar): Likewise.
15331 * xdisp.c (list_of_error, Vmessage_stack, line_number_displayed):
15332 (message_buf_print, scratch_glyph_row, displayed_buffer):
15333 (set_iterator_to_next, pop_message, set_message, set_cursor_from_row):
15334 (get_next_display_element, show_mouse_face, window_box_edges):
15335 (frame_to_window_pixel_xy, check_point_in_composition):
15336 (set_vertical_scroll_bar, highlight_trailing_whitespace): Now static.
15337 (glyph_to_pixel_coords): Remove; unused.
15339 * dired.c (file_name_completion): Now static.
15341 * dbusbind.c (xd_in_read_queued_messages): Now static.
15343 * lisp.h (circular_list_error, FOREACH): Remove; unused.
15344 * data.c (circular_list_error): Remove.
15346 * commands.h (last_point_position, last_point_position_buffer):
15347 (last_point_position_window): Remove decls.
15348 * keyboard.c: Make these variables static.
15350 * coding.h (coding, code_convert_region, encode_coding_gap):
15352 * coding.c (Vsjis_coding_system, Vbig5_coding_system):
15353 (iso_code_class, detect_coding, code_convert_region): Now static.
15354 (encode_coding_gap): Remove; unused.
15356 * chartab.c (chartab_chars, chartab_bits): Now static.
15358 * charset.h (charset_iso_8859_1): Remove decl.
15359 * charset.c (charset_iso_8859_1, charset_emacs, map_charset_for_dump):
15362 * ccl.h (check_ccl_update, Vccl_program_table): Remove decls.
15363 * ccl.c (Vccl_program_table): Now static.
15364 (check_ccl_update): Remove; unused.
15366 * category.c (SET_CATEGORY_SET, set_category_set): Move here.
15367 * category.h: ... from here.
15368 * category.c (check_category_table, set_category_set): Now static.
15370 * casetab.c (Vascii_upcase_table, Vascii_eqv_table): Now static.
15371 * lisp.h: Remove these decls.
15373 * buffer.c (buffer_count): Remove unused var.
15375 * bidi.c (bidi_dump_cached_states): Mark as externally visible,
15376 so that it's not optimized away.
15377 (bidi_ignore_explicit_marks_for_paragraph_level): Likewise.
15378 * dispextern.h (bidi_dump_cached_states): Remove, since it's
15379 exported only to the debugger.
15381 * atimer.c (alarm_signal_handler, run_all_atimers): Now static.
15382 * atimer.h (run_all_atimers): Remove; not exported.
15384 font.c: Make copy_font_spec and merge_font_spec ordinary C functions.
15385 * font.c (copy_font_spec): Rename from Fcopy_font_spec, since it
15386 was inaccessible from Lisp.
15387 (merge_font_spec): Likewise, renaming from Fmerge_font_spec.
15388 * font.c, font.h, fontset.c, xfaces.c, xfont.c: Change all uses.
15390 alloc.c: Import and export fewer symbols, and remove unused items.
15391 * lisp.h (suppress_checking, die): Declare only if ENABLE_CHECKING
15393 (suppress_checking): Add EXTERNALLY_VISIBLE attribute, so that
15394 it's not optimized away by whole-program optimization.
15395 (message_enable_multibyte, free_misc): Remove.
15396 (catchlist, handlerlist, mark_backtrace):
15397 Declare only if BYTE_MARK_STACK.
15398 (mark_byte_stack): Likewise, fixing a ifdef-vs-if typo.
15399 * alloc.c (pure): Export only if VIRT_ADDR_VARIES is defined.
15400 (message_enable_multibyte): Remove decl.
15401 (free_misc, interval_free_list, float_block, float_block_index):
15402 (n_float_blocks, float_free_list, cons_block, cons_block_index):
15403 (cons_free_list, last_marked_index):
15405 (suppress_checking, die): Define only if ENABLE_CHECKING is defined.
15406 * eval.c (catchlist, handlerlist): Export only if BYTE_MARK_STACK.
15407 (mark_backtrace): Define only if BYTE_MARK_STACK.
15408 * xdisp.c (message_enable_multibyte): Now static.
15410 Declare Lisp_Object Q* variables to be 'static' if not exported.
15411 This makes it easier for human readers (and static analyzers)
15412 to see whether these variables are used from other modules.
15413 * alloc.c, buffer.c, bytecode.c, callint.c, casetab.c, category.c:
15414 * ccl.c, character.c, charset.c, cmds.c, coding.c, composite.c:
15415 * data.c, dbusbind.c, dired.c, editfns.c, eval.c, fileio.c, fns.c:
15416 * font.c, frame.c, fringe.c, ftfont.c, image.c, keyboard.c, keymap.c:
15417 * lread.c, macros.c, minibuf.c, print.c, process.c, search.c:
15418 * sound.c, syntax.c, textprop.c, window.c, xdisp.c, xfaces.c, xfns.c:
15419 * xmenu.c, xselect.c:
15420 Declare Q* vars static if they are not used in other modules.
15421 * ccl.h, character.h, charset.h, coding.h, composite.h, font.h:
15422 * frame.h, intervals.h, keyboard.h, lisp.h, process.h, syntax.h:
15423 Remove decls of unexported vars.
15424 * keyboard.h (EVENT_HEAD_UNMODIFIED): Remove now-unused macro.
15426 * lisp.h (DEFINE_FUNC): Make sname 'static'.
15428 Make Emacs functions such as Fatom 'static' by default.
15429 This makes it easier for human readers (and static analyzers)
15430 to see whether these functions can be called from other modules.
15431 DEFUN now defines a static function. To make the function external
15432 so that it can be used in other C modules, use the new macro DEFUE.
15433 * lisp.h (Funibyte_char_to_multibyte, Fsyntax_table_p):
15434 (Finit_image_library):
15435 (Feval_region, Fbacktrace, Ffetch_bytecode, Fswitch_to_buffer):
15436 (Ffile_executable_p, Fmake_symbolic_link, Fcommand_execute):
15437 (Fget_process, Fdocumentation_property, Fbyte_code, Ffile_attributes):
15438 Remove decls, since these functions are now static.
15439 (Funintern, Fget_internal_run_time): New decls, since these functions
15440 were already external.
15442 * alloc.c, buffer.c, callint.c, callproc.c, casefiddle.c, casetab.c:
15443 * ccl.c, character.c, chartab.c, cmds.c, coding.c, data.c, dispnew.c:
15444 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, floatfns.c:
15445 * fns.c, font.c, fontset.c, frame.c, image.c, indent.c:
15446 * keyboard.c, keymap.c, lread.c:
15447 * macros.c, marker.c, menu.c, minibuf.c, print.c, process.c, search.c:
15448 * syntax.c, term.c, terminal.c, textprop.c, undo.c:
15449 * window.c, xdisp.c, xfaces.c, xfns.c, xmenu.c, xsettings.c:
15450 Mark functions with DEFUE instead of DEFUN,
15451 if they are used in other modules.
15452 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): New forward
15453 decls for now-static functions.
15454 * buffer.h (Fdelete_overlay): Remove decl.
15455 * callproc.c (Fgetenv_internal): Mark as internal.
15456 * composite.c (Fremove_list_of_text_properties): Remove decl.
15457 (Fcomposition_get_gstring): New forward static decl.
15458 * composite.h (Fcomposite_get_gstring): Remove decl.
15459 * dired.c (Ffile_attributes): New forward static decl.
15460 * doc.c (Fdocumntation_property): New forward static decl.
15461 * eval.c (Ffetch_bytecode): New forward static decl.
15462 (Funintern): Remove extern decl; now in .h file where it belongs.
15463 * fileio.c (Fmake_symbolic_link): New forward static decl.
15464 * image.c (Finit_image_library): New forward static decl.
15465 * insdel.c (Fcombine_after_change_execute): Make forward decl static.
15466 * intervals.h (Fprevious_property_change):
15467 (Fremove_list_of_text_properties): Remove decls.
15468 * keyboard.c (Fthis_command_keys): Remove decl.
15469 (Fcommand_execute): New forward static decl.
15470 * keymap.c (Flookup_key): New forward static decl.
15471 (Fcopy_keymap): Now static.
15472 * keymap.h (Flookup_key): Remove decl.
15473 * process.c (Fget_process): New forward static decl.
15474 (Fprocess_datagram_address): Mark as internal.
15475 * syntax.c (Fsyntax_table_p): New forward static decl.
15476 (skip_chars): Remove duplicate decl.
15477 * textprop.c (Fprevious_property_change): New forward static decl.
15478 * window.c (Fset_window_fringes, Fset_window_scroll_bars):
15480 (Fset_window_margins, Fset_window_vscroll): New forward static decls.
15481 * window.h (Fset_window_vscroll, Fset_window_margins): Remove decls.
15483 * editfns.c (Fformat): Remove unreachable code.
15485 2011-04-14 Andreas Schwab <schwab@linux-m68k.org>
15487 * fileio.c (Finsert_file_contents): Fix typo in 2005-05-13
15490 2011-04-13 Eli Zaretskii <eliz@gnu.org>
15492 * xdisp.c (handle_invisible_prop): Don't call bidi_paragraph_init
15493 when at ZV. (Bug#8487)
15495 2011-04-12 Andreas Schwab <schwab@linux-m68k.org>
15497 * charset.c (Fclear_charset_maps): Use xfree instead of free.
15499 * keyboard.c (parse_tool_bar_item): Likewise.
15500 * sound.c (sound_cleanup, alsa_close): Likewise.
15501 * termcap.c (tgetent): Likewise.
15502 * xfns.c (x_default_font_parameter): Likewise.
15503 * xsettings.c (read_and_apply_settings): Likewise.
15505 * alloc.c (overrun_check_malloc, overrun_check_realloc)
15506 (overrun_check_free): Protoize.
15508 2011-04-12 Paul Eggert <eggert@cs.ucla.edu>
15510 * sysdep.c (emacs_read, emacs_write): Check for negative sizes
15511 since callers should never pass a negative size.
15512 Change the signature to match that of plain 'read' and 'write'; see
15513 <http://lists.gnu.org/archive/html/emacs-devel/2011-04/msg00397.html>.
15514 * lisp.h: Update prototypes of emacs_write and emacs_read.
15516 2011-04-11 Eli Zaretskii <eliz@gnu.org>
15518 * xdisp.c (redisplay_window): Don't try to determine the character
15519 position of the scroll margin if the window start point w->startp
15520 is outside the buffer's accessible region. (Bug#8468)
15522 2011-04-10 Eli Zaretskii <eliz@gnu.org>
15524 Fix write-region and its subroutines for buffers > 2GB.
15525 * fileio.c (a_write, e_write): Modify declaration of arguments and
15526 local variables to support buffers larger than 2GB.
15527 (Fcopy_file): Use EMACS_INT for return value of emacs_read.
15529 * sysdep.c (emacs_write, emacs_read): Use ssize_t for last
15530 argument, local variables, and return value.
15532 * lisp.h: Update prototypes of emacs_write and emacs_read.
15534 * sound.c (vox_write): Use ssize_t for return value of emacs_write.
15536 2011-04-10 Paul Eggert <eggert@cs.ucla.edu>
15538 * xdisp.c (vmessage): Use memchr, not strnlen, which some hosts lack.
15540 Fix more problems found by GCC 4.6.0's static checks.
15542 * xdisp.c (vmessage): Use a better test for character truncation.
15544 * charset.c (load_charset_map): <, not <=, for optimization,
15545 and to avoid potential problems with integer overflow.
15546 * chartab.c (sub_char_table_set_range, char_table_set_range): Likewise.
15547 * casetab.c (set_identity, shuffle): Likewise.
15548 * editfns.c (Fformat): Likewise.
15549 * syntax.c (skip_chars): Likewise.
15551 * xmenu.c (set_frame_menubar): Allocate smaller local vectors.
15552 This also lets GCC 4.6.0 generate slightly better loop code.
15554 * callint.c (Fcall_interactively): <, not <=, for optimization.
15555 (Fcall_interactively): Count the number of arguments produced,
15556 not the number of arguments given. This is simpler and lets GCC
15557 4.6.0 generate slightly better code.
15559 * ftfont.c: Distingish more carefully between FcChar8 and char.
15560 The previous code passed unsigned char * to a functions like
15561 strlen and xstrcasecmp that expect char *, which does not
15562 conform to the C standard.
15563 (get_adstyle_property, ftfont_pattern_entity): Use FcChar8 for
15564 arguments to FcPatternGetString, and explicitly cast FcChar8 * to
15565 char * when the C standard requires it.
15567 * keyboard.c (read_char): Remove unused var.
15569 * eval.c: Port to Windows vsnprintf (Bug#8435).
15570 Include <limits.h>.
15571 (SIZE_MAX): Define if the headers do not.
15572 (verror): Do not give up if vsnprintf returns a negative count.
15573 Instead, grow the buffer. This ports to Windows vsnprintf, which
15574 does not conform to C99. Problem reported by Eli Zaretskii.
15575 Also, simplify the allocation scheme, by avoiding the need for
15576 calling realloc, and removing the ALLOCATED variable.
15578 * eval.c (verror): Initial buffer size is 4000 (not 200) bytes.
15580 Remove invocations of doprnt, as Emacs now uses vsnprintf.
15581 But keep the doprint source code for now, as we might revamp it
15582 and use it again (Bug#8435).
15583 * lisp.h (doprnt): Remove.
15584 * Makefile.in (base_obj): Remove doprnt.o.
15585 * deps.mk (doprnt.o): Remove.
15587 error: Print 32- and 64-bit integers portably (Bug#8435).
15588 Without this change, on typical 64-bit hosts error ("...%d...", N)
15589 was used to print both 32- and 64-bit integers N, which relied on
15590 undefined behavior.
15591 * lisp.h, m/amdx86-64.h, m/ia64.h, m/ibms390x.h (pEd): New macro.
15592 * lisp.h (error, verror): Mark as printf-like functions.
15593 * eval.c (verror): Use vsnprintf, not doprnt, to do the real work.
15594 Report overflow in size calculations when allocating printf buffer.
15595 Do not truncate output string at its first null byte.
15596 * xdisp.c (vmessage): Use vsnprintf, not doprnt, to do the real work.
15597 Truncate the output at a character boundary, since vsnprintf does not
15599 * charset.c (check_iso_charset_parameter): Convert internal
15600 character to string before calling 'error', since %c now has the
15602 * coding.c (Fdecode_sjis_char, Fdecode_big5_char): Avoid int
15603 overflow when computing char to be passed to 'error'. Do not
15604 pass Lisp_Object to 'error'; pass the integer instead.
15605 * nsfns.m (Fns_do_applescript): Use int, not long, since it's
15606 formatted with plain %d.
15608 * eval.c (internal_lisp_condition_case): Don't pass spurious arg.
15610 * keyboard.c (access_keymap_keyremap): Print func name, not garbage.
15612 * coding.c (Fdecode_sjis_char): Don't assume CODE fits in int.
15614 * xterm.c (x_catch_errors): Remove duplicate declaration.
15616 * term.c (maybe_fatal): Mark its 3rd arg as a printf format, too.
15618 * xdisp.c, lisp.h (message_nolog): Remove; unused.
15620 2011-04-10 Jim Meyering <meyering@redhat.com>
15622 use ssize_t and size_t for read- and write-like emacs_gnutls_* functions
15623 * gnutls.c (emacs_gnutls_read): Adjust signature to be more read-like:
15624 return ssize_t not "int", and use size_t as the buffer length.
15625 (emacs_gnutls_write): Likewise, and make the buffer pointer "const".
15626 * gnutls.h: Update declarations.
15627 * process.c (read_process_output): Use ssize_t, to match.
15628 (send_process): Likewise.
15630 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
15632 * image.c (Fimagemagick_types): Doc fix, and comment cleanup.
15634 2011-04-09 Chong Yidong <cyd@stupidchicken.com>
15636 * ftfont.c (get_adstyle_property, ftfont_pattern_entity):
15637 Use unsigned char, to match FcChar8 type definition.
15639 * xterm.c (handle_one_xevent):
15640 * xmenu.c (create_and_show_popup_menu):
15641 * xselect.c (x_decline_selection_request)
15642 (x_reply_selection_request): Avoid type-punned deref of X events.
15644 2011-04-09 Eli Zaretskii <eliz@gnu.org>
15646 Fix some uses of `int' instead of EMACS_INT.
15647 * search.c (string_match_1, fast_string_match)
15648 (fast_c_string_match_ignore_case, fast_string_match_ignore_case)
15649 (scan_buffer, find_next_newline_no_quit)
15650 (find_before_next_newline, search_command, Freplace_match)
15651 (Fmatch_data): Make some `int' variables be EMACS_INT.
15653 * xdisp.c (display_count_lines): 3rd argument and return value now
15654 EMACS_INT. All callers changed.
15655 (pint2hrstr): Last argument is now EMACS_INT.
15657 * coding.c (detect_coding_utf_8, detect_coding_emacs_mule)
15658 (detect_coding_iso_2022, detect_coding_sjis, detect_coding_big5)
15659 (detect_coding_ccl, detect_coding_charset, decode_coding_utf_8)
15660 (decode_coding_utf_16, decode_coding_emacs_mule)
15661 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5)
15662 (decode_coding_ccl, decode_coding_charset)
15663 <consumed_chars, consumed_chars_base>: Declare EMACS_INT.
15664 (decode_coding_iso_2022, decode_coding_emacs_mule)
15665 (decode_coding_sjis, decode_coding_big5, decode_coding_charset)
15666 <char_offset, last_offset>: Declare EMACS_INT.
15667 (encode_coding_utf_8, encode_coding_utf_16)
15668 (encode_coding_emacs_mule, encode_invocation_designation)
15669 (encode_designation_at_bol, encode_coding_iso_2022)
15670 (encode_coding_sjis, encode_coding_big5, encode_coding_ccl)
15671 (encode_coding_raw_text, encode_coding_charset) <produced_chars>:
15673 (ASSURE_DESTINATION): Declare more_bytes EMACS_INT.
15674 (encode_invocation_designation): Last argument P_NCHARS is now
15676 (decode_eol): Declare pos_byte, pos, and pos_end EMACS_INT.
15677 (produce_chars): from_nchars and to_nchars are now EMACS_INT.
15679 * coding.h (struct coding_system) <head_ascii>: Declare EMACS_INT.
15682 * ccl.c (Fccl_execute_on_string): Declare some variables
15685 2011-04-08 Samuel Thibault <sthibault@debian.org> (tiny change)
15687 * term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
15689 2011-03-19 Christoph Scholtes <cschol2112@googlemail.com>
15691 * process.c (Fformat_network_address): Doc fix.
15693 2011-04-08 T.V. Raman <tv.raman.tv@gmail.com> (tiny change)
15695 * xml.c (parse_region): Avoid creating spurious whitespace nodes.
15697 2011-04-08 Chong Yidong <cyd@stupidchicken.com>
15699 * keyboard.c (read_char): Call Lisp function help-form-show,
15700 instead of using internal_with_output_to_temp_buffer.
15701 (Qhelp_form_show): New var.
15702 (syms_of_keyboard): Use DEFSYM macro.
15704 * print.c (internal_with_output_to_temp_buffer): Function deleted.
15706 * lisp.h (internal_with_output_to_temp_buffer): Remove prototype.
15708 2011-04-06 Chong Yidong <cyd@stupidchicken.com>
15710 * process.c (Flist_processes): Remove to Lisp.
15711 (list_processes_1): Delete.
15713 2011-04-06 Eli Zaretskii <eliz@gnu.org>
15715 * msdos.c (careadlinkat, careadlinkatcwd): MS-DOS replacements.
15717 * w32.c (careadlinkat, careadlinkatcwd): New always-fail stubs.
15719 2011-04-06 Paul Eggert <eggert@cs.ucla.edu>
15721 Fix more problems found by GCC 4.6.0's static checks.
15723 * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats.
15725 * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats.
15727 * lisp.h (message, message_nolog, fatal): Mark as printf-like.
15729 * xdisp.c (vmessage): Mark as a printf-like function.
15731 * term.c (vfatal, maybe_fatal): Mark as printf-like functions.
15733 * sound.c (sound_warning): Don't crash if arg contains a printf format.
15735 * image.c (tiff_error_handler, tiff_warning_handler): Mark as
15736 printf-like functions.
15737 (tiff_load): Add casts to remove these marks before passing them
15738 to system-supplied API.
15740 * eval.c (Fsignal): Remove excess argument to 'fatal'.
15742 * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int.
15743 This avoids several warnings with gcc -Wstrict-overflow.
15744 (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code
15745 directly, rather than having caller test rule sign. This avoids
15746 some unnecessary tests.
15747 * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro.
15748 (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This
15749 affects only one use, in DECODE_COMPOSITION_RULE, which is changed.
15751 * xfont.c (xfont_text_extents): Remove var that was set but not used.
15752 (xfont_open): Avoid unnecessary tests.
15754 * composite.c (composition_gstring_put_cache): Use unsigned integer.
15756 * composite.h, composite.c (composition_gstring_put_cache):
15757 Use EMACS_INT, not int, for length.
15759 * composite.h (COMPOSITION_DECODE_REFS): New macro,
15760 breaking out part of COMPOSITION_DECODE_RULE.
15761 (COMPOSITION_DECODE_RULE): Use it.
15762 * composite.c (get_composition_id): Remove unused local vars,
15763 by using the new macro.
15765 * textprop.c (set_text_properties_1): Change while to do-while,
15766 since the condition is always true at first.
15768 * intervals.c (graft_intervals_into_buffer): Mark var as used.
15769 (interval_deletion_adjustment): Return unsigned value.
15772 * process.c (list_processes_1, create_pty, read_process_output):
15773 (exec_sentinel): Remove vars that were set but not used.
15774 (create_pty): Remove unnecessary "volatile"s.
15775 (Fnetwork_interface_info): Avoid possibility of int overflow.
15776 (read_process_output): Do adaptive read buffering even if carryover.
15777 (read_process_output): Simplify nbytes computation if buffered.
15779 * bytecode.c (exec_byte_code): Rename local to avoid shadowing.
15781 * syntax.c (scan_words): Remove var that was set but not used.
15782 (update_syntax_table): Use unsigned instead of int.
15784 * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs.
15785 (lisp_file_lexically_bound_p, read1): Use unsigned instead of int.
15786 (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop.
15788 * print.c (print_error_message): Avoid int overflow.
15790 * font.c (font_list_entities): Redo for clarity,
15791 so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
15793 * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
15794 (font_score): Avoid potential overflow in diff calculation.
15796 * fns.c (substring_both): Remove var that is set but not used.
15797 (sxhash): Redo loop for clarity and to avoid wraparound warning.
15799 * eval.c (funcall_lambda): Rename local to avoid shadowing.
15801 * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int.
15802 Otherwise, GCC 4.6.0 optimizes the loop check away since the check
15803 can always succeed if overflow has undefined behavior.
15805 * search.c (boyer_moore, wordify): Remove vars set but not used.
15806 (wordify): Omit three unnecessary tests.
15808 * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column.
15809 All callers changed. This avoids the need for an unused var.
15811 * casefiddle.c (casify_region): Remove var that is set but not used.
15813 * dired.c (file_name_completion): Remove var that is set but not used.
15815 * fileio.c (Finsert_file_contents): Make EOF condition clearer.
15817 * fileio.c (Finsert_file_contents): Avoid signed integer overflow.
15818 (Finsert_file_contents): Remove unnecessary code checking fd.
15820 * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes.
15821 Check for integer overflow on size calculations.
15823 * buffer.c (Fprevious_overlay_change): Remove var that is set
15826 * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt):
15827 Remove vars that are set but not used.
15828 (timer_check_2): Don't assume timer-list and idle-timer-list are lists.
15829 (timer_check_2): Mark vars as initialized.
15831 * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized.
15833 * image.c (lookup_image): Remove var that is set but not used.
15834 (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable.
15836 * fontset.c (Finternal_char_font, Ffontset_info): Remove vars
15837 that are set but not used.
15839 * xfns.c (make_invisible_cursor): Don't return garbage
15840 if XCreateBitmapFromData fails (Bug#8410).
15842 * xselect.c (x_get_local_selection, x_handle_property_notify):
15843 Remove vars that are set but not used.
15845 * xfns.c (x_create_tip_frame): Remove var that is set but not used.
15846 (make_invisible_cursor): Initialize a possibly-uninitialized variable.
15848 * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]:
15849 Remove var that is set but not used.
15850 (scroll_bar_windows_size): Now size_t, not int.
15851 (x_send_scroll_bar_event): Use size_t, not int, for sizes.
15852 Check for overflow.
15854 * xfaces.c (realize_named_face): Remove vars that are set but not used.
15855 (map_tty_color) [!defined MSDOS]: Likewise.
15857 * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning.
15859 * coding.c: Remove vars that are set but not used.
15860 (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused.
15861 All callers changed.
15862 (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule):
15863 (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5):
15864 (decode_coding_charset): Remove vars that are set but not used.
15866 * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var
15867 that is set but not used.
15869 * print.c (print_object): Remove var that is set but not used.
15871 Replace 2 copies of readlink code with 1 gnulib version (Bug#8401).
15872 The gnulib version avoids calling malloc in the usual case,
15873 and on 64-bit hosts doesn't have some arbitrary 32-bit limits.
15874 * fileio.c (Ffile_symlink_p): Use emacs_readlink.
15875 * filelock.c (current_lock_owner): Likewise.
15876 * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function.
15877 * sysdep.c: Include allocator.h, careadlinkat.h.
15878 (emacs_no_realloc_allocator): New static constant.
15879 (emacs_readlink): New function.
15880 * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on
15881 ../lib/careadlinkat.h.
15883 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca>
15885 * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the
15886 first non-nil return value).
15888 2011-04-03 Jan Djärv <jan.h.d@swipnet.se>
15890 * nsterm.m (ns_update_auto_hide_menu_bar): Define MAC_OS_X_VERSION_10_6
15891 if not defined (Bug#8403).
15893 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
15895 * xdisp.c (display_count_lines): Remove parameter `start',
15896 unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
15897 (get_char_face_and_encoding): Remove parameter `multibyte_p',
15898 unused since 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
15899 (fill_stretch_glyph_string): Remove parameters `row' and `area',
15900 unused at least since Kim's GUI unification at 2003-03-16T20:45:46Z!storm@cua.dk
15901 and thereabouts. All callers changed.
15902 (get_per_char_metric): Remove parameter `f', unused since
15903 2008-05-14T01:40:23Z!handa@m17n.org. All callers changed.
15905 2011-04-02 Jim Meyering <meyering@redhat.com>
15907 do not dereference NULL upon failed strdup
15908 * nsfont.m (ns_descriptor_to_entity): Use xstrdup, not strdup.
15909 (ns_get_family): Likewise.
15911 2011-04-02 Juanma Barranquero <lekktu@gmail.com>
15913 * eval.c (unwind_to_catch) [DEBUG_GCPRO]: Remove redundant assignment.
15915 2011-04-02 Jan Djärv <jan.h.d@swipnet.se>
15917 * nsterm.m (ns_update_auto_hide_menu_bar): Only for OSX 10.6 or
15920 2011-04-01 Stefan Monnier <monnier@iro.umontreal.ca>
15922 Add lexical binding.
15924 * window.c (Ftemp_output_buffer_show): New fun.
15925 (Fsave_window_excursion):
15926 * print.c (Fwith_output_to_temp_buffer): Move to subr.el.
15928 * lread.c (lisp_file_lexically_bound_p): New function.
15929 (Fload): Bind Qlexical_binding.
15930 (readevalloop): Remove `evalfun' arg.
15931 Bind Qinternal_interpreter_environment.
15932 (Feval_buffer): Bind Qlexical_binding.
15933 (defvar_int, defvar_bool, defvar_lisp_nopro, defvar_kboard):
15935 (syms_of_lread): Declare `lexical-binding'.
15937 * lisp.h (struct Lisp_Symbol): New field `declared_special'.
15939 * keyboard.c (eval_dyn): New fun.
15940 (menu_item_eval_property): Use it.
15942 * image.c (parse_image_spec): Use Ffunctionp.
15944 * fns.c (concat, mapcar1): Accept byte-code-functions.
15946 * eval.c (Fsetq): Handle lexical vars.
15947 (Fdefun, Fdefmacro, Ffunction): Make closures when needed.
15948 (Fdefconst, Fdefvaralias, Fdefvar): Mark as dynamic.
15949 (FletX, Flet): Obey lexical binding.
15950 (Fcommandp): Handle closures.
15951 (Feval): New `lexical' arg.
15952 (eval_sub): New function extracted from Feval. Use it almost
15953 everywhere where Feval was used. Look up vars in lexical env.
15955 (Ffunctionp): Move from subr.el.
15956 (Ffuncall): Handle closures.
15957 (apply_lambda): Remove `eval_flags'.
15958 (funcall_lambda): Handle closures and new byte-code-functions.
15959 (Fspecial_variable_p): New function.
15960 (syms_of_eval): Initialize the Vinternal_interpreter_environment var,
15961 but without exporting it to Lisp.
15963 * doc.c (Fdocumentation, store_function_docstring):
15964 * data.c (Finteractive_form): Handle closures.
15966 * callint.c (Fcall_interactively): Preserve lexical-binding mode for
15969 * bytecode.c (Bstack_ref, Bstack_set, Bstack_set2, BdiscardN):
15971 (exec_byte_code): New function extracted from Fbyte_code to handle new
15972 calling convention for byte-code-functions. Add new byte-codes.
15974 * buffer.c (defvar_per_buffer): Set new `declared_special' field.
15976 * alloc.c (Fmake_symbol): Init new `declared_special' field.
15978 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
15980 * xdisp.c (redisplay_internal): Fix prototype.
15982 2011-03-31 Eli Zaretskii <eliz@gnu.org>
15984 * xdisp.c (SCROLL_LIMIT): New macro.
15985 (try_scrolling): Use it when setting scroll_limit.
15986 Limit scrolling to 100 screen lines.
15987 (redisplay_window): Even when falling back on "recentering",
15988 position point in the window according to scroll-conservatively,
15989 scroll-margin, and scroll-*-aggressively variables. (Bug#6671)
15991 (try_scrolling): When point is above the window, allow searching
15992 as far as scroll_max, or one screenful, to compute vertical
15993 distance from PT to the scroll margin position. This prevents
15994 try_scrolling from unnecessarily failing when
15995 scroll-conservatively is set to a value slightly larger than the
15996 window height. Clean up the case of PT below the margin at bottom
15997 of window: scroll_max can no longer be INT_MAX. When aggressive
15998 scrolling is in use, don't let point enter the opposite scroll
15999 margin as result of the scroll.
16000 (syms_of_xdisp) <scroll-conservatively>: Document the
16001 threshold of 100 lines for never-recentering scrolling.
16003 2011-03-31 Juanma Barranquero <lekktu@gmail.com>
16005 * dispextern.h (move_it_by_lines):
16006 * xdisp.c (move_it_by_lines): Remove parameter `need_y_p', unused
16007 since 2000-12-29T14:24:09Z!gerd@gnu.org. All callers changed.
16008 (message_log_check_duplicate): Remove parameters `prev_bol' and
16009 `this_bol', unused since 1998-01-01T02:27:27Z!rms@gnu.org. All callers changed.
16010 (redisplay_internal): Remove parameter `preserve_echo_area',
16011 unused since 1999-07-21T21:43:52Z!gerd@gnu.org. All callers changed.
16013 * indent.c (Fvertical_motion):
16014 * window.c (window_scroll_pixel_based, Frecenter):
16015 Don't pass `need_y_p' to `move_it_by_lines'.
16017 2011-03-30 Stefan Monnier <monnier@iro.umontreal.ca>
16019 * eval.c (struct backtrace): Don't cheat with negative numbers, but do
16020 steal a few bits to be more compact.
16021 (interactive_p, Fbacktrace, Fbacktrace_frame, mark_backtrace):
16022 Remove unneeded casts.
16024 * bytecode.c (Fbyte_code): CAR and CDR can GC.
16026 2011-03-30 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
16028 * keyboard.c (Fexecute_extended_command): Do log the "suggest key
16029 binding" message (bug#7967).
16031 2011-03-30 Paul Eggert <eggert@cs.ucla.edu>
16033 Fix more problems found by GCC 4.6.0's static checks.
16035 * unexelf.c (unexec) [! (defined _SYSTYPE_SYSV || defined __sgi)]:
16036 Remove unused local var.
16038 * editfns.c (Fmessage_box): Remove unused local var.
16040 * xdisp.c (try_window_reusing_current_matrix, x_produce_glyphs):
16041 (note_mode_line_or_margin_highlight, note_mouse_highlight):
16042 Omit unused local vars.
16043 * window.c (shrink_windows): Omit unused local var.
16044 * menu.c (digest_single_submenu): Omit unused local var.
16045 * dispnew.c (update_window) [PERIODIC_PREEMPTION_CHECKING]:
16046 Omit unused local var.
16048 * keyboard.c (parse_modifiers_uncached, parse_modifiers):
16049 Don't assume string length fits in int.
16050 (keyremap_step, read_key_sequence): Use size_t for sizes.
16051 (read_key_sequence): Don't check last_real_key_start redundantly.
16053 * callproc.c (Fcall_process, Fcall_process_region): Use SAFE_ALLOCA
16054 instead of alloca (Bug#8344).
16056 * eval.c (Fbacktrace): Don't assume nargs fits in int.
16057 (Fbacktrace_frame): Don't assume nframes fits in int.
16059 * syntax.c (scan_sexps_forward): Avoid pointer wraparound.
16061 * xterm.c (x_make_frame_visible, same_x_server): Redo to avoid overflow
16064 * term.c (produce_glyphless_glyph): Remove unnecessary test.
16066 * cm.c (calccost): Turn while-do into do-while, for clarity.
16068 * keyboard.c (syms_of_keyboard): Use the same style as later
16069 in this function when indexing through an array. This also
16070 works around GCC bug 48267.
16072 * image.c (tiff_load): Fix off-by-one image count (Bug#8336).
16074 * xselect.c (x_check_property_data): Return correct size (Bug#8335).
16076 * chartab.c (sub_char_table_ref_and_range): Redo for slight
16077 efficiency gain, and to bypass a gcc -Wstrict-overflow warning.
16079 * keyboard.c, keyboard.h (num_input_events): Now size_t.
16080 This avoids undefined behavior on integer overflow, and is a bit
16081 more convenient anyway since it is compared to a size_t variable.
16083 Variadic C functions now count arguments with size_t, not int.
16084 This avoids an unnecessary limitation on 64-bit machines, which
16085 caused (substring ...) to crash on large vectors (Bug#8344).
16086 * lisp.h (struct Lisp_Subr.function.aMANY): Now takes size_t, not int.
16087 (DEFUN_ARGS_MANY, internal_condition_case_n, safe_call): Likewise.
16088 All variadic functions and their callers changed accordingly.
16089 (struct gcpro.nvars): Now size_t, not int. All uses changed.
16090 * data.c (arith_driver, float_arith_driver): Likewise.
16091 * editfns.c (general_insert_function): Likewise.
16092 * eval.c (struct backtrace.nargs, interactive_p)
16093 (internal_condition_case_n, run_hook_with_args, apply_lambda)
16094 (funcall_lambda, mark_backtrace): Likewise.
16095 * fns.c (concat): Likewise.
16096 * frame.c (x_set_frame_parameters): Likewise.
16097 * fns.c (get_key_arg): Now accepts and returns size_t, and returns
16098 0 if not found, not -1. All callers changed.
16100 * alloc.c (garbage_collect): Don't assume stack size fits in int.
16101 (stack_copy_size): Now size_t, not int.
16102 (stack_copy, stack_copy_size): Define only if MAX_SAVE_STACK > 0.
16104 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
16106 * coding.c (encode_designation_at_bol): Remove parameter `charbuf_end',
16107 unused since 2002-03-01T01:17:24Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
16108 All callers changed.
16110 * lisp.h (multibyte_char_to_unibyte):
16111 * character.c (multibyte_char_to_unibyte): Remove parameter `rev_tbl',
16112 unused since 2002-03-01T01:16:34Z!handa@m17n.org and 2008-02-01T16:01:31Z!miles@gnu.org.
16113 * character.h (CHAR_TO_BYTE8):
16114 * cmds.c (internal_self_insert):
16115 * editfns.c (general_insert_function):
16116 * keymap.c (push_key_description):
16117 * search.c (Freplace_match):
16118 * xdisp.c (message_dolog, set_message_1): All callers changed.
16120 2011-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
16122 * keyboard.c (safe_run_hook_funcall): New function.
16123 (safe_run_hooks_1, safe_run_hooks_error, safe_run_hooks): On error,
16124 don't set the hook to nil, but remove the offending function instead.
16125 (Qcommand_hook_internal): Remove, unused.
16126 (syms_of_keyboard): Don't initialize Qcommand_hook_internal nor define
16127 Vcommand_hook_internal.
16129 * eval.c (enum run_hooks_condition): Remove.
16130 (funcall_nil, funcall_not): New functions.
16131 (run_hook_with_args): Call each function through a `funcall' argument.
16132 Remove `cond' argument, now redundant.
16133 (Frun_hooks, Frun_hook_with_args, Frun_hook_with_args_until_success)
16134 (Frun_hook_with_args_until_failure): Adjust accordingly.
16135 (run_hook_wrapped_funcall, Frun_hook_wrapped): New functions.
16137 2011-03-28 Juanma Barranquero <lekktu@gmail.com>
16139 * dispextern.h (string_buffer_position): Remove declaration.
16141 * print.c (strout): Remove parameter `multibyte', unused since
16142 1999-08-21T19:30:21Z!gerd@gnu.org. All callers changed.
16144 * search.c (boyer_moore): Remove parameters `len', `pos' and `lim',
16145 never used since function introduction in 1998-02-08T21:33:56Z!rms@gnu.org.
16146 All callers changed.
16148 * w32.c (_wsa_errlist): Use braces for struct initializers.
16150 * xdisp.c (string_buffer_position_lim): Remove parameter `w',
16151 never used since function introduction in 2001-03-09T18:41:50Z!gerd@gnu.org.
16152 All callers changed.
16153 (string_buffer_position): Likewise. Also, make static (it's never
16154 used outside xdisp.c).
16155 (cursor_row_p): Remove parameter `w', unused since
16156 2000-10-17T16:08:57Z!gerd@gnu.org. All callers changed.
16157 (decode_mode_spec): Remove parameter `precision', introduced during
16158 Gerd Moellmann's rewrite at 1999-07-21T21:43:52Z!gerd@gnu.org, but never used.
16159 All callers changed.
16161 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
16163 * nsterm.m (syms_of_nsterm): Use doc: for ns-auto-hide-menu-bar.
16165 2011-03-27 Anders Lindgren <andlind@gmail.com>
16167 * nsterm.m (ns_menu_bar_is_hidden): New variable.
16168 (ns_constrain_all_frames, ns_menu_bar_should_be_hidden)
16169 (ns_update_auto_hide_menu_bar): New functions.
16170 (ns_update_begin): Call ns_update_auto_hide_menu_bar.
16171 (applicationDidBecomeActive): Call ns_update_auto_hide_menu_bar and
16172 ns_constrain_all_frames.
16173 (constrainFrameRect): Return at once if ns_menu_bar_should_be_hidden.
16174 (syms_of_nsterm): DEFVAR ns-auto-hide-menu-bar, init to Qnil.
16176 2011-03-27 Jan Djärv <jan.h.d@swipnet.se>
16178 * nsmenu.m (runDialogAt): Remove argument to timer_check.
16180 2011-03-27 Glenn Morris <rgm@gnu.org>
16182 * syssignal.h: Replace RETSIGTYPE with void.
16183 * atimer.c, data.c, dispnew.c, emacs.c, floatfns.c, keyboard.c:
16184 * keyboard.h, lisp.h, process.c, sysdep.c, xterm.c:
16185 Replace SIGTYPE with void everywhere.
16186 * s/usg5-4-common.h (SIGTYPE): Remove definition.
16187 * s/template.h (SIGTYPE): Remove commented out definition.
16189 2011-03-26 Eli Zaretskii <eliz@gnu.org>
16191 * xdisp.c (redisplay_window): Don't check buffer's clip_changed
16192 flag as a prerequisite for invoking try_scrolling. (Bug#6671)
16194 2011-03-26 Juanma Barranquero <lekktu@gmail.com>
16196 * w32.c (read_unc_volume): Use parameter `henum', instead of
16197 global variable `wget_enum_handle'.
16199 * keymap.c (describe_vector): Remove parameters `indices' and
16200 `char_table_depth', unused since 2002-03-01T01:43:26Z!handa@m17n.org.
16201 (describe_map, Fdescribe_vector): Adjust calls to `describe_vector'.
16203 * keyboard.h (timer_check, show_help_echo): Remove unused parameters.
16205 * keyboard.c (timer_check): Remove parameter `do_it_now',
16206 unused since 1996-04-12T06:01:29Z!rms@gnu.org.
16207 (show_help_echo): Remove parameter `ok_to_overwrite_keystroke_echo',
16208 unused since 2008-04-19T19:30:53Z!monnier@iro.umontreal.ca.
16210 * keyboard.c (read_char):
16211 * w32menu.c (w32_menu_display_help):
16212 * xmenu.c (show_help_event, menu_help_callback):
16213 Adjust calls to `show_help_echo'.
16215 * gtkutil.c (xg_maybe_add_timer):
16216 * keyboard.c (readable_events):
16217 * process.c (wait_reading_process_output):
16218 * xmenu.c (x_menu_wait_for_event): Adjust calls to `timer_check'.
16220 * insdel.c (adjust_markers_gap_motion):
16221 Remove; no-op since 1998-01-02T21:29:48Z!rms@gnu.org.
16222 (gap_left, gap_right): Don't call it.
16224 2011-03-25 Chong Yidong <cyd@stupidchicken.com>
16226 * xdisp.c (handle_fontified_prop): Discard changes to clip_changed
16227 incurred during fontification.
16229 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
16231 * buffer.c (defvar_per_buffer): Remove unused parameter `doc'.
16232 (DEFVAR_PER_BUFFER): Don't pass it.
16234 * dispnew.c (row_equal_p, add_row_entry): Remove unused parameter `w'.
16235 (scrolling_window): Don't pass it.
16237 2011-03-25 Juanma Barranquero <lekktu@gmail.com>
16239 * dispextern.h (glyph_matric): Use #if GLYPH_DEBUG, not #ifdef.
16241 * fileio.c (check_executable) [DOS_NT]: Remove unused variables `len'
16243 (Fset_file_selinux_context) [HAVE_LIBSELINUX]: Move here declaration
16244 of variables specific to SELinux and computation of `encoded_absname'.
16246 * image.c (XPutPixel): Remove unused variable `height'.
16248 * keyboard.c (make_lispy_event): Remove unused variable `hpos'.
16250 * unexw32.c (get_section_info): Remove unused variable `section'.
16252 * w32.c (stat): Remove unused variables `drive_root' and `devtype'.
16253 (system_process_attributes): Remove unused variable `sess'.
16254 (sys_read): Remove unused variable `err'.
16256 * w32fns.c (top): Wrap variables with #if GLYPH_DEBUG, not #ifdef.
16257 (w32_wnd_proc): Remove unused variable `isdead'.
16258 (unwind_create_frame): Use #if GLYPH_DEBUG, not #ifdef.
16259 (Fx_server_max_request_size): Remove unused variable `dpyinfo'.
16260 (x_create_tip_frame): Remove unused variable `tem'.
16262 * w32inevt.c (w32_console_read_socket):
16263 Remove unused variable `no_events'.
16265 * w32term.c (x_draw_composite_glyph_string_foreground):
16266 Remove unused variable `width'.
16268 2011-03-24 Juanma Barranquero <lekktu@gmail.com>
16270 * w32term.c (x_set_glyph_string_clipping):
16271 Don't pass uninitialized region to CombineRgn.
16273 2011-03-23 Juanma Barranquero <lekktu@gmail.com>
16275 * w32fns.c (x_set_menu_bar_lines): Remove unused variable `olines'.
16276 (w32_wnd_proc): Pass NULL to Windows API, not uninitialized buffer.
16277 (Fx_close_connection): Remove unused variable `i'.
16279 * w32font.c (w32font_draw): Return number of glyphs.
16280 (w32font_open_internal): Remove unused variable `i'.
16281 (w32font_driver): Add missing initializer.
16283 * w32menu.c (utf8to16): Remove unused variable `utf16'.
16284 (fill_in_menu): Remove unused variable `items_added'.
16286 * w32term.c (last_mouse_press_frame): Remove static global variable.
16287 (w32_clip_to_row): Remove unused variable `f'.
16288 (x_delete_terminal): Remove unused variable `i'.
16290 * w32uniscribe.c (uniscribe_shape): Remove unused variable `nclusters'.
16291 (NOTHING): Remove unused static global variable.
16292 (uniscribe_check_otf): Remove unused variable `table'.
16293 (uniscribe_font_driver): Add missing initializers.
16295 2011-03-23 Julien Danjou <julien@danjou.info>
16297 * term.c (Fsuspend_tty, Fresume_tty):
16298 * minibuf.c (read_minibuf, run_exit_minibuf_hook):
16299 * window.c (temp_output_buffer_show):
16300 * insdel.c (signal_before_change):
16301 * frame.c (Fhandle_switch_frame):
16302 * fileio.c (Fdo_auto_save):
16303 * emacs.c (Fkill_emacs):
16304 * editfns.c (save_excursion_restore):
16305 * cmds.c (internal_self_insert):
16306 * callint.c (Fcall_interactively):
16307 * buffer.c (Fkill_all_local_variables):
16308 * keyboard.c (Fcommand_execute, Fsuspend_emacs, safe_run_hooks_1):
16310 (command_loop_1): Use Frun_hooks. Call safe_run_hooks
16311 unconditionally since it does the check itself.
16313 2011-03-23 Paul Eggert <eggert@cs.ucla.edu>
16315 Fix more problems found by GCC 4.5.2's static checks.
16317 * coding.c (encode_coding_raw_text): Avoid unnecessary test
16318 the first time through the loop, since we know p0 < p1 then.
16319 This also avoids a gcc -Wstrict-overflow warning.
16321 * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow
16322 leading to a memory leak, possible in functions like
16323 load_charset_map_from_file that can allocate an unbounded number
16324 of objects (Bug#8318).
16326 * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes
16327 that could (at least in theory) be that large.
16329 * xdisp.c (message_log_check_duplicate): Return unsigned long, not int.
16330 This is less likely to overflow, and avoids undefined behavior if
16331 overflow does occur. All callers changed. Use strtoul to scan
16332 for the unsigned long integer.
16333 (pint2hrstr): Simplify and tune code slightly.
16334 This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow.
16336 * scroll.c (do_scrolling): Work around GCC bug 48228.
16337 See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>.
16339 * frame.c (Fmodify_frame_parameters): Simplify loop counter.
16340 This also avoids a warning with gcc -Wstrict-overflow.
16341 (validate_x_resource_name): Simplify count usage.
16342 This also avoids a warning with gcc -Wstrict-overflow.
16344 * fileio.c (Fcopy_file): Report error if fchown or fchmod
16347 * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303).
16349 * process.c (Fmake_network_process): Use socklen_t, not int,
16350 where POSIX says socklen_t is required in portable programs.
16351 This fixes a porting bug on hosts like 64-bit HP-UX, where
16352 socklen_t is wider than int (Bug#8277).
16353 (Fmake_network_process, server_accept_connection):
16354 (wait_reading_process_output, read_process_output):
16357 * process.c: Rename or move locals to avoid shadowing.
16358 (list_processes_1, Fmake_network_process):
16359 (read_process_output_error_handler, exec_sentinel_error_handler):
16360 Rename or move locals.
16361 (Fmake_network_process): Define label "retry_connect" only if needed.
16362 (Fnetwork_interface_info): Fix pointer signedness.
16363 (process_send_signal): Add cast to avoid pointer signedness problem.
16364 (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros.
16365 (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298).
16367 Make tparam.h and terminfo.c consistent.
16368 * cm.c (tputs, tgoto, BC, UP): Remove extern decls.
16369 Include tparam.h instead, since it declares them.
16370 * cm.h (PC): Remove extern decl; tparam.h now does this.
16371 * deps.mk (cm.o, terminfo.o): Depend on tparam.h.
16372 * terminfo.c: Include tparam.h, to check interfaces.
16373 (tparm): Make 1st arg a const pointer in decl. Put it at top level.
16374 (tparam): Adjust signature to match interface in tparam.h;
16375 this removes some undefined behavior. Check that outstring and len
16376 are zero, which they always are with Emacs.
16377 * tparam.h (PC, BC, UP): New extern decls.
16379 * xftfont.c (xftfont_shape): Now static, and defined only if needed.
16380 (xftfont_open): Rename locals to avoid shadowing.
16382 * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness.
16383 (ftfont_otf_capability, ftfont_shape): Omit decls if not needed.
16384 (OTF_TAG_SYM): Omit macro if not needed.
16385 (ftfont_list): Remove unused local.
16386 (get_adstyle_property, ftfont_pattern_entity):
16387 (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point):
16388 Rename locals to avoid shadowing.
16390 * xfont.c (xfont_list_family): Mark var as initialized.
16392 * xml.c (make_dom): Now static.
16394 * composite.c (composition_compute_stop_pos): Rename local to
16396 (composition_reseat_it): Remove unused locals.
16397 (find_automatic_composition, composition_adjust_point): Likewise.
16398 (composition_update_it): Mark var as initialized.
16399 (find_automatic_composition): Mark vars as initialized,
16400 with a FIXME (Bug#8290).
16402 character.h: Rename locals to avoid shadowing.
16403 * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE):
16404 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE):
16405 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS):
16406 (BUF_DEC_POS): Be more systematic about renaming local temporaries
16407 to avoid shadowing.
16409 * textprop.c (property_change_between_p): Remove; unused.
16411 * intervals.c (interval_start_pos): Now static.
16413 * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else".
16415 * atimer.c (start_atimer, append_atimer_lists, set_alarm):
16416 Rename locals to avoid shadowing.
16418 * sound.c (wav_play, au_play, Fplay_sound_internal):
16419 Fix pointer signedness.
16420 (alsa_choose_format): Remove unused local var.
16421 (wav_play): Initialize a variable to 0, to prevent undefined
16422 behavior (Bug#8278).
16424 * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing.
16426 * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes.
16428 * callproc.c (Fcall_process): Use 'volatile' to avoid vfork
16429 clobbering (Bug#8298).
16430 * sysdep.c (sys_subshell): Likewise.
16431 Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out.
16433 * lisp.h (child_setup): Now NO_RETURN unless DOS_NT.
16434 This should get cleaned up, so that child_setup has the
16435 same signature on all platforms.
16437 * callproc.c (call_process_cleanup): Now static.
16438 (relocate_fd): Rename locals to avoid shadowing.
16440 2011-03-22 Chong Yidong <cyd@stupidchicken.com>
16442 * xterm.c (x_clear_frame): Remove XClearWindow call. This appears
16443 not to be necessary, and produces flickering.
16445 2011-03-20 Glenn Morris <rgm@gnu.org>
16447 * config.in: Remove file.
16449 2011-03-20 Juanma Barranquero <lekktu@gmail.com>
16451 * minibuf.c (Vcompleting_read_function): Don't declare, global variables
16452 are now in src/globals.h.
16453 (syms_of_minibuf): Remove spurious & from previous change.
16455 2011-03-20 Leo Liu <sdl.web@gmail.com>
16457 * minibuf.c (completing-read-function): New variable.
16458 (completing-read-default): Rename from completing-read.
16459 (completing-read): Call completing-read-function.
16461 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
16463 * xfaces.c (Fx_load_color_file):
16464 Read color file from absolute filename (bug#8250).
16466 2011-03-19 Juanma Barranquero <lekktu@gmail.com>
16468 * makefile.w32-in: Update dependencies.
16470 2011-03-17 Eli Zaretskii <eliz@gnu.org>
16472 * makefile.w32-in ($(BLD)/unexw32.$(O)): Depend on $(SRC)/unexec.h.
16474 2011-03-17 Paul Eggert <eggert@cs.ucla.edu>
16476 Fix more problems found by GCC 4.5.2's static checks.
16478 * process.c (make_serial_process_unwind, send_process_trap):
16479 (sigchld_handler): Now static.
16481 * process.c (allocate_pty): Let PTY_ITERATION declare iteration vars.
16482 That way, the code declares only the vars that it needs.
16483 * s/aix4-2.h (PTY_ITERATION): Declare iteration vars.
16484 * s/cygwin.h (PTY_ITERATION): Likewise.
16485 * s/darwin.h (PTY_ITERATION): Likewise.
16486 * s/gnu-linux.h (PTY_ITERATION): Likewise.
16488 * s/irix6-5.h (PTY_OPEN): Declare stb, to loosen coupling.
16489 * process.c (allocate_pty): Don't declare stb unless it's needed.
16491 * bytecode.c (MAYBE_GC): Rewrite so as not to use empty "else".
16492 (CONSTANTLIM): Remove; unused.
16493 (METER_CODE, Bscan_buffer, Bread_char, Bset_mark):
16494 Define only if needed.
16496 * unexelf.c (unexec): Name an expression,
16497 to avoid gcc -Wbad-function-cast warning.
16498 Use a different way to cause a compilation error if anyone uses
16499 n rather than nn, a way that does not involve shadowing.
16500 (ELF_BSS_SECTION_NAME, OLD_PROGRAM_H): Remove; unused.
16502 * deps.mk (unexalpha.o): Remove; unused.
16504 New file unexec.h, the (simple) interface for unexec (Bug#8267).
16505 * unexec.h: New file.
16506 * deps.mk (emacs.o, unexaix.o, unexcw.o, unexcoff.o, unexelf.o):
16507 (unexhp9k800.o, unexmacosx.o, unexsol.o, unexw32.o):
16508 Depend on unexec.h.
16509 * emacs.c [!defined CANNOT_DUMP]: Include unexec.h.
16510 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c, unexhp9k800.c:
16511 * unexmacosx.c, unexsol.c, unexw32.c: Include unexec.h.
16512 Change as necessary to match prototype in unexec.h.
16514 * syntax.c (Fforward_comment, scan_lists): Rename locals to avoid
16516 (back_comment, skip_chars): Mark vars as initialized.
16518 * character.h (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, BUF_INC_POS):
16519 Rename locals to avoid shadowing.
16521 * lread.c (read1): Rewrite so as not to use empty "else".
16522 (Fload, readevalloop, read1): Rename locals to avoid shadowing.
16524 * print.c (Fredirect_debugging_output): Fix pointer signedess.
16526 * lisp.h (debug_output_compilation_hack): Add decl here, to avoid
16527 warning when compiling print.c.
16529 * font.c (font_unparse_fcname): Abort in an "impossible" situation
16530 instead of using an uninitialized var.
16531 (font_sort_entities): Mark var as initialized.
16533 * character.h (FETCH_CHAR_ADVANCE): Rename locals to avoid shadowing.
16535 * font.c (font_unparse_xlfd): Don't mix pointers to variables with
16536 pointers to constants.
16537 (font_parse_fcname): Remove unused vars.
16538 (font_delete_unmatched): Now static.
16539 (font_get_spec): Remove; unused.
16540 (font_style_to_value, font_prop_validate_style, font_unparse_fcname):
16541 (font_update_drivers, Ffont_get_glyphs, font_add_log):
16542 Rename or move locals to avoid shadowing.
16544 * fns.c (require_nesting_list, require_unwind): Now static.
16545 (Ffillarray): Rename locals to avoid shadowing.
16547 * floatfns.c (domain_error2): Define only if needed.
16548 (Ffrexp, Fldexp): Rename locals to avoid shadowing.
16550 * alloc.c (mark_backtrace): Move decl from here ...
16551 * lisp.h: ... to here, so that it can be checked.
16553 * eval.c (call_debugger, do_debug_on_call, grow_specpdl): Now static.
16554 (Fdefvar): Rewrite so as not to use empty "else".
16555 (lisp_indirect_variable): Name an expression,
16556 to avoid gcc -Wbad-function-cast warning.
16557 (Fdefvar): Rename locals to avoid shadowing.
16559 * callint.c (quotify_arg, quotify_args): Now static.
16560 (Fcall_interactively): Rename locals to avoid shadowing.
16561 Use const pointer when appropriate.
16563 * lisp.h (get_system_name, get_operating_system_release):
16564 Move decls here, to check interfaces.
16565 * process.c (get_operating_system_release): Move decl to lisp.h.
16566 * xrdb.c (get_system_name): Likewise.
16567 * editfns.c (init_editfns, Fuser_login_name, Fuser_uid):
16568 (Fuser_real_uid, Fuser_full_name): Remove unnecessary casts,
16569 some of which prompt warnings from gcc -Wbad-function-cast.
16570 (Fformat_time_string, Fencode_time, Finsert_char):
16571 (Ftranslate_region_internal, Fformat):
16572 Rename or remove local vars to avoid shadowing.
16573 (Ftranslate_region_internal): Mark var as initialized.
16575 * doc.c (Fdocumentation, Fsnarf_documentation): Move locals to
16578 * lisp.h (eassert): Check that the argument compiles, even if
16579 ENABLE_CHECKING is not defined.
16581 * data.c (Findirect_variable): Name an expression, to avoid
16582 gcc -Wbad-function-cast warning.
16583 (default_value, arithcompare, arith_driver, arith_error): Now static.
16584 (store_symval_forwarding): Rename local to avoid shadowing.
16585 (Fmake_variable_buffer_local, Fmake_local_variable):
16586 Mark variables as initialized.
16587 (do_blv_forwarding, do_symval_forwarding): Remove; unused.
16589 * alloc.c (check_cons_list): Do not define unless GC_CHECK_CONS_LIST.
16590 (Fmake_vector, Fvector, Fmake_byte_code, Fgarbage_collect):
16591 Rename locals to avoid shadowing.
16592 (mark_stack): Move local variables into the #ifdef region where
16594 (BLOCK_INPUT_ALLOC, UNBLOCK_INPUT_ALLOC): Define only if
16595 ! defined SYSTEM_MALLOC && ! defined SYNC_INPUT, as they are not
16597 (CHECK_ALLOCATED): Define only if GC_CHECK_MARKED_OBJECTS.
16598 (GC_STRING_CHARS): Remove; not used.
16599 (Fmemory_limit): Cast sbrk's returned value to char *.
16601 * lisp.h (check_cons_list): Declare if GC_CHECK_CONS_LIST; this
16602 avoids undefined behavior in theory.
16604 * regex.c (IF_LINT): Add defn, for benefit of ../lib-src.
16606 Use functions, not macros, for up- and down-casing (Bug#8254).
16607 * buffer.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
16608 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Remove. All callers changed
16609 to use the following functions instead of these macros.
16610 (downcase): Adjust to lack of DOWNCASE_TABLE. Return int, not
16611 EMACS_INT, since callers assume the returned value fits in int.
16612 (upcase1): Likewise, for UPCASE_TABLE.
16613 (uppercasep, lowercasep, upcase): New static inline functions.
16614 * editfns.c (Fchar_equal): Remove no-longer-needed workaround for
16615 the race-condition problem in the old DOWNCASE.
16617 * regex.c (CHARSET_LOOKUP_RANGE_TABLE_RAW, POP_FAILURE_REG_OR_COUNT):
16618 Rename locals to avoid shadowing.
16619 (regex_compile, re_match_2_internal): Move locals to avoid shadowing.
16620 (regex_compile, re_search_2, re_match_2_internal):
16621 Remove unused local vars.
16622 (FREE_VAR): Rewrite so as not to use empty "else",
16623 which gcc can warn about.
16624 (regex_compile, re_match_2_internal): Mark locals as initialized.
16625 (RETALLOC_IF): Define only if needed.
16626 (WORDCHAR_P): Likewise. This one is never needed, but is used
16627 only in a comment talking about a compiler bug, so put inside
16628 the #if 0 of that comment.
16629 (CHARSET_LOOKUP_BITMAP, FAIL_STACK_FULL, RESET_FAIL_STACK):
16630 (PUSH_FAILURE_ELT, BUF_PUSH_3, STOP_ADDR_VSTRING):
16633 * search.c (boyer_moore): Rename locals to avoid shadowing.
16634 * character.h (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE):
16635 (PREV_CHAR_BOUNDARY): Likewise.
16637 * search.c (simple_search): Remove unused var.
16639 * dired.c (compile_pattern): Move decl from here ...
16640 * lisp.h: ... to here, so that it can be checked.
16641 (struct re_registers): New forward decl.
16643 * character.h (INC_POS, DEC_POS): Rename locals to avoid shadowing.
16645 * indent.c (MULTIBYTE_BYTES_WIDTH): New args bytes, width.
16647 (MULTIBYTE_BYTES_WIDTH, scan_for_column, compute_motion):
16648 Rename locals to avoid shadowing.
16649 (Fvertical_motion): Mark locals as initialized.
16651 * casefiddle.c (casify_object, casify_region): Now static.
16652 (casify_region): Mark local as initialized.
16654 * cmds.c (internal_self_insert): Rename local to avoid shadowing.
16656 * lisp.h (GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR, GCPRO6_VAR):
16657 New macros, so that the caller can use some names other than
16658 gcpro1, gcpro2, etc.
16659 (GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6): Reimplement in terms
16661 (GCPRO1_VAR, UNGCPRO_VAR): Change the meaning of the second
16662 argument, for consistency with GCPRO2_VAR, etc: it is now the
16663 prefix of the variable, not the variable itself. All uses
16665 * dired.c (directory_files_internal, file_name_completion):
16666 Rename locals to avoid shadowing.
16668 Fix a race condition diagnosed by gcc -Wsequence-point (Bug#8254).
16669 An expression of the form (DOWNCASE (x) == DOWNCASE (y)), found in
16670 dired.c's scmp function, had undefined behavior.
16671 * lisp.h (DOWNCASE_TABLE, UPCASE_TABLE, DOWNCASE, UPPERCASEP):
16672 (NOCASEP, LOWERCASEP, UPCASE, UPCASE1): Move from here ...
16673 * buffer.h: ... to here, because these macros use current_buffer,
16674 and the new implementation with inline functions needs to have
16675 current_buffer in scope now, rather than later when the macros
16677 (downcase, upcase1): New static inline functions.
16678 (DOWNCASE, UPCASE1): Reimplement using these functions.
16679 This avoids undefined behavior in expressions like
16680 DOWNCASE (x) == DOWNCASE (y), which previously suffered
16681 from race conditions in accessing the global variables
16682 case_temp1 and case_temp2.
16683 * casetab.c (case_temp1, case_temp2): Remove; no longer needed.
16684 * lisp.h (case_temp1, case_temp2): Remove their decls.
16685 * character.h (ASCII_CHAR_P): Move from here ...
16686 * lisp.h: ... to here, so that the inline functions mentioned
16687 above can use them.
16689 * dired.c (directory_files_internal_unwind): Now static.
16691 * fileio.c (file_name_as_directory, directory_file_name):
16692 (barf_or_query_if_file_exists, auto_save_error, auto_save_1):
16694 (file_name_as_directory): Use const pointers when appropriate.
16695 (Fexpand_file_name): Likewise. In particular, newdir might
16696 point at constant storage, so make it a const pointer.
16697 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
16698 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
16700 (Fset_file_times, Finsert_file_contents, auto_save_error):
16701 Rename locals to avoid shadowing.
16703 * minibuf.c (choose_minibuf_frame_1): Now static.
16704 (Ftry_completion, Fall_completions): Rename or remove locals
16705 to avoid shadowing.
16707 * marker.c (bytepos_to_charpos): Remove; unused.
16709 * lisp.h (verify_bytepos, count_markers): New decls,
16710 so that gcc does not warn that these functions aren't declared.
16712 * insdel.c (check_markers, make_gap_larger, make_gap_smaller):
16713 (reset_var_on_error, Fcombine_after_change_execute_1): Now static.
16714 (CHECK_MARKERS): Redo to avoid gcc -Wempty-body diagnostic.
16715 (copy_text): Remove unused local var.
16717 * filelock.c (within_one_second): Now static.
16718 (lock_file_1): Rename local to avoid shadowing.
16720 * buffer.c (fix_overlays_before): Mark locals as initialized.
16721 (fix_start_end_in_overlays): Likewise. This function should be
16722 simplified by using pointers-to-pointers, but that's a different
16724 (switch_to_buffer_1): Now static.
16725 (Fkill_buffer, record_buffer, Fbury_buffer, Fset_buffer_multibyte):
16726 (report_overlay_modification): Rename locals to avoid shadowing.
16728 * sysdep.c (system_process_attributes): Rename vars to avoid shadowing.
16729 Fix pointer signedness issue.
16730 (sys_subshell): Mark local as volatile if checking for lint,
16731 to suppress a gcc -Wclobbered warning that does not seem to be right.
16732 (MAXPATHLEN): Define only if needed.
16734 * process.c (serial_open, serial_configure): Move decls from here ...
16735 * systty.h: ... to here, so that they can be checked.
16737 * fns.c (get_random, seed_random): Move extern decls from here ...
16738 * lisp.h: ... to here, so that they can be checked.
16740 * sysdep.c (reset_io): Now static.
16741 (wait_for_termination_signal): Remove; unused.
16743 * keymap.c (keymap_parent, keymap_memberp, map_keymap_internal):
16744 (copy_keymap_item, append_key, push_text_char_description):
16746 (Fwhere_is_internal): Don't test CONSP (sequences) unnecessarily.
16747 (DENSE_TABLE_SIZE): Remove; unused.
16748 (get_keymap, access_keymap, Fdefine_key, Fwhere_is_internal):
16749 (describe_map_tree):
16750 Rename locals to avoid shadowing.
16752 * keyboard.c: Declare functions static if they are not used elsewhere.
16753 (echo_char, echo_dash, cmd_error, top_level_2):
16754 (poll_for_input, handle_async_input): Now static.
16755 (read_char, kbd_buffer_get_event, make_lispy_position):
16756 (make_lispy_event, make_lispy_movement, apply_modifiers):
16757 (decode_keyboard_code, tty_read_avail_input, menu_bar_items):
16758 (parse_tool_bar_item, read_key_sequence, Fread_key_sequence):
16759 (Fread_key_sequence_vector): Rename locals to avoid shadowing.
16760 (read_key_sequence, read_char): Mark locals as initialized.
16761 (Fexit_recursive_edit, Fabort_recursive_edit): Mark with NO_RETURN.
16763 * keyboard.h (make_ctrl_char): New decl.
16764 (mark_kboards): Move decl here ...
16765 * alloc.c (mark_kboards): ... from here.
16767 * lisp.h (force_auto_save_soon): New decl.
16769 * emacs.c (init_cmdargs): Rename local to avoid shadowing.
16770 (DEFINE_DUMMY_FUNCTION): New macro.
16771 (__do_global_ctors, __do_global_ctors_aux, __do_global_dtors, __main):
16773 (main): Add casts to avoid warnings
16774 if GCC considers string literals to be constants.
16776 * lisp.h (fatal_error_signal): Add decl, since it's exported.
16778 * dbusbind.c: Pointer signedness fixes.
16779 (xd_signature, xd_append_arg, xd_initialize):
16780 (Fdbus_call_method, Fdbus_call_method_asynchronously):
16781 (Fdbus_method_return_internal, Fdbus_method_error_internal):
16782 (Fdbus_send_signal, xd_read_message_1, Fdbus_register_service):
16783 (Fdbus_register_signal): Use SSDATA when the context wants char *.
16785 * dbusbind.c (Fdbus_init_bus): Add cast to avoid warning
16786 if GCC considers string literals to be constants.
16787 (Fdbus_register_service, Fdbus_register_method): Remove unused vars.
16789 2011-03-16 Stefan Monnier <monnier@iro.umontreal.ca>
16791 * print.c (PRINT_CIRCLE_CANDIDATE_P): New macro.
16792 (print_preprocess, print_object): New macro to fix last change.
16794 * print.c (print_preprocess): Don't forget font objects.
16796 2011-03-16 Juanma Barranquero <lekktu@gmail.com>
16798 * emacs.c (USAGE3): Doc fixes.
16800 2011-03-15 Andreas Schwab <schwab@linux-m68k.org>
16802 * coding.c (detect_coding_iso_2022): Reorganize code to clarify
16805 2011-03-14 Juanma Barranquero <lekktu@gmail.com>
16807 * lisp.h (VWindow_system, Qfile_name_history):
16808 * keyboard.h (lispy_function_keys) [WINDOWSNT]:
16809 * w32term.h (w32_system_caret_hwnd, w32_system_caret_height)
16810 (w32_system_caret_x, w32_system_caret_y): Declare extern.
16812 * w32select.c: Don't #include "keyboard.h".
16813 (run_protected): Add extern declaration for waiting_for_input.
16815 * w32.c (Qlocal, noninteractive1, inhibit_window_system):
16816 * w32console.c (detect_input_pending, read_input_pending)
16817 (encode_terminal_code):
16818 * w32fns.c (quit_char, lispy_function_keys, Qtooltip)
16819 (w32_system_caret_hwnd, w32_system_caret_height, w32_system_caret_x)
16820 (w32_system_caret_y, Qfile_name_history):
16821 * w32font.c (w32font_driver, QCantialias, QCotf, QClang):
16822 * w32inevt.c (reinvoke_input_signal, lispy_function_keys):
16823 * w32menu.c (Qmenu_bar, QCtoggle, QCradio, Qoverriding_local_map)
16824 (Qoverriding_terminal_local_map, Qmenu_bar_update_hook):
16825 * w32proc.c (Qlocal, report_file_error):
16826 * w32term.c (Vwindow_system, updating_frame):
16827 * w32uniscribe.c (initialized, uniscribe_font_driver):
16828 Remove unneeded extern declarations.
16830 2011-03-14 Chong Yidong <cyd@stupidchicken.com>
16832 * buffer.c (Fmake_indirect_buffer): Fix incorrect assertions.
16834 2011-03-13 Chong Yidong <cyd@stupidchicken.com>
16836 * buffer.h (BUF_BEGV, BUF_BEGV_BYTE, BUF_ZV, BUF_ZV_BYTE, BUF_PT)
16837 (BUF_PT_BYTE): Rewrite to handle indirect buffers (Bug#8219).
16838 These macros can no longer be used for assignment.
16840 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
16841 Assign struct members directly, instead of using BUF_BEGV etc.
16842 (record_buffer_markers, fetch_buffer_markers): New functions for
16843 recording and fetching special buffer markers.
16844 (set_buffer_internal_1, set_buffer_temp): Use them.
16846 * lread.c (unreadchar): Use SET_BUF_PT_BOTH.
16848 * insdel.c (adjust_point): Use SET_BUF_PT_BOTH.
16850 * intervals.c (temp_set_point_both): Use SET_BUF_PT_BOTH.
16851 (get_local_map): Use SET_BUF_BEGV_BOTH and SET_BUF_ZV_BOTH.
16853 * xdisp.c (hscroll_window_tree):
16854 (reconsider_clip_changes): Use PT instead of BUF_PT.
16856 2011-03-13 Eli Zaretskii <eliz@gnu.org>
16858 * makefile.w32-in ($(BLD)/editfns.$(O)): Depend on
16859 $(EMACS_ROOT)/lib/intprops.h.
16861 2011-03-13 Paul Eggert <eggert@cs.ucla.edu>
16863 Fix more problems found by GCC 4.5.2's static checks.
16865 * gtkutil.c (xg_get_pixbuf_from_pixmap): Add cast from char *
16866 to unsigned char * to avoid compiler diagnostic.
16867 (xg_free_frame_widgets): Make it clear that a local variable is
16868 needed only if USE_GTK_TOOLTIP.
16869 (gdk_window_get_screen): Make it clear that this macro is needed
16870 only if USE_GTK_TOOLTIP.
16871 (int_gtk_range_get_value): New function, which avoids a diagnostic
16872 from gcc -Wbad-function-cast.
16873 (xg_set_toolkit_scroll_bar_thumb): Use it.
16874 (xg_tool_bar_callback, xg_tool_item_stale_p): Rewrite to avoid
16875 diagnostic from gcc -Wbad-function-cast.
16876 (get_utf8_string, xg_get_file_with_chooser):
16877 Rename locals to avoid shadowing.
16878 (create_dialog): Move locals to avoid shadowing.
16880 * xgselect.c (xg_select): Remove unused var.
16882 * image.c (four_corners_best): Mark locals as initialized.
16883 (gif_load): Initialize transparent_p to zero (Bug#8238).
16884 Mark another local as initialized.
16885 (my_png_error, my_error_exit): Mark with NO_RETURN.
16887 * image.c (clear_image_cache): Now static.
16888 (DIM, HAVE_STDLIB_H_1): Remove unused macros.
16889 (xpm_load): Redo to avoid "discards qualifiers" gcc warning.
16890 (x_edge_detection): Remove unnecessary cast that
16891 gcc -Wbad-function-cast diagnoses.
16892 (gif_load): Fix pointer signedness.
16893 (clear_image_cache, xbm_read_bitmap_data, x_detect_edges):
16894 (jpeg_load, gif_load): Rename locals to avoid shadowing.
16896 2011-03-12 Paul Eggert <eggert@cs.ucla.edu>
16898 Improve quality of tests for time stamp overflow.
16899 For example, without this patch (encode-time 0 0 0 1 1
16900 1152921504606846976) returns the obviously-bogus value (-948597
16901 62170) on my RHEL 5.5 x86-64 host. With the patch, it correctly
16902 reports time overflow. See
16903 <http://lists.gnu.org/archive/html/emacs-devel/2011-03/msg00470.html>.
16904 * deps.mk (editfns.o): Depend on ../lib/intprops.h.
16905 * editfns.c: Include limits.h and intprops.h.
16906 (TIME_T_MIN, TIME_T_MAX): New macros.
16907 (time_overflow): Move earlier, to before first use.
16908 (hi_time, lo_time): New functions, for an accurate test for
16909 out-of-range times.
16910 (Fcurrent_time, Fget_internal_run_time, make_time): Use them.
16911 (Fget_internal_run_time): Don't assume time_t fits in int.
16912 (make_time): Use list2 instead of Fcons twice.
16913 (Fdecode_time): More accurate test for out-of-range times.
16914 (check_tm_member): New function.
16915 (Fencode_time): Use it, to test for out-of-range times.
16916 (lisp_time_argument): Don't rely on undefined left-shift and
16917 right-shift behavior when checking for time stamp overflow.
16919 * editfns.c (time_overflow): New function, refactoring common code.
16920 (Fformat_time_string, Fdecode_time, Fencode_time):
16921 (Fcurrent_time_string): Use it.
16923 Move 'make_time' to be next to its inverse 'lisp_time_argument'.
16924 * dired.c (make_time): Move to ...
16925 * editfns.c (make_time): ... here.
16926 * systime.h: Note the move.
16928 2011-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
16930 * fringe.c (update_window_fringes): Remove unused variables.
16932 * unexmacosx.c (copy_data_segment): Also copy __got section.
16935 2011-03-12 Eli Zaretskii <eliz@gnu.org>
16937 * termcap.c [MSDOS]: Include "msdos.h".
16938 (find_capability, tgetnum, tgetflag, tgetstr, tputs, tgetent):
16939 Constify `char *' arguments and their references according to
16940 prototypes in tparam.h.
16942 * deps.mk (termcap.o): Depend on tparam.h and msdos.h.
16944 * msdos.c (XMenuAddPane): 3rd argument is `const char *' now.
16945 Adapt all references accordingly.
16947 * msdos.h (XMenuAddPane): 3rd argument is `const char *' now.
16949 2011-03-11 Tom Tromey <tromey@redhat.com>
16951 * buffer.c (syms_of_buffer): Remove obsolete comment.
16953 2011-03-11 Eli Zaretskii <eliz@gnu.org>
16955 * termhooks.h (encode_terminal_code): Declare prototype.
16957 * msdos.c (encode_terminal_code): Don't declare prototype.
16959 * term.c (encode_terminal_code): Now external again, used by
16960 w32console.c and msdos.c.
16962 * makefile.w32-in ($(BLD)/term.$(O), ($(BLD)/tparam.$(O)):
16963 Depend on $(SRC)/tparam.h, see 2011-03-11T07:24:21Z!eggert@cs.ucla.edu.
16965 2011-03-11 Paul Eggert <eggert@cs.ucla.edu>
16967 Fix some minor problems found by GCC 4.5.2's static checks.
16969 * fringe.c (update_window_fringes): Mark locals as initialized
16971 (destroy_fringe_bitmap, init_fringe_bitmap): Now static.
16973 * alloc.c (mark_fringe_data): Move decl from here ...
16974 * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here,
16975 to check its interface.
16976 (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM.
16978 * fontset.c (free_realized_fontset): Now static.
16979 (Fset_fontset_font): Rename local to avoid shadowing.
16980 (fontset_font): Mark local as initialized.
16981 (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused.
16983 * xrdb.c: Include "xterm.h", to check x_load_resources's interface.
16985 * xselect.c (x_disown_buffer_selections): Remove; not used.
16986 (TRACE3) [!defined TRACE_SELECTION]: Remove; not used.
16987 (x_own_selection, Fx_disown_selection_internal): Rename locals
16988 to avoid shadowing.
16989 (x_handle_dnd_message): Remove local to avoid shadowing.
16991 * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros,
16992 so that the caller can use some name other than gcpro1.
16993 (GCPRO1, UNGCPRO): Reimplement in terms of the new macros.
16994 * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
16995 (Fx_backspace_delete_keys_p):
16996 Use them to avoid shadowing, and rename vars to avoid shadowing.
16997 (x_decode_color, x_set_name, x_window): Now static.
16998 (Fx_create_frame): Add braces to silence GCC warning.
16999 (Fx_file_dialog, Fx_select_font): Fix pointer signedness.
17000 (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame):
17001 Remove unused locals.
17002 (Fx_create_frame, x_create_tip_frame, Fx_show_tip):
17003 (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing.
17004 Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR
17007 * xterm.h (x_mouse_leave): New decl.
17009 * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame):
17010 Remove unused functions.
17011 (x_shift_glyphs_for_insert, XTflash, XTring_bell):
17012 (x_calc_absolute_position): Now static.
17013 (XTread_socket): Don't define label "out" unless it's used.
17014 Don't declare local "event" unless it's used.
17015 (x_iconify_frame, x_free_frame_resources): Don't declare locals
17016 unless they are used.
17017 (XEMBED_VERSION, xembed_set_info): Don't define unless needed.
17018 (x_fatal_error_signal): Remove; not used.
17019 (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position):
17020 (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor):
17021 (x_error_catcher, x_connection_closed, x_error_handler):
17022 (x_error_quitter, xembed_send_message, x_iconify_frame):
17023 (my_log_handler): Rename locals to avoid shadowing.
17024 (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN.
17025 (x_connection_closed): Tell GCC not to suggest NO_RETURN.
17027 * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font):
17028 Rename or move locals to avoid shadowing.
17029 (tty_defined_color, merge_face_heights): Now static.
17030 (free_realized_faces_for_fontset): Remove; not used.
17031 (Fx_list_fonts): Mark variable that gcc -Wuninitialized
17032 does not deduce is never used uninitialized.
17033 (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used.
17034 (LFACEP): Define only if XASSERTS, as it's not needed otherwise.
17036 * terminal.c (store_terminal_param): Now static.
17038 * xmenu.c (menu_highlight_callback): Now static.
17039 (set_frame_menubar): Remove unused local.
17040 (xmenu_show): Rename parameter to avoid shadowing.
17041 (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const"
17042 since they might point to immutable storage.
17043 (next_menubar_widget_id): Declare only if USE_X_TOOLKIT,
17044 since it's unused otherwise.
17046 * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff.
17047 Add a FIXME, since the code still doesn't look right. (Bug#8215)
17048 (Fcurrent_bidi_paragraph_direction): Simplify slightly; this
17049 avoids a gcc -Wuninitialized diagnostic.
17050 (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs):
17051 (note_mouse_highlight): Mark variables that gcc -Wuninitialized
17052 does not deduce are never used uninitialized.
17054 * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c.
17056 * xdisp.c (redisplay_window): Rename local to avoid shadowing.
17057 * window.c (window_loop, size_window):
17058 (run_window_configuration_change_hook, enlarge_window): Likewise.
17060 * window.c (display_buffer): Now static.
17061 (size_window): Mark variables that gcc -Wuninitialized
17062 does not deduce are never used uninitialized.
17063 * window.h (check_all_windows): New decl, to forestall
17064 gcc -Wmissing-prototypes diagnostic.
17065 * dispextern.h (bidi_dump_cached_states): Likewise.
17067 * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid
17069 * charset.c (map_charset_for_dump, Fchar_charset): Likewise.
17070 Include <limits.h>.
17071 (Fsort_charsets): Redo min/max calculation to shorten the code a bit
17072 and to avoid gcc -Wuninitialized warning.
17073 (load_charset_map): Mark variables that gcc -Wuninitialized
17074 does not deduce are never used uninitialized.
17075 (load_charset): Abort instead of using uninitialized var (Bug#8229).
17077 * coding.c (coding_set_source, coding_set_destination):
17078 Use "else { /* comment */ }" rather than "else /* comment */;"
17079 for clarity, and to avoid gcc -Wempty-body warning.
17080 (Fdefine_coding_system_internal): Don't redeclare 'i' inside
17081 a block, when the outer 'i' will do.
17082 (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule):
17083 (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022):
17084 (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5):
17085 (decode_coding_raw_text, decode_coding_charset, get_translation_table):
17086 (Fdecode_sjis_char, Fdefine_coding_system_internal):
17087 Rename locals to avoid shadowing.
17088 * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise.
17089 * coding.c (emacs_mule_char, encode_invocation_designation):
17090 Now static, since they're not used elsewhere.
17091 (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
17092 (decode_coding_object, encode_coding_object, detect_coding_system):
17093 (decode_coding_emacs_mule): Mark variables that gcc
17094 -Wuninitialized does not deduce are never used uninitialized.
17095 (detect_coding_iso_2022): Initialize a local variable that might
17096 be used uninitialized. Leave a FIXME because it's not clear that
17097 this initialization is needed. (Bug#8211)
17098 (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT):
17099 (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P):
17100 (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER):
17101 (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R):
17102 Remove unused macros.
17104 * category.c (hash_get_category_set): Remove unused local var.
17105 (copy_category_table): Now static, since it's not used elsewhere.
17106 * character.c (string_count_byte8): Likewise.
17108 * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string):
17109 (Fregister_code_conversion_map): Rename locals to avoid shadowing.
17111 * chartab.c (copy_sub_char_table): Now static, since it's not used
17113 (sub_char_table_ref_and_range, char_table_ref_and_range):
17114 Rename locals to avoid shadowing.
17115 (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros.
17117 * bidi.c (bidi_check_type): Now static, since it's not used elsewhere.
17118 (BIDI_BOB): Remove unused macro.
17120 * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not
17121 deduce are never used uninitialized.
17122 * term.c (encode_terminal_code): Likewise.
17124 * term.c (encode_terminal_code): Now static. Remove unused local.
17126 * tparam.h: New file.
17127 * term.c, tparam.h: Include it.
17128 * deps.mk (term.o, tparam.o): Depend on tparam.h.
17129 * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr):
17130 Move these decls to tparam.h, and make them agree with what
17131 is actually in tparam.c. The previous trick of using incompatible
17132 decls in different modules does not conform to the C standard.
17133 All callers of tparam changed to use tparam's actual API.
17134 * tparam.c (tparam1, tparam, tgoto):
17135 Use const pointers where appropriate.
17137 * cm.c (calccost, cmgoto): Use const pointers where appropriate.
17138 * cm.h (struct cm): Likewise.
17139 * dispextern.h (do_line_insertion_deletion_costs): Likewise.
17140 * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise.
17141 * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table):
17142 (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph):
17143 (turn_on_face, init_tty): Likewise.
17144 * termchar.h (struct tty_display_info): Likewise.
17146 * term.c (term_mouse_position): Rename local to avoid shadowing.
17148 * alloc.c (mark_ttys): Move decl from here ...
17149 * lisp.h (mark_ttys): ... to here, so that it's checked against defn.
17151 2011-03-11 Andreas Schwab <schwab@linux-m68k.org>
17153 * .gdbinit (pwinx, xbuffer): Fix access to buffer name.
17155 2011-03-09 Juanma Barranquero <lekktu@gmail.com>
17157 * search.c (compile_pattern_1): Remove argument regp, unused since
17158 revid:rms@gnu.org-19941211082627-3x1g1wyqkjmwloig.
17159 (compile_pattern): Don't pass it.
17161 2011-03-08 Jan Djärv <jan.h.d@swipnet.se>
17163 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
17164 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
17166 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
17168 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
17170 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
17171 gdk_window_get_screen, gdk_window_get_geometry,
17172 gdk_x11_window_lookup_for_display and GDK_KEY_g.
17173 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
17174 (xg_get_pixbuf_from_pixmap): New function.
17175 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
17176 to Pixmap, take frame as parameter, remove GdkColormap parameter.
17177 Call xg_get_pixbuf_from_pixmap instead of
17178 gdk_pixbuf_get_from_drawable.
17179 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
17180 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
17181 (xg_check_special_colors): Use GtkStyleContext and its functions
17183 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
17184 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
17185 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
17186 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes):
17187 Call gtk_widget_get_preferred_size.
17188 (xg_frame_resized): gdk_window_get_geometry only takes 5
17190 (xg_win_to_widget, xg_event_is_for_menubar):
17191 Call gdk_x11_window_lookup_for_display.
17192 (xg_set_widget_bg): New function.
17193 (delete_cb): New function.
17194 (xg_create_frame_widgets): Connect delete-event to delete_cb.
17195 Call xg_set_widget_bg. Only set background pixmap for ! HAVE_GTK3
17196 (xg_set_background_color): Call xg_set_widget_bg.
17197 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
17198 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
17199 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
17200 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
17202 (update_frame_tool_bar): Call gtk_widget_hide.
17203 (xg_initialize): Use GDK_KEY_g.
17205 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
17207 (x_session_initialize): Call gdk_x11_set_sm_client_id.
17209 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
17210 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
17211 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
17213 2011-03-08 Juanma Barranquero <lekktu@gmail.com>
17215 * w32xfns.c (select_palette): Check success of RealizePalette against
17216 GDI_ERROR, not zero.
17218 See ChangeLog.11 for earlier changes.
17220 ;; Local Variables:
17224 Copyright (C) 2011-2012 Free Software Foundation, Inc.
17226 This file is part of GNU Emacs.
17228 GNU Emacs is free software: you can redistribute it and/or modify
17229 it under the terms of the GNU General Public License as published by
17230 the Free Software Foundation, either version 3 of the License, or
17231 (at your option) any later version.
17233 GNU Emacs is distributed in the hope that it will be useful,
17234 but WITHOUT ANY WARRANTY; without even the implied warranty of
17235 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17236 GNU General Public License for more details.
17238 You should have received a copy of the GNU General Public License
17239 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.