1 2013-07-01 Paul Eggert <eggert@cs.ucla.edu>
3 Fix bug re noninteractive multithreaded memory allocation (Bug#14569).
4 * emacs.c (malloc_enable_thread): Hoist extern decl to top level.
5 (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
6 Invoke malloc_enable_thread even when not interactive.
7 Problem reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
8 * process.c (init_process_emacs) [CYGWIN]: Tickle glib even
9 in this case, since the underlying bug has now been fixed.
11 2013-07-01 Juanma Barranquero <lekktu@gmail.com>
13 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before
14 unlinking it (bug#14691).
16 2013-06-30 Michal Nazarewicz <mina86@mina86.com>
18 * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
19 before checking whether buffer is modified. This lets
20 `kill-buffer-query-functions' cancel killing of the buffer or save
21 its content before `kill-buffer' asks user the "Buffer %s
22 modified; kill anyway?" question.
24 2013-06-30 Jan Djärv <jan.h.d@swipnet.se>
26 * nsfns.m (handlePanelKeys): Don't process Command+Function keys.
27 Let the super performKeyEquivalent deal with them (Bug#14747).
29 2013-06-30 Paul Eggert <eggert@cs.ucla.edu>
31 * widget.c (resize_cb): Remove unused local.
33 Do not use GTK 3 if it exists but cannot be compiled.
34 * xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
35 * xterm.c (x_error_handler) [!USE_GTK]:
38 * intervals.c (get_local_map): Actually clip POSITION (Bug#14753).
40 2013-06-30 Eli Zaretskii <eliz@gnu.org>
42 * intervals.c (get_local_map): Instead of aborting, clip POSITION
43 to the valid range of values. (Bug#14753)
45 * xdisp.c (Fmove_point_visually): Invalidate the cursor position
46 when moving point by using the current glyph matrix. This avoids
47 the need to force redisplay when this function is called in a
50 2013-06-29 Paul Eggert <eggert@cs.ucla.edu>
52 Fix minor problems found by static checking.
53 * coding.c (encode_inhibit_flag, inhibit_flag): New functions.
54 Redo the latter's body to sidestep GCC parenthesization warnings.
55 (setup_coding_system, detect_coding, detect_coding_system): Use them.
56 * coding.c (detect_coding, detect_coding_system):
57 * coding.h (struct undecided_spec):
59 * image.c (QCmax_width, QCmax_height): Now static.
60 * xdisp.c (Fmove_point_visually): Remove unused local.
62 2013-06-29 Eli Zaretskii <eliz@gnu.org>
64 * xdisp.c (Fmove_point_visually): New function.
66 2013-06-28 Kenichi Handa <handa@gnu.org>
68 * coding.h (define_coding_undecided_arg_index): New enum.
69 (coding_attr_index): New members
70 coding_attr_undecided_inhibit_null_byte_detection,
71 coding_attr_undecided_inhibit_iso_escape_detection,
72 coding_attr_undecided_prefer_utf_8.
73 (undecided_spec): New struct.
74 (struct coding_system): New member `undecided' of the member
77 * coding.c (setup_coding_system): Handle CODING->spec.undecided.
78 (detect_coding): Likewise.
79 (detect_coding_system): Likewise.
80 (Fdefine_coding_system_internal): New coding system properties
81 :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
83 (syms_of_coding): Adjust for coding_arg_undecided_max.
85 2013-06-28 Paul Eggert <eggert@cs.ucla.edu>
87 * image.c (x_from_xcolors): Remove unused local.
89 2013-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
91 Defer image data transfer between X client and server until actual
94 * dispextern.h (struct image) [HAVE_X_WINDOWS]: New members `ximg'
97 * image.c (Destroy_Image): Remove.
98 (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p',
99 `mask_p', and `colors_p'. All uses changed.
100 (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'.
101 (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS):
102 New macros for `flags' arg to x_clear_image_1.
103 (postprocess_image, xpm_load_image, x_build_heuristic_mask)
104 (png_load_body): Use x_clear_image_1 instead of Free_Pixmap.
105 (ZPixmap, XGetImage) [HAVE_NS]: Remove.
106 (image_get_x_image_or_dc, image_unget_x_image_or_dc)
107 (image_get_x_image, image_unget_x_image): New functions or macros.
108 (image_background, image_background_transparent, x_to_xcolors)
109 (x_build_heuristic_mask): Use image_get_x_image_or_dc instead of
110 XGetImage or CreateCompatibleDC. Use image_unget_x_image_or_dc
111 instead of Destroy_Image.
112 (image_create_x_image_and_pixmap, image_put_x_image): New functions.
113 (xpm_load_image, x_from_xcolors, x_build_heuristic_mask, pbm_load)
114 (png_load_body, jpeg_load_body, tiff_load, gif_load)
115 (imagemagick_load_image, svg_load_image): Use them instead of
116 x_create_x_image_and_pixmap, and x_put_x_image followed by
117 x_destroy_x_image, respectively.
118 (xpm_load) [HAVE_XPM && !HAVE_NTGUI]: Use XpmReadFileToImage and
119 XpmCreateImageFromBuffer instead of XpmReadFileToPixmap and
120 XpmCreatePixmapFromBuffer. Create pixmaps. Fill background and
121 background_transparent fields.
122 (image_sync_to_pixmaps) [HAVE_X_WINDOWS]: New function.
123 (prepare_image_for_display, x_disable_image) [HAVE_X_WINDOWS]: Use it.
125 2013-06-27 Paul Eggert <eggert@cs.ucla.edu>
127 Do not tickle glib SIGCHLD handling if Cygwin (Bug#14569).
128 This mostly consists of undoing recent changes.
129 * callproc.c (Fcall_process):
130 * process.c (create_process):
131 Do not worry about catching SIGCHLD here, undoing previous change.
132 * nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
133 * process.c, process.h (catch_child_signal):
134 No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
135 * process.c (catch_child_handler): Don't worry about being called
136 lazily and do not assume caller has blocked SIGCHLD, undoing
137 previous change. Move first-time stuff back to
138 init_process_emacs, undoing 06-22 change. If CYGWIN, do not
139 tickle glib, as that causes Cygwin bootstrap to fail. Do not
140 set lib_child_handler if it's already initialized, which may
141 help avoid problems on GNUStep.
143 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
145 A more-conservative workaround for Cygwin SIGCHLD issues (Bug#14569).
146 * callproc.c (Fcall_process):
147 * process.c (create_process):
148 Make sure SIGCHLD is caught before we fork,
149 since Emacs startup no arranges to catch SIGCHLD.
150 * process.c (lib_child_handler): Initialize to null, not to
152 (catch_child_signal): Allow self to be called lazily.
153 Do nothing if it's already been called.
154 Assume caller has blocked SIGCHLD (all callers do now).
155 * emacs.c (main): Do not catch SIGCHLD here; defer it until
156 just before it's really needed.
157 * nsterm.m (ns_term_init): No need to re-catch SIGCHLD here,
158 since it hasn't been caught yet.
160 2013-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
162 * image.c (compute_image_size): New function to implement
163 :max-width and :max-height.
164 (imagemagick_load_image): Use it.
166 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
168 Try to avoid malloc SEGVs on Cygwin (Bug#14569).
169 * callproc.c, process.h (block_child_signal, unblock_child_signal):
171 * emacs.c (main): Catch SIGCHLD just before initializing gfilenotify.
172 * process.c (catch_child_signal): Block SIGCHLD while futzing with
173 the SIGCHLD handler, since the code is not atomic and (due to glib)
174 signals may be arriving now.
175 * sysdep.c (init_signals): Do not catch child signals here;
176 'main' now does that later, at a safer time.
178 2013-06-22 Paul Eggert <eggert@cs.ucla.edu>
180 Clean up SIGCHLD handling a bit (Bug#14569).
181 * process.c, process.h (catch_child_signal):
182 Now always extern, even if !NS_IMPL_GNUSTEP.
183 * process.c (catch_child_signal): Move glib tickler here from
184 init_process_emacs, so that it's done earlier in Emacs
185 initialization. Also move the noninteractive && !initialized
186 check here from init_process_emacs. This is all a bit cleaner for
187 GNUish platforms, and I hope it works around the Cygwin bug.
188 * sysdep.c (init_signals): Invoke catch_child_signal here, so
189 that glib signal handling is tickled before glib creates threads.
191 * process.c (wait_reading_process_output): Avoid int overflow
192 when reading more than 2 GiB total from a process.
194 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
196 * process.c (create_process): Handle a couple more cases,
197 i.e., work even if new_argv and wait_child_setup[i] are cached.
198 Use Fcall_process's style for volatile vars.
200 2013-06-21 Andreas Schwab <schwab@linux-m68k.org>
202 * process.c (create_process): Mark PROCESS volatile.
204 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
206 Use C99-style flexible array members if available.
207 This avoids some subtle aliasing issues, which typically
208 aren't a problem with GCC but may be a problem elsewhere.
209 * alloc.c (sdata): New typedef, replacing the old struct sdata.
210 It is a struct if GC_CHECK_STRING_BYTES, a union otherwise.
211 In either case, it uses a flexible array member rather than
212 the old struct hack. All uses changed.
213 (SDATA_NBYTES, sweep_strings) [!GC_CHECK_STRING_BYTES]:
214 Adjust to sdata reorganization.
215 * alloc.c (VBLOCK_BYTES_MIN, allocate_vectorlike, Fgarbage_collect):
216 Use offsetof (struct, flex_array_member), not sizeof (struct), as
217 that ports better to pre-C99 non-GCC.
218 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
219 Use CHAR_TABLE_STANDARD_SLOTS rather than its definition,
220 as the latter has changed.
221 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Move here from w32.c,
222 and port better to pre-C99 GCC.
223 * image.c (struct xpm_cached_color):
224 * lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
225 (struct Lisp_Char_Table, struct Lisp_Sub_Char_Table):
226 Use FLEXIBLE_ARRAY_MEMBER.
227 * lisp.h (string_bytes) [GC_CHECK_STRING_BYTES]:
228 Move decl to top level so it gets checked against implementation.
229 (CHAR_TABLE_STANDARD_SLOTS): Adjust to struct Lisp_Char_Table change.
230 * w32.c (FLEXIBLE_ARRAY_MEMBER): Move to conf_post.h.
232 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
234 * syntax.c: Integer cleanups.
235 (SYNTAX_FLAGS_COMMENT_STYLEC): Return a boolean, not 0-or-2.
236 All uses that need 0-or-2 changed to:
237 (SYNTAX_FLAGS_COMMENT_STYLEC2): New macro, with the same semantics
238 as the old SYNTAX_FLAGS_COMMENT_STYLEC.
239 (struct lisp_parse_state, syntax_prefix_flag_p, update_syntax_table)
240 (char_quoted, prev_char_comend_first, back_comment)
241 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
242 (in_classes, forw_comment, scan_lists, scan_sexps_forward):
243 Use bool for boolean.
244 (update_syntax_table, skip_chars, skip_syntaxes):
245 Prefer int to unsigned when either will do.
246 (back_comment): Return boolean success flag, like forw_comment,
247 instead of positive-or-minus-1 (which might have overflowed int anyway).
248 Don't stuff ptrdiff_t into int.
249 (syntax_spec_code, syntax_code_spec): Now const.
250 (Fmatching_paren, scan_lists, scan_sexps_forward):
251 Use enum syntaxcode for syntax code.
252 (Fmatching_paren): Check that arg is a character, not just an integer.
253 (Fstring_to_syntax): Don't assume 0377 fits in enum syntaxcode.
254 (Finternal_describe_syntax_value): Omit no-longer-needed
256 (skip_chars): Use char, not unsigned char, when the distinction
258 (forw_comment, scan_lists): Prefer A |= B to A = A || B when B's cheap.
259 * bytecode.c (exec_byte_code):
260 * syntax.c (syntax_spec_code, Fchar_syntax)
261 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
263 * syntax.h (SYNTAX_WITH_FLAGS):
264 Omit unnecessary casts.
266 2013-06-20 Eli Zaretskii <eliz@gnu.org>
268 * w32fns.c (w32_wnd_proc): Don't compute the header line and mode
269 line dimensions here, to avoid race conditions with the main
270 thread. (Bug#14062, bug#14630, bug#14669)
272 * w32term.c (w32_draw_window_cursor): Compute the header line and
273 mode line dimensions here.
274 <w32_system_caret_window, w32_system_caret_hdr_height>:
275 <w32_system_caret_mode_height>: New variables.
277 * w32term.h: Declare them.
279 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
281 * alloc.c (die): Move "assertion failed" string here ...
282 * lisp.h (eassert): ... from here. Also, suppress evaluation of
283 COND when SUPPRESS_CHECKING. This shrinks the executable text
284 size by 0.8% to 2.2% when configured with --enable-checking,
285 depending on optimization flags (GCC 4.8.1 x86-64).
287 * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
289 2013-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
291 * floatfns.c (Flog) [HAVE_LOG2]: Use log2 if available and if the
292 base is 2; this is more accurate.
294 2013-06-19 Juanma Barranquero <lekktu@gmail.com>
296 * sound.c (string_default): Move to !WINDOWSNT section.
297 (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
299 2013-06-19 Paul Eggert <eggert@cs.ucla.edu>
301 * sound.c: Integer cleanups.
302 Remove unnecessary forward decls.
303 (struct sound_device): The 'file' member is now a Lisp_Object, not
304 a char *, so that we needn't invoke alloca on a huge size.
305 (Fplay_sound_internal): Adjust to this.
306 (string_default): New function.
307 (vox_open, vox_init, alsa_open, alsa_configure, alsa_init):
308 Use it to adjust to the struct sound_device change.
309 (parse_sound, wav_init, au_init, alsa_init): Use bool for booleans.
312 * syntax.c (skip_chars): Don't use uninitialized storage
313 when searching a multibyte buffer for characters that are not in a
314 unibyte string that contains non-ASCII characters.
316 2013-06-18 Jan Djärv <jan.h.d@swipnet.se>
318 * process.c: Include xgselect.h if HAVE_GLIB. Include glib.h
319 if HAVE_GLIB && ! WINDOWSNT (Bug#14654).
321 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
323 * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
325 2013-06-18 Kenichi Handa <handa@gnu.org>
327 * font.c (Ffont_spec): Signal an error for an invalid font name
330 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
332 Porting fixes for merged specpdl and backtrace stacks (Bug#14643).
333 In particular this ports to 32-bit sparc Sun cc.
334 * eval.c (init_eval_once, grow_specpdl): Allocate a specbinding
335 array with a dummy element at specpdl[-1], so that its address can
337 (unbind_to): Do not copy the binding; not needed, now that we
338 copy old_value in the one place where the copy is needed.
339 * fileio.c (Fwrite_region): Use ptrdiff_t, not int, for specpdl count.
340 * lisp.h (BITS_PER_PTRDIFF_T): Remove; no longer needed.
341 (union specbinding): Rename from struct specbinding. Redo layout
342 to avoid the need for 'ptrdiff_t nargs : BITS_PER_PTRDIFF_T - 1;',
343 which is not portable. With Sun C 5.12 32-bit sparc, the
344 declaration causes nargs to be an unsigned bitfield, a behavior
345 that the C standard allows; but Emacs wants nargs to be signed.
346 The overall type is now a union of structures rather than a
347 structure of union of structures, and the 'kind' member is now a
348 bitfield, so that the overall type doesn't grow. All uses changed.
349 * process.c (Fmake_serial_process): Remove unnecessary initialization.
351 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
353 * frame.c (x_report_frame_params): Cast parent_desc to uintptr_t.
354 Needed if HAVE_NTGUI. Reported by Juanma Barranquero.
356 * nsfont.m (ns_registry_to_script): Parenthesize while expression.
358 2013-06-17 Eli Zaretskii <eliz@gnu.org>
360 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
361 unless we know that the window w's frame is a frame object.
362 Another attempt at solving bug#14062 and bug#14630.
364 2013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
366 * textprop.c (property_set_type): New enum.
367 (add_properties): Allow appending/prepending text properties.
368 (add_text_properties_1): Factored out of Fadd_text_properties.
369 (Fadd_text_properties): Move all the code into
370 add_text_properties_1.
371 (Fadd_face_text_property): New function that calls
372 add_text_properties_1.
374 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
376 Move functions from lisp.h to individual modules when possible.
377 From a suggestion by Andreas Schwab in <http://bugs.gnu.org/11935#68>.
378 * alloc.c (XFLOAT_INIT, set_symbol_name):
379 * buffer.c (CHECK_OVERLAY):
380 * chartab.c (CHECK_CHAR_TABLE, set_char_table_ascii)
381 (set_char_table_parent):
382 * coding.c (CHECK_NATNUM_CAR, CHECK_NATNUM_CDR):
383 * data.c (BOOLFWDP, INTFWDP, KBOARD_OBJFWDP, OBJFWDP, XBOOLFWD)
384 (XKBOARD_OBJFWD, XINTFWD, XOBJFWD, CHECK_SUBR, set_blv_found)
385 (blv_value, set_blv_value, set_blv_where, set_blv_defcell)
387 * emacs.c (setlocale) [!HAVE_SETLOCALE]:
388 * eval.c (specpdl_symbol, specpdl_old_value, specpdl_where)
389 (specpdl_arg, specpdl_func, backtrace_function, backtrace_nargs)
390 (backtrace_args, backtrace_debug_on_exit):
391 * floatfns.c (CHECK_FLOAT):
392 * fns.c (CHECK_HASH_TABLE, CHECK_LIST_END)
393 (set_hash_key_and_value, set_hash_next, set_hash_next_slot)
394 (set_hash_hash, set_hash_hash_slot, set_hash_index)
395 (set_hash_index_slot):
396 * keymap.c (CHECK_VECTOR_OR_CHAR_TABLE):
397 * marker.c (CHECK_MARKER):
398 * textprop.c (CHECK_STRING_OR_BUFFER):
399 * window.c (CHECK_WINDOW_CONFIGURATION):
400 Move here from lisp.h, and make these functions static rather than
402 * buffer.c (Qoverlayp):
404 * fns.c (Qhash_table_p):
405 * window.c (Qwindow_configuration_p):
407 * lisp.h: Remove the abovementioned defns and decls.
409 Use functions, not macros, for XINT etc. (Bug#11935).
410 In lisp.h, prefer functions to function-like macros, and
411 constants to object-like macros, when either will do. This:
412 . simplifies use, as there's no more need to worry about
413 arguments' side effects being evaluated multiple times.
414 . makes the code easier to debug on some platforms.
415 However, when using gcc -O0, keep using function-like macros
416 for a few critical operations, for performance reasons.
417 This sort of thing isn't needed with gcc -Og, but -Og
418 is a GCC 4.8 feature and isn't widely-enough available yet.
419 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]:
420 Remove enum lsb_bits; no longer needed.
421 (allocate_misc, free_misc): Don't use XMISCTYPE as an lvalue.
422 * buffer.c (Qoverlap):
424 * fns.c (Qhash_table_p):
425 Now extern, so lisp.h can use these symbols.
426 * dispextern.h: Include character.h, for MAX_CHAR etc.
427 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
428 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
429 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
430 (GLYPH_CODE_P): Move here from lisp.h.
431 (GLYPH_CHAR, GLYPH_FACE, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
432 (GLYPH_CHAR_VALID_P, GLYPH_CODE_P): Now functions, not macros.
433 (GLYPH_MODE_LINE_FACE): Now enums, not macros.
434 * eval.c (Fautoload): Cast XUNTAG output to intptr_t, since
435 XUNTAG now returns void *.
436 * lisp.h (lisp_h_XLI, lisp_h_XIL, lisp_h_CHECK_LIST_CONS)
437 (lisp_h_CHECK_NUMBER CHECK_SYMBOL, lisp_h_CHECK_TYPE)
438 (lisp_h_CONSP, lisp_h_EQ, lisp_h_FLOATP, lisp_h_INTEGERP)
439 (lisp_h_MARKERP, lisp_h_MISCP, lisp_h_NILP)
440 (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_CONSTANT_P)
441 (lisp_h_SYMBOL_VAL, lisp_h_SYMBOLP, lisp_h_VECTORLIKEP)
442 (lisp_h_XCAR, lisp_h_XCDR, lisp_h_XCONS, lisp_h_XHASH)
443 (lisp_h_XPNTR, lisp_h_XSYMBOL):
444 New macros, renamed from their sans-lisp_h_ counterparts.
445 (XLI, XIL, CHECK_LIST_CONS, CHECK_NUMBER CHECK_SYMBOL)
446 (CHECK_TYPE, CONSP, EQ, FLOATP, INTEGERP, MARKERP)
447 (MISCP, NILP, SET_SYMBOL_VAL, SYMBOL_CONSTANT_P, SYMBOL_VAL, SYMBOLP)
448 (VECTORLIKEP, XCAR, XCDR, XCONS, XHASH, XPNTR, XSYMBOL):
449 If compiling via GCC without optimization, define these as macros
450 in addition to inline functions.
451 To disable this, compile with -DINLINING=0.
452 (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): New macros.
453 (check_cons_list) [!GC_CHECK_CONS_LIST]: Likewise.
454 (make_number, XFASTINT, XINT, XTYPE, XUNTAG): Likewise, but
455 hand-optimize only in the USE_LSB_TAG case, as GNUish hosts do that.
456 (INTMASK, VALMASK): Now macros, since static values cannot be
457 accessed from extern inline functions.
458 (VALMASK): Also a constant, for benefit of old GDB.
459 (LISP_INT_TAG_P): Remove; no longer needed as the only caller
460 is INTEGERP, which can fold it in.
461 (XLI, XIL, XHASH, XTYPE,XINT, XFASTINT, XUINT)
462 (make_number, XPNTR, XUNTAG, EQ, XCONS, XVECTOR, XSTRING, XSYMBOL)
463 (XFLOAT, XPROCESS, XWINDOW, XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE)
464 (XSUB_CHAR_TABLE, XBOOL_VECTOR, make_lisp_ptr, CHECK_TYPE)
465 (CHECK_STRING_OR_BUFFER, XCAR, XCDR, XSETCAR, XSETCDR, CAR, CDR)
466 (CAR_SAFE, CDR_SAFE, STRING_MULTIBYTE, SDATA, SSDATA, SREF, SSET)
467 (SCHARS, STRING_BYTES, SBYTES, STRING_SET_CHARS, STRING_COPYIN, AREF)
468 (ASIZE, ASET, CHAR_TABLE_REF_ASCII, CHAR_TABLE_REF)
469 (CHAR_TABLE_SET, CHAR_TABLE_EXTRA_SLOTS, SYMBOL_VAL, SYMBOL_ALIAS)
470 (SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL, SET_SYMBOL_ALIAS)
471 (SET_SYMBOL_BLV, SET_SYMBOL_FWD, SYMBOL_NAME, SYMBOL_INTERNED_P)
472 (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P, SYMBOL_CONSTANT_P)
473 (XHASH_TABLE, HASH_TABLE_P, CHECK_HASH_TABLE, HASH_KEY, HASH_VALUE)
474 (HASH_NEXT, HASH_HASH, HASH_INDEX, HASH_TABLE_SIZE)
475 (XMISC, XMISCANY, XMARKER, XOVERLAY, XSAVE_VALUE, XFWDTYPE)
476 (XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD, XKBOARD_OBJFWD)
477 (XFLOAT_DATA, XFLOAT_INIT, NILP, NUMBERP, NATNUMP)
478 (RANGED_INTEGERP, CONSP, FLOATP, MISCP, STRINGP, SYMBOLP)
479 (INTEGERP, VECTORLIKEP, VECTORP, OVERLAYP)
480 (MARKERP, SAVE_VALUEP, AUTOLOADP, INTFWDP, BOOLFWDP, OBJFWDP)
481 (BUFFER_OBJFWDP, KBOARD_OBJFWDP, PSEUDOVECTOR_TYPEP)
482 (PSEUDOVECTORP, WINDOW_CONFIGURATIONP, PROCESSP, WINDOWP)
483 (TERMINALP, SUBRP, COMPILEDP, BUFFERP, CHAR_TABLE_P)
484 (SUB_CHAR_TABLE_P, BOOL_VECTOR_P, FRAMEP, IMAGEP, ARRAYP)
485 (CHECK_LIST, CHECK_LIST_CONS, CHECK_LIST_END, CHECK_STRING)
486 (CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE)
487 (CHECK_VECTOR, CHECK_VECTOR_OR_STRING, CHECK_ARRAY)
488 (CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW)
489 (CHECK_WINDOW_CONFIGURATION, CHECK_PROCESS, CHECK_SUBR)
490 (CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, XFLOATINT)
491 (CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT, CHECK_OVERLAY)
492 (CHECK_NUMBER_CAR, CHECK_NUMBER_CDR, CHECK_NATNUM_CAR)
493 (CHECK_NATNUM_CDR, FUNCTIONP, SPECPDL_INDEX, LOADHIST_ATTACH)
495 (check_cons_list) [!GC_CHECK_CONS_LIST]: New empty function.
496 (LISP_MAKE_RVALUE, TYPEMASK): Remove; no longer needed.
497 (VALMASK): Define in one place rather than in two, merging the
498 USE_LSB_TAG parts; this is simpler.
499 (aref_addr, gc_aset, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM)
500 (max, min, struct Lisp_String, UNSIGNED_CMP, ASCII_CHAR_P):
501 Move up, to avoid use before definition.
502 Also include "globals.h" earlier, for the same reason.
503 (make_natnum): New function.
504 (XUNTAG): Now returns void *, not intptr_t, as this means fewer casts.
505 (union Lisp_Fwd, BOOLFWDP, BOOL_VECTOR_P, BUFFER_OBJFWDP, BUFFERP)
506 (CHAR_TABLE_P, CHAR_TABLE_REF_ASCII, CONSP, FLOATP, INTEGERP, INTFWDP)
507 (KBOARD_OBJFWDP, MARKERP, MISCP, NILP, OBJFWDP, OVERLAYP, PROCESSP)
508 (PSEUDOVECTORP, SAVE_VALUEP, STRINGP, SUB_CHAR_TABLE_P, SUBRP, SYMBOLP)
509 (VECTORLIKEP, WINDOWP, Qoverlayp, char_table_ref, char_table_set)
510 (char_table_translate, Qarrayp, Qbufferp, Qbuffer_or_string_p)
511 (Qchar_table_p, Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp)
512 (Qnil, Qnumberp, Qsubrp, Qstringp, Qsymbolp, Qvectorp)
513 (Qvector_or_char_table_p, Qwholenump, Ffboundp, wrong_type_argument)
514 (initialized, Qhash_table_p, extract_float, Qprocessp, Qwindowp)
515 (Qwindow_configuration_p, Qimage): New forward declarations.
516 (XSETFASTINT): Simplify by rewriting in terms of make_natnum.
517 (STRING_COPYIN): Remove; unused.
518 (XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove these macros, replacing with ...
519 (xcar_addr, xcdr_addr): New functions. All uses changed.
520 (IEEE_FLOATING_POINT): Now a constant, not a macro.
521 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
522 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
523 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
524 (GLYPH_CODE_P): Move to dispextern.h, to avoid define-before-use.
525 (TYPE_RANGED_INTEGERP): Simplify.
526 (Qsubrp, Qhash_table_p, Qoverlayp): New extern decls.
527 (setlocale, fixup_locale, synchronize_system_messages_locale)
528 (synchronize_system_time_locale) [!HAVE_SETLOCALE]:
529 Now empty functions, not macros.
530 (functionp): Return bool, not int.
531 * window.c (Qwindow_configuration_p): Now extern,
532 so window.h can use it.
533 * window.h (Qwindowp): Move decl back to lisp.h.
535 2013-06-15 Eli Zaretskii <eliz@gnu.org>
537 * xdisp.c (Fline_pixel_height): New function, required for solving
540 2013-06-15 Paul Eggert <eggert@cs.ucla.edu>
542 * fns.c (Fcopy_sequence): Simplify XTYPE calculation.
544 2013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
546 * lread.c (syms_of_lread):
547 * fns.c (Fprovide): Adjust to new format of after-load-alist.
549 2013-06-13 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
551 * fileio.c (Fdo_auto_save): Trap errors in auto-save-hook. (Bug#14479)
553 2013-06-12 Xue Fuqiao <xfq.free@gmail.com>
555 * fileio.c (expand_file_name): Doc fix.
557 2013-06-11 Paul Eggert <eggert@cs.ucla.edu>
559 Tickle glib by waiting for Emacs itself, not for process 0 (Bug#14569).
560 * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
561 Wait for self, not for 0. This can't hurt on GNU or similar
562 system, and may help with Cygwin.
564 * keyboard.c: Don't use PROP (...) as an lvalue.
565 (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]:
566 Use set_prop (A, B), not PROP (A) = B.
568 2013-06-10 Eli Zaretskii <eliz@gnu.org>
570 * xdisp.c (get_it_property): Use it->window instead of generating
571 a Lisp object from it->w.
573 2013-06-09 Eli Zaretskii <eliz@gnu.org>
575 * xdisp.c (get_it_property): If it->object is a buffer, pass to
576 get-char-property the window that is being rendered, instead of
577 the buffer, to support window-specific overlays. (Bug#14575)
578 (compute_display_string_pos): When W is NULL, use the current
579 buffer as the object to pass to get-char-property.
580 (Fcurrent_bidi_paragraph_direction): Assign NULL to the window
581 pointer member of the bidi iterator, since no window is pertinent
584 2013-06-08 Eli Zaretskii <eliz@gnu.org>
586 * bidi.c (bidi_fetch_char): Accept additional argument, the window
587 being displayed, and pass it to compute_display_string_pos.
588 (bidi_level_of_next_char, bidi_resolve_explicit_1)
589 (bidi_paragraph_init): All callers changed.
591 * xdisp.c (init_from_display_pos, init_iterator)
592 (handle_single_display_spec, next_overlay_string)
593 (get_overlay_strings_1, reseat_1, reseat_to_string)
594 (push_prefix_prop, Fcurrent_bidi_paragraph_direction):
595 Set bidi_it.w member from it->w.
596 (compute_display_string_pos): Accept additional argument, the
597 window being displayed, and pass it to Fget_char_property.
600 * dispextern.h (struct bidi_it): New member w, the window being
602 (compute_display_string_pos): Adjust prototype.
604 2013-06-08 Jan Djärv <jan.h.d@swipnet.se>
606 * xgselect.c: Remove unneeded include xterm.h.
608 * process.c (wait_reading_process_output): Check for NS before GLIB.
609 GLIB may be linked in due to rsvg, but ns_select must be called.
611 * xgselect.c (xg_select): Remove call to window_system_available
612 and g_main_context_pending at the top, so Gdk events (i.e. file
613 notify) are processed when Emacs is started with -nw.
615 2013-06-07 Eli Zaretskii <eliz@gnu.org>
617 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
618 (ctagsfiles3): New variable, includes only *.m files.
619 (TAGS): Use an explicit language name in the regular expressions,
620 to avoid transformation of '/SOMETHING' by MSYS to
623 2013-06-07 Richard Copley <rcopley@gmail.com> (tiny change)
625 * epaths.in: Fix commentary to PATH_SITELOADSEARCH.
627 2013-06-06 Eli Zaretskii <eliz@gnu.org>
629 * xdisp.c (note_mouse_highlight): When mouse-highlight is off,
630 still need to set the mouse pointer shape and activate help-echo.
633 2013-06-06 Paul Eggert <eggert@cs.ucla.edu>
635 A few porting etc. fixes for the new file monitor code.
636 See the thread containing
637 <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
638 * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
639 (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
640 (dir_monitor_callback, Fgfile_rm_watch):
641 Use assq_no_quit instead of Fassoc, for speed.
642 (dir_monitor_callback, Fgfile_rm_watch):
643 eassert that the monitor is a fixnum.
644 (dir_monitor_callback): No need for CDR_SAFE.
645 Simplify building of lisp with alternative tails.
646 (Fgfile_add_watch, Fgfile_rm_watch):
647 Do not assume glib functions set errno reliably on failure.
648 (Fgfile_add_watch): Check that the monitor survives the XIL trick,
649 and signal an error otherwise.
650 (Fgfile_rm_watch): Prefer CONSP to !NILP.
651 Use Fdelq instead of Fdelete, for speed.
653 2013-06-05 Eli Zaretskii <eliz@gnu.org>
655 * xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
656 don't insist on being invoked on a highlighted tool-bar button.
657 Avoids losing tool-bar functionality when mouse-highlight is nil.
658 (note_tool_bar_highlight, note_mode_line_or_margin_highlight):
659 Don't highlight when mouse-highlight is nil.
660 (note_mouse_highlight): When mouse-highlight is nil, don't return
661 right away; instead, run tool-bar and mode-line highlight
662 subroutine, clear any existing highlight, and revert the mouse
663 pointer to its default shape. (Bug#14558)
665 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
667 * lisp.mk (lisp): Add prog-mode.el.
669 2013-06-05 Paul Eggert <eggert@cs.ucla.edu>
671 Chain glib's SIGCHLD handler from Emacs's (Bug#14474).
672 * process.c (dummy_handler): New function.
673 (lib_child_handler): New static var.
674 (handle_child_signal): Invoke it.
675 (catch_child_signal): If a library has set up a signal handler,
676 save it into lib_child_handler.
677 (init_process_emacs): If using glib and not on Windows, tickle glib's
678 child-handling code so that it initializes its private SIGCHLD handler.
679 * syssignal.h (SA_SIGINFO): Default to 0.
680 * xterm.c (x_term_init): Remove D-bus hack that I installed on May
681 31; it should no longer be needed now.
683 2013-06-05 Michael Albinus <michael.albinus@gmx.de>
685 * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify.
687 * gfilenotify.c (globals_of_gfilenotify): New function.
688 (syms_of_gfilenotify): Move global initialization there.
690 * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
692 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
694 * keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
695 * keyboard.c (menu_bar_items, tool_bar_items):
696 * doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
697 not override local keymaps any more.
699 2013-06-04 Eli Zaretskii <eliz@gnu.org>
701 * window.c (Fpos_visible_in_window_p): Doc fix. (Bug#14540)
703 2013-06-03 Eli Zaretskii <eliz@gnu.org>
705 * w32console.c (initialize_w32_display): Return the dimensions of
706 the console window via 2 additional arguments, not via the current
707 frame. This avoids crashes due to overrunning the bounds of
708 frame's decode_mode_spec_buffer, which is not resized following
709 the change of the frame dimensions from the initial 10x10.
711 * w32term.h (w32_initialize_display_info): Adjust prototype.
713 * term.c (init_tty): Take dimensions of the frame from the values
714 returned by initialize_w32_display.
716 * Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
717 (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
718 (LIBES): Add $(GFILENOTIFY_LIBS).
720 * w32inevt.c (handle_file_notifications): Add dummy implementation
723 * w32term.c: Wrap code with HAVE_W32NOTIFY.
725 2013-06-03 Jan Djärv <jan.h.d@swipnet.se>
727 * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
729 * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
731 * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
733 2013-06-03 Paul Eggert <eggert@cs.ucla.edu>
735 Fix minor problems found by static checking.
736 * data.c (pure_write_error):
737 Use xsignal2, not Fsignal, as Fsignal might return.
738 * eval.c (set_backtrace_debug_on_exit): Now static.
739 (backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
740 No longer inline. EXTERN_INLINE is needed only for functions
741 defined in .h files. Reindent function header as per GNU style.
742 (backtrace_p, backtrace_top, backtrace_next):
743 Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
744 compiler or linker. Add extern decls to pacify gcc -Wall.
745 * frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
747 * frame.c (free_monitors): Define only on platforms that need it.
748 * nsterm.m (ns_term_init):
749 * process.c (catch_child_signal):
750 Don't worry about whether SIGCHLD is defined, as SIGCHLD is
751 defined on all porting targets these days.
752 * process.c, process.h (catch_child_signal):
753 Make it extern only if NS_IMPL_GNUSTEP is defined.
755 2013-06-03 Eli Zaretskii <eliz@gnu.org>
757 * w32.c (gettimeofday): Make the signature identical to prototype
758 in nt/inc/sys/time.h.
760 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
762 * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to
765 * keyboard.c (safe_run_hooks_error): Improve error message.
767 * data.c (pure_write_error): Add `object' argument.
768 * puresize.h (CHECK_IMPURE): Use it.
770 2013-06-03 Michael Albinus <michael.albinus@gmx.de>
772 * Makefile.in (NOTIFY_OBJ): New variable.
773 (base_obj): Replace inotify.o by $(NOTIFY_OBJ).
775 * emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
776 Call syms_of_gfilenotify.
778 * gfilenotify.c: New file.
780 * keyboard.c (Qfile_notify): New variable. Replaces Qfile_inotify
782 (top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
783 HAVE_W32NOTIFY and USE_FILE_NOTIFY.
785 * lisp.h: Declare syms_of_gfilenotify.
787 * termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
789 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
791 Merge the specpdl and backtrace stacks. Make the structure of the
792 specpdl entries more obvious via a tagged union of structs.
793 * lisp.h (BITS_PER_PTRDIFF_T): New constant.
794 (enum specbind_tag): New enum.
795 (struct specbinding): Make it a tagged union of structs.
796 Add a case for backtrace records.
797 (specpdl_symbol, specpdl_old_value, specpdl_where, specpdl_arg)
798 (specpdl_func, backtrace_function, backtrace_nargs, backtrace_args)
799 (backtrace_debug_on_exit): New accessors.
800 (struct backtrace): Remove.
801 (struct catchtag): Remove backlist field.
802 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
804 (Flocal_variable_p): Speed up the common case where the binding is
806 * eval.c (backtrace_list): Remove.
807 (set_specpdl_symbol, set_specpdl_old_value): Remove.
808 (set_backtrace_args, set_backtrace_nargs)
809 (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
810 (backtrace_next): New functions.
811 (Fdefvaralias, Fdefvar): Adjust to new specpdl format.
812 (unwind_to_catch, internal_lisp_condition_case)
813 (internal_condition_case, internal_condition_case_1)
814 (internal_condition_case_2, internal_condition_case_n): Don't bother
815 with backtrace_list any more.
816 (Fsignal): Adjust to new backtrace format.
817 (grow_specpdl): Move up.
818 (record_in_backtrace): New function.
819 (eval_sub, Ffuncall): Use it.
820 (apply_lambda): Adjust to new backtrace format.
821 (let_shadows_buffer_binding_p, let_shadows_global_binding_p): Move from
823 (specbind): Adjust to new specpdl format. Simplify.
824 (record_unwind_protect, unbind_to): Adjust to new specpdl format.
825 (Fbacktrace_debug, Fbacktrace, Fbacktrace_frame): Adjust to new
827 (mark_backtrace): Remove.
828 (mark_specpdl, get_backtrace, backtrace_top_function): New functions.
829 * xdisp.c (redisplay_internal): Use record_in_backtrace.
830 * alloc.c (Fgarbage_collect): Use record_in_backtrace.
832 * profiler.c (record_backtrace): Use get_backtrace.
833 (handle_profiler_signal): Use backtrace_top_function.
834 * .gdbinit (xbacktrace, hookpost-backtrace): Use new backtrace
837 2013-06-02 Jan Djärv <jan.h.d@swipnet.se>
839 * process.h (catch_child_signal): Declare.
841 * process.c (catch_child_signal): New function.
842 (init_process_emacs): Call it.
844 * nsterm.m: Include process.h if NS_IMPL_GNUSTEP.
845 (ns_menu_bar_is_hidden, menu_will_open_state): Define only if
847 (x_set_cursor_type): Remove declaration.
848 (ns_update_begin): Only use r and bp if NS_IMPL_COCOA.
849 (ns_update_end, ns_focus, ns_unfocus): Remove GNUStep specific code.
850 (x_set_window_size): Remove 3 pixels from toolbar if NS_IMPL_GNUSTEP.
851 (ns_get_color): Use F suffix on float.
852 (ns_color_to_lisp, ns_query_color): Use EmacsCGFloat.
853 (ns_get_rgb_color): Remove.
854 (x_set_frame_alpha): Move view inside NS_IMPL_COCOA.
855 (note_mouse_movement): x and y are CGFloat.
856 (ns_draw_fringe_bitmap): Remove unused rowY.
857 Change #if to COCOA && >= 10_6.
858 (ns_draw_window_cursor): Remove unused overspill.
859 (ns_draw_underwave): width and x are EamcsCGFloat.
860 (ns_draw_box): thickness is CGFloat.
861 (ns_dumpglyphs_image): Change #if to COCOA && >= 10_6.
862 (ns_send_appdefined): When NS_IMPL_GNUSTEP, redirect to main thread
863 if not in main thread.
864 (ns_get_pending_menu_title, ns_check_menu_open)
865 (ns_check_pending_open_menu): Put inside #if COCOA && >= 10_5.
866 (ns_term_init): Call catch_child_signal if NS_IMPL_GNUSTEP && SIGCHLD.
867 (sendFromMainThread:): New method.
868 (changeFont:): size is CGFloat.
869 (keyDown:): Check for Delete when NS_IMPL_GNUSTEP.
870 Disable warning about permanent text.
871 (characterIndexForPoint:): Adjust return type depending on GNUStep
873 (mouseDown:): delta is CGFloat.
874 (updateFrameSize): Remove unised variable f.
875 (initFrameFromEmacs): Move toggleButton inside NS_IMPL_COCOA.
876 Cast float to EmacsCGFloat.
877 (windowWillUseStandardFrame:defaultFrame:): Set maximized_height
878 also to -1 when restoring.
879 (windowDidExitFullScreen:): Put call to updateCollectionBehaviour
880 inside NS_IMPL_COCOA.
881 (toggleFullScreen:): Put call to toggleFullScreen inside
882 NS_IMPL_COCOA. Cast float to EmacsCGFloat.
883 (setPosition:portion:whole:): por is CGFloat.
884 (getMouseMotionPart:window:x:y:): Add F suffix to float.
885 (mouseDown:): Use CGFloat.
886 (mouseDragged:): Remove unised variable edge.
887 (EmacsDocument): Implement for NS_IMPL_GNUSTEP.
889 * nsterm.h (EmacsCGFloat): Typedef for OSX and GNUStep when the size
891 (EmacsApp): New variable nextappdefined. Declare sendFromMainThread
892 when NS_IMPL_GNUSTEP.
893 (EmacsDocument): Declare when NS_IMPL_GNUSTEP.
894 (EmacsView): Remove unlockFocusNeedsFlush, add windowDidMove.
895 (EmacsToolbar): Add clearAll. Add tag argument to
896 addDisplayItemWithImage.
897 (EmacsSavePanel, EmacsOpenPanel): Remove getFilename and getDirectory.
899 * nsselect.m (ns_get_local_selection): Remove unused variable type.
901 * nsmenu.m (ns_update_menubar): Make static.
902 (x_activate_menubar): Surround with ifdef NS_IMPL_COCOA
903 (fillWithWidgetValue:): Add cast to SEL for setAction.
904 (addSubmenuWithTitle:forFrame:): Add cast to SEL for action.
905 (update_frame_tool_bar): Update code for GNUStep.
906 (clearAll): New method.
907 (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
908 argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
909 Move identifierToItem setObject and activeIdentifiers addObject before
910 call to insertItemWithItemIdentifier.
911 (validateVisibleItems): Fix indentation.
912 (toolbarAllowedItemIdentifiers:): Return activeIdentifiers.
913 (initWithContentRect:styleMask:backing:defer:): Add ClosableWindow and
914 UtilityWindow to aStyle, remove call to setStyleMask.
916 * nsimage.m (setXBMColor:, getPixelAtX:Y:): Use EmacsCGFloat.
918 * nsfont.m (ns_attribute_fvalue, ns_spec_to_descriptor)
919 (ns_charset_covers, ns_get_covering_families, nsfont_open):
920 Use F suffix on floats.
921 (ns_char_width): Returns CGFloat.
922 (ns_ascii_average_width): w is CGFloat instead of float.
923 (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to
925 (ns_glyph_metrics): CGFloat instead of float.
927 * nsfns.m (x_set_foreground_color, x_set_background_color):
929 (ns_implicitly_set_icon_type, Fx_create_frame): Make static,
930 remove unused variables.
931 (Fns_read_file_name): Keep track if panel is for save.
932 Use ns_filename_from_panel/ns_directory_from_panel.
933 (Fns_list_services): delegate only used for COCOA.
934 (Fns_convert_utf8_nfd_to_nfc): Remove warning for GNUStep.
935 Just return the input if GNUStep.
936 (x_screen_planes): Remove.
937 (Fxw_color_values): Use EmacsCGFloat
938 (Fns_display_monitor_attributes_list): Only get screen number for
940 (getDirectory, getFilename): Remove from EmacsOpenPanel and
942 (EmacsOpenPanel:ok:): Use ns_filename_from_panel and
943 ns_directory_from_panel.
945 2013-06-01 Paul Eggert <eggert@cs.ucla.edu>
947 * process.c (handle_child_signal): Also use WCONTINUED.
948 This is so that list-processes doesn't mistakenly list the process
949 as stopped, when the process has actually been continued and is
952 2013-05-31 Paul Eggert <eggert@cs.ucla.edu>
954 Don't let D-bus autolaunch mess up SIGCHLD handling (Bug#14474).
955 * xterm.c (x_term_init): Inhibit D-Bus autolaunch if D-Bus is
956 not already configured.
958 * fileio.c (Finsert_file_contents): Remove unused local (Bug#8447).
960 2013-05-29 Eli Zaretskii <eliz@gnu.org>
962 * Makefile.in (mostlyclean): Remove *.res files.
964 2013-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
966 * fileio.c (Finsert_file_contents): Preserve undo info when reverting
969 2013-05-27 Eli Zaretskii <eliz@gnu.org>
971 * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a
972 display vector, and we backtrack, handle the case that the
973 previous character position is also displayed from a display
974 vector or covered by a display string or image. (Bug#14476)
976 2013-05-25 Jan Djärv <jan.h.d@swipnet.se>
978 * xfns.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
979 (struct MonitorInfo, free_monitors): Remove.
980 (x_make_monitor_attribute_list): Call make_monitor_attribute_list.
981 (Fx_display_monitor_attributes_list): Call make_monitor_attribute_list.
982 (syms_of_xfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
985 * nsfns.m (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
986 (struct MonitorInfo, free_monitors): Remove.
987 (ns_screen_name): Make static.
988 (ns_make_monitor_attribute_list): Call make_monitor_attribute_list.
989 (syms_of_nsfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
992 * frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
993 (struct MonitorInfo): New struct.
994 (free_monitors, make_monitor_attribute_list): Declare.
996 * frame.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
998 (free_monitors, make_monitor_attribute_list): New functions.
999 (syms_of_frame): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes,
1002 2013-05-25 Xue Fuqiao <xfq.free@gmail.com>
1004 * callproc.c (call_process): Refine the doc string. (Bug#14045)
1006 2013-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
1008 * keyboard.c: Apply keyboard decoding only to events that come directly
1009 from the tty, not from unread-command-events (bug#14368).
1010 (read_event_from_main_queue): New function, extracted from read_char).
1011 (read_decoded_char): Remove.
1012 (read_decoded_event_from_main_queue): New function to replace it.
1013 (read_char): Use it.
1014 (read_key_sequence): Use read_char rather than read_decoded_char.
1016 * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403).
1018 2013-05-22 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
1020 * casetab.c (init_casetab_once): Fix last change (bug#14424).
1022 2013-05-22 Kenichi Handa <handa@gnu.org>
1024 The following changes are to fix the setting of
1025 buffer-file-coding-system on, for instance, C-x RET c unix RET
1026 _FILE_OF_DOS_EOL_TYPE_ RET.
1028 * coding.h (struct coding_system): New member detected_utf8_chars.
1030 * coding.c (detect_coding_utf_8): Count characters and check EOL
1031 format. Include CATEGORY_MASK_UTF_8_AUTO in detect_info->found if
1033 (setup_coding_system): Do not initialize coding->head_ascii.
1034 (check_ascii): Do not set coding->eol_seen but update it. Do not
1035 call adjust_coding_eol_type here.
1036 (detect_coding): Fix detection of BOM for utf-8 and utf-16.
1037 If the eol-type of CODING is already specified, adjust the eol type
1038 of the found coding-system.
1039 (decode_coding_gap): Cancel previous change. Utilize the
1040 character numbers counted by detect_coding_utf_8. Fix detection
1043 2013-05-21 Barry OReilly <gundaetiapo@gmail.com> (tiny change)
1045 * search.c (looking_at_1): Only set last_thing_searched if the match
1046 changed the match-data (bug#14281).
1048 2013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
1050 * xdisp.c (reseat_at_previous_visible_line_start):
1051 Already declared in dispextern.h, so remove it here.
1052 (move_it_vertically_backward): Likewise.
1054 2013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1056 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
1057 (Fx_display_pixel_width, Fx_display_pixel_height)
1058 (Fx_display_mm_width, Fx_display_mm_height):
1059 Mention `display-monitor-attributes-list' in docstrings.
1061 * nsfns.m (ns_get_screen): Remove function. All uses removed.
1062 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
1063 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
1064 (Fx_display_screens, Fx_display_mm_width, Fx_display_mm_height)
1065 (Fx_display_backing_store, Fx_display_visual_class)
1066 (Fx_display_save_under, Fx_close_connection, Fxw_display_color_p)
1067 (Fx_display_grayscale_p, Fx_display_pixel_width)
1068 (Fx_display_pixel_height, Fx_display_planes)
1069 (Fx_display_color_cells): Sync args and docstrings with xfns.c.
1070 (Fx_display_screens): Don't confuse X11 screens with NS screens.
1071 (Fx_display_mm_width, Fx_display_mm_height)
1072 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
1073 height for all physical monitors as in X11.
1075 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
1076 Return pixel width or height for all physical monitors as in X11.
1078 2013-05-18 Paul Eggert <eggert@cs.ucla.edu>
1080 Port --enable-gcc-warnings to clang.
1081 * bytecode.c (exec_byte_code):
1083 Redo diagnostic pragmas to pacify clang, too.
1084 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
1085 * editfns.c (Fencode_time):
1086 * fileio.c (file_accessible_directory_p):
1087 * font.c (font_unparse_xlfd):
1088 Use '&"string"[index]' instead of '"string" + (index)'.
1089 * undo.c (user_error): Remove; unused.
1091 2013-05-16 Eli Zaretskii <eliz@gnu.org>
1093 * insdel.c (insert_1_both): Document the arguments, instead of
1094 referring to insert_1, which no longer exists.
1096 * xdisp.c (message_dolog): If the *Messages* buffer is shown in
1097 some window, increment windows_or_buffers_changed, so that
1098 *Messages* display in that window is updated. (Bug#14408)
1100 * w32.c: Include epaths.h.
1101 (init_environment): Use cmdproxy.exe without leading directories.
1102 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
1104 (gettimeofday): Adjust signature and return value to Posix
1107 * unexw32.c (open_output_file): Delete the existing emacs.exe
1108 before creating it, to break the hard link to the versioned
1111 * Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
1112 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
1113 (FIRSTFILE_OBJ): New variables.
1114 (W32_RES): Rename to EMACSRES. All users changed.
1115 (base_obj): Use $(CM_OBJ).
1116 (ALLOBJS): Use $(FIRSTFILE_OBJ).
1117 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
1118 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
1119 $(W32_RES_LINK) before $(LIBES).
1120 (emacs.res): Depend on $(EMACS_MANIFEST). Put emacs.rc in nt.
1122 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
1124 * makefile.w32-in (DOC): Use just "DOC".
1126 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
1128 * process.c: Export default filters and sentinels to Elisp.
1129 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
1131 (pset_filter, pset_sentinel, make_process, Fset_process_filter)
1132 (Fset_process_sentinel, Fformat_network_address):
1133 Default to them instead of nil.
1134 (server_accept_connection): Sentinels can't be nil any more.
1135 (read_and_dispose_of_process_output): New function, extracted from
1136 read_process_output.
1137 (read_process_output): Use it; filters can't be nil.
1138 (Finternal_default_process_filter): New function, extracted from
1139 read_process_output.
1140 (exec_sentinel_unwind): Remove function.
1141 (exec_sentinel): Don't zilch sentinel while running.
1142 (status_notify): Sentinels can't be nil.
1143 (Finternal_default_process_sentinel): New function extracted from
1145 (setup_process_coding_systems): Default filter is not nil any more.
1146 (syms_of_process): Export new Elisp functions and initialize
1148 * lisp.h (make_lisp_proc): New function.
1150 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
1152 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
1154 2013-05-14 Eli Zaretskii <eliz@gnu.org>
1156 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
1157 unless we know that the window w is a leaf window.
1158 Another attempt at solving bug#14062.
1160 2013-05-14 Jan Djärv <jan.h.d@swipnet.se>
1162 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
1165 2013-05-12 Paul Eggert <eggert@cs.ucla.edu>
1167 * image.c (gif_load): Check that subimages fit (Bug#14345).
1169 2013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
1171 * lread.c (skip_dyn_eof): New function.
1172 (read1): Use it to skip the end of a file in response to #@00.
1174 * doc.c (get_doc_string): Slightly relax the sanity checking.
1176 2013-05-09 Jan Djärv <jan.h.d@swipnet.se>
1178 * nsfns.m: Include IOGraphicsLib.h if Cocoa.
1179 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
1180 (MonitorInfo): New struct.
1181 (free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
1182 (Fns_display_monitor_attributes_list): New functions.
1183 (display-usable-bounds): Remove.
1184 (syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
1187 2013-05-09 Paul Eggert <eggert@cs.ucla.edu>
1189 * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
1190 (GTK_CHECK_VERSION): New macro, if not already defined.
1191 All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc.
1192 replaced by GTK_CHECK_VERSION.
1194 2013-05-08 Paul Eggert <eggert@cs.ucla.edu>
1196 * xterm.h (GTK_PREREQ): New macro.
1197 All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed
1198 to use this macro instead, for consistency and clarity.
1200 2013-05-08 Eli Zaretskii <eliz@gnu.org>
1202 * xdisp.c (row_for_charpos_p): New function, with code of
1203 cursor_row_p, but accepts an additional argument CHARPOS instead
1204 of using a hardcoded PT.
1205 (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
1206 (row_containing_pos): Call row_for_charpos_p instead of partially
1207 doing the same. Fixes cursor positioning under longlines-mode
1208 when longlines-show-effect includes more than one newline, when
1209 moving the cursor vertically up.
1211 2013-05-08 Juanma Barranquero <lekktu@gmail.com>
1213 * makefile.w32-in (ACL_H): New macro.
1214 ($(BLD)/fileio.$(O)): Update dependencies.
1216 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
1218 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
1219 * Makefile.in (LIB_ACL): New macro.
1220 (LIBACL_LIBS): Remove.
1221 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
1222 * fileio.c: Include <acl.h>.
1223 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
1224 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
1226 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
1229 * unexelf.c: Don't assume ElfW (Half) fits in int.
1230 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
1231 when dealing with ElfW (Half) values, since they can exceed 2**31
1232 on 64-bit OpenBSD hosts. Problem reported privately by Han Boetes.
1233 (entry_address): Omit unused NUM arg. All uses changed.
1235 2013-05-07 Juri Linkov <juri@jurta.org>
1237 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
1238 to the string converted from number with `Fnumber_to_string'.
1241 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
1243 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
1244 This fixes a problem introduced by my previous change.
1246 2013-05-07 Glenn Morris <rgm@gnu.org>
1248 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
1250 2013-05-07 Jan Djärv <jan.h.d@swipnet.se>
1252 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
1254 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
1256 Static checking by GCC 4.8.0.
1257 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
1258 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
1259 (x_get_monitor_attributes_fallback)
1260 (x_get_monitor_attributes_xinerama)
1261 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
1262 Define only if USE_GTK.
1263 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
1264 (x_get_monitor_attributes_fallback): Omit unused locals.
1265 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
1266 Use double, not float, to avoid mixed-mode floating point arithmetic.
1268 2013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
1269 Jan Djärv <jan.h.d@swipnet.se>
1271 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
1272 (XINERAMA_CFLAGS): New macros.
1273 (ALL_CFLAGS, LIBES): Use them.
1275 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
1276 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
1277 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
1278 (syms_of_xfns): DEFSYM them.
1279 (struct MonitorInfo): New struct.
1280 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
1281 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
1282 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
1283 (x_get_monitor_attributes_xinerama): New functions.
1284 (Fx_display_monitor_attributes_list): New primitive.
1285 (syms_of_xfns): Defsubr it.
1287 * xterm.h (x_display_info): Add Xatom_net_workarea and
1288 Xatom_net_current_desktop.
1290 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
1291 and dpyinfo->Xatom_net_current_desktop.
1293 2013-05-06 Eli Zaretskii <eliz@gnu.org>
1295 * xdisp.c (pos_visible_p): Use the special code for finding the
1296 beginning of a display property or overlay for any "replacing"
1297 display property, not just for display strings. This solves
1298 incorrect reporting of position by posn-at-point. (Bug#14241)
1300 2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
1302 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
1303 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
1304 Verify that ElfW (Half) fits in int.
1305 (fatal): Use same signature as lisp.h.
1306 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
1307 configure and build with -DUNEXELF_DEBUG without worrying about
1308 other modules that use DEBUG.
1309 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
1310 possibly-wide integers now uses it instead of plain fprintf.
1311 (entry_address): New function, which avoids problems with 32-bit
1312 overflow on 64-bit hosts.
1313 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
1314 (round_up): Don't assume the remainder fits in int.
1315 (find_section): Use bool for boolean. Simplify debug code.
1316 (unexec): Don't assume file sizes fit in int or size_t.
1317 Omit unnecessary trailing newline in 'fatal' format.
1318 Use strerror rather than outputting decimal error number.
1319 Remove unused code when emacs is not defined;
1320 this file relies on Emacs now.
1321 Don't assume e_phnum and e_shnum are positive.
1323 * regex.c: Fix problems when DEBUG is defined.
1324 (extract_number, extract_number_and_incr): Define regardless of
1325 whether DEBUG is defined; that's simpler and makes the code less
1326 likely to go stale in the normal case when DEBUG is not defined.
1327 Return int rather than taking an int * arg. All callers changed.
1328 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
1329 Remove, replacing with ...
1330 (DEBUG_PRINT): New macro. All callers changed.
1331 (DEBUG_COMPILES_ARGUMENTS): New macro.
1332 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
1333 (print_compiled_pattern, print_double_string) [DEBUG]:
1334 Use prototype rather than old-style definition.
1335 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
1336 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
1337 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
1338 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
1339 Don't assume ptrdiff_t, size_t, and long are the same width as int.
1340 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
1341 This matters only when DEBUG is defined.
1343 2013-05-05 Eli Zaretskii <eliz@gnu.org>
1345 * xdisp.c (set_iterator_to_next): Set the
1346 ignore_overlay_strings_at_pos_p flag only if we are _really_
1347 iterating over an overlay string, as indicated by the
1348 current.overlay_string_index member. (Bug#14306)
1350 2013-05-05 Jan Djärv <jan.h.d@swipnet.se>
1352 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
1353 to where it is used, to avoid autorelease issues (Bug#14050).
1355 2013-05-05 Paul Eggert <eggert@cs.ucla.edu>
1357 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
1358 * fileio.c (syms_of_fileio): Implement this.
1359 * filelock.c (create_lock_file): If symbolic links don't work, so
1360 we use a regular file as a lock file, do not fsync the lock file;
1363 2013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
1365 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
1366 (syms_of_minibuf): Adjust accodingly.
1368 * callint.c (Fcall_interactively): Adjust calls accordingly.
1370 2013-05-04 Eli Zaretskii <eliz@gnu.org>
1372 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
1373 w->contents is a buffer before computing everything else.
1374 Use parentheses to disambiguate last part of the condition.
1376 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
1377 assertion violations. (Bug#14062)
1379 2013-05-01 David Reitter <david.reitter@gmail.com>
1381 * nsfns.m (ns_tooltip): Initialize.
1383 2013-04-28 Eli Zaretskii <eliz@gnu.org>
1385 * coding.c (decode_coding_gap): Don't remove the character before
1386 a newline unless it's a CR character. (Bug#14287)
1388 2013-04-28 Dan Nicolaescu <dann@gnu.org>
1390 * dispextern.h (struct face): Move enum face_underline_type
1391 earlier so that bitfields can be in the same word.
1393 2013-04-28 Jan Djärv <jan.h.d@swipnet.se>
1395 * nsfns.m (handlePanelKeys): New function.
1396 (EmacsOpenPanel:performKeyEquivalent:)
1397 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
1398 arrows/function/control and copy/paste keys (Bug#14296).
1400 2013-04-27 Juri Linkov <juri@jurta.org>
1402 * callint.c (Fcall_interactively): Call `Qread_number' for
1403 interactive code letter `n' instead of using duplicate code.
1406 2013-04-27 Paul Eggert <eggert@cs.ucla.edu>
1408 * systime.h (make_timeval): Declare as 'const'.
1410 2013-04-27 Kenichi Handa <handa@gnu.org>
1412 * font.c (font_open_entity): Always open a font of manageable
1415 2013-04-26 Paul Eggert <eggert@cs.ucla.edu>
1417 Port better to AIX (Bug#14258).
1418 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
1421 2013-04-24 Kenichi Handa <handa@gnu.org>
1423 * coding.c (decode_coding_iso_2022): When an invalid escape
1424 sequence is encountered, reset the invocation and designation
1425 status to the safest one.
1427 2013-04-22 Paul Eggert <eggert@cs.ucla.edu>
1429 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
1430 Without this fix, "make distclean" leaves stamp-h1 behind.
1432 2013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
1434 * w32fns.c (w32_fullscreen_rect): New function to compute the
1435 window rectangle for the given fullscreen mode.
1436 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
1437 longer tunes the window size. This keeps the window's edges flush
1438 with the screen and allows the taskbar to hide itself in fullboth.
1440 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
1441 window decorations and uses the entire screen.
1443 * w32term.h (w32_fullscreen_rect) Add prototype.
1444 (struct w32_output): Replace normal_width, normal_height,
1445 normal_top, and normal_left members with a single normal_placement
1447 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
1449 (FRAME_NORMAL_PLACEMENT): New macro.
1451 2013-04-16 Juanma Barranquero <lekktu@gmail.com>
1453 * minibuf.c (Ftest_completion): Silence compiler warning.
1455 2013-04-15 Eli Zaretskii <eliz@gnu.org>
1457 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
1460 * frame.h (WINDOW_FRAME): Protect macro and its argument with
1463 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
1464 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
1465 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
1466 parentheses where appropriate.
1468 2013-04-14 Paul Eggert <eggert@cs.ucla.edu>
1470 * keyboard.c (timer_start_idle): Remove no-longer-used local.
1472 2013-04-14 Eli Zaretskii <eliz@gnu.org>
1474 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>
1475 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
1476 Mention in the doc string that setting these variables takes
1477 effect only after a call to set-window-buffer. (Bug#14200)
1479 2013-04-13 Eli Zaretskii <eliz@gnu.org>
1481 * indent.c (Fvertical_motion): Don't consider display strings on
1482 overlay strings as display strings on the buffer position we
1483 started from. This prevents vertical cursor motion from jumping
1484 more than one line when there's an overlay string with a display
1485 property at end of line.
1486 Reported by Karl Chen <Karl.Chen@quarl.org> in
1487 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
1489 2013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
1491 * window.c (select_window): `record_buffer' even if window is
1492 already selected (bug#14191).
1494 2013-04-11 Eli Zaretskii <eliz@gnu.org>
1496 * window.c (Fwindow_end): Test more flags, including the buffer's
1497 last_overlay_modified flag, to determine whether the window's
1498 display is really up-to-date. Prevents the function from
1499 returning a stale value. (Bug#14170)
1500 (Fwindow_line_height): Fix the test for up-to-date-ness of the
1503 2013-04-10 Eli Zaretskii <eliz@gnu.org>
1505 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
1506 garbaged only if it is not already the top frame on its TTY.
1507 This prevents flickering due to constant redrawing of TTY frames when
1508 there are GUI frames open in the same session. (Bug#13864)
1510 2013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
1512 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
1513 of marking the idle timers directly.
1515 2013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
1517 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
1520 2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
1522 * window.c (select_window): Don't record_buffer while the invariant is
1523 temporarily broken (bug#14161).
1525 * fns.c (Fdelq): Don't assume !NILP => CONSP.
1527 2013-04-07 Eli Zaretskii <eliz@gnu.org>
1529 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
1531 2013-04-07 Romain Francoise <romain@orebokech.com>
1533 Ignore additional platform-specific ACL errors (Bug#13702).
1534 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
1535 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
1537 2013-03-31 Jan Djärv <jan.h.d@swipnet.se>
1539 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
1542 2013-04-07 Paul Eggert <eggert@cs.ucla.edu>
1544 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
1545 This bug was introduced by my 2013-02-25 change that simplified
1546 data_start configuration. Without this change, on GNU/Linux
1547 an Emacs configured with --enable-profiling fails immediately
1548 due to a profiler signal.
1549 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
1550 with these flags. On platforms where special flags are needed
1551 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
1552 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
1553 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
1555 2013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
1557 Get rid of some platform-specific functions examining window
1558 system and its capabilities. This is a partial rework of the
1560 * lisp.h (have_menus_p): Remove prototype. This function is
1561 replaced with platform-independent window_system_available.
1562 (check_window_system): Move to...
1563 * frame.h (decode_window_system_frame, window_system_available):
1564 ...here, add new prototypes.
1565 * frame.c (window_system_available, decode_window_system_frame):
1567 (check_window_system): Platform-independent now.
1568 * xterm.h (x_in_use): Remove declaration.
1570 * w32term.h (check_x_frame):
1571 * nsterm.h (check_x_frame): Remove prototypes. This function
1572 is replaced with platform-independent decode_window_system_frame.
1573 * msdos.c (have_menus_p): Remove.
1574 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
1575 Remove platform-specific functions. Use check_window_system,
1576 decode_window_system_frame and check_ns_display_info where
1577 appropriate. Minor style and comment tweaks.
1578 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
1579 (check_x_frame): Likewise.
1580 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
1582 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
1583 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
1584 * xmenu.c, xselect.c: All related users changed.
1586 2013-04-03 Kenichi Handa <handa@gnu.org>
1588 The following changes is to optimize the code for reading UTF-8
1591 * coding.c (check_ascii): Rename from detect_ascii. Return value
1592 changed. Check EOL format. Do not call adjust_coding_eol_type
1594 (check_utf_8): New function.
1595 (adjust_coding_eol_type): Do nothing if already adjusted.
1596 (detect_coding): Compare the return value of check_ascii with
1597 coding->src_bytes. Call adjust_coding_eol_type if necessary.
1598 (decode_coding_gap): Optimize for valid UTF-8.
1600 2013-03-21 Kenichi Handa <handa@gnu.org>
1602 * coding.c (syms_of_coding): Cancel previous change.
1604 * insdel.c (insert_from_gap): Fix previous change.
1606 2013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
1608 Consistently use platform-specific function to detect window system.
1609 * lisp.h (check_window_system): New prototype. This function is
1610 going to replace check_x, check_w32 and check_ns.
1611 (have_menus_p): Mention msdos.c in comment.
1612 * fontset.c (check_window_system_func): Remove. Adjust all users.
1613 * fontset.h (check_window_system_func): Remove prototype.
1614 * nsterm.h (check_ns):
1615 * xterm.h (check_x):
1616 * w32term.h (check_w32): Likewise.
1617 * menu.c (Fx_popup_menu): Use check_window_system.
1618 * msdos.c (check_window_system): Define for MS-DOS.
1619 * nsfns.m (check_window_system): Define for NS. Adjust all users.
1620 * w32fns.c (check_window_system): Likewise for MS-Windows.
1621 * xfns.c (check_window_system): Likewise for X.
1622 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
1623 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
1625 2013-04-02 Paul Eggert <eggert@cs.ucla.edu>
1627 Prefer < to > in range checks such as 0 <= i && i < N.
1628 This makes it easier to visualize quantities on a number line.
1629 This patch doesn't apply to all such range checks,
1630 only to the range checks affected by the 2013-03-24 change.
1631 This patch reverts most of the 2013-03-24 change.
1632 * alloc.c (xpalloc, Fgarbage_collect):
1633 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
1634 * character.c (string_escape_byte8):
1635 * charset.c (read_hex):
1636 * data.c (cons_to_unsigned):
1637 * dispnew.c (update_frame_1):
1638 * doc.c (Fsubstitute_command_keys):
1639 * doprnt.c (doprnt):
1640 * editfns.c (hi_time, decode_time_components):
1641 * fileio.c (file_offset):
1642 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
1643 * font.c (font_intern_prop):
1644 * frame.c (x_set_alpha):
1645 * gtkutil.c (get_utf8_string):
1646 * indent.c (check_display_width):
1647 * keymap.c (Fkey_description):
1648 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
1650 * minibuf.c (read_minibuf_noninteractive):
1651 * process.c (wait_reading_process_output):
1652 * search.c (Freplace_match):
1653 * window.c (get_phys_cursor_glyph):
1654 * xdisp.c (redisplay_internal):
1655 * xsmfns.c (smc_save_yourself_CB):
1656 Prefer < to > for range checks.
1657 * dispnew.c (sit_for): Don't mishandle NaNs.
1658 This fixes a bug introduced in the 2013-03-24 change.
1659 * editfns.c (decode_time_components): Don't hoist comparison.
1660 This fixes another bug introduced in the 2013-03-24 change.
1662 2013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
1664 * frame.h (struct frame): Drop scroll_bottom_vpos
1665 member becaue all real users are dead long ago.
1666 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
1667 * xdisp.c (redisplay_internal): Adjust user.
1669 2013-03-30 Darren Ho <darren.hoo@gmail.com> (tiny change)
1671 * nsmenu.m (showAtX:Y:for:): setLevel to
1672 NSPopUpMenuWindowLevel (Bug#13998).
1674 2013-03-30 Jan Djärv <jan.h.d@swipnet.se>
1676 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
1677 (ns_check_pending_open_menu): Declare.
1679 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
1680 (x_activate_menubar): Update the menu with title that matches
1681 ns_get_pending_menu_title, and call
1682 ns_check_pending_openmenu (Bug#12698).
1683 (menuWillOpen:): New method.
1684 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
1686 * nsterm.m (menu_will_open_state, menu_mouse_point)
1687 (menu_pending_title): New varaibles.
1688 (ns_get_pending_menu_title, ns_check_menu_open)
1689 (ns_check_pending_open_menu): New functions.
1691 2013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
1693 * indent.c (current_column_bol_cache): Remove leftover which is not
1694 used in Fmove_to_column any more.
1695 (current_column, scan_for_column): Adjust users.
1696 * keyboard.c (last_point_position_buffer, last_point_position_window):
1697 Remove leftovers which are not used for recording undo any more.
1698 (command_loop_1, syms_of_keyboard): Adjust users.
1699 * xdisp.c (last_max_ascent): Remove leftover which is not used in
1700 redisplay_window any more.
1701 (move_it_to): Adjust user.
1703 2013-03-29 Juanma Barranquero <lekktu@gmail.com>
1705 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
1706 Update dependencies.
1708 2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
1710 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
1711 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
1714 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
1716 * window.h (struct window): Replace hchild, vchild and buffer slots
1717 with the only contents slot. This is possible because each valid
1718 window may have either the child window (in vertical or horizontal
1719 combination) or buffer to display (for the leaf window). Using that,
1720 a lof of operations to traverse and/or change window hierarchies may
1721 be simplified. New member horizontal is used to distinguish between
1722 horizontal and vertical combinations of internal windows.
1723 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
1724 (WINDOW_VERTICAL_COMBINATION_P): New macros.
1725 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
1726 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
1727 Use contents slot, not buffer, where appropriate.
1728 (wset_combination): New function.
1729 (wset_buffer): Add eassert.
1730 (Fframe_first_window): Simplify the loop reaching first window.
1731 (Fwindow_buffer): Use WINDOW_LEAF_P.
1732 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
1733 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
1734 (unshow_buffer): Convert initial debugging check to eassert.
1735 (replace_window, recombine_windows, Fdelete_other_windows_internal)
1736 (make_parent_window, window_resize_check, window_resize_apply)
1737 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
1738 (Fset_window_configuration, delete_all_child_windows, save_window_save):
1739 Adjust to match struct window changes.
1740 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
1741 (mark_window_cursors_off, count_windows, get_leaf_windows)
1742 (foreach_window_1): Simplify the loop.
1743 * alloc.c (mark_object): Do not check for the leaf window because
1744 internal windows has no glyph matrices anyway.
1745 * dispnew.c (clear_window_matrices, showing_window_margins_p)
1746 (allocate_matrices_for_window_redisplay, fake_current_matrices)
1747 (allocate_matrices_for_frame_redisplay, free_window_matrices)
1748 (build_frame_matrix_from_window_tree, mirror_make_current)
1749 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
1750 (update_window_tree, set_window_update_flags): Simplify the loop.
1751 (sync_window_with_frame_matrix_rows): Enforce live window.
1752 Use contents slot, not buffer, where appropriate.
1753 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
1754 and WINDOW_HORIZONTAL_COMBINATION_P.
1755 (make_frame_visible_1): Simplify the loop.
1756 Use contents slot, not buffer, where appropriate.
1757 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
1758 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
1759 (expose_window_tree): Likewise.
1760 Use contents slot, not buffer, where appropriate.
1761 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
1762 to avoid deleted windows. Use contents slot instead of buffer.
1763 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
1764 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
1765 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
1766 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
1768 2013-03-28 Eli Zaretskii <eliz@gnu.org>
1770 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
1771 identify the reasons for assertion violations in bug#14062 and
1773 (Fx_show_tip): Fix compilation error under
1774 "--enable-check-lisp-object-type". (Bug#14073)
1776 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
1777 Reported by <rzl24ozi@gmail.com>.
1779 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
1781 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
1783 (unwind_with_echo_area_buffer): ...to restore it here.
1784 This is needed to ensure that...
1785 (redisplay_window): ...both window markers are valid here,
1786 which is verified by eassert.
1787 * editfns.c (save_excursion_save): Do not assume that
1788 selected_window always displays the buffer.
1789 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
1792 2013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
1794 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
1797 2013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
1799 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
1801 2013-03-27 Eli Zaretskii <eliz@gnu.org>
1803 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
1804 since MinGW's w32api headers do. This avoids compiler warnings.
1806 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
1809 2013-03-26 Eli Zaretskii <eliz@gnu.org>
1811 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
1813 2013-03-26 Jan Djärv <jan.h.d@swipnet.se>
1815 * gtkutil.c (style_changed_cb): Check if frame is live and an
1816 X frame (Bug#14038).
1818 2013-03-26 Eli Zaretskii <eliz@gnu.org>
1820 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
1821 Define only for _WIN32_WINNT less than 0x0500.
1822 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
1824 Move inclusion of time.h before sys/time.h, so that MinGW64 could
1825 see its own definitions of 'struct timeval' and 'struct timezone'.
1827 Fix incompatibilities between MinGW.org and MinGW64 headers.
1828 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
1830 * w32.c (REPARSE_DATA_BUFFER): Guard with
1831 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
1833 2013-03-25 Jan Djärv <jan.h.d@swipnet.se>
1835 * xterm.c: Include X11/XKBlib.h
1836 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
1838 2013-03-24 Andreas Schwab <schwab@linux-m68k.org>
1840 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
1842 * blockinput.h (input_blocked_p): Likewise.
1843 * bytecode.c (exec_byte_code): Likewise.
1844 * callproc.c (call_process_kill, call_process_cleanup)
1845 (Fcall_process): Likewise.
1846 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
1847 (Fccl_execute_on_string): Likewise.
1848 * character.c (string_escape_byte8): Likewise.
1849 * charset.c (read_hex): Likewise.
1850 * cm.c (calccost): Likewise.
1851 * data.c (cons_to_unsigned): Likewise.
1852 * dired.c (directory_files_internal, file_name_completion):
1854 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
1855 (sit_for): Likewise.
1856 * doc.c (Fsubstitute_command_keys): Likewise.
1857 * doprnt.c (doprnt): Likewise.
1858 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
1859 * emacsgtkfixed.c: Likewise.
1860 * fileio.c (file_offset, Fwrite_region): Likewise.
1861 * floatfns.c (Fexpt, fmod_float): Likewise.
1862 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
1864 * font.c (font_intern_prop): Likewise.
1865 * frame.c (x_set_alpha): Likewise.
1866 * gtkutil.c (get_utf8_string): Likewise.
1867 * indent.c (check_display_width): Likewise.
1868 * intervals.c (create_root_interval, rotate_right, rotate_left)
1869 (split_interval_right, split_interval_left)
1870 (adjust_intervals_for_insertion, delete_node)
1871 (interval_deletion_adjustment, adjust_intervals_for_deletion)
1872 (merge_interval_right, merge_interval_left, copy_intervals)
1873 (set_intervals_multibyte_1): Likewise.
1874 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
1875 * keymap.c (Fkey_description): Likewise.
1876 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
1877 * lread.c (openp, read_integer, read1, string_to_number):
1879 * menu.c (ensure_menu_items): Likewise.
1880 * minibuf.c (read_minibuf_noninteractive): Likewise.
1881 * print.c (printchar, strout): Likewise.
1882 * process.c (create_process, Faccept_process_output)
1883 (wait_reading_process_output, read_process_output, send_process)
1884 (wait_reading_process_output): Likewise.
1885 * profiler.c (make_log, handle_profiler_signal): Likewise.
1886 * regex.c (re_exec): Likewise.
1887 * regex.h: Likewise.
1888 * search.c (looking_at_1, Freplace_match): Likewise.
1889 * sysdep.c (get_child_status, procfs_ttyname)
1890 (procfs_get_total_memory): Likewise.
1891 * systime.h (EMACS_TIME_VALID_P): Likewise.
1892 * term.c (dissociate_if_controlling_tty): Likewise.
1893 * window.c (get_phys_cursor_glyph): Likewise.
1894 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
1895 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
1897 * xfns.c (Fx_window_property): Likewise.
1898 * xmenu.c (set_frame_menubar): Likewise.
1899 * xselect.c (x_get_window_property, x_handle_dnd_message):
1901 * xsmfns.c (smc_save_yourself_CB): Likewise.
1902 * xterm.c (x_scroll_bar_set_handle): Likewise.
1904 2013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
1906 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
1907 to be optional or nil. Adjust comment and convert it to docstring.
1908 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
1909 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
1911 2013-03-24 Paul Eggert <eggert@cs.ucla.edu>
1913 Static checking by GCC 4.8-20130319.
1914 * image.c (gif_load): Assume pass < 3 to pacify GCC.
1915 * process.c (Fset_process_datagram_address)
1916 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
1917 * xdisp.c (get_char_face_and_encoding):
1918 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
1919 (get_glyph_face_and_encoding): Prepare face before possibly using it.
1920 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
1922 2013-03-24 Ken Brown <kbrown@cornell.edu>
1924 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
1925 fix compilation on 64-bit Cygwin, where underscores are not
1926 automatically prepended.
1928 * w32term.c (w32_initialize): Silence compiler warning.
1930 2013-03-23 Eli Zaretskii <eliz@gnu.org>
1932 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
1933 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
1934 variables, to save and restore frame dimensions.
1935 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
1936 after returning from a 'fullscreen' configuration.
1937 use SendMessage instead of PostMessage to send the SC_RESTORE message,
1938 to avoid races between the main thread and the input thread.
1940 * w32term.h (struct w32_output): New members normal_width,
1941 normal_height, normal_top, normal_left, and prev_fsmode.
1942 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
1943 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
1946 * w32term.c (w32fullscreen_hook): Record last value of the frame's
1947 'fullscreen' parameter. Always record previous width and height
1948 of the frame, except when switching out of maximized modes, so
1949 that they could be restored correctly, instead of resetting to the
1950 default frame dimensions. Send SC_RESTORE command to the frame,
1951 unless we are going to send SC_MAXIMIZE, to restore the frame
1952 resize hints in the mouse pointer shown by the window manager.
1955 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
1957 * lisp.h (get_frame_param): Adjust conditions for prototype
1960 2013-03-22 Ken Brown <kbrown@cornell.edu>
1962 * unexcw.c: Drop unneeded inclusion of w32common.h.
1963 (report_sheap_usage): Declare.
1964 (read_exe_header): Add magic numbers for x86_64.
1965 (fixup_executable): Fix printf format specifier for unsigned long
1968 2013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
1970 * frame.h (struct frame): Put menu_bar_window under #ifdef
1971 because this member is not needed when X toolkit is in use.
1972 (fset_menu_bar_window):
1973 * dispnew.c (clear_current_matrices, clear_desired_matrices)
1974 (free_glyphs, update_frame):
1975 * xdisp.c (expose_frame): Likewise.
1976 (display_menu_bar): Likewise. Remove redundant eassert.
1977 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
1980 2013-03-21 Paul Eggert <eggert@cs.ucla.edu>
1982 Use functions and constants to manipulate Lisp_Save_Value objects.
1983 This replaces code that used macros and strings and token-pasting.
1984 The change makes the C source a bit easier to follow,
1985 and shrinks the Emacs executable a bit.
1986 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
1987 (make_save_value): Change 1st arg from string to enum. All callers
1990 (mark_object): Use if, not #if, for GC_MARK_STACK.
1991 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
1992 (XSAVE_OBJECT): Now functions, not macros.
1993 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
1994 the constant was never used.
1995 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
1996 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
1997 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
1998 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
2000 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
2001 type3 with a single member save_type. All uses changed.
2002 (save_type, set_save_pointer, set_save_integer): New functions.
2003 * print.c (PRINTX): Remove.
2005 * alloc.c: Remove redundant static declarations.
2007 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
2009 * window.h (struct window): Convert left_col, top_line, total_lines
2010 and total_cols from Lisp_Objects to integers. Adjust comments.
2011 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
2013 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
2014 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
2015 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
2016 Adjust users where appropriate.
2018 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
2020 * frame.h (struct frame): Drop resx and resy because the same data is
2021 available from window system-specific output context. Adjust users.
2022 (default_pixels_per_inch_x, default_pixels_per_inch_y):
2023 New functions to provide defaults when no window system available.
2024 (FRAME_RES_X, FRAME_RES_Y): New macros.
2025 (NUMVAL): Move from xdisp.c.
2026 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
2027 (Ffont_face_attributes, Fopen_font):
2028 * image.c (gs_load):
2029 * w32font.c (fill_in_logfont):
2030 * xdisp.c (calc_pixel_width_or_height):
2031 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
2032 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
2034 2013-03-20 Kenichi Handa <handa@gnu.org>
2036 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
2037 to 1 (temporary workaround until a bug related to ASCII
2038 optimization is fixed).
2040 2013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
2042 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
2043 Signal error if window is not internal. Adjust docstring.
2044 (delete_all_child_windows): Use combination_limit to save the buffer.
2045 (Fset_window_configuration): Adjust accordingly.
2046 * print.c (syms_of_print): Initialize debugging output not here...
2047 (init_print_once): ...but in a new function here.
2048 * lisp.h (init_print_once): Add prototype.
2049 * emacs.c (main): Add call to init_print_once. Adjust comments.
2051 2013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
2053 * window.c (window_resize_check, window_resize_apply)
2054 (window_from_coordinates, recombine_windows, set_window_buffer)
2055 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
2056 (Fsplit_window_internal, Fdelete_window_internal)
2057 (freeze_window_starts): Use bool for booleans.
2058 * window.h (window_frame_coordinates, resize_frame_windows)
2059 (freeze_window_starts, set_window_buffer): Adjust prototypes.
2061 2013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
2063 * dispnew.c (bitch_at_user): Use `user-error'.
2065 2013-03-17 Ken Brown <kbrown@cornell.edu>
2067 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
2068 as return type of image_background. (Bug#13981)
2069 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
2071 2013-03-16 Jan Djärv <jan.h.d@swipnet.se>
2073 * nsterm.m (updateFrameSize:): Change resize increments if needed.
2074 (ns_select): Don't return with result uninitialized.
2076 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
2079 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
2081 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
2082 directories. If filename is nil, get directory name (Bug#13932).
2083 Use getFilename and getDirectory.
2084 (getFilename, getDirectory): New methods for EmacsSavePanel and
2086 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
2088 2013-03-15 Paul Eggert <eggert@cs.ucla.edu>
2090 * coding.c (decode_coding_gap): Fix typo caught by static checking.
2092 2013-03-15 Kenichi Handa <handa@gnu.org>
2094 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
2095 (adjust_after_replace): Make it back to static. Delete the third
2096 arg text_at_gap_tail. Cancel the code for handling it.
2098 * coding.h (struct coding_system): New member eol_seen.
2100 * coding.c (detect_ascii): New function.
2101 (detect_coding): Set coding->head_ascii and coding->eol_seen only
2102 when the source bytes are actually scanned. On detecting for
2103 coding_category_utf_8_auto, call detect_ascii instead of scanning
2104 source bytes directly.
2105 (produce_chars): Call insert_from_gap with the new arg 0.
2106 (encode_coding): Likewise.
2107 (decode_coding_gap): Control ASCII optimization by the variable
2108 disable_ascii_optimization instead of #ifndef .. #endif.
2109 Deccode EOL format according to coding->eol_seen.
2110 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
2113 * lisp.h (adjust_after_replace): Cancel externing it.
2114 (insert_from_gap): Adjust prototype.
2116 2013-03-15 Eli Zaretskii <eliz@gnu.org>
2118 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
2119 FULLSCREEN_MAXIMIZED. (Bug#13935)
2121 2013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
2123 * region-cache.c (find_cache_boundary, move_cache_gap)
2124 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
2125 Simplify debugging check and convert to eassert. Adjust comment.
2126 (pp_cache): Put under ENABLE_CHECKING.
2128 2013-03-14 Eli Zaretskii <eliz@gnu.org>
2130 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
2131 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
2133 (w32fullscreen_hook): If the frame is visible, reset
2134 f->want_fullscreen flag after changing the frame size. If the
2135 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
2138 2013-03-13 Daniel Colascione <dancol@dancol.org>
2140 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
2141 too so that these builds can use Cygwin's file conversion
2142 functions. (We've been building and linking cygw32.o all along
2143 and just not using it.)
2145 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
2147 File synchronization fixes (Bug#13944).
2148 * Makefile.in (LIB_FDATASYNC): New macro.
2150 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
2151 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
2152 Don't worry about HAVE_FSYNC, since a substitute fsync is
2153 available if the system lacks one.
2154 (Fwrite_regin): Retry fsync if interrupted.
2156 2013-03-13 Eli Zaretskii <eliz@gnu.org>
2158 * w32term.c (w32_read_socket): If the Emacs frame is being
2159 activated, call w32fullscreen_hook, to make sure the new frame
2160 dimensions are in effect. (Bug#13937)
2162 2013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
2164 * xdisp.c (init_iterator): Simplify because both character and byte
2165 positions are either specified or -1. Add eassert. Adjust comment.
2166 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
2167 character and byte positions can be obtained from marker.
2169 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
2171 Static checking by Sun C 5.12.
2172 * alloc.c (buffer_memory_full) [REL_ALLOC]:
2173 * bytecode.c (exec_byte_code):
2174 * dispnew.c (init_display):
2176 * fileio.c (Fsubstitute_in_file_name):
2177 * keyboard.c (Fevent_convert_list):
2178 * keymap.c (Fsingle_key_description):
2179 * term.c (maybe_fatal, fatal):
2180 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
2181 * xsmfns.c (Fhandle_save_session):
2182 Omit unreachable code.
2183 * keymap.c (map_keymap_char_table_item): Cast void * to
2184 a function pointer type; the C Standard requires this.
2186 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
2187 Include <sys/param.h> unconditionally, as that works elsewhere and
2188 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
2189 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
2192 See ChangeLog.12 for earlier changes.
2198 Copyright (C) 2011-2013 Free Software Foundation, Inc.
2200 This file is part of GNU Emacs.
2202 GNU Emacs is free software: you can redistribute it and/or modify
2203 it under the terms of the GNU General Public License as published by
2204 the Free Software Foundation, either version 3 of the License, or
2205 (at your option) any later version.
2207 GNU Emacs is distributed in the hope that it will be useful,
2208 but WITHOUT ANY WARRANTY; without even the implied warranty of
2209 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2210 GNU General Public License for more details.
2212 You should have received a copy of the GNU General Public License
2213 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.