aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorJoakim Verona2012-07-27 02:22:03 +0200
committerJoakim Verona2012-07-27 02:22:03 +0200
commit5fb63197843dcae66f2fe0ddd6f4a9d560e9db2f (patch)
tree5c55f1096a656a9759f0b53a0b5d1a2289bd366f /src/ChangeLog
parent0c5c85cf2b350c965bb1ffa5b2d77c2adebc406b (diff)
parent562157c814037dcba58a20cd6908a95992c22283 (diff)
downloademacs-5fb63197843dcae66f2fe0ddd6f4a9d560e9db2f.tar.gz
emacs-5fb63197843dcae66f2fe0ddd6f4a9d560e9db2f.zip
upstream
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog2321
1 files changed, 2318 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 16fcbb07522..7e91158ee36 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,2318 @@
12012-07-26 Paul Eggert <eggert@cs.ucla.edu>
2
3 Fix export of symbols to GDB (Bug#12036).
4 * alloc.c (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL)
5 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Move these here from
6 emacs.c, as this is a more-suitable home. Had this been done earlier
7 the fix for 12036 would have avoided some of the problems noted in
8 <http://bugs.gnu.org/12036#13> by Eli Zaretskii, as the scope problems
9 would have been more obvious.
10 * emacs.c: Do not include <verify.h>; no longer needed.
11 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS)
12 (gdb_GCTYPEBITS, gdb_USE_LSB_TAG)
13 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
14 Remove; now done in lisp.h.
15 * lisp.h (PUBLISH_TO_GDB): New macro.
16 (GCTYPEBITS, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE, enum pvec_type)
17 (DATA_SEG_BITS): Use it.
18 (GCTYPEBITS, USE_LSB_TAG): Now also an enum, for GDB.
19 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Now just an enum, for GDB.
20 * mem-limits.h (EXCEEDS_LISP_PTR): Redo so that DATA_SEG_BITS need
21 not be usable in #if. This simplifies things.
22
232012-07-26 Juanma Barranquero <lekktu@gmail.com>
24
25 * makefile.w32-in ($(BLD)/emacs.$(O)): Update dependencies.
26
272012-07-26 Paul Eggert <eggert@cs.ucla.edu>
28
29 Simplify export of symbols to GDB (Bug#12036).
30 * .gdbinit (xgetptr, xgetint, xgettype): Don't use "set $bugfix =
31 $bugfix.i", as this doesn't work (with GDB 7.4.1, anyway).
32 (xgetptr, xgetint, xgettype, xcoding, xcharset, xprintbytestr):
33 Adjust to changes in lisp.h and emacs.c, by using
34 CHECK_LISP_OBJECT_TYPE rather than gdb_use_struct, VALMASK instead
35 of $valmask, DATA_SEG_BITS instead of gdb_data_seg_bits,
36 INTTYPEBITS instead of gdb_gctypebits - 1, USE_LSB_TAG instead of
37 gdb_use_lsb, (1 << GCTYPEBITS) - 1 instead of $tagmask, VALBITS
38 instead of gdb_valbits.
39 (xvectype, xvector, xpr, xprintstr, xbacktrace): Similarly, use
40 PSEUDOVECTOR_FLAG instead of PVEC_FLAG, and ARRAY_MARK_FLAG
41 instead of gdb_array_mark_flag.
42 (xboolvector): Get size from $->size, not $->header.size.
43 Use BOOL_VECTOR_BITS_PER_CHAR rather than mystery constants.
44 (xreload, hook-run, hookpost-run): Remove.
45 * emacs.c: Include <verify.h>.
46 (gdb_use_lsb, gdb_use_struct, gdb_valbits, gdb_gctypebits)
47 (gdb_data_seg_bits, PVEC_FLAG, gdb_array_mark_flag, gdb_pvec_type):
48 Remove.
49 (gdb_CHECK_LISP_OBJECT_TYPE, gdb_DATA_SEG_BITS, gdb_GCTYPEBITS)
50 (gdb_USE_LSB_TAG): New enum constants.
51 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS, GCTYPEBITS, USE_LSB_TAG):
52 Also define these as enum constants, so they're visible to GDB.
53 (ARRAY_MARK_FLAG_VAL, PSEUDOVECTOR_FLAG_VAL, VALMASK_VAL): New macros.
54 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Also define these
55 as constants, so they're visible to GDB.
56 * lisp.h (VALBITS, INTTYPEBITS, FIXNUM_BITS, PSEUDOVECTOR_SIZE_BITS)
57 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK, BOOL_VECTOR_BITS_PER_CHAR):
58 Now enum constants, not macros, so they're visible to GDB.
59 (CHECK_LISP_OBJECT_TYPE, DATA_SEG_BITS): Default to 0, as this is
60 more convenient now. All uses changed.
61 (VALMASK) [USE_LSB_TAG]: Also define in this case.
62 * mem-limits.h (EXCEEDS_LISP_PTR): Adjust to DATA_SEG_BITS change.
63
642012-07-26 Dmitry Antipov <dmantipov@yandex.ru>
65
66 Explicitly free restriction data that are not needed anymore.
67 * editfns.c (save_restriction_restore): Free restriction data.
68
692012-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
70
71 * eval.c (Fautoload_do_load): Rename from do_autoload, export to Lisp,
72 add argument, tune behavior, and adjust all callers.
73
742012-07-25 Paul Eggert <eggert@cs.ucla.edu>
75
76 Use typedef for EMACS_INT, EMACS_UINT.
77 * lisp.h, s/ms-w32.h (EMACS_INT, EMACS_UINT): Use typedefs rather
78 than macros. This simplifies debugging in the usual case, since
79 it lets GDB show addresses as 'EMACS_INT *' rather than 'long int *'
80 and it allows expressions involving EMACS_INT casts.
81 * .gdbinit (xreload): Simplify by using EMACS_INT cast.
82
832012-07-25 Jan Djärv <jan.h.d@swipnet.se>
84
85 * nsterm.m (ns_read_socket): Return early if there is a modal
86 window (Bug#12043).
87
882012-07-25 Martin Rudalics <rudalics@gmx.at>
89
90 * frame.c (Fredirect_frame_focus): In doc-string don't mention
91 that FOCUS-FRAME can be omitted.
92
932012-07-25 Dmitry Antipov <dmantipov@yandex.ru>
94
95 Adjust buffer text indirection counters at the end of Fkill_buffer.
96 * buffer.c (Fkill_buffer): Adjust indirection counters when the
97 buffer is definitely dead. This should really fix an issue reported
98 by Christoph Scholtes again. (Bug#12007).
99 (init_buffer_once): Initialize indirection counters of
100 buffer_defaults and buffer_local_symbols (for sanity and safety).
101
1022012-07-24 Eli Zaretskii <eliz@gnu.org>
103
104 * xdisp.c (init_iterator): Don't compute dimensions of truncation
105 and continuation glyphs on tooltip frames, leave them at zero.
106 Avoids continued lines in tooltips. (Bug#11832)
107
1082012-07-24 Dmitry Antipov <dmantipov@yandex.ru>
109
110 Simplify copy_overlay.
111 * buffer.c (copy_overlay): Simplify. Use build_marker.
112 * lisp.h (struct Lisp_Overlay): Restore comment with minor tweaks.
113
1142012-07-23 Eli Zaretskii <eliz@gnu.org>
115
116 * print.c (print_object): Don't crash when a frame's name is nil
117 or invalid. (Bug#12025)
118
119 * window.c (decode_any_window): Disable CHECK_LIVE_FRAME test, as
120 it signals an error when a tooltip frame is being created.
121
1222012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
123
124 Cleanup miscellaneous objects allocation and initialization.
125 * alloc.c (allocate_misc): Change to static. Add argument to
126 specify the subtype. Adjust comment and users.
127 (build_overlay): New function.
128 * buffer.c (copy_overlays, Fmake_overlay): Use it.
129 * lisp.h (struct Lisp_Overlay): Remove obsolete comment.
130 (allocate_misc): Remove prototype.
131 (build_overlay): Add prototype.
132
1332012-07-23 Dmitry Antipov <dmantipov@yandex.ru>
134
135 Swap buffer text indirection counters in Fbuffer_swap_text.
136 * buffer.c (Fbuffer_swap_text): Swap indirections too.
137 This avoids crash reported by Christoph Scholtes at
138 http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-07/msg00785.html.
139
1402012-07-22 Jan Djärv <jan.h.d@swipnet.se>
141
142 * nsmenu.m (Popdown_data): New struct.
143 (pop_down_menu): p->pointer is Popdown_data. Release the pool and
144 free Popdown_data.
145 (ns_popup_dialog): Use NSAutoreleasePool and pass it to pop_down_menu.
146 (initWithContentRect): Make imgView and contentView non-static
147 and autorelease them. Also autorelease img and matrix (Bug#12005).
148 (dealloc): Remove (Bug#12005).
149
1502012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
151
152 Adjust consing_since_gc when objects are explicitly freed.
153 * alloc.c (GC_DEFAULT_THRESHOLD): New macro.
154 (Fgarbage_collect): Use it. Change minimum to 1/10 of default.
155 (free_cons, free_misc): Subtract object size from consing_since_gc.
156
1572012-07-22 Dmitry Antipov <dmantipov@yandex.ru>
158
159 Simplify and cleanup markers positioning code.
160 * marker.c (attach_marker): More useful eassert.
161 (live_buffer, set_marker_internal): New function.
162 (Fset_marker, set_marker_restricted): Use set_marker_internal.
163 (set_marker_both, set_marker_restricted_both): Use live_buffer.
164
1652012-07-22 Paul Eggert <eggert@cs.ucla.edu>
166
167 * buffer.h (struct buffer.indirections): Now ptrdiff_t, not int,
168 as it's limited by the amount of memory, not by INT_MAX.
169
1702012-07-21 Eli Zaretskii <eliz@gnu.org>
171
172 * keyboard.c (keys_of_keyboard): Bind language-change to 'ignore'
173 in special-event-map. See the discussion at
174 http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00417.html
175 for the reasons.
176
177 * w32menu.c (add_menu_item): Cast to ULONG_PTR when assigning
178 info.dwItemData. Fixes crashes on 64-bit Windows. Suggested by
179 Fabrice Popineau <fabrice.popineau@supelec.fr>.
180
1812012-07-21 Jan Djärv <jan.h.d@swipnet.se>
182
183 * nsterm.m (accessibilityAttributeValue): New function. (Bug#11134).
184 (conversationIdentifier): Return value is NSInteger.
185 * nsterm.m (accessibilityAttributeValue): Surround with NS_IMPL_COCOA.
186
1872012-07-21 Chong Yidong <cyd@gnu.org>
188
189 * window.c (decode_any_window): Signal an error if the window is
190 on a dead frame (Bug#11984).
191
1922012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
193
194 Add indirection counting to speed up Fkill_buffer.
195 * buffer.h (struct buffer): New member.
196 * buffer.c (Fget_buffer_create): Set indirection counter to 0.
197 (Fmake_indirect_buffer): Set indirection counter to -1, increment
198 base buffer indirection counter.
199 (compact_buffer): If ENABLE_CHECKING, verify indirection counters.
200 (Fkill_buffer): Adjust indirection counters as needed, don't walk
201 through buffer list if indirection counter is 0.
202
2032012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
204
205 Extend the value returned by Fgarbage_collect with heap statistics.
206 * alloc.c (Qheap): New symbol.
207 (syms_of_alloc): DEFSYM it.
208 (Fgarbage_collect): If DOUG_LEA_MALLOC, add mallinfo data.
209 (Fmemory_free): Remove.
210 (syms_of_alloc): Don't defsubr it.
211 * buffer.c (Fcompact_buffer): Remove.
212 (syms_of_buffer): Don't defsubr it.
213
2142012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
215
216 Make maybe_gc inline.
217 Verify that inlining is always possible (GCC 4.7.1, -O3 -Winline).
218 * lisp.h (consing_since_gc, gc_relative_threshold)
219 (memory_full_cons_threshold): Revert declaration.
220 (maybe_gc): Remove prototype, define as inline.
221 * alloc.c: Remove old commented-out code.
222 (consing_since_gc, gc_relative_threshold)
223 (memory_full_cons_threshold): Revert to global.
224 (maybe_gc): Remove.
225
2262012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
227
228 Simple wrapper for make_unibyte_string, adjust font_open_by_name.
229 * lisp.h (build_unibyte_string): New function.
230 * dosfns.c, fileio.c, fns.c, ftfont.c, process.c:
231 * sysdep.c, w32fns.c, xfns.c: Use it.
232 * font.c (font_open_by_name): Change 2nd and 3rd args to the only arg
233 of type Lisp_Object to avoid redundant calls to make_unibyte_string.
234 Adjust users accordingly.
235 * font.h (font_open_by_name): Adjust prototype.
236
2372012-07-20 Dmitry Antipov <dmantipov@yandex.ru>
238
239 Cleanup calls to Fgarbage_collect.
240 * lisp.h (maybe_gc): New prototype.
241 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
242 Remove declarations.
243 * alloc.c (maybe_gc): New function.
244 (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold):
245 Make them static.
246 * bytecode.c (MAYBE_GC): Use maybe_gc.
247 * eval.c (eval_sub, Ffuncall): Likewise.
248 * keyboard.c (read_char): Likewise. Adjust call to maybe_gc
249 to avoid dependency from auto-save feature.
250
2512012-07-19 Paul Eggert <eggert@cs.ucla.edu>
252
253 * buffer.h (FOR_EACH_BUFFER): Rename from 'for_each_buffer'.
254 (FOR_EACH_PER_BUFFER_OBJECT_AT): Rename from
255 'for_each_per_buffer_object_at'.
256 All uses changed. It's better to use upper-case for macros that
257 cannot be implemented as functions, to give the reader a clue
258 that they're special.
259
2602012-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
261
262 * alloc.c (Fgarbage_collect): Tweak docstring.
263
2642012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
265
266 Tweak the value returned from Fgarbage_collect again.
267 * alloc.c (Fgarbage_collect): New return value, as confirmed in
268 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00418.html.
269 Adjust documentation.
270 (total_vector_bytes): Rename to total_vector_slots, adjust
271 accounting.
272 (total_free_vector_bytes): Rename to total_free_vector_slots,
273 adjust accounting.
274 (Qstring_bytes, Qvector_slots): New symbols.
275 (syms_of_alloc): DEFSYM them.
276
2772012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
278
279 Buffer compaction primitive which may be used from Lisp.
280 * buffer.c (compact_buffer, Fcompact_buffer): New function.
281 (syms_of_buffer): Register Fcompact_buffer.
282 * alloc.c (Fgarbage_collect): Use compact_buffer.
283 * buffer.h (compact_buffer): New prototype.
284 (struct buffer_text): New member.
285
2862012-07-19 Dmitry Antipov <dmantipov@yandex.ru>
287
288 New macro to iterate over all buffers, miscellaneous cleanups.
289 * lisp.h (all_buffers): Remove declaration.
290 * buffer.h (all_buffers): Add declaration, with comment.
291 (for_each_buffer): New macro.
292 * alloc.c (Fgarbage_collect, mark_object): Use it.
293 * buffer.c (Fkill_buffer, Fbuffer_swap_text, Fset_buffer_multibyte)
294 (init_buffer): Likewise.
295 * data.c (Fset_default): Likewise.
296 * coding.c (code_conversion_restore): Remove redundant check
297 for dead buffer.
298 * buffer.c (Fkill_buffer): Likewise. Remove obsolete comment.
299
3002012-07-18 Andreas Schwab <schwab@linux-m68k.org>
301
302 Fix bug that created negative-length intervals.
303 * intervals.c (merge_interval_right, merge_interval_left):
304 Do not zero out this interval if it is absorbed by its children,
305 as this interval's total length doesn't change in that case. See
306 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00403.html>.
307
3082012-07-18 Paul Eggert <eggert@cs.ucla.edu>
309
310 * alloc.c (Fmake_bool_vector): Fix off-by-8 bug
311 when invoking (make-bool-vector N t) and N is a positive
312 multiple of 8 -- the last 8 bits were mistakenly cleared.
313
314 Remove some struct layout assumptions in bool vectors.
315 * alloc.c (bool_header_size): New constant.
316 (header_size, word_size): Move earlier, as they're now used earlier.
317 Use 'word_size' in a few more places, where it's appropriate.
318 (Fmake_bool_vector, sweep_vectors): Don't assume that there is no
319 padding before the data member of a bool vector.
320 (sweep_vectors): Use PSEUDOVECTOR_TYPEP, in an eassert, rather
321 than doing the check by hand with an abort ().
322
3232012-07-18 Stefan Monnier <monnier@iro.umontreal.ca>
324
325 * eval.c (Fdefvar): Don't check constants since we only set the var if
326 it's not yet defined anyway (bug#11904).
327
328 * lisp.h (last_undo_boundary): Declare new var.
329 * keyboard.c (command_loop_1): Set it.
330 * cmds.c (Fself_insert_command): Use it to only remove boundaries that
331 were auto-added by the command loop (bug#11774).
332
3332012-07-18 Andreas Schwab <schwab@linux-m68k.org>
334
335 * w32font.c (Qsymbol): Remove local definition.
336 (syms_of_w32font): Don't DEFSYM it.
337
3382012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
339
340 Fix sweep_vectors to handle large bool vectors correctly.
341 * alloc.c (sweep_vectors): Account total_vector_bytes for
342 bool vectors larger than VBLOCK_BYTES_MAX.
343
3442012-07-18 Chong Yidong <cyd@gnu.org>
345
346 * frame.c (x_set_frame_parameters): Revert bogus change introduced
347 in 2012-05-25 commit by Paul Eggert (Bug#11738).
348
3492012-07-18 Dmitry Antipov <dmantipov@yandex.ru>
350
351 Return more descriptive data from Fgarbage_collect.
352 Suggested by Stefan Monnier in
353 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00369.html.
354 * alloc.c (bounded_number): New function.
355 (total_buffers, total_vectors): New variable.
356 (total_string_size): Rename to total_string_bytes, adjust users.
357 (total_vector_size): Rename to total_vector_bytes, adjust users.
358 (sweep_vectors): Account total_vectors and total_vector_bytes.
359 (Fgarbage_collect): New return value. Adjust documentation.
360 (gc_sweep): Account total_buffers.
361 (Fmemory_free, Fmemory_use_counts): Use bounded_number.
362 (VECTOR_SIZE): Remove.
363 * data.c (Qfloat, Qvector, Qsymbol, Qstring, Qcons): Make global.
364 (Qinterval, Qmisc): New symbols.
365 (syms_of_data): Initialize them.
366 * lisp.h (Qinterval, Qsymbol, Qstring, Qmisc, Qvector, Qfloat)
367 (Qcons, Qbuffer): New declarations.
368
3692012-07-17 Paul Eggert <eggert@cs.ucla.edu>
370
371 * alloc.c (Fmemory_free): Account for memory-free's own storage.
372 Round up, not down. Improve doc.
373
3742012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
375
376 Restore old code in allocate_string_data to avoid Faset breakage.
377 Reported by Julien Danjou <julien@danjou.info> in
378 http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00371.html.
379 * alloc.c (allocate_string_data): Restore old code with minor
380 adjustments, fix comment to explain this subtle issue.
381
3822012-07-17 Eli Zaretskii <eliz@gnu.org>
383
384 Remove FILE_SYSTEM_CASE.
385 * s/msdos.h (FILE_SYSTEM_CASE): Don't define.
386
387 * fileio.c (FILE_SYSTEM_CASE): Don't define.
388 (Ffile_name_directory, Fexpand_file_name): Don't use FILE_SYSTEM_CASE.
389 Fixes problems on MS-DOS with Vtemp_file_name_pattern when
390 call-process-region passes it through expand-file-name.
391
392 * dired.c (file_name_completion): Don't use FILE_SYSTEM_CASE.
393
3942012-07-17 Andreas Schwab <schwab@linux-m68k.org>
395
396 Fix crash when creating indirect buffer (Bug#11917)
397 * buffer.c (buffer_lisp_local_variables): Add argument CLONE.
398 Don't handle unbound variables specially if non-zero.
399 (Fbuffer_local_variables): Pass zero.
400 (clone_per_buffer_values): Pass non-zero.
401
4022012-07-17 Andreas Schwab <schwab@linux-m68k.org>
403
404 * gnutls.c (emacs_gnutls_handshake): Revert last change. Add QUIT
405 to make the loop interruptible.
406
4072012-07-17 Andreas Schwab <schwab@linux-m68k.org>
408
409 * gnutls.c (emacs_gnutls_handshake): Only retry if
410 GNUTLS_E_INTERRUPTED.
411
4122012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
413
414 Cleanup and convert miscellaneous checks to eassert.
415 * alloc.c (mark_interval): Fix comment, partially rephrase
416 old comment from intervals.h (see below).
417 * intervals.c (find_interval, adjust_intervals_for_insertion)
418 (delete_interval, adjust_intervals_for_deletion)
419 (graft_intervals_into_buffer, temp_set_point_both, copy_intervals):
420 Convert to eassert.
421 (adjust_intervals_for_insertion, make_new_interval):
422 Remove obsolete and unused code.
423 * intervals.h (struct interval): Remove obsolete comment.
424 * textprotp.c (erase_properties): Remove unused code.
425 (Fadd_text_properties, set_text_properties_1, Fremove_text_properties)
426 (Fremove_list_of_text_properties): Convert to eassert.
427
4282012-07-17 Chong Yidong <cyd@gnu.org>
429
430 * editfns.c (Finsert_char): Doc fix.
431
4322012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
433
434 Fix previous change to make Fmemory_free always accurate.
435 * alloc.c (make_interval): Update total_free_intervals.
436 (make_float): Likewise for total_free_floats.
437 (free_cons, Fcons): Likewise for total_free_conses.
438 (SETUP_ON_FREE_LIST, allocate_vector_from_block):
439 Likewise for total_free_vector_bytes.
440 (Fmake_symbol): Likewise for total_free_symbols.
441 (bytes_free): Remove.
442
4432012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
444
445 Simple free memory accounting feature.
446 * alloc.c (bytes_free, total_free_vector_bytes): New variable.
447 (sweep_vectors): Accumulate size of free vectors.
448 (Fgarbage_collect): Setup bytes_free.
449 (Fmemory_free): New function.
450 (syms_of_alloc): Register it.
451
4522012-07-17 Dmitry Antipov <dmantipov@yandex.ru>
453
454 Cleanup overlays checking.
455 * buffer.h (OVERLAY_VALID): Remove as useless synonym of OVERLAYP.
456 * buffer.c (overlay_touches_p, recenter_overlay_lists): Change to
457 eassert and OVERLAYP.
458 (sort_overlays): Change to use OVERLAYP.
459
4602012-07-16 René Kyllingstad <Rene@Kyllingstad.com> (tiny change)
461
462 * editfns.c (Finsert_char): Make it interactive, and make the
463 second arg optional. Copy interactive spec and docstring from
464 ucs-insert.
465
4662012-07-17 Paul Eggert <eggert@cs.ucla.edu>
467
468 * floatfns.c (Fabs): Do not wrap fabs inside IN_FLOAT (Bug#11913).
469 Unlike the other wrapped functions, fabs has an unspecified
470 effect on errno.
471
4722012-07-16 Jan Djärv <jan.h.d@swipnet.se>
473
474 * nsterm.m (keyDown): Interpret flags without left/right bits
475 as the left key (Bug#11670).
476
4772012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
478
479 Remove empty and useless init functions.
480 * lisp.h (init_character_once, init_fns, init_image)
481 (init_filelock, init_sound): Remove prototype.
482 * character.c (init_character_once): Remove.
483 * filelock.c (init_filelock): Likewise.
484 * fns.c (init_fns): Likewise.
485 * image.c (init_image): Likewise.
486 * sound.c (init_sound): Likewise.
487 * emacs.c (main): Adjust accordingly.
488
4892012-07-16 Dmitry Antipov <dmantipov@yandex.ru>
490
491 * gtkutil.h: Tiny cleanups.
492 (use_old_gtk_file_dialog): Remove useless declaration.
493 (xg_uses_old_file_dialog): Add suggested const attribute.
494
4952012-07-15 Eli Zaretskii <eliz@gnu.org>
496
497 * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro.
498 (bidi_paragraph_init): Use it to limit search forward for a strong
499 directional character in abnormally large paragraphs full of
500 neutral or weak characters. (Bug#11943)
501
5022012-07-15 Stefano Facchini <stefano.facchini@gmail.com> (tiny change)
503
504 * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to
505 the toolbar (Bug#9451).
506 (xg_make_tool_item): Give the widget event box a transparent
507 background.
508
5092012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
510
511 Cleanup basic allocation variables and functions.
512 * alloc.c (ignore_warnings, init_intervals, init_float)
513 (init_cons, init_symbol, init_marker): Remove.
514 (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE.
515 (float_block_index): Initialize to FLOAT_BLOCK_SIZE.
516 (cons_block_index): Initialize to CONS_BLOCK_SIZE.
517 (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE.
518 (marker_block_index): Initialize to MARKER_BLOCK_SIZE.
519 (staticidx, init_alloc_once, init_strings, free_ablock):
520 Remove redundant initialization.
521 * fns.c (init_weak_hash_tables): Remove.
522 * lisp.h (init_weak_hash_tables): Remove prototype.
523
5242012-07-15 Dmitry Antipov <dmantipov@yandex.ru>
525
526 Use zero_vector where appropriate.
527 * alloc.c (zero_vector): Define as Lisp_Object. Adjust users
528 accordingly.
529 * lisp.h (zero_vector): New declaration.
530 * font.c (null_vector): Remove.
531 (syms_of_font): Remove initialization and staticpro.
532 (font_list_entities, font_find_for_lface): Change to use zero_vector.
533 * keymap.c (Faccessible_keymaps): Likewise.
534
5352012-07-15 Leo Liu <sdl.web@gmail.com>
536
537 * fringe.c: Fix typo in comments.
538
5392012-07-14 Leo Liu <sdl.web@gmail.com>
540
541 * fringe.c: Add a new bitmap exclamation-mark.
542
5432012-07-14 Eli Zaretskii <eliz@gnu.org>
544
545 * gmalloc.c (GMALLOC_INHIBIT_VALLOC): Don't reference.
546
547 * s/msdos.h (BSD_SYSTEM, DATA_START, GC_SETJMP_WORKS, HAVE_MOUSE)
548 (HAVE_MENUS): Don't define, defined by editing config.in with
549 msdos/sed2v2.inp.
550 (GMALLOC_INHIBIT_VALLOC): Don't define.
551 (MODE_LINE_BINARY_TEXT): Remove, not used anymore.
552
5532012-07-14 Juanma Barranquero <lekktu@gmail.com>
554
555 * s/ms-w32.h (GC_SETJMP_WORKS, GC_MARK_STACK): Set in nt/config.nt.
556
5572012-07-14 Glenn Morris <rgm@gnu.org>
558
559 * s/aix4-2.h, s/freebsd.h, s/gnu-linux.h, s/hpux10-20.h:
560 * s/irix6-5.h, s/netbsd.h, s/sol2-6.h, s/unixware.h:
561 Let configure set GC_SETJMP_WORKS, GC_MARK_STACK.
562
5632012-07-13 Glenn Morris <rgm@gnu.org>
564
565 * s/gnu-linux.h (GC_MARK_SECONDARY_STACK): Let configure set it.
566
567 * s/usg5-4-common.h (SETUP_SLAVE_PTY): Let configure set it.
568 * s/irix6-5.h (SETUP_SLAVE_PTY): No more need to unset it.
569
5702012-07-13 Jan Djärv <jan.h.d@swipnet.se>
571
572 * nsterm.m (uRect): Only define if NS_IMPL_GNUSTEP.
573 (x_free_frame_resources): Pass x_free_frame_resources to NSTRACE.
574 (ns_lisp_to_color, ns_string_to_lispmod, ns_term_init)
575 (ns_term_shutdown, requestService, initFrameFromEmacs): Use SSDATA
576 where appropriate.
577 (ns_exec_path, ns_load_path, changeFont): Put () around assignment used
578 as boolean expression.
579 (x_set_window_size): Remove unused variable toolbar.
580 (ns_get_color_default, ns_mod_to_lisp): Remove.
581 (ns_mouse_position): Remove unused variables xchar and ychar.
582 (ns_compute_glyph_string_overhangs): Remove unused variable face.
583 (ns_set_vertical_scroll_bar): Remove unused variable count.
584 (ns_delete_terminal): Remove unused variable i.
585 (ns_term_init): Remove unused variables r, g and b.
586 (mouseDown): Remove unused variable window.
587 (windowDidResize): Move definition of theWindow inside NS_IMPL_GNUSTEP.
588 (initFrameFromEmacs): Remove unused variable vbextra.
589 (mouseEntered): Remove unused variables p and dpyinfo.
590 (mouseExited): Remove unused variables p and r.
591 (ns_define_frame_cursor, ns_clear_frame_area)
592 (ns_draw_window_cursor, ns_initialize_display_info): Make static.
593 (menuDown): Assign [sender tag] to variable and cast the variable.
594
595 * nsterm.h (menuDown): Add id as type to argument sender.
596 (ns_display_info_for_name): Add Lisp_Object argument.
597 (ns_term_init): Add Lisp_Object argument.
598 (ns_map_event_to_object): Add void argument.
599 (ns_string_from_pasteboard, ns_string_to_pasteboard): Add correct
600 prototype with arguments and only declare if __OBJC__.
601 (nxatoms_of_nsselect): Add void argument.
602 (ns_lisp_to_cursor_type): Add Lisp_Object argument.
603 (ns_alloc_autorelease_pool): Add void argument.
604 (ns_release_autorelease_pool): Add void* argument.
605 (ns_get_defaults_value): Add const char* argument.
606
607 * nsmenu.m (ns_update_menubar, ns_menu_show, process_dialog)
608 (initFromContents): Use SSDATA where appropriate.
609 (ns_update_menubar): Add braces to ambigous if-else.
610 (initWithTitle): Put () around assignment in if statement.
611 (ns_menu_show): Remove unused variables window and keymap.
612 (update_frame_tool_bar): Remove unused variable selected_p.
613 (initWithContentRect): Remove unused variable this_cmd_name.
614
615 * nsimage.m (ns_load_image, allocInitFromFile): Use SSDATA where
616 appropriate.
617 (setXBMColor): Remove unused variable len.
618 (setPixmapData): Put () around assignment in loop statement.
619
620 * nsfont.m (ns_get_family, ns_lang_to_script, ns_otf_to_script)
621 (ns_registry_to_script, ns_get_req_script, nsfont_open): Use SSDATA
622 where appropriate.
623 (ns_get_covering_families, ns_findfonts, nsfont_list_family): Put ()
624 around assignment in loop statement.
625 (nsfont_open): Remove unused variable i.
626 (nsfont_open): Remove unused variable len.
627 (nsfont_draw): Remove unused variable cs.
628
629 * nsfns.m (x_set_icon_name, ns_set_name_internal)
630 (ns_set_name_as_filename, ns_implicitly_set_icon_type)
631 (x_set_icon_type, ns_lisp_to_cursor_type, Fns_read_file_name)
632 (Fns_get_resource, Fns_set_resource, Fx_open_connection)
633 (Fns_font_name, Fns_perform_service)
634 (Fns_convert_utf8_nfd_to_nfc, ns_do_applescript)
635 (Fns_do_applescript, Fx_show_tip): Use SSDATA where appropriate.
636 (ns_set_name): Remove unused variable view.
637 (x_set_menu_bar_lines): Remove unused variable olines.
638 (x_set_tool_bar_lines): Remove unused variable root_window.
639 (Fns_list_colors): Put () around assignment in while statement.
640 (Fns_perform_service): Remove unused variable len.
641 (Fns_display_usable_bounds): Remove unused variable top.
642 (syms_of_nsfns): Remove unused variable i.
643
644 * nsmenu.m (ns_update_menubar): Exchange place of argument 2 and 3 to
645 memcpy (Bug#11907).
646
6472012-07-13 Kalle Kankare <kalle.kankare@iki.fi> (tiny change)
648
649 * image.c (Fimagemagick_types): Initialize ex with GetExceptionInfo
650 and free it with DestroyExceptionInfo (Bug#11558).
651
6522012-07-13 Juanma Barranquero <lekktu@gmail.com>
653
654 * s/ms-w32.h (FIRST_PTY_LETTER, HAVE_SOCKETS): Move to nt/config.nt.
655 (HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE___BUILTIN_UNWIND_INIT):
656 Set here, not in nt/config.nt.
657
6582012-07-13 Eli Zaretskii <eliz@gnu.org>
659
660 * xdisp.c (move_it_in_display_line_to): On GUI terminals, allow
661 cursor overflow into the last glyph on display line when the right
662 fringe is off. (Bug#11832)
663
6642012-07-13 Paul Eggert <eggert@cs.ucla.edu>
665
666 * xdisp.c (produce_special_glyphs): Now static.
667 * dispextern.h (produce_special_glyphs): Remove decl.
668
6692012-07-13 Glenn Morris <rgm@gnu.org>
670
671 * s/bsd-common, s/cygwin.h: Remove empty files.
672 * s/freebsd.h, s/netbsd.h: Do not include bsd-common.h.
673
674 * s/usg5-4-common.h (USG, USG5):
675 * s/template.h (USG5, USG, HPUX, BSD4_2, BSD_SYSTEM):
676 * s/sol2-6.h (SOLARIS2):
677 * s/irix6-5.h (IRIX6_5):
678 * s/hpux10-20.h (USG, USG5, HPUX):
679 * s/gnu-linux.h (USG, GNU_LINUX):
680 * s/freebsd.h (BSD_SYSTEM):
681 * s/darwin.h (BSD4_2, BSD_SYSTEM, DARWIN_OS):
682 * s/cygwin.h (CYGWIN):
683 * s/bsd-common.h (BSD_SYSTEM, BSD4_2):
684 * s/aix4-2.h (USG, USG5, _AIX): Move "system type" macros to configure.
685
6862012-07-13 BT Templeton <bpt@hcoop.net> (tiny change)
687
688 * nsfont.m (ns_charset_covers): Don't abort if no bitmap (Bug#11853).
689
6902012-07-13 Glenn Morris <rgm@gnu.org>
691
692 * s/usg5-4-common.h (NSIG_MINIMUM): Let configure set it.
693
694 * s/gnu-linux.h, s/irix6-5.h: Let configure set ULIMIT_BREAK_VALUE.
695
696 * process.c (init_process_emacs): Replace MIN_PTY_KERNEL_VERSION.
697 * s/darwin.h (MIN_PTY_KERNEL_VERSION): Remove single-use macro.
698
6992012-07-12 Glenn Morris <rgm@gnu.org>
700
701 * s/darwin.h (SYSTEM_PURESIZE_EXTRA): Move to configure.
702
703 * process.c (init_process_emacs): Rename from init_process.
704 The old name is also the name of a Mach system call.
705 * lisp.h, emacs.c: Update for this name change.
706 * nsgui.h, sysselect.h, s/darwin.h: Remove workaround that is no
707 longer needed.
708
7092012-07-12 Eli Zaretskii <eliz@gnu.org>
710
711 * xdisp.c (insert_left_trunc_glyphs): Fix incorrect size in
712 memmove call that removes glyphs covered by the left truncation
713 glyph. Improve commentary.
714 (display_line): Fix display of continuation glyphs on GUI frames
715 when the right fringe is turned off and variable-size fonts are
716 used in the window. Move the code that appends a stretch glyph to
717 produce_special_glyphs, so that it could be used for truncation
718 and continuation glyphs alike.
719 (produce_special_glyphs) [HAVE_WINDOW_SYSTEM]: Produce a stretch
720 glyph of a suitably computed width, to align the special glyphs at
721 the window margin. Code moved from display_line. (Bug#11832)
722
7232012-07-12 Glenn Morris <rgm@gnu.org>
724
725 * s/aix4-2.h, s/hpux10-20.h: Let configure set NO_EDITRES.
726
727 * s/gnu-linux.h, s/hpux10-20.h:
728 Do not unconditionally define HAVE_XRMSETDATABASE.
729
730 * s/gnu-linux.h (UNIX98_PTYS): Let configure set it.
731
7322012-07-12 Paul Eggert <eggert@cs.ucla.edu>
733
734 Fix typos that broke OS X build.
735 Reported by Randal L. Schwartz in
736 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00225.html>.
737 * nsterm.m (ns_timeout): Add missing local decl.
738 (ns_get_color): snprintf -> sprintf, to fix typo.
739
7402012-07-12 Glenn Morris <rgm@gnu.org>
741
742 * src/s/aix4-2.h, src/s/cygwin.h, src/s/darwin.h:
743 * src/s/gnu-linux.h, src/s/hpux10-20.h, src/s/irix6-5.h:
744 * src/s/sol2-6.h, src/s/unixware.h, src/s/usg5-4-common.h:
745 Move PTY_NAME_SPRINTF, PTY_TTY_NAME_SPRINTF to configure.
746
747 * s/cygwin.h, s/darwin.h, s/gnu-linux.h, s/irix6-5.h:
748 Move PTY_OPEN to configure.
749
750 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
751 * s/gnu-linux.h, s/hpux10-20.h, s/irix6-5.h, s/template.h:
752 * s/usg5-4-common.h: Move FIRST_PTY_LETTER, PTY_ITERATION to configure.
753
7542012-07-12 Dmitry Antipov <dmantipov@yandex.ru>
755
756 Use empty_unibyte_string where applicable.
757 * keyboard.c (parse_tool_bar_item): Use empty_unibyte_string.
758 * lread.c (read1): Likewise.
759 * xsettings.c (syms_of_xsettings): Likewise.
760
7612012-07-12 Glenn Morris <rgm@gnu.org>
762
763 * s/cygwin.h (G_SLICE_ALWAYS_MALLOC):
764 * s/freebsd.h (BROKEN_PTY_READ_AFTER_EAGAIN):
765 * s/irix6-5.h (SETPGRP_RELEASES_CTTY, PREFER_VSUSP):
766 * s/hpux10-20.h (RUN_TIME_REMAP):
767 * s/bsd-common.h (TABDLY): Move to configure.
768
769 * s/hpux10-20.h, s/sol2-6.h: Move XOS_NEEDS_TIME_H to configure.
770
771 * s/bsd-common.h, s/darwin.h: Move TAB3 to configure.
772
773 * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
774 (BROKEN_SIGPOLL, BROKEN_GET_CURRENT_DIR_NAME): Let configure set them.
775
776 * s/darwin.h (NO_ABORT, NO_MATHERR): Let configure set them.
777
778 * s/bsd-common.h, s/cygwin.h, s/gnu-linux.h, s/irix6-5.h:
779 * s/template.h: Move NARROWPROTO to configure.
780
7812012-07-11 Glenn Morris <rgm@gnu.org>
782
783 * s/gnu-linux.h, s/sol2-6.h: No longer define POSIX,
784 unused since 2011-01-17 change to systty.h.
785
786 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h, s/gnu-linux.h:
787 * s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
788 Move HAVE_PTYS and HAVE_SOCKETS to configure.
789
7902012-07-11 Paul Eggert <eggert@cs.ucla.edu>
791
792 * s/sol2-6.h (HAVE_LIBKSTAT): Remove. (Bug#11914)
793
7942012-07-11 Glenn Morris <rgm@gnu.org>
795
796 * s/darwin.h, s/gnu-linux.h, s/template.h:
797 Move INTERRUPT_INPUT to configure.
798
7992012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
800
801 Minor adjustments to interning code.
802 * lisp.h (intern, intern_c_string): Redefine as static inline
803 wrappers for intern_1 and intern_c_string_1, respectively.
804 (intern_1, intern_c_string_1): Rename prototypes.
805 * lread.c (intern_1, intern_c_string_1, oblookup): Simplify
806 Vobarray checking.
807 * font.c (font_intern_prop): Likewise. Adjust comment.
808 * w32font.c (intern_font_name): Likewise.
809
8102012-07-11 Andreas Schwab <schwab@linux-m68k.org>
811
812 * gnutls.c (Fgnutls_boot): Properly parse :keylist argument.
813
814 * coding.c (Fdefine_coding_system_internal): Use XCAR/XCDR instead
815 of Fcar/Fcdr if possible.
816 * font.c (check_otf_features): Likewise.
817 * fontset.c (Fnew_fontset): Likewise.
818 * gnutls.c (Fgnutls_boot): Likewise.
819 * minibuf.c (read_minibuf): Likewise.
820 * msdos.c (IT_set_frame_parameters): Likewise.
821 * xmenu.c (Fx_popup_dialog): Likewise.
822 * w32menu.c (Fx_popup_dialog): Likewise.
823
8242012-07-11 Glenn Morris <rgm@gnu.org>
825
826 * s/bsd-common.h, s/cygwin.h: No need to undefine INTERRUPT_INPUT,
827 since nothing has defined it on these platforms.
828
829 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/gnu-linux.h:
830 * s/irix6-5.h: Move SIGNALS_VIA_CHARACTERS to configure.
831
832 * s/aix4-2.h, s/bsd-common.h, s/cygwin.h, s/darwin.h:
833 * s/gnu-linux.h, s/hpux10-20.h, s/template.h, s/usg5-4-common.h:
834 Move CLASH_DETECTION to configure.
835
836 * s/gnu.h: Remove file, which is now empty.
837
838 * s/gnu.h, s/gnu-linux.h:
839 Move GNU_LIBRARY_PENDING_OUTPUT_COUNT to configure.
840
8412012-07-11 John Wiegley <johnw@newartisans.com>
842
843 * alloc.c (mark_memory): Guard the "no_address_safety_analysis"
844 function attribute, so we only use it if it exists in the
845 compiler.
846
8472012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
848
849 Avoid call to strlen in fast_c_string_match_ignore_case.
850 * search.c (fast_c_string_match_ignore_case): Change to use
851 length argument. Adjust users accordingly.
852 * lisp.h (fast_c_string_match_ignore_case): Adjust prototype.
853
8542012-07-11 Paul Eggert <eggert@cs.ucla.edu>
855
856 Assume mkdir, rmdir.
857 * sysdep.c (mkdir) [!HAVE_MKDIR]: Remove.
858 * sysdep.c (rmdir) [!HAVE_RMDIR]: Remove.
859
860 Assume rename.
861 * sysdep.c (rename) [!HAVE_RENAME]: Remove.
862
863 Assume perror.
864 * s/hpux10-20.h (HAVE_PERROR): Remove.
865 * sysdep.c (perror) [HPUX && !HAVE_PERROR]:
866 Remove dummy definition, as this problem was obsolete long ago.
867
868 Assume strerror.
869 * sysdep.c (strerror) [!HAVE_STRERROR && !WINDOWSNT]: Remove.
870
8712012-07-11 Dmitry Antipov <dmantipov@yandex.ru>
872
873 Avoid calls to strlen in font processing functions.
874 * font.c (font_parse_name, font_parse_xlfd, font_parse_fcname)
875 (font_open_by_name): Change to use length argument. Adjust
876 users accordingly.
877 * font.h (font_open_by_name, font_parse_xlfd, font_unparse_xlfd):
878 Adjust prototypes.
879 * xfont.c (xfont_decode_coding_xlfd, font_unparse_xlfd):
880 Change to return ptrdiff_t.
881 (xfont_list_pattern, xfont_match): Use length returned by
882 xfont_decode_coding_xlfd.
883 * xfns.c (x_default_font_parameter): Omit useless xstrdup.
884
8852012-07-11 Glenn Morris <rgm@gnu.org>
886
887 * s/darwin.h, s/freebsd.h, s/netbsd.h:
888 Move DONT_REOPEN_PTY to configure.
889
890 * sound.c (DEFAULT_SOUND_DEVICE) [!WINDOWSNT]:
891 * s/netbsd.h (DEFAULT_SOUND_DEVICE): Let configure set it.
892
8932012-07-10 Paul Eggert <eggert@cs.ucla.edu>
894
895 Remove "#define unix" that is no longer needed (Bug#11905).
896 * s/aix4-2.h (unix): Remove; no longer needed.
897
898 EMACS_TIME simplification (Bug#11875).
899 This replaces macros (which typically do not work in GDB)
900 with functions, typedefs and enums, making the code easier to debug.
901 The functional style also makes code easier to read and maintain.
902 * systime.h: Include <sys/time.h> on all hosts, not just if
903 WINDOWSNT, since 'struct timeval' is needed in general.
904 (EMACS_TIME): Now a typedef, not a macro.
905 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): Now constants,
906 not macros.
907 (EMACS_SECS, EMACS_NSECS, EMACS_TIME_SIGN, EMACS_TIME_VALID_P)
908 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE, EMACS_TIME_EQ)
909 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE, EMACS_TIME_LT)
910 (EMACS_TIME_LE): Now functions, not macros.
911 (EMACS_SET_SECS, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS)
912 (EMACS_SET_USECS, EMACS_SET_SECS_USECS): Remove these macros,
913 which are not functions. All uses rewritten to use:
914 (make_emacs_time): New function.
915 (EMACS_SECS_ADDR, EMACS_SET_INVALID_TIME, EMACS_GET_TIME)
916 (EMACS_ADD_TIME, EMACS_SUB_TIME): Remove these macros, which are
917 not functions. All uses rewritten to use the following, respectively:
918 (emacs_secs_addr, invalid_emacs_time, get_emacs_time)
919 (add_emacs_time, sub_emacs_time): New functions.
920 * atimer.c: Don't include <sys/time.h>, as "systime.h" does this.
921 * fileio.c (Fcopy_file):
922 * xterm.c (XTflash): Get the current time closer to when it's used.
923 * makefile.w32-in ($(BLD)/atimer.$(O)): Update dependencies.
924
925 * bytecode.c (targets): Suppress -Woverride-init warnings.
926
927 Simplify by avoiding confusing use of strncpy etc.
928 * doc.c (Fsnarf_documentation):
929 * fileio.c (Ffile_name_directory, Fsubstitute_in_file_name):
930 * frame.c (Fmake_terminal_frame):
931 * gtkutil.c (get_utf8_string):
932 * lread.c (openp):
933 * nsmenu.m (ns_update_menubar):
934 * regex.c (regerror):
935 Prefer memcpy to strncpy and strncat when either will do.
936 * fileio.c (Fsubstitute_in_file_name):
937 * keyboard.c (MULTI_LETTER_MOD, parse_modifiers_uncached)
938 (menu_separator_name_p):
939 * nsmenu.m (ns_update_menubar):
940 Prefer memcmp to strncmp when either will do.
941 * nsterm.m: Include <ftoastr.h>.
942 (ns_get_color):
943 * s/gnu-linux.h, s/sol2-6.h, s/unixware.h (PTY_TTY_NAME_SPRINTF):
944 Prefer snprintf to strncpy.
945 * nsterm.m (ns_term_init):
946 * widget.c (set_frame_size) [0]: Prefer xstrdup to xmalloc + strncpy.
947 * nsterm.m (ns_term_init):
948 Avoid the need for strncpy, by using build_string or
949 make_unibyte_string directly. Use dtoastr, not snprintf.
950 * process.c (Fmake_network_process): Diagnose service names that
951 are too long, rather than silently truncating them or creating
952 non-null-terminated names.
953 (Fnetwork_interface_info): Likewise, for interface names.
954 * sysdep.c (system_process_attributes) [GNU_LINUX]:
955 Prefer sprintf to strncat.
956 * xdisp.c (debug_method_add) [GLYPH_DEBUG]:
957 Prefer vsnprintf to vsprintf + strncpy.
958
9592012-07-10 Glenn Morris <rgm@gnu.org>
960
961 * dispnew.c (PENDING_OUTPUT_COUNT) [!__GNU_LIBRARY__]:
962 Clarify fallback case.
963
9642012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
965
966 Use XCAR and XCDR instead of Fcar and Fcdr where possible.
967 * callint.c, coding.c, doc.c, editfns.c, eval.c, font.c, fontset.c,
968 * frame.c, gnutls.c, minibuf.c, msdos.c, textprop.c, w32fns.c,
969 * w32menu.c, window.c, xmenu.c: Change to use XCAR and XCDR
970 where argument type is known to be a Lisp_Cons.
971
9722012-07-10 Tom Tromey <tromey@redhat.com>
973
974 * bytecode.c (BYTE_CODE_THREADED): New macro.
975 (BYTE_CODES): New macro. Replaces all old byte-code defines.
976 (enum byte_code_op): New type.
977 (CASE, NEXT, FIRST, CASE_DEFAULT, CASE_ABORT): New macros.
978 (exec_byte_code): Use them. Use token threading when applicable.
979
9802012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
981
982 Optimize pure C strings initialization.
983 * lisp.h (make_pure_string): Fix prototype.
984 (build_pure_c_string): New function, defined as static inline. This
985 provides a better opportunity to optimize away calls to strlen when
986 the function is called with compile-time constant argument.
987 * alloc.c (make_pure_c_string): Fix comment. Change to add nchars
988 argument, adjust users accordingly. Use build_pure_c_string where
989 appropriate.
990 * buffer.c, coding.c, data.c, dbusbind.c, fileio.c, fontset.c, frame.c,
991 * keyboard.c, keymap.c, lread.c, search.c, syntax.c, w32fns.c, xdisp.c,
992 * xfaces.c, xfns.c, xterm.c: Use build_pure_c_string where appropriate.
993
9942012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
995
996 Avoid calls to strlen in miscellaneous functions.
997 * buffer.c (init_buffer): Use precalculated len, adjust if needed.
998 * font.c (Ffont_xlfd_name): Likewise. Change to call make_string.
999 * lread.c (openp): Likewise.
1000
10012012-07-10 Dmitry Antipov <dmantipov@yandex.ru>
1002
1003 Avoid calls to strlen in path processing functions.
1004 * fileio.c (file_name_as_directory): Add comment. Change to add
1005 srclen argument and return the length of result. Adjust users
1006 accordingly.
1007 (directory_file_name): Fix comment. Change to add srclen argument,
1008 swap 1st and 2nd arguments to obey the common convention. Adjust
1009 users accordingly.
1010 * filelock.c (fill_in_lock_file_name): Avoid calls to strlen.
1011
10122012-07-10 Glenn Morris <rgm@gnu.org>
1013
1014 * s/cygwin.h, s/darwin.h, s/freebsd.h, s/netbsd.h, s/unixware.h:
1015 Move PENDING_OUTPUT_COUNT definition to configure.
1016
1017 * s/irix6-5.h (DATA_START, DATA_SEG_BITS):
1018 * s/hpux10-20.h (DATA_SEG_BITS, DATA_START):
1019 * s/gnu.h (DATA_START): Move definitions to configure.
1020
1021 * s/irix6-5.h (SETUP_SLAVE_PTY, PTY_NAME_SPRINTF): Drop ifdef guards.
1022 We include usg5-4-common.h, which defines them both.
1023
1024 * s/gnu.h: Don't include fcntl.h (every file in Emacs that uses
1025 O_RDONLY already includes it).
1026
1027 Stop ns builds setting the EMACSLOADPATH environment variable.
1028 * nsterm.m (ns_load_path): Rename from ns_init_paths.
1029 Now it does not set EMACSLOADPATH, just returns the load-path string.
1030 * nsterm.h: Update accordingly.
1031 * lread.c [HAVE_NS]: Include nsterm.h.
1032 (init_lread) [HAVE_NS]: Use ns_load_path.
1033 * emacs.c (main) [HAVE_NS]: No longer call ns_init_paths.
1034
10352012-07-09 Glenn Morris <rgm@gnu.org>
1036
1037 * s/gnu.h (SIGNALS_VIA_CHARACTERS): No need to define it here,
1038 since the included bsd-common.h does so.
1039
1040 Stop ns builds setting the EMACSPATH environment variable.
1041 * nsterm.m (ns_exec_path): New function, split from ns_init_paths.
1042 (ns_init_paths): Do not set EMACSPATH.
1043 * nsterm.h (ns_exec_path): Add it.
1044 * callproc.c (init_callproc_1, init_callproc) [HAVE_NS]:
1045 Use ns_exec_path.
1046
1047 * nsterm.m, nsterm.h (ns_etc_directory): Fix type, empty return.
1048
10492012-07-09 Paul Eggert <eggert@cs.ucla.edu>
1050
1051 * process.c (wait_reading_process_output): 'waitchannels' was unset
1052 when read_kbd || !NILP (wait_for_cell); fix this.
1053
1054 Add GCC-style 'const' attribute to functions that can use it.
1055 * character.h (char_resolve_modifier_mask):
1056 * keyboard.h (make_ctrl_char):
1057 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe)
1058 (init_character_once, next_almost_prime, init_fns, init_image)
1059 (flush_pending_output, init_sound):
1060 * mem-limits.h (start_of_data):
1061 * menu.h (finish_menu_items):
1062 Add ATTRIBUTE_CONST.
1063 * emacs.c (DEFINE_DUMMY_FUNCTION):
1064 Declare the dummy function with ATTRIBUTE_CONST.
1065 * lisp.h (Fbyteorder, Fmax_char, Fidentity):
1066 Add decls with ATTRIBUTE_CONST.
1067
1068 Minor improvements to make_formatted_string.
1069 * alloc.c (make_formatted_string): Prefer int to ptrdiff_t
1070 where int is good enough, as vsprintf returns an int.
1071 * lisp.h (make_formatted_string): Add ATTRIBUTE_FORMAT_PRINTF.
1072
10732012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
1074
1075 Use make_formatted_string to avoid double length calculation.
1076 * lisp.h (make_formatted_string): New prototype.
1077 * alloc.c (make_formatted_string): New function.
1078 * buffer.c (Fgenerate_new_buffer_name): Use it.
1079 * dbus.c (syms_of_dbusbind): Likewise.
1080 * editfns.c (Fcurrent_time_zone): Likewise.
1081 * filelock.c (get_boot_time): Likewise.
1082 * frame.c (make_terminal_frame, set_term_frame_name)
1083 (x_report_frame_params): Likewise.
1084 * image.c (gs_load): Likewise.
1085 * minibuf.c (get_minibuffer): Likewise.
1086 * msdos.c (dos_set_window_size): Likewise.
1087 * process.c (make_process): Likewise.
1088 * xdisp.c (ensure_echo_area_buffers): Likewise.
1089 * xsettings.c (apply_xft_settings): Likewise.
1090
10912012-07-09 Glenn Morris <rgm@gnu.org>
1092
1093 Stop ns builds polluting the environment with EMACSDATA, EMACSDOC.
1094 * nsterm.m (ns_etc_directory): New function, split from ns_init_paths.
1095 (ns_init_paths): Do not set EMACSDATA, EMACSDOC.
1096 * nsterm.h (ns_etc_directory): Add it.
1097 * callproc.c [HAVE_NS]: Include nsterm.h.
1098 (init_callproc_1, init_callproc) [HAVE_NS]: Use ns_etc_directory.
1099
11002012-07-09 Dmitry Antipov <dmantipov@yandex.ru>
1101
1102 Move marker debugging code under MARKER_DEBUG.
1103 * marker.c (MARKER_DEBUG): Move marker debugging code under
1104 #ifdef MARKER_DEBUG because byte_char_debug_check is too slow
1105 for bootstrap with --enable-checking (~3x slowdown reported
1106 by Juanma Barranquero <lekktu@gmail.com>).
1107 (verify_bytepos): Move under #ifdef MARKER_DEBUG.
1108
11092012-07-08 Paul Eggert <eggert@cs.ucla.edu>
1110
1111 * systime.h (EMACS_SUB_TIME): Clarify behavior with unsigned time_t.
1112 See <http://bugs.gnu.org/11825#29>.
1113
11142012-07-08 Eli Zaretskii <eliz@gnu.org>
1115
1116 * xdisp.c (fill_glyphless_glyph_string): If the face of the glyph
1117 has no font, use the frame's font. (Bug#11813)
1118 (display_line): Add commentary about displaying truncation glyphs
1119 on GUI frames.
1120 (produce_special_glyphs): Move here from term.c.
1121
1122 * term.c (produce_special_glyphs): Move to xdisp.c.
1123
1124 * dispextern.h (produce_special_glyphs): Move prototype to xdisp.c
1125 section.
1126
11272012-07-07 Andreas Schwab <schwab@linux-m68k.org>
1128
1129 * xdisp.c (display_line): Avoid warning about implicit declaration
1130 of FRAME_FONT.
1131
1132 * frame.c (get_frame_param): Define only if HAVE_WINDOW_SYSTEM.
1133
1134 * lisp.h: Remove empty conditional.
1135
11362012-07-07 Paul Eggert <eggert@cs.ucla.edu>
1137
1138 * lread.c (load_path_check): Now static.
1139
1140 Fix some minor --with-ns problems found by static checking.
1141 * frame.c (Ftool_bar_pixel_width) [!FRAME_TOOLBAR_WIDTH]:
1142 (x_set_font) [!HAVE_X_WINDOWS]:
1143 * image.c (xpm_load_image) [HAVE_NS]:
1144 (x_to_xcolors) [!HAVE_X_WINDOWS && !HAVE_NTGUI]:
1145 (x_disable_image) [!HAVE_NS && !HAVE_NTGUI]:
1146 Remove unused local.
1147 (Fx_parse_geometry) [HAVE_NS]: Don't return garbage.
1148 (xpm_load_image) [HAVE_NS && !HAVE_XPM]: Remove unused label.
1149 * image.c (x_create_bitmap_from_file) [HAVE_NS]:
1150 (xpm_load_image, xpm_load) [HAVE_NS && !HAVE_XPM]:
1151 * nsselect.m (symbol_to_nsstring, ns_string_to_pasteboard_internal):
1152 * xfaces.c (Fx_load_color_file) [!HAVE_X_WINDOWS]:
1153 Fix pointer signedness problem.
1154 * xfaces.c (FRAME_X_FONT_TABLE):
1155 * xterm.h (FRAME_X_FONT_TABLE): Remove unused, incompatible macros.
1156
11572012-07-07 Glenn Morris <rgm@gnu.org>
1158
1159 * lread.c (load_path_check): New function, split from init_lread.
1160 (init_lread): Reorganize. Motivation:
1161 If EMACSLOADPATH is set, check/warn about that rather than the
1162 defaults, which we are not going to use. Hence we can remove
1163 the turn_off_warning and WINDOWSNT || HAVE_NS tests.
1164 Don't warn if site-lisp directories are missing.
1165 If not installed, start from a blank load-path, since
1166 PATH_LOADSEARCH refers to the eventual installation directories.
1167
11682012-07-07 Eli Zaretskii <eliz@gnu.org>
1169
1170 Support truncation and continuation glyphs on GUI frames, when
1171 fringes are disabled. (Bug#11832)
1172 * xdisp.c (init_iterator): Get dimensions of truncation and
1173 continuation glyphs even if on GUI frames. Adjust
1174 it->last_visible_x on GUI frames when the left or right fringes,
1175 or both, are absent.
1176 (start_display, move_it_in_display_line_to): Handle the case of a
1177 GUI frame without a fringe to display continuation or truncation
1178 glyphs.
1179 (insert_left_trunc_glyphs): Support GUI frames: make sure
1180 truncation glyphs overwrite enough glyphs from the current line to
1181 have sufficient space in pixels.
1182 (display_line): Support truncation and continuation glyphs on GUI
1183 frames. If some spare pixels are left on the line after inserting
1184 the truncation glyphs, fill that space with a stretch glyph of a
1185 suitably computed width.
1186
1187 * term.c (produce_special_glyphs): Call PRODUCE_GLYPHS, not
1188 produce_glyphs, to support GUI sessions.
1189
11902012-07-07 Paul Eggert <eggert@cs.ucla.edu>
1191
1192 * sysdep.c (ULLONG_MAX): Define if not already defined (Bug#11781).
1193
1194 * sysdep.c (list_system_processes): Port to NetBSD-current (Bug#11797).
1195
1196 Do not require float-time's arg to fit in time_t (Bug#11825).
1197 This works better on hosts where time_t is unsigned, and where
1198 float-time is applied to the (negative) difference between two times.
1199 * editfns.c (decode_time_components): Last arg is now double *,
1200 not int *, and means to store all the result as a double, without
1201 worrying about whether the seconds part fits in time_t.
1202 All callers changed.
1203 (lisp_time_argument): Remove last int * arg, as it's no longer needed.
1204 All callers changed.
1205 (Ffloat_time): Do not fail merely because the specified time falls
1206 outside of time_t range.
1207
12082012-07-07 Glenn Morris <rgm@gnu.org>
1209
1210 * s/darwin.h (HAVE_RES_INIT, HAVE_LIBRESOLV):
1211 * s/hpux10-20.h (HAVE_RINT, HAVE_RANDOM):
1212 * s/unixware.h (HAVE_GETWD): Move undefs to configure (effectively).
1213
12142012-07-07 Juanma Barranquero <lekktu@gmail.com>
1215
1216 * makefile.w32-in (DISPEXTERN_H, $(BLD)/regex.$(O)):
1217 Update dependencies.
1218
1219 * s/ms-w32.h [_MSC_VER]: Remove strcasecmp, strncasecmp.
1220
12212012-07-06 Paul Eggert <eggert@cs.ucla.edu>
1222
1223 Use c_strcasecmp for ASCII case-insensitive comparison (Bug#11786).
1224 * dispextern.h, nsfns.m, nsterm.m: Include <c-strcase.h>.
1225 * dispextern.h (xstrcasecmp): Rewrite using c_strcasecmp.
1226 * nsfns.m (x_get_string_resource): Use c_strncasecmp, not strncasecmp.
1227 * nsterm.m (ns_default): Use c_strcasecmp, not strcasecmp.
1228 * xfaces.c (xstrcasecmp) [!HAVE_STRCASECMP]: Remove.
1229
1230 * xfont.c (compare_font_names): Redo to omit the need for casts.
1231
12322012-07-06 Andreas Schwab <schwab@linux-m68k.org>
1233
1234 * xfns.c (Fx_change_window_property): Doc fix.
1235 * w32fns.c (Fx_change_window_property): Doc fix.
1236
1237 * w32fns.c (Fx_window_property): Accept the same arguments as the
1238 X Windows version. Doc fix.
1239 * xfns.c (Fx_window_property): Doc fix. (Bug#11870)
1240
12412012-07-06 Juanma Barranquero <lekktu@gmail.com>
1242 Eli Zaretskii <eliz@gnu.org>
1243
1244 * s/ms-w32.h: Settings not specific to Windows moved to nt/config.nt.
1245 Windows-specific code from nt/config.nt moved here.
1246 Obsolete settings removed.
1247
12482012-07-06 Paul Eggert <eggert@cs.ucla.edu>
1249
1250 * process.c: Avoid unnecessary calls to gettime.
1251 (wait_reading_process_output): Don't get the time of day
1252 when gobbling data immediately and not waiting, as there's no need
1253 for it in that case. This removes a FIXME.
1254
12552012-07-06 Jan Djärv <jan.h.d@swipnet.se>
1256
1257 * gtkutil.c (xg_event_is_for_scrollbar): Assign gwin when HAVE_GTK3
1258 is defined (Bug#11768).
1259
12602012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
1261
1262 Fix marker debugging code.
1263 * marker.c (byte_char_debug_check): Do not perform the check
1264 if buffer is not multibyte.
1265 (buf_charpos_to_bytepos, buf_bytepos_to_charpos):
1266 Call byte_char_debug_check with correct arguments.
1267
12682012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
1269
1270 Compile marker debugging code only if ENABLE_CHECKING is defined.
1271 * marker.c (byte_char_debug_check, count_markers):
1272 Use only if ENABLE_CHECKING is defined.
1273 (byte_debug_flag): Remove.
1274 (CONSIDER, buf_charpos_to_bytepos, buf_bytepos_to_charpos):
1275 Always call byte_char_debug_check if ENABLE_CHECKING is defined.
1276
12772012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
1278
1279 Avoid code repetition in marker-related functions.
1280 * marker.c (attach_marker): New function.
1281 (Fset_marker, set_marker_restricted, set_marker_both)
1282 (set_marker_restricted_both): Use it.
1283 (Fset_marker, set_marker_restricted, Fbuffer_has_markers_at):
1284 Consistently rename charno to charpos.
1285 (marker_position): Add eassert.
1286 (marker_byte_position): Convert to eassert.
1287
12882012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
1289
1290 Simplify list operations in unchain_overlay and unchain_marker.
1291 * buffer.c (unchain_overlay): Simplify. Add comment.
1292 * marker.c (unchain_marker): Simplify. Fix comments.
1293
12942012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
1295
1296 Introduce fast path for the widely used marker operation.
1297 * alloc.c (build_marker): New function.
1298 * lisp.h (build_marker): New prototype.
1299 * buffer.c (clone_per_buffer_values, Fmake_indirect_buffer): Use it.
1300 * composite.c (autocmp_chars): Likewise.
1301 * editfns.c (buildmark): Remove.
1302 (Fpoint_marker, Fpoint_min_marker, Fpoint_max_marker)
1303 (save_restriction_save): Use build_marker.
1304 * marker.c (buf_charpos_to_bytepos, buf_bytepos_to_charpos): Likewise.
1305 * window.c (save_window_save): Likewise.
1306
13072012-07-06 Dmitry Antipov <dmantipov@yandex.ru>
1308
1309 Do not use Fdelete_overlay in delete_all_overlays
1310 to avoid redundant calls to unchain_overlay.
1311 * buffer.c (drop_overlay): New function.
1312 (delete_all_overlays, Fdelete_overlay): Use it.
1313 * minibuf.c (get_minibuffer): Fix comment.
1314
13152012-07-06 Paul Eggert <eggert@cs.ucla.edu>
1316
1317 Port to OpenBSD 5.1 amd64.
1318 * sysdep.c [BSD_SYSTEM]: Include <sys/param.h> before <sys/sysctl.h>.
1319 This is needed for OpenBSD, and should be harmless on all BSD systems.
1320 Also, include <sys/sysctl.h>, as it should be available on all
1321 BSD_SYSTEM hosts given that we're already calling sysctl in that case.
1322 (list_system_processes) [__OpenBSD__]: Use DARWIN_OS style mib, but
1323 use p_pid member, not kp_proc.pid.
1324
13252012-07-06 Glenn Morris <rgm@gnu.org>
1326
1327 * Makefile.in (emacs$(EXEEXT)): Don't check for load-path shadows.
1328
13292012-07-05 Paul Eggert <eggert@cs.ucla.edu>
1330
1331 More xmalloc and related cleanup.
1332 * alloc.c, bidi.c, buffer.c, buffer.h, bytecode.c, callint.c:
1333 * callproc.c, charset.c, coding.c, composite.c, data.c, dispnew.c:
1334 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, filelock.c, fns.c:
1335 * font.c, fontset.c, frame.c, fringe.c, ftfont.c, ftxfont.c, gmalloc.c:
1336 * gtkutil.c, image.c, keyboard.c, keymap.c, lread.c, macros.c, menu.c:
1337 * nsfns.m, nsfont.m, nsmenu.m, nsterm.m, print.c, process.c, ralloc.c:
1338 * regex.c, region-cache.c, scroll.c, search.c, sound.c, syntax.c:
1339 * sysdep.c, term.c, termcap.c, unexmacosx.c, window.c, xdisp.c:
1340 * xfaces.c, xfns.c, xftfont.c, xgselect.c, xmenu.c, xrdb.c, xselect.c:
1341 * xterm.c:
1342 Omit needless casts involving void * pointers and allocation.
1343 Prefer "P = xmalloc (sizeof *P)" to "P = xmalloc (sizeof (TYPE_OF_P))",
1344 as the former is more robust if P's type is changed.
1345 Prefer xzalloc to xmalloc + memset 0.
1346 Simplify malloc-or-realloc to realloc.
1347 Don't worry about xmalloc returning a null pointer.
1348 Prefer xstrdup to xmalloc + strcpy.
1349 * editfns.c (Fmessage_box): Grow message_text by at least 80 when
1350 growing it.
1351 * keyboard.c (apply_modifiers_uncached): Prefer local array to
1352 alloca of a constant.
1353
13542012-07-05 Eli Zaretskii <eliz@gnu.org>
1355
1356 * xdisp.c (display_line): Fix horizontal pixel coordinates when
1357 hscroll is larger than the line width. Fixes long and futile
1358 looping inside extend_face_to_end_of_line (on a TTY) producing
1359 glyphs that are not needed and thrown away.
1360
13612012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
1362
1363 * marker.c (set_marker_restricted_both): Simplify by using
1364 clip_to_bounds.
1365
13662012-07-05 Paul Eggert <eggert@cs.ucla.edu>
1367
1368 * editfns.c (region_limit): Simplify by using clip_to_bounds.
1369
13702012-07-05 Jan Djärv <jan.h.d@swipnet.se>
1371
1372 * gtkutil.c (gtk_scrollbar_new, gtk_box_new): Define when HAVE_GTK3 is
1373 not defined (Bug#11768).
1374 (xg_create_frame_widgets): Use gtk_plug_new_for_display (Bug#11768).
1375 (xg_create_frame_widgets, create_dialog, xg_get_file_with_chooser)
1376 (make_widget_for_menu_item, xg_make_tool_item): Use gtk_box_new
1377 followed by gtk_box_set_homogeneous (Bug#11768).
1378 (xg_update_menu_item): Use GTK_IS_BOX (Bug#11768).
1379 (update_theme_scrollbar_width, xg_create_scroll_bar):
1380 Use gtk_scrollbar_new (Bug#11768).
1381 (xg_event_is_for_scrollbar): Use Gdk Device functions for HAVE_GTK3.
1382 (is_box_type): New function (Bug#11768).
1383 (xg_tool_item_stale_p): Call is_box_type.
1384 (xg_initialize): Get settings by calling gtk_settings_get_for_screen
1385 with default display (Bug#11768).
1386
13872012-07-05 Eli Zaretskii <eliz@gnu.org>
1388
1389 * xdisp.c (window_hscroll_limited): New function.
1390 (pos_visible_p, init_iterator): Use it to avoid overflow of pixel
1391 coordinates when window's hscroll is set to insanely large
1392 values. (Bug#11857)
1393
13942012-07-05 Juanma Barranquero <lekktu@gmail.com>
1395
1396 * makefile.w32-in ($(BLD)/dired.$(O), $(BLD)/fileio.$(O)): Fix typo.
1397 ($(BLD)/terminal.$(O), $(BLD)/syntax.$(O)): Update dependencies.
1398
13992012-07-05 Dmitry Antipov <dmantipov@yandex.ru>
1400
1401 Cleanup xmalloc.
1402 * lisp.h (xzalloc): New prototype. Omit needless casts.
1403 * alloc.c (xzalloc): New function. Omit needless casts.
1404 * charset.c: Omit needless casts. Convert all calls to
1405 xmalloc with following memset to xzalloc.
1406 * dispnew.c: Likewise.
1407 * fringe.c: Likewise.
1408 * image.c: Likewise.
1409 * sound.c: Likewise.
1410 * term.c: Likewise.
1411 * w32fns.c: Likewise.
1412 * w32font.c: Likewise.
1413 * w32term.c: Likewise.
1414 * xfaces.c: Likewise.
1415 * xfns.c: Likewise.
1416 * xterm.c: Likewise.
1417 * atimer.c: Omit needless casts.
1418 * buffer.c: Likewise.
1419 * callproc.c: Likewise.
1420 * ccl.c: Likewise.
1421 * coding.c: Likewise.
1422 * composite.c: Likewise.
1423 * doc.c: Likewise.
1424 * doprnt.c: Likewise.
1425 * editfns.c: Likewise.
1426 * emacs.c: Likewise.
1427 * eval.c: Likewise.
1428 * filelock.c: Likewise.
1429 * fns.c: Likewise.
1430 * gtkutil.c: Likewise.
1431 * keyboard.c: Likewise.
1432 * lisp.h: Likewise.
1433 * lread.c: Likewise.
1434 * minibuf.c: Likewise.
1435 * msdos.c: Likewise.
1436 * print.c: Likewise.
1437 * process.c: Likewise.
1438 * region-cache.c: Likewise.
1439 * search.c: Likewise.
1440 * sysdep.c: Likewise.
1441 * termcap.c: Likewise.
1442 * terminal.c: Likewise.
1443 * tparam.c: Likewise.
1444 * w16select.c: Likewise.
1445 * w32.c: Likewise.
1446 * w32reg.c: Likewise.
1447 * w32select.c: Likewise.
1448 * w32uniscribe.c: Likewise.
1449 * widget.c: Likewise.
1450 * xdisp.c: Likewise.
1451 * xmenu.c: Likewise.
1452 * xrdb.c: Likewise.
1453 * xselect.c: Likewise.
1454
14552012-07-05 Paul Eggert <eggert@cs.ucla.edu>
1456
1457 * fileio.c (time_error_value): Check the right error number.
1458 Problem reported by Troels Nielsen in
1459 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00095.html>.
1460
14612012-07-04 Paul Eggert <eggert@cs.ucla.edu>
1462
1463 * window.c (set_window_hscroll): Revert the 100000 hscroll limit.
1464 This should be fixed in a better way; see Eli Zaretskii in
1465 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00088.html>.
1466 (HSCROLL_MAX): Remove; this is now internal to set_window_hscroll.
1467
1468 * fileio.c (time_error_value): Rename from special_mtime.
1469 The old name's problems were noted by Eli Zaretskii in
1470 <http://lists.gnu.org/archive/html/emacs-devel/2012-07/msg00087.html>.
1471
1472 * emacs.c (gdb_pvec_type): Change it back to enum pvec_type.
1473 This variable's comment says Emacs needs at least one GDB-visible
1474 symbol of type enum pvec_type, to work around GDB problems.
1475 The symbol's value doesn't matter.
1476
1477 * alloc.c (PSEUDOVECTOR_NBYTES): Remove stray ';'
1478 that causes compilation to fail on pre-C99 compilers.
1479
14802012-07-04 Juanma Barranquero <lekktu@gmail.com>
1481
1482 * s/ms-w32.h (LISP_FLOAT_TYPE, HAVE_MEMCMP, HAVE_MEMCPY)
1483 (HAVE_MEMMOVE, HAVE_MEMSET): Don't set, obsolete.
1484
14852012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
1486
1487 * buffer.c (init_buffer_once): Fix initialization of
1488 headers for buffer_defaults and buffer_local_symbols.
1489 Reported by Juanma Barranquero <lekktu@gmail.com>.
1490
14912012-07-04 Stefan Monnier <monnier@iro.umontreal.ca>
1492
1493 Turn VECTOR_FREE_LIST_FLAG into PVEC_FREE.
1494 * lisp.h (enum pvec_type): Use fewer bits.
1495 (PSEUDOVECTOR_SIZE_BITS): New constant.
1496 (PSEUDOVECTOR_SIZE_MASK, PVEC_TYPE_MASK): Use it.
1497 (XSETPVECTYPESIZE, XSETTYPED_PSEUDOVECTOR, DEFUN): Adapt code to
1498 change in pvec_type.
1499 (PSEUDOVECTOR_TYPEP): New macro.
1500 (TYPED_PSEUDOVECTORP): Use it.
1501 * fns.c (internal_equal): Adapt code to extract pvectype.
1502 * emacs.c (gdb_pvec_type): Update type.
1503 * alloc.c (PSEUDOVECTOR_NBYTES): New macro.
1504 (VECTOR_FREE_LIST_SIZE_MASK): Remove (=> PSEUDOVECTOR_SIZE_MASK).
1505 (VECTOR_FREE_LIST_FLAG): Remove (=> PVEC_FREE).
1506 (SETUP_ON_FREE_LIST): Use XSETPVECTYPESIZE.
1507 (sweep_vectors): Use it. Use local var `total_bytes' instead of
1508 abusing vector->header.next.nbytes.
1509 (live_vector_p): Use PVEC_TYPE.
1510 (mark_object): Adapt code to extract pvectype. Use switch.
1511
15122012-07-04 Paul Eggert <eggert@cs.ucla.edu>
1513
1514 * doprnt.c (doprnt): Don't assume string length fits in 'int'.
1515 Tighten new eassert a bit.
1516
15172012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
1518
1519 Fix compilation with --enable-gcc-warnings and -O1
1520 optimization level.
1521 * doprnt.c (doprnt): Change type of tem to int, initialize
1522 to avoid compiler warning. Add eassert.
1523 * search.c (simple_search): Initialize match_byte to avoid
1524 compiler warning. Add eassert.
1525
15262012-07-04 Paul Eggert <eggert@cs.ucla.edu>
1527
1528 Avoid weird behavior with large horizontal scrolls.
1529 Without this change, for example, large hscroll values would
1530 mess up Emacs's display on Fedora 15 x86, presumably due to
1531 overflows in int calculations in the display code.
1532 Also, if buffers had long lines, Emacs would freeze.
1533 * window.c (HSCROLL_MAX): Reduce to 100000, and make it visible to GDB.
1534 (set_window_hscroll): New function, containing the old guts of
1535 Fset_window_hscroll. Return the clipped value.
1536 (Fset_window_hscroll, Fscroll_left, Fscroll_right): Use it.
1537 This avoids the need to check against PTRDIFF_MAX.
1538
1539 * buffer.c (Fgenerate_new_buffer_name): Fix sprintf format mismatch.
1540
15412012-07-04 Dmitry Antipov <dmantipov@yandex.ru>
1542
1543 * buffer.c (Fgenerate_new_buffer_name): Fix type mismatch.
1544
15452012-07-04 Paul Eggert <eggert@cs.ucla.edu>
1546
1547 * regex.c: Suppress GCC warning on RHEL 6. (Bug#11207)
1548 Conditionalize the pragmas on GCC 4.5 or later, not GCC 4.3 or later,
1549 since GCC 4.4.6 issues a bogus warning for them.
1550
1551 Fix bugs in file timestamp newness comparisons.
1552 * fileio.c (Ffile_newer_than_file_p):
1553 * lread.c (Fload): Use full timestamp resolution of files,
1554 not just the 1-second resolution, so that files that are only
1555 slightly newer still count as newer.
1556 * fileio.c (Ffile_newer_than_file_p): Don't assume file
1557 timestamps fit in 'int'; this fixes a Y2038 bug on most hosts.
1558
15592012-07-03 Paul Eggert <eggert@cs.ucla.edu>
1560
1561 * fileio.c: Improve handling of file time marker. (Bug#11852)
1562 (special_mtime): New function.
1563 (Finsert_file_contents, Fverify_visited_file_modtime):
1564 Use it to set special mtime values consistently.
1565
15662012-07-03 Andreas Schwab <schwab@linux-m68k.org>
1567
1568 * fileio.c (Finsert_file_contents): Properly handle st_mtime
1569 marker for non-existing file. (Bug#11852)
1570
15712012-07-03 Glenn Morris <rgm@gnu.org>
1572
1573 * lisp.h (Fread_file_name): Restore EXFUN (it's not a normal DEFUN
1574 and did not make it into globals.h).
1575
15762012-07-03 Tom Tromey <tromey@redhat.com>
1577
1578 * window.c (Fset_window_margins, Fset_window_fringes)
1579 (Fset_window_scroll_bars, Fset_window_vscroll): No longer static.
1580 * textprop.c (Fprevious_property_change): No longer static.
1581 * syntax.c (Fsyntax_table_p): No longer static.
1582 * process.c (Fget_process, Fprocess_datagram_address): No longer
1583 static.
1584 * keymap.c (Flookup_key, Fcopy_keymap): No longer static.
1585 * keyboard.c (Fcommand_execute): No longer static.
1586 Remove EXFUN.
1587 * insdel.c (Fcombine_after_change_execute): No longer static.
1588 * image.c (Finit_image_library): No longer static.
1589 * fileio.c (Fmake_symbolic_link): No longer static.
1590 * eval.c (Ffetch_bytecode): No longer static.
1591 * editfns.c (Fuser_full_name): No longer static.
1592 * doc.c (Fdocumentation_property, Fsnarf_documentation):
1593 No longer static.
1594 * buffer.c (Fset_buffer_major_mode, Fdelete_overlay): No longer
1595 static.
1596 * dired.c (Ffile_attributes): No longer static.
1597 * composite.c (Fcomposition_get_gstring): No longer static.
1598 * callproc.c (Fgetenv_internal): No longer static.
1599
1600 * ccl.h: Remove EXFUNs.
1601 * buffer.h: Remove EXFUNs.
1602 * dispextern.h: Remove EXFUNs.
1603 * intervals.h: Remove EXFUNs.
1604 * fontset.h: Remove EXFUN.
1605 * font.h: Remove EXFUNs.
1606 * dosfns.c (system_process_attributes): Remove EXFUN.
1607 * keymap.h: Remove EXFUNs.
1608 * lisp.h: Remove EXFUNs.
1609 * w32term.h: Remove EXFUNs.
1610 * window.h: Remove EXFUNs.
1611 * xsettings.h: Remove EXFUN.
1612 * xterm.h: Remove EXFUN.
1613
16142012-07-03 Glenn Morris <rgm@gnu.org>
1615
1616 * lisp.h (Frandom): Make it visible to C.
1617 * buffer.c (Fgenerate_new_buffer_name): Speed up finding a new
1618 buffer for invisible buffers. (Bug#1229)
1619
16202012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
1621
1622 Fix block vector allocation code to allow VECTOR_BLOCK_SIZE
1623 values which aren't power of 2.
1624 * alloc.c (VECTOR_FREE_LIST_SIZE_MASK): New macro. Verify
1625 it's value and the value of VECTOR_BLOCK_SIZE. Adjust users
1626 accordingly.
1627
16282012-07-03 Stefan Monnier <monnier@iro.umontreal.ca>
1629
1630 * lisp.h (Lisp_Misc, Lisp_Fwd): Move around to group better.
1631
1632 * alloc.c (mark_object): Revert part of last patch to use `switch'.
1633
16342012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
1635
1636 * alloc.c (allocate_vector_block): Remove redundant
1637 calls to mallopt if DOUG_LEA_MALLOC is defined.
1638 (allocate_vectorlike): If DOUG_LEA_MALLOC is defined,
1639 avoid calls to mallopt if zero_vector is returned.
1640
16412012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
1642
1643 * alloc.c (check_string_bytes): If GC_CHECK_STRING_BYTES
1644 is enabled, avoid dereferencing NULL current_sblock if
1645 running undumped.
1646
16472012-07-03 Dmitry Antipov <dmantipov@yandex.ru>
1648
1649 Cleanup basic buffer management.
1650 * buffer.h (struct buffer): Change layout to use generic vector
1651 marking code. Fix some comments. Change type of 'clip_changed'
1652 to bitfield. Remove unused #ifndef old.
1653 (FIRST_FIELD_PER_BUFFER, LAST_FIELD_PER_BUFFER): Remove.
1654 (GET_OVERLAYS_AT): Fix indentation.
1655 (for_each_per_buffer_object_at): New macro.
1656 * buffer.c (clone_per_buffer_values, reset_buffer_local_variables)
1657 (Fbuffer_local_variables): Use it.
1658 (init_buffer_once, syms_of_buffer): Remove unused #ifndef old.
1659 * alloc.c (allocate_buffer): Adjust to match new layout of
1660 struct buffer. Fix comment.
1661 (mark_overlay): New function.
1662 (mark_buffer): Use it. Use mark_vectorlike to mark normal
1663 Lisp area of struct buffer.
1664 (mark_object): Use it. Adjust marking of misc objects
1665 and related comments.
1666
16672012-07-02 Paul Eggert <eggert@cs.ucla.edu>
1668
1669 * alloc.c (mark_object): Remove "#ifdef GC_CHECK_MARKED_OBJECTS"
1670 wrapper that is not needed because the wrapped code is a no-op (zero
1671 machine instructions) when GC_CHECK_MARKED_OBJECTS is not defined.
1672 This avoids a -Wunused-macros diagnostic with GCC 4.7.1 x86-64.
1673
16742012-07-02 Dmitry Antipov <dmantipov@yandex.ru>
1675
1676 * alloc.c (mark_buffer): Simplify. Remove prototype.
1677 (mark_object): Add comment. Reorganize marking of vector-like
1678 objects. Use CHECK_LIVE for all vector-like objects except buffers
1679 and subroutines when GC_CHECK_MARKED_OBJECTS is defined. Avoid
1680 redundant calls to mark_vectorlike for bool vectors.
1681
16822012-06-30 Glenn Morris <rgm@gnu.org>
1683
1684 * nsterm.m (ns_init_paths): Ignore site-lisp if --no-site-lisp.
1685
1686 * epaths.in (PATH_SITELOADSEARCH): New.
1687 * lread.c (init_lread): Use PATH_SITELOADSEARCH.
1688 This is rather than relying on --enable-locallisppath elements
1689 having "site-lisp" in their names. (Bug#10208#25, 11658)
1690
16912012-06-30 Eli Zaretskii <eliz@gnu.org>
1692
1693 * w32proc.c (sys_select): Accept and ignore one more argument.
1694
1695 * w32.c (emacs_gnutls_pull): Call select with one more argument.
1696
1697 * sysselect.h [DOS_NT]: Don't include sys/select.h.
1698 (pselect) [!MS_DOS]: Redirect to sys_select.
1699
1700 * sysdep.c: Don't include dos.h and dosfns.h.
1701
1702 * process.c (sys_select):
1703 * msdos.c (sys_select): Accept one more argument and ignore it.
1704
1705 * msdos.c (event_timestamp, sys_select): Use gnulib's gettime;
1706 adapt data types and code to that.
1707
1708 * dosfns.c:
1709 * msdos.c (gettime, settime): Define away the prototypes in dos.h,
1710 which clashes with the gnulib function of the same name.
1711
17122012-06-30 Andreas Schwab <schwab@linux-m68k.org>
1713
1714 * font.c (font_style_to_value, font_style_symbolic)
1715 (font_prop_validate_style): Add type checks for values in
1716 font_style_table.
1717
1718 * lisp.h (CHECK_RANGED_INTEGER): Make value to check the first
1719 argument.
1720 * character.c, charset.c, menu.c, process.c, window.c: Adjust all
1721 uses.
1722
17232012-06-29 Eli Zaretskii <eliz@gnu.org>
1724
1725 * xdisp.c (try_window_id): Undo last change.
1726
1727 * w32.c (getwd): Adjust commentary about startup_dir.
1728 (init_environment): Always call sys_access, even in non-MSVC
1729 builds. Don't chdir to the directory of the Emacs executable.
1730 This undoes code from 1997 which was justified by the need to
1731 "avoid conflicts when removing and renaming directories". But its
1732 downside was that every relative file name was being interpreted
1733 relative to the directory of the Emacs executable, which can never
1734 be TRT. In particular, it broke sys_access when called with
1735 relative file names.
1736 (sys_access): Map GetLastError to errno.
1737
17382012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
1739
1740 * window.h (struct window): Change type of 'fringes_outside_margins'
1741 to bitfield. Fix comment. Adjust users accordingly.
1742 (struct window): Change type of 'window_end_bytepos' to ptrdiff_t.
1743 Adjust comment.
1744 * xdisp.c (try_window_id): Change type of 'first_vpos' and 'vpos'
1745 to ptrdiff_t.
1746
17472012-06-29 Andreas Schwab <schwab@linux-m68k.org>
1748
1749 * gnutls.c (emacs_gnutls_handshake):
1750 Add QUIT to make the loop interruptible.
1751
17522012-06-29 Glenn Morris <rgm@gnu.org>
1753
1754 * charset.c (init_charset): Make lack of etc/charsets fatal.
1755
17562012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
1757
1758 * editfns.c (region_limit): Fix type mismatch.
1759
17602012-06-29 Dmitry Antipov <dmantipov@yandex.ru>
1761
1762 * nsfns.m: Fix GLYPH_DEBUG usage assuming that it may be
1763 undefined. Convert from xassert to eassert.
1764 * nsmenu.m: Convert from xassert to eassert.
1765 * nsterm.m: Likewise.
1766
17672012-06-28 Stefan Monnier <monnier@iro.umontreal.ca>
1768
1769 * editfns.c (region_limit): Clip to narrowing (bug#11770).
1770
17712012-06-28 Paul Eggert <eggert@cs.ucla.edu>
1772
1773 Avoid integer overflow on scroll-left and scroll-right.
1774 * window.c (HSCROLL_MAX): New macro.
1775 (Fscroll_left, Fscroll_right): Avoid undefined behavior on integer
1776 overflow when requested scroll falls outside ptrdiff_t range.
1777
17782012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
1779
1780 * window.h (struct window): Change type of 'hscroll',
1781 'min_hscroll' and 'last_point' from Lisp_Object to ptrdiff_t,
1782 'last_modified' and 'last_overlay_modified' to EMACS_INT.
1783 Adjust users accordingly.
1784 * xdisp.c (try_cursor_movement): Replace type check with eassert.
1785 * window.c (Fscroll_left, Fscroll_right): Change type of 'hscroll'
1786 from EMACS_INT to ptrdiff_t.
1787 (make_window): Omit redundant initialization.
1788
17892012-06-28 Juanma Barranquero <lekktu@gmail.com>
1790
1791 * makefile.w32-in ($(BLD)/regex.$(O)): Update dependencies.
1792
17932012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
1794
1795 * window.h (struct window): Change type of 'use_time' and
1796 'sequence_number' from Lisp_Object to int.
1797 * frame.c (make_frame): Adjust users accordingly.
1798 * print.c (print_object): Likewise.
1799 * window.c (select_window, Fwindow_use_time, make_parent_window)
1800 (make_window): Likewise.
1801
18022012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
1803
1804 * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
1805 enabled with --enable-checking=[all,glyphs] configure option.
1806 Fix GLYPH_DEBUG usage assuming that it may be undefined,
1807 adjust comments accordingly.
1808 * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
1809 undefined, adjust comments accordingly.
1810 * image.c: Likewise.
1811 * scroll.c: Likewise.
1812 * w32fns.c: Likewise.
1813 * w32term.c: Likewise.
1814 * xdisp.c: Likewise.
1815 * xfaces.c: Likewise.
1816 * xfns.c: Likewise.
1817 * xterm.c: Likewise.
1818
18192012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
1820
1821 Generalize run-time debugging checks.
1822 * dispextern.h (XASSERTS): Remove.
1823 * fontset.c (xassert): Remove.
1824 Convert from xassert to eassert.
1825 * alloc.c: Convert from xassert to eassert.
1826 * bidi.c: Likewise.
1827 * dispnew.c: Likewise.
1828 * fns.c: Likewise.
1829 * fringe.c: Likewise.
1830 * ftfont.c: Likewise.
1831 * gtkutil.c: Likewise.
1832 * image.c: Likewise.
1833 * keyboard.c: Likewise.
1834 * menu.c: Likewise.
1835 * process.c: Likewise.
1836 * scroll.c: Likewise.
1837 * sound.c: Likewise.
1838 * term.c: Likewise.
1839 * w32console.c: Likewise.
1840 * w32fns.c: Likewise.
1841 * w32term.c: Likewise.
1842 * window.c: Likewise.
1843 * xdisp.c: Likewise.
1844 * xfaces.c: Likewise.
1845 * xfns.c: Likewise.
1846 * xselect.c: Likewise.
1847 * xterm.c: Likewise.
1848
18492012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
1850
1851 * fns.c (maybe_resize_hash_table): Output message when growing the
1852 purify-hashtable.
1853
18542012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
1855
1856 * alloc.c (allocate_string_data): Remove dead code.
1857 * xsettings.c (XSETTINGS_FONT_NAME): Move under HAVE_XFT to
1858 avoid GCC warning about unused macro.
1859
18602012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
1861
1862 * alloc.c (allocate_string): Omit intervals initialization.
1863 * alloc.c (make_uninit_multibyte_string): Initialize intervals
1864 as in make_pure_string and make_pure_c_string.
1865
18662012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
1867
1868 * alloc.c (allocate_string): Fix last change.
1869
18702012-06-27 Dmitry Antipov <dmantipov@yandex.ru>
1871
1872 * alloc.c (allocate_string): Remove two redundant calls
1873 to memset, add explicit initialization where appropriate.
1874
18752012-06-27 Glenn Morris <rgm@gnu.org>
1876
1877 * lisp.mk (lisp): Remove paths.elc.
1878
18792012-06-27 Chong Yidong <cyd@gnu.org>
1880
1881 * doc.c (Fsubstitute_command_keys): Fix punctuation.
1882
18832012-06-26 John Wiegley <johnw@newartisans.com>
1884
1885 * unexmacosx.c (copy_data_segment): Add two section names used
1886 on Mac OS X Lion: __mod_init_func and __mod_term_func.
1887
1888 * alloc.c (mark_memory): Do not check with -faddress-sanitizer
1889 when building with Clang.
1890
18912012-06-26 Stefan Monnier <monnier@iro.umontreal.ca>
1892
1893 * eval.c (Fapply): Allow calling it with a single argument.
1894
18952012-06-26 Eli Zaretskii <eliz@gnu.org>
1896
1897 * s/ms-w32.h (strcasecmp, strncasecmp) [_MSC_VER]: Redirect to
1898 _stricmp and _strnicmp.
1899 (HAVE_STRCASECMP, HAVE_STRNCASECMP): Define to 1.
1900
19012012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
1902
1903 * alloc.c (allocate_window): Zero out non-Lisp part of newly
1904 allocated window.
1905 (allocate_process): Likewise for new process.
1906 (allocate_terminal): Change to use offsetof.
1907 (allocate_frame): Likewise.
1908 * frame.c (make_frame): Omit redundant initialization.
1909 * window.c (make_parent_window): Use memset.
1910 (make_window): Omit redundant initialization.
1911 * process.c (make_process): Omit redundant initialization.
1912 * terminal.c (create_terminal): Likewise.
1913
19142012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
1915
1916 * term.c (delete_tty): Remove redundant call to memset.
1917
19182012-06-26 Dmitry Antipov <dmantipov@yandex.ru>
1919
1920 * alloc.c: Remove build_string.
1921 * lisp.h: Define build_string as static inline. This provides
1922 a better opportunity to optimize away calls to strlen when the
1923 function is called with compile-time constant argument.
1924 * image.c (imagemagick_error): Convert to build_string.
1925 * w32proc.c (sys_spawnve): Likewise.
1926 * xterm.c (x_term_init): Likewise.
1927
19282012-06-26 Paul Eggert <eggert@cs.ucla.edu>
1929
1930 Use sprintf return value instead of invoking strlen on result.
1931 In the old days this wasn't portable, since some sprintf
1932 implementations returned char *. But they died out years ago and
1933 Emacs already assumes sprintf returns int.
1934 Similarly for float_to_string.
1935 This patch speeds up (number-to-string 1000) by 3% on Fedora 15 x86-64.
1936 * ccl.c (ccl_driver):
1937 * character.c (string_escape_byte8):
1938 * data.c (Fnumber_to_string):
1939 * doprnt.c (doprnt):
1940 * print.c (print_object):
1941 * xdisp.c (message_dolog):
1942 * xfns.c (syms_of_xfns):
1943 Use sprintf or float_to_string result to avoid need to call strlen.
1944 * data.c (Fnumber_to_string):
1945 Use make_unibyte_string, since the string must be ASCII.
1946 * lisp.h, print.c (float_to_string): Now returns int length.
1947 * term.c (produce_glyphless_glyph):
1948 Use sprintf result rather than recomputing it.
1949
1950 Clean out last vestiges of the old HAVE_CONFIG_H stuff.
1951 * Makefile.in (ALL_CFLAGS):
1952 * makefile.w32-in (LOCAL_FLAGS): Remove -DHAVE_CONFIG_H.
1953 * gmalloc.c, regex.c: Include <config.h> unconditionally.
1954
19552012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
1956
1957 * dispextern.h (xstrcasecmp): Define to library function
1958 strcasecmp if available.
1959 * xfaces.c: Do not use xstrcasecmp if strcasecmp is available.
1960
19612012-06-25 Andreas Schwab <schwab@linux-m68k.org>
1962
1963 * keyboard.c (menu_bar_items, menu_bar_item, read_key_sequence):
1964 Avoid comma operator.
1965 * menu.c (push_submenu_start, push_submenu_end)
1966 (push_left_right_boundary, push_menu_pane): Likewise.
1967 * msdos.c (dos_rawgetc): Likewise.
1968
19692012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
1970
1971 * xfns.c (xic_create_fontsetname): Remove redundant calls
1972 to memset.
1973
19742012-06-25 Paul Eggert <eggert@cs.ucla.edu>
1975
1976 * gtkutil.c (get_utf8_string): Remove redundant assignment.
1977 sprintf already null-terminates its output.
1978
1979 * xfns.c (x_window): Remove redundant cast.
1980
19812012-06-25 Dmitry Antipov <dmantipov@yandex.ru>
1982
1983 * xmenu.c (xmenu_show, xdialog_show): Explicit cast from
1984 `const char *' to `char *' to avoid compiler warning.
1985
19862012-06-24 Paul Eggert <eggert@cs.ucla.edu>
1987
1988 * xterm.c (x_term_init): Build proper-sized _XSETTINGS_Snnn string
1989 instead of truncating it to 63 (admittedly a generous limit).
1990
1991 * process.c: Fix spelling and caps in comments.
1992
19932012-06-24 Dan Nicolaescu <dann@ics.uci.edu>
1994
1995 * emacs.c (setpgrp): Remove definition, unused.
1996 * sysdep.c (setpgrp): Remove definition, not used in this file.
1997
19982012-06-24 Juanma Barranquero <lekktu@gmail.com>
1999
2000 * makefile.w32-in: Update dependencies.
2001
20022012-06-24 Eli Zaretskii <eliz@gnu.org>
2003
2004 * makefile.w32-in (TIMESPEC_H): Remove nt/inc/sys/time.h.
2005 (SYSTIME_H): Add nt/inc/sys/time.h.
2006
2007 * systime.h [WINDOWSNT]: Include sys/time.h.
2008
2009 * s/ms-w32.h (struct timespec): Definition moved from
2010 nt/inc/sys/time.h. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
2011
20122012-06-24 Paul Eggert <eggert@cs.ucla.edu>
2013
2014 Switch from NO_RETURN to C11's _Noreturn (Bug#11750).
2015 * buffer.h (buffer_slot_type_mismatch):
2016 * data.c (arith_error) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
2017 * eval.c (unwind_to_catch):
2018 * image.c (my_png_error, my_error_exit):
2019 * keyboard.c (quit_throw_to_read_char, user_error)
2020 (Fexit_recursive_edit, Fabort_recursive_edit):
2021 * lisp.h (die, args_out_of_range, args_out_of_range_3)
2022 (wrong_type_argument, buffer_overflow, __executable_start)
2023 (memory_full, buffer_memory_full, string_overflow, Fthrow)
2024 (xsignal, xsignal0, xsignal1, xsignal2, xsignal3, signal_error)
2025 (error, verror, nsberror, report_file_error, Ftop_level, Fkill_emacs)
2026 (fatal):
2027 (child_setup) [!DOS_NT]:
2028 * lread.c (end_of_file_error, invalid_syntax):
2029 * process.c (send_process_trap) [!FORWARD_SIGNAL_TO_MAIN_THREAD]:
2030 * puresize.h (pure_write_error):
2031 * search.c (matcher_overflow):
2032 * sound.c (sound_perror, alsa_sound_perror):
2033 * sysdep.c, syssignal.h (croak):
2034 * term.c (maybe_fatal, vfatal):
2035 * textprop.c (text_read_only):
2036 * undo.c (user_error):
2037 * unexmacosx.c (unexec_error):
2038 * xterm.c (x_ins_del_lines, x_delete_glyphs):
2039 Use _Noreturn rather than NO_RETURN.
2040 No need for separate decl merely because of _Noreturn.
2041 * sound.c (sound_warning, parse_sound):
2042 Remove unnecessary forward decls.
2043
20442012-06-24 Paul Eggert <eggert@cs.ucla.edu>
2045
2046 Fix bug when time_t is unsigned and as wide as intmax_t (Bug#9000).
2047 * lisp.h (WAIT_READING_MAX): New macro.
2048 * dispnew.c (Fsleep_for, sit_for):
2049 * keyboard.c (kbd_buffer_get_event):
2050 * process.c (Faccept_process_output):
2051 Use it to avoid bogus compiler warnings with obsolescent GCC versions.
2052 This improves on the previous patch, which introduced a bug
2053 when time_t is unsigned and as wide as intmax_t.
2054 See <http://bugs.gnu.org/9000#51>.
2055
20562012-06-23 Eli Zaretskii <eliz@gnu.org>
2057
2058 * dispnew.c (sit_for, Fsleep_for):
2059 * keyboard.c (kbd_buffer_get_event):
2060 * process.c (Faccept_process_output): Avoid compiler warnings when
2061 comparing a 32-bit time_t with a 64-bit INTMAX_MAX.
2062
20632012-06-23 Juanma Barranquero <lekktu@gmail.com>
2064
2065 * makefile.w32-in: Update dependencies.
2066
2067 * w32.c (ltime): Add return type and declare static.
2068 (w32_get_internal_run_time): Remove usused variable `time_100ns'.
2069
20702012-06-23 Paul Eggert <eggert@cs.ucla.edu>
2071
2072 * sysdep.c [__FreeBSD__]: Fix more recently-introduced typos.
2073 Privately reported by Herbert J. Skuhra.
2074 (make_lisp_timeval) [__FreeBSD__]: Rename from TIMELIST.
2075 All uses changed.
2076 (system_process_attributes) [__FreeBSD__]: Invoke make_lisp_time,
2077 not make_lisp_timeval, when the argument is of type EMACS_TIME.
2078
20792012-06-23 Eli Zaretskii <eliz@gnu.org>
2080
2081 * w32proc.c (Fw32_get_locale_info): Fix an off-by-one error in
2082 last argument of make_unibyte_string.
2083
2084 * keyboard.c (kbd_buffer_get_event): Include the codepage and the
2085 language ID in the event parameters.
2086
2087 * w32term.c (w32_read_socket): Put the new keyboard codepage into
2088 event.code, not the obscure "character set ID".
2089
20902012-06-23 Chong Yidong <cyd@gnu.org>
2091
2092 * xmenu.c (x_menu_wait_for_event): Adapt GTK3 to new xg_select.
2093
20942012-06-23 Eli Zaretskii <eliz@gnu.org>
2095
2096 Fix the MS-Windows build broken by 2012-06-22T21:17:42Z!eggert@cs.ucla.edu.
2097 * w32.c (fdutimens): New function.
2098
2099 * w32proc.c (sys_select): Adapt to change in the EMACS_TIME type.
2100
2101 * s/ms-w32.h (pselect): Redirect to sys_select.
2102
2103 * sysselect.h [WINDOWSNT]: Don't include sys/select.h.
2104
2105 * ralloc.c (r_alloc_inhibit_buffer_relocation): Fix stupid thinko
2106 in the logic of incrementing and decrementing the value of
2107 use_relocatable_buffers.
2108
21092012-06-23 Paul Eggert <eggert@cs.ucla.edu>
2110
2111 * sysdep.c [__FreeBSD__]: Fix recently-introduced typos.
2112 Privately reported by Herbert J. Skuhra.
2113 [__FreeBSD__]: Remove "*/" typo after "#include".
2114 (timeval_to_EMACS_TIME) [__FreeBSD__]: New static function.
2115 (TIMEVAL) [__FreeBSD__]: Now a static function rather than a macro.
2116 (TIMEVAL, system_process_attributes) [__FreeBSD__]:
2117 Don't assume EMACS_TIME and struct timeval are the same type.
2118
21192012-06-22 Paul Eggert <eggert@cs.ucla.edu>
2120
2121 Support higher-resolution time stamps (Bug#9000).
2122 The time stamps are only nanosecond-resolution at the C level,
2123 since that's the best that any real-world system supports now.
2124 But they are picosecond-resolution at the Lisp level, as that's
2125 easy, and leaves room for future OS improvements.
2126
2127 * Makefile.in (LIB_CLOCK_GETTIME): New macro.
2128 (LIBES): Use it.
2129
2130 * alloc.c (Fgarbage_collect): Port to higher-res time stamps.
2131 Don't get current time unless it's needed.
2132
2133 * atimer.c: Include <sys/time.h> unconditionally, since gnulib
2134 now provides it if it's absent.
2135 (start_atimer): Port to higher-res time stamps.
2136 Check for time stamp overflow. Don't get current time more
2137 often than is needed.
2138
2139 * buffer.h (struct buffer): Buffer modtime now has high resolution.
2140 Include systime.h, not time.h.
2141 (NONEXISTENT_MODTIME_NSECS, UNKNOWN_MODTIME_NSECS): New macros.
2142
2143 * dired.c: Include stat-time.h.
2144 (Ffile-attributes): File times now have higher resolution.
2145
2146 * dispextern.h [HAVE_WINDOW_SYSTEM]: Include systime.h.
2147 (struct image): Timestamp now has higher resolution.
2148
2149 * dispnew.c (PERIODIC_PREEMPTION_CHECKING): Remove, as Emacs always
2150 has at least microseconds now. All uses removed.
2151 (update_frame, update_single_window, update_window, update_frame_1)
2152 (Fsleep_for, sit_for): Port to higher-resolution time stamps.
2153
2154 * editfns.c (time_overflow): Now extern.
2155 (Fcurrent_time, Fget_internal_run_time, make_time, lisp_time_argument)
2156 (float-time, Fformat_time_string, Fcurrent_time_string)
2157 (Fcurrent_time_zone): Accept and generate higher-resolution
2158 time stamps.
2159 (make_time_tail, make_lisp_time, dissassemble_lisp_time)
2160 (decode_time_components, lisp_seconds_argument): New functions.
2161 (make_time): Now static.
2162 (lisp_time_argument): Now returns EMACS_TIME. New arg ppsec.
2163 Report an error if the time is invalid, rather than having the caller
2164 do that.
2165
2166 * fileio.c: Include <stat-time.h>
2167 (Fcopy_file): Copy higher-resolution time stamps.
2168 Prefer to set the time stamp via a file descriptor if that works.
2169 (Fset_file_times, Finsert_file_contents, Fwrite_region)
2170 (Fverify_visited_file_modtime, Fclear_visited_file_modtime)
2171 (Fvisited_file_modtime, Fset_visited_file_modtime):
2172 Support higher-resolution time stamps.
2173
2174 * fns.c (Frandom): Use nanoseconds, not microseconds, for seed.
2175
2176 * gtkutil.c (xg_maybe_add_timer): Port to higher-res time stamps.
2177
2178 * image.c (prepare_image_for_display, clear_image_cache)
2179 (lookup_image): Port to higer-resolution time stamps.
2180
2181 * keyboard.c (start_polling, bind_polling_period):
2182 Check for time stamp overflow.
2183 (read_char, kbd_buffer_get_event, timer_start_idle)
2184 (timer_stop_idle, timer_resume_idle, timer_check_2, timer_check)
2185 (Fcurrent_idle_time, init_keyboard, set_waiting_for_input):
2186 Port to higher-resolution time stamps. Do not assume time_t is signed.
2187 (decode_timer): New function. Timers are now vectors of length 9,
2188 not 8, to accommodate the picosecond component.
2189 (timer_check_2): Use it.
2190
2191 * nsterm.m (select_timeout, timeval_subtract): Remove.
2192 (ns_timeout): Use Emacs's facilities for time stamp arithmetic,
2193 as they're a bit more accurate and handle overflow better.
2194 (ns_select): Change prototype to be compatible with pselect.
2195 (ns_select, ns_term_shutdown): Port to ns-resolution time stamps.
2196 * nsterm.h (ns_select): Adjust prototype.
2197
2198 * msdos.c (EMACS_TIME_ZERO_OR_NEG_P): Remove, as it assumes
2199 us-resolution time stamps.
2200 (sys_select): Use the new EMACS_TIME_SIGN macro instead.
2201
2202 * lread.c (read_filtered_event): Port to ns-resolution time stamps.
2203
2204 * lisp.h (time_overflow): New decl.
2205 (wait_reading_process_output): First arg is now intmax_t, not int,
2206 to accommodate larger waits.
2207
2208 * process.h (struct Lisp_Process.read_output_delay):
2209 Now counts nanoseconds, not microseconds.
2210 * process.c (ADAPTIVE_READ_BUFFERING): Don't worry about
2211 EMACS_HAS_USECS.
2212 (READ_OUTPUT_DELAY_INCREMENT, Faccept_process_output)
2213 (wait_reading_process_output):
2214 Port to ns-resolution time stamps.
2215 (Faccept_process_output, wait_reading_process_output):
2216 Check for time stamp overflow. Do not assume time_t is signed.
2217 (select_wrapper): Remove; we now use pselect.
2218 (Fprocess_attributes): Now generates ns-resolution time stamps.
2219
2220 * sysdep.c: Include utimens.h. Don't include utime.h
2221 or worry about struct utimbuf; gnulib does that for us now.
2222 (gettimeofday): Remove; gnulib provides a substitute.
2223 (make_timeval): New function.
2224 (set_file_times): Now sets ns-resolution time stamps.
2225 New arg FD; all uses changed.
2226 (time_from_jiffies, ltime_from_jiffies, get_up_time)
2227 (system_process_attributes):
2228 Now returns ns-resolution time stamp. All uses changed.
2229 Check for time stamp overflow.
2230
2231 * sysselect.h: Don't depend on HAVE_SYS_SELECT_H; gnulib
2232 provides a substitute now.
2233
2234 * systime.h: Include timespec.h rather than sys/time.h and time.h,
2235 since it guarantees struct timespec.
2236 (EMACS_TIME): Now struct timespec, so that we can support
2237 ns-resolution time stamps.
2238 (EMACS_TIME_RESOLUTION, LOG10_EMACS_TIME_RESOLUTION): New macros.
2239 (EMACS_HAS_USECS): Remove; Emacs always has sub-second time stamps now.
2240 (EMACS_USECS): Remove.
2241 (EMACS_SET_USECS): The underlying time stamp now has ns resolution,
2242 so multiply the arg by 1000 before storing it.
2243 (EMACS_NSECS, EMACS_SECS_ADDR, EMACS_SET_NSECS, EMACS_SET_SECS_NSECS):
2244 New macros.
2245 (EMACS_GET_TIME, EMACS_ADD_TIME, EMACS_SUB_TIME):
2246 Port to ns-resolution time stamps.
2247 (EMACS_TIME_NEG_P): Remove; replaced by....
2248 (EMACS_TIME_SIGN): New macro.
2249 (EMACS_SET_INVALID_TIME, EMACS_TIME_VALID_P)
2250 (EMACS_TIME_FROM_DOUBLE, EMACS_TIME_TO_DOUBLE): New macros.
2251 (set_file_times, make_time, lisp_time_argument): Adjust signature.
2252 (make_timeval, make_lisp_time, decode_time_components): New decls.
2253 (EMACS_TIME_CMP): Remove; no longer used. Plus, it was buggy, in
2254 that it mishandled time_t overflow. You can't compare by subtracting!
2255 (EMACS_TIME_EQ, EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE)
2256 (EMACS_TIME_LT, EMACS_TIME_LE): Rewrite in terms of timespec_cmp.
2257
2258 * term.c: Include <sys/time.h>.
2259 (timeval_to_Time): New function, for proper overflow wraparound.
2260 (term_mouse_position, term_mouse_click): Use it.
2261
2262 * undo.c (record_first_change): Support higher-resolution time stamps
2263 in the undo buffer.
2264 (Fprimitive_undo): Use them when restoring time stamps.
2265
2266 * w32.c (ltime, U64_TO_LISP_TIME, process_times, emacs_gnutls_pull)
2267 (w32_get_internal_run_time):
2268 Port to higher-resolution Emacs time stamps.
2269 (ltime): Now accepts single 64-bit integer, as that's more convenient
2270 for callers.
2271
2272 * xdisp.c (start_hourglass): Port to ns-resolution time stamps.
2273
2274 * xgselect.c, xgselect.h (xg_select): Add sigmask argument,
2275 for compatibility with pselect. Support ns-resolution time stamps.
2276
2277 * xmenu.c (x_menu_wait_for_event): Support ns-resolution time stamps.
2278
2279 * xselect.c (wait_for_property_change, x_get_foreign_selection):
2280 Check for time stamp overflow, and support ns-resolution time stamps.
2281
2282 * xterm.c: Don't include sys/time.h; gnulib does that for us now.
2283 Don't worry about whether HAVE_TIMEVAL and HAVE_SELECT are set.
2284 (timeval_subtract): Remove; no longer needed.
2285 (XTflash, XTring_bell, x_wait_for_event):
2286 Port to ns-resolution time stamps. Don't assume time_t is signed.
2287
22882012-06-22 Chong Yidong <cyd@gnu.org>
2289
2290 * xdisp.c (x_consider_frame_title): Revert last change.
2291
22922012-06-22 Eli Zaretskii <eliz@gnu.org>
2293
2294 * alloc.c (NSTATICS): Enlarge to 0x650. Otherwise, Emacs compiled
2295 with -DENABLE_CHECKING -DXASSERTS -DGLYPH_DEBUG=1 -DBYTE_CODE_METER
2296 aborts in staticpro during startup. (Without -DBYTE_CODE_METER,
2297 staticidx goes up to 1597 out of 1600 = 0x640.)
2298
22992012-06-20 Paul Eggert <eggert@cs.ucla.edu>
2300
2301 * fileio.c (Fdefault_file_modes): Block input while fiddling with umask.
2302 Otherwise, the umask might be mistakenly 0 while handling input signals.
2303
23042012-06-19 Stefan Monnier <monnier@iro.umontreal.ca>
2305
2306 * minibuf.c (Fread_string): Bind minibuffer-completion-table.
2307
23082012-06-19 Dmitry Antipov <dmantipov@yandex.ru>
2309
2310 * alloc.c, bytecode.c, ccl.c, coding.c, composite.c, data.c, dosfns.c:
2311 * font.c, image.c, keyboard.c, lread.c, menu.c, minibuf.c, msdos.c:
2312 * print.c, syntax.c, window.c, xmenu.c, xselect.c: Replace direct
2313 access to `contents' member of Lisp_Vector objects with AREF and ASET
2314 where appropriate.
2315
12012-06-19 Chong Yidong <cyd@gnu.org> 23162012-06-19 Chong Yidong <cyd@gnu.org>
2 2317
3 * frame.c (delete_frame): When selecting a frame on a different 2318 * frame.c (delete_frame): When selecting a frame on a different
@@ -19,7 +2334,7 @@
19 Port byte-code-meter to modern targets. 2334 Port byte-code-meter to modern targets.
20 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume 2335 * bytecode.c (METER_CODE) [BYTE_CODE_METER]: Don't assume
21 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with 2336 !CHECK_LISP_OBJECT_TYPE && !USE_LSB_TAG. Problem with
22 CHECK_LISP_OBJECT_TYPE reported by Dmitry Andropov in 2337 CHECK_LISP_OBJECT_TYPE reported by Dmitry Antipov in
23 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>. 2338 <http://lists.gnu.org/archive/html/emacs-devel/2012-06/msg00282.html>.
24 (METER_1, METER_2): Simplify. 2339 (METER_1, METER_2): Simplify.
25 2340
@@ -1601,7 +3916,7 @@
1601 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows. 3916 Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
1602 3917
1603 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font. 3918 * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
1604 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c 3919 (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c.
1605 3920
1606 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken 3921 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
1607 reference to image_cache->refcount. 3922 reference to image_cache->refcount.
@@ -6533,7 +8848,7 @@
6533 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6. 8848 (EmacsToolbar): Implements NSToolbarDelegate on OSX >= 10.6.
6534 8849
6535 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods 8850 * nsselect.m (ns_string_from_pasteboard): Don't use deprecated methods
6536 cString and lossyCString on OSX >= 10.4 8851 cString and lossyCString on OSX >= 10.4.
6537 8852
6538 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method 8853 * nsmenu.m (fillWithWidgetValue): Don't use deprecated method
6539 sizeToFit on OSX >= 10.2. 8854 sizeToFit on OSX >= 10.2.