]> code.delx.au - gnu-emacs/blob - src/ChangeLog
Adjust frame heights to real height of tool bar.
[gnu-emacs] / src / ChangeLog
1 2015-01-12 Martin Rudalics <rudalics@gmx.at>
2
3 * dispnew.c (change_frame_size_1): Pass Qchange_frame_size to
4 adjust_frame_size.
5 * frame.c (frame_default_tool_bar_height): New variable.
6 (adjust_frame_size): Possibly add requested adjustment to
7 Vframe_adjust_size_history.
8 (make_frame): Initialize tool_bar_redisplayed_once slot.
9 (Fset_frame_height, Fset_frame_width, Fset_frame_size): Clarify
10 doc-string. Call adjust_frame_size unconditionally (the frame's
11 text size may remain unaltered but the pixel size may change).
12 (x_figure_window_size): If frame_default_tool_bar_height was
13 set, use it instead of calculating the tool bar height from
14 DEFAULT_TOOL_BAR_IMAGE_HEIGHT. Don't set
15 Vframe_initial_frame_tool_bar_height.
16 (Qchange_frame_size, Qxg_frame_set_char_size)
17 (Qset_window_configuration, Qx_create_frame_1)
18 (Qx_create_frame_2): New symbols.
19 (Vframe_initial_frame_tool_bar_height): Remove.
20 (Vframe_adjust_size_history): New history variable for debugging
21 frame size adjustments.
22 * frame.h (struct frame): New boolean slot
23 tool_bar_redisplayed_once.
24 (frame_default_tool_bar_height): Extern.
25 * gtkutil.c (xg_frame_set_char_size): Pass Qxg_frame_set_char_size
26 to adjust_frame_size.
27 * nsfns.m (Fx_create_frame): Pass Pass Qx_create_frame_1 and
28 Qx_create_frame_2 to adjust_frame_size.
29 * w32fns.c (x_change_tool_bar_height): Call adjust_frame_size with
30 inhibit 1 when we have not redisplayed the tool bar yet.
31 (Fx_create_frame): Pass Pass Qx_create_frame_1 and
32 Qx_create_frame_2 to adjust_frame_size.
33 * w32menu.c (set_frame_menubar): Simplify adjust_frame_size
34 call.
35 * window.c (Fset_window_configuration): Pass
36 Qset_window_configuration to adjust_frame_size.
37 * xdisp.c (redisplay_tool_bar): Assign new height to
38 frame_default_tool_bar_height.
39 (redisplay_internal): If we haven't redisplayed this frame's
40 tool bar, call redisplay_tool_bar early so we can adjust the
41 frame size accordingly.
42 * xfns.c (x_change_tool_bar_height): Call adjust_frame_size with
43 inhibit 1 when we have not redisplayed the tool bar yet.
44 (Fx_create_frame): Pass Pass Qx_create_frame_1 and
45 Qx_create_frame_2 to adjust_frame_size.
46
47 2015-01-12 Paul Eggert <eggert@cs.ucla.edu>
48
49 Have 'make' output better GEN names
50 * Makefile.in (gl-stamp, globals.h): Simplify by putting the new
51 contents of globals.h into gl-stamp. This lets us use AM_V_GEN
52 more naturally so that 'make' can output more-accurate names.
53
54 2015-01-11 Stefan Monnier <monnier@iro.umontreal.ca>
55
56 * buffer.c (init_buffer_once): Initialize buffer_local_flags before
57 calling reset_buffer_local_variables, and make sure we initialize
58 it completely.
59
60 2015-01-11 Dmitry Antipov <dmantipov@yandex.ru>
61
62 * coding.c (Fcoding_system_plist): Use common style for docstring.
63
64 2015-01-11 Paul Eggert <eggert@cs.ucla.edu>
65
66 Port to MSB hosts without optimization
67 E.g., when configuring --with-wide-int CFLAGS='-O0' on x86,
68 the inline function XTYPE needs to be declared before being used.
69 * lisp.h (XTYPE): New forward declaration.
70
71 2015-01-10 Paul Eggert <eggert@cs.ucla.edu>
72
73 Port to 32-bit --with-wide-int
74 Prefer symbol indexes to struct Lisp_Symbol * casted and then
75 widened, as the latter had trouble with GCC on Fedora 21 when
76 configured --with-wide-int and when used in static initializers.
77 * alloc.c (garbage_collect_1, which_symbols):
78 * lread.c (init_obarray):
79 Prefer builtin_lisp_symbol when it can be used.
80 * dispextern.h (struct image_type.type):
81 * font.c (font_property_table.key):
82 * frame.c (struct frame_parm_table.sym):
83 * keyboard.c (scroll_bar_parts, struct event_head):
84 * xdisp.c (struct props.name):
85 Use the index of a builtin symbol rather than its address.
86 All uses changed.
87 * lisp.h (TAG_SYMPTR, XSYMBOL_INIT): Remove, replacing with ...
88 (TAG_SYMOFFSET, SYMBOL_INDEX): ... new macros that deal with
89 symbol indexes rather than pointers, and which work better on MSB
90 hosts because they shift right before tagging. All uses changed.
91 (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
92 No longer noops on wide-int hosts, since they work now.
93 (builtin_lisp_symbol): New function.
94
95 Port to HAVE_FREETYPE && !HAVE_XFT
96 * dispextern.h (struct face.extra) [HAVE_FREETYPE && !HAVE_XFT]:
97 * font.h (syms_of_xftfont) [HAVE_FREETYPE && !HAVE_XFT]:
98 Declare in this case too.
99
100 2015-01-10 Eli Zaretskii <eliz@gnu.org>
101
102 * w32fns.c (Fw32_register_hot_key): Use XINT instead of XLI.
103
104 * w32notify.c (Fw32notify_add_watch, w32_get_watch_object): Use
105 make_pointer_integer instead of XIL.
106 (Fw32notify_rm_watch): Use XINTPTR instead of XLI.
107
108 * w32inevt.c (handle_file_notifications): Use make_pointer_integer
109 instead of XIL. Put a list of the descriptor, action, and file
110 name in event->arg, instead of spreading them between event->code
111 and event->arg.
112
113 * w32term.c (queue_notifications): Use make_pointer_integer
114 instead of XIL. Put a list of the descriptor, action, and file
115 name in event->arg, instead of spreading them between event->code
116 and event->arg.
117
118 * keyboard.c (kbd_buffer_get_event) [HAVE_W32NOTIFY]: Adjust Lisp
119 event creation to changes in w32term.c and w32inevt.c above.
120
121 2015-01-09 Paul Eggert <eggert@cs.ucla.edu>
122
123 Port Qnil==0 changes to 32-bit --with-wide-int
124 * lisp.h (lisp_h_XSYMBOL, XSYMBOL): Assume USE_LSB_TAG in the
125 macro-implemented version. For the non-USE_LSB_TAG case, supply
126 a new inline function that is the inverse of the new TAG_SYMPTR.
127 (lisp_h_XUNTAGBASE, XUNTAGBASE): Remove. All uses removed.
128 (TAG_SYMPTR) [!USE_LSB_TAG]: If the pointer subtraction yields a
129 negative number, don't allow sign bits to bleed into the encoded
130 value. Shift in zero bits instead.
131
132 Refactor pointer-to-integer conversion
133 * gfilenotify.c (monitor_to_lisp, lisp_to_monitor):
134 Rename and move to lisp.h. All uses changed.
135 * lisp.h (XINTPTR, make_pointer_integer): New inline functions,
136 which are renamed from gfilenotify.c's lisp_to_monitor and
137 monitor_to_lisp, and with more-generic void * signatures.
138
139 2015-01-08 Eli Zaretskii <eliz@gnu.org>
140
141 * dispnew.c (buffer_posn_from_coords): Fix the value of the column
142 returned for right-to-left screen lines. (Before the change on
143 2014-12-30, the incorrectly-computed X pixel coordinate concealed
144 this bug.)
145
146 * .gdbinit (xsymname): New subroutine.
147 (xprintsym, initial-tbreak): Use it to access the name of a symbol
148 in a way that doesn't cause GDB to barf when it tries to
149 dereference a NULL pointer.
150
151 * xdisp.c (next_element_from_c_string): Use Lisp integer zero as
152 the object.
153 (set_cursor_from_row, try_cursor_movement, dump_glyph)
154 (insert_left_trunc_glyphs, append_space_for_newline)
155 (extend_face_to_end_of_line, highlight_trailing_whitespace)
156 (find_row_edges, ROW_GLYPH_NEWLINE_P, Fmove_point_visually)
157 (Fbidi_resolved_levels, produce_special_glyphs)
158 (rows_from_pos_range, mouse_face_from_buffer_pos)
159 (note_mouse_highlight): Use nil as the object for glyphs inserted
160 by the display engine, and test with NILP instead of INTEGERP.
161 (Bug#19535)
162
163 * w32fns.c (Fx_show_tip): Use NILP to test for glyphs inserted by
164 the display engine.
165
166 * xfns.c (Fx_show_tip): Use NILP to test for glyphs inserted by
167 the display engine.
168
169 * dispextern.h (struct glyph, struct it): Update comments for the
170 OBJECT members.
171
172 2015-01-08 Paul Eggert <eggert@cs.ucla.edu>
173
174 Port new Lisp symbol init to x86 --with-wide-int
175 * lisp.h (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
176 Define to empty on platforms where EMACS_INT_MAX != INTPTR_MAX, as
177 GCC (at least) does not allow a constant initializer to widen an
178 address constant.
179
180 * lisp.h (TAG_SYMPTR): Don't do arithmetic on NULL.
181 This is a followup to the "Port Qnil==0 XUNTAG to clang" patch.
182 Although clang doesn't need it, some other compiler might, and
183 it's easy enough to be safe.
184
185 * conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0.
186 Apparently clang removed support for the alloc_size attribute.
187
188 Port Qnil==0 XUNTAG to clang
189 clang has undefined behavior if the program subtracts an integer
190 from (char *) 0. Problem reported by YAMAMOTO Mitsuharu in:
191 http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00132.html
192 * lisp.h (lisp_h_XUNTAG) [USE_LSB_TAG]:
193 (XUNTAG) [!USE_LSB_TAG]: Port to clang 3.5.0.
194
195 Port GFileMonitor * hack to Qnil==0 platforms
196 Reported by Glenn Morris in: http://bugs.gnu.org/15880#112
197 * gfilenotify.c (monitor_to_lisp, lisp_to_monitor): New functions.
198 (dir_monitor_callback, Fgfile_add_watch, Fgfile_rm_watch): Use them.
199
200 2015-01-06 Jan Djärv <jan.h.d@swipnet.se>
201
202 * nsterm.m (x_set_window_size): Call updateFrameSize to get real
203 size instead of using widht/height. The frame may be constrained.
204
205 2015-01-05 Paul Eggert <eggert@cs.ucla.edu>
206
207 * lisp.h (XSYMBOL): Parenthesize id in forward decl.
208 Needed when neither optimizing nor inlining.
209 Also, sort decls alphabetically.
210
211 2015-01-05 Eli Zaretskii <eliz@gnu.org>
212
213 * w32proc.c, w32.h, w32fns.c, w32font.c, w32menu.c, w32notify.c:
214 * w32proc.c, w32select.c, w32term.c, w32uniscribe.c: Remove
215 declarations of Q* variables that represent symbols.
216
217 2015-01-05 Paul Eggert <eggert@cs.ucla.edu>
218
219 Use 0 for Qnil
220 Fixes Bug#15880.
221 If USE_LSB_TAG, arrange for the representation of Qnil to be zero so
222 that NILP (x) is equivalent to testing whether x is 0 at the
223 machine level. The overall effects of this and the previous patch
224 shrink the size of the text segment by 2.3% and speeds up
225 compilation of all the .elc files by about 0.5% on my platform,
226 which is Fedora 20 x86-64.
227 * lisp.h (lisp_h_XPNTR, lisp_h_XSYMBOL, lisp_h_XUNTAG)
228 (make_lisp_symbol) [USE_LSB_TAG]:
229 Symbols now tag the difference from lispsym, not the pointer.
230 (lisp_h_XUNTAGBASE, TAG_SYMPTR): New macros.
231 (Lisp_Int0, Lisp_Int1, Lisp_Symbol, Lisp_Misc, Lisp_String, Lisp_Cons):
232 Renumber so that Lisp_Symbol is 0, so that Qnil is zero.
233 (XSYMBOL): New forward decl.
234 (XUNTAGBASE): New function.
235 (XUNTAG): Use it.
236
237 Compute C decls for DEFSYMs automatically
238 Fixes Bug#15880.
239 This patch also makes Q constants (e.g., Qnil) constant addresses
240 from the C point of view.
241 * alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle.c:
242 * casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c:
243 * composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c:
244 * doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c:
245 * frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c:
246 * image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c:
247 * macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m:
248 * nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c:
249 * search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c:
250 * window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c:
251 * xselect.c, xsettings.c, xterm.c:
252 Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs).
253 These names are now defined automatically by make-docfile.
254 * alloc.c (init_symbol): New function.
255 (Fmake_symbol): Use it.
256 (c_symbol_p): New function.
257 (valid_lisp_object_p, purecopy): Use it.
258 * alloc.c (marked_pinned_symbols):
259 Use make_lisp_symbol instead of make_lisp_ptr.
260 (garbage_collect_1): Mark lispsym symbols.
261 (CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro.
262 (mark_object): Use it.
263 (sweep_symbols): Sweep lispsym symbols.
264 (symbol_uses_obj): New function.
265 (which_symbols): Use it. Work for lispsym symbols, too.
266 (init_alloc_once): Initialize Vpurify_flag here; no need to wait,
267 since Qt's address is already known now.
268 (syms_of_alloc): Add lispsym count to symbols_consed.
269 * buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0),
270 when testing whether storage is all bits zero.
271 * dispextern.h (struct image_type):
272 * font.c (font_property_table):
273 * frame.c (struct frame_parm_table, frame_parms):
274 * keyboard.c (scroll_bar_parts, struct event_head):
275 * xdisp.c (struct props):
276 Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and
277 Lisp_Object *, since Qfoo is no longer an object whose address can be
278 taken. All uses changed.
279 * eval.c (run_hook): New function. Most uses of Frun_hooks changed to
280 use it, so that they no longer need to take the address of a Lisp sym.
281 (syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable.
282 * frame.c (syms_of_frame): Add defsyms for the frame_parms table.
283 * keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here.
284 DEFSYM Qdeactivate_mark before the corresponding var.
285 * keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line
286 instead of interning their symbols; this avoids duplicates.
287 (LISP_INITIALLY, TAG_PTR)
288 (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT):
289 New macros.
290 (LISP_INITIALLY_ZERO): Use it.
291 (enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol)
292 (EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*):
293 Move decls up, to avoid forward uses. Include globals.h earlier, too.
294 (make_lisp_symbol): New function.
295 (XSETSYMBOL): Use it.
296 (DEFSYM): Now just a placeholder for make-docfile.
297 * lread.c (DEFINE_SYMBOLS): Define, for globals.h.
298 (intern_sym): New function, with body taken from old intern_driver.
299 (intern_driver): Use it. Last arg is now Lisp integer, not ptrdiff_t.
300 All uses changed.
301 (define_symbol): New function.
302 (init_obarray): Define the C symbols taken from lispsym.
303 Use plain DEFSYM for Qt and Qnil.
304 * syntax.c (init_syntax_once): No need to worry about
305 Qchar_table_extra_slots.
306
307 2015-01-04 Paul Eggert <eggert@cs.ucla.edu>
308
309 'temacs -nw' should not call missing functions
310 Without this patch, "temacs -nw" fails with the diagnostic
311 "emacs: Symbol's function definition is void: frame-windows-min-size"
312 and messes up the tty's state.
313 * frame.c (Fframe_windows_min_size): New placeholder function.
314 (syms_of_frame): Define it.
315 * window.c (Fwindow__sanitize_window_sizes): New placeholder.
316 (syms_of_window): Define it.
317
318 Less 'make' chatter for lisp dir
319 * Makefile.in (%.elc): Adjust to compile-onefile change in
320 ../lisp/Makefile.in.
321
322 batch write-region no longer says "Wrote FOO"
323 This cuts down on 'make' chatter a bit.
324 * fileio.c (Fwrite_region):
325 Don't output "Wrote /whatever/foo.elc" if noninteractive.
326
327 2015-01-03 Paul Eggert <eggert@cs.ucla.edu>
328
329 Revert previous change to produce_composite_glyph
330 * term.c (produce_composite_glyph): Revert previous change (Bug#19496).
331
332 Pacify gcc -Wparentheses
333 * frame.c (x_set_frame_parameters): Add parens (Bug#19428).
334
335 2015-01-03 Martin Rudalics <rudalics@gmx.at>
336
337 * frame.c (x_set_frame_parameters): Call Fset_frame_size only if
338 f->can_x_set_window_size is true.
339 * xterm.c (x_set_window_size_1): Call change_frame_size with
340 text sizes instead of pixel sizes (Bug#19428).
341
342 2015-01-01 Eli Zaretskii <eliz@gnu.org>
343
344 * xdisp.c (pos_visible_p): Fix up the X coordinate for
345 right-to-left screen lines. (Bug#19473)
346
347 2015-01-01 Eli Zaretskii <eliz@gnu.org>
348
349 * w32proc.c (Fw32_get_codepage_charset): Doc fix. (Bug#19458)
350
351 2014-12-31 Paul Eggert <eggert@cs.ucla.edu>
352
353 Simplify setfattr use by assuming GNU make
354 * Makefile.in (PAXCTL_if_present, SETFATTR_if_present): New macros.
355 (emacs$(EXEEXT), temacs$(EXEEXT), bootstrap-emacs$(EXEEXT)): Use them.
356 Simplify by using GNU make rather than shell conditionals,
357 by using ln -f rather than rm -f followed by ln,
358 and by preferring $@ to spelling out the destination.
359
360 2014-12-29 Eli Zaretskii <eliz@gnu.org>
361
362 * sysdep.c [WINDOWSNT]: Include sys/socket.h, without which this
363 file doesn't compile on MS-Windows.
364
365 2014-12-29 Paul Eggert <eggert@cs.ucla.edu>
366
367 Allow return value of system-name to vary. (Bug#19438)
368 * filelock.c (current_lock_owner):
369 * xrdb.c (get_environ_db):
370 * xterm.c (same_x_server):
371 * xterm.c (x_term_init):
372 Prefer (system-name) to system-name, and avoid naming
373 locals 'system-name'.
374 * editfns.c (cached_system_name): New static var.
375 (init_and_cache_system_name): New function.
376 (init_editfns, Fsystem_name): Use it.
377 (syms_of_editfns): Initialize it and Vsystem_name to the same value.
378 * sysdep.c [HAVE_SOCKETS]: Don't include <sys/socket.h>, <netdb.h>.
379 (h_errno) [TRY_AGAIN && !HAVE_H_ERRNO]: Remove decl.
380 (init_system_name) [HAVE_SOCKETS]: Don't canonicalize the name.
381 Don't create a new string if the current value is already correct.
382
383 2014-12-28 Paul Eggert <eggert@cs.ucla.edu>
384
385 Fix produce_composite_width typo
386 * term.c (produce_composite_glyph):
387 Fix typo that confused number of columns for pixel width.
388
389 2014-12-28 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
390
391 Wrap dll functions more simply
392 * decompress.c, gnutls.c, image.c, xml.c:
393 If WINDOWSNT, use '#define FOO fn_FOO' to wrap dll functions,
394 rather than the inverse when not WINDOWSNT. This isolates the
395 fn_* business into the WINDOWSNT-specific section of the code,
396 which makes it easier to maintain the generic code.
397 * decompress.c (DEF_ZLIB_FN, LOAD_ZLIB_FN):
398 * gnutls.c (DEF_GNUTLS_FN, LOAD_GNUTLS_FN):
399 * image.c (DEF_IMGLIB_FN, LOAD_IMGLIB_FN):
400 * xml.c (DEF_XML2_FN, LOAD_XML2_FN):
401 Remove. All uses replaced by DEF_DLL_FN.
402 * decompress.c (inflateInit2): Remove; no longer needed.
403 * w32.h (DEF_DLL_FN, LOAD_DLL_FN): New macros.
404
405 Port memory-full checking to GnuTLS 3.3
406 Instead of using gnutls_global_set_mem_functions, check every call
407 to a GnuTLS function that might return an indication of memory
408 exhaustion. Suggested by Dmitry Antipov in:
409 http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg02056.html
410 * gnutls.c (gnutls_global_set_mem_functions) [WINDOWSNT]: Remove.
411 (init_gnutls_functions): Do not load gnutls_global_set_mem_functions.
412 (fn_gnutls_global_set_mem_functions) [!WINDOWSNT]: Remove.
413 All uses removed.
414 (check_memory_full): New function.
415 (emacs_gnutls_handshake, emacs_gnutls_handle_error)
416 (gnutls_make_error, gnutls_certificate_details, Fgnutls_peer_status)
417 (Fgnutls_boot): Use it.
418 (emacs_gnutls_global_init): Avoid gnutls_global_set_mem_functions.
419
420 2014-12-27 Paul Eggert <eggert@cs.ucla.edu>
421
422 Fix parse_settings to match internal documentation
423 * xsettings.c (parse_settings): Return the number of settings seen.
424 Count the settings changes accurately.
425 (read_settings): Don't confuse number of settings changes with
426 the return code from XGetWindowProperty.
427
428 2014-12-27 Eli Zaretskii <eliz@gnu.org>
429
430 * xdisp.c (set_iterator_to_next) <GET_FROM_STRING>: Limit search in
431 composition_compute_stop_pos to the number of characters in the
432 string. (Bug#19435)
433 <GET_FROM_BUFFER, GET_FROM_STRING>: Simplify code.
434
435 * composite.c (composition_compute_stop_pos): If no composition
436 was found in a string before ENDPOS, and ENDPOS is the string end,
437 no need to back up to a safe point.
438
439 * dispextern.h (struct it) <end_charpos>: Improve commentary.
440
441 2014-12-27 Jan Djärv <jan.h.d@swipnet.se>
442
443 * nsimage.m (allocInitFromFile:): Initialize bmRep.
444 (dealloc): Release bmRep.
445 (setPixmapData): Make bmRep local so class member is not
446 set (Bug#19133).
447 (setPixmapData): Rename local variable bmRep to avoid compiler
448 warning.
449
450 2014-12-27 Jan Djärv <jan.h.d@swipnet.se>
451
452 * xterm.c (do_ewmh_fullscreen): Don't remove maximized_horz/vert
453 when going to fullscreen (Bug#0x180004f).
454
455 2014-12-27 Eli Zaretskii <eliz@gnu.org>
456
457 * window.c (Fwindow_body_width): Doc fix. (Bug#19395)
458
459 2014-12-27 Stefan Monnier <monnier@iro.umontreal.ca>
460
461 * buffer.c (syms_of_buffer) <Vafter_change_functions>: fix docstring.
462
463 2014-12-27 Eli Zaretskii <eliz@gnu.org>
464
465 * gnutls.c (gnutls_init): Fix deprecation warning from GCC.
466
467 2014-12-26 Paul Eggert <eggert@cs.ucla.edu>
468
469 Use bool for boolean in xselect.c, xsettings.c
470 * xselect.c (x_get_local_selection, struct selection_data)
471 (x_selection_request_lisp_error, struct prop_location)
472 (x_handle_selection_request, x_convert_selection)
473 (waiting_for_other_props_on_window, expect_property_change)
474 (wait_for_property_change, x_handle_property_notify)
475 (x_get_foreign_selection, x_get_window_property)
476 (receive_incremental_selection)
477 (x_get_window_property_as_lisp_data)
478 (lisp_data_to_selection_data, Fx_get_selection_internal)
479 (x_send_client_event):
480 * xselect.c, xterm.h (x_handle_dnd_message):
481 * xsettings.c (dpyinfo_valid, parse_settings, read_settings)
482 (apply_xft_settings, read_and_apply_settings)
483 (xft_settings_event, init_gsettings, init_xsettings)
484 (syms_of_xsettings):
485 Use bool for boolean.
486 * xselect.c (x_get_window_property): Omit last arg, which was an
487 unused boolean.
488 * xsettings.c (apply_xft_settings): Remove 2nd arg, which was
489 always true. All callers changed.
490
491 2014-12-26 Eli Zaretskii <eliz@gnu.org>
492
493 * w32proc.c (sys_spawnve, get_lcid_callback): Use strcpy instead
494 of strcat.
495
496 * w32menu.c (add_menu_item): Use stpcpy instead of strcat.
497
498 * w32.c (sys_readdir, stat_worker, symlink): Use strcpy instead of
499 strcat.
500
501 2014-12-26 Paul Eggert <eggert@cs.ucla.edu>
502
503 Use bool for boolean in xsmfns.c
504 * xsmfns.c, xterm.h (x_session_have_connection):
505 * xsmfns.c (doing_interact, smc_interact_CB, Fhandle_save_session):
506 Use bool for boolean.
507 (x_session_initialize, Fhandle_save_session):
508 Prefer NILP (x) to EQ (x, Qnil).
509
510 2014-12-25 Paul Eggert <eggert@cs.ucla.edu>
511
512 * callproc.c (child_setup):
513 * dbusbind.c (xd_signature_cat):
514 * doc.c (get_doc_string, Fsnarf_documentation):
515 * editfns.c (Fuser_full_name):
516 * frame.c (xrdb_get_resource):
517 * gtkutil.c (xg_get_file_with_chooser):
518 * tparam.c (tparam1):
519 * xfns.c (xic_create_fontsetname):
520 * xrdb.c (gethomedir, get_user_db, get_environ_db):
521 * xsmfns.c (smc_save_yourself_CB):
522 Rewrite to avoid the need for strcat, typically by using stpcpy
523 and/or lispstpcpy. strcat tends to be part of O(N**2) algorithms.
524 * doc.c (sibling_etc):
525 * xrdb.c (xdefaults):
526 Now a top-level static constant.
527
528 2014-12-23 Didier Verna <didier@didierverna.net> (tiny change).
529
530 * nsselect.m (Fns_selection_owner_p): Return a Lisp boolean, not a
531 C one (Bug#19396).
532
533 2014-12-22 Jan Djärv <jan.h.d@swipnet.se>
534
535 * xterm.c (x_bitmap_icon): Partly revert change from 2014-03-21 which
536 breaks icon setting for Gtk+ except for initial frame (Bug#19403).
537
538 2014-12-22 Paul Eggert <eggert@cs.ucla.edu>
539
540 Use bool for boolean in xterm.c
541 * frame.h, nsterm.m, w32term.c, w32term.h, xterm.c:
542 (x_set_window_size, x_bitmap_icon):
543 * nsterm.m (ns_frame_raise_lower, x_new_font):
544 * termhooks.h (struct terminal.toggle_invisible_pointer_hook)
545 (struct terminal.frame_raise_lower_hook):
546 * w32term.c (w32_frame_raise_lower):
547 * xterm.c, xterm.h (x_text_icon):
548 * xterm.c (x_update_window_begin, x_update_window_end)
549 (x_update_end, x_after_update_window_line)
550 (x_set_glyph_string_gc, x_draw_glyph_string_background)
551 (x_draw_glyph_string_foreground)
552 (x_draw_composite_glyph_string_foreground)
553 (x_alloc_lighter_color, x_draw_relief_rect)
554 (x_draw_glyph_string_box, x_draw_image_relief)
555 (x_draw_image_glyph_string, x_draw_stretch_glyph_string)
556 (x_draw_underwave, x_draw_glyph_string, x_show_hourglass)
557 (x_hide_hourglass):
558 (XFillRectangle) [HAVE_GTK3]:
559 (XTtoggle_invisible_pointer, frame_highlight, frame_unhighlight)
560 (x_focus_changed, x_find_modifier_meanings, note_mouse_movement)
561 (XTmouse_position, xt_action_hook, xt_horizontal_action_hook)
562 (x_send_scroll_bar_event, xm_scroll_callback)
563 (xg_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
564 (x_create_toolkit_scroll_bar)
565 (x_create_horizontal_toolkit_scroll_bar)
566 (x_set_toolkit_horizontal_scroll_bar_thumb, x_scroll_bar_create)
567 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
568 (XTset_horizontal_scroll_bar, x_scroll_bar_expose)
569 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
570 (x_scroll_bar_report_motion)
571 (x_horizontal_scroll_bar_report_motion, x_net_wm_state)
572 (handle_one_xevent, XTread_socket, x_draw_bar_cursor)
573 (x_draw_window_cursor, x_clear_errors)
574 (x_trace_wire, x_new_font, x_set_offset, wm_supports)
575 (set_wm_state, x_set_sticky, get_current_wm_state)
576 (do_ewmh_fullscreen, x_handle_net_wm_state)
577 (x_check_expected_move, x_sync_with_move, x_wait_for_event)
578 (x_set_window_size_1, XTframe_raise_lower)
579 (x_make_frame_visible, x_iconify_frame)
580 (x_timeout_atimer_activated_flag, same_x_server, x_display_ok)
581 (x_term_init, x_process_timeouts, x_activate_timeout_atimer)
582 (x_delete_terminal, x_initialize, syms_of_xterm):
583 Use bool for boolean.
584
585 2014-12-20 Paul Eggert <eggert@cs.ucla.edu>
586
587 * composite.h (struct composition.width): Now int
588 instead of unsigned short, as we prefer signed integers.
589
590 Let charset tick grow past USHRT_MAX
591 * charset.c, charset.h (charset_ordered_list_tick):
592 Now EMACS_UINT, not unsigned short.
593 * fontset.c (reorder_font_vector): Allow the tick to grow to the
594 maximum representable Emacs integer value before wrapping it around.
595
596 Simplify unexec file mode setting
597 * unexaix.c, unexcoff.c, unexelf.c, unexmacosx.c:
598 Don't include <sys/stat.h> when no longer needed.
599 (unexec): Create file with correct mode in the first place,
600 rather than overwriting the mode later and fiddling with the
601 global umask in the mean time. Avoid bogus usage like
602 'umask (777)', which should have been 'umask (0777)'.
603 (mark_x): Remove. All callers removed.
604
605 2014-12-19 Paul Eggert <eggert@cs.ucla.edu>
606
607 Minor cleanups for Lisp objects and symbols
608 * alloc.c (next_vector, set_next_vector):
609 * lisp.h (lisp_h_INTEGERP, make_number, XFASTINT, make_natnum):
610 (lisp_h_make_number) [USE_LSB_TAG]:
611 Use Lisp_Int0 instead of the mystery constant 0.
612 * alloc.c (mark_object): Always set and use po; that's simpler.
613 (CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE):
614 Properly parenthesize definientia.
615 * bidi.c (bidi_initialize):
616 * buffer.c (init_buffer_once):
617 * nsfns.m (syms_of_nsfns):
618 * nsmenu.m (syms_of_nsmenu):
619 * nsselect.m (syms_of_nsselect):
620 Prefer DEFSYM to defining by hand.
621 * buffer.c (syms_of_buffer): Omit unneeded staticpros.
622 * data.c: Fix too-long line.
623 * lisp.h (DECLARE_GDB_SYM): New macro.
624 (DEFINE_GDB_SYMBOL_BEGIN): Use it.
625 (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END) [!MAIN_PROGRAM]:
626 Declare the symbol, so it's visible to everywhere lisp.h is included.
627 Move forward decls as far forward as they can go,
628 to allow future changes to use them.
629
630 2014-12-18 Paul Eggert <eggert@cs.ucla.edu>
631
632 * gnutls.c: Include gnutls.h.
633 This to check syms_of_gnutls's API even when !HAVE_GNUTLS.
634 * image.c (svg_load): Fix pointer signedness.
635
636 2014-12-18 Martin Rudalics <rudalics@gmx.at>
637
638 * frame.c (frame_windows_min_size): New argument IGNORE.
639 (adjust_frame_size): When called from change_frame_size call
640 frame_windows_min_size with IGNORE Qt so we can ignore size
641 restrictions.
642
643 2014-12-18 Eli Zaretskii <eliz@gnu.org>
644
645 * font.c (Ffont_info): Add more font information to the vector
646 returned by the function, inspired by query-font. Doc fix.
647 (Bug#19395)
648
649 2014-12-18 Stefan Monnier <monnier@iro.umontreal.ca>
650
651 * keyboard.c (input_was_pending): New var.
652 (read_char): Use it to make sure we only skip redisplay when we can't
653 keep up with the repeat rate.
654
655 2014-12-17 Stefan Monnier <monnier@iro.umontreal.ca>
656
657 * keyboard.c (swallow_events): Don't redisplay if there's input pending.
658
659 2014-12-17 Ulf Jasper <ulf.jasper@web.de>
660
661 * image.c (svg_load): Watch out for nil value of current buffer's
662 filename. Re-enable filename thing for not-a-file case.
663
664 2014-12-17 Ulf Jasper <ulf.jasper@web.de>
665
666 Partially disabled previous change.
667
668 * image.c (svg_load): Temporarily disabled filename thing for
669 not-a-file case as it can cause crashs.
670
671 2014-12-17 Ulf Jasper <ulf.jasper@web.de>
672
673 Fix problem with images referenced within svg files. (bug#19373)
674
675 * image.c: Additional parameter 'filename' for
676 svg_load_image. Include "buffer.h". Define library function
677 rsvg_handle_set_base_uri for WINDOWSNT.
678 (init_svg_functions): Initialize rsvg_handle_set_base_uri.
679 (fn_rsvg_handle_set_base_uri): Define fn_rsvg_handle_set_base_uri.
680 (svg_load): Pass a filename to svg_load_image: either name of
681 actual file or of current buffer's file.
682 (svg_load_image): New parameter 'filename', used for setting
683 base_uri, necessary for loading referenced images. (bug#19373)
684
685 2014-12-16 Paul Eggert <eggert@cs.ucla.edu>
686
687 * lread.c (init_obarray): Declare Qt as special.
688 This fixes a typo in the 2012-05-15 patch that
689 tried to declare Qt as special.
690
691 2014-12-15 Stefan Monnier <monnier@iro.umontreal.ca>
692
693 Various fixes to use bool type and constants.
694 * dispnew.c (update_single_window): Remove arg `force_p' since it's
695 always true.
696 * xfaces.c (clear_face_cache): Use bool for the argument type.
697
698 2014-12-15 Paul Eggert <eggert@cs.ucla.edu>
699
700 Correct same_at_end when restoring window points
701 * fileio.c (Finsert_file_contents): Compute same_at_end character
702 position using the old buffer size, not the new one, since
703 restore_window_points wants the old size.
704 Fixes: debbugs:19161
705
706 2014-12-14 Alan Mackenzie <acm@muc.de>
707
708 New feature optionally to accelerate auto-repeated scrolling.
709
710 * xdisp.c: Remove "static" from declaration of Qfontification_functions.
711
712 * window.c (window_scroll): Bind fontification-functions to nil
713 when scrolling by whole screens and
714 fast-but-imprecise-scrolling is non-nil.
715 (syms_of_window): New DEFVAR_BOOL fast-but-imprecise-scrolling.
716
717 * lisp.h (bool): Declare Qfontification_functions extern.
718
719 2014-12-14 Eli Zaretskii <eliz@gnu.org>
720
721 Load system's default trusted Certificate Authorities if available.
722 * gnutls.c (gnutls_certificate_set_x509_system_trust)
723 [GNUTLS >= 3.0.20]: Declare for WINDOWSNT.
724 (init_gnutls_functions)(gnutls_certificate_set_x509_system_trust)
725 [GNUTLS >= 3.0.20]: Load from shared library for WINDOWSNT.
726 (fn_gnutls_certificate_set_x509_system_trust) [!WINDOWSNT]:
727 Define new macro.
728 (Fgnutls_boot) [GNUTLS >= 3.0.20]:
729 Call gnutls_certificate_set_x509_system_trust. Log an error message if
730 it fails.
731
732 2014-12-14 Paul Eggert <eggert@cs.ucla.edu>
733
734 * regex.c (analyze_first): Rename from analyze_first.
735
736 2014-12-13 Paul Eggert <eggert@cs.ucla.edu>
737
738 * alloc.c (XMALLOC_BASE_ALIGNMENT): Use max_align_t instead of
739 a hack involving a union.
740
741 2014-12-13 Eli Zaretskii <eliz@gnu.org>
742
743 * gnutls.c (Fgnutls_available_p, syms_of_gnutls):
744 Move gnutls-available-p out of the HAVE_GNUTLS conditional, and define
745 them only once.
746
747 2014-12-13 Teodor Zlatanov <tzz@lifelogs.com>
748
749 * emacs.c (main): Always include gnutls.h and run syms_of_gnutls.
750
751 * gnutls.h: Always declare syms_of_gnutls.
752
753 * gnutls.c (Fgnutls_available_p syms_of_gnutls): Move later for
754 clarity. Let the availability check return Qnil when the GnuTLS
755 integration is not available, instead of erroring out.
756 (Bug#19346)
757
758 2014-12-13 Eli Zaretskii <eliz@gnu.org>
759
760 * xdisp.c (move_it_in_display_line_to, display_line):
761 Don't disallow overflow-newline-into-fringe when word-wrap is in
762 effect. (Bug#19300)
763
764 2014-12-11 Stefan Monnier <monnier@iro.umontreal.ca>
765
766 * fileio.c: Better preserve window-points during revert (bug#19161).
767 (Qget_buffer_window_list): New var.
768 (get_window_points_and_markers, restore_window_points): New functions.
769 (Finsert_file_contents): Use them to save and restore window-points.
770
771 2014-12-11 Dmitry Antipov <dmantipov@yandex.ru>
772
773 * xterm.c (x_delete_terminal): Call emacs_close for X connection
774 descriptor if called from x_connection_closed and always delete
775 this descriptor from keyboard waiting set (Bug#19147).
776
777 2014-12-10 Eli Zaretskii <eliz@gnu.org>
778
779 * bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT): New macro.
780 (bidi_cache_max_elts): New global variable.
781 (bidi_shelve_header_size): Add the sizeof bidi_cache_max_elts.
782 (bidi_cache_shrink, bidi_initialize): Reset bidi_cache_max_elts to
783 its initial value.
784 (bidi_cache_search): Handle overflown cache. Improve commentary.
785 (bidi_cache_ensure_space): Limit allocations to the current value
786 of bidi_cache_max_elts. Force xpalloc not to over-allocate.
787 If less than a full BIDI_CACHE_CHUNK is left to the limit, decrease
788 the increment to not exceed the limit.
789 (bidi_cache_iterator_state): Now returns non-zero if succeeded to
790 cache, zero otherwise (meaning the cache overflowed). In the
791 latter case, set bidi_cache_last_idx to -1.
792 (bidi_peek_at_next_level): Handle overflown cache.
793 (bidi_push_it): Increase the cache limit for iterating the new object.
794 (bidi_pop_it): Decrease the cache limit back to previous value.
795 (bidi_shelve_cache): Shelve the current value of the cache limit.
796 (bidi_unshelve_cache): Restore the value of cache limit.
797 (bidi_find_bracket_pairs): If the cache overflows while looking
798 for the paired bracket, give up and let bidi_resolve_neutrals
799 process the bracket as a simple neutral. (Bug#19322)
800 (bidi_find_other_level_edge): If the cache overflows, fall back on
801 Plan B, which effectively stops the reordering and restarts it on
802 the next character (after resetting the cache).
803 (bidi_move_to_visually_next): When the cache overflows, reset it
804 after processing the last cached character.
805
806 2014-12-10 Paul Eggert <eggert@cs.ucla.edu>
807
808 Fix glitches in gnutls.c, mostly memory-related
809 * gnutls.c: Sort macro definitions by name.
810 (fn_gnutls_transport_set_errno): Omit unreachable definition.
811 (fn_gnutls_x509_crt_get_signature): Omit unused symbol.
812 (gnutls_hex_string): Arg is now unsigned char *, to avoid a cast.
813 Prefer ptrdiff_t for sizes. Check for arithmetic overflow when
814 calculating string length. Use make_uninit_string, to avoid
815 copying the string. Cast the char, not the pointer.
816 (gnutls_certificate_details): Use xmalloc and xfree, not malloc
817 and free. Work even for dates past the year 9999. Use void *
818 for buffers, to avoid casts.
819
820 2014-12-09 Andy Moreton <andrewjmoreton@gmail.com> (tiny change)
821
822 * gnutls.c (gnutls_protocol_get_name): Fix a copy/paste typo.
823
824 2014-12-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
825
826 * gnutls.c (Fgnutls_peer_status): Return the key exchange, cipher
827 and MAC algorithms.
828
829 2014-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
830
831 * process.c: Whitespace and line-break nitpicks.
832
833 2014-12-08 Lars Magne Ingebrigtsen <larsi@gnus.org>
834
835 * gnutls.c (gnutls_certificate_details): The :signature isn't
836 that useful, so remove it.
837 (gnutls_certificate_details): Clean up whitespace slightly.
838 (Fgnutls_peer_status): Return the Diffie-Hellman prime bits for
839 the connection.
840 (gnutls_certificate_details): Put :signature-algorithm back again,
841 which was removed by mistake.
842 (emacs_gnutls_handle_error): Fatal errors should be on level 1, so
843 that they are not messaged by default (bug#16253).
844 (Fgnutls_error_fatalp): Doc fix (bug#18210).
845
846 * gnutls.c: Add Windows specs for gnutls_dh_get_prime_bits.
847
848 2014-12-07 Jan Djärv <jan.h.d@swipnet.se>
849
850 * nsimage.m (setPixmapData): Make bmRep local so class member is not
851 set (Bug#19133).
852
853 2014-12-05 Lee Duhem <lee.duhem@gmail.com> (tiny change)
854
855 * eval.c (Fsignal): Remove duplicate test.
856 (Fautoload_do_load): Fix up docstring.
857
858 2014-12-05 Jan Djärv <jan.h.d@swipnet.se>
859
860 * nsterm.m (represented_filename, represented_frame): New variables.
861 (ns_set_represented_filename): New function.
862 (sendEvent:): Set represented filename here to avoid flicker,
863 related to Bug#18757.
864
865 * nsterm.h: Declare ns_set_represented_filename.
866
867 * nsfns.m (ns_set_name_as_filename): Don't set represented filename
868 at once, call ns_set_represented_filename instead.
869
870 2014-12-05 Eli Zaretskii <eliz@gnu.org>
871
872 * dispextern.h (enum bidi_dir_t): Force NEUTRAL_DIR to be zero.
873 (struct bidi_stack): Reduce size by using bit fields and by
874 packing sos, override, and isolate_status into a single 8-bit
875 byte called 'flags'.
876
877 * bidi.c (ISOLATE_STATUS, OVERRIDE): New macros.
878 (bidi_push_embedding_level): Construct flags from individual
879 bits. Adapt to changes in prev_for_neutral and next_for_neutral
880 members.
881 (bidi_pop_embedding_level): Use ISOLATE_STATUS. Extract 'sos'
882 from flags. Adapt to changes in prev_for_neutral,
883 next_for_neutral, and last_strong members.
884 (bidi_line_init): Initialize flags to zero.
885 (bidi_resolve_explicit, bidi_resolve_weak, bidi_resolve_brackets)
886 (bidi_resolve_neutral): Use ISOLATE_STATUS and OVERRIDE.
887
888 2014-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
889
890 * eval.c (backtrace_eval_unrewind): Rewind also the excursions.
891 (Fapply): Try and simplify the control flow.
892
893 2014-12-03 Chris Zheng <chriszheng99@gmail.com> (tiny change)
894
895 * gnutls.c (init_gnutls_functions, gnutls_certificate_details):
896 Use gnutls_sign_get_name directly because
897 gnutls_sign_algorithm_get_name is a macro on MinGW (bug#19231).
898 (init_gnutls_functions): Load missing gnutls_server_name_set.
899
900 2014-12-02 Eli Zaretskii <eliz@gnu.org>
901
902 * bidi.c (bidi_find_first_overridden): New function.
903
904 * xdisp.c (Fbidi_find_overridden_directionality): New function.
905 (syms_of_xdisp): Defsubr it.
906
907 * dispextern.h (bidi_find_first_overridden): Add prototype.
908
909 2014-12-02 Jan Djärv <jan.h.d@swipnet.se>
910
911 * nsimage.m (initFromSkipXBM:width:height:flip:length:): Set bmRep
912 to nil after release (Bug#9133).
913
914 2014-11-30 Paul Eggert <eggert@cs.ucla.edu>
915
916 Port better to AddressSanitizer.
917 These changes suffice for temacs on x86-64 with GCC 4.9.2 and
918 -fsanitize=address.
919 * alloc.c (valid_pointer_p) [ADDRESS_SANITIZER]:
920 Return -1 or 0, as the pipe trick doesn't work.
921 * alloc.c (relocatable_string_data_p, mark_object, sweep_symbols):
922 * data.c (Ffset):
923 * print.c (print_object):
924 When a pointer-check primitive returns -1, do not assume this
925 means the pointer is valid or that the underlying system has failed.
926 It could just be that addresses are being sanitized so Emacs can't
927 test for pointer validity.
928 * lisp.h (defined_GC_CHECK_STRING_BYTES): New constant.
929 (USE_STACK_STRING) [GC_CHECK_STRING_BYTES]: Now false, since the
930 string validity checker doesn't work on stack-based strings.
931
932 2014-11-29 Paul Eggert <eggert@cs.ucla.edu>
933
934 Improve clarity of USE_LSB_TAG definition.
935 Reported by Lee Duhem. Suggested by Andreas Schwab in:
936 http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg02222.html
937 * lisp.h (USE_LSB_TAG): Define in terms of the (simpler)
938 VAL_MAX / 2 rather than in terms of the (more complicated)
939 EMACS_INT_MAX >> GCTYPEBITS, and adjust commentary to match.
940
941 2014-11-29 Eli Zaretskii <eliz@gnu.org>
942
943 * xdisp.c (handle_single_display_spec): When ignoring a fringe
944 bitmap display, reset the ignore_overlay_strings_at_pos_p flag.
945 (next_element_from_buffer): When done with overlays, reset the
946 ignore_overlay_strings_at_pos_p flag. (Bug#19201)
947
948 2014-11-29 Eli Zaretskii <eliz@gnu.org>
949
950 * w32fns.c (Fw32_shell_execute): Convert forward slashes in
951 DOCUMENT to backslashes, if DOCUMENT is a file. (Bug#19141)
952
953 2014-11-29 Ulrich Müller <ulm@gentoo.org>
954
955 * Makefile.in (temacs$(EXEEXT)): Use consistent flag settings
956 for paxctl and setfattr. Fixes temacs startup failure with
957 grsecurity/PaX enabled Linux kernel (bug#19067).
958
959 2014-11-27 Oscar Fuentes <ofv@wanadoo.es>
960
961 * w32.c, w32heap.c, w32term.c:
962 Use MINGW_W64 instead of _W64.
963
964 2014-11-27 Stefan Monnier <monnier@iro.umontreal.ca>
965
966 * frame.c (Fhandle_switch_frame): Deactivate shift-region (bug#19003).
967
968 2014-11-26 Lars Magne Ingebrigtsen <larsi@gnus.org>
969
970 * gnutls.c (gnutls_ip_address_p): New function.
971 (Fgnutls_boot): Only send SNI if the host name is not an IP address.
972
973 2014-11-26 Toke Høiland-Jørgensen <toke@toke.dk> (tiny change)
974
975 * gnutls.c (Fgnutls_boot): Send the server name over (bug#18208).
976
977 2014-11-25 Paul Eggert <eggert@cs.ucla.edu>
978
979 Fix gnutls problems caught by static checking.
980 * gnutls.c (Fgnutls_boot): Remove unused local.
981 (Fgnutls_boot): Fix pointer signedness.
982
983 2014-11-25 Lars Magne Ingebrigtsen <larsi@gnus.org>
984
985 * gnutls.c (gnutls_certificate_details): Don't include certain
986 certificate details on older gnutls versions (bug#19168).
987 (syms_of_gnutls): Export gnutls_peer_status_warning_describe.
988 (gnutls_certificate_details): Reversed check in last checkin.
989
990 2014-11-25 Teodor Zlatanov <tzz@lifelogs.com>
991
992 * gnutls.c (Fgnutls_peer_status): Check GNUTLS_INITSTAGE, not gnutls_p.
993 (Fgnutls_peer_status_warning_describe): Add function to describe a
994 peer verification warning symbol.
995 (Fgnutls_peer_status): Use it.
996 (Fgnutls_boot): Use it. Minor logging fixes.
997
998 2014-11-24 Lars Magne Ingebrigtsen <larsi@gnus.org>
999
1000 * gnutls.c: Fix compilation warnings given fix --enable-gcc-warnings.
1001
1002 2014-11-24 Glenn Morris <rgm@gnu.org>
1003
1004 * emacs.c (main) <--version>: Make use of PACKAGE_NAME.
1005
1006 * Makefile.in (emacs.res): Use ../nt rule, rather than duplicating it.
1007 (ntsource, WINDRES, EMACS_MANIFEST): Remove, now unused.
1008
1009 2014-11-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
1010
1011 * gnutls.c: Fix Windows function definition of
1012 gnutls_x509_crt_get_fingerprint.
1013
1014 * gnutls.c: Fix Windows return value for gnutls_pk_algorithm_get_name.
1015
1016 * gnutls.c (Fgnutls_boot): Save certificate for later inspection.
1017
1018 * process.h: Added more fields to Lisp_Process to track
1019 certificate details.
1020
1021 * gnutls.c (gnutls_hex_string, gnutls_certificate_details)
1022 (Fgnutls_peer_status): New functions to export TLS certificate
1023 details to Emacs Lisp.
1024
1025 2014-11-23 Jan Djärv <jan.h.d@swipnet.se>
1026
1027 * gtkutil.c (gtk_adjustment_configure): Define for Gtk+ < 2.14.
1028 (xg_set_toolkit_horizontal_scroll_bar_thumb): Remove wrong version
1029 check for gtk_adjustment_configure (Bug#19149).
1030 (gtk_adjustment_configure): Don't use 2.14 functions (Bug#19149).
1031
1032 2014-11-22 Glenn Morris <rgm@gnu.org>
1033
1034 * Makefile.in (emacs.res): Add dependency on icons/hand.cur. Use $<.
1035
1036 2014-11-22 Martin Rudalics <rudalics@gmx.at>
1037
1038 Don't shrink frame when using desktop-save-mode (Bug#19048).
1039 * w32fns.c (x_set_tool_bar_lines): Always call
1040 x_change_tool_bar_height (Bug#19048).
1041 (x_change_tool_bar_height): Mark frame as garbaged since
1042 adjust_frame_size might not have done that.
1043 * xfns.c (x_set_tool_bar_lines): Always call
1044 x_change_tool_bar_height (Bug#19048).
1045 (x_change_tool_bar_height): Mark frame as garbaged since
1046 adjust_frame_size might not have done that.
1047
1048 2014-11-21 Ulf Jasper <ulf.jasper@web.de>
1049
1050 * xml.c (parse_region): Take care of new optional parameter
1051 'discard-comments' of 'libxml-parse(html|xml)-region'.
1052 (Flibxml_parse_html_region, Flibxml_parse_xml_region):
1053 New optional parameter 'discard-comments'.
1054
1055 2014-11-17 Paul Eggert <eggert@cs.ucla.edu>
1056
1057 Improve time stamp handling, and be more consistent about it.
1058 * editfns.c (invalid_time): New function.
1059 Use it instead of 'error ("Invalid time specification")'.
1060 (time_add, time_subtract, time_arith, Ftime_add, Ftime_less_p)
1061 (decode_float_time, lisp_to_timespec, lisp_time_struct):
1062 New functions.
1063 (make_time_tail, make_time): Remove. All uses changed to use
1064 new functions or plain list4i.
1065 (disassemble_lisp_time): Return effective length if successful.
1066 Check that LOW is an integer, if it's combined with other components.
1067 (decode_time_components): Decode into struct lisp_time, not
1068 struct timespec, so that we can support a wide set of times
1069 regardless of whether time_t is signed. Decode plain numbers
1070 as seconds since the Epoch, and nil as the current time.
1071 (lisp_time_argument, lisp_seconds_argument, Ffloat_time):
1072 Reimplement in terms of new functions.
1073 (Fencode_time): Just use list2i.
1074 (syms_of_editfns): Add time-add, time-subtract, time-less-p.
1075 * keyboard.c (decode_timer): Don't allow the new formats (floating
1076 point or nil) in timers.
1077 * systime.h (LO_TIME_BITS): New constant. Use it everywhere in
1078 place of the magic number '16'.
1079 (struct lisp_time): New type.
1080 (decode_time_components): Use it.
1081 (lisp_to_timespec): New decl.
1082
1083 2014-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
1084
1085 * intervals.h (INTERVAL_WRITABLE_P): Check the `inhibit-read-only'
1086 text property.
1087
1088 * callint.c (Fcall_interactively): Pass in nil as argument to
1089 Fbarf_if_buffer_read_only.
1090
1091 * fileio.c (Finsert_file_contents): Ditto.
1092
1093 * insdel.c (prepare_to_modify_buffer_1): Pass start region in.
1094
1095 * textprop.c (verify_interval_modification): Check buffer
1096 readedness after the last interval.
1097
1098 * buffer.c (Fbarf_if_buffer_read_only): Don't raise an error if
1099 the text at POSITION (new optional argument) has the
1100 `inhibit-read-only' text property set.
1101
1102 2014-11-16 Eli Zaretskii <eliz@gnu.org>
1103
1104 * window.c (window_scroll_pixel_based): Avoid truncation/rounding
1105 errors in computing the number of pixels to scroll.
1106 Suggested by Kelly Dean <kelly@prtime.org>. (Bug#19060)
1107
1108 2014-11-16 Jan Djärv <jan.h.d@swipnet.se>
1109
1110 * nsmenu.m (update_frame_tool_bar): If tool bar changes height,
1111 call updateFrameSize.
1112
1113 * nsterm.m (setFrame:): Remove call to display (Bug#18757).
1114
1115 2014-11-16 Jan Djärv <jan.h.d@swipnet.se>
1116
1117 * nsfns.m (x_set_foreground_color, x_set_background_color)
1118 (x_set_cursor_color, Fxw_color_values): Block/unblock input,
1119 use SET_FRAME_GARBAGED instead of redraw_frame (Bug#19036).
1120
1121 2014-11-15 Jan Djärv <jan.h.d@swipnet.se>
1122
1123 * nsterm.m (ns_send_appdefined): Check for application defined
1124 event on Cocoa (Bug#18993).
1125 (run): Restore code before the previous 18993 fix.
1126
1127 2014-11-14 David Reitter <david.reitter@gmail.com>
1128
1129 * nsterm.m (run): Set timeout for event loop to prevent hang.
1130 (Bug#18993)
1131
1132 2014-11-14 Paul Eggert <eggert@cs.ucla.edu>
1133
1134 * .gitignore: Add emacs-[1-9]*, to ignore files like emacs-25.0.50.1.
1135
1136 2014-11-14 Dmitry Antipov <dmantipov@yandex.ru>
1137
1138 * xfont.c (xfont_list_pattern): Do not allocate font entity object
1139 for each candidate font but attempt to reuse it from previous improper
1140 candidate, if any.
1141
1142 2014-11-13 Paul Eggert <eggert@cs.ucla.edu>
1143
1144 Avoid undefined behavior in color table hashing.
1145 * image.c (CT_HASH_RGB) [COLOR_TABLE_SUPPORT]: Remove, replacing with ...
1146 (ct_hash_rgb) [COLOR_TABLE_SUPPORT]: New function. All uses changed.
1147 This function avoids undefined behavior with signed shift overflow.
1148
1149 2014-11-10 Eli Zaretskii <eliz@gnu.org>
1150
1151 * fileio.c (Finsert_file_contents): Invalidate buffer caches also
1152 when the inserted text does not need decoding. (Bug#18982)
1153
1154 2014-11-10 Jan Djärv <jan.h.d@swipnet.se>
1155
1156 * nsterm.h (EmacsScroller): judge returns bool.
1157
1158 * nsterm.m (ns_set_vertical_scroll_bar): Release bar.
1159 (ns_judge_scroll_bars): Only set removed if judge returns true.
1160 (judge): Returns bool == condemned. Remove self from window.
1161 (setPosition:portion:whole:): Remove raise SIGIO (Bug#18757).
1162
1163 2014-11-10 Stefan Monnier <monnier@iro.umontreal.ca>
1164
1165 * keyboard.c (command_loop_1): Record this-command in recent-keys.
1166 (Frecent_keys): Rewrite. and add optional `include-cmds' arg.
1167
1168 2014-11-09 Jan Djärv <jan.h.d@swipnet.se>
1169
1170 * nsterm.m (ns_set_vertical_scroll_bar)
1171 (ns_set_horizontal_scroll_bar): Cleanup merge error.
1172
1173 2014-11-09 Paul Eggert <eggert@cs.ucla.edu>
1174
1175 * xgselect.c (xg_select): Don't assume n_gfds is nonnegative
1176 merely because tmo_in_millisec is nonnegative. The 1st call
1177 to g_main_context_query could succeed while the 2nd one fails.
1178
1179 * frame.c (Fcan_run_window_configuration_change_hook): Return a value.
1180
1181 2014-11-08 Jan Djärv <jan.h.d@swipnet.se>
1182
1183 * nsterm.m (run): Only use non-system event loop if OSX version is
1184 exactly 10.9 (Bug#18993).
1185 (ns_set_vertical_scroll_bar): Don't call bar setPosition: unless
1186 needed (Bug#18757).
1187
1188 2014-11-08 Michael Albinus <michael.albinus@gmx.de>
1189
1190 * callproc.c (encode_current_directory): Support handling of file
1191 names prepended by "/:". (Bug#18891)
1192
1193 2014-11-08 Alan Mackenzie <acm@muc.de>
1194
1195 * syntax.c (back_comment): Fix off-by-one error (bug#18022).
1196
1197 2014-11-08 Dima Kogan <dima@secretsauce.net>
1198
1199 * xgselect.c (xg_select): Use g_main_context_acquire (bug#18861).
1200
1201 2014-11-08 Michael Albinus <michael.albinus@gmx.de>
1202
1203 * dired.c (Ffile_attributes): Return Qnil, if Fexpand_file_name
1204 raises an error. (Bug#18891)
1205
1206 2014-11-08 Martin Rudalics <rudalics@gmx.at>
1207
1208 * frame.c (adjust_frame_size): Call x_set_window_size only if
1209 f->can_x_set_window_size is set.
1210 (make_frame): Initialize f->can_x_set_window_size and
1211 f->can_run_window_configuration_change_hook.
1212 (Fcan_run_window_configuration_change_hook): New function.
1213 * frame.h (frame): Split `official' into `can_x_set_window_size'
1214 and `can_run_window_configuration_change_hook'.
1215 * nsfns.m (Fx_create_frame): Set f->can_x_set_window_size.
1216 * w32fns.c (Fx_create_frame, x_create_tip_frame):
1217 Set f->can_x_set_window_size.
1218 * window.c (run_window_configuration_change_hook):
1219 Return immediately if either f->can_x_set_window_size or
1220 f->can_run_window_configuration_change_hook are false.
1221 (Fset_window_configuration): Instead of f->official set
1222 f->can_x_set_window_size.
1223 * xfns.c (Fx_create_frame, x_create_tip_frame):
1224 Set f->can_x_set_window_size.
1225
1226 2014-11-08 Jan Djärv <jan.h.d@swipnet.se>
1227
1228 * nsterm.m (EmacsScroller.dealloc): Reinstate, removed at merge
1229 cleanup from 2014-11-01 (Bug#18972).
1230
1231 2014-11-07 Stefan Monnier <monnier@iro.umontreal.ca>
1232
1233 * keyboard.c: Call gui-set-selection instead of x-set-selection.
1234 * xdisp.c (window-scroll-functions): Improve docstring.
1235
1236 2014-11-07 Paul Eggert <eggert@cs.ucla.edu>
1237
1238 Uniquify the 'size' symbol.
1239 * frame.c (Qsize):
1240 * w32notify.c (Qsize): Remove.
1241 * lisp.h (Qsize): New decl.
1242 * lread.c (Qsize): Now extern.
1243 * w32notify.c (syms_of_w32notify): No need to defsym.
1244
1245 2014-11-07 Martin Rudalics <rudalics@gmx.at>
1246
1247 * dispnew.c (change_frame_size_1): Fix call of
1248 adjust_frame_size.
1249 * frame.c (Qsize, Qframe_position, Qframe_outer_size)
1250 (Qframe_inner_size, Qexternal_border_size, Qtitle_height)
1251 (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
1252 (Qtool_bar_size): New constants.
1253 (frame_inhibit_resize, adjust_frame_size): New argument to
1254 handle case where frame_inhibit_implied_resize is a list.
1255 (Fmake_terminal_frame, Fset_frame_height, Fset_frame_width)
1256 (Fset_frame_size, x_set_left_fringe, x_set_right_fringe)
1257 (x_set_right_divider_width, x_set_bottom_divider_width)
1258 (x_set_vertical_scroll_bars, x_set_horizontal_scroll_bars)
1259 (x_set_scroll_bar_width, x_set_scroll_bar_height):
1260 Update callers.
1261 (frame-inhibit-implied-resize): Rewrite doc-string.
1262 * frame.h (frame_inhibit_resize, adjust_frame_size):
1263 Fix external declarations.
1264 (Qframe_position, Qframe_outer_size)
1265 (Qframe_inner_size, Qexternal_border_size, Qtitle_height)
1266 (Qmenu_bar_external, Qmenu_bar_size, Qtool_bar_external)
1267 (Qtool_bar_size): Extern them.
1268 * gtkutil.c (FRAME_TOTAL_PIXEL_HEIGHT, FRAME_TOTAL_PIXEL_WIDTH)
1269 (xg_height_or_width_changed): Remove.
1270 (xg_frame_set_char_size): Adjust adjust_frame_size calls.
1271 (menubar_map_cb, xg_update_frame_menubar, free_frame_menubar)
1272 (tb_size_cb, update_frame_tool_bar, free_frame_tool_bar)
1273 (xg_change_toolbar_position): Call adjust_frame_size directly.
1274 * nsfns.m (x_set_internal_border_width, Fx_create_frame):
1275 Fix calls of adjust_frame_size.
1276 * w32fns.c (x_set_internal_border_width, x_set_menu_bar_lines)
1277 (Fx_create_frame, x_create_tip_frame): Adjust adjust_frame_size calls.
1278 (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
1279 frame can get resized when tool-bar-lines parameter changes from
1280 or to zero.
1281 (Fw32_frame_menu_bar_size): Return fourth value.
1282 (Fw32_frame_rect): Block input around system calls
1283 (Fx_frame_geometry): New function.
1284 * w32menu.c (set_frame_menubar): Adjust adjust_frame_size call.
1285 * w32term.c (x_new_font): Adjust adjust_frame_size call.
1286 * widget.c (EmacsFrameSetCharSize): Adjust frame_inhibit_resize call.
1287 * window.c (Fset_window_configuration): Adjust adjust_frame_size call.
1288 * xfns.c (x_set_menu_bar_lines, x_set_internal_border_width)
1289 (Fx_create_frame): Adjust adjust_frame_size calls.
1290 (x_set_tool_bar_lines, x_change_tool_bar_height): Make sure that
1291 frame can get resized when tool-bar-lines parameter changes from
1292 or to zero.
1293 (Fx_frame_geometry): New function.
1294 * xmenu.c (update_frame_menubar): On Lucid call
1295 adjust_frame_size with one pixel less height to avoid that
1296 repeatedly adding/removing the menu bar grows the frame.
1297 (free_frame_menubar): On Motif arrange to optionally preserve
1298 the old frame height when removing the menu bar.
1299 * xterm.c (x_new_font): Adjust adjust_frame_size call.
1300
1301 2014-11-03 Eli Zaretskii <eliz@gnu.org>
1302
1303 * xdisp.c (Fdump_glyph_matrix, Fdump_frame_glyph_matrix): Doc fix.
1304 (Fdump_frame_glyph_matrix): Don't segfault if invoked on a GUI
1305 frame; instead, print an error message.
1306
1307 2014-11-03 Jan Djärv <jan.h.d@swipnet.se>
1308
1309 * nsfns.m (ns_set_doc_edited): Check for FRAME_NS (Bug#18925).
1310
1311 2014-11-02 Jan Djärv <jan.h.d@swipnet.se>
1312
1313 * nsimage.m (allocInitFromFile:): Initialize bmRep.
1314 (dealloc): Release bmRep.
1315
1316 * nsterm.h (EmacsImage): Remove imageListNext, refCount, reference,
1317 imageListSetNext, imageListNext.
1318
1319 * nsimage.m (ImageList, imageListNext, imageListSetNext:)
1320 (reference): Remove.
1321 (allocInitFromFile:): Remove searching ImageList and calling
1322 reference (Bug#18918).
1323 (dealloc): Remove handling if ImageList.
1324
1325 2014-11-02 Andreas Schwab <schwab@linux-m68k.org>
1326
1327 * process.c (catch_child_signal): Fix incorrect assertion.
1328
1329 2014-11-01 Jan Djärv <jan.h.d@swipnet.se>
1330
1331 * macfont.m (macfont_draw):
1332 * nsterm.m (ns_mouse_position, judge): Clean up merge conflict.
1333
1334 * macfont.m (macfont_glyph_extents): Turn off synthetic bold
1335 if force_integral_p (i.e. no antialias).
1336 (macfont_draw): Check ns_antialias_text, also turn off synthetic
1337 bold if no antialias (Bug#18876).
1338
1339 * emacs.c (main): Don't chdir to $HOME on Cocoa if --chdir
1340 was given (Bug#18846).
1341
1342 * nsterm.h (ns_set_doc_edited): Declare taking no args.
1343
1344 * nsfns.m (ns_set_doc_edited): Do all logic (check frames) here
1345 instead of in xdisp.c, function now takes void. (Bug#18884).
1346
1347 * xdisp.c (prepare_menu_bars): Remove HAVE_NS code.
1348 (redisplay_internal): Call ns_set_doc_edited if HAVE_NS (Bug#18884).
1349
1350 * nsterm.h (EmacsScroller): Replace Lisp_Object win with
1351 struct window* (Bug#18889).
1352 Remove getMouseMotionPart.
1353 (ns_output): Make icon_top/left int.
1354
1355 * nsfns.m (x_icon): icon_top/left is int.
1356
1357 * nsterm.m (ns_mouse_position): Remove unused code.
1358 (initFrame:window:, dealloc): Use window instead of win.
1359 (getMouseMotionPart:window:x:y:): Remove, unused.
1360 (sendScrollEventAtLoc:fromEvent:): Make Lisp_Object win from window.
1361
1362 2014-11-01 Eli Zaretskii <eliz@gnu.org>
1363
1364 * keyboard.c (readable_events): When FLAGS include
1365 READABLE_EVENTS_FILTER_EVENTS, ignore BUFFER_SWITCH_EVENT events.
1366 This avoids returning non-nil from input-pending-p when only such
1367 events are in the queue. (Bug#18856)
1368
1369 2014-11-01 Jan Djärv <jan.h.d@swipnet.se>
1370
1371 * nsselect.m (QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME)
1372 (NXPrimaryPboard, NXSecondaryPboard): Declare static.
1373 (Qforeign_selection): Remove.
1374 (ns_get_local_selection): Identation fix.
1375 (syms_of_nsselect): Remove Qforeign_selection, ns-lost-selection-hooks
1376
1377 * nsselect.m (ns_get_local_selection): Remove calling of
1378 functions in Vselection_converter_alist (Bug#18911).
1379 (syms_of_nsselect): Remove Vselection_converter_alist.
1380
1381 2014-10-31 Dmitry Antipov <dmantipov@yandex.ru>
1382
1383 * font.c (copy_font_spec): Redesign to avoid Fcopy_alist
1384 and unnecessary initialization. Adjust comments.
1385
1386 2014-10-30 Eli Zaretskii <eliz@gnu.org>
1387
1388 * bidi.c (bidi_cache_reset_to): Invalidate bidi_cache_last_idx by
1389 setting it to -1.
1390 (bidi_find_bracket_pairs): Pass to bidi_cache_reset_to a relative
1391 index, not an absolute one, as that's what the function expects.
1392
1393 2014-10-30 Dmitry Antipov <dmantipov@yandex.ru>
1394
1395 * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to realize
1396 font on an initial frame when running as a daemon (Bug#18869).
1397
1398 * fontset.c (toplevel): Adjust comment to match 2014-06-19 change.
1399
1400 2014-10-30 Eli Zaretskii <eliz@gnu.org>
1401
1402 * fileio.c (Fexpand_file_name): Use make_unibyte_string, not
1403 build_string, when importing a home directory. (Bug#18873)
1404
1405 2014-12-27 Eli Zaretskii <eliz@gnu.org>
1406
1407 * dispnew.c (buffer_posn_from_coords):
1408 Use WINDOW_WANTS_HEADER_LINE_P, not WINDOW_WANTS_MODELINE_P, to
1409 account for the header-line height. (Bug#18839)
1410
1411 2014-10-28 Ulf Jasper <ulf.jasper@web.de>
1412
1413 * xml.c (parse_region): Do not forget the first document child.
1414
1415 2014-10-25 Jan Djärv <jan.h.d@swipnet.se>
1416
1417 * nsselect.m: pasteboard_changecount is new.
1418 (ns_store_pb_change_count, ns_get_pb_change_count)
1419 (ns_get_our_change_count_for): New functions.
1420 (ns_string_to_pasteboard_internal): Correct comment.
1421 type => gtype in eassert, Call ns_store_pb_change_count.
1422 (Fns_own_selection_internal): Remove data, use value (Bug#18799).
1423 (Fns_disown_selection_internal, Fns_selection_owner_p):
1424 Replace Vselection_alist check, with change count check.
1425 (Fns_get_selection): Initialize val to Qnil. Only get local
1426 selection if change counts match (Bug#18799).
1427 (nxatoms_of_nsselect): Initialize pasteboard_changecount.
1428
1429 2014-10-25 Noam Postavsky <npostavs@users.sourceforget.net>
1430
1431 * w32proc.c (create_child): If calling a quoted batch file,
1432 pass NULL for exe. (Bug#18745)
1433
1434 2014-10-24 Eli Zaretskii <eliz@gnu.org>
1435
1436 * bidi.c (bidi_resolve_explicit, bidi_find_bracket_pairs)
1437 (bidi_resolve_brackets): Use end of string position rather than ZV
1438 when iterating over a string. (Bug#18815)
1439
1440 2014-10-24 Martin Rudalics <rudalics@gmx.at>
1441
1442 * keyboard.c (make_lispy_position): Return coordinates also when
1443 on scroll bars, fringes, margins or not in a window.
1444 * xdisp.c (show_mouse_face): Don't change cursor face during
1445 mouse tracking.
1446
1447 2014-10-23 Martin Rudalics <rudalics@gmx.at>
1448
1449 * frame.c (Fset_frame_height, Fset_frame_width, Fset_frame_size)
1450 (frame_resize_pixelwise, frame_inhibit_implied_resize):
1451 Fix doc-strings (Bug#18789).
1452
1453 2014-10-23 Paul Eggert <eggert@cs.ucla.edu>
1454
1455 * Makefile.in (ACLOCAL_INPUTS): Omit unnecessary use of 'wildcard'.
1456
1457 2014-10-22 Eli Zaretskii <eliz@gnu.org>
1458
1459 Optimize redisplay of simple bracketed text.
1460 * bidi.c (bidi_cache_reset_to): New function.
1461 (bidi_cache_reset): Call it.
1462 (bidi_init_it, bidi_line_init): Initialize the bracket_pairing_pos
1463 member to -1.
1464 (bidi_resolve_explicit): Reset bracket_pairing_pos and
1465 bracket_enclosed_type only if bracket_pairing_pos's value is not
1466 ZV.
1467 (MAX_BPA_STACK): Make sure the value is signed.
1468 (PUSH_BPA_STACK): If the BPA stack overflows, don't bail out, but
1469 stop pushing values onto the stack.
1470 (bidi_find_bracket_pairs): If the bracketed text is only on the
1471 base embedding level, remove all the states cached by this
1472 function from the cache, and return zero, so that the brackets in
1473 this segment of text are processed as normal neutrals.
1474 (bidi_resolve_brackets): Detect the brackets that are to be
1475 processed as neutrals, and don't call bidi_find_bracket_pairs on
1476 them. (Bug#18778)
1477
1478 2014-10-21 Stefan Monnier <monnier@iro.umontreal.ca>
1479
1480 * w32select.c (Fw32_selection_exists_p): Rename from
1481 Fx_selection_exists_p.
1482 (syms_of_w32select): Adjust accordingly.
1483
1484 * w16select.c (Fw16_selection_exists_p): Rename from
1485 Fx_selection_exists_p.
1486 (syms_of_win16select): Adjust accordingly.
1487
1488 * nsselect.m (ns_get_local_selection): Signal error rather than `quit'.
1489 (Fns_own_selection_internal): Tighten scoping.
1490 (Fns_selection_exists_p): Rename from Fx_selection_exists_p.
1491 (Fns_get_selection): Rename from Fx_get_selection_internal.
1492 (Fns_get_selection_internal, Fns_store_selection_internal):
1493 Remove functions.
1494 (syms_of_nsselect): Adjust accordingly.
1495
1496 2014-10-21 Martin Rudalics <rudalics@gmx.at>
1497
1498 * w32fns.c (Fw32_frame_menu_bar_size): New function.
1499 * w32term.c (x_set_window_size): Account for wrapped menu bar
1500 lines when setting up frame height (Bug#15174 and Bug#18720).
1501 (w32_add_wrapped_menu_bar_lines): New variable.
1502
1503 2014-10-21 Stefan Monnier <monnier@iro.umontreal.ca>
1504
1505 * xdisp.c (redisplay_window): Re-run pre-redisplay-function after we
1506 move point.
1507
1508 2014-10-20 Glenn Morris <rgm@gnu.org>
1509
1510 * Merge in all changes up to 24.4 release.
1511
1512 2014-10-19 Jan Djärv <jan.h.d@swipnet.se>
1513
1514 * gtkutil.c (xg_update_menubar, xg_update_menu_item): Only call
1515 g_object_notify for label if Gtk+ >= 2.16 (Bug#16522).
1516
1517 * xterm.h (x_output): Remove net_wm_state_hidden_seen.
1518
1519 * xterm.c (handle_one_xevent): Check return value from
1520 x_handle_net_wm_state, remove net_wm_state_hidden_seen (Bug#18722).
1521 (get_current_wm_state): Remove net_wm_state_hidden_seen setting.
1522
1523 * gtkutil.c (create_dialog): Don't use gtk_dialog_get_action_area on
1524 Gt+ >= 3.12, or gtk_misc_set_alignment on Gtk+ >= 3.14 (Bug#18674).
1525 (make_widget_for_menu_item): Don't use gtk_misc_set_alignment on
1526 Gtk+ >= 3.14 (Bug#18674).
1527 (update_frame_tool_bar): Don't use gtk_misc_set_padding on
1528 Gtk+ >= 3.14 (Bug#18674).
1529
1530 2014-10-18 Paul Eggert <eggert@cs.ucla.edu>
1531
1532 * gtkutil.c: Remove no-longer-used code.
1533 (xg_update_menubar): Remove unused local and unnecessary call to
1534 gtk_menu_item_get_submenu.
1535 (XG_TOOL_BAR_PROXY_BUTTON, xg_tool_bar_proxy_callback)
1536 (xg_get_tool_bar_widgets, xg_tool_bar_proxy_help_callback)
1537 (TOOLBAR_TOP_WIDGET): Remove; no longer used.
1538
1539 2014-10-18 Jan Djärv <jan.h.d@swipnet.se>
1540
1541 * xfns.c (syms_of_xfns): Remove x-gtk-whole-detached-tool-bar.
1542
1543 * xterm.h (handlebox_widget): Remove.
1544
1545 * xmenu.c (set_frame_menubar): Remove GTK block that calls
1546 xg_have_tear_offs.
1547
1548 * gtkutil.h (xg_have_tear_offs): Remove declaration.
1549
1550 * gtkutil.c (XG_TEXT_CANCEL, XG_TEXT_OPEN, XG_TEXT_OK): New defines
1551 to handle Gtk versions.
1552 (xg_get_file_with_chooser): Use them.
1553 (xg_have_tear_offs, tearoff_remove, tearoff_activate):
1554 Remove (create_menus): Remove teroff argument and code.
1555 Remove call to gtk_menu_set_title.
1556 (xg_update_menubar, xg_update_submenu): Remove tearoff code.
1557 Adjust args to create_menus.
1558 (xg_tool_bar_menu_proxy, xg_tool_bar_detach_callback)
1559 (xg_tool_bar_attach_callback, TOOLBAR_TOP_WIDGET): Remove.
1560 (xg_pack_tool_bar): Replace TOOLBAR_TOP_WIDGET, remove detach code.
1561 (xg_make_tool_item): Remove detach code.
1562 (xg_update_tool_bar_sizes): Replace TOOLBAR_TOP_WIDGET.
1563 (find_icon_from_name): New function.
1564 (update_frame_tool_bar): Remove GtkStockItem code, move to
1565 find_icon_from_name. Let stock be a list of icon names to try.
1566 Only use gtk_image_new_from_stock on Gtk+ < 3.10.
1567 Replace TOOLBAR_TOP_WIDGET.
1568 (free_frame_tool_bar, xg_change_toolbar_position ):
1569 Replace TOOLBAR_TOP_WIDGET.
1570 (xg_initialize): Remove tearoff code.
1571
1572 2014-10-18 Eli Zaretskii <eliz@gnu.org>
1573
1574 * xterm.c (x_draw_bar_cursor, x_draw_hollow_cursor): Subtract 1
1575 pixel from the window's cursor glyph width, since X renders hollow
1576 blocks 1 pixel wider than the 'width' parameter.
1577
1578 * xdisp.c (get_phys_cursor_geometry): Don't subtract 1 pixel from
1579 glyph->pixel_width; this is now done in xterm.c.
1580
1581 Fix reordering of bracket characters in isolates.
1582 * bidi.c (bidi_cache_find): Rename the argument NEUTRALS_OK to
1583 RESOLVED_ONLY; when non-zero, return from the cache only fully
1584 resolved states. All callers changed.
1585 (CANONICAL_EQU): New macro.
1586 (PUSH_BPA_STACK): Use it to push onto the BPA stack the canonical
1587 equivalent of the paired closing bracket character.
1588 (bidi_find_bracket_pairs): Set the bracket_pairing_pos member to
1589 the default non-negative value, to be checked later in
1590 bidi_resolve_brackets. Use CANONICAL_EQU to test candidate
1591 characters against those pushed onto the BPA stack.
1592 (bidi_record_type_for_neutral): New function.
1593 (bidi_resolve_brackets): Record next_for_neutral and
1594 prev_for_neutral when embedding level gets pushed. Force
1595 resolution of bracket pairs when entering a level run that was not
1596 yet BPA-resolved.
1597 (bidi_resolve_neutral): Add assertions before calling
1598 bidi_resolve_neutral_1.
1599 (bidi_level_of_next_char): Remove the code that attempted to
1600 resolve unresolved neutrals; that is now done by
1601 bidi_resolve_neutral.
1602
1603 * w32select.c (owner_callback): Mark with ALIGN_STACK attribute.
1604
1605 2014-10-17 Eli Zaretskii <eliz@gnu.org>
1606
1607 * xterm.c (x_draw_hollow_cursor): Fix display of hollow cursor on
1608 1-pixel R2L characters.
1609 Reported by Dmitry Antipov <dmantipov@yandex.ru>, see
1610 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00518.html.
1611
1612 2014-10-16 Eli Zaretskii <eliz@gnu.org>
1613
1614 * bidi.c (bidi_find_bracket_pairs): Avoid a loop that does nothing
1615 useful.
1616
1617 2014-10-15 Paul Eggert <eggert@cs.ucla.edu>
1618
1619 * bidi.c (bidi_find_bracket_pairs): Initialize local var.
1620 This pacifies GCC 4.9.1 with --enable-gcc-warnings.
1621 It's not clear to me whether the initialization is needed,
1622 but it can't hurt so I played it safe.
1623
1624 2014-10-15 Stefan Monnier <monnier@iro.umontreal.ca>
1625
1626 * lisp.mk (lisp): Add emacs-lisp/eldoc.elc.
1627
1628 2014-10-15 Eli Zaretskii <eliz@gnu.org>
1629
1630 Update the bidirectional reordering engine for Unicode 6.3 and 7.0.
1631 * bidi.c (bidi_ignore_explicit_marks_for_paragraph_level):
1632 Remove variable.
1633 (bidi_get_type): Return the isolate initiators and terminator types.
1634 (bidi_isolate_fmt_char, bidi_paired_bracket_type)
1635 (bidi_fetch_char_skip_isolates, find_first_strong_char)
1636 (bidi_find_bracket_pairs, bidi_resolve_brackets): New functions.
1637 (bidi_set_sos_type): Rename from bidi_set_sor_type and updated
1638 for the new features.
1639 (bidi_push_embedding_level, bidi_pop_embedding_level): Update to
1640 push and pop correctly for isolates.
1641 (bidi_remember_char): Modify to accept an additional argument
1642 and record the bidi type according to its value.
1643 (bidi_cache_iterator_state): Accept an additional argument to only
1644 update an existing state. Handle the new members of struct bidi_it.
1645 (bidi_cache_find): Arguments changed: no longer accepts a level,
1646 instead accepts a flag telling it whether it is okay to return
1647 unresolved neutrals.
1648 (bidi_initialize): Initiate and staticpro the bracket-type uniprop
1649 table. Initialize new isolate-related members.
1650 (bidi_paragraph_init): Some code factored out into
1651 find_first_strong_char.
1652 (bidi_resolve_explicit_1): Function deleted, its code incorporated
1653 into bidi_resolve_explicit.
1654 (bidi_resolve_explicit): Support the isolate initiators and
1655 terminator. Fix handling of embeddings and overrides according to
1656 new UBA requirements. Record information about previously seen
1657 characters here (moved from bidi_level_of_next_char).
1658 (bidi_resolve_weak): Adapt to changes in struct members.
1659 (FLAG_EMBEDDING_INSIDE, FLAG_OPPOSITE_INSIDE, MAX_BPA_STACK)
1660 (STORE_BRACKET_CHARPOS, PUSH_BPA_STACK): New macros.
1661 (bidi_resolve_neutral): Call bidi_resolve_brackets to handle the
1662 paired bracket resolution. Handle isolate initiators and
1663 terminator.
1664 (bidi_type_of_next_char): Remove unneeded code for BN limit.
1665 (bidi_level_of_next_char): Move the code that records information
1666 about previous characters to bidi_resolve_explicit. Fix logic of
1667 resolving neutrals and make sure their cache entries are updated.
1668 Remove now unneeded special handling of PDF level.
1669
1670 * dispextern.h (struct glyph): Enlarge the width of resolved_level.
1671 (BIDI_MAXDEPTH): New macro, renamed from BIDI_MAXLEVEL and
1672 enlarged per Unicode 6.3.
1673 (enum bidi_bracket_type_t): New data type.
1674 (struct bidi_saved_info): Leave only 2 type members out of 4.
1675 Remove bytepos.
1676 (struct bidi_stack): Add members necessary to support isolating
1677 sequences.
1678 (struct bidi_it): Add new members necessary to support isolating
1679 sequences and bracket pair resolution.
1680
1681 * xdisp.c (Fbidi_resolved_levels): New function.
1682 (syms_of_xdisp): Defsubr it.
1683 (append_glyph, append_composite_glyph, produce_image_glyph)
1684 (append_stretch_glyph, append_glyphless_glyph): Convert aborts to
1685 assertions.
1686 (syms_of_xdisp) <inhibit-bidi-mirroring>: New variable.
1687
1688 * term.c (append_glyph, append_composite_glyph)
1689 (append_glyphless_glyph): Convert aborts to assertions.
1690
1691 * .gdbinit (pgx): Display the character codepoint, resolved level,
1692 and bidi type also for glyphless glyphs.
1693
1694 2014-10-15 Dmitry Antipov <dmantipov@yandex.ru>
1695
1696 Avoid unwanted point motion in Fline_beginning_position.
1697 * lisp.h (scan_newline_from_point): Add prototype.
1698 * search.c (scan_newline_from_point): New function, refactored from...
1699 * cmds.c (Fforward_line): ...adjusted user.
1700 * editfns.c (Fline_beginning_position): Use scan_newline_from_point
1701 and simplify the former since the latter doesn't move point.
1702
1703 2014-10-14 Dmitry Antipov <dmantipov@yandex.ru>
1704
1705 Cleanup terminal handling code.
1706 * dispextern.h (get_named_tty): Remove prototype but...
1707 * termhooks.h (get_named_terminal): ...resurrect it under
1708 more meaningful name.
1709 (get_terminal): Likewise, but with...
1710 (decode_live_terminal): ...this name.
1711 (decode_tty_terminal): Add prototype.
1712 * term.c (get_tty_terminal): Remove.
1713 (get_named_tty): Remove.
1714 (Ftty_display_color_p, Ftty_display_color_cells, Ftty_type)
1715 (Fcontrolling_tty_p, Fsuspend_tty, Fresume_tty):
1716 Use decode_tty_terminal.
1717 (Ftty_no_underline, Ftty_top_frame): Use decode_live_terminal.
1718 * terminal.c (get_terminal): Refactor to...
1719 (decode_terminal, decode_live_terminal): ...new functions.
1720 (decode_tty_terminal): Replacement for get_tty_terminal.
1721 (get_named_terminal): Likewise for get_named_tty.
1722 * coding.c (Fset_terminal_coding_system_internal)
1723 (Fterminal_coding_system, Fset_keyboard_coding_system_internal):
1724 (Fkeyboard_coding_system):
1725 * composite.c (Fcomposition_get_gstring):
1726 * dispnew.c (Fsend_string_to_terminal):
1727 * frame.c (Fmake_terminal_frame):
1728 * nsfns.m (check_ns_display_info):
1729 * w32fns.c, xfns.c (check_x_display_info):
1730 * xselect.c (frame_for_x_selection): Use decode_live_terminal.
1731 * keyboard.c (handle_interrupt_signal, handle_interrupt)
1732 (Fset_quit_char): Use get_named_terminal.
1733 (Fset_output_flow_control, Fset_input_meta_mode):
1734 Use decode_tty_terminal.
1735
1736 2014-10-13 Eli Zaretskii <eliz@gnu.org>
1737
1738 * w32term.h (ALIGN_STACK): Use _WIN64, not _W64, to distinguish
1739 between 32-bit and 64-bit MinGW builds. (Bug#18699)
1740
1741 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
1742
1743 Fix port to Debian GNU/kFreeBSD 7 (wheezy) (Bug#18666).
1744 * process.c (accept4) [!HAVE_ACCEPT4]: New macro.
1745
1746 2014-10-12 Stefan Monnier <monnier@iro.umontreal.ca>
1747
1748 * frame.c (Fmouse_pixel_position): Call Vmouse_position_function
1749 (bug#18638).
1750
1751 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
1752
1753 * editfns.c (dump_tz_string): No longer const.
1754 It might be modified.
1755
1756 * nsmenu.m (clear): Assume OS X 10.6 or later.
1757
1758 2014-10-12 Jan Djärv <jan.h.d@swipnet.se>
1759
1760 * unexmacosx.c: Remove include ppc/reloc.h.
1761 (unrelocate, copy_dysymtab): Remove PPC code.
1762 (rebase_reloc_address): Remove, only used for PPC:
1763
1764 * nsterm.m: Always include macfont.h on COCOA.
1765 (ns_update_auto_hide_menu_bar, ns_draw_fringe_bitmap)
1766 (ns_dumpglyphs_image, ns_check_menu_open)
1767 (applicationDidFinishLaunching)
1768 (antialiasThresholdDidChange:)
1769 (keyDown:, toggleFullScreen:, setPosition:portion:whole:):
1770 Remove checks for OSX <= 10.5/10.6.
1771 (changeFont:): Use macfont on COCOA, nsfont on GNUSTEP.
1772 (syms_of_nsterm): Call syms_of_macfont on COCOA, syms_of_nsfont on
1773 GNUSTEP.
1774
1775 * nsterm.h (MAC_OS_X_VERSION_10_4, MAC_OS_X_VERSION_10_5): Remove.
1776 (NS_HAVE_NSINTEGER): Remove block.
1777 Remove >= OSX 10.6 tests.
1778
1779 * nsmenu.m (NSMenuDidBeginTrackingNotification): Remove.
1780 (x_activate_menubar, trackingNotification:): Remove check for
1781 OSX >= 10.5.
1782 (menuNeedsUpdate:): Remove check for OSX < 10.5.
1783
1784 * nsimage.m (allocInitFromFile:): Remove code for OSX < 10.6.
1785
1786 * nsfns.m: Always include macfont.h on COCOA.
1787 (ns_filename_from_panel, ns_directory_from_panel)
1788 (Fx_create_frame, Fns_popup_font_panel, ns_run_file_dialog)
1789 (Fns_read_file_name, Fns_list_services): Remove code for OSX < 10.6
1790
1791 * macfont.m: Remove >= 1050 check.
1792 (macfont_create_family_with_symbol)
1793 (macfont_get_glyph_for_character)
1794 (mac_font_get_glyphs_for_variants)
1795 (mac_ctfont_create_available_families, syms_of_macfont):
1796 Remove code for OSX < 10.6.
1797 (mac_font_family_group, mac_font_family_compare): Remove, only used
1798 for OSX < 10.6.
1799
1800 * macfont.h (MAC_FONT_FORMAT_ATTRIBUTE, MAC_FONT_FORMAT_BITMAP)
1801 (mac_font_copy_non_synthetic_table): Remove versions for OSX < 10.6
1802
1803 * Makefile.in: Replace nsfont.o macfont.o with ns_fontfile in
1804 comment.
1805
1806 2014-10-12 Paul Eggert <eggert@cs.ucla.edu>
1807
1808 Fix putenv race conditions with undefined behavior (Bug#8705).
1809 Do all putenv calls before Emacs creates any threads.
1810 Use a safer way to modify the TZ environment variable in the
1811 presence of multiple threads. For further thread-safety,
1812 prefer localtime_r and gmtime_r to localtime and gmtime,
1813 and prefer struct tm's tm_gmtoff (if available) to calling
1814 both localtime_r and gmtime_r.
1815 * dbusbind.c (Fdbus__init_bus): Move xputenv call from here ...
1816 (init_dbusbind): ... to this new function.
1817 * emacs.c (main) [HAVE_DBUS]: Call it before creating threads.
1818 * xterm.c (x_term_init): Move xputenv call from here ...
1819 (init_xterm): ... to this new function.
1820 * emacs.c (main) [USE_GTK]: Call it before creating threads.
1821 * editfns.c (HAVE_TM_GMTOFF): Default to false.
1822 (dump_tz_string): New constant.
1823 (init_editfns): Use it. This centralizes the dump_tz stuff.
1824 Call set_time_zone_rule here, so that its xputenv is done
1825 before Emacs goes multithreaded.
1826 (mktime_z) [!HAVE_TZALLOC]: New function, which is typically
1827 thread-safe enough for Emacs.
1828 (format_time_string, Fdecode_time, Fcurrent_time_string)
1829 (Fcurrent_time_zone):
1830 Prefer localtime_r and gmtime_r, which are more thread-safe, to
1831 localtime and gmtime. Remove now-unnecessary calls to block_input.
1832 (tm_gmtoff): New static function.
1833 (Fdecode_time, Fcurrent_time_zone): Use it.
1834 (Fencode_time): Use mktime_z, for better thread-safety.
1835 (set_time_zone_rule): Now static. Rewrite to be mostly thread-safe,
1836 i.e., not quite thread-safe but good enough for Emacs typical usage.
1837 Do not reclaim storage that is in the environment; let it leak.
1838 Always call tzset, since localtime_r does not.
1839 * emacs.c (dump_tz, Fdump_emacs) [HAVE_TZSET]: Remove dump_tz stuff.
1840 This is now done in init_editfns.
1841 * systime.h (mktime_z, timezone_t, tzalloc, tzfree) [!HAVE_TZALLOC]:
1842 New macros and declarations, for platforms lacking tzalloc & friends.
1843
1844 2014-10-09 Paul Eggert <eggert@cs.ucla.edu>
1845
1846 * lisp.h (USE_STACK_STRING): Now true only if USE_STACK CONS.
1847 On x86 platforms this works around GCC bug 63495
1848 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63495>,
1849 and more generally should fix a portability problem in Emacs.
1850 Reported by Stefan Monnier in:
1851 http://lists.gnu.org/archive/html/emacs-devel/2014-10/msg00261.html
1852
1853 2014-10-08 Leo Liu <sdl.web@gmail.com>
1854
1855 Enhance terpri to allow conditionally output a newline. (Bug#18652)
1856 * keymap.c (describe_vector_princ):
1857 * keyboard.c (Fcommand_error_default_function): Adapt to change to
1858 Fterpri.
1859
1860 * print.c (printchar_stdout_last): Declare.
1861 (printchar): Record the last char written to stdout.
1862 (Fterpri): Add optional argument ENSURE.
1863
1864 2014-10-08 Eli Zaretskii <eliz@gnu.org>
1865
1866 * w32inevt.c (maybe_generate_resize_event): Pass non-zero as the
1867 DELAY argument to change_frame_size, so that the frame size
1868 changes, if any are needed, are delayed until the next redisplay.
1869 This is to avoid a too early QUIT inside change_frame_size, when
1870 it calls Lisp in frame_windows_min_size, in case one of the events
1871 we've read sets the quit-flag. (Bug#18649)
1872
1873 * w32fns.c (check_x_display_info): Accept terminal objects as
1874 argument, to follow what xfns.c does.
1875
1876 2014-10-07 Glenn Morris <rgm@gnu.org>
1877
1878 * Makefile.in ($(srcdir)/macuvs.h)
1879 ($(lispsource)/international/charprop.el): Add explicit FORCE.
1880
1881 2014-10-07 Eli Zaretskii <eliz@gnu.org>
1882
1883 * decompress.c (init_zlib_functions): Move the message about zlib
1884 being unavailable from here...
1885 (Fzlib_decompress_region): ...to here. (Bug#18650)
1886
1887 2014-10-07 Dmitry Antipov <dmantipov@yandex.ru>
1888
1889 * font.c (Ffont_get_glyphs): Use validate_subarray and fix
1890 the case where an optional string is used. Adjust docstring.
1891
1892 2014-10-06 Stefan Monnier <monnier@iro.umontreal.ca>
1893
1894 * lisp.mk (lisp): Remove w32-common-fns.elc.
1895
1896 2014-10-05 Paul Eggert <eggert@cs.ucla.edu>
1897
1898 * keyboard.c (Qleft, Qright): Remove duplicate definitions (Bug#9927).
1899 These were already defined in buffer.c, and the duplicate
1900 definitions cause problems on platforms like 'gcc -fno-common'.
1901 Reported by Peter Dyballa in: http://bugs.gnu.org/9927#137
1902
1903 2014-10-05 Jan Djärv <jan.h.d@swipnet.se>
1904
1905 * nsterm.m (updateFrameSize:): Only call update_frame_tool_bar
1906 if toolbar is visible.
1907
1908 * nsfont.m (nsfont_draw): Use CGFloat for GNUstep newer than
1909 0.23 (Bug#18030).
1910
1911 * nsterm.m (syms_of_nsterm): ns-use-fullscreen-animation is new.
1912 (toggleFullScreen:): Use ns-use-fullscreen-animation for animate.
1913 (ns_select, ns_read_socket): Use unwind_protect to decrease
1914 apploopnr (Bug#18345).
1915 (ns_draw_window_cursor): Adjust y for hbar cursor only if smaller than
1916 line height (Bug#17977).
1917
1918 * macfont.m: Fix indentation and import changes from macport 24.3.94.
1919 (macfont_closest_traits_index): New function.
1920 (macfont_closest_traits_index_p): Rename from
1921 macfont_closest_traits_index.
1922 (macfont_list): Use macfont_closest_traits_index_p.
1923
1924 2014-10-05 K. Handa <handa@gnu.org>
1925
1926 * coding.c (detect_coding_iso_2022): Set coding->rejected
1927 correctly when an invalid escape sequence is found (Bug#18610).
1928
1929 2014-10-04 Jan Djärv <jan.h.d@swipnet.se>
1930
1931 * gtkutil.c (create_menus): Only add tearoffs to empty menus.
1932 (xg_update_submenu): Remove has_tearoff_p, pass 1 to create_menus
1933 for add_tearoff_p.
1934
1935 2014-10-04 Martin Rudalics <rudalics@gmx.at>
1936
1937 * buffer.c (scroll_bar_width, scroll_bar_height):
1938 Fix doc-strings.
1939 * window.c (Fset_window_scroll_bars): Fix doc-string.
1940 (Fwindow_scroll_bars): Have it return what the doc-string says.
1941
1942 2014-10-03 Eli Zaretskii <eliz@gnu.org>
1943
1944 * xdisp.c (move_it_by_lines): Call reseat_1 after moving the
1945 iterator backwards, to resync the bidi iterator. (Bug#18584)
1946
1947 2014-10-03 Dmitry Antipov <dmantipov@yandex.ru>
1948
1949 Consistently use min and max macros from lisp.h.
1950 * coding.c (min, max):
1951 * font.c (MAX):
1952 * unexhp9k800.c (min):
1953 * unexw32.c (min, max): Use definitions from lisp.h.
1954 * regex.c (MAX, MIN) [!emacs]: Define own max and min as such.
1955 Adjust users.
1956 * gmalloc.c (min): Tiny style change.
1957
1958 * fileio.c (emacs_readlinkat, Finsert_file_contents):
1959 * w32fns.c, xfns.c (x_create_tip_frame): Use AUTO_STRING.
1960
1961 2014-10-03 Paul Eggert <eggert@cs.ucla.edu>
1962
1963 Fix x-focus-frame bug with "Not an in-range integer" (Bug#18586).
1964 * xselect.c (X_SHRT_MAX, X_SHRT_MIN, X_LONG_MAX, X_LONG_MIN)
1965 (X_ULONG_MAX): Move these macros to xterm.h.
1966 (x_fill_property_data): Be more generous about allowing either
1967 signed or unsigned data of the appropriate width.
1968 * xterm.h (x_display_set_last_user_time): New function.
1969 All setters of last_user_time changd to use this function.
1970 If ENABLE_CHECKING, check that the times are in range.
1971
1972 2014-10-02 Eli Zaretskii <eliz@gnu.org>
1973
1974 * dispnew.c (adjust_decode_mode_spec_buffer): Use 'int' instead of
1975 'ssize_t'. Suggested by Paul Eggert <eggert@cs.ucla.edu>.
1976
1977 2014-10-02 Jan Djärv <jan.h.d@swipnet.se>
1978
1979 * xfaces.c (Finternal_set_lisp_face_attribute): Don't try to
1980 make a font_object from a tty frame (Bug#18573).
1981 (Finternal_set_lisp_face_attribute): Add FIXME comment.
1982
1983 2014-10-02 Dmitry Antipov <dmantipov@yandex.ru>
1984
1985 * alloc.c (mark_overlay): Assume that overlay boundaries are
1986 always markers. Add comment.
1987 * lread.c (read_internal_start): Use convenient validate_subarray.
1988 Adjust docstring.
1989 (Fread_from_string): Adjust docstring.
1990
1991 2014-10-02 Stefan Monnier <monnier@iro.umontreal.ca>
1992
1993 * lisp.h: Fix up compilation for USE_STACK_LISP_OBJECTS=false.
1994
1995 * nsselect.m (ns-own-selection-internal, ns-disown-selection-internal):
1996 Rename from the "x-" prefix.
1997
1998 2014-10-01 Stefan Monnier <monnier@iro.umontreal.ca>
1999
2000 * xselect.c (selection-converter-alist): Fix docstring.
2001
2002 2014-10-01 Eli Zaretskii <eliz@gnu.org>
2003
2004 * w32proc.c (sys_spawnve): Avoid modification of the CMDNAME
2005 argument passed by the caller, when we mirror all slashes into
2006 backslashes.
2007
2008 2014-10-01 Dmitry Antipov <dmantipov@yandex.ru>
2009
2010 * gtkutil.c (xg_set_toolkit_horizontal_scroll_bar_thumb):
2011 Resurrect old code and fix compilation with GTK < 2.13.6.
2012
2013 2014-10-01 Paul Eggert <eggert@cs.ucla.edu>
2014
2015 Use AUTO_CONS instead of SCOPED_CONS, etc.
2016 * frame.h (AUTO_FRAME_ARG): Rename from FRAME_PARAMETER.
2017 * lisp.h (AUTO_CONS): Rename from scoped_cons.
2018 (AUTO_LIST1): Rename from scoped_list1.
2019 (AUTO_LIST2): Rename from scoped_list2.
2020 (AUTO_LIST3): Rename from scoped_list3.
2021 (AUTO_LIST4): Rename from scoped_list4.
2022 (AUTO_STRING): Rename from SCOPED_STRING.
2023 * frame.h (AUTO_FRAME_ARG):
2024 * lisp.h (AUTO_CONS, AUTO_LIST1, AUTO_LIST2, AUTO_LIST3)
2025 (AUTO_LIST4, AUTO_STRING):
2026 Prepend a new argument 'name'.
2027 Declare a variable instead of yielding a value.
2028 All uses changed.
2029 * lisp.h (STACK_CONS, AUTO_CONS_EXPR): New internal macros.
2030
2031 2014-09-30 Eli Zaretskii <eliz@gnu.org>
2032
2033 * w32fns.c (w32_createwindow): Accept an additional argument, an
2034 array of 2 values specifying the coordinates of the frame's
2035 top-left corner. Use these values instead of calling x_get_arg,
2036 which can cons Lisp objects, and therefore cannot be called except
2037 from the main thread. Remove redundant tests for the default
2038 values.
2039 (my_create_window): Move the calculation of the coordinates of the
2040 frame's top-left edge here. Pass them to the input thread via the
2041 second parameter of the WM_EMACS_CREATEWINDOW message.
2042 See http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00892.html
2043 for the details.
2044
2045 2014-09-30 Eli Zaretskii <eliz@gnu.org>
2046
2047 * xdisp.c (cursor_row_fully_visible_p): Update commentary.
2048 (redisplay_window): Treat the frame's frozen_window_starts flag
2049 the same way as the optional_new_start flag for the window: only
2050 obey it if the glyph row showing point will be fully visible.
2051 Likewise when the window start is in a continuation line. If,
2052 after trying everything under the 'force_start' label, point is
2053 still not fully visible, give up and scroll the window.
2054 Add debugging traces. (Bug#18545)
2055
2056 * window.c (Frecenter): Set the window's redisplay flag.
2057
2058 2014-09-30 Eli Zaretskii <eliz@gnu.org>
2059
2060 * w32term.c (w32_read_socket): Don't use frame dimensions for
2061 resizing if GetClientRect returned an empty (0, 0, 0, 0)
2062 rectangle. Check the return value of GetClientRect, and don't use
2063 the results if it didn't succeed.
2064
2065 * dispnew.c (change_frame_size_1): Recompute the frame dimensions
2066 in columns and lines after correcting the pixel dimensions in
2067 check_frame_size.
2068 (adjust_decode_mode_spec_buffer): Add assertion to avoid passing
2069 negative values to xrealloc. (Bug#18528)
2070
2071 2014-09-30 Paul Eggert <eggert@cs.ucla.edu>
2072
2073 * alloc.c: Remove now-unnecessary check.
2074 Suggested by Dmitry Antipov in:
2075 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00891.html
2076
2077 * xterm.c (x_term_init): Allocate temps on stack, not on heap.
2078
2079 * frame.c (x_set_frame_parameters): Port --enable-gcc-warnings
2080 to Ubuntu 14.04.1 x86-64.
2081
2082 Simplify stack-allocated Lisp objects, and make them more portable.
2083 The build_local_string macro was used in two ways: (1) string
2084 literals for which scoped allocation suffices, and (2) file name
2085 components, where it's not safe in general to assume bounded-size
2086 ASCII data. Simplify by defining a new macro SCOPED_STRING that
2087 allocates a block-scope string, and by using SCOPED_STRING for (1)
2088 and build_string for (2). Furthermore, actually use stack
2089 allocation only for objects known to have sufficient alignment.
2090 This simpler implementation means Emacs can make
2091 USE_STACK_LISP_OBJECTS the default unless GC_MARK_STACK !=
2092 GC_MAKE_GCPROS_NOOPS.
2093 * lisp.h (GCALIGNED): Align even if !USE_STACK_LISP_OBJECTS,
2094 for fewer differences among implementations.
2095 (struct Lisp_String): Now GCALIGNED.
2096 (USE_STACK_LISP_OBJECTS): Default to true, since the
2097 implementation no longer insists on a nonempty GCALIGNED.
2098 But make it false if GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS.
2099 (SCOPED_CONS_INITIALIZER): Remove, since it's no longer needed
2100 separately. Move definiens to scoped_cons. The old definition
2101 was incorrect when GCALIGNED was defined to be empty.
2102 (union Aligned_String): New type.
2103 (USE_STACK_CONS, USE_STACK_STRING): New constants, so that the
2104 implementation ports to compilers that don't align strictly enough.
2105 Don't worry about the union sizes; it's not worth bothering about.
2106 (scoped_cons, scoped_list1, scoped_list3, scoped_list4):
2107 Rewrite using USE_STACK_CONS.
2108 (scoped_cons): Assume the use of union Aligned_Cons.
2109 (lisp_string_size, make_local_string, build_local_string): Remove.
2110 Unless otherwise specified, all callers of build_local_string
2111 changed to use SCOPED_STRING.
2112 (SCOPED_STRING): New macro.
2113 * data.c (wrong_choice):
2114 * menu.c (single_menu_item):
2115 * process.c (Fformat_network_address):
2116 Hoist use of SCOPED_STRING out of a scope, so that its returned
2117 object lives long enough.
2118 * fileio.c (Fexpand_file_name): Use build_string, not SCOPED_STRING,
2119 as the string might be long or might not be ASCII.
2120
2121 2014-09-29 Eli Zaretskii <eliz@gnu.org>
2122
2123 * msdos.c (internal_terminal_init): Bump version to 25.
2124
2125 2014-09-29 Dmitry Antipov <dmantipov@yandex.ru>
2126
2127 Keep stack-allocated Lisp objects fast rather than versatile.
2128 * lisp.h (union Aligned_Cons) [!GCALIGNED]: Define as such.
2129 (SCOPED_CONS_INITIALIZER): New macro.
2130 (scoped_cons) [USE_STACK_LISP_OBJECTS]: Use it.
2131 (USE_LOCAL_ALLOCA): Remove.
2132 (local_cons, local_list1, local_list2, local_list3, local_list4):
2133 Remove. Stack overflow checking makes them too slow.
2134 (make_local_vector): Likewise. Also we just don't have enough
2135 users for it.
2136 (enum LISP_STRING_OVERHEAD): Remove.
2137 (local_string_init, local_vector_init): Remove prototypes.
2138 (make_local_string, build_local_string): Redesign to target short
2139 compile-time string constants, fall back to regular string allocation
2140 where appropriate.
2141 (lisp_string_size): New function.
2142 (verify_ascii) [ENABLE_CHECKING]: Add prototype.
2143 * alloc.c (local_string_init, local_vector_init): Remove.
2144 (verify_ascii) [ENABLE_CHECKING]: New function.
2145 * buffer.c, charset.c, chartab.c, data.c, editfns.c, emacs.c, fileio.c:
2146 * fns.c, font.c, fontset.c, frame.c, keyboard.c, keymap.c, lread.c:
2147 * menu.c, minibuf.c, process.c, textprop.c, xdisp.c, xfns.c, xfont.c:
2148 * xselect.c, xterm.c: All related users changed.
2149
2150 2014-09-28 Ken Brown <kbrown@cornell.edu>
2151
2152 * sheap.c (bss_sbrk_buffer_beg): Remove redundant variable.
2153 * gmalloc.c [CYGWIN]: Adapt to change in sheap.c.
2154
2155 2014-09-27 Ken Brown <kbrown@cornell.edu>
2156
2157 Fix implementation of HYBRID_MALLOC on Cygwin.
2158 * sheap.c (bss_sbrk_buffer_end): Cast to void *.
2159 (bss_sbrk_buffer_beg): New variable. Use it...
2160 * gmalloc.c (ALLOCATED_BEFORE_DUMPING) [CYGWIN]: ...here, to fix
2161 incorrect definition.
2162
2163 2014-09-27 Stefan Monnier <monnier@iro.umontreal.ca>
2164
2165 * keyboard.c (track-mouse): Rename to internal--track-mouse.
2166 Make it into a function and change arg to be a function.
2167
2168 * lisp.mk (lisp): Add elisp-mode.elc.
2169
2170 2014-09-26 Paul Eggert <eggert@cs.ucla.edu>
2171
2172 * xfns.c (x_default_scroll_bar_color_parameter):
2173 Use USE_LOCAL_ALLOCA only if USE_TOOLKIT_SCROLL_BARS,
2174 to pacify --enable-gcc-warnings in non-scrollbar builds.
2175
2176 2014-09-26 Ken Brown <kbrown@cornell.edu>
2177
2178 * w32term.h (ALIGN_STACK): Fix the cpp condition.
2179
2180 2014-09-25 Eli Zaretskii <eliz@gnu.org>
2181
2182 * lisp.h (USE_STACK_LISP_OBJECTS): Default to false for 32-bit
2183 MinGW builds that use GCC before 4.2.
2184
2185 Default to stack objects on DOS_NT platforms as well.
2186 * w32term.h (ALIGN_STACK) [__GNUC__]: Define to
2187 __attribute__((force_align_arg_pointer)) for GCC 4.2 and later.
2188
2189 * lisp.h (USE_STACK_LISP_OBJECTS): Remove the !DOS_NT condition.
2190
2191 * w32proc.c (enum_locale_fn, enum_codepage_fn): Add the
2192 ALIGN_STACK attribute.
2193
2194 * w32fns.c (w32_monitor_enum): Add the ALIGN_STACK attribute.
2195
2196 * w32uniscribe.c (add_opentype_font_name_to_list): Add the
2197 ALIGN_STACK attribute.
2198
2199 * w32font.c (add_font_name_to_list, add_font_entity_to_list)
2200 (add_one_font_entity_to_list): Add the ALIGN_STACK attribute.
2201
2202 2014-09-25 Martin Rudalics <rudalics@gmx.at>
2203
2204 * frame.c (frame_inhibit_resize):
2205 * widget.c (EmacsFrameResize):
2206 * window.c (resize_frame_windows, Fset_window_configuration):
2207 * xdisp.c (expose_frame):
2208 * xfns.c (x_change_tool_bar_height):
2209 * xmenu.c (update_frame_menubar):
2210 * xterm.c (handle_one_xevent, x_new_font, x_set_window_size_1):
2211 Remove code left dead after 2014-07-27 changes.
2212
2213 2014-09-25 Paul Eggert <eggert@cs.ucla.edu>
2214
2215 Fix local_cons etc. to not exhaust the stack when in a loop.
2216 Problem reported in:
2217 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00696.html
2218 * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
2219 * charset.c (load_charset_map_from_file, Ffind_charset_region)
2220 (Ffind_charset_string):
2221 * chartab.c (uniprop_encode_value_numeric, uniprop_table):
2222 * data.c (wrong_range):
2223 * editfns.c (Fpropertize, format2):
2224 * emacs.c (init_cmdargs, decode_env_path):
2225 * fileio.c (auto_save_error):
2226 * fns.c (Fyes_or_no_p):
2227 * font.c (font_style_to_value, font_parse_xlfd)
2228 (font_parse_family_registry, font_delete_unmatched)
2229 (font_add_log):
2230 * fontset.c (Fset_fontset_font):
2231 * frame.c (x_get_arg):
2232 * keyboard.c (echo_dash, safe_run_hooks_error, parse_menu_item)
2233 (read_char_minibuf_menu_prompt):
2234 * keymap.c (silly_event_symbol_error, describe_vector):
2235 * lread.c (load_warn_old_style_backquotes):
2236 * menu.c (single_menu_item):
2237 * minibuf.c (Fread_buffer):
2238 * process.c (status_message, Fformat_network_address)
2239 (server_accept_connection):
2240 * textprop.c (copy_text_properties):
2241 * xdisp.c (Fcurrent_bidi_paragraph_direction):
2242 * xfns.c (x_default_scroll_bar_color_parameter):
2243 * xfont.c (xfont_open):
2244 * xselect.c (x_clipboard_manager_error_1):
2245 * xterm.c (x_term_init):
2246 Put USE_LOCAL_ALLOCA at the start of the function.
2247 * fns.c (maybe_resize_hash_table): Use build_string instead of
2248 build_local_string, since we'd otherwise need a conditional
2249 USE_LOCAL_ALLOCA here, but this is just debugging output and is
2250 not worth the bother of optimization.
2251 * font.c (font_delete_unmatched): Remove by-hand code that
2252 observed MAX_ALLOCA limit, since it's now done automatically.
2253 * keymap.c (Fsingle_key_description): Put USE_SAFE_ALLOCA at top,
2254 since build_local_string needs its sa_alloc.
2255 * lisp.h (lisp_word_count): New function.
2256 (SAFE_ALLOCA_LISP): Use it.
2257 (USE_LOCAL_ALLOCA): New macro.
2258 (local_cons, make_local_vector, make_local_string):
2259 Observe the MAX_ALLOCA limit.
2260 (LISP_STRING_OVERHEAD): New constant.
2261 (make_local_string): Use it.
2262
2263 2014-09-24 Paul Eggert <eggert@cs.ucla.edu>
2264
2265 Default to stack objects on non-GNU/Linux, non-DOS_NT platforms.
2266 * lisp.h (USE_STACK_LISP_OBJECTS): Also default to true
2267 if !defined DOS_NT && !defined GNU_LINUX. I've tested this on AIX
2268 and Solaris and it's likely to work on similar platforms.
2269
2270 Avoid signed integer overflow when converting Time to ptrdiff_t.
2271 * keyboard.c (INPUT_EVENT_POS_MAX, INPUT_EVENT_POS_MIN):
2272 New macros.
2273 (position_to_Time, Time_to_position): New functions.
2274 (gen_help_event, kbd_buffer_get_event): Use them.
2275 * systime.h (Time) [emacs && !HAVE_X_WINDOWS]:
2276 Go back to plain 'unsigned long', so that 'Time' is the same
2277 for both X and non-X builds; this is less likely to cause surprise.
2278 * termhooks.h: Remove compile-time check that Time and ptrdiff_t
2279 are the same size; this is no longer required.
2280
2281 * keyboard.c (make_lispy_event): Avoid unnecessary tests
2282 of bit 28 and of whether an unsigned value is negative.
2283 This simplifies the code a bit, and pacifies clang 3.4.
2284
2285 2014-09-24 Eli Zaretskii <eliz@gnu.org>
2286
2287 * systime.h (Time): Define as size_t, to be consistent with 64-bit
2288 Windows builds, where 'long' is a 32-bit type.
2289
2290 * w32inevt.h (w32_console_mouse_position): Update the argument
2291 types to use 'Time'.
2292
2293 * w32term.c (w32_mouse_position)
2294 (x_horizontal_scroll_bar_report_motion)
2295 (x_scroll_bar_report_motion): Update the argument types to use
2296 'Time'.
2297
2298 2014-09-24 Dmitry Antipov <dmantipov@yandex.ru>
2299
2300 * termhooks.h (enum scroll_bar_part): Begin from 0 to allow...
2301 (struct input_event): ...unsigned bitfields. Likewise for
2302 `event_kind' member. Prefer unsigned for `code' and 'modifiers'.
2303 Use `timestamp' for HELP_EVENT position. Add compile-time assert.
2304 * keyboard.c (gen_help_event, kbd_buffer_store_help_event)
2305 (kbd_buffer_get_event): Adjust users.
2306 (scroll_bar_parts): Add Qnil to match scroll_bar_nowhere.
2307 (make_scroll_bar_position): New function, refactored out of...
2308 (make_lispy_event): ...adjusted user.
2309 * nsterm.h (EmacsScroller): Use enum for `last_hit_part' member.
2310 * nsterm.m (ns_mouse_position, mouseUp):
2311 * term.c (term_mouse_position):
2312 * w32inevt.c (w32_console_mouse_position):
2313 * w32term.c (w32_mouse_position):
2314 * xterm.c (XTmouse_position): Use scroll_bar_above_handle.
2315 (x_send_scroll_bar_event, xm_scroll_callback, xg_scroll_callback):
2316 Prefer enum and explicit enum members to integers and numeric values.
2317
2318 * chartab.c (uniprop_encode_value_numeric):
2319 * font.c (font_style_to_value): Use make_local_vector.
2320 (font_delete_unmatched): Use local_cons but respect MAX_ALLOCA.
2321 * keymap.c (append_key): Use scoped_list1.
2322
2323 * lisp.h (USE_STACK_LISP_OBJECTS): Enable by default if GNU_LINUX
2324 && __GNUC__ && !__clang__. Mention known problems. Adjust comment.
2325
2326 2014-09-24 Paul Eggert <eggert@cs.ucla.edu>
2327
2328 Fix some slow uses and misuses of strcat.
2329 * doc.c (get_doc_string):
2330 * gtkutil.c (get_utf8_string):
2331 * xsmfns.c (x_session_initialize):
2332 Avoid recomputation of string length.
2333 * ftfont.c (ftfont_spec_pattern):
2334 * xfns.c (xic_create_fontsetname):
2335 Don't assume output buffer is initially zero.
2336
2337 2014-09-23 Paul Eggert <eggert@cs.ucla.edu>
2338
2339 * lisp.h (lispstpcpy): Rename from lispstrcpy, and act like stpcpy.
2340 All callers changed.
2341 * xterm.c (x_term_init): Use new functionality to avoid two needs
2342 to compute a string length.
2343
2344 * dispextern.h, xdisp.c (window_box_right_offset): Now static.
2345
2346 2014-09-23 Dmitry Antipov <dmantipov@yandex.ru>
2347
2348 Use known length of a Lisp string to copy it faster.
2349 * lisp.h (lispstrcpy): New function. Add comment.
2350 * callproc.c (child_setup):
2351 * dbusbind.c (xd_append_arg):
2352 * doc.c (get_doc_string):
2353 * font.c (Ffont_xlfd_name):
2354 * frame.c (xrdb_get_resource):
2355 * process.c (Fmake_network_process, network_interface_info):
2356 * w32fns.c (Fx_open_connection):
2357 * w32proc.c (sys_spawnve):
2358 * xfns.c (select_visual):
2359 * xfont.c (xfont_list):
2360 * xsmfns.c (x_session_initialize):
2361 * xterm.c (x_term_init): Use it.
2362
2363 2014-09-23 Paul Eggert <eggert@cs.ucla.edu>
2364
2365 Fix SAFE_ALLOCA to not exhaust the stack when in a loop.
2366 Reported by Dmitry Antipov in thread leading to:
2367 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00713.html
2368 This patch fixes only SAFE_ALLOCA, SAFE_NALLOCA, and SAFE_ALLOCA_LISP;
2369 the experimental local_* macros enabled by USE_LOCAL_ALLOCATORS
2370 remain unfixed.
2371 * callproc.c (call_process): Save and restore sa_avail.
2372 * lisp.h (USE_SAFE_ALLOCA): Define sa_avail.
2373 (AVAIL_ALLOCA): New macro.
2374 (SAFE_ALLOCA, SAFE_NALLOCA, SAFE_ALLOCA_LISP):
2375 Use it, and check against sa_avail rather than MAX_ALLOCA.
2376
2377 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
2378
2379 On OSX, do not free font-specific data more than once (Bug#18501).
2380 * macfont.m (macfont_close): Release and free font-specific data
2381 only if it wasn't previously freed.
2382
2383 2014-09-22 David Caldwell <david@porkrind.org> (tiny change)
2384
2385 * unexmacosx.c (dump_it): Improve error message.
2386
2387 2014-09-22 Juri Linkov <juri@jurta.org>
2388
2389 * image.c (imagemagick_load_image): Add delay to imagemagick metadata.
2390 (Bug#10747, bug#18334)
2391
2392 2014-09-22 Eli Zaretskii <eliz@gnu.org>
2393
2394 * frame.c (Fmouse_position, Fset_mouse_position): Clarify the
2395 units in which the position is measured. (Bug#18493)
2396
2397 * xdisp.c (redisplay_internal): Force redisplay of all windows
2398 that show a buffer whose narrowing has changed. (Bug#18490)
2399
2400 2014-09-22 Eli Zaretskii <eliz@gnu.org>
2401
2402 * xterm.c (x_draw_hollow_cursor, x_draw_bar_cursor):
2403 * w32term.c (x_draw_hollow_cursor, x_draw_bar_cursor): In R2L
2404 lines, draw the hollow-box and hbar cursors on the right side of
2405 cursor-glyph. Thanks to martin rudalics <rudalics@gmx.at> for
2406 testing on X.
2407
2408 * xterm.c (x_draw_stretch_glyph_string):
2409 * w32term.c (x_draw_stretch_glyph_string): Fix a thinko that
2410 caused the block cursor to disappear on a TAB in R2L lines in
2411 every window except the leftmost one. Reported by Martin Rudalics
2412 <rudalics@gmx.at>.
2413
2414 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
2415
2416 Always use matched specpdl entry to record call arguments (Bug#18473).
2417 * lisp.h (record_in_backtrace): Adjust prototype.
2418 * eval.c (record_in_backtrace): Return current specpdl level.
2419 (set_backtrace_args, set_backtrace_nargs): Merge. Adjust all users.
2420 (eval_sub, Ffuncall): Record call arguments in matched specpdl
2421 entry and use that entry in call to backtrace_debug_on_exit.
2422 (apply_lambda): Likewise. Get current specpdl level as 3rd arg.
2423 (do_debug_on_call): Get current specpdl level as 2nd arg.
2424
2425 Prefer ptrdiff_t to int and avoid integer overflows.
2426 * fileio.c (make_temp_name):
2427 * font.c (font_parse_family_registry): Avoid integer
2428 overflow on string size calculation.
2429 * data.c (Faset): Likewise for byte index.
2430
2431 2014-09-22 Eli Zaretskii <eliz@gnu.org>
2432
2433 Fix display of R2L lines in partial-width windows.
2434 * xdisp.c (init_iterator): Don't use it->bidi_p before it is
2435 assigned the correct value.
2436 (extend_face_to_end_of_line): Account for truncation and
2437 continuation glyphs in R2L rows when one of the fringes is not
2438 displayed.
2439 (display_line): Don't assign negative X offset to a row if we are
2440 going to produce a truncation glyph for it. When handling
2441 truncated R2L rows, consider the width of the left fringe instead
2442 of the right one.
2443 (produce_special_glyphs): Fix bogus assignments.
2444
2445 2014-09-22 Eli Zaretskii <eliz@gnu.org>
2446
2447 * fileio.c (Fexpand_file_name) [DOS_NT]: Make sure newdirlim is
2448 always set to a valid value. Make sure the size passed to alloca
2449 is always positive. (Bug#18516)
2450
2451 2014-09-22 Dmitry Antipov <dmantipov@yandex.ru>
2452
2453 Avoid extra call to oblookup when interning symbols.
2454 * lisp.h (intern_driver): Add prototype.
2455 * lread.c (intern_driver): New function.
2456 (intern1, intern_c_string_1, Fintern):
2457 * font.c (font_intern_prop):
2458 * w32font.c (intern_font_name): Use it.
2459
2460 2014-09-21 Paul Eggert <eggert@cs.ucla.edu>
2461
2462 Minor improvements to new stack-allocated Lisp objects.
2463 * frame.h (FRAME_PARAMETER):
2464 Prefer scoped_list1 to local_list1 where either would do.
2465 * lisp.h (scoped_list4): New macro.
2466 (local_cons, local_list1, local_list2, local_list3, local_list4)
2467 (make_local_vector, make_local_string, build_local_string):
2468 Prefer functions to macros where either would do.
2469 * xdisp.c (build_desired_tool_bar_string):
2470 Prefer scoped_list4 to local_list4 where either would do.
2471
2472 2014-09-18 Dmitry Antipov <dmantipov@yandex.ru>
2473
2474 More and more stack-allocated Lisp objects if USE_LOCAL_ALLOCATORS.
2475 * lisp.h (local_list4) [USE_LOCAL_ALLOCATORS]: New macro.
2476 [!USE_LOCAL_ALLOCATORS]: Fall back to regular list4.
2477 * frame.h (FRAME_PARAMETER): New macro.
2478 * dispnew.c (init_display):
2479 * fontset.c (Fset_fontset_font):
2480 * frame.c (x_default_parameter):
2481 * xfaces.c (set_font_frame_param, Finternal_merge_in_global_face):
2482 * xfns.c (x_default_scroll_bar_color_parameter)
2483 (x_default_font_parameter, x_create_tip_frame): Use it.
2484 * editfns.c (Fpropertize): Use local_cons.
2485 * process.c (status_message): Use build_local_string.
2486 * xfont.c (xfont_open): Use make_local_string.
2487 * xdisp.c (build_desired_tool_bar_string): Use local_list4.
2488
2489 2014-09-18 Paul Eggert <eggert@cs.ucla.edu>
2490
2491 Port USE_LOCAL_ALLOCATORS code to clang 3.4 x86-64.
2492 * lisp.h (USE_LOCAL_ALLOCATORS): Define only if __GNUC__ &&
2493 !__clang__. This works with GCC and with clang and is safer for
2494 compilers we don't know about.
2495 (local_cons): Rename parameter to make capture less likely.
2496
2497 2014-09-17 Samuel Bronson <naesten@gmail.com>
2498
2499 * unexmacosx.c (copy_data_segment): Port to GCC 4.6+ (Bug#9927).
2500
2501 2014-09-17 Paul Eggert <eggert@cs.ucla.edu>
2502
2503 Fix minor problems found by static checking.
2504 * alloc.c, lisp.h (SAVE_TYPE_INT_OBJ, make_save_int_obj):
2505 Remove; now unused.
2506 * buffer.h (decode_buffer): Doc and indentation fixes.
2507 * fns.c (Qstring_collate_lessp, Qstring_collate_equalp): Now static.
2508
2509 2014-09-17 Dmitry Antipov <dmantipov@yandex.ru>
2510
2511 Avoid clang-specific warnings.
2512 * buffer.c (init_buffer): Shut up -Wself-assign.
2513 * process.c (server_accept_connection): Shut up -Wunsequenced.
2514
2515 2014-09-16 Daniel Colascione <dancol@dancol.org>
2516
2517 * fns.c (sxhash): For symbols, use address as hash code.
2518
2519 2014-09-16 Dmitry Antipov <dmantipov@yandex.ru>
2520
2521 If USE_LOCAL_ALLOCATORS, allocate even more Lisp objects on stack.
2522 * charset.c (load_charset_map_from_file): Use scoped_list2
2523 and build_local_string.
2524 * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
2525 * emacs.c (init_cmdargs, decode_env_path):
2526 * fileio.c (Fexpand_file_name):
2527 * fns.c (maybe_resize_hash_table) [ENABLE_CHECKING]:
2528 * frame.c (x_get_arg):
2529 * keyboard.c (safe_run_hooks_error):
2530 * lread.c (load_warn_old_style_backquotes):
2531 * xdisp.c (Fcurrent_bidi_paragraph_direction):
2532 * xfns.c (x_default_scroll_bar_color_parameter, select_visual):
2533 * xselect.c (x_clipboard_manager_error_1)
2534 (x_clipboard_manager_save_all):
2535 * xterm.c (x_term_init): Use build_local_string.
2536
2537 Avoid more integer overflows on string size calculations.
2538 * category.c (Fmake_category_set):
2539 * xdisp.c (get_overlay_arrow_glyph_row):
2540 * w32font.c (intern_font_name): Prefer ptrdiff_t to int.
2541
2542 2014-09-15 Eli Zaretskii <eliz@gnu.org>
2543
2544 * sound.c [WINDOWSNT]: Include w32common.h and mbstring.h.
2545 (SOUND_WARNING) [WINDOWSNT]: Include in do..while and improve the
2546 error message format. Use message_with_string to have non-ASCII
2547 file names properly displayed.
2548 (do_play_sound) [WINDOWSNT]: Use Unicode APIs to play sound files
2549 when w32-unicode-filenames is non-nil, but not on Windows 9X,
2550 where these APIs are not available even in UNICOWS.DLL.
2551 Improve the format of error messages and include the file name in them
2552 where appropriate.
2553 (Fplay_sound_internal) [WINDOWSNT]: Make the MS-Windows branch
2554 call play-sound-functions, per documentation.
2555
2556 * w32.c (w32_get_long_filename, w32_get_short_filename):
2557 Constify the input file name arguments.
2558
2559 * w32.h (w32_get_long_filename, w32_get_short_filename):
2560 Update prototypes.
2561
2562 2014-09-15 Dmitry Antipov <dmantipov@yandex.ru>
2563
2564 If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack.
2565 * lisp.h (local_cons, local_list1, local_list2, local_list3)
2566 [USE_LOCAL_ALLOCATORS]: New macros.
2567 [!USE_LOCAL_ALLOCATORS]: Fall back to regular functions.
2568 (build_local_string): Avoid argument name expansion clash with
2569 make_local_string.
2570 * alloc.c (toplevel)
2571 [USE_LOCAL_ALLOCATORS && GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS]:
2572 Preprocessor guard to avoid impossible configuration.
2573 * charset.c (Ffind_charset_region, Ffind_charset_string):
2574 Use make_local_vector.
2575 * lread.c (read1, substitute_object_recurse): Use scoped_cons.
2576 * textprop.c (Fput_text_property, Fadd_face_text_property):
2577 Use scoped_list2.
2578 (copy_text_properties): Use local_cons and local_list3.
2579 * chartab.c (uniprop_table):
2580 * data.c (wrong_choice, wrong_range):
2581 * doc.c (get_doc_string):
2582 * editfns.c (format2):
2583 * fileio.c (Fexpand_file_name, auto_save_error):
2584 * fns.c (Fyes_or_no_p):
2585 * font.c (font_parse_xlfd, font_parse_family_registry, font_add_log):
2586 * fontset.c (Fset_fontset_font):
2587 * keyboard.c (echo_add_key, echo_dash, parse_menu_item)
2588 (read_char_minibuf_menu_prompt):
2589 * keymap.c (silly_event_symbol_error, describe_vector):
2590 * menu.c (single_menu_item):
2591 * minibuf.c (Fread_buffer):
2592 * process.c (status_message, Fformat_network_address)
2593 (server_accept_connection): Use make_local_string and
2594 build_local_string. Prefer compound literals where appropriate.
2595
2596 2014-09-15 Daniel Colascione <dancol@dancol.org>
2597
2598 * fns.c (Fsort): Tweak sort docstring.
2599
2600 2014-09-15 Eli Zaretskii <eliz@gnu.org>
2601
2602 * w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of pipes.
2603 (sys_write): When a write to a non-blocking pipe returns ENOSPC,
2604 set errno to EAGAIN instead, to allow the caller to retry the
2605 write after some waiting. Fixes deadlocks when Emacs exchanges a
2606 lot of data through the pipe. (Bug#18420)
2607
2608 * sound.c (Fplay_sound_internal): Encode the sound file name in
2609 the ANSI codepage. Expand it against data-directory, as per docs,
2610 not against the current directory. No need to make a local copy
2611 of the file name; pass the encoded file name directly to
2612 do_play_sound. (Bug#18463)
2613
2614 * w32.c (ansi_encode_filename): If w32_get_short_filename returns
2615 NULL, and the file name is not encodable in ANSI codepage, return
2616 the string with "?" replacement characters, which will fail the
2617 caller. This avoids returning a random value in that case.
2618
2619 2014-09-15 Martin Rudalics <rudalics@gmx.at>
2620
2621 * window.c (Fresize_mini_window_internal): Set w->total_lines
2622 from w->pixel_height (Bug#18422).
2623
2624 2014-09-15 Jan Djärv <jan.h.d@swipnet.se>
2625
2626 * nsterm.m (updateFrameSize:, initFrameFromEmacs:)
2627 (toggleFullScreen:): Take frame_resize_pixelwise into account when
2628 setting resize increments (Bug#18435).
2629
2630 2014-09-15 Eli Zaretskii <eliz@gnu.org>
2631
2632 * xdisp.c (pos_visible_p): Properly save and restore the iterator
2633 state around the call to line_bottom, since it can move the
2634 iterator to another screen line. This fixes off-by-one errors in
2635 the reported row in some rare cases.
2636
2637 2014-09-14 Jan Djärv <jan.h.d@swipnet.se>
2638
2639 * callproc.c (init_callproc): Fix bug introduced at
2640 2014-09-07 (Bug#18474).
2641
2642 2014-09-13 Dmitry Antipov <dmantipov@yandex.ru>
2643
2644 Prefer ptrdiff_t to int and avoid integer overflows.
2645 * fileio.c (make_temp_name):
2646 * font.c (font_parse_family_registry): Avoid integer
2647 overflow on string size calculation.
2648 * data.c (Faset): Likewise for byte index.
2649
2650 2014-09-12 Detlev Zundel <dzu@member.fsf.org>
2651
2652 * buffer.c (syms_of_buffer): DEFSYM Qchoice (Bug#18337).
2653
2654 2014-09-11 Dmitry Antipov <dmantipov@yandex.ru>
2655
2656 * lisp.h (make_local_string): Nitpick indent.
2657 * print.c (Fprin1_to_string): Remove unused GCPROs.
2658
2659 More debugging aids around GCPROs.
2660 * lisp.h (struct gcpro) [DEBUG_GCPRO]: Add extra members.
2661 (GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, GCPRO7):
2662 Minor restyle. If DEBUG_GCPRO, initialize extra fields.
2663
2664 * lread.c (readevalloop_eager_expand_eval): Add GCPRO and fix
2665 bootstrap broken if GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
2666
2667 Remove redundant GCPROs around Ffuncall and Fapply calls.
2668 This is safe because Ffuncall protects all of its arguments by itself.
2669 * charset.c (map_charset_for_dump): Remove redundant GCPRO.
2670 * eval.c (Fapply, apply1, call0, call1, call2, call3, call4, call5)
2671 (call6, call7): Likewise. Use compound literals where applicable.
2672 (run_hook_with_args_2): Use compound literal.
2673
2674 2014-09-11 Paul Eggert <eggert@cs.ucla.edu>
2675
2676 Pacify --enable-gcc-warnings when no window system is used.
2677 These warnings found that subscript error, so they seem worthwhile.
2678 * composite.c (char_composable_p): Simplify a bit.
2679 * frame.c (x_set_frame_parameters): Add an IF_LINT.
2680 * frame.c (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
2681 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
2682 * window.c (set_window_scroll_bars):
2683 Use USE_HORIZONTAL_SCROLL_BARS for simplicity.
2684 * frame.h [! USE_HORIZONTAL_SCROLL_BARS]:
2685 Ignore -Wsuggest-attribute=const.
2686 * window.h (USE_HORIZONTAL_SCROLL_BARS): New macro.
2687 (WINDOW_HAS_HORIZONTAL_SCROLL_BAR): Use it.
2688
2689 2014-09-10 Paul Eggert <eggert@penguin.cs.ucla.edu>
2690
2691 * charset.c (Fget_unused_iso_final_char): Fix subscript error.
2692 Use check_iso_charset_parameter instead of doing the checks by hand.
2693 (check_iso_charset_parameter): Move up. Check parameters a bit
2694 more carefully, and return true for 96-char sets. All callers changed.
2695
2696 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
2697
2698 Simplify lisp.h by removing the __COUNTER__ business.
2699 Reported by Dmitry Antipov in:
2700 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00220.html
2701 * lisp.h (make_local_vector, make_local_string)
2702 (build_local_string): Simplify by not bothering with __COUNTER__.
2703 The __COUNTER__ business wasn't working properly, and was needed
2704 only for hypothetical future expansion anyway.
2705
2706 2014-09-10 Alp Aker <alp.tekin.aker@gmail.com>
2707
2708 * nsterm.m (ns_draw_fringe_bitmap): Use the same logic as other
2709 terms to determine bitmap color. (Bug#18437)
2710
2711 2014-09-10 Eli Zaretskii <eliz@gnu.org>
2712
2713 * w32.c (sys_write): Use SAFE_NALLOCA for the NL -> CRLF
2714 translation buffer.
2715
2716 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
2717
2718 * xterm.c (handle_one_xevent): Add braces to pacify gcc -Wall.
2719
2720 2014-09-10 Jan Djärv <jan.h.d@swipnet.se>
2721
2722 * xterm.c (handle_one_xevent): Detect iconified by looking at
2723 _NET_WM_STATE_HIDDEN.
2724
2725 2014-09-10 Paul Eggert <eggert@cs.ucla.edu>
2726
2727 * lisp.h (DEFINE_GDB_SYMBOL_ENUM): Remove.
2728 These can generate a constant with the correct value but the wrong
2729 width, which doesn't work as a printf argument. All uses removed.
2730 Reported by Dmitry Antipov in:
2731 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00213.html
2732 (ENUMABLE): Remove; no longer needed.
2733 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
2734 Remove; no longer needed because of the above change.
2735 Each definiens moved to the only use.
2736
2737 Improve the experimental local and scoped allocation.
2738 * alloc.c (local_string_init, local_vector_init):
2739 New functions, defined if USE_LOCAL_ALLOCATORS.
2740 Mostly, these are moved here from lisp.h, as it's not
2741 clear it's worth making them inline.
2742 * lisp.h (USE_STACK_LISP_OBJECTS): Default to false.
2743 (GCALIGNED): Depend on HAVE_STRUCT_ATTRIBUTE_ALIGNED and
2744 USE_STACK_LISP_OBJECTS, not on a laundry list.
2745 (local_string_init, local_vector_init): New decls.
2746 (union Aligned_Cons): New type.
2747 (scoped_cons): Use it. Give up on the char trick, as it's a too
2748 much of a maintenance hassle; if someone wants this speedup
2749 they'll just need to convince their compiler to align properly.
2750 Conversely, use the speedup if struct Lisp_Cons happens to
2751 be aligned even without a directive. Better yet, help it along
2752 by using union Aligned_Cons rather than struct Lisp_Cons.
2753 (pointer_valid_for_lisp_object): Remove. This check is not
2754 necessary, since make_lisp_ptr is already doing it. All uses removed.
2755 (local_vector_init, local_string_init): Move to alloc.c.
2756 (build_local_vector): Remove this awkward macro, replacing with ...
2757 (make_local_vector): New macro, which acts more like a function.
2758 Use statement expressions and use __COUNTER__ to avoid macro
2759 capture. Fall back on functions if these features are not supported.
2760 (build_local_string, make_local_string): Likewise.
2761
2762 2014-09-09 Dmitry Antipov <dmantipov@yandex.ru>
2763
2764 * xterm.c (x_term_init): Consolidate duplicated code.
2765 [USE_LUCID]: Revert 2014-04-02 change (Bug#18403). Add comment.
2766 (x_delete_terminal): Do not close X connection fd (Bug#18403).
2767 Add eassert and mark dpyinfo as dead only if it was alive.
2768
2769 Add macros to allocate temporary Lisp objects with alloca.
2770 Respect MAX_ALLOCA and fall back to regular GC for large objects.
2771 * character.h (parse_str_as_multibyte): Move prototype to ...
2772 * lisp.h (parse_str_as_multibyte): ... here.
2773 (struct Lisp_Cons): Add GCALIGNED attribute if supported.
2774 (scoped_cons, scoped_list2, build_local_vector, build_local_string):
2775 New macros.
2776 (scoped_cons_init, pointer_valid_for_lisp_object, local_vector_init)
2777 (local_string_init): New functions.
2778 * alloc.c (verify_alloca) [ENABLE_CHECKING]: New function.
2779 (init_alloc_once): Call it.
2780
2781 Cleanup last change and make all new stuff conditional.
2782 * lisp.h (build_local_string): Rename to ...
2783 (make_local_string): ... this macro.
2784 (build_local_string, scoped_list1, scoped_list3): New macros.
2785 (toplevel) [USE_STACK_LISP_OBJECTS]: Define all new macros
2786 and functions as such, use regular fallbacks otherwise.
2787 * alloc.c (verify_alloca) [USE_STACK_LISP_OBJECTS]: Define
2788 conditionally.
2789
2790 2014-09-08 Eli Zaretskii <eliz@gnu.org>
2791
2792 * dispnew.c (prepare_desired_row): When MODE_LINE_P is zero,
2793 always make sure the marginal areas of the row are in sync with
2794 what the window wants. (Bug#18419)
2795
2796 * data.c (set_internal): Use assq_no_quit, not Fassq, to find an
2797 existing binding of a variable, to avoid silently aborting
2798 commands that use specbind. (Bug#18331)
2799
2800 2014-09-07 Paul Eggert <eggert@cs.ucla.edu>
2801
2802 Fix bug uncovered by changing alloca to auto buffer (Bug#18410).
2803 * coding.c (growable_destination): New function.
2804 (produce_chars): Use it for sanity checks. Do not fiddle with
2805 dst_end if the source and destination are both nil, as it's
2806 the caller's responsibility to avoid overlap.
2807 * keyboard.c (read_decoded_event_from_main_queue):
2808 The destination must be MAX_MULTIBYTE_LENGTH times the max source
2809 length, not 4 times, to prevent decode_coding_c_string from trying
2810 to reallocate a destination. This removes the need for the FIXME.
2811
2812 * callproc.c (exec_failed) [DOS_NT]: Define a dummy.
2813 All callers simplified. Add a comment about exec_failed, vfork,
2814 and alloca.
2815
2816 Adjust drag-and-drop fix when window is above top (Bug#18303).
2817 * xselect.c (x_fill_property_data): Don't let sign bit of negative
2818 XCDR bleed into XCAR's encoded value. Improve checks for
2819 out-of-range data while we're at it.
2820
2821 2014-09-07 Jan Djärv <jan.h.d@swipnet.se>
2822
2823 * xselect.c (x_fill_property_data): Handle negative XCDR when data
2824 is CONSP (Bug#18303).
2825
2826 2014-09-07 Eli Zaretskii <eliz@gnu.org>
2827
2828 * callproc.c (child_setup) [WINDOWSNT]: Don't call exec_failed if
2829 'alloca' gets passed arguments larger than MAX_ALLOCA.
2830
2831 * font.c (MAX): Define if not defined elsewhere.
2832
2833 2014-09-07 Paul Eggert <eggert@cs.ucla.edu>
2834
2835 * keyboard.c (read_decoded_event_from_main_queue): Reinstitute alloca
2836 here for destination buffer, to work around what appears to be a
2837 bug in decode_coding_c_string when the source and destination are
2838 both C strings.
2839
2840 Use SAFE_ALLOCA etc. to avoid unbounded stack allocation (Bug#18410).
2841 This follows up on the recent thread in emacs-devel on alloca; see:
2842 http://lists.gnu.org/archive/html/emacs-devel/2014-09/msg00042.html
2843 This patch also cleans up alloca-related glitches noted while
2844 examining the code looking for unbounded alloca.
2845 * alloc.c (listn):
2846 * callproc.c (init_callproc):
2847 Rewrite to avoid need for alloca.
2848 * buffer.c (mouse_face_overlay_overlaps)
2849 (report_overlay_modification):
2850 * buffer.h (GET_OVERLAYS_AT):
2851 * coding.c (make_subsidiaries):
2852 * doc.c (Fsnarf_documentation):
2853 * editfns.c (Fuser_full_name):
2854 * fileio.c (Ffile_name_directory, Fexpand_file_name)
2855 (search_embedded_absfilename, Fsubstitute_in_file_name):
2856 * fns.c (Fmake_hash_table):
2857 * font.c (font_vconcat_entity_vectors, font_update_drivers):
2858 * fontset.c (fontset_pattern_regexp, Ffontset_info):
2859 * frame.c (Fmake_terminal_frame, x_set_frame_parameters)
2860 (xrdb_get_resource, x_get_resource_string):
2861 * ftfont.c (ftfont_get_charset, ftfont_check_otf, ftfont_drive_otf):
2862 * ftxfont.c (ftxfont_draw):
2863 * image.c (xbm_load, xpm_load, jpeg_load_body):
2864 * keyboard.c (echo_add_key, menu_bar_items, tool_bar_items)
2865
2866 * keymap.c (Fdescribe_buffer_bindings, describe_map):
2867 * lread.c (openp):
2868 * menu.c (digest_single_submenu, find_and_call_menu_selection)
2869 (find_and_return_menu_selection):
2870 * print.c (PRINTFINISH):
2871 * process.c (Fformat_network_address):
2872 * scroll.c (do_scrolling, do_direct_scrolling, scrolling_1):
2873 * search.c (search_buffer, Fmatch_data, Fregexp_quote):
2874 * sound.c (wav_play, au_play):
2875 * syntax.c (skip_chars):
2876 * term.c (tty_menu_activate, tty_menu_show):
2877 * textprop.c (get_char_property_and_overlay):
2878 * window.c (Fset_window_configuration):
2879 * xdisp.c (safe__call, next_overlay_change, vmessage)
2880 (compute_overhangs_and_x, draw_glyphs, note_mouse_highlight):
2881 * xfaces.c (face_at_buffer_position):
2882 * xmenu.c (x_menu_show):
2883 Use SAFE_ALLOCA etc. instead of plain alloca, since the
2884 allocation size isn't bounded.
2885 * callint.c (Fcall_interactively): Redo memory_full check
2886 so that it can be done at compile-time on some platforms.
2887 * coding.c (MAX_LOOKUP_MAX): New constant.
2888 (get_translation_table): Use it.
2889 * callproc.c (call_process): Use SAFE_NALLOCA instead of
2890 SAFE_ALLOCA, to catch integer overflows on size calculation.
2891 (exec_failed) [!DOS_NT]: New function.
2892 (child_setup) [!DOS_NT]: Use it.
2893 * editfns.c (Ftranspose_regions):
2894 Hoist USE_SAFE_ALLOC + SAFE_FREE out of 'if'.
2895 * editfns.c (check_translation):
2896 Allocate larger buffers on the heap.
2897 * eval.c (internal_lisp_condition_case):
2898 Check for MAX_ALLOCA overflow.
2899 * fns.c (sort_vector): Use SAFE_ALLOCA_LISP rather than Fmake_vector.
2900 (Fbase64_encode_region, Fbase64_decode_region):
2901 Avoid unnecessary calls to SAFE_FREE before 'error'.
2902 * buffer.c (mouse_face_overlay_overlaps):
2903 * editfns.c (Fget_pos_property, check_translation):
2904 * eval.c (Ffuncall):
2905 * font.c (font_unparse_xlfd, font_find_for_lface):
2906 * ftfont.c (ftfont_drive_otf):
2907 * keyboard.c (echo_add_key, read_decoded_event_from_main_queue)
2908 (menu_bar_items, tool_bar_items):
2909 * sound.c (Fplay_sound_internal):
2910 * xdisp.c (load_overlay_strings, dump_glyph_row):
2911 Use an ordinary auto buffer rather than alloca, since the
2912 allocation size is fixed and small.
2913 * ftfont.c: Include <c-strcase.h>.
2914 (matching_prefix): New function.
2915 (get_adstyle_property): Use it, to avoid need for alloca.
2916 * keyboard.c (echo_add_key):
2917 * keymap.c (describe_map): Use ptrdiff_t, not int.
2918 * keyboard.c (echo_add_key): Prefer sizeof to strlen.
2919 * keymap.c (Fdescribe_buffer_bindings): Use SBYTES, not SCHARS,
2920 when counting bytes.
2921 * lisp.h (xlispstrdupa): Remove, replacing with ...
2922 (SAFE_ALLOCA_STRING): ... new macro with different API.
2923 This fixes a portability problem, namely, alloca result
2924 passed to another function. All uses changed.
2925 (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Check for MAX_ALLOCA,
2926 not MAX_ALLOCA - 1.
2927 * regex.c (REGEX_USE_SAFE_ALLOCA, REGEX_SAFE_FREE)
2928 (REGEX_ALLOCATE): New macros.
2929 (REGEX_REALLOCATE, REGEX_ALLOCATE_STACK, REGEX_REALLOCATE_STACK)
2930 (REGEX_FREE_STACK, FREE_VARIABLES, re_match_2_internal):
2931 Use them.
2932 * xdisp.c (message3): Use SAFE_ALLOCA_STRING rather than doing it
2933 by hand.
2934 (decode_mode_spec_coding): Store directly into buf rather than
2935 into an alloca temporary and copying the temporary to the buf.
2936
2937 2014-09-06 Eli Zaretskii <eliz@gnu.org>
2938
2939 * Makefile.in (EMACS_HEAPSIZE): Remove, no longer used. (Bug#18416)
2940
2941 2014-09-04 Jan D <jan.h.d@swipnet.se>
2942
2943 * xterm.c (x_term_init): Don't call x_session_initialize if running
2944 as a daemon (Bug#18375).
2945
2946 * xsmfns.c: Initialize ice_fd.
2947
2948 2014-09-04 Paul Eggert <eggert@cs.ucla.edu>
2949
2950 Less chatter in 'make' output.
2951 * Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0, am__v_GEN_1, AM_V_at)
2952 (am__v_at_, am__v_at_0, am__v_at_1): New macros, taken from Automake.
2953 ($(etc)/DOC, buildobj.h, gl-stamp): Use them.
2954
2955 2014-09-03 Martin Rudalics <rudalics@gmx.at>
2956
2957 * buffer.c (scroll-bar-height): Fix typo in doc-string.
2958 * frame.c (Vdefault_frame_horizontal_scroll_bars):
2959 Remove variable.
2960 * nsfns.m (Fx_create_frame):
2961 * w32fns.c (Fx_create_frame):
2962 * xfns.c (Fx_create_frame): Default horizontal scroll bars to
2963 nil.
2964
2965 2014-09-03 Eli Zaretskii <eliz@gnu.org>
2966
2967 * dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in
2968 the reported row in the case of a window with a header line, by
2969 improving on the fix committed in 2011-10-08T10:58:50Z!eliz@gnu.org
2970 eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc. (Bug#18384)
2971
2972 2014-09-03 Paul Eggert <eggert@cs.ucla.edu>
2973
2974 * eval.c (internal_lisp_condition_case): Don't overrun the stack
2975 when configured --with-wide-int on typical 32-bit platforms.
2976
2977 2014-09-03 Eli Zaretskii <eliz@gnu.org>
2978
2979 * xdisp.c (display_and_set_cursor): Call erase_phys_cursor also
2980 when HPOS is negative, for the benefit of R2L glyph rows whose
2981 newline overflows into the fringe.
2982
2983 2014-09-03 Ken Brown <kbrown@cornell.edu>
2984
2985 * conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define. (Bug#18366)
2986
2987 2014-09-02 Paul Eggert <eggert@cs.ucla.edu>
2988
2989 Minor cleanup of recent strlen-avoiding patch.
2990 * fileio.c (CHECK_LENGTH): Remove.
2991 Rewrite callers so that they don't need it.
2992 (Fexpand_file_name) [DOS_NT]: Fix a case where directory length
2993 variable wasn't set.
2994
2995 2014-09-02 Dmitry Antipov <dmantipov@yandex.ru>
2996
2997 * fileio.c (CHECK_LENGTH): New macro.
2998 (Fexpand_file_name): Use it and get rid of a few more calls
2999 to strlen and strcat.
3000 * callproc.c (egetenv_internal): Add arg and rename from egetenv ...
3001 * lisp.h (egetenv): ... because of a new inline function used to
3002 avoid calls to strlen for a compile-time constants.
3003
3004 * buffer.h (decode_buffer): New function.
3005 * buffer.c (Fbuffer_name, Fbuffer_file_name, Fbuffer_base_buffer)
3006 (Fbuffer_local_variables, Fbuffer_modified_p, Fbuffer_modified_tick)
3007 (Fbuffer_chars_modified_tick, Fdelete_all_overlays):
3008 * data.c (Flocal_variables_p):
3009 * fileio.c (Fverify_visited_file_modtime):
3010 * marker.c (live_buffer): Use it.
3011
3012 2014-09-01 Dmitry Antipov <dmantipov@yandex.ru>
3013
3014 Avoid extra calls to strlen in filesystem I/O routines.
3015 * fileio.c (Fexpand_file_name): Avoid calls to strlen if
3016 the length of 'newdir' is known or may be precalculated.
3017 (file_accessible_directory_p): Prefer to pass Lisp_Object,
3018 not 'char *', and so use precalculated length.
3019 (Ffile_accessible_directory_p):
3020 * callproc.c (encode_current_directory, init_callproc):
3021 * charset.c (init_charset):
3022 * lread.c (load_path_check, load_path_default): Adjust users.
3023 * lisp.h (file_accessible_directory_p): Tweak prototype.
3024
3025 2014-09-01 Eli Zaretskii <eliz@gnu.org>
3026
3027 * w32proc.c (w32_compare_strings): Support "C" and "POSIX"
3028 locales.
3029
3030 2014-09-01 Paul Eggert <eggert@cs.ucla.edu>
3031
3032 --enable-silent-rules now suppresses more chatter.
3033 * Makefile.in (AM_DEFAULT_VERBOSITY, AM_V_CC, am__v_CC_)
3034 (am__v_CC_0, am__v_CC_1, AM_V_CCLD, am__v_CCLD_, am__v_CCLD_0)
3035 (am__v_CCLD_1): New macros, taken from Automake.
3036 (.c.o, .m.o, temacs$(EXEEXT)): Use them.
3037
3038 Clean up extern decls a bit.
3039 * bytecode.c: Include blockinput.h and keyboard.h rather
3040 than rolling their APIs by hand.
3041 * emacs.c: Include regex.h and rely on its and lisp.h's API
3042 rather than rolling them by hand.
3043 * lastfile.c: Include lisp.h, to check this file's API.
3044 * lisp.h (lisp_eval_depth, my_edata, my_endbss, my_endbss_static):
3045 New decls.
3046 * regex.h (re_max_failures): New decl.
3047 * unexcw.c, unexmacosx.c, unexw32.c:
3048 Rely on lisp.h's API rather than rolling it by hand.
3049 * vm-limit.c (__after_morecore_hook, __morecore, real_morecore):
3050 Declare at top level, to pacify GCC -Wnested-externs.
3051
3052 2014-08-31 Eli Zaretskii <eliz@gnu.org>
3053
3054 * xdisp.c (get_glyph_string_clip_rects): Don't let the width of a
3055 clipping rectangle become negative (i.e. large positive, since
3056 it's an unsigned data type). This can happen in R2L hscrolled
3057 glyph rows, and caused us to draw the cursor glyph on the fringe.
3058 For the details, see
3059 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00543.html.
3060
3061 2014-08-31 Ken Brown <kbrown@cornell.edu>
3062
3063 * gmalloc.c: Don't include <stdlib.h>. Declare system malloc and
3064 friends before defining hybrid_malloc and friends if HYBRID_MALLOC
3065 is defined. (Bug#18368)
3066
3067 2014-08-30 Paul Eggert <eggert@cs.ucla.edu>
3068
3069 Vector-sorting fixes (Bug#18361).
3070 It's not safe to call qsort or qsort_r, since they have undefined
3071 behavior if the user-specified predicate is not a total order.
3072 Also, watch out for garbage-collection while sorting vectors.
3073 * fns.c: Include <vla.h>.
3074 (sort_vector_predicate) [!HAVE_QSORT_R]: Remove.
3075 (sort_vector_compare): Remove, replacing with ....
3076 (inorder, merge_vectors, sort_vector_inplace, sort_vector_copy):
3077 ... these new functions.
3078 (sort_vector): Rewrite to use the new functions.
3079 GCPRO locals, since the predicate can invoke the GC.
3080 Since it's in-place return void; caller changed.
3081 (merge): Use 'inorder', for clarity.
3082
3083 * sysdep.c (str_collate): Clear errno just before wcscoll(_l).
3084 One can't hoist this out of the 'if', because intervening calls to
3085 newlocale, twolower, etc. can change errno.
3086
3087 2014-08-30 Eli Zaretskii <eliz@gnu.org>
3088
3089 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Improve the
3090 wording of the error messages.
3091 (str_collate) [WINDOWSNT]: Signal an error if w32_compare_strings
3092 sets errno.
3093
3094 * w32proc.c (get_lcid_callback): Accept locale specifications
3095 without the country part, as in "enu" vs "enu_USA".
3096 (w32_compare_strings): Signal an error if a locale was specified,
3097 but couldn't be translated into a valid LCID.
3098
3099 2014-08-29 Michael Albinus <michael.albinus@gmx.de>
3100
3101 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Move up setting errno.
3102
3103 2014-08-29 Paul Eggert <eggert@cs.ucla.edu>
3104
3105 * sysdep.c (str_collate) [__STDC_ISO_10646__]: Do not look at
3106 errno after towlower_l. errno's value is not specified after
3107 towlower_l. Instead, assume that towlower_l returns its argument
3108 on failure, which is portable in practice.
3109
3110 2014-08-29 Eli Zaretskii <eliz@gnu.org>
3111
3112 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): Doc fix.
3113
3114 * w32proc.c (w32_compare_strings): Accept additional argument
3115 IGNORE_CASE. Set up the flags for CompareStringW to ignore case
3116 if requested. If w32-collate-ignore-punctuation is non-nil, add
3117 NORM_IGNORESYMBOLS to the flags.
3118 (LINGUISTIC_IGNORECASE): Define if not already defined.
3119 (syms_of_ntproc) <Vw32_collate_ignore_punctuation>: New variable.
3120
3121 * sysdep.c (str_collate) [WINDOWSNT]: Adapt to the interface
3122 change.
3123
3124 2014-08-29 Michael Albinus <michael.albinus@gmx.de>
3125
3126 * sysdep.c (LC_CTYPE, LC_CTYPE_MASK, towlower_l):
3127 Define substitutes for platforms that lack them.
3128 (str_collate): Add arguments locale and ignore_case.
3129
3130 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp):
3131 Add optional arguments LOCALE and IGNORE-CASE.
3132
3133 * lisp.h (str_collate): Adapt argument list.
3134
3135 2014-08-29 Dmitry Antipov <dmantipov@yandex.ru>
3136
3137 Add vectors support to Fsort.
3138 * fns.c (sort_vector, sort_vector_compare): New functions.
3139 (sort_list): Likewise, refactored out of ...
3140 (Fsort): ... adjusted user. Mention vectors in docstring.
3141 (sort_vector_predicate) [!HAVE_QSORT_R]: New variable.
3142 * alloc.c (make_save_int_obj): New function.
3143 * lisp.h (enum Lisp_Save_Type): New member SAVE_TYPE_INT_OBJ.
3144 (make_save_int_obj): Add prototype.
3145
3146 Fix last change to support Darwin/OSX and FreeBSD (Bug#18354).
3147 * sysdep.c (sort_vector_compare) [DARWIN_OS || __FreeBSD__]:
3148 Conditionally define to match system's qsort_r signature.
3149 (sort_vector) [DARWIN_OS || __FreeBSD__]: Likewise in call to qsort_r.
3150
3151 2014-08-28 Ken Brown <kbrown@cornell.edu>
3152
3153 Add support for HYBRID_MALLOC, allowing the use of gmalloc before
3154 dumping and the system malloc after dumping. (Bug#18222)
3155
3156 * conf_post.h (malloc, realloc, calloc, free) [HYBRID_MALLOC]:
3157 Define as macros, expanding to hybrid_malloc, etc.
3158 (HYBRID_GET_CURRENT_DIR_NAME): New macro.
3159 (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Define as
3160 macro.
3161 * gmalloc.c: Set up the infrastructure for HYBRID_MALLOC, with a
3162 full implementation on Cygwin. Remove Cygwin-specific code that
3163 is no longer needed.
3164 (malloc, realloc, calloc, free, aligned_alloc) [HYBRID_MALLOC]:
3165 Redefine as macros expanding to gmalloc, grealloc, etc.
3166 (DUMPED, ALLOCATED_BEFORE_DUMPING) [CYGWIN]: New macros.
3167 (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]: Undefine.
3168 (USE_PTHREAD, posix_memalign) [HYBRID_MALLOC]: Don't define.
3169 (hybrid_malloc, hybrid_calloc, hybrid_free, hybrid_realloc)
3170 [HYBRID_MALLOC]:
3171 (hybrid_get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
3172 (hybrid_aligned_alloc) [HYBRID_MALLOC && (HAVE_ALIGNED_ALLOC ||
3173 HAVE_POSIX_MEMALIGN)]: New functions.
3174 * alloc.c (aligned_alloc) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
3175 HAVE_POSIX_MEMALIGN)]: Define as macro expanding to
3176 hybrid_aligned_alloc; declare.
3177 (USE_ALIGNED_ALLOC) [HYBRID_MALLOC && (ALIGNED_ALLOC ||
3178 HAVE_POSIX_MEMALIGN)]: Define.
3179 (refill_memory_reserve) [HYBRID_MALLOC]: Do nothing.
3180 * sysdep.c (get_current_dir_name) [HYBRID_GET_CURRENT_DIR_NAME]:
3181 Define as macro, expanding to gget_current_dir_name, and define
3182 the latter.
3183 * emacs.c (main) [HYBRID_MALLOC]: Don't call memory_warnings() or
3184 malloc_enable_thread(). Don't initialize malloc.
3185 * lisp.h (NONPOINTER_BITS) [CYGWIN]: Define (because GNU_MALLOC is
3186 no longer defined on Cygwin).
3187 (refill_memory_reserve) [HYBRID_MALLOC]: Don't declare.
3188 * sheap.c (bss_sbrk_buffer_end): New variable.
3189 * unexcw.c (__malloc_initialized): Remove variable.
3190 * ralloc.c: Throughout, treat HYBRID_MALLOC the same as
3191 SYSTEM_MALLOC.
3192 * xdisp.c (decode_mode_spec) [HYBRID_MALLOC]: Don't check
3193 Vmemory_full.
3194
3195 2014-08-28 Martin Rudalics <rudalics@gmx.at>
3196
3197 * w32term.c (w32_horizontal_scroll_bar_handle_click):
3198 In `event->y' return entire range (the size of the scroll bar minus
3199 that of the thumb).
3200 * xterm.c (xm_scroll_callback, xaw_jump_callback): In `whole'
3201 return entire range (the scaled size of the scroll bar minus
3202 that of the slider). In `portion' return the scaled position of
3203 the slider.
3204 (xaw_jump_callback): Restore part of code for vertical scroll
3205 bar broken in change from 2014-07-27.
3206 (xaw_scroll_callback): Provide incremental scrolling with
3207 horizontal scroll bars.
3208
3209 2014-08-28 Eli Zaretskii <eliz@gnu.org>
3210
3211 * conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define.
3212
3213 * indent.c (Fvertical_motion): Fix vertical motion up through a
3214 display property after a newline. (Bug#18276)
3215
3216 * xdisp.c (display_line): Don't assume that the call to
3217 reseat_at_next_visible_line_start ends up at a character
3218 immediately following the newline on the previous line.
3219 Avoids setting the ends_at_zv_p flag on screen lines that are not at or
3220 beyond ZV, which causes infloop in redisplay. For the details, see
3221 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00368.html.
3222
3223 * dispnew.c (buffer_posn_from_coords): Fix mirroring of X
3224 coordinate for hscrolled R2L screen lines. (Bug#18277)
3225
3226 2014-08-28 Paul Eggert <eggert@cs.ucla.edu>
3227
3228 * sysdep.c (LC_COLLATE, LC_COLLATE_MASK): Give individual defaults
3229 (Bug#18051).
3230
3231 2014-08-27 Eli Zaretskii <eliz@gnu.org>
3232
3233 * syntax.c (scan_lists): Don't examine positions before BEGV.
3234 (Bug#18339)
3235
3236 2014-08-27 Paul Eggert <eggert@cs.ucla.edu>
3237
3238 Improve robustness of new string-collation code (Bug#18051).
3239 * sysdep.c (LC_COLLATE, LC_COLLATE_MASK, freelocale, locale_t)
3240 (newlocale, wcscoll_l): Define substitutes for platforms that
3241 lack them, so as to simplify the mainline code.
3242 (str_collate): Simplify the code by assuming the above definitions.
3243 Use wcscoll_l, not uselocale, as uselocale is too fragile.
3244 For example, the old version left the Emacs in the wrong locale if
3245 wcscoll reported an error. Use 'int', not ptrdiff_t, for the int
3246 result. Report an error if newlocale fails.
3247
3248 2014-08-27 Michael Albinus <michael.albinus@gmx.de>
3249
3250 * lisp.h (str_collate):
3251 * sysdep.c (str_collate): Return int.
3252 (str_collate) [__STDC_ISO_10646__]: Propagate error of wcscoll.
3253
3254 2014-08-27 Dmitry Antipov <dmantipov@yandex.ru>
3255
3256 Fix some glitches in previous change.
3257 * sysdep.c (stack_direction): Replace stack_grows_down
3258 to simplify calculation of stack boundaries.
3259 (handle_sigsegv): Check whether we really crash somewhere near
3260 to stack boundary, and handle fatal signal as usual if not.
3261 (init_sigsegv): Adjust accordingly.
3262 * keyboard.c (Vtop_level_message): Rename to
3263 Vinternal__top_level_message, as suggested by Stefan Monnier in
3264 http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00493.html
3265 All related users changed.
3266
3267 2014-08-26 Dmitry Antipov <dmantipov@yandex.ru>
3268
3269 Handle C stack overflow caused by too nested Lisp evaluation.
3270 * lisp.h (toplevel) [HAVE_STACK_OVERFLOW_HANDLING]: Declare
3271 siglongjmp point to transfer control from SIGSEGV handler.
3272 * keyboard.c (return_to_command_loop, recover_top_level_message)
3273 [HAVE_STACK_OVERFLOW_HANDLING]: New variables.
3274 (regular_top_level_message): New variable.
3275 (command_loop) [HAVE_STACK_OVERFLOW_HANDLING]: Handle non-local
3276 exit from SIGSEGV handler and adjust message displayed by Vtop_level
3277 if appropriate.
3278 (syms_of_keyboard): DEFVAR Vtop_level_message and initialize
3279 new variables described above.
3280 * sysdep.c [HAVE_SYS_RESOURCE_H]: Include sys/resource.h as such.
3281 (stack_grows_down, sigsegv_stack, handle_sigsegv)
3282 [HAVE_STACK_OVERFLOW_HANDLING]: New variables and function.
3283 (init_sigsegv): New function.
3284 (init_signals): Use it.
3285
3286 2014-08-25 Ken Brown <kbrown@cornell.edu>
3287
3288 * emacs.c (main): Remove use of obsolete macro
3289 G_SLICE_ALWAYS_MALLOC.
3290
3291 2014-08-25 Eli Zaretskii <eliz@gnu.org>
3292
3293 Implement locale-sensitive string collation for MS-Windows.
3294 * w32proc.c (get_lcid_callback, get_lcid, w32_compare_strings):
3295 New functions. (Bug#18051)
3296
3297 * w32.h (w32_compare_strings): Add prototype.
3298
3299 * w32.c <g_b_init_compare_string_w>: New global flag.
3300 (globals_of_w32): Initialize it.
3301
3302 * sysdep.c (str_collate) [WINDOWSNT]: Implementation for MS-Windows.
3303
3304 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp)
3305 [WINDOWSNT]: Call str_collate on MS-Windows.
3306
3307 2014-08-25 Dmitry Antipov <dmantipov@yandex.ru>
3308
3309 One more minor cleanup of font subsystem.
3310 * font.h (struct font_driver): Convert text_extents to
3311 return void because returned value is never actually used.
3312 * macfont.m (macfont_text_extents):
3313 * w32font.c (w32font_text_extents):
3314 * xftfont.c (xftfont_text_extents): Adjust to return void
3315 and assume that 'metrics' argument is always non-NULL.
3316 * ftfont.c (ftfont_text_extents):
3317 * xfont.c (xfont_text_extents): Likewise. Avoid redundant memset.
3318
3319 2014-08-25 Paul Eggert <eggert@cs.ucla.edu>
3320
3321 Minor cleanups of str_collate fix (Bug#18051).
3322 * fns.c (str_collate): Move decl from here ...
3323 * lisp.h (str_collate): ... to here.
3324 * sysdep.c (str_collate): Prune away some of the forest of ifdefs.
3325 Remove unnecessary casts. Use SAFE_NALLOCA to avoid
3326 potential problems with integer overflow. Don't assume
3327 setlocale succeeds. Remove unnecessary test before restoring
3328 locale via setlocale, and free the copied setlocale string
3329 when done with it.
3330
3331 2014-08-24 Michael Albinus <michael.albinus@gmx.de>
3332
3333 * fns.c (Fstring_collate_lessp, Fstring_collate_equalp): New DEFUNs.
3334
3335 * sysdep.c (str_collate): New function. (Bug#18051)
3336
3337 2014-08-23 Karol Ostrovsky <karol.ostrovsky@gmail.com> (tiny change)
3338
3339 * Makefile.in (emacs$(EXEEXT)): Retry deletion of bootstrap-emacs
3340 if the initial "rm -f" fails. This is for MinGW builds, where
3341 MS-Windows will not allow deleting the executable file of a
3342 running program.
3343
3344 2014-08-20 Eli Zaretskii <eliz@gnu.org>
3345
3346 * w32term.c (w32_scroll_bar_handle_click)
3347 (w32_horizontal_scroll_bar_handle_click)
3348 (x_scroll_bar_report_motion)
3349 (x_horizontal_scroll_bar_report_motion): For SB_THUMBPOSITION and
3350 SB_THUMBTRACK, use the 32-bit position information returned by
3351 GetScrollInfo, not the 16-bit information returned in the Windows
3352 message sent to us.
3353
3354 2014-08-19 Eli Zaretskii <eliz@gnu.org>
3355
3356 * w32term.c (w32_horizontal_scroll_bar_handle_click): Fix the
3357 second coordinate ('y') reported for dragging the horizontal
3358 scroll bar thumb.
3359
3360 2014-08-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
3361
3362 * xdisp.c (erase_phys_cursor): Fix confusion between window-relative
3363 and text area-relative x-coordinates.
3364
3365 2014-08-17 Eli Zaretskii <eliz@gnu.org>
3366
3367 Avoid overwriting the reversed_p flags in the glyph matrices when
3368 init_iterator or start_display are called.
3369 * xdisp.c (init_iterator): Don't initialize the reversed_p flag of
3370 the glyph row here.
3371 (tool_bar_height, redisplay_tool_bar, try_window)
3372 (try_window_reusing_current_matrix, try_window_id)
3373 (get_overlay_arrow_glyph_row, display_menu_bar): Initialize the
3374 reversed_p flag of the iterator's glyph row where the glyph row
3375 is going to be redrawn.
3376
3377 2014-08-16 Paul Eggert <eggert@cs.ucla.edu>
3378
3379 * xdisp.c (set_horizontal_scroll_bar): Don't use uninitialized local.
3380
3381 2014-08-16 Martin Rudalics <rudalics@gmx.at>
3382
3383 * w32term.c (w32_horizontal_scroll_bar_handle_click): In y part
3384 of emacs_event return length from si.nPage to si.nMax.
3385 * xdisp.c (set_horizontal_scroll_bar): For right-to-left text
3386 interchange start and end of thumb.
3387
3388 2014-08-15 Ken Brown <kbrown@cornell.edu>
3389
3390 * gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use
3391 ERRORCHECK mutexes. (Bug#18222)
3392
3393 2014-08-12 Martin Rudalics <rudalics@gmx.at>
3394
3395 * frame.c (set_menu_bar_lines_1): Remove.
3396 (set_menu_bar_lines): Call change_frame_size instead of
3397 set_menu_bar_lines_1.
3398
3399 2014-08-11 Jan Djärv <jan.h.d@swipnet.se>
3400
3401 * nsfns.m (Fx_create_frame): Call adjust_frame_size,
3402 set f->official.
3403
3404 2014-08-11 Glenn Morris <rgm@gnu.org>
3405
3406 * fileio.c: Revert 2013-01-31 change, which chose coding system for
3407 writing before backing up, since it causes a more serious problem
3408 than the one it solves. (Closes Bug#18141, reopens Bug#13522.)
3409 (choose_write_coding_system): No longer callable from Lisp.
3410 Move last piece back here from Fwrite_region.
3411 (Fwrite_region, syms_of_fileio): Update for above changes.
3412
3413 2014-08-11 Martin Rudalics <rudalics@gmx.at>
3414
3415 * window.c (Fwindow_valid_p): Fix doc-string (Bug#18194).
3416 (Fwindow_new_total, Fwindow_normal_size, Fwindow_new_normal)
3417 (Fwindow_new_pixel, Fset_window_new_pixel)
3418 (Fset_window_new_total, Fset_window_new_normal)
3419 (Fwindow_resize_apply): Fix doc-strings (see Bug#18112).
3420 See also:
3421 http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-08/msg00287.html
3422
3423 2014-08-11 Eli Zaretskii <eliz@gnu.org>
3424
3425 * fontset.c (Finternal_char_font): Recompute basic faces if the
3426 frame's face cache was cleared. (Bug#18162)
3427
3428 2014-08-11 Dmitry Antipov <dmantipov@yandex.ru>
3429
3430 Fix bug with uninitialized undo list of an indirect buffer (Bug#18180).
3431 * buffer.c (Fmake_indirect_buffer): Initialize undo list with the
3432 base buffer's undo list.
3433
3434 2014-08-10 Reuben Thomas <rrt@sc3d.org>
3435
3436 Fix a couple of recent inadvertent breaks of the MSDOS port.
3437 * msdos.c: include required menu.h
3438 * term.c: set correct menu_show_hook on MSDOS.
3439
3440 2014-08-10 Martin Rudalics <rudalics@gmx.at>
3441
3442 Fix handling of menu bar line on TTY frames (Bug#18136)
3443 (Bug#18196).
3444 * dispnew.c (handle_window_change_signal):
3445 * keyboard.c (Fsuspend_emacs): Call change_frame_size with
3446 frame's menu bar lines subtracted from height.
3447 * frame.c (frame_inhibit_resize): Inhibit resizing of TTY
3448 frames.
3449 (adjust_frame_size): Count in menu bar when setting FrameRows.
3450 (make_terminal_frame): When setting up the frame's lines and
3451 text height don't count in the menu bar.
3452 (Fmake_terminal_frame): Call adjust_frame_size with menu bar
3453 lines subtracted from height.
3454 (do_switch_frame): Set tty's FrameRows to number of total lines
3455 of frame.
3456 (Fframe_pixel_height, Fframe_pixel_width): If no window system
3457 is used, return total number of lines and columns.
3458 * menu.c (emulate_dialog_with_menu): Use FRAME_TOTAL_LINES instead
3459 of FRAME_LINES.
3460 * term.c (OUTPUT, tty_set_terminal_modes)
3461 (tty_set_terminal_window, tty_set_scroll_region)
3462 (tty_clear_to_end, tty_write_glyphs, tty_write_glyphs_with_face)
3463 (tty_ins_del_lines, tty_menu_display, tty_menu_activate):
3464 Use FRAME_TOTAL_LINES instead of FRAME_LINES.
3465 (Fresume_tty): Use FRAME_TOTAL_LINES instead of FRAME_LINES.
3466 Call change_frame_size with frame's menu bar lines subtracted
3467 from height.
3468 * w32console.c (w32con_clear_to_end, w32con_clear_frame)
3469 (w32con_ins_del_lines): Use FRAME_TOTAL_LINES instead of
3470 FRAME_LINES.
3471
3472 2014-08-09 Reuben Thomas <rrt@sc3d.org>
3473
3474 * alloc.c (Fmemory_info): Remove a stray brace.
3475
3476 * process.c: Fix a comment typo.
3477
3478 * msdos.c, dosfns.c (init_dosfns): Remove support for DJGPP < 2.02.
3479
3480 2014-08-09 Jan Djärv <jan.h.d@swipnet.se>
3481
3482 * widgetprv.h (EmacsFramePart): Remove font.
3483
3484 * widget.c (DEFAULT_FACE_FONT, EmacsFrameSetValues, setup_frame_gcs)
3485 (resources, setup_frame_cursor_bits): Remove unused variables and
3486 functions, esp. wrt. font (Bug#18227).
3487
3488 2014-08-07 Paul Eggert <eggert@cs.ucla.edu>
3489
3490 * xterm.c (x_delete_terminal): Plug file descriptor leak (Bug#17691).
3491
3492 2014-08-07 Reuben Thomas <rrt@sc3d.org>
3493
3494 Refer to MS-DOS using the same name everywhere.
3495
3496 * editfns.c: Fix a couple of ``MS-DOG''s missed in the previous
3497 commit.
3498 * xfaces.c: ditto.
3499
3500 2014-08-05 Martin Rudalics <rudalics@gmx.at>
3501
3502 * w32term.c (w32_redeem_scroll_bar):
3503 * xterm.c (XTredeem_scroll_bar): Revert part of last change by
3504 not redeeming scroll bars that have been turned off.
3505
3506 2014-08-05 Dmitry Antipov <dmantipov@yandex.ru>
3507
3508 * keyboard.c (safe_run_hooks): Follow the convenient style to bind
3509 inhibit-quit to t and pass 2 args to safe_run_hook_funcall. See
3510 <http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00077.html>.
3511 (safe_run_hook_funcall): Adjust accordingly.
3512
3513 2014-08-04 Martin Rudalics <rudalics@gmx.at>
3514
3515 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS):
3516 Condition correctly according to toolkit used.
3517 * frame.c (make_initial_frame, make_terminal_frame)
3518 (x_set_horizontal_scroll_bars, x_set_scroll_bar_height)
3519 (Vdefault_frame_horizontal_scroll_bars): Correctly condition
3520 assignments according to presence of toolkit scrollbars.
3521 * window.h (WINDOW_HAS_HORIZONTAL_SCROLL_BAR):
3522 Condition correctly according to toolkit used.
3523 * window.c (set_window_scroll_bars): Set horizontal scroll bar
3524 only if toolkit supports it.
3525 * w32term.c (w32_redeem_scroll_bar): Always redeem scroll bar if
3526 present.
3527 * xterm.c (x_scroll_bar_create): Initialize horizontal slot for
3528 non-toolkit builds.
3529 (XTredeem_scroll_bar): Always redeem scroll bar if present.
3530
3531 2014-08-04 Dmitry Antipov <dmantipov@yandex.ru>
3532
3533 * keyboard.c (safe_run_hook_funcall): Avoid consing around
3534 Vinhibit_quit and prefer internal_condition_case_n to pass args.
3535 (safe_run_hooks_error, safe_run_hooks_1): Adjust accordingly.
3536 (safe_run_hooks): Remove comment which is not relevant any more.
3537
3538 2014-08-03 Paul Eggert <eggert@cs.ucla.edu>
3539
3540 Don't let big frames overrun the stack.
3541 * dispnew.c (mirrored_line_dance, mirror_line_dance, scrolling):
3542 Use SAFE_NALLOCA, not alloca.
3543
3544 Fix bug with clang + directory_files_internal + GC (Bug#16986).
3545 * dired.c (directory_files_internal): Use a volatile variable
3546 to prevent the compiler from optimizing away all copies of a local.
3547 I wonder how many other GC-related bugs like this lurk elsewhere?
3548
3549 Avoid 100% CPU utilization on ssh session exit (Bug#17691).
3550 * xterm.h (struct x_display_info): New member 'connection'.
3551 * xterm.c (x_term_init, x_delete_terminal): Set and use it,
3552 so that x_delete_terminal has a file descriptor to pass to
3553 delete_keyboard_wait_descriptor.
3554
3555 Don't mishandle year-9999 dates (Bug#18176).
3556 * editfns.c (decode_time_components): Store an invalid timespec
3557 on overflow, instead of returning false, so that the caller can
3558 distinguish overflow from other errors.
3559 (lisp_time_argument, lisp_seconds_argument): If the time is out
3560 of range, signal a time overflow instead of an invalid time spec.
3561 * keyboard.c (decode_timer): Treat time overflow like other
3562 timespec errors.
3563
3564 Avoid undefined behavior with signed left shift.
3565 Caught by 'gcc -fsanitize=undefined'.
3566 * dispextern.h, scroll.c (scrolling_max_lines_saved, scrolling_1):
3567 * dispnew.c (line_hash_code, scrolling):
3568 * scroll.c (calculate_scrolling, calculate_direct_scrolling):
3569 Use 'unsigned', not 'int', for line hashes.
3570 (scrolling_max_lines_saved): Avoid mystery constants for hash sizes.
3571
3572 2014-08-02 Paul Eggert <eggert@cs.ucla.edu>
3573
3574 Make compare-strings more compatible with old behavior (Bug#17903).
3575 * fns.c (Fcompare_strings): Silently bring too-large ends into range.
3576
3577 2014-08-02 Jan Djärv <jan.h.d@swipnet.se>
3578
3579 * gtkutil.c (create_dialog): Force min spacing 10 between buttons.
3580 Don't add label between left and right buttons (Bug#18129).
3581
3582 2014-08-01 Paul Eggert <eggert@cs.ucla.edu>
3583
3584 Make functions static that no longer need to be extern.
3585 * frame.c, frame.h (set_menu_bar_lines):
3586 * keyboard.c (Qleftmost, Qrightmost):
3587 * xfns.c, frame.h, menu.h (x_set_menu_bar_lines, x_set_tool_bar_lines)
3588 (x_set_internal_border_width):
3589 Now static.
3590
3591 2014-08-01 Eli Zaretskii <eliz@gnu.org>
3592
3593 Fix display of R2L lines when the last character fits only partially.
3594 See http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00476.html
3595 for the details.
3596 * xdisp.c (extend_face_to_end_of_line): If the last glyph of an
3597 R2L row is visible only partially, give the row a negative x
3598 offset.
3599 (display_line): Fix the calculation of the glyph whose pixel width
3600 is used to decide whether the last produced glyph fits on the
3601 line. When the last glyph fits only partially, give the row a
3602 negative x offset.
3603
3604 Fix hscroll of R2L lines that begin with a TAB or another wide glyph.
3605 * xdisp.c (append_stretch_glyph): In a R2L glyph row, decrease the
3606 pixel width of the first glyph that is hscrolled from display.
3607 (display_line): In R2L glyph rows, don't give a negative offset to
3608 row->x when the first glyph begins before first_visible_x.
3609
3610 * xdisp.c (display_line): If called with iterator set up to write
3611 to a marginal area, delay the call to handle_line_prefix until we
3612 switch back to the text area. (Bug#18035)
3613
3614 * .gdbinit (xwindow): The members total_cols, total_lines,
3615 left_col, and top_line are C integers (and has been so for the
3616 last 1.5 years).
3617
3618 2014-08-01 Andreas Schwab <schwab@suse.de>
3619
3620 * macros.c (Fstart_kbd_macro): Initialize kbd_macro_ptr and
3621 kbd_macro_end together with kbd_macro_buffer. (Bug#18140)
3622
3623 2014-08-01 Dmitry Antipov <dmantipov@yandex.ru>
3624
3625 * atimer.c (toplevel) [HAVE_TIMERFD]: Include errno.h.
3626 (timerfd_callback): Ignore weird events with no data. Add tight
3627 assertions and comments.
3628 (init_atimer) [HAVE_TIMERFD]: Add environment variable to optionally
3629 disable timerfd-based timer. Use TFD_NONBLOCK for timer descriptor.
3630
3631 2014-08-01 Paul Eggert <eggert@cs.ucla.edu>
3632
3633 * frame.c (x_set_frame_parameters): Fix typo in previous patch.
3634 I had confused && with ||.
3635
3636 2014-07-31 Paul Eggert <eggert@cs.ucla.edu>
3637
3638 Simplify timerfd configuration and fix some minor glitches.
3639 * atimer.c (TIMERFD_CREATE_FLAGS): Remove; we now assume TFD_CLOEXEC.
3640 (alarm_timer, alarm_timer_ok, set_alarm, init_atimer):
3641 Fall back on timer_create if timerfd_create fails at runtime.
3642 (resolution) [HAVE_CLOCK_GETRES]: Remove; we now rely on the
3643 kernel primitives to do resolution. All uses removed.
3644 (timerfd) [!HAVE_TIMERFD]: Define to be -1, for convenience.
3645 (turn_on_atimers): Clear timer_create-based timers too,
3646 for consistency.
3647
3648 * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
3649 Without this change, the code can access the local variable 'width'
3650 even when it has not been initialized, and likewise for 'height';
3651 in either case this leads to undefined behavior.
3652
3653 2014-07-30 Dmitry Antipov <dmantipov@yandex.ru>
3654
3655 * xrdb.c (x_load_resources) [USE_MOTIF]: Although not strictly
3656 necessary, put horizontal scroll bar resources as well. See
3657 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00430.html>.
3658 * xterm.c (x_sync_with_move): Really wait 0.5s, not 0.0005s.
3659
3660 2014-07-29 Dmitry Antipov <dmantipov@yandex.ru>
3661
3662 * xrdb.c (x_load_resources) [!USE_MOTIF]: Put horizontal scroll bar
3663 background value to match the resource of its vertical counterpart.
3664
3665 2014-07-29 Martin Rudalics <rudalics@gmx.at>
3666
3667 * frame.c (adjust_frame_size): Use FRAME_WINDOW_P instead of
3668 FRAME_X_WINDOW when calling x_set_window_size (Bug#18138).
3669
3670 2014-07-28 Martin Rudalics <rudalics@gmx.at>
3671
3672 * frame.c (x_set_frame_parameters): Revert part of 2014-07-24
3673 change that added the top margin height to the requested height
3674 and revert (undocumented) part of 2014-07-28 change that changed
3675 the logic of whether a size change occurred.
3676
3677 2014-07-28 Eli Zaretskii <eliz@gnu.org>
3678
3679 * .gdbinit (xwindow): The members total_cols, total_lines,
3680 left_col, and top_line are C integers (and has been so for the
3681 last 1.5 years).
3682
3683 * .gdbinit (xsubchartable): The members 'depth' and 'min_char' are
3684 now C integers.
3685
3686 2014-07-28 Dmitry Antipov <dmantipov@yandex.ru>
3687
3688 On GNU/Linux, use timerfd for asynchronous timers.
3689 * atimer.c (toplevel) [HAVE_TIMERFD]: Include sys/timerfd.h.
3690 (toplevel): Rename alarm_timer_ok to special_timer_available.
3691 [HAVE_TIMERFD]: Declare timerfd.
3692 [HAVE_CLOCK_GETRES]: Declare resolution.
3693 (start_atimer) [HAVE_CLOCK_GETRES]: Round up timestamp to
3694 system timer resolution.
3695 (set_alarm) [HAVE_TIMERFD]: Use timerfd_settime.
3696 (timerfd_callback) [HAVE_TIMERFD]: New function.
3697 (atimer_result, debug_timer_callback, Fdebug_timer_check)
3698 [ENABLE_CHECKING]: New function for the sake of automated tests.
3699 (init_atimer) [HAVE_TIMERFD]: Setup timerfd.
3700 [HAVE_CLOCK_GETRES]: Likewise for system timer resolution.
3701 [ENABLE_CHECKING]: Defsubr test function.
3702 * atimer.h (timerfd_callback) [HAVE_TIMERFD]: Add prototype.
3703 * lisp.h (add_timer_wait_descriptor) [HAVE_TIMERFD]: Likewise.
3704 * process.c (add_timer_wait_descriptor) [HAVE_TIMERFD]: New function.
3705
3706 Fix --without-x build and pacify --enable-gcc-warnings.
3707 Problems reported in Bug#18122 and Bug#18124.
3708 * frame.c (get_frame_param): Define even if !HAVE_WINDOW_SYSTEM.
3709 (frame_windows_min_size): Now static.
3710 * frame.h (FRAME_HAS_HORIZONTAL_SCROLL_BARS) [!HAVE_WINDOW_SYSTEM]:
3711 Define as no-op.
3712 (adjust_frame_size): Always declare prototype.
3713
3714 Fix Gnus-related issues reported by David Kastrup <dak@gnu.org> in
3715 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00370.html>.
3716 * atimer.c (timerfd_callback): Always read expiration data.
3717 Add comment.
3718 (turn_on_atimers) [HAVE_TIMERFD]: Disarm timerfd timer.
3719 * process.c (add_timer_wait_descriptor): Add timer descriptor
3720 to input_wait_mask and non_process_wait_mask as well.
3721
3722 2014-07-28 Paul Eggert <eggert@cs.ucla.edu>
3723
3724 * frame.c (x_set_frame_parameters): Don't use uninitialized locals.
3725
3726 2014-07-27 Jan Djärv <jan.h.d@swipnet.se>
3727
3728 * nsterm.m (applicationDidFinishLaunching antialiasThresholdDidChange):
3729 Reinstate code removed by the prevoius commit to this file.
3730
3731 2014-07-27 Martin Rudalics <rudalics@gmx.at>
3732
3733 * buffer.h (struct buffer): New fields scroll_bar_height and
3734 horizontal_scroll_bar_type.
3735 * buffer.c (bset_scroll_bar_height)
3736 (bset_horizontal_scroll_bar_type): New functions.
3737 (Fbuffer_swap_text): Handle old_pointm field.
3738 (init_buffer_once): Set defaults for scroll_bar_height and
3739 horizontal_scroll_bar_type.
3740 (syms_of_buffer): New variables scroll_bar_height and
3741 horizontal_scroll_bar_type.
3742 * dispextern.h (window_part): Rename ON_SCROLL_BAR to
3743 ON_VERTICAL_SCROLL_BAR. Add ON_HORIZONTAL_SCROLL_BAR.
3744 (set_vertical_scroll_bar): Remove prototype.
3745 (x_change_tool_bar_height): Add prototype.
3746 * dispnew.c (adjust_frame_glyphs_for_frame_redisplay)
3747 (window_to_frame_vpos, update_frame_1, scrolling, init_display):
3748 Use FRAME_TOTAL_COLS and FRAME_TOTAL_LINES instead of FRAME_COLS
3749 and FRAME_LINES.
3750 (adjust_frame_glyphs_for_window_redisplay): Rearrange lines.
3751 (update_window): Start mode_line_row->y after horizontal scroll
3752 bar.
3753 (change_frame_size_1): Call adjust_frame_size.
3754 (init_display): When changing the size of a tty frame do not
3755 pass height of menu bar.
3756 (Qframe_windows_min_size): New symbol.
3757 * frame.h (struct frame): List tool bar fields after menu bar
3758 fields. Add official, total_lines, horizontal_scroll_bars,
3759 config_scroll_bar_height and config_scroll_bar_lines fields.
3760 (FRAME_HAS_HORIZONTAL_SCROLL_BARS)
3761 (FRAME_CONFIG_SCROLL_BAR_HEIGHT, FRAME_CONFIG_SCROLL_BAR_LINES)
3762 (FRAME_SCROLL_BAR_AREA_HEIGHT, FRAME_SCROLL_BAR_COLS)
3763 (FRAME_SCROLL_BAR_LINES, FRAME_TOTAL_LINES, SET_FRAME_LINES)
3764 (FRAME_WINDOWS_HEIGHT): New macros.
3765 (SET_FRAME_HEIGHT, FRAME_TEXT_LINES_TO_PIXEL_HEIGHT)
3766 (FRAME_PIXEL_Y_TO_LINE, FRAME_PIXEL_HEIGHT_TO_TEXT_LINES)
3767 (FRAME_TEXT_TO_PIXEL_HEIGHT): Separately count top margin and
3768 horizontal scroll bar.
3769 (frame_inhibit_resize, adjust_frame_size)
3770 (frame_windows_min_size): Add declarations.
3771 (Qscroll_bar_height, Qhorizontal_scroll_bars)
3772 (x_set_scroll_bar_default_height, x_set_left_fringe)
3773 (x_set_right_fringe, x_set_vertical_scroll_bars)
3774 (x_set_horizontal_scroll_bars, x_set_scroll_bar_width)
3775 (x_set_scroll_bar_height): Add external declarations.
3776 * frame.c: (frame_inhibit_resize, frame_windows_min_size)
3777 (adjust_frame_size): New functions.
3778 (make_frame): Initial horizontal_scroll_bars field.
3779 Use SET_FRAME_LINES. Don't allow horizontal scroll bar in
3780 minibuffer window.
3781 (make_initial_frame, make_terminal_frame): No horizontal scroll
3782 bar in initial and terminal frames. Use adjust_frame_size.
3783 (Fframe_total_cols): Fix doc-string.
3784 (Fframe_total_lines, Fscroll_bar_height): New Lisp functions.
3785 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
3786 Rewrite using adjust_frame_size.
3787 (Qscroll_bar_height, Qhorizontal_scroll_bars)
3788 (Qframe_windows_min_size): New symbols.
3789 (x_set_frame_parameters): Remove call of check_frame_size.
3790 (x_report_frame_params): Return scroll_bar_height value.
3791 (x_set_left_fringe, x_set_right_fringe): New functions.
3792 (adjust_frame_height, x_set_internal_border_width)
3793 (x_set_fringe_width): Remove.
3794 (x_set_internal_border_width, x_set_vertical_scroll_bars)
3795 (x_set_scroll_bar_width, x_set_right_divider_width)
3796 (x_set_bottom_divider_width): Rewrite using adjust_frame_size.
3797 (x_set_horizontal_scroll_bars, x_set_scroll_bar_height):
3798 New functions.
3799 (x_figure_window_size): Rewrite to make frame display the
3800 expected number of lines.
3801 (Vdefault_frame_scroll_bars): Rewrite doc-string.
3802 (Vdefault_frame_horizontal_scroll_bars)
3803 (Vframe_initial_frame_tool_bar_height)
3804 (frame_inhibit_implied_resize): New variables.
3805 * fringe.c (compute_fringe_widths): Remove.
3806 * gtkutil.h (YG_SB_MIN, YG_SB_MAX, YG_SB_RANGE): Define.
3807 (xg_create_horizontal_scroll_bar)
3808 (xg_update_horizontal_scrollbar_pos)
3809 (xg_set_toolkit_horizontal_scroll_bar_thumb)
3810 (xg_get_default_scrollbar_height)
3811 (xg_clear_under_internal_border): Extern.
3812 * gtkutil.c (xg_frame_resized): Don't call
3813 do_pending_window_change.
3814 (xg_frame_set_char_size): Use adjust_frame_size.
3815 (style_changed_cb): Call update_theme_scrollbar_height and
3816 x_set_scroll_bar_default_height.
3817 (x_wm_set_size_hint): Don't call check_frame_size.
3818 (update_theme_scrollbar_height)
3819 (xg_get_default_scrollbar_height)
3820 (xg_create_horizontal_scroll_bar)
3821 (xg_update_horizontal_scrollbar_pos)
3822 (xg_set_toolkit_horizontal_scroll_bar_thumb): New functions.
3823 (xg_create_scroll_bar): Set horizontal slot of bar.
3824 (xg_initialize): Call update_theme_scrollbar_height.
3825 (xg_clear_under_internal_border): No more static.
3826 * insdel.c (adjust_suspend_auto_hscroll): New function.
3827 (adjust_markers_for_delete, adjust_markers_for_insert)
3828 (adjust_markers_for_replace): Call adjust_suspend_auto_hscroll.
3829 * keyboard.c (readable_events, discard_mouse_events)
3830 (make_lispy_event): Handle horizontal scroll bar click events.
3831 (Fsuspend_emacs): When changing the size of a tty frame do not
3832 pass height of menu bar.
3833 (Qbefore_handle, Qhorizontal_handle, Qafter_handle, Qleft)
3834 (Qright, Qleftmost, Qrightmost): New symbols.
3835 * menu.c (Fx_popup_dialog): Use FRAME_TOTAL_LINES instead of
3836 FRAME_LINES.
3837 * minibuf.c (read_minibuf): Initialize suspend_auto_hscroll.
3838 * nsfns.m (x_set_internal_border_width): New function.
3839 * nsterm.m (ns_draw_fringe_bitmap, ns_set_vertical_scroll_bar):
3840 Remove extended fringe code.
3841 (x_set_window_size, x_new_font): Don't call
3842 compute_fringe_widths.
3843 * term.c (Fresume_tty): When changing the size of a tty frame do
3844 not pass height of menu bar.
3845 (clear_tty_hooks, set_tty_hooks):
3846 Clear horizontal_scroll_bar_hook.
3847 (init_tty): Frame has no horizontal scroll bars.
3848 * termhooks.h (enum scroll_bar_part): Add scroll_bar_move_ratio,
3849 scroll_bar_before_handle, scroll_bar_horizontal_handle,
3850 scroll_bar_after_handle, scroll_bar_left_arrow,
3851 scroll_bar_right_arrow, scroll_bar_to_leftmost and
3852 scroll_bar_to_rightmost entries.
3853 (enum event_kind): Add HORIZONTAL_SCROLL_BAR_CLICK_EVENT
3854 (struct terminal): Add set_horizontal_scroll_bar_hook.
3855 * w32console.c (initialize_w32_display):
3856 Clear horizontal_scroll_bar_hook.
3857 * w32fns.c (x_set_mouse_color): Use FRAME_W32_DISPLAY instead of
3858 FRAME_X_DISPLAY.
3859 (x_clear_under_internal_border, x_set_internal_border_width):
3860 New functions.
3861 (x_set_menu_bar_lines): Rewrite using frame_inhibit_resize.
3862 Set windows_or_buffers_changed when adding the menu bar.
3863 (x_set_tool_bar_lines): Rewrite using adjust_frame_size.
3864 (x_change_tool_bar_height, x_set_scroll_bar_default_height)
3865 (w32_createhscrollbar): New functions.
3866 (w32_createscrollbar): Rename to w32_createvscrollbar.
3867 (w32_createwindow): Init WND_HSCROLLBAR_INDEX.
3868 (w32_name_of_message): Replace WM_EMACS_CREATESCROLLBAR by
3869 WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR.
3870 Add WM_EMACS_SHOWCURSOR.
3871 (w32_wnd_proc): Handle WM_HSCROLL case. In WM_WINDOWPOSCHANGING
3872 case do not artificially impose WM size hints.
3873 Handle WM_EMACS_SHOWCURSOR case. Replace WM_EMACS_CREATESCROLLBAR case
3874 by WM_EMACS_CREATEVSCROLLBAR and WM_EMACS_CREATEHSCROLLBAR
3875 cases.
3876 (my_create_tip_window): Replace WND_SCROLLBAR_INDEX by
3877 WND_VSCROLLBAR_INDEX and WND_HSCROLLBAR_INDEX.
3878 (unwind_create_frame_1): Remove.
3879 (Fx_create_frame): Make both scrollbars the system standard
3880 width and height. Use official field of frame structure to
3881 inhibit running window-configuration-change-hook.
3882 (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
3883 pixelwise. Handle frame's official field.
3884 (w32_frame_parm_handlers): Remove x_set_fringe_width
3885 entries. Add x_set_scroll_bar_height,
3886 x_set_horizontal_scroll_bars, x_set_left_fringe and
3887 x_set_right_fringe.
3888 * w32inevt.c (resize_event, maybe_generate_resize_event): Do not
3889 pass height of menu bar to change_frame_size.
3890 * w32menu.c (set_frame_menubar): Rewrite using
3891 frame_inhibit_resize.
3892 * w32term.h (struct w32_display_info):
3893 Add horizontal_scroll_bar_cursor and cursor_display_counter.
3894 (struct scroll_bar): Add horizontal.
3895 (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
3896 (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
3897 (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH)
3898 (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
3899 (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
3900 (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
3901 (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
3902 (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): New macros.
3903 (WM_EMACS_CREATEVSCROLLBAR, WM_EMACS_CREATEHSCROLLBAR):
3904 Define instead of WM_EMACS_CREATESCROLLBAR.
3905 (WND_VSCROLLBAR_INDEX, WND_HSCROLLBAR_INDEX): Define instead of
3906 WND_SCROLLBAR_INDEX.
3907 * w32term.c (horizontal_scroll_bar_min_handle)
3908 (horizontal_scroll_bar_left_border)
3909 (horizontal_scroll_bar_right_border): New integers.
3910 (x_set_frame_alpha): Replace x_highlight_frame by
3911 w32_focus_frame.
3912 (x_window_to_scroll_bar): New argument "type". Update callers
3913 accordingly.
3914 (w32_set_horizontal_scroll_bar_thumb)
3915 (x_horizontal_scroll_bar_report_motion)
3916 (w32_set_horizontal_scroll_bar)
3917 (w32_horizontal_scroll_bar_handle_click)
3918 (x_horizontal_scroll_bar_report_motion): New functions.
3919 (w32_mouse_position): Discriminate horizontal and vertical
3920 scrollbar cases.
3921 (my_create_scrollbar): Replace with two new functions
3922 my_create_vscrollbar and my_create_hscrollbar.
3923 (x_scroll_bar_create): New argument "horizontal".
3924 Update callers accordingly.
3925 (x_scroll_bar_remove, w32_condemn_scroll_bars)
3926 (w32_redeem_scroll_bar, x_scroll_bar_clear): Handle horizontal
3927 scroll bar case.
3928 (w32_read_socket): Handle WM_HSCROLL cae.
3929 (x_new_font): Don't recompute fringe widths.
3930 Use frame_inhibit_resize. Calculate new menu bar height iff we
3931 build without toolkit. Always clear under internal border.
3932 (x_set_window_size): Don't check frame size or recompute
3933 fringes. Reset fullscreen status before applying sizes.
3934 Always resize as requested by pixelwise argument. Don't call
3935 do_pending_window_change.
3936 (x_wm_set_size_hint): Add call for FRAME_SCROLL_BAR_AREA_HEIGHT.
3937 (w32_initialize_display_info): Initialize dpyinfo's
3938 horizontal_scroll_bar_cursor entry.
3939 (w32_create_terminal): Add set_horizontal_scroll_bar_hook.
3940 (w32_initialize): Init horizontal_scroll_bar_min_handle and
3941 horizontal_scroll_bar_left_border.
3942 (w32fullscreen_hook): Intermittently resize window to normal
3943 when switching from fullscreen to maximized state.
3944 (run_window_configuration_change_hook): Don't run it if frame is
3945 not official yet.
3946 (unwind_change_frame): Remove.
3947 (Fset_window_configuration): Rewrite using frame's official field.
3948 * widget.c (set_frame_size): Don't call compute_fringe_widths.
3949 (EmacsFrameSetCharSize): Obey frame_inhibit_resize.
3950 * window.h (struct window): New fields old_pointm,
3951 horizontal_scroll_bar, horizontal_scroll_bar_type, hscroll_whole,
3952 scroll_bar_height and suspend_auto_hscroll.
3953 (wset_horizontal_scroll_bar, wset_horizontal_scroll_bar_type):
3954 New functions.
3955 (sanitize_window_sizes): Extern.
3956 (MINI_NON_ONLY_WINDOW_P, MINI_ONLY_WINDOW_P, WINDOW_PSEUDO_P)
3957 (WINDOW_TOPMOST_P, WINDOW_HAS_HORIZONTAL_SCROLL_BAR)
3958 (WINDOW_CONFIG_SCROLL_BAR_HEIGHT)
3959 (WINDOW_CONFIG_SCROLL_BAR_LINES)
3960 (WINDOW_SCROLL_BAR_LINES, WINDOW_SCROLL_BAR_AREA_HEIGHT):
3961 New macros.
3962 (WINDOW_LEFT_FRINGE_COLS, WINDOW_RIGHT_FRINGE_COLS)
3963 (WINDOW_FRINGE_COLS, WINDOW_FRINGE_EXTENDED_P): Remove macros.
3964 (WINDOW_VERTICAL_SCROLL_BAR_TYPE)
3965 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_LEFT)
3966 (WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT)
3967 (WINDOW_HAS_VERTICAL_SCROLL_BAR): Minor rewrite.
3968 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT)
3969 (WINDOW_SCROLL_BAR_AREA_Y): Count in scroll bar height.
3970 * window.c (wset_old_pointm, Fwindow_scroll_bar_height)
3971 (Fwindow_old_point, sanitize_window_sizes): New functions.
3972 (Qwindow_sanitize_window_sizes): New symbol.
3973 (window_body_height): Count in horizontal scroll bar.
3974 (set_window_hscroll, Fscroll_left, Fscroll_right):
3975 Set suspend_auto_hscroll slot.
3976 (Fwindow_inside_edges): Count fringes pixelwise.
3977 (coordinates_in_window, Fcoordinates_in_window_p):
3978 Consider horizontal scroll bar.
3979 (check_frame_size, adjust_window_margins): Remove functions and
3980 corresponding calls.
3981 (set_window_buffer): Initialize old_pointm and horizontal scroll bars.
3982 (temp_output_buffer_show): Reset hscroll related fields.
3983 Initialize old_pointm.
3984 (make_parent_window): Initialize old_pointm.
3985 (make_window): Initialize old_pointm, horizontal scroll bar type,
3986 and scroll bar height.
3987 (resize_frame_windows): Don't count top margin in new sizes.
3988 Don't use safe sizes when shrinking a frame; let the window
3989 manager do the clipping.
3990 (Fsplit_window_internal): Inherit horizontal scroll bar type and
3991 height.
3992 (Fdelete_window_internal): Unchain old_pointm marker.
3993 (window_scroll_pixel_based, Fscroll_other_window):
3994 Adjust old_pointm.
3995 (Fwindow_text_width, Fwindow_text_height): New argument
3996 "pixelwise".
3997 (struct saved_window): New fields, old_pointm, hscroll_whole,
3998 suspend_auto_hscroll, scroll_bar_height and
3999 horizontal_scroll_bar_type.
4000 (Fset_window_configuration, save_window_save): Set new fields of
4001 saved_window.
4002 (apply_window_adjustment): Don't call adjust_window_margins.
4003 (set_window_margins): Don't change margins if new sizes don't
4004 fit into window.
4005 (set_window_scroll_bars): New argument "horizontal_type".
4006 Handle horizontal scroll bars. Don't change scroll bars if they
4007 don't fit into window.
4008 (Fset_window_scroll_bars): New argument "horizontal_type".
4009 (Fwindow_scroll_bars): Return values for horizontal scroll bars.
4010 (compare_window_configurations): Compare horizontal scroll bar
4011 settings.
4012 * xdisp.c (window_text_bottom_y, window_box_height): Count in
4013 horizontal scroll bar height.
4014 (pixel_to_glyph_coords, init_xdisp): Use FRAME_TOTAL_LINES
4015 instead of FRAME_LINES.
4016 (remember_mouse_glyph): Case ON_SCROLL_BAR changed to
4017 ON_VERTICAL_SCROLL_BAR.
4018 (with_echo_area_buffer): Initialize old_pointm.
4019 (with_echo_area_buffer_unwind_data): Store old_pointm values in
4020 vector.
4021 (unwind_with_echo_area_buffer): Handle old_pointm.
4022 (update_tool_bar): Set do_update when the tool bar window has at
4023 least one line (since this is what the user sets).
4024 (MAX_FRAME_TOOL_BAR_HEIGHT): Remove macro.
4025 (redisplay_tool_bar): Return early when toolbar has zero lines.
4026 Call x_change_tool_bar_height. Don't use max_tool_bar_height.
4027 (hscroll_window_tree): Handle suspension of auto_hscroll and
4028 old_pointm.
4029 (set_horizontal_scroll_bar): New function.
4030 (redisplay_window): Set ignore_mouse_drag_p when tool bar has
4031 more than one line. Handle horizontal scroll bars.
4032 (note_mouse_highlight): Handle horizontal scrol bars.
4033 (expose_frame): Set dimensions of XRectangle from frame's text
4034 sizes.
4035 (Vvoid_text_area_pointer): Update doc-string.
4036 * xfns.c (x_set_menu_bar_lines): Use adjust_frame_size.
4037 (x_change_tool_bar_height, x_set_scroll_bar_default_height)
4038 (x_set_internal_border_width): New functions.
4039 (x_set_tool_bar_lines): Call x_change_tool_bar_height.
4040 (unwind_create_frame_1): Remove.
4041 (Fx_create_frame): Handle horizontal scroll bars. Use official
4042 field of frame structure to inhibit running
4043 window-configuration-change-hook.
4044 (x_create_tip_frame): Call SET_FRAME_LINES and change_frame_size
4045 pixelwise. Handle frame's official field.
4046 (x_frame_parm_handlers): Add x_set_scroll_bar_height,
4047 x_set_horizontal_scroll_bars, x_set_left_fringe,
4048 x_set_right_fringe.
4049 * xmenu.c (update_frame_menubar, free_frame_menubar):
4050 Use adjust_frame_size.
4051 * xterm.h (struct x_display_info):
4052 Add horizontal_scroll_bar_cursor and Xatom_Horizontal_Scrollbar
4053 slots.
4054 (struct scroll_bar): Add horizontal slot.
4055 (HORIZONTAL_SCROLL_BAR_INSIDE_HEIGHT)
4056 (HORIZONTAL_SCROLL_BAR_LEFT_RANGE)
4057 (HORIZONTAL_SCROLL_BAR_INSIDE_WIDTH): New macros.
4058 (HORIZONTAL_SCROLL_BAR_LEFT_BORDER)
4059 (HORIZONTAL_SCROLL_BAR_RIGHT_BORDER)
4060 (HORIZONTAL_SCROLL_BAR_TOP_BORDER)
4061 (HORIZONTAL_SCROLL_BAR_BOTTOM_BORDER)
4062 (HORIZONTAL_SCROLL_BAR_MIN_HANDLE): Define.
4063 (x_clear_under_internal_border): Remove.
4064 * xterm.c (XTmouse_position): Handle horizontal scroll bars.
4065 (x_window_to_scroll_bar): New argument TYPE. Update callers.
4066 (x_send_scroll_bar_event, x_scroll_bar_create): New arguments
4067 HORIZONTAL. Update callers.
4068 (horizontal_action_hook_id): New action hook id.
4069 (x_horizontal_scroll_bar_to_input_event)
4070 (x_create_horizontal_toolkit_scroll_bar)
4071 (xt_horizontal_action_hook)
4072 (x_set_toolkit_horizontal_scroll_bar_thumb)
4073 (XTset_horizontal_scroll_bar, x_net_wm_state)
4074 (x_horizontal_scroll_bar_report_motion): New functions.
4075 (xg_scroll_callback, x_scroll_bar_handle_click):
4076 Handle horizontal scroll bars.
4077 (SCROLL_BAR_HORIZONTAL_NAME): Define.
4078 (XTset_vertical_scroll_bar): Attempt to clear areas not covered
4079 by scroll bar.
4080 (XTcondemn_scroll_bars, XTredeem_scroll_bar): Rewrite.
4081 Handle horizontal scroll bars.
4082 (handle_one_xevent): Handle horizontal scroll bar events.
4083 Call x_net_wm_state.
4084 (x_set_window_size_1, x_wm_set_size_hint): Don't call
4085 check_frame_size.
4086 (x_set_window_size): Don't call check_frame_size and
4087 do_pending_window_change.
4088 (x_term_init): Init horizontal_scroll_bar_cursor display info.
4089 (x_create_terminal): Add set_horizontal_scroll_bar_hook.
4090 (x_scroll_bar_set_handle): Add some checks when calling
4091 x_clear_area.
4092
4093 2014-07-26 Paul Eggert <eggert@cs.ucla.edu>
4094
4095 Revert previous change.
4096 There is certainly nothing wrong with writing code like 'lo <= i
4097 && i <= hi', even if LO happens to a constant. There isn't even
4098 anything wrong in general with writing 'a <= b' if A happens to
4099 be a constant. At any rate stylistic changes shouldn't
4100 be done like this without discussion.
4101
4102 2014-07-26 Andreas Schwab <schwab@linux-m68k.org>
4103
4104 * alloc.c (xnmalloc, xnrealloc, xpalloc, make_save_value)
4105 (Fgarbage_collect): Reorder conditions that are written backwards.
4106 * data.c (cons_to_unsigned): Likewise.
4107 * dispnew.c (update_frame_1, sit_for): Likewise.
4108 * fileio.c (file_offset): Likewise.
4109 * filelock.c (read_lock_data, lock_file): Likewise.
4110 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
4111 Likewise.
4112 * font.c (font_intern_prop, font_style_symbolic): Likewise.
4113 * lisp.h (FIXNUM_OVERFLOW_P): Likewise.
4114 * lread.c (read1): Likewise.
4115 * minibuf.c (read_minibuf_noninteractive): Likewise.
4116 * nsterm.m (x_set_frame_alpha): Likewise.
4117 * process.c (wait_reading_process_output): Likewise.
4118 * region-cache.c (delete_cache_boundaries): Likewise.
4119 * xterm.c (x_set_frame_alpha): Likewise.
4120
4121 2014-07-25 Paul Eggert <eggert@cs.ucla.edu>
4122
4123 * dispextern.h, xdisp.c (hourglass_shown_p, hourglass_atimer):
4124 Now static.
4125
4126 2014-07-26 Dmitry Antipov <dmantipov@yandex.ru>
4127
4128 * atimer.c (set_alarm) [HAVE_ITIMERSPEC]: Use TIMER_ABSTIME
4129 because atimer expiration is absolute rather than relative.
4130
4131 2014-07-25 Eli Zaretskii <eliz@gnu.org>
4132
4133 * w32term.h (current_popup_menu, menubar_in_use):
4134 Move declarations from w32term.c.
4135
4136 2014-07-25 Martin Rudalics <rudalics@gmx.at>
4137
4138 * w32fns.c (menubar_in_use): No more static.
4139 * w32term.c (current_popup_menu, menubar_in_use): Declare.
4140
4141 2014-07-25 Dmitry Antipov <dmantipov@yandex.ru>
4142
4143 Move hourglass machinery to RIF.
4144 * dispextern.h (struct redisplay_interface): New members
4145 show_hourglass and hide_hourglass. Indent comments.
4146 (show_hourglass, hide_hourglass): Remove prototypes.
4147 * nsterm.m (show_hourgass, hide_hourglass): Refactor to ...
4148 (ns_show_hourglass, ns_hide_hourglass): ... new no-ops.
4149 (ns_redisplay_interface): Add them.
4150 * w32fns.c (show_hourglass, hide_hourglass): Refactor to ...
4151 * w32term.c (w32_show_hourglass, w32_hide_hourglass): ... these.
4152 (w32_arrow_cursor): New function to hack around non-GUI frames.
4153 (w32_redisplay_interface): Add new functions.
4154 * w32term.h (w32_arror_cursor): Add prototype.
4155 * xdisp.c (show_hourglass): New function, refactored out from
4156 platform-dependent code.
4157 (cancel_hourglass): Now call to RIF function.
4158 * xfns.c (show_hourglass, hide_hourglass): Refactor to ...
4159 * xterm.c (x_show_hourglass, x_hide_hourglass): ... these.
4160 (x_redisplay_interface): Add new functions.
4161
4162 2014-07-24 Dmitry Antipov <dmantipov@yandex.ru>
4163
4164 Fix error reported by Angelo Graziosi <angelo.graziosi@alice.it> in
4165 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00274.html>
4166 and complete previous change.
4167 * frame.c (adjust_frame_height): New function.
4168 (Fset_frame_height, Fset_frame_size): Use it.
4169 (x_set_frame_parameters): Take frame top margin into account.
4170
4171 2014-07-23 Dmitry Antipov <dmantipov@yandex.ru>
4172
4173 * frame.c (Fset_frame_height): Take frame top margin into account.
4174 Incorrect behavior was reported by Martin Rudalics <rudalics@gmx.at> in
4175 <http://lists.gnu.org/archive/html/emacs-devel/2014-07/msg00258.html>
4176
4177 2014-07-22 Dmitry Antipov <dmantipov@yandex.ru>
4178
4179 * xterm.h (struct x_output) [USE_X_TOOLKIT || USE_GTK]: Define
4180 menubar_height as such. Tweak comment.
4181 [USE_LUCID && USE_TOOLKIT_SCROLL_BARS]: Likewise for
4182 scroll_bar_top_shadow_pixel and scroll_bar_bottom_shadow_pixel.
4183 All related users changed.
4184 (FRAME_MENUBAR_HEIGHT) [!USE_X_TOOLKIT && !USE_GTK]: No-op.
4185 * xterm.c (handle_one_xevent):
4186 * gtkutil.c (xg_event_is_for_menubar):
4187 * xfns.c (x_window) [USE_X_TOOLKIT]:
4188 * xmenu.c (set_frame_menubar, free_frame_menubar):
4189 Prefer to use FRAME_MENUBAR_HEIGHT.
4190
4191 2014-07-21 Dmitry Antipov <dmantipov@yandex.ru>
4192
4193 * frame.c (Fframe_parameters): Always report frame height without
4194 menu and tool bar lines.
4195
4196 2014-07-21 Jan Djärv <jan.h.d@swipnet.se>
4197
4198 * nsterm.m (applicationDidFinishLaunching:): Call
4199 antialiasThresholdDidChange, register for antialias changes (Bug#17534).
4200 (antialiasThresholdDidChange:): New method for EmacsApp.
4201
4202 * nsterm.h (EmacsApp): Add antialiasThresholdDidChange.
4203
4204 * macfont.m (macfont_update_antialias_threshold): Remove static.
4205
4206 * macfont.h (macfont_update_antialias_threshold): Declare.
4207
4208 2014-07-21 Eli Zaretskii <eliz@gnu.org>
4209
4210 * w32select.c (setup_windows_coding_system):
4211 Apply CODING_ANNOTATION_MASK to the common_flags member of struct
4212 coding_system. Reported by martin rudalics <rudalics@gmx.at>.
4213
4214 * w16select.c (Fw16_get_clipboard_data):
4215 Apply CODING_ANNOTATION_MASK to the common_flags member of struct
4216 coding_system.
4217
4218 * xdisp.c (init_iterator): Initialize it->stop_charpos to the
4219 buffer position where we are to start the iteration.
4220 (handle_invisible_prop): Record in it->stop_charpos the position
4221 where the invisible text ends. (Bug#18035)
4222 (hscroll_window_tree): Don't try hscrolling windows whose cursor
4223 row has zero buffer position as their start position.
4224 Reported by martin rudalics <rudalics@gmx.at>.
4225
4226 * xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
4227 infinite looping in redisplay when display lines don't have enough
4228 space to display even a single character. (Bug#18036)
4229
4230 2014-07-20 Dmitry Antipov <dmantipov@yandex.ru>
4231
4232 * frame.h (struct frame) [USE_X_TOOLKIT]: New member shell_position.
4233 * xfns.c (x_window): Use it to allow xfree later.
4234 (x_encode_text): Drop 3rd arg; unused. Tweak comment and adjust users
4235 where appropriate. Use bool for booleans and remove redundant checks.
4236 (Fx_backspace_delete_keys_p): Use XkbFreeKeyboard; explain why.
4237 * xterm.c (x_free_frame_resources): Free shell_position.
4238
4239 2014-07-19 K. Handa <handa@gnu.org>
4240
4241 * xfaces.c (realize_x_face): Call font_load_for_lface with no
4242 mandatory font spec (Bug#17973).
4243
4244 2014-07-19 Stefan Monnier <monnier@iro.umontreal.ca>
4245
4246 * font.c (font_score): Return the worst score if the size of
4247 ENTITY is wrong by more than a factor 2 (Bug#17973).
4248
4249 2014-07-18 Dmitry Antipov <dmantipov@yandex.ru>
4250
4251 * frame.c (frame_unspecified_color): New function
4252 refactored out from ...
4253 (Fframe_parameters, Fframe_parameter): ... adjusted users.
4254 (x_fullscreen_adjust, set_frame_param): Move Windows-specific
4255 function to ...
4256 * w32term.c (x_fullscreen_adjust, set_frame_param): ... static here.
4257 * frame.h (x_fullscreen_adjust) [HAVE_NTGUI]:
4258 * lisp.h (set_frame_param): Remove prototype.
4259 * xterm.c (x_display_pixel_width, x_display_pixel_height): Now ...
4260 * xterm.h (x_display_pixel_width, x_display_pixel_height): ...
4261 inlined from here.
4262
4263 Prefer 'x_display_info *' to 'Display *' in X selection code.
4264 This helps to avoid unneeded calls to x_display_info_for_display.
4265 * xterm.h (struct selection_input_event): Record 'x_display_info *'
4266 instead of 'Display *'.
4267 (SELECTION_EVENT_DPYINFO): New macro.
4268 (SELECTION_EVENT_DISPLAY): Now inline function to prohibit using
4269 it as an lvalue. Mention this in comment.
4270 * xterm.c (handle_one_xevent): Use SELECTION_EVENT_DPYINFO.
4271 * xselect.c (x_get_window_property_as_lisp_data, x_atom_to_symbol)
4272 (selection_data_to_lisp_data, receive_incremental_selection):
4273 Convert to use 'x_display_info *'. Adjust users where appropriate.
4274 (lisp_data_to_selection_data): Likewise. Also pass 'struct
4275 selection data *' as last arg to not return values in args.
4276 (unexpect_property_change): Use common removal technique.
4277
4278 2014-07-17 Dmitry Antipov <dmantipov@yandex.ru>
4279
4280 * print.c (print_preprocess): Adjust to match changed
4281 sub char-table structure and avoid crash (Bug#18038).
4282
4283 * data.c (wrong_choice): Not static any more.
4284 * lisp.h (wrong_choice): Add prototype.
4285 * frame.h (struct frame) [USE_X_TOOLKIT || HAVE_NTGUI]:
4286 Declare namebuf as such. Tweak comment.
4287 [USE_GTK]: Likewise for tool_bar_position.
4288 (fset_tool_bar_position) [USE_GTK]: Ditto.
4289 (FRAME_TOOL_BAR_POSITION): New macro.
4290 * frame.c (x_report_frame_params):
4291 * gtkutil.c (update_frame_tool_bar):
4292 * xfns.c (Fx_create_frame): Use it.
4293 (x_set_tool_bar_position): Add meaningful diagnostic messages.
4294
4295 2014-07-16 Eli Zaretskii <eliz@gnu.org>
4296
4297 * xdisp.c (decode_mode_spec): Call file-remote-p on the current
4298 buffer's default-directory only if it is a string. (Bug#17986)
4299
4300 2014-07-16 Dmitry Antipov <dmantipov@yandex.ru>
4301
4302 More precise control over values of some buffer-local variables.
4303 * keyboard.c (Qvertical_scroll_bar):
4304 * frame.c (Qleft, Qright): Move to ...
4305 * buffer.c (Qleft, Qright, Qvertical_scroll_bar): ... here.
4306 * buffer.c (Qchoice, Qrange, Qoverwrite_mode, Qfraction): New symbols.
4307 (syms_of_buffer): DEFSYM all of the above, attach special properties.
4308 Use special symbols to DEFVAR_PER_BUFFER overwrite-mode,
4309 vertical-scroll-bar, scroll-up-aggressively
4310 and scroll-down-aggressively.
4311 * buffer.h (Qchoice, Qrange, Qleft, Qright, Qvertical_scroll_bar):
4312 Add declarations.
4313 * nsfns.m, frame.h (Qleft, Qright):
4314 * nsterm.m (Qleft): Remove declarations.
4315 * gtkutil.c (toplevel): Include buffer.h.
4316 * data.c (wrong_choice, wrong_range): New functions.
4317 (store_symval_forwarding): Handle special properties of buffer-local
4318 variables and use functions from the above to signal error, if any.
4319
4320 * frame.h (enum fullscreen_type) [HAVE_WINDOW_SYSTEM]: Use more natural
4321 values. Add comment.
4322 (struct frame): Re-arrange layout to avoid extra padding and use bit
4323 fields for output_method, want_fullscreen and vertical_scroll_bar_type.
4324 (FRAME_VERTICAL_SCROLL_BAR_TYPE, FRAME_HAS_VERTICAL_SCROLL_BARS)
4325 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_LEFT)
4326 (FRAME_HAS_VERTICAL_SCROLL_BARS_ON_RIGHT) [!HAVE_WINDOW_SYSTEM]:
4327 Define as no-ops because there are no scroll bars anyway.
4328 * frame.c (make_frame, make_terminal_frame, make_initial_frame):
4329 Adjust users.
4330
4331 * font.c (fset_font_data) [HAVE_XFT || HAVE_FREETYPE]:
4332 Add convenient setter.
4333 (font_put_frame_data, font_get_frame_data): Use it.
4334
4335 2014-07-15 Daiki Ueno <ueno@gnu.org>
4336
4337 * nsgui.h (XCHAR2B_BYTE1): Add missing parentheses around
4338 pointer argument, before dereferencing.
4339 (XCHAR2B_BYTE2): Likewise.
4340
4341 2014-07-15 Dmitry Antipov <dmantipov@yandex.ru>
4342
4343 * xmenu.c (toplevel): Use LWLIB_ID for next_menubar_widget_id.
4344 (pop_down_menu) [USE_X_TOOLKIT]: Accept integer arg.
4345 (create_and_show_popup_menu, create_and_show_dialog) [USE_X_TOOLKIT]:
4346 Use record_unwind_protect_int and avoid consing.
4347 (syms_of_xmenu) [USE_X_TOOLKIT]: Declare WIDGET_ID_TICK_START.
4348
4349 * regex.c (re_search_2): Use ssize_t to avoid integer overflow.
4350
4351 2014-07-14 Paul Eggert <eggert@cs.ucla.edu>
4352
4353 Use binary-io module, O_BINARY, and "b" flag (Bug#18006).
4354 * callproc.c (create_temp_file): Use mkostemp's O_BINARY flag.
4355 * emacs.c [MSDOS]:
4356 * emacs.c (main) [DOS_NT]: Don't mess with _fmode.
4357 (main) [MSDOS]: Use SET_BINARY instead of setmode.
4358 * minibuf.c: Include binary-io.h instead of fcntl.h.
4359 (read_minibuf_noninteractive):
4360 Use set_binary_mode instead of handcrafted code.
4361 Don't call emacs_set_tty if emacs_get_tty failed.
4362 * sysdep.c, systty.h (emacs_get_tty): Return int, not void.
4363 * sysdep.c (emacs_open, emacs_pipe): Use O_BINARY.
4364 * w32.c (pipe2): Adjust eassert to include O_BINARY.
4365
4366 * macros.c (Fstart_kbd_macro): Avoid need for overflow check.
4367 This works around a GCC compiler bug when Emacs is configured with
4368 --enable-gcc-warnings.
4369
4370 2014-07-14 Dmitry Antipov <dmantipov@yandex.ru>
4371
4372 * lisp.h (CHECK_VECTOR_OR_STRING): Return number of elements
4373 or characters in string, respectively. Add comment.
4374 * fringe.c (Fdefine_fringe_bitmap):
4375 * fns.c (Fsubstring, substring_both): Use it.
4376 * keymap.c (Fdefine_key, Flookup_key):
4377 * macros.c (Fstart_kbd_macro): Likewise. Avoid call to Flength.
4378
4379 * term.c (tty_menu_add_pane, tty_menu_add_selection):
4380 Use menu_item_width.
4381 (tty_menu_show): Simplify because tty_menu_create never return NULL.
4382
4383 2014-07-13 Paul Eggert <eggert@cs.ucla.edu>
4384
4385 Improve behavior of 'bzr up; cd src; make -k'.
4386 * Makefile.in (top_srcdir): New var.
4387 (ntsource, lispsource, ALL_CFLAGS, gl-stamp, emacs.res):
4388 Use '$(top_srcdir)' instead of '$(srcdir)/..';
4389 its expansion is a bit shorter.
4390 (../config.status): Actually build config.status instead of
4391 just complaining.
4392 (ACLOCAL_INPUTS, AUTOCONF_INPUTS):
4393 New macros, copied and relocated from ../Makefile.in.
4394 ($(top_srcdir)/aclocal.m4, $(top_srcdir)/configure, config.in)
4395 (../config.status, Makefile): New dependencies and rules,
4396 copied with relocation from ../Makefile.in. This should be more
4397 likely to rebuild the build machinery properly if you do a 'make'
4398 in the src directory.
4399
4400 2014-07-12 Eli Zaretskii <eliz@gnu.org>
4401
4402 * xdisp.c (display_line): Don't call FETCH_BYTE with argument less
4403 than 1. (Bug#17962)
4404
4405 * w32fns.c (Fx_file_dialog): Mention in the doc string the
4406 behavior on Windows 7 and later when the function is repeatedly
4407 invoked with the same value of DIR. (Bug#17950)
4408
4409 * xfns.c (Fx_file_dialog) [USE_MOTIF, USE_GTK]: Update the doc
4410 string to match the one in w32fns.c.
4411
4412 * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Switch
4413 stdin to binary mode only if it is connected to a terminal.
4414
4415 2014-07-11 Paul Eggert <eggert@cs.ucla.edu>
4416
4417 Coalesce extern decls.
4418 * minibuf.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty):
4419 * sysdep.c (emacs_get_tty, emacs_set_tty):
4420 Move duplicate extern decls from here ...
4421 * systty.h: ... to here, so that there's just one copy.
4422
4423 2014-07-11 Jan Djärv <jan.h.d@swipnet.se>
4424
4425 * nsterm.m (changeFont:): Add ifdef NS_IMPL_COCOA.
4426
4427 * nsfns.m (Fns_popup_font_panel): Ditto.
4428
4429 2014-07-11 Eli Zaretskii <eliz@gnu.org>
4430
4431 * minibuf.c (read_minibuf_noninteractive): Finish reading on '\r',
4432 not only on '\n'.
4433 [WINDOWSNT]: Switch stdin to binary mode when not echoing input.
4434
4435 * sysdep.c (emacs_get_tty, emacs_set_tty, suppress_echo_on_tty)
4436 [DOS_NT]: Implement for WINDOWSNT.
4437
4438 * systty.h (struct emacs_tty) [DOS_NT]: The struct member is now
4439 unsigned.
4440
4441 2014-07-11 Michael Albinus <michael.albinus@gmx.de>
4442
4443 * sysdep.c (suppress_echo_on_tty): New function.
4444 * minibuf.c (read_minibuf_noninteractive): Use it.
4445
4446 2014-07-11 Dmitry Antipov <dmantipov@yandex.ru>
4447
4448 * alloc.c (Fmemory_info) [HAVE_LINUX_SYSINFO]: Return nil if
4449 sysinfo failed. Adjust docstring.
4450
4451 2014-07-11 Eli Zaretskii <eliz@gnu.org>
4452
4453 Implement memory-info for MS-DOS.
4454 * dosfns.c (dos_memory_info): New function.
4455 * dosfns.h (dos_memory_info): Add prototype.
4456 * alloc.c (Fmemory_info) [MSDOS]: Call dos_memory_info.
4457 * vm-limit.c (get_lim_data) [MSDOS]: Call dos_memory_info, instead
4458 of doing some of its job.
4459
4460 * minibuf.c (read_minibuf_noninteractive) [WINDOWSNT]: Don't
4461 reference termios structure members.
4462
4463 2014-07-11 Michael Albinus <michael.albinus@gmx.de>
4464
4465 * sysdep.c (emacs_get_tty, emacs_set_tty): Make them externally visible.
4466
4467 * minibuf.c (top): Include systty.h. Declare external
4468 emacs_get_tty and emacs_set_tty.
4469 (Vread_hide_char): New lisp variable.
4470 (read_minibuf_noninteractive): Hide characters with
4471 Vread_hide_char if it is a character. (Bug#17839)
4472
4473 2014-07-10 Eli Zaretskii <eliz@gnu.org>
4474
4475 Implement memory-info for MS-Windows.
4476 * w32.c (w32_memory_info): New function.
4477 * w32.h (w32_memory_info): Prototype it.
4478 * alloc.c (Fmemory_info) [WINDOWSNT]: Call it.
4479
4480 2014-07-10 Dmitry Antipov <dmantipov@yandex.ru>
4481
4482 * coding.h (struct coding_system): Remove 'error_positions' (unused)
4483 and 'errors' (set but unused) fields. Use bitfields for 'eol_seen',
4484 'mode', 'common_flags' and 'result' fields, adjust layout to avoid
4485 extra padding and shrink struct coding_system by 56 bytes (x86_64).
4486 * coding.c (decode_coding_utf_8, decode_coding_utf_16)
4487 (decode_coding_emacs_mule, decode_coding_iso_2022, decode_coding_sjis)
4488 (decode_coding_big5, decode_coding_charset, decode_coding)
4489 (encode_coding): Adjust users.
4490
4491 * alloc.c (Fmemory_info): New function.
4492
4493 2014-07-09 Paul Eggert <eggert@cs.ucla.edu>
4494
4495 * syntax.c (back_comment): Use more-natural location for label.
4496
4497 * font.c, font.h (font_unparse_fcname): Now static.
4498 Define only if HAVE_XFT || HAVE_FREETYPE || HAVE_NS.
4499
4500 2014-07-09 Dmitry Antipov <dmantipov@yandex.ru>
4501
4502 Next minor cleanup of font subsystem.
4503 * font.h (enum font_property_index): Remove FONT_ENTITY_INDEX (no
4504 users) and FONT_FORMAT_INDEX (set by a few font drivers but never
4505 really used).
4506 (FONT_ENTITY_NOT_LOADABLE, FONT_ENTITY_SET_NOT_LOADABLE): Remove;
4507 unused.
4508 * ftfont.h (ftfont_font_format): Remove prototype.
4509 * ftfont.c (ftfont_font_format): Remove; now unused.
4510 (ftfont_open):
4511 * nsfont.m (nsfont_open):
4512 * w32font.c (w32font_open_internal):
4513 * w32uniscribe.c (uniscribe_open):
4514 * xfont.c (xfont_open):
4515 * xftfont.c (xftfont_open): All users changed.
4516
4517 * coding.c (ALLOC_CONVERSION_WORK_AREA): Prefer ptrdiff_t to int and
4518 so avoid integer overflow if decoded gap size exceeds INT_MAX bytes.
4519
4520 2014-07-09 Eli Zaretskii <eliz@gnu.org>
4521
4522 * xdisp.c (move_it_to): Adjust calculation of line_start_x to what
4523 x_produce_glyphs does when it generates a stretch glyph that
4524 represents a TAB. (Bug#17969)
4525
4526 * xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
4527 and there is a display property at that position, don't call
4528 move_it_to to move to a position before window start. (Bug#17942)
4529 Fix condition for finding CHARPOS by the first call to move_it_to.
4530 (Bug#17944)
4531
4532 2014-07-09 Stefan Monnier <monnier@iro.umontreal.ca>
4533
4534 * syntax.c (find_defun_start): Try the cache even
4535 if !open_paren_in_column_0_is_defun_start.
4536 (back_comment): If find_defun_start was pessimistic, use the
4537 scan_sexps_forward result to improve the cache (bug#16526).
4538
4539 2014-07-09 Eli Zaretskii <eliz@gnu.org>
4540
4541 * xdisp.c (redisplay_window): If redisplay of a window ends up
4542 with point in a partially visible line at end of the window, make
4543 sure the amended position of point actually has smaller Y
4544 coordinate; if not, give up and scroll the display. (Bug#17905)
4545
4546 * window.c (window_scroll_pixel_based): When point ends up at the
4547 last fully visible line, don't let move_it_to stop at the left
4548 edge of the line and dupe us into thinking point is inside the
4549 scroll margin.
4550
4551 * w32.c (network_interface_info): Make sure the argument is a
4552 Lisp string.
4553
4554 2014-07-08 Paul Eggert <eggert@cs.ucla.edu>
4555
4556 * process.c (read_and_dispose_of_process_output): Fix typo
4557 in previous patch: we want nonnegative fds, not nonzero fds.
4558
4559 2014-07-08 Dmitry Antipov <dmantipov@yandex.ru>
4560
4561 * chartab.c (char_table_translate): Move to...
4562 * character.h (char_table_translate): ... inline function here.
4563 Avoid Faref and assume that args are always valid. This helps to
4564 speedup search, which is especially important for a huge buffers.
4565 * lisp.h (char_table_translate): Remove prototype.
4566
4567 * nsfont.m (nsfont_close): Free glyphs and metrics arrays as well.
4568 * font.c (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
4569 New function, with an intention to avoid code duplication between
4570 a few font drivers.
4571 * font.h (font_build_object) [HAVE_XFT || HAVE_FREETYPE || HAVE_NS]:
4572 Add prototype.
4573 * ftfont.c (ftfont_open):
4574 * macfont.m (macfont_open):
4575 * xftfont.c (xftfont_open): Use it.
4576
4577 2014-07-08 Paul Eggert <eggert@cs.ucla.edu>
4578
4579 * process.c: Add sanity checks for file descriptors (Bug#17844).
4580 (wait_reading_process_output, Fprocess_filter_multibyte_p):
4581 Check that infd is nonnegative before using it as an fd.
4582 (read_and_dispose_of_process_output, Fprocess_send_eof):
4583 Likewise, for outfd.
4584 (wait_reading_process_output): Omit unnecessary check of infd.
4585
4586 2014-07-07 Paul Eggert <eggert@cs.ucla.edu>
4587
4588 Minor fixups related to usage of the 'long' type.
4589 * gnutls.c (emacs_gnutls_handshake):
4590 * xfaces.c (dump_realized_face):
4591 Work even if 'long' is narrower than 'void *'.
4592 * termcap.c (scan_file):
4593 * xselect.c (x_decline_selection_request)
4594 (x_reply_selection_request, x_get_window_property):
4595 * xterm.c (x_set_frame_alpha):
4596 Remove unnecessary 'L' suffixes of integer constants.
4597 * xfns.c (hack_wm_protocols):
4598 * xselect.c (x_fill_property_data):
4599 * xterm.c (x_set_offset, x_set_window_size_1, x_make_frame_invisible):
4600 Remove unnecessary casts to 'long'.
4601 (set_machine_and_pid_properties): Don't assume pid_t fits in 32 bits.
4602
4603 Minor ImageMagick safety fixes.
4604 * image.c (imagemagick_compute_animated_image):
4605 Remove useless assignment to local. Avoid problems if dest_width is 0.
4606 (imagemagick_load_image): Use int for pixel counts that can't
4607 exceed INT_MAX. Avoid problem if PixelGetNextIteratorRow returns
4608 a row width greater than the image width (or greater than LONG_MAX!).
4609
4610 2014-07-04 K. Handa <handa@gnu.org>
4611
4612 * coding.c (MIN_CHARBUF_SIZE): Delete it.
4613 (MAX_CHARBUF_EXTRA_SIZE): New macro.
4614 (ALLOC_CONVERSION_WORK_AREA): Use MAX_CHARBUF_EXTRA_SIZE.
4615
4616 2014-07-04 Dmitry Antipov <dmantipov@yandex.ru>
4617
4618 * font.h (struct font_driver): Remove get_outline and free_outline;
4619 not used by any font driver.
4620 * ftfont.c (ftfont_driver):
4621 * macfont.m (macfont_driver):
4622 * nsfont.m (nsfont_driver):
4623 * w32font.c (w32font_driver):
4624 * w32uniscribe.c (uniscribe_font_driver):
4625 * xfont.c (xfont_driver): Related users changed.
4626 * xselect.c (x_get_window_property): Use convenient xmalloc.
4627 Call to xfree only if some data was really allocated.
4628
4629 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
4630
4631 On MS-Windows, display busy cursor on all GUI frames.
4632 This is similar to what we have on X. Quickly tested by Dani Moncayo.
4633 * w32fns.c (toplevel): Remove hourglass_hwnd; no longer used.
4634 (w32_show_hourglass, w32_hide_hourglass, w32_note_current_window):
4635 Likewise.
4636 (hide_hourglass, show_hourglass): Redesign to match X counterparts.
4637 * xdisp.c (start_hourglass): Remove Windows-specific bits.
4638
4639 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
4640
4641 Use convenient alists to manage per-frame font driver-specific data.
4642 * frame.h (struct frame): Rename font_data_list to...
4643 [HAVE_XFT || HAVE_FREETYPE]: ... font_data, which is a Lisp_Object now.
4644 * font.h (struct font_data_list): Remove; no longer need a special
4645 data type.
4646 (font_put_frame_data, font_get_frame_data) [HAVE_XFT || HAVE_FREETYPE]:
4647 Adjust prototypes.
4648 * font.c (font_put_frame_data, font_get_frame_data)
4649 [HAVE_XFT || HAVE_FREETYPE]: Prefer alist functions to ad-hoc list
4650 management.
4651 * xftfont.c (xftfont_get_xft_draw, xftfont_end_for_frame):
4652 Related users changed.
4653 * ftxfont.c (ftxfont_get_gcs, ftxfont_end_for_frame): Likewise.
4654 Prefer convenient xmalloc and xfree.
4655
4656 2014-07-03 Eli Zaretskii <eliz@gnu.org>
4657
4658 * dispnew.c (prepare_desired_row): Accept 2 additional arguments:
4659 the window whose glyph row is being prepared and a flag whether it
4660 is for mode/header line. Make sure the glyph row's marginal areas
4661 are in sync with what the window wants.
4662 (Bug#17892)
4663
4664 * xdisp.c (display_line, display_mode_line):
4665 Call prepare_desired_row with additional arguments, as appropriate.
4666
4667 * dispextern.h (prepare_desired_row): Adjust prototype.
4668
4669 2014-07-03 Dmitry Antipov <dmantipov@yandex.ru>
4670
4671 * xfaces.c (init_frame_faces): Always realize basic faces (Bug#17889).
4672 * menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash
4673 caused by xw_popup_dialog in daemon mode (Bug#17891).
4674
4675 2014-07-03 Eli Zaretskii <eliz@gnu.org>
4676
4677 * frame.c (do_switch_frame): When switching to another TTY frame,
4678 make sure FrameCols and FrameRows are in sync with the new frame's
4679 data. (Bug#17875)
4680
4681 2014-07-02 Dmitry Antipov <dmantipov@yandex.ru>
4682
4683 Shrink Lisp_Sub_Char_Table by preferring C integers to Lisp_Objects.
4684 * lisp.h (struct Lisp_Sub_Char_Table): Use C integers for depth and
4685 min_char slots. Adjust comment.
4686 (enum char_table_specials): Rename from CHAR_TABLE_STANDARD_SLOTS.
4687 Add SUB_CHAR_TABLE_OFFSET member.
4688 (make_uninit_sub_char_table): New function.
4689 (toplevel): Add compile-time assert to verify suitable member layout
4690 in Lisp_Sub_Char_Table.
4691 * alloc.c (mark_char_table): Add extra argument to denote char table
4692 subtype. Adjust to match new layout of sub char-table.
4693 (mark_object): Always mark sub char-tables with mark_char_table.
4694 * chartab.c (make_sub_char_table, copy_sub_char_table)
4695 (sub_char_table_ref, sub_char_table_ref_and_range, sub_char_table_set)
4696 (sub_char_table_set_range, optimize_sub_char_table, map_sub_char_table)
4697 (map_sub_char_table_for_charset, uniprop_table_uncompress):
4698 All related users changed.
4699 * lread.c (read1): Adjust to match new layout of sub char-table.
4700 * print.c (print_object): Likewise (Bug#17898).
4701
4702 2014-07-02 Stefan Monnier <monnier@iro.umontreal.ca>
4703
4704 * keymap.c (get_keyelt): Simplify.
4705 (copy_keymap_item): Remove left-over code for when we had
4706 key-shortcut caches.
4707
4708 2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
4709
4710 * nsterm.m (judge): EmacsScroller: Move dealloc code here.
4711 (dealloc): Remove for EmacsScroller.
4712
4713 * nsterm.h (EmacsScroller): Remove dealloc.
4714
4715 2014-06-30 Eli Zaretskii <eliz@gnu.org>
4716
4717 * coding.c (MIN_CHARBUF_SIZE): Enlarge to 32. (Bug#17881)
4718
4719 2014-06-30 Jan Djärv <jan.h.d@swipnet.se>
4720
4721 * nsmenu.m (update_frame_tool_bar): Set wait_for_tool_bar to NO
4722 when setNeedsDisplay is called so we don't trigger redisplay for every
4723 tool bar update.
4724
4725 * nsterm.m (any_help_event_p): New variable.
4726 (mouseMoved:): Set any_help_event_p to YES if help event is
4727 generated. Remove else with empty help event that triggered redisplay
4728 for every mouse move.
4729 (windowDidResignKey:): If any_help_event_p, generate empty help event.
4730
4731 2014-06-29 Dmitry Antipov <dmantipov@yandex.ru>
4732
4733 * xfns.c (Qsuppress_icon): Remove; no real users.
4734 (syms_of_xfns): Don't DEFSYM it. Remove ancient comments.
4735 * w32fns.c (Qsuppress_icon): Remove, for the same reason.
4736 (syms_of_w32fns): Don't DEFSYM it.
4737
4738 2014-06-29 Glenn Morris <rgm@gnu.org>
4739
4740 * Makefile.in (ns-app): Mark as PHONY.
4741
4742 2014-06-28 Glenn Morris <rgm@gnu.org>
4743
4744 * Makefile.in (mostlyclean): There are no libXMenu11.a,
4745 liblw.a in this directory.
4746
4747 2014-06-28 Andreas Schwab <schwab@linux-m68k.org>
4748
4749 * coding.c (encode_coding_utf_8): Correctly count produced_chars
4750 also in unibyte case. (Bug#17865)
4751
4752 2014-06-28 K. Handa <handa@gnu.org>
4753
4754 * coding.c (MAX_CHARBUF_SIZE): Rename from CHARBUF_SIZE.
4755 (MIN_CHARBUF_SIZE): New macro.
4756 (ALLOC_CONVERSION_WORK_AREA): New arg SIZE. Callers changed.
4757
4758 2014-06-27 Glenn Morris <rgm@gnu.org>
4759
4760 * Makefile.in: Replace BOOTSTRAPEMACS sleight-of-hand
4761 with an order-only dependence on bootstrap-emacs. (Bug#2151)
4762 (.el.elc): Replace suffix rule with pattern rule.
4763 (%.elc): New pattern rule, with order-only prerequisite.
4764 ($(lisp)): No more need to depend on BOOTSTRAPEMACS.
4765 ($(lispsource)/loaddefs.el): Use an order-only prerequisite
4766 in place of BOOTSTRAPEMACS.
4767
4768 2014-06-26 Dmitry Antipov <dmantipov@yandex.ru>
4769
4770 * fns.c (Fcompare_strings): Use FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE.
4771
4772 2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
4773
4774 Consistently use validate_subarray to verify substring.
4775 * fns.c (validate_substring): Not static any more. Adjust to
4776 use ptrdiff_t, not EMACS_INT, because string and vector limits
4777 can't exceed ptrdiff_t even if EMACS_INT is wider.
4778 (Fcompare_strings, Fsubstring, Fsubstring_no_properties)
4779 (secure_hash): Adjust user.
4780 * lisp.h (validate_subarray): Add prototype.
4781 * coding.c (Fundecodable_char_position):
4782 * composite.c (Fcomposition_get_gstring, Fcompose_string_internal):
4783 Use validate_subarray. Adjust comment to mention substring.
4784
4785 2014-06-25 Dmitry Antipov <dmantipov@yandex.ru>
4786
4787 Do not allow out-of-range character position in Fcompare_strings.
4788 * fns.c (validate_subarray): Add prototype.
4789 (Fcompare_substring): Use validate_subarray to check ranges.
4790 Adjust comment to mention that the semantics was changed. Also see
4791 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00447.html.
4792
4793 2014-06-24 Paul Eggert <eggert@cs.ucla.edu>
4794
4795 Be more consistent about the 'Qfoo' naming convention.
4796 * image.c (Fimagemagick_types):
4797 * lisp.h (lisp_h_CHECK_TYPE, CHECK_TYPE, CHECK_ARRAY):
4798 * process.c (Fmake_network_process):
4799 Rename C local identifier 'Qfoo to avoid giving the false
4800 impression that it stands for the symbol 'foo'.
4801
4802 2014-06-23 Dmitry Antipov <dmantipov@yandex.ru>
4803
4804 Simplify and cleanup character conversion stuff.
4805 * lisp.h (multibyte_char_to_unibyte, multibyte_char_to_unibyte_safe):
4806 Remove prototypes.
4807 * character.c (multibyte_char_to_unibyte)
4808 (multibyte_char_to_unibyte_safe): Remove; no longer used.
4809 * character.h (make_char): Remove; unused.
4810 (CHAR_TO_BYTE8, CHAR_TO_BYTE_SAFE): Simplify.
4811 (ASCII_BYTE_P): Remove; ASCII_CHAR_P does the same thing.
4812 * buffer.c, charset.c, charset.h, cmds.c, coding.c, editfns.c:
4813 * fileio.c, indent.c, insdel.c, keyboard.c, lread.c, print.c:
4814 * search.c, term.c, xdisp.c, xterm.c: Related users changed.
4815
4816 2014-06-22 Mario Lang <mlang@delysid.org>
4817
4818 * w32fns.c (Fw32_shell_execute): The the -> the.
4819
4820 2014-06-22 Dmitry Antipov <dmantipov@yandex.ru>
4821
4822 * xmenu.c (mouse_position_for_popup):
4823 * xselect.c (mouse_position_for_drop): Do not duplicate ...
4824 * xfns.c (x_relative_mouse_position): ... and prefer this function.
4825 * menu.c (Fx_popup_menu):
4826 * xselect.c (x_handle_dnd_message): Adjust users.
4827 * menu.h (mouse_position_for_popup): Remove prototype.
4828 * xterm.h (x_relative_mouse_position): Add prototype.
4829 * xterm.c (x_find_topmost_parent): Break from the loop and do not
4830 call XFree if XQueryTree returns zero.
4831
4832 2014-06-21 Eli Zaretskii <eliz@gnu.org>
4833
4834 * indent.c (Fvertical_motion): Doc fix.
4835 Move to the goal column, if any, with a single call to
4836 move_it_in_display_line, not in two calls. Doing this with two
4837 calls causes move_it_in_display_line apply the line-prefix
4838 handling twice instead of just once. (Bug#17823)
4839
4840 2014-06-21 Paul Eggert <eggert@cs.ucla.edu>
4841
4842 Port to OS X ACLs (Bug#17810).
4843 * fileio.c (Ffile_acl): Port to OS X, where acl_get_file (...,
4844 ACL_TYPE_ACCESS) doesn't work.
4845
4846 2014-06-21 Stefan Monnier <monnier@iro.umontreal.ca>
4847
4848 * keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
4849 before checking key-translation-map (bug#17659).
4850
4851 2014-06-21 Dmitry Antipov <dmantipov@yandex.ru>
4852
4853 * font.c (font_make_object): Avoid dangling pointer which may
4854 crash GC (Bug#17771).
4855
4856 2014-06-21 Eli Zaretskii <eliz@gnu.org>
4857
4858 * image.c [5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)]: Declare the
4859 prototype of DGifCloseFile as appropriate for older and newer
4860 versions of giflib.
4861 (gif_close): New function, encapsulates the differences in the
4862 calling sequence of DGifCloseFile before v5.1.0 and after it.
4863 (gif_load): Call gif_close instead of DGifCloseFile. Divulge the
4864 error string where appropriate. (Bug#17790)
4865
4866 * xdisp.c (Fmove_point_visually): Instead of testing for keyboard
4867 macro execution, make sure point didn't move since last complete
4868 redisplay, as the condition for using the glyph matrix
4869 information. (Bug#17777)
4870
4871 2014-06-19 Dmitry Antipov <dmantipov@yandex.ru>
4872
4873 Minor cleanup of fonset code.
4874 * fontset.c (FONTSET_ID, set_fontset_id, FONTSET_NAME)
4875 (set_fontset_name, FONTSET_ASCII, set_fontset_ascii)
4876 (FONTSET_BASE, set_fontset_base, FONTSET_FRAME)
4877 (set_fontset_frame, FONTSET_NOFONT_FACE, set_fontset_nofont_face)
4878 (FONTSET_DEFAULT, set_fontset_default, FONTSET_FALLBACK)
4879 (set_fontset_fallback): Reorder extra slots and avoid unused slots.
4880 (free_realized_fontset): Remove because a no-op since 2008.
4881 (free_face_fontset): Adjust user.
4882 (syms_of_fontset): Shrink fontset by one extra slot.
4883
4884 2014-06-17 Paul Eggert <eggert@cs.ucla.edu>
4885
4886 Omit redundant extern decls.
4887 Most of this patch is from Dmitry Antipov, in:
4888 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00263.html
4889 * commands.h (update_mode_lines):
4890 * frame.h (Qbackground_color, Qforeground_color)
4891 (x_set_menu_bar_lines):
4892 * ftfont.c (ftfont_font_format):
4893 * intervals.h (Qkeymap, Qfont):
4894 * keyboard.c (timer_check, safe_run_hooks, Qregion_extract_function):
4895 * lisp.h (Ffboundp, Qnil, Qt, Qlambda, Qintegerp, Qwholenump)
4896 (Qsymbolp, Qlisp, Qconsp, Qstringp, Qarrayp, Qbufferp, Qmarkerp)
4897 (Qvectorp, Qbuffer_or_string_p, Qchar_table_p, Qvector_or_char_table_p)
4898 (Qfloatp, Qnumberp, Qfont_spec, Qfont_entity, Qfont_object)
4899 (Fbyteorder, wrong_type_argument, Fmax_char, syms_of_composite)
4900 (Fidentity, extract_float, init_display, syms_of_display, Qdisplay):
4901 (Qimage, Qbox, redisplay_preserve_echo_area, char_table_ref)
4902 (char_table_set, char_table_translate, Qautoload, Qbottom, Qtop)
4903 (Qvisible, Qfont, Qfront_sticky, Qrear_nonsticky, init_sigio)
4904 (Qtool_bar, Qheader_line):
4905 * macros.c (Fexecute_kbd_macro):
4906 * xdisp.c (Ftool_bar_height, Ftool_bar_height):
4907 * xterm.c (x_delete_terminal, XSetIMValues):
4908 * xterm.h (x_set_window_size, x_query_color, x_get_focus_frame)
4909 (x_implicitly_set_name, popup_activated)
4910 (widget_store_internal_border):
4911 Remove redundant decls.
4912 * frame.c [USE_X_TOOLKIT]: Include widget.h.
4913 * keyboard.c (Fexit_recursive_edit, Fabort_recursive_edit):
4914 Remove _Noreturn, as make-docfile now does that for us.
4915 * lisp.h (DEFUN): Don't declare fnname here; rely on make-docfile.
4916 (Qregion_extract_function): New decl.
4917 * window.c, xfns.c: Include menu.h.
4918
4919 2014-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
4920
4921 * callint.c (Fcall_interactively): Fix up last change (bug#17701).
4922
4923 2014-06-17 Dmitry Antipov <dmantipov@yandex.ru>
4924
4925 * fileio.c (Fread_file_name): Do not pass redundant args and ...
4926 * callint.c (read_file_name): ... convert to static here.
4927 * lisp.h (Fread_file_name): Do not EXFUN it.
4928 (STRING_COPYIN): Remove; unused.
4929 * composite.c (CHAR_COMPOSABLE_P): Replace unsafe macro with ...
4930 (char_composable_p): ... static function. All users changed.
4931 * eval.c (toplevel): Remove redundant #include directives.
4932 * xterm.c (x_initialize): Add static to match prototype.
4933 * ccl.c (Fccl_execute_on_string):
4934 * font.c (fon_intern_prop): Use make_specified_string.
4935
4936 2014-06-16 Paul Eggert <eggert@cs.ucla.edu>
4937
4938 * Makefile.in (ns-app): Fix typo that broke build on OS X.
4939 Reported by David Caldwell in:
4940 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00251.html
4941
4942 2014-06-16 Dmitry Antipov <dmantipov@yandex.ru>
4943
4944 Do not ask for XRender extension each time XFT font is opened.
4945 * xftfont.c (xftfont_open): Move call to XRenderQueryExtension ...
4946 * xterm.c (x_term_init) [HAVE_XFT]: ... to here. Adjust comment.
4947
4948 2014-06-15 Glenn Morris <rgm@gnu.org>
4949
4950 * Makefile.in: Use `make -C' rather than `cd && make' throughout.
4951
4952 2014-06-15 Eli Zaretskii <eliz@gnu.org>
4953
4954 * xdisp.c (Fmove_point_visually): Don't use the glyph matrix
4955 information if we are in the middle of executing a keyboard macro,
4956 since redisplay doesn't update the screen until the macro is
4957 finished. (Bug#17777)
4958
4959 * alloc.c (cleanup_vector): Don't dereference a font driver
4960 pointer if it is NULL. (Bug#17771)
4961
4962 2014-06-13 Glenn Morris <rgm@gnu.org>
4963
4964 * Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h)
4965 ($(lispsource)/international/charprop.el)
4966 ($(libsrc)/make-docfile$(EXEEXT), $(lwlibdir)/liblw.a)
4967 ($(oldXMenudir)/libXMenu11.a, ns-app, .el.elc)
4968 ($(lispsource)/loaddefs.el, bootstrap-emacs$(EXEEXT)):
4969 GNU make automatically passes command-line arguments to sub-makes.
4970
4971 2014-06-13 Paul Eggert <eggert@cs.ucla.edu>
4972
4973 Avoid hangs in accept-process-output (Bug#17647).
4974 * lisp.h, process.c (wait_reading_process_input):
4975 Return int, not bool. All uses changed.
4976 * process.c (SELECT_CANT_DO_WRITE_MASK):
4977 Remove macro, replacing with ...
4978 (SELECT_CAN_DO_WRITE_MASK): ... new constant, with inverted sense.
4979 All uses changed.
4980 (status_notify): New arg WAIT_PROC. Return int, not void.
4981 All uses changed.
4982
4983 2014-06-13 Eli Zaretskii <eliz@gnu.org>
4984
4985 * menu.c (Fx_popup_menu): Don't call the frame's menu_show_hook if
4986 the frame is the initial frame, because the hook is not set up
4987 then, and Emacs crashes.
4988 Reported by Fabrice Popineau <fabrice.popineau@gmail.com>.
4989
4990 2014-06-12 Stefan Monnier <monnier@iro.umontreal.ca>
4991
4992 * keymap.c (silly_event_symbol_error): Don't recommend the use
4993 of strings.
4994
4995 2014-06-11 Eli Zaretskii <eliz@gnu.org>
4996
4997 * xdisp.c (set_cursor_from_row): Fix an off-by-one error when
4998 matching overlay strings with 'cursor' property against buffer
4999 positions traversed in the glyph row. (Bug#17744)
5000
5001 2014-06-11 Jan Djärv <jan.h.d@swipnet.se>
5002
5003 * nsterm.h (EmacsApp): Always compile in shouldKeepRunning, isFirst
5004 on Cocoa.
5005
5006 * nsterm.m (run): Always compile for Cocoa. Use runtime check to
5007 determine 10.9 (Bug#17751).
5008
5009 * macfont.m (macfont_draw): Positions were not freed.
5010
5011 2014-06-10 Dmitry Antipov <dmantipov@yandex.ru>
5012
5013 * dispextern.h (PREPARE_FACE_FOR_DISPLAY): Remove as a duplicate of ...
5014 * xfaces.c (prepare_face_for_display) [HAVE_WINDOW_SYSTEM]: ... this
5015 function. Also adjust comment.
5016 * fringe.c, w32term.c, xdisp.c, xterm.c: All users changed.
5017
5018 * dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member.
5019 * font.c (font_done_for_face):
5020 * xfaces.c (realize_non_ascii_face): Adjust user.
5021 * font.h (struct font_driver): Convert 'prepare_face' to return
5022 void because its return value is never used anyway.
5023 * xfont.c (xfont_prepare_face): Return void.
5024 * xftfont.c (xftfont_prepare_face): Likewise. Use xmalloc.
5025 (xftfont_done_face): Use xfree.
5026
5027 * dispextern.h (last_tool_bar_item): Remove declaration.
5028 * frame.h (struct frame): New member last_tool_bar_item.
5029 * frame.c (make_frame): Initialize it.
5030 * xdisp.c (toplevel): Remove last_tool_bar_item.
5031 (handle_tool_bar_click, note_tool_bar_highlight):
5032 * w32term.c (w32_read_socket, w32_initialize):
5033 * xterm.c (handle_one_xevent, x_initialize): Adjust users.
5034
5035 * frame.h (window_system_available) [!HAVE_WINDOW_SYSTEM]: Always false.
5036 * frame.c (window_system_available) [HAVE_WINDOW_SYSTEM]: Now here.
5037
5038 2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
5039
5040 Say (accept-process-output P)'s result pertains to P if P is non-nil.
5041 * process.c (Faccept_process_output)
5042 (wait_reading_process_output): Mention that if PROCESS is non-nil,
5043 the return value is about PROCESS, not about other processes.
5044
5045 2014-06-09 Dmitry Antipov <dmantipov@yandex.ru>
5046
5047 Further adjustments to mark_object and friends.
5048 Now the mark_object's stack is just 32 bytes on a 64-bit
5049 system, which means extra 20% off the stack usage.
5050 * alloc.c (mark_save_value): As before, refactored out from ...
5051 (mark_object): ... adjusted user. Also add comment.
5052
5053 2014-06-09 Paul Eggert <eggert@cs.ucla.edu>
5054
5055 Fix core dump after a dropped X connection (Bug#17704).
5056 * sysdep.c (stuff_char): Don't abort merely because the selected frame
5057 is dead, as we may be shutting down.
5058
5059 2014-06-08 Glenn Morris <rgm@gnu.org>
5060
5061 * fileio.c (write-region-inhibit-fsync): Doc tweak.
5062
5063 * data.c (Flss, Fgtr, Fleq, Fgeq): Doc tweaks.
5064
5065 2014-06-08 Paul Eggert <eggert@cs.ucla.edu>
5066
5067 If a C name must be extern on some platforms, make it extern on all.
5068 * dispextern.h (set_vertical_scroll_bar, erase_phys_cursor)
5069 (load_color):
5070 * font.h (ftxfont_driver) [HAVE_XFT]:
5071 * keyboard.h (menu_items_inuse, ignore_mouse_drag_p, make_ctrl_char):
5072 * lisp.h (get_frame_param):
5073 * menu.h (tty_menu_show):
5074 * process.h (conv_sockaddr_to_lisp, catch_child_signal):
5075 * termhooks.h (encode_terminal_code):
5076 * xterm.h (x_menu_wait_for_event):
5077 Always declare.
5078 * frame.c (get_frame_param):
5079 * fringe.c (max_used_fringe_bitmap):
5080 * ftxfont.c (ftxfont_driver):
5081 * keyboard.c (ignore_mouse_drag_p, make_ctrl_char):
5082 * menu.c (menu_items_inuse):
5083 * process.c (conv_sockaddr_to_lisp, catch_child_signal):
5084 * term.c (encode_terminal_code, tty_menu_show):
5085 * xdisp.c (set_vertical_scroll_bar, erase_phys_cursor):
5086 * xfaces.c (load_color):
5087 * xmenu.c (x_menu_wait_for_event):
5088 Now always extern.
5089
5090 2014-06-08 Dmitry Antipov <dmantipov@yandex.ru>
5091
5092 Change object marking routines to minimize stack usage.
5093 This change moves a few cold paths from mark_object to NO_INLINE
5094 functions and adjusts symbol marking loop. According to GCC 4.8.2
5095 -Wstack-usage, this reduces mark_object's stack usage from 80 to
5096 48 bytes on a 64-bit system. For a long byte-force-recompile runs,
5097 stack usage at the mark phase is reduced up to 28%. Surprisingly,
5098 it also gains up to 3% in speed (with default '-O2 -g3' flags).
5099 * alloc.c (mark_compiled, mark_localized_symbol): New functions,
5100 refactored out from ...
5101 (mark_object): ... adjusted user. Also mark symbols in a tight
5102 inner loop.
5103 (mark_face_cache): Add NO_INLINE.
5104
5105 2014-06-08 Eli Zaretskii <eliz@gnu.org>
5106
5107 * sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter
5108 contains garbage on WINDOWSNT (which could potentially infloop at
5109 exit).
5110
5111 Minimize cursor motion during TTY menu updates.
5112 * term.c (tty_menu_display): Don't position cursor here.
5113 Instead, pass the cursor coordinates to update_frame_with_menu.
5114 (tty_menu_activate): Send the hide cursor command only once in an
5115 iteration through the outer 'while' loop.
5116
5117 * dispnew.c (update_frame_1): Accept an additional argument
5118 SET_CURSOR_P, and position the cursor at the end of the frame
5119 update only if that argument is non-zero. All callers changed to
5120 provide the additional argument as non-zero, except for
5121 update_frame_with_menu.
5122 (update_frame_with_menu): Accept 2 additional arguments ROW and
5123 COL; if they are non-negative, instruct update_frame_1 not to
5124 position the cursor, and instead position it according to ROW and COL.
5125
5126 * dispextern.h (update_frame_with_menu): Update prototype.
5127
5128 2014-06-08 Stefan Monnier <monnier@iro.umontreal.ca>
5129
5130 * callproc.c (call_process): Don't check read-only if we don't insert
5131 anything (bug#17666).
5132
5133 2014-06-08 Eli Zaretskii <eliz@gnu.org>
5134
5135 * dispnew.c (update_frame_with_menu): Set display_completed.
5136
5137 2014-06-07 Eli Zaretskii <eliz@gnu.org>
5138
5139 * term.c (tty_menu_show) [WINDOWSNT]: Make tty_menu_show extern
5140 only for WINDOWSNT.
5141 * menu.h (tty_menu_show) [WINDOWSNT]: Declare extern only for WINDOWSNT.
5142
5143 2014-06-06 Paul Eggert <eggert@cs.ucla.edu>
5144
5145 * term.c (tty_menu_show) [!HAVE_NTGUI]: Now static.
5146 * menu.h (tty_menu_show) [!HAVE_NTGUI]: Omit extern decl.
5147
5148 2014-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
5149
5150 * window.c (Frecenter): Signal an error if window-buffer is not
5151 current-buffer.
5152
5153 * keyboard.c (make_lispy_position): Don't include a buffer position in
5154 mode/header-line mouse events.
5155
5156 * keyboard.c (read_char): Handle (t . <event>) in the second use of
5157 Vunread_command_events (bug#17650).
5158
5159 2014-06-06 Dmitry Antipov <dmantipov@yandex.ru>
5160
5161 * xterm.c (x_setup_pointer_blanking):
5162 Conditionally probe Xfixes until this stuff is stabilized (Bug#17609).
5163
5164 2014-06-05 Dmitry Antipov <dmantipov@yandex.ru>
5165
5166 * keyboard.c, process.c: Do not define POLL_FOR_INPUT here
5167 because it will be defined in generated config.h if needed.
5168
5169 2014-06-04 Dmitry Antipov <dmantipov@yandex.ru>
5170
5171 Use terminal-specific hooks to display popup dialogs.
5172 * termhooks.h (struct terminal): New field popup_dialog_hook.
5173 * menu.c (emulate_dialog_with_menu): New function, refactored from ...
5174 (Fx_popup_dialog): ... adjusted user. Also remove old #if 0
5175 code and use popup_dialog_hook.
5176 * nsmenu.m (ns_popup_dialog): Make hook-compatible.
5177 * nsterm.h (ns_popup_dialog): Adjust prototype.
5178 * nsterm.m (ns_create_terminal):
5179 * w32term.c (w32_create_terminal):
5180 * xterm.c (x_create_terminal) [USE_X_TOOLKIT || USE_GTK]:
5181 Setup popup_dialog_hook.
5182
5183 2014-06-04 Eli Zaretskii <eliz@gnu.org>
5184
5185 * w32heap.c (report_temacs_memory_usage): Improve the report by
5186 reporting the large blocks that are actually occupied at dump time.
5187
5188 * w32console.c (initialize_w32_display): Set the console
5189 menu_show_hook, otherwise TTY menus are broken on w32.
5190
5191 2014-06-04 Dmitry Antipov <dmantipov@yandex.ru>
5192
5193 Use terminal-specific hooks to display menus.
5194 * termhooks.h (struct terminal): New field menu_show_hook.
5195 * menu.h (<anonymous enum>): Bit flags for menu hooks.
5196 (x_menu_show, w32_menu_show, ns_menu_show, tty_menu_show):
5197 Adjust prototypes.
5198 * menu.c (Fx_popup_menu): Use bit flags and menu_show_hook.
5199 * nsmenu.m (ns_menu_show):
5200 * w32menu.c (w32_menu_show):
5201 * xmenu.c (x_menu_show):
5202 * term.c (tty_menu_show): Adjust to use bit flags.
5203 (set_tty_hooks): Set menu_show_hook.
5204 * xterm.c (x_create_terminal):
5205 * nsterm.m (ns_create_terminal):
5206 * msdos.c (initialize_msdos_display):
5207 * w32term.c (w32_create_terminal): Likewise.
5208
5209 2014-06-03 Juanma Barranquero <lekktu@gmail.com>
5210
5211 * w32heap.c (DUMPED_HEAP_SIZE) [!_WIN64]: Reduce to 11 MB.
5212
5213 2014-06-03 Eli Zaretskii <eliz@gnu.org>
5214
5215 * sysselect.h (fd_CLR, fd_ISSET, fd_SET, FD_CLR, FD_ISSET)
5216 (FD_SET): Don't define on WINDOWSNT.
5217
5218 2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
5219
5220 * emacs.c: Include "sysselect.h", to define its inline functions.
5221 Reported by Glenn Morris in:
5222 http://lists.gnu.org/archive/html/emacs-devel/2014-06/msg00077.html
5223
5224 Do not require libXt-devel when building with gtk.
5225 * gtkutil.h, menu.h: Include lwlib-widget.h, not lwlib-h, to avoid
5226 dependency on libXt-devel.
5227 * menu.h [HAVE_NTGUI]: Include lwlib-widget.h in this case too.
5228 (enum button_type, widget_value) [HAVE_NTGUI]: Remove, as
5229 lwlib-widget.h now does this.
5230 * nsmenu.m (ns_menu_show): "enabled" -> "enable" to fix typo.
5231
5232 2014-06-03 Paul Eggert <eggert@penguin.cs.ucla.edu>
5233
5234 If ENABLE_CHECKING, range-check args of FD_CLR, FD_ISSET, FD_SET.
5235 * process.c (add_read_fd, delete_read_fd, add_write_fd)
5236 (delete_write_fd, wait_reading_process_output):
5237 Remove now-redundant easserts.
5238 * sysselect.h (SYSSELECT_H): New macro, to avoid double-inclusion woes.
5239 Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
5240 (fd_CLR, fd_ISSET, fd_SET): New inline functions.
5241 (FD_CLR, FD_ISSET, FD_SET): Redefine in terms of these functions.
5242
5243 2014-06-03 Eli Zaretskii <eliz@gnu.org>
5244
5245 * w32heap.c (DUMPED_HEAP_SIZE): Move from w32heap.h. Don't use
5246 HEAPSIZE; instead, define separate values for the 32- and 64-bit builds.
5247 (calloc): Don't undef, it is never defined.
5248 (HEAP_ENTRY_SHIFT): Remove unused macro.
5249
5250 * Makefile.in (C_HEAP_SWITCH): Remove.
5251 (ALL_CFLAGS): Don't use $(C_HEAP_SWITCH).
5252
5253 Fix MS-Windows build broken by menu changes on 2014-06-02.
5254 * w32menu.c (w32_menu_show): Fix a typo that broke compilation.
5255
5256 * menu.h (enum button_type, struct _widget_value) [HAVE_NTGUI]:
5257 Define instead of including ../lwlib/lwlib.h, which causes
5258 compilation errors due to missing X11 headers.
5259
5260 2014-06-03 Paul Eggert <eggert@cs.ucla.edu>
5261
5262 * process.c (wait_reading_process_output): Omit incorrect test of
5263 p->infd against zero. Add easserts for infd having a plausible value.
5264
5265 2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
5266
5267 Adjust to match recent lwlib changes.
5268 * menu.h (xmalloc_widget_value): Replace by ...
5269 (make_widget_value): ... new prototype.
5270 * menu.c (xmalloc_widget_value): Replace by ...
5271 (make_widget_value): ... new function.
5272 (free_menubar_widget_value_tree, digest_single_submenu): Adjust users.
5273 * gtkutil.c (malloc_widget_value, free_widget_value):
5274 (widget_value_free_list, malloc_cpt): Remove old lwlib-compatible code.
5275 * keyboard.h (enum button_type, struct _widget_value):
5276 * gtkutil.h, nsgui.h, w32gui.h (malloc_widget_value, free_widget_value):
5277 Likewise.
5278 * nsmenu.m (ns_update_menubar, ns_menu_show):
5279 * w32menu.c (set_frame_menubar, w32_menu_show, w32_dialog_show):
5280 * xmenu.c (set_frame_menubar, xmenu_show, x_dialog_show): Adjust users.
5281 * xterm.h (XtParent) [USE_GTK]: Remove unused macro.
5282
5283 2014-06-02 Dmitry Antipov <dmantipov@yandex.ru>
5284
5285 * image.c (x_query_frame_background_color)
5286 [HAVE_PNG || HAVE_NS || HAVE_IMAGEMAGICK || HAVE_RSVG]:
5287 Fix --enable-gcc-warnings compilation without image libraries.
5288
5289 2014-06-02 Eli Zaretskii <eliz@gnu.org>
5290
5291 * w32heap.c (malloc_after_dump, realloc_after_dump): Update the
5292 emulated break value only if it goes up.
5293 (sbrk): Add assertion that the INCREMENT argument is strictly
5294 zero. Improve and correct the commentary.
5295
5296 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5297
5298 Improve AIX-related merge from emacs-24.
5299 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Fix comment.
5300 * lisp.h (ENUMABLE) [!_AIX]: Don't define to 0 merely because we're
5301 not on AIX; since we're on the trunk we can use enums more broadly.
5302
5303 * frame.c (x_set_frame_parameters): Don't read uninitialized storage.
5304
5305 2014-06-02 Jan Djärv <jan.h.d@swipnet.se>
5306
5307 * xterm.c (xg_scroll_callback): Remove position, for jump set portion
5308 to min(value, whole).
5309
5310 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5311
5312 Bring back the changes to GDB-visible symbols, but only on AIX.
5313 And only if it's not pre-4.2 GCC.
5314 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
5315 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
5316 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
5317 New macros.
5318
5319 2014-06-02 Eli Zaretskii <eliz@gnu.org>
5320
5321 * fileio.c (Finsert_file_contents): Call prepare_to_modify_buffer
5322 with PT, not GPT. (Bug#16433)
5323
5324 Revert last changes to GDB-visible symbols.
5325 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros.
5326 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Don't use them.
5327 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
5328 Delete macros.
5329
5330 2014-06-02 Glenn Morris <rgm@gnu.org>
5331
5332 * cmds.c (Fself_insert_command): Allow zero repeat count. (Bug#17649)
5333
5334 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5335
5336 Fix port to 32-bit AIX with xlc (Bug#17598).
5337 * alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE.
5338 * conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty.
5339 * lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum,
5340 to work around a compiler bug in IBM xlc 12.1.
5341
5342 2014-06-02 Eli Zaretskii <eliz@gnu.org>
5343
5344 * xterm.c (x_update_window_end): Don't invalidate the entire
5345 mouse-highlight info, just signal frame_up_to_date_hook that mouse
5346 highlight needs to be redisplayed. (Bug#17588)
5347
5348 2014-06-02 Paul Eggert <eggert@cs.ucla.edu>
5349
5350 Port the GDB-visible symbols to AIX.
5351 Without them, GDB doesn't work to debug Emacs, since the AIX linker
5352 optimizes away the relevant external symbols. Use enums instead;
5353 this suffices for the AIX port, which is 32-bit-only anyway.
5354 * lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
5355 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
5356 (ARRAY_MARK_FLAG_val, PSEUDOVECTOR_FLAG_val, VALMASK_val):
5357 New macros.
5358
5359 Include sources used to create macuvs.h.
5360 * Makefile.in ($(srcdir)/macuvs.h): New rule.
5361 * macuvs.h: Use automatically-generated header.
5362
5363 2014-06-01 Paul Eggert <eggert@cs.ucla.edu>
5364
5365 Port signal-handling to DragonFly BSD (Bug#17646).
5366 * callproc.c, sysdep.c (block_child_signal, unblock_child_signal):
5367 Move implementations from callproc.c to sysdep.c.
5368 * process.h, syssignal.h (block_child_signal, unblock_child_signal):
5369 Move declarations from process.h to syssignal.h.
5370
5371 2014-06-01 Juanma Barranquero <lekktu@gmail.com>
5372
5373 * callint.c (Ffuncall_interactively): Add usage.
5374
5375 2014-06-01 Jan Djärv <jan.h.d@swipnet.se>
5376
5377 * nsfns.m (ns_appkit_version_str): Add os version for Cocoa.
5378
5379 2014-05-30 Eli Zaretskii <eliz@gnu.org>
5380
5381 * w32heap.c (malloc_before_dump, malloc_after_dump)
5382 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
5383 (mmap_alloc, mmap_realloc): Check for errors more thoroughly and
5384 set errno where appropriate to emulate CRT functions.
5385
5386 2014-05-30 Dmitry Antipov <dmantipov@yandex.ru>
5387
5388 Debugging facility to check whether 'const char *' points to
5389 relocatable data of non-pure Lisp string.
5390 * alloc.c (maybe_lisp_pointer): New function, refactored out of ...
5391 (mark_maybe_pointer): ... adjusted user.
5392 (relocatable_string_data_p): New function.
5393 * lisp.h (relocatable_string_data_p): Add prototype.
5394 * xdisp.c (message_with_string): If ENABLE_CHECKING, make sure
5395 the pointer to relocatable Lisp data is not used.
5396
5397 2014-05-30 Paul Eggert <eggert@cs.ucla.edu>
5398
5399 Don't let SIGINT handling block SIGCHLD indefinitely (Bug#17561).
5400 * atimer.c (block_atimers):
5401 * callproc.c (block_child_signal): Block SIGINT too;
5402 otherwise, its handler might now unblock signals that it shouldn't.
5403 * keyboard.c (read_char): Clear signal mask, since we may
5404 be in a SIGINT handler, and many signals may be masked.
5405 * keyboard.c (handle_interrupt):
5406 * sysdep.c (handle_arith_signal):
5407 Clear signal mask instead of just unblocking the signal that
5408 was received, since several signals may be blocked at this point.
5409
5410 2014-05-29 Eli Zaretskii <eliz@gnu.org>
5411
5412 * Makefile.in (TEMACS_POST_LINK): Remove target.
5413 (emacs$(EXEEXT)): Remove $(ADDSECTION) from prerequisites.
5414 (temacs$(EXEEXT)): Remove $(TEMACS_POST_LINK) from the recipe.
5415
5416 2014-05-29 Dmitry Antipov <dmantipov@yandex.ru>
5417
5418 * xmenu.c (xdialog_show): Remove prototype, rename to
5419 x_dialog_show, remove 2nd arg because it's always zero
5420 and simplify accordingly.
5421 (xw_popup_dialog): Adjust user.
5422 * w32menu.c (w32_dialog_show): Adjust prototype, remove
5423 2nd arg because it's always zero and simplify accordingly.
5424 (w32_popup_dialog): Adjust user.
5425
5426 2014-05-29 Eli Zaretskii <eliz@gnu.org>
5427
5428 * w32heap.c (report_temacs_memory_usage): New function.
5429
5430 * unexw32.c (unexec) [ENABLE_CHECKING]:
5431 Call report_temacs_memory_usage.
5432
5433 * w32heap.h (report_temacs_memory_usage): Add prototype.
5434
5435 2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
5436
5437 Don't substitute sigprocmask for pthread_sigmask (Bug#17561).
5438 * Makefile.in (LIB_PTHREAD_SIGMASK): Remove; all uses removed.
5439
5440 2014-05-29 Eli Zaretskii <eliz@gnu.org>
5441
5442 * buffer.c (init_buffer): Accept an argument 'initialized'.
5443 [USE_MMAP_FOR_BUFFERS]: If 'initialized' is non-zero, reset
5444 mmap_regions and mmap_fd, to avoid referencing stale data from the
5445 dump phase. Add an assertion for buffer text of buffers created
5446 in temacs before this function is called. (Bug#17622)
5447 (mmap_regions_1, mmap_fd_1): Remove unused variables.
5448
5449 * lisp.h (init_buffer): Update prototype.
5450
5451 * emacs.c (main): Pass 'initialized' as the argument to init_buffer.
5452
5453 2014-05-29 Dmitry Antipov <dmantipov@yandex.ru>
5454
5455 * alloc.c (Fgarbage_collect): Fix compilation with
5456 GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
5457
5458 2014-05-29 Paul Eggert <eggert@cs.ucla.edu>
5459
5460 * frame.c, frame.h (frame_char_to_pixel_position)
5461 (frame_set_mouse_position): Now static, and made private in
5462 frame.c rather than public in frame.h.
5463
5464 2014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
5465
5466 Refactor mouse positioning stuff to avoid code duplication.
5467 * frame.h (frame_char_to_pixel_position): New function.
5468 (x_set_mouse_position): Rename to...
5469 (frame_set_mouse_position): ...new function.
5470 (frame_set_mouse_pixel_position): Add prototype.
5471 * nsterm.m, w32term.c, xterm.c (x_set_mouse_pixel_position):
5472 Rename to frame_set_mouse_pixel_position.
5473 * frame.c (Fset_mouse_pixel_position, Fset_mouse_position):
5474 Adjust users.
5475 * xterm.h, w32term.h ( x_set_mouse_position)
5476 (x_set_mouse_pixel_position): Remove prototypes.
5477
5478 2014-05-28 Dmitry Antipov <dmantipov@yandex.ru>
5479
5480 On X, always make pointer visible when deleting frame (Bug#17609).
5481 * frame.c (frame_make_pointer_visible, frame_make_pointer_invisible):
5482 Pass frame as arg.
5483 * frame.h (frame_make_pointer_visible, frame_make_pointer_invisible):
5484 Adjust prototypes.
5485 * cmds.c (Fself_insert_command): Use SELECTED_FRAME.
5486 * keyboard.c (gobble_input): If there is no terminal input error,
5487 make sure the pointer is visible for all frames on this terminal.
5488 * xterm.c (x_free_frame_resources): Enable pointer visibility if
5489 it was previously disabled.
5490
5491 2014-05-28 Stefan Monnier <monnier@iro.umontreal.ca>
5492
5493 * data.c (Fzerop): Move to Elisp.
5494 (syms_of_data): Don't defsubr it.
5495 * keyboard.c (echo_keystrokes_p): New function.
5496 (read_char, record_menu_key, read_key_sequence): Use it.
5497
5498 * callint.c (Qfuncall_interactively): New var.
5499 (Qcall_interactively): Remove.
5500 (Ffuncall_interactively): New function.
5501 (Fcall_interactively): Use it.
5502 (syms_of_callint): Defsubr it.
5503
5504 2014-05-27 Stefan Monnier <monnier@iro.umontreal.ca>
5505
5506 * bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't
5507 relocated from under us.
5508
5509 2014-05-27 Fabrice Popineau <fabrice.popineau@gmail.com>
5510
5511 Use mmap(2) emulation for allocating buffer text on MS-Windows.
5512 * Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
5513 configure, not from HEAPSIZE.
5514 (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
5515
5516 * lisp.h (NONPOINTER_BITS): Modify the condition to define to zero
5517 for MinGW, since it no longer uses gmalloc.
5518
5519 * buffer.c: Do not define mmap allocations functions for Windows.
5520 Remove mmap_find which is unused. Remove mmap_set_vars which does
5521 nothing useful.
5522 [WINDOWSNT]: Include w32heap.h.
5523 (init_buffer): Always allocate new memory for buffers.
5524
5525 * emacs.c: Remove mmap_set_vars calls.
5526
5527 * image.c (free_image): Undef free for Windows because it is
5528 redirected to our private version.
5529
5530 * unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits compatibility.
5531 (copy_executable_and_dump_data): Remove dumping the heap section.
5532 (unexec): Restore using_dynamic_heap after dumping.
5533
5534 * w32heap.c (dumped_data_commit, malloc_after_dump)
5535 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
5536 (free_after_dump, free_before_dump, mmap_alloc, mmap_realloc)
5537 (mmap_free): New functions.
5538
5539 * w32heap.h: Declare dumped_data and mmap_* function prototypes.
5540
5541 2014-05-27 Paul Eggert <eggert@cs.ucla.edu>
5542
5543 * image.c (imagemagick_load_image): Use MagickRealType for local
5544 'color_scale', instead of double, to avoid a GCC warning about
5545 double promotion.
5546
5547 * xfns.c (Fx_window_property): Remove unused local.
5548
5549 Don't kill already-reaped process (Bug#17561).
5550 * process.c (process_send_signal): Fix race condition where a
5551 subprocess was reaped by a signal handler between the check for
5552 liveness and calling 'kill', which meant that Emacs could in
5553 theory kill an innocent bystander process. Do the fix by blocking
5554 SIGCHLD in a critical section that checks liveness before killing.
5555
5556 2014-05-26 Eli Zaretskii <eliz@gnu.org>
5557
5558 * w32.c (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT): Define only if undefined.
5559
5560 2014-05-26 Ken Brown <kbrown@cornell.edu>
5561
5562 * w32term.c (x_delete_display): Don't free dpyinfo->w32_id_name,
5563 even if !CYGWIN (see bug#17510).
5564
5565 2014-05-26 Jan Djärv <jan.h.d@swipnet.se>
5566
5567 * nsfns.m (Fns_do_applescript): Surround NSApp run
5568 with calls to ns_init_events, ns_finish_events (Bug#17424).
5569
5570 * nsterm.h (ns_init_events, ns_finish_events): Declare.
5571
5572 * nsterm.m (ns_init_events, ns_finish_events): New functions.
5573 (ns_read_socket, ns_select): Call ns_init_events, ns_finish_events.
5574
5575 * nsfns.m (ns_do_applescript): Surround executeAndReturnError
5576 with calls to ns_init_events, ns_finish_events (Bug#17424).
5577
5578 2014-05-26 Eli Zaretskii <eliz@gnu.org>
5579
5580 * xdisp.c (move_it_in_display_line_to): Don't record wrap position
5581 if we are iterating over an object that generates glyphs for
5582 marginal areas. (Bug#17585)
5583
5584 2014-05-26 Paul Eggert <eggert@cs.ucla.edu>
5585
5586 * xdisp.c (safe__call1, safe__eval): Now static.
5587
5588 2014-05-26 Eli Zaretskii <eliz@gnu.org>
5589
5590 * xdisp.c (safe__call): Accept va_list argument instead of '...'.
5591 (safe_call, safe__call1): Construct a va_list argument for safe_call.
5592 (safe_call1): Call safe_call instead of safe__call directly.
5593
5594 2014-05-26 Ken Brown <kbrown@cornell.edu>
5595
5596 * w32term.c (x_delete_display) [CYGWIN]: Don't free
5597 dpyinfo->w32_id_name, to make sure it doesn't get freed more than
5598 once. (Bug#17510)
5599
5600 2014-05-26 Stefan Monnier <monnier@iro.umontreal.ca>
5601
5602 * xdisp.c: Bind inhibit-quit during pre-redisplay-function.
5603 (safe__call, safe__call1, safe__eval): New functions.
5604 (safe_call): Use it.
5605 (prepare_menu_bars): Use it for pre-redisplay-function (bug#17577).
5606 (display_mode_element): Same for `:eval'.
5607
5608 2014-05-26 Paul Eggert <eggert@cs.ucla.edu>
5609
5610 Fix port to 32-bit AIX (Bug#17540).
5611 * unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr
5612 twice. _text already includes this offset.
5613 (unrelocate_symbols): Don't cast 64-bit integer to pointer.
5614
5615 2014-05-26 Eli Zaretskii <eliz@gnu.org>
5616
5617 * xdisp.c (move_it_in_display_line_to): Avoid infinite recursion:
5618 when closest_pos is identical to to_charpos, don't recurse, since
5619 we already tried that, and failed. (Bug#17539)
5620
5621 * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are
5622 unwinding when frame's faces were not initialized yet, increment
5623 the frame's image-cache reference count before calling
5624 x_free_frame_resources. Don't dereference
5625 dpyinfo->terminal->image_cache if it is NULL. (Bug#17524)
5626
5627 2014-05-25 Jan Djärv <jan.h.d@swipnet.se>
5628
5629 * nsfont.m (nsfont_draw): Simplify as arguments are adjusted in
5630 nsterm.m now.
5631
5632 * nsterm.m (ns_draw_glyph_string): Move isComposite and end from
5633 macfont.m, call draw with adjusted arguments so font drivers
5634 don't need to do that.
5635
5636 * macfont.m (macfont_draw): Merge changes from Macport.
5637
5638 2014-05-24 Eli Zaretskii <eliz@gnu.org>
5639
5640 * alloc.c (garbage_collect_1): New function, with all of the guts
5641 of Fgarbage_collect.
5642 (mark_stack): Accept an argument END and don't mark Lisp objects
5643 on the stack beyond the address given by END. Calculation of END
5644 was moved to Fgarbage_collect.
5645 (Fgarbage_collect): Calculate the end address of the stack portion
5646 that needs to be examined by mark_stack, and pass that address to
5647 garbage_collect_1, which will pass it to mark_stack.
5648 See http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00270.html
5649 for more details about the underlying problems. In particular,
5650 this avoids dumping Emacs with the large hash-table whose value is
5651 held in purify-flag for most of the time loadup.el runs.
5652
5653 2014-05-24 Jan Djärv <jan.h.d@swipnet.se>
5654
5655 * xfns.c (x_window_property_intern): New function (code from
5656 x_window_property).
5657 (Fx_window_property): Call x_window_property_intern. If property
5658 not found and NILP (source) and outer window != inner window,
5659 check outer window for property (Bug#17537).
5660
5661 2014-05-22 Paul Eggert <eggert@cs.ucla.edu>
5662
5663 Supply malloc and alloc_size attributes for extern allocators.
5664 This documents the C API, and helps GCC generate a bit better code.
5665 * conf_post.h (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE)
5666 (ATTRIBUTE_MALLOC_SIZE): New macros.
5667 * gmalloc.c (malloc, realloc, calloc):
5668 * gtkutil.h (malloc_widget_value):
5669 * lisp.h (ralloc, r_re_alloc, xmalloc, xzalloc, xrealloc, xnmalloc)
5670 (xnrealloc, xstrdup, xlispstrdup, record_xmalloc):
5671 Use them.
5672
5673 2014-05-21 Paul Eggert <eggert@cs.ucla.edu>
5674
5675 Don't assume that ImageMagick uses a 16-bit quantum (Bug#17519).
5676 * image.c (imagemagick_load_image): Port to hosts that do not use
5677 a 16-bit quantum, i.e., QuantumRange does not equal 65535.
5678
5679 2014-05-21 Leo Liu <sdl.web@gmail.com>
5680
5681 * fns.c (Fnreverse): Accept strings for SEQ and update doc-string.
5682
5683 2014-05-20 Michael Albinus <michael.albinus@gmx.de>
5684
5685 * dbusbind.c (xd_signature): Revert last 2 patches.
5686
5687 2014-05-19 Paul Eggert <eggert@cs.ucla.edu>
5688
5689 Allow any non-nil value to count as true in bool-vector.
5690 Likewise for xd_signature in dbusbind.c.
5691 This is more consistent with the usual practice in Emacs, which is
5692 that any non-nil value counts as true.
5693 * alloc.c (Fbool_vector): Don't require args to be t or nil.
5694 * dbusbind.c (xd_signature): Likewise, for booleans.
5695 * data.c, lisp.h (Qbooleanp):
5696 * lisp.h (CHECK_BOOLEAN): Remove. All uses removed.
5697
5698 2014-05-19 Dmitry Antipov <dmantipov@yandex.ru>
5699
5700 * lisp.h (CHECK_BOOLEAN): New function.
5701 * alloc.c (Fbool_vector): New function.
5702 (syms_of_alloc): Defsubr it.
5703 * data.c (Qbooleanp): New symbol.
5704 (syms_of_data): DEFSYM it.
5705 * dbusbind.c (xd_signature): Use CHECK_BOOLEAN.
5706
5707 * font.c (font_matching_entity): Extract font-entity object
5708 from the vector of matching entities (Bug#17486).
5709
5710 2014-05-17 Paul Eggert <eggert@cs.ucla.edu>
5711
5712 Assume C99 or later (Bug#17487).
5713 * bytecode.c (B__dummy__): Remove.
5714 * conf_post.h (bool_bf) [!NS_IMPL_GNUSTEP]: Use bool.
5715 (FLEXIBLE_ARRAY_MEMBER): Now always empty.
5716 * dbusbind.c (XD_DEBUG_MESSAGE) [!DBUS_DEBUG]:
5717 * regex.c (DEBUG_PRINT): Assume varargs macros.
5718 * lisp.h (DEFUN_FUNCTION_INIT): Remove. All uses now assume C99.
5719
5720 2014-05-17 Fabrice Popineau <fabrice.popineau@gmail.com>
5721
5722 * buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Always map new
5723 memory for every buffer that was dumped.
5724
5725 2014-05-15 Dmitry Antipov <dmantipov@yandex.ru>
5726
5727 * fns.c (Freverse): Allow vectors, bool vectors and strings.
5728 (Fnreverse): Allow vectors and bool vectors.
5729
5730 2014-05-14 Dmitry Antipov <dmantipov@yandex.ru>
5731
5732 Minor cleanup for terminal setup.
5733 * termhooks.h (create_terminal): Adjust prototype.
5734 * terminal.c (create_terminal): Pass output method and RIF as args.
5735 (init_initial_terminal):
5736 * nsterm.m (ns_create_terminal):
5737 * term.c (init_tty):
5738 * w32term.c (w32_create_terminal):
5739 * xterm.c (x_create_terminal): Adjust users.
5740 Avoid redundant NULL initializers and add comments.
5741
5742 2014-05-13 Paul Eggert <eggert@cs.ucla.edu>
5743
5744 * keyboard.c (Qdeactivate_mark): Now static.
5745
5746 2014-05-13 Dmitry Antipov <dmantipov@yandex.ru>
5747
5748 If available, use Xfixes extension to do pointer blanking.
5749 * Makefile.in (XFIXES_CFLAGS, XFIXES_LIBS): New var.
5750 * xfns.c (x_set_mouse_color): Do not call make_invisible_cursor here.
5751 (make_invisible_cursor): Move to...
5752 * xterm.c (make_invisible_cursor): ...here.
5753 (x_probe_xfixes_extension, xfixes_toggle_visible_pointer)
5754 (x_toggle_visible_pointer, x_setup_pointer_blanking): New functions.
5755 (x_term_init): Call to x_setup_pointer_blanking.
5756 (XTtoggle_invisible_pointer): Use blanking specific to this display.
5757 * xterm.h (struct x_display_info): New member toggle_visible_pointer.
5758
5759 2014-05-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
5760
5761 * xdisp.c (draw_glyphs): Set clipping to highlight boundaries.
5762
5763 2014-05-12 Glenn Morris <rgm@gnu.org>
5764
5765 * fileio.c (Ffile_executable_p): Doc tweak.
5766
5767 2014-05-12 Jan Djärv <jan.h.d@swipnet.se>
5768
5769 * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup
5770 instead of deprecated g_settings_list_schemas if possible (Bug#17434).
5771
5772 2014-05-08 Paul Eggert <eggert@cs.ucla.edu>
5773
5774 * minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430).
5775
5776 2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
5777
5778 Fix initialization of minibuffer history variable (Bug#17430).
5779 * minibuf.c (read_minibuf): Initialize histval to Qnil if unbound.
5780 Move the initialization up to prevent any "value void" message.
5781
5782 2014-05-08 Samuel Bronson <naesten@gmail.com>
5783
5784 * keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
5785 are matched (bug#17413).
5786
5787 2014-05-08 Jarek Czekalski <jarekczek@poczta.onet.pl>
5788
5789 Stop tooltips pulling Emacs window to front (Bug#17408).
5790 * w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to
5791 SetWindowPos invocations.
5792
5793 2014-05-08 Jan Djärv <jan.h.d@swipnet.se>
5794
5795 * nsselect.m (Fx_selection_exists_p): Just return Qnil if window system
5796 not initialized (Bug#17398).
5797
5798 2014-05-07 Paul Eggert <eggert@cs.ucla.edu>
5799
5800 * image.c: Include <png.h> before <setjmp.h> (Bug#17429).
5801
5802 2014-05-06 Paul Eggert <eggert@cs.ucla.edu>
5803
5804 * image.c: Do not use libpng if HAVE_NS, as NS does its own thing.
5805 [HAVE_NS]: Do not include png.h.
5806 (x_query_frame_background_color): New function.
5807 (png_load_body, imagemagick_load_image, svg_load_image): Use it.
5808 (png_load_body): Coalesce duplicate code.
5809
5810 2014-05-04 Paul Eggert <eggert@cs.ucla.edu>
5811
5812 Consult libpng-config more consistently (Bug#17339).
5813 * Makefile.in (PNG_CFLAGS): New var.
5814 (ALL_CFLAGS): Use it.
5815 * image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
5816 CFLAGS now handles this.
5817
5818 2014-05-03 Paul Eggert <eggert@cs.ucla.edu>
5819
5820 Handle systems without WCONTINUED consistently. (Bug#15110, 17339)
5821 * process.c (handle_child_signal): Remove WCONTINUED ifdef,
5822 because WCONTINUED is always defined now.
5823 * syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c.
5824
5825 2014-05-03 Eli Zaretskii <eliz@gnu.org>
5826
5827 * buffer.c (overlay_strings): Fix the wording of the commentary.
5828
5829 2014-05-01 Glenn Morris <rgm@gnu.org>
5830
5831 * floatfns.c (Fisnan):
5832 * profiler.c (Fprofiler_cpu_running_p): Doc fix (replace `iff').
5833
5834 2014-05-01 Eli Zaretskii <eliz@gnu.org>
5835
5836 * term.c (tty_menu_activate): A better initialization for cursor
5837 coordinates.
5838
5839 2014-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
5840
5841 * intervals.c: Tighten assertions.
5842 (create_root_interval): Make sure the interval is not empty.
5843 (intervals_equal): Use booleans.
5844 (rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH.
5845 (balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs.
5846 (balance_possible_root_interval): Simplify and use booleans.
5847 (split_interval_right, split_interval_left): Check LENGTH, and remove
5848 now redundant assertion.
5849 (adjust_intervals_for_insertion): Remove now redundant assertions.
5850 (delete_node, interval_deletion_adjustment)
5851 (adjust_intervals_for_deletion, merge_interval_right)
5852 (merge_interval_left): Check LENGTH rather than TOTAL_LENGTH.
5853 (reproduce_interval): Make sure the interval is not empty.
5854
5855 2014-04-30 Paul Eggert <eggert@cs.ucla.edu>
5856
5857 * term.c (tty_menu_activate): Don't assume row and col are initialized.
5858 GCC 4.9.0 warned about this, and I couldn't easily prove to my own
5859 satisfaction that they would always be initialized.
5860
5861 2014-04-30 Eli Zaretskii <eliz@gnu.org>
5862
5863 * term.c (tty_menu_display): Move the cursor to the active menu item.
5864 (tty_menu_activate): Return the cursor to the active menu item
5865 after displaying the menu and after displaying help-echo.
5866 See http://lists.gnu.org/archive/html/emacs-devel/2014-04/msg00402.html
5867 for the details of why this is needed by screen readers and
5868 Braille displays.
5869
5870 2014-04-30 Glenn Morris <rgm@gnu.org>
5871
5872 * process.c (handle_child_signal):
5873 Handle systems without WCONTINUED. (Bug#15110, 17339)
5874
5875 2014-04-29 Stefan Monnier <monnier@iro.umontreal.ca>
5876
5877 * window.c (struct saved_window): Remove mark.
5878 (Fset_window_configuration, save_window_save)
5879 (compare_window_configurations): Don't touch marks any more.
5880
5881 2014-04-28 Paul Eggert <eggert@cs.ucla.edu>
5882
5883 Use bits_word for gcmarkbits.
5884 * alloc.c (struct cons_block, struct float_block): On 64-bit hosts,
5885 bits_word is typically a tad more efficient for mark bits than
5886 unsigned is, so use bits_word. All uses changed.
5887 * lisp.h (BITS_PER_INT): Remove; no longer used.
5888
5889 Avoid undefined behavior in signed left shift.
5890 This ports to GCC 4.9.0 with -fsanitize=undefined.
5891 * alloc.c (bool_vector_fill, SETMARKBIT, UNSETMARKBIT):
5892 * data.c (Fash):
5893 * regex.c (extract_number):
5894 * lisp.h (make_number, XINT):
5895 Do not shift a 1 bit left into a sign bit.
5896 * alloc.c (struct cons_block, struct float_block): Use unsigned,
5897 not int, for gcmarkbits. All uses changed.
5898
5899 2014-04-25 Eli Zaretskii <eliz@gnu.org>
5900
5901 * search.c (Fnewline_cache_check): Don't try to count newlines
5902 outside the buffer's restriction, as find_newline doesn't support that.
5903
5904 2014-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
5905
5906 * window.c (Fset_window_configuration): Deactivate the mark before
5907 unsetting the mark.
5908 (set_window_buffer): Ignore window_initialized.
5909 (window_initialized): Remove.
5910 * keyboard.c (Qdeactivate_mark): Not static any more.
5911 * buffer.c (buffer_local_value): Rename from buffer_local_value_1.
5912 Update all callers.
5913
5914 2014-04-23 Paul Eggert <eggert@cs.ucla.edu>
5915
5916 * conf_post.h (ADDRESS_SANITIZER_WORKAROUND): Port to GCC 4.9.0
5917 and to clang 3.4, which have fixed the bug. This should let us
5918 run a bit faster on these platforms when address sanitization is
5919 in effect.
5920
5921 2014-04-22 Paul Eggert <eggert@cs.ucla.edu>
5922
5923 Port to GCC 4.9.0 with --enable-gcc-warnings.
5924 * image.c (struct my_jpeg_error_mgr) [lint]: Remove member fp.
5925 All uses removed.
5926 (jpeg_load_body) [lint]: Add a 'volatile' to pacify a buggy GCC in
5927 a way that also works with GCC 4.9.0.
5928
5929 * search.c (Fnewline_cache_check): Remove unused locals.
5930
5931 2014-04-22 Eli Zaretskii <eliz@gnu.org>
5932
5933 * search.c (find_newline1): New subroutine.
5934 (Fnewline_cache_check): New function.
5935 (syms_of_search): Defsubr it.
5936
5937 2014-04-22 Jarek Czekalski <jarekczek@poczta.onet.pl>
5938
5939 Fix freezing with scroll bars of GTK3 Toolkit (bug#15801).
5940 * keyboard.c (unblock_input): Add comment.
5941 * xgselect.c (xg_select): Prevent Glib main loop recursion.
5942
5943 2014-04-22 Daniel Colascione <dancol@dancol.org>
5944
5945 * lread.c (readevalloop_eager_expand_eval): New function
5946 that can recurse into toplevel forms.
5947 (readevalloop): Call it.
5948 * lisp.h: Declare Qprogn.
5949 * callint.c (Qprogn): No longer static.
5950
5951 2014-04-19 Stefan Monnier <monnier@iro.umontreal.ca>
5952
5953 * intervals.c (rotate_right, rotate_left): Fix up length computation.
5954 Also change identifiers to match the comments, and add more assertions
5955 (bug#16234).
5956
5957 2014-04-18 Paul Eggert <eggert@cs.ucla.edu>
5958
5959 * emacs.c (close_output_streams): Don't clear and restore errno.
5960
5961 2014-04-18 Jan Djärv <jan.h.d@swipnet.se>
5962
5963 * xterm.c (x_make_frame_visible): Prevent endless loop when frame
5964 never becomes visible, i.e. using XMonad (Bug#17237).
5965
5966 2014-04-18 Eli Zaretskii <eliz@gnu.org>
5967
5968 * xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation
5969 glyph is written to TEXT_AREA of the temporary glyph_row. (Bug#17288)
5970 (Fline_pixel_height): Don't assume that the current buffer and the
5971 selected window's buffer are one and the same. (Bug#17281)
5972
5973 * insdel.c (invalidate_buffer_caches): Invalidate the bidi
5974 paragraph-start cache before the newline cache. (Bug#17269)
5975
5976 2014-04-17 Paul Eggert <eggert@cs.ucla.edu>
5977
5978 * term.c (tty_send_additional_strings): No need to fflush here,
5979 as callers fflush.
5980 (tty_set_terminal_modes): fflush after sending additional strings,
5981 not before.
5982
5983 2014-04-17 Daniel Colascione <dancol@dancol.org>
5984
5985 * term.c (Qtty_mode_set_strings, Qtty_mode_reset_strings):
5986 New symbols.
5987 (tty_send_additional_strings): New function.
5988 (tty_set_terminal_modes, tty_reset_terminal_modes): Use it.
5989 (syms_of_term): Intern tty-mode-set-strings and
5990 tty-mode-reset-strings.
5991
5992 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
5993
5994 * window.c (save_window_save): Lookup window_point_insertion_type in
5995 the right buffer (bug#15457).
5996 (Qwindow_point_insertion_type): New var.
5997 (syms_of_window): Initialize it.
5998
5999 2014-04-16 Eli Zaretskii <eliz@gnu.org>
6000
6001 Fix the MSDOS build.
6002 * unexcoff.c [MSDOS]: Include libc/atexit.h.
6003 (copy_text_and_data): Zero out the atexit chain pointer before
6004 dumping Emacs.
6005
6006 * termhooks.h (encode_terminal_code): Update prototype.
6007
6008 * term.c (encode_terminal_code) [DOS_NT]: Make it externally
6009 visible for all DOS_NT ports, not just WINDOWSNT.
6010 (syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
6011
6012 * sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
6013 unless it is defined.
6014 (emacs_pipe) [MSDOS]: Redirect to 'pipe'.
6015
6016 * process.c (close_on_exec, accept4, process_socket): Move into
6017 the "ifdef subprocesses" part.
6018 (catch_child_signal): Condition by "ifdef subprocesses".
6019 (syms_of_process) <Qinternal_default_process_sentinel>
6020 <Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
6021
6022 * msdos.h: Add prototypes for new functions.
6023 (EINPROGRESS): Define.
6024 (O_CLOEXEC): Define to zero.
6025
6026 * msdos.c (check_window_system): Remove unnecessary an
6027 incompatible duplicate function.
6028 (sys_opendir, readlinkat, faccessat, fstatat, unsetenv):
6029 New functions in support of new functionality.
6030
6031 * menu.c (single_menu_item): Add visual indication of submenu
6032 also for menus on MSDOS frames.
6033 (Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
6034
6035 * lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
6036 when async subprocesses aren't supported.
6037
6038 * font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
6039
6040 * emacs.c (close_output_streams): Zero out errno before calling
6041 close_stream.
6042
6043 * dired.c [MSDOS]: Include msdos.h.
6044
6045 * conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
6046 (DATA_START) [MSDOS]: Define.
6047 (SYSTEM_PURESIZE_EXTRA) [MSDOS]: Enlarge by 25K.
6048
6049 * callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
6050 Ifdef away for MSDOS.
6051 (record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
6052 (call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
6053 for MSDOS.
6054 (call_process) [MSDOS]: Fix call sequence of dostounix_filename.
6055 Use temporary file template that is compatible with mkostemp.
6056 Move vfork-related portions under #ifndef MSDOS.
6057 (syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
6058
6059 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
6060
6061 * buffer.c (Foverlays_at): Add argument `sorted'.
6062
6063 2014-04-16 Eli Zaretskii <eliz@gnu.org>
6064
6065 * insdel.c (invalidate_buffer_caches): When deleting or replacing
6066 text, invalidate the bidi_paragraph_cache upto and including the
6067 preceding newline.
6068
6069 2014-04-16 Paul Eggert <eggert@cs.ucla.edu>
6070
6071 Port to IRIX 6.5 (Bug#9684).
6072 * conf_post.h (INET6) [IRIX6_5]: Define.
6073 (HAVE_GETADDRINFO) [IRIX6_5]: Undef.
6074 * data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined.
6075
6076 2014-04-16 Eli Zaretskii <eliz@gnu.org>
6077
6078 * keyboard.c (Fopen_dribble_file): Encode the dribble file-name
6079 before passing it to system APIs.
6080
6081 2014-04-16 Stefan Monnier <monnier@iro.umontreal.ca>
6082
6083 * bytecode.c (exec_byte_code): Rework the volatiles. Most importantly,
6084 make sure stack.byte_string_start is not de-adjusted by pushhandler.
6085
6086 2014-04-16 Paul Eggert <eggert@cs.ucla.edu>
6087
6088 * keyboard.c (Fopen_dribble_file): Avoid some races. (Bug#17187)
6089
6090 2014-04-15 Paul Eggert <eggert@cs.ucla.edu>
6091
6092 Remove DATA_SEG_BITS.
6093 The DATA_SEG_BITS hack was needed for older 32 bit platforms.
6094 As a result of this change, Emacs won't work on IRIX 6.5 with IRIX
6095 cc, but that platform is so old that SGI itself stopped supporting
6096 it in December 2013. If you still need Emacs on IRIX, please
6097 either compile with GCC and port the undumping code, or run
6098 './configure --with-wide-int'.
6099 * alloc.c (gdb_make_enums_visible): Update to match lisp.h.
6100 * lisp.h (GCTYPEBITS): Move definition up, and switch to the
6101 DEFINE_GDB_SYMBOL_START way to define it.
6102 (NONPOINTER_BITS): New macro.
6103 (EMACS_INT): Use it.
6104 [!USE_LSB_TAG && !WIDE_EMACS_INT]: Fail, and suggest reporting
6105 the problem and/or configuring --with-wide-int.
6106 (USE_LSB_TAG): Simplify, based on above changes.
6107 (gdb_DATA_SEG_BITS): Remove. All uses removed.
6108 * vm-limit.c (exceeds_lisp_ptr): Remove. All uses removed.
6109
6110 2014-04-12 Eli Zaretskii <eliz@gnu.org>
6111
6112 * xdisp.c (move_it_by_lines): If a large portion of buffer text is
6113 covered by a display string that ends in a newline, and that cases
6114 going back by DVPOS lines to hit the search limit, lift the limit
6115 and go back until DVPOS is reached. (Bug#17244)
6116
6117 * indent.c (Fvertical_motion): Handle correctly the case when the
6118 display string is preceded by an empty line.
6119
6120 * w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and
6121 use S_IWRITE instead.
6122
6123 2014-04-11 Glenn Morris <rgm@gnu.org>
6124
6125 * keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187)
6126
6127 2014-04-11 Ken Brown <kbrown@cornell.edu>
6128
6129 * Makefile.in (EMACS_MANIFEST): Revert last change.
6130
6131 2014-04-10 Daniel Colascione <dancol@dancol.org>
6132
6133 * puresize.h (BASE_PURESIZE): Increase.
6134
6135 2014-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
6136
6137 * keyboard.c (syms_of_keyboard): Make deactivate-mark buffer-local.
6138
6139 * insdel.c (prepare_to_modify_buffer_1): Cancel lock-file checks and
6140 region handling (and don't call signal_before_change) if
6141 inhibit_modification_hooks is set.
6142 (signal_before_change): Don't check inhibit_modification_hooks any more.
6143
6144 2014-04-08 Daniel Colascione <dancol@dancol.org>
6145
6146 * alloc.c (sweep_symbols, mark_object): Assert that symbol
6147 function cells contain valid lisp objects. (Modified version of
6148 patch from Dmitry).
6149
6150 * alloc.c (detect_suspicious_free): Split actual stack capturing
6151 out into new function for easier breakpoint setting.
6152 (note_suspicious_free): New function.
6153
6154 2014-04-07 Stefan Monnier <monnier@iro.umontreal.ca>
6155
6156 * lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
6157
6158 * alloc.c: Keep track of symbols referenced from pure space (bug#17168).
6159 (symbol_block_pinned): New var.
6160 (Fmake_symbol): Initialize `pinned'.
6161 (purecopy): New function, extracted from Fpurecopy. Mark symbols as
6162 pinned and signal an error for un-purifiable objects.
6163 (pure_cons): Use it.
6164 (Fpurecopy): Use it, except for objects that can't be purified.
6165 (mark_pinned_symbols): New function.
6166 (Fgarbage_collect): Use it.
6167 (gc_sweep): Remove hack made unnecessary.
6168
6169 2014-04-07 Glenn Morris <rgm@gnu.org>
6170
6171 * keyboard.c (Fopen_dribble_file): Doc tweak.
6172
6173 2014-04-07 Ken Brown <kbrown@cornell.edu>
6174
6175 * Makefile.in (EMACS_MANIFEST): Update comment. (Bug#17176)
6176
6177 2014-04-07 Paul Eggert <eggert@cs.ucla.edu>
6178
6179 * alloc.c: Simplify by removing use of HAVE_EXECINFO_H.
6180 We have a substitute execinfo.h on hosts that lack it.
6181 (suspicious_free_history): Make it EXTERNALLY_VISIBLE so it
6182 isn't optimized away.
6183
6184 2014-04-05 Paul Eggert <eggert@cs.ucla.edu>
6185
6186 Prefer 'ARRAYELTS (x)' to 'sizeof x / sizeof *x'.
6187 * alloc.c (memory_full):
6188 * charset.c (syms_of_charset):
6189 * doc.c (Fsnarf_documentation):
6190 * emacs.c (main):
6191 * font.c (BUILD_STYLE_TABLE):
6192 * keyboard.c (make_lispy_event):
6193 * profiler.c (setup_cpu_timer):
6194 * xgselect.c (xg_select):
6195 * xterm.c (record_event, STORE_KEYSYM_FOR_DEBUG):
6196 Use ARRAYELTS.
6197 * font.c (FONT_PROPERTY_TABLE_SIZE): Remove.
6198 Replace the only use with ARRAYELTS (font_property_table).
6199 * xfaces.c (DIM): Remove. All uses replaced by ARRAYELTS.
6200
6201 2014-04-03 Daniel Colascione <dancol@dancol.org>
6202
6203 * xterm.c (x_term_init):
6204 * xfns.c (best_xim_style):
6205 * xfaces.c (Fdump_colors):
6206 * w32fns.c (w32_default_color_map):
6207 * w32.c (init_environment, N_ENV_VARS):
6208 * unexcw.c (read_exe_header):
6209 * term.c (term_get_fkeys_1):
6210 * sysdep.c (init_baud_rate):
6211 * nsterm.m (ns_convert_key):
6212 * nsfns.m (get_geometry_from_preferences):
6213 * msdos.c (dos_set_window_size, init_environment):
6214 * macfont.m (mac_font_get_glyph_for_cid)
6215 (macfont_store_descriptor_attributes)
6216 (macfont_create_attributes_with_spec, mac_ctfont_get_glyph_for_cid):
6217 * keyboard.c (command_loop_1, read_menu_command, make_lispy_event)
6218 (NUM_MOD_NAMES, read_key_sequence_vs, Fcurrent_input_mode)
6219 (syms_of_keyboard):
6220 * image.c (xpm_str_to_color_key):
6221 * fringe.c (MAX_STANDARD_FRINGE_BITMAPS):
6222 * frame.c (x_set_frame_parameters):
6223 * fileio.c (Ffile_selinux_context):
6224 * emacs.c (sort_args):
6225 * dosfns.c (msdos_stdcolor_name):
6226 * dired.c (file_attributes):
6227 * chartab.c (uniprop_decoder_count, uniprop_encode_count):
6228 Change expressions of the form sizeof(arr) / sizeof(arr[0])
6229 to ARRAYELTS (arr).
6230
6231 2014-04-02 Daniel Colascione <dancol@dancol.org>
6232
6233 * data.c (Ffset): Abort if we're trying to set a function call to
6234 a dead lisp object.
6235
6236 * lisp.h (ARRAYELTS): New macro.
6237
6238 * alloc.c: Include execinfo.h if available.
6239 (SUSPICIOUS_OBJECT_CHECKING): New macro; define unconditionally.
6240 (suspicious_free_record): New structure.
6241 (suspicious_objects, suspicious_object_index)
6242 (suspicious_free_history, suspicious_free_history_index):
6243 New variables.
6244 (find_suspicious_object_in_range, detect_suspicious_free)
6245 (Fsuspicious_object): New functions.
6246 (cleanup_vector): Call find_suspicious_object_in_range.
6247
6248 2014-04-02 Martin Rudalics <rudalics@gmx.at>
6249
6250 * xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
6251 width from font width (Bug#17163).
6252
6253 * frame.c (x_set_frame_parameters): Calculate default values of
6254 new frame sizes only after all other frame parameters have been
6255 processed (Bug#17142).
6256
6257 2014-04-02 Ken Brown <kbrown@cornell.edu>
6258
6259 * conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000.
6260 (Bug#17112)
6261
6262 2014-04-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6263
6264 * xterm.c (x_draw_image_glyph_string): Adjust image background
6265 width accordingly when its x position is adjusted. (Bug#17115)
6266
6267 2014-04-02 Dmitry Antipov <dmantipov@yandex.ru>
6268
6269 * font.c (font_list_entities): Do not add empty vector to font cache.
6270 (font_matching_entity): Likewise. If matching entity is found, insert
6271 1-item vector with this entity instead of entity itself (Bug#17125).
6272
6273 * xterm.c (x_term_init) [USE_LUCID]: Fix minor memory leak.
6274
6275 2014-04-01 Paul Eggert <eggert@cs.ucla.edu>
6276
6277 * fns.c (validate_subarray): Rename from validate_substring,
6278 since it works for vectors too. New arg ARRAY. Optimize for the
6279 non-nil case. Instead of returning bool, throw an error if out of
6280 range, so that the caller needn't do that. All uses changed.
6281 Report original values if out of range.
6282 (Fsubstring, Fsubstring_no_properties, secure_hash):
6283 Also optimize the case where FROM is 0 or TO is the size.
6284
6285 2014-03-31 Dmitry Antipov <dmantipov@yandex.ru>
6286
6287 * search.c (Freplace_match): Use make_specified_string.
6288 * xterm.c, w32term.c (x_set_glyph_string_gc): Use emacs_abort
6289 to catch bogus override face of glyph strings.
6290 * fns.c (Fsubstring, Fsubstring_no_properties, secure_hash):
6291 Move common substring range checking code to...
6292 (validate_substring): ...this function.
6293
6294 2014-03-31 Jan Djärv <jan.h.d@swipnet.se>
6295
6296 * nsmenu.m (free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976)
6297
6298 2014-03-30 Jan Djärv <jan.h.d@swipnet.se>
6299
6300 * nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
6301 bar is zero height, just return (Bug#16976).
6302 (initFrameFromEmacs:): Initialize wait_for_tool_bar.
6303
6304 * nsterm.h (EmacsView): Add wait_for_tool_bar.
6305
6306 * nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
6307 is nil. If waiting for toolbar to complete, force a redraw.
6308
6309 2014-03-28 Glenn Morris <rgm@gnu.org>
6310
6311 * emacs.c (emacs_version): Use PACKAGE_VERSION rather than VERSION.
6312 (emacs_bugreport): New variable.
6313 (usage_message): Use PACKAGE_BUGREPORT.
6314 (syms_of_emacs) <report-emacs-bug-address>: New variable.
6315
6316 * emacs.c (syms_of_emacs) <system-configuration-features>: New var.
6317
6318 2014-03-27 Paul Eggert <eggert@cs.ucla.edu>
6319
6320 Port recent signal-related changes to FreeBSD.
6321 Reported by Herbert J. Skuhra.
6322 * lisp.h (block_tty_out_signal, unblock_tty_out_signal):
6323 Move decls from here ...
6324 * syssignal.h: ... to here, so that lisp.h doesn't depend on signal.h.
6325
6326 2014-03-27 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6327
6328 * w32term.c (x_draw_image_glyph_string): Fix computation of height
6329 and width of image background when it is displayed with a 'box'
6330 face. (Bug#17115)
6331
6332 2014-03-27 Paul Eggert <eggert@penguin.cs.ucla.edu>
6333
6334 More backward-compatible fix to char-equal core dump (Bug#17011).
6335 * editfns.c (Fchar_equal): In unibyte buffers, assume values in
6336 range 128-255 are raw bytes. Suggested by Eli Zaretskii.
6337
6338 2014-03-27 Juanma Barranquero <lekktu@gmail.com>
6339
6340 * image.c (init_svg_functions): When loading SVG-related libraries,
6341 free already loaded libraries if the initialization fails.
6342 (rsvg_handle_set_size_callback): Remove declaration, unused.
6343
6344 2014-03-26 Paul Eggert <eggert@cs.ucla.edu>
6345
6346 Fix core dump in char-equal (Bug#17011).
6347 * editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
6348 unibyte buffers, as we can't tell whether the characters are
6349 actually unibyte.
6350
6351 * insdel.c (adjust_markers_for_delete): Remove unused local.
6352
6353 2014-03-26 Barry O'Reilly <gundaetiapo@gmail.com>
6354
6355 Have (MARKER . ADJUSTMENT) undo records always be immediately
6356 after their corresponding (TEXT . POS) record in undo list.
6357 (Bug#16818)
6358 * lisp.h (record-delete): New arg record_markers.
6359 (record_marker_adjustment): No longer needed outside undo.c.
6360 * insdel.c (adjust_markers_for_delete): Move calculation of marker
6361 adjustments to undo.c's record_marker_adjustments. Note that
6362 fileio.c's decide_coding_unwind is another caller to
6363 adjust_markers_for_delete. Because it has undo list bound to t,
6364 it does not rely on adjust_markers_for_delete to record marker
6365 adjustments.
6366 (del_range_2): Swap call to record_delete and
6367 adjust_markers_for_delete so as undo marker adjustments are
6368 recorded before current deletion's adjustments, as before.
6369 (adjust_after_replace):
6370 (replace_range): Pass value for new record_markers arg to
6371 delete_record.
6372 * undo.c (record_marker_adjustment): Rename to
6373 record_marker_adjustments and made static.
6374 (record_delete): Check record_markers arg and call
6375 record_marker_adjustments.
6376 (record_change): Pass value for new record_markers arg to
6377 delete_record.
6378 (record_point): at_boundary calculation no longer needs to account
6379 for marker adjustments.
6380
6381 2014-03-26 Martin Rudalics <rudalics@gmx.at>
6382
6383 * w32term.c (x_set_window_size): Refine fix from 2014-03-14
6384 (Bug#17077).
6385
6386 2014-03-26 Glenn Morris <rgm@gnu.org>
6387
6388 * fileio.c (Ffile_symlink_p): Doc fix. (Bug#17073)
6389
6390 2014-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
6391
6392 * buffer.c (struct sortvec): Add field `spriority'.
6393 (compare_overlays): Use it.
6394 (sort_overlays): Set it.
6395
6396 2014-03-26 Eli Zaretskii <eliz@gnu.org>
6397
6398 * xdisp.c (redisplay_window): If all previous attempts to find the
6399 cursor row failed, try a few alternatives before falling back to
6400 the top-most row of the window. Use row_containing_pos. (Bug#17047)
6401
6402 2014-03-26 Juanma Barranquero <lekktu@gmail.com>
6403
6404 * image.c (x_bitmap_height, x_bitmap_width) [HAVE_X_WINDOWS]:
6405 * sysdep.c (reset_sigio) [!DOS_NT]: Declare conditionally.
6406
6407 * keyboard.c (read_decoded_event_from_main_queue): #ifdef out
6408 variables on Windows.
6409
6410 * w32fns.c (Ffile_system_info): Use parenthesis in and/or expression.
6411
6412 * w32.c (unsetenv): Remove unused var `retval'.
6413 (emacs_gnutls_pull): Remove unused vars `fdset' and `timeout'.
6414
6415 * w32notify.c (watch_worker): Remove unnecesary var sleep_result.
6416 (start_watching): Remove unused var `thr'.
6417
6418 * w32proc.c (sys_spawnve): Comment out unused vars `first', `last'.
6419 (find_child_console): Remove unnecesary var `thread_id'.
6420
6421 * w32term.c (w32_read_socket): Comment out unused vars `row', `columns'.
6422 (x_focus_frame): #ifdef 0 unused variable `dpyinfo'.
6423
6424 2014-03-26 Glenn Morris <rgm@gnu.org>
6425
6426 * filelock.c (Flock_buffer): Doc tweak.
6427
6428 * buffer.c (Frestore_buffer_modified_p, Fkill_buffer):
6429 * emacs.c (shut_down_emacs):
6430 * fileio.c (Finsert_file_contents, write_region):
6431 * filelock.c (top-level, syms_of_filelock):
6432 * insdel.c (prepare_to_modify_buffer_1):
6433 CLASH_DETECTION is always defined now.
6434
6435 2014-03-25 Eli Zaretskii <eliz@gnu.org>
6436
6437 * w32.c (w32_delayed_load): Call DisableThreadLibraryCalls on the
6438 DLL handle, to speed up thread startup.
6439
6440 2014-03-25 Paul Eggert <eggert@cs.ucla.edu>
6441
6442 Handle sigmask better with nested signal handlers (Bug#15561).
6443 * atimer.c (sigmask_atimers): Remove.
6444 Remaining use rewritten to use body of this function.
6445 * atimer.c (block_atimers, unblock_atimers):
6446 * callproc.c (block_child_signal, unblock_child_signal):
6447 * sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
6448 New arg OLDSET. All callers changed.
6449 * atimer.c (block_atimers, unblock_atimers):
6450 * callproc.c (block_child_signal, unblock_child_signal):
6451 * keyboard.c (handle_interrupt):
6452 * sound.c (vox_configure, vox_close):
6453 Restore the old signal mask rather than unilaterally clearing bits
6454 from the mask, in case a handler is running within another
6455 handler. All callers changed.
6456 * lisp.h, process.c, process.h, term.c:
6457 Adjust decls and callers to match new API.
6458 * sysdep.c (emacs_sigaction_init): Don't worry about masking SIGFPE;
6459 signal handlers aren't supposed to use floating point anyway.
6460 (handle_arith_signal): Unblock just SIGFPE rather than clearing mask.
6461
6462 2014-03-23 Daniel Colascione <dancol@dancol.org>
6463
6464 Split gc_sweep into discrete functions for legibility and better
6465 stack traces.
6466
6467 * alloc.c (sweep_strings, sweep_vectors): Add NO_INLINE
6468 (sweep_vectors): Fix typo in comment.
6469 (sweep_conses, sweep_floats, sweep_intervals)
6470 (sweep_symbols, sweep_misc, sweep_buffers): New functions.
6471 (gc_sweep): Call new functions, to which existing functionality is
6472 moved.
6473 * fns.c (sweep_weak_hash_tables): Add NO_INLINE.
6474
6475 2014-03-23 Juanma Barranquero <lekktu@gmail.com>
6476
6477 * w32fns.c (Fw32_shell_execute): Declare `result' only on Cygwin.
6478
6479 2014-03-23 Daniel Colascione <dancol@dancol.org>
6480
6481 * xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC
6482 only if xic_style calls for it. This change allows Emacs to work
6483 with ibus. Also, don't leak resources if create_frame_xic fails,
6484 and stop caching xic_style across different displays.
6485 (supported_xim_styles): Make const.
6486 (best_xim_style): Remove first parameter: it's always just
6487 supported_xim_styles. Change to look at supported_xim_styles
6488 directly.
6489
6490 2014-03-23 Daniel Colascione <dancol@dancol.org>
6491
6492 * term.c (init_tty): Rearrange condition for clarity; print
6493 appropriate diagnostic.
6494
6495 2014-03-23 Daniel Colascione <dancol@dancol.org>
6496
6497 * process.c (DATAGRAM_CONN_P): Don't underflow datagram_address
6498 array. (ASAN caught.)
6499
6500 2014-03-22 Glenn Morris <rgm@gnu.org>
6501
6502 * callproc.c (init_callproc): In etc, look for NEWS rather than GNU.
6503
6504 2014-03-22 Daniel Colascione <dancol@dancol.org>
6505
6506 * process.c (conv_sockaddr_to_lisp): When extracting the string
6507 names of AF_LOCAL sockets, stop before reading uninitialized memory.
6508
6509 2014-03-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6510
6511 Fix regression introduced by patch for Bug#10500.
6512 * xterm.c (x_draw_image_relief): Respect Vtool_bar_button_margin.
6513 * w32term.c (x_draw_image_relief): Likewise.
6514
6515 2014-03-21 Martin Rudalics <rudalics@gmx.at>
6516
6517 * w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't
6518 constrain frame size in SW_SHOWMAXIMIZED case so we can truly
6519 maximize a frame for odd default fonts.
6520
6521 2014-03-21 Glenn Morris <rgm@gnu.org>
6522
6523 * minibuf.c (history-length): Increase default from 30 to 100.
6524
6525 2014-03-21 Daniel Colascione <dancol@dancol.org>
6526
6527 * xterm.c (x_bitmap_icon): Stop reading the icon bitmap from disk
6528 every time we switch to minibuffer.
6529
6530 * alloc.c (lisp_align_malloc, allocate_string_data)
6531 (allocate_vectorlike): Allow mmap allocation of lisp objects.
6532 (pointers_fit_in_lispobj_p, mmap_lisp_allowed_p): New functions.
6533
6534 2014-03-21 Eli Zaretskii <eliz@gnu.org>
6535
6536 * w32fns.c (Fw32_shell_execute) [!CYGWIN]: Use ShellExecuteEx, to
6537 support more "verbs".
6538
6539 2014-03-21 Daniel Colascione <dancol@dancol.org>
6540
6541 Always prohibit dumping a dumped Emacs.
6542
6543 * emacs.c (might_dump): New variable.
6544 (Fdump_emacs): Always prohibit dumping of dumped Emacs.
6545 * lisp.h (might_dump): Declare.
6546 * unexcw.c (unexec): Remove now-redundant multiple-dump detection code.
6547
6548 2014-03-20 Paul Eggert <eggert@cs.ucla.edu>
6549
6550 * doc.c (store_function_docstring): Fix pointer signedness mismatch.
6551
6552 2014-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
6553
6554 * doc.c (store_function_docstring): Warn when we don't know where to
6555 put a docstring.
6556 (Fsubstitute_command_keys): Don't advertise the fact that
6557 text-properties are dropped, since we think it's a bug that we'll fix.
6558
6559 * frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
6560 * xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
6561 * frame.c (frame_garbaged): Make "docstring" more precise.
6562
6563 2014-03-20 Glenn Morris <rgm@gnu.org>
6564
6565 * charset.c (init_charset): When we cannot find the charsets directory,
6566 mention if EMACSDATA is set.
6567
6568 2014-03-19 Paul Eggert <eggert@cs.ucla.edu>
6569
6570 * fns.c (Frandom): Fix rare bug where the result isn't random.
6571
6572 Fix porting inconsistency about rounding to even.
6573 * floatfns.c (emacs_rint) [!HAVE_RINT]: Round to even.
6574 This way, the unusual !HAVE_RINT case acts like the usual
6575 HAVE_RINT case, and we can fix the documentation accordingly.
6576
6577 2014-03-19 Eli Zaretskii <eliz@gnu.org>
6578
6579 * w32fns.c (reset_modifiers): Zero out keystate[] before using it.
6580 (w32_wnd_proc): Initialize the dwHoverTime member of
6581 TRACKMOUSEEVENT structure.
6582
6583 2014-03-17 Teodor Zlatanov <tzz@lifelogs.com>
6584
6585 * gnutls.c (Fgnutls_boot): Fix case of :verify-error = t.
6586
6587 2014-03-16 Eli Zaretskii <eliz@gnu.org>
6588
6589 * search.c (find_newline): Speed up the function when using the
6590 newline cache, by halving the number of calls to
6591 region_cache_forward and region_cache_backward. (Bug#16830)
6592
6593 2014-03-15 Juanma Barranquero <lekktu@gmail.com>
6594
6595 * buffer.c (Fset_buffer): Document return value (bug#17015).
6596
6597 2014-03-14 Martin Rudalics <rudalics@gmx.at>
6598
6599 * w32term.c (x_set_window_size): When frame-resize-pixelwise is
6600 nil, always resize character wise to avoid potential loss of the
6601 mode line (Bug#16923 related).
6602
6603 2014-03-12 Martin Rudalics <rudalics@gmx.at>
6604
6605 * frame.c (x_set_frame_parameters): Always calculate new sizes
6606 pixelwise to avoid potential loss when rounding.
6607
6608 2014-03-11 Dmitry Antipov <dmantipov@yandex.ru>
6609
6610 * xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor.
6611 * xterm.c (x_free_frame_resources): Free all allocated cursors.
6612
6613 2014-03-10 Eli Zaretskii <eliz@gnu.org>
6614
6615 * w32.c (fstatat): Don't add an extra slash if the argument ends
6616 with a slash: this fails the subsequent call to stat_worker on
6617 Windows 9X. Reported by oslsachem <oslsachem@gmail.com>.
6618
6619 2014-03-09 Martin Rudalics <rudalics@gmx.at>
6620
6621 * xdisp.c (Fwindow_text_pixel_size): Adjust doc-string.
6622
6623 2014-03-08 Jan Djärv <jan.h.d@swipnet.se>
6624
6625 * nsterm.h (MAC_OS_X_VERSION_10_9): Add.
6626
6627 * nsterm.m (constrainFrameRect:toScreen:): Constrain normally
6628 when frame is only on one screen (Bug#14713).
6629
6630 2014-03-08 Eli Zaretskii <eliz@gnu.org>
6631
6632 * xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and
6633 there's a valid wrap point in the display line, the last glyph
6634 cannot "just barely fit" on this row, because display_line doesn't
6635 let it. Instead, proceed as if the last glyph didn't fit, so that
6636 we eventually back up the iterator to the wrap point. This avoids
6637 delusional behavior of move_it_to, whereby it proceeds to the next
6638 display line, but sets current_x to zero for all the glyphs that
6639 without word-wrap would fit on the previous display line.
6640 One result was that visual-order cursor movement behaved erratically
6641 under word-wrap.
6642 (Fmove_point_visually): Add code to find the x coordinate of the
6643 last character before wrap point, under word-wrap on a TTY.
6644
6645 2014-03-07 Eli Zaretskii <eliz@gnu.org>
6646
6647 * xdisp.c (Fmove_point_visually): When under word-wrap, accept
6648 also return value of MOVE_POS_MATCH_OR_ZV from
6649 move_it_in_display_line_to, when moving from beginning of line to
6650 point's position. (Bug#16961)
6651
6652 2014-03-07 Martin Rudalics <rudalics@gmx.at>
6653
6654 * buffer.c (Vbuffer_list_update_hook): Doc-string fix.
6655 * window.c (Fselect_window): Explain NORECORD and
6656 `buffer-list-update-hook' in doc-string.
6657
6658 2014-03-06 Martin Rudalics <rudalics@gmx.at>
6659
6660 * window.c (Fother_window_for_scrolling): Check that
6661 Vother_window_scroll_buffer is a buffer.
6662
6663 2014-03-06 Dmitry Antipov <dmantipov@yandex.ru>
6664
6665 * xterm.c (xim_initialize): Always pass a copy of resource name
6666 to XRegisterIMInstantiateCallback and eassert whether return
6667 value is True. Passing copy is important because Xlib doesn't
6668 make its own copy and resource name argument usually points to
6669 SSDATA (Vx_resource_name), which may be changed from Lisp.
6670 (xim_close_display): For XUnregisterIMInstantiateCallback,
6671 always eassert return value and pass exactly the same values
6672 as were used for XRegisterIMInstantiateCallback.
6673 Otherwise XUnregisterIMInstantiateCallback will always fail. See Xlib
6674 sources to check why if you are interested.
6675
6676 2014-03-05 Martin Rudalics <rudalics@gmx.at>
6677
6678 * dispnew.c (change_frame_size_1): Add new_lines instead of
6679 new_height, the latter may be still zero if passed as such.
6680 * window.c (Fwindow_pixel_height): Mention bottom divider in
6681 doc-string.
6682
6683 2014-03-05 Paul Eggert <eggert@cs.ucla.edu>
6684
6685 Fix "resource temporarily unavailable" with xgselect
6686 (Bug#16925).
6687 * xgselect.c: Include <stdbool.h>.
6688 (xg_select) [!USE_GTK]: Don't lose track of errno.
6689
6690 Fix minor --enable-gcc-warnings issues.
6691 * widget.c (update_various_frame_slots, EmacsFrameResize):
6692 Avoid unused locals. Prefer 'if' to '#if' when either will do.
6693
6694 2014-03-04 Ken Brown <kbrown@cornell.edu>
6695
6696 * gmalloc.c (aligned_alloc): Clarify the code by making `adj'
6697 represent the actual adjustment needed for alignment.
6698
6699 2014-03-04 Eli Zaretskii <eliz@gnu.org>
6700
6701 * gmalloc.c (aligned_alloc): Don't allocate more memory than
6702 needed, and don't reallocate if the initial allocation already
6703 fits the bill. Suggested by Ken Brown <kbrown@cornell.edu>.
6704
6705 2014-03-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
6706
6707 * xterm.c (x_draw_stretch_glyph_string): Reset clipping.
6708 (Bug#16932)
6709
6710 2014-03-04 Michal Nazarewicz <mina86@mina86.com>
6711
6712 * cmds.c (delete-char): Update docstring pointing out that the
6713 function ignores `delete-active-region' and `overwrite-mode'.
6714
6715 2014-03-03 Eli Zaretskii <eliz@gnu.org>
6716
6717 * font.c (Fframe_font_cache): Fix last change. (Bug#16930)
6718
6719 * gmalloc.c (aligned_alloc): Fix adjustment of size of the
6720 allocated buffer due to alignment.
6721 (freehook): If the block to be freed was allocated by
6722 'aligned_alloc', find its real pointer before calling 'free'.
6723 (Bug#16901)
6724 (mabort) [emacs]: Call 'emacs_abort', not 'abort', to provide a
6725 backtrace.
6726
6727 2014-03-03 Dmitry Antipov <dmantipov@yandex.ru>
6728
6729 * font.c (toplevel): Adjust comment about font cache layout.
6730 (font_clear_cache): Fix to match real font cache layout.
6731 Suggested by <namespace_collision@yahoo.com> in Bug#16069.
6732 (Fframe_font_cache) [FONT_DEBUG]: New function.
6733 (syms_of_font) [FONT_DEBUG]: Defsubr it.
6734
6735 Avoid crashes when X fonts are erroneously freed on reused X
6736 'Display *' connection data (Bug#16069). Note that X font
6737 resources still may be leaked, but currently there is no way
6738 to completely avoid it.
6739 * xterm.h (struct x_display_info): New member x_id. Add comments.
6740 * xterm.c (x_display_id): New variable.
6741 (x_term_init): Assign identifier to each opened X connection.
6742 * xfont.c (struct xfont): New member x_display_id.
6743 (xfont_open): Initialize it with frame's display id.
6744 (xfont_close): Check whether font's display id matches the one
6745 recorded for the given display. Adjust comment.
6746 * xftfont.c (struct xftfont_info):
6747 (xftfont_open, xftfont_close): Exactly as above with xfont stuff.
6748
6749 2014-03-01 Martin Rudalics <rudalics@gmx.at>
6750
6751 Consider Vother_window_scroll_buffer valid iff it's a live buffer.
6752 * window.c (Fother_window_for_scrolling): Don't try to scroll a
6753 killed Vother_window_scroll_buffer.
6754 (Vother_window_scroll_buffer): Fix doc-string accordingly.
6755
6756 2014-03-01 Eli Zaretskii <eliz@gnu.org>
6757
6758 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names
6759 that start with more than 2 slashes as UNCs. (Bug#16751)
6760
6761 2014-02-28 Paul Eggert <eggert@penguin.cs.ucla.edu>
6762
6763 Fix a few crashes and leaks when cloning C strings.
6764 * alloc.c, lisp.h (dupstring): New function.
6765 * gtkutil.c (xg_get_font):
6766 * term.c (tty_default_color_capabilities):
6767 * xsettings.c (store_monospaced_changed)
6768 (store_font_name_changed, parse_settings)
6769 (read_and_apply_settings, init_gsettings, init_gconf): Use it.
6770 This avoids some unlikely crashes due to accessing freed storage,
6771 and avoids some minor memory leaks in the more-typical case.
6772
6773 2014-02-28 Martin Rudalics <rudalics@gmx.at>
6774
6775 * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag
6776 cursor when modeline can't be dragged (Bug#16647).
6777
6778 2014-02-28 Glenn Morris <rgm@gnu.org>
6779
6780 * doc.c (Fsnarf_documentation): Snarf not-yet-bound variables
6781 from custom-delayed-init-variables. (Bug#11565)
6782
6783 2014-02-27 Martin Rudalics <rudalics@gmx.at>
6784
6785 More fixes for mouse glyph calculations (Bug#16647).
6786 * window.c (coordinates_in_window): In intersection of
6787 horizontal and vertical window dividers prefer the horizontal
6788 one. Add some extra parens to last fix.
6789 (window_relative_x_coord): Return x-coordinate for header and
6790 mode line too.
6791 * xdisp.c (remember_mouse_glyph): In text area don't extend
6792 glyph into mode line to show the vertical drag cursor there
6793 immediately. Subdivide mouse glyphs in right fringes to show a
6794 horizontal drag cursor as soon as we enter the "grabbable width"
6795 portion. Handle vertical border case separately. Do not
6796 subdivide window divider areas.
6797 (note_mouse_highlight): On bottom divider of bottommost windows
6798 show vertical drag cursor only when the minibuffer window can be
6799 resized.
6800
6801 2014-02-27 Eli Zaretskii <eliz@gnu.org>
6802
6803 * xdisp.c (pop_it): Restore the it->face_box_p flag which could be
6804 reset by the face of the object just displayed. See also bug#76.
6805 (get_next_display_element): If the string came from a display
6806 property, examine the box face attribute at it->position, not at
6807 it->current.pos, since the latter was not updated yet. (Bug#16870)
6808 (handle_face_prop): Improve commentary.
6809
6810 2014-02-27 Michael Albinus <michael.albinus@gmx.de>
6811
6812 * dbusbind.c (Fdbus__init_bus, Qdbus__init_bus, Sdbus__init_bus):
6813 Rename from Fdbus_init_bus_1, Qdbus_init_bus_1, Sdbus_init_bus_1.
6814
6815 2014-02-26 Martin Rudalics <rudalics@gmx.at>
6816
6817 Fixes around Bug#16647.
6818 * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and
6819 ON_BOTTOM_DIVIDER cases.
6820 * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER
6821 only if the window has no right divider.
6822 (Fcoordinates_in_window_p): Fix doc-string.
6823
6824 2014-02-25 Juanma Barranquero <lekktu@gmail.com>
6825
6826 * lread.c (Funintern): Fix doc to match advertised calling convention.
6827
6828 2014-02-24 Daniel Colascione <dancol@dancol.org>
6829
6830 * keyboard.c (read_char): Close race that resulted in lost events.
6831
6832 2014-02-22 Glenn Morris <rgm@gnu.org>
6833
6834 * frame.c (frame-alpha-lower-limit, frame-resize-pixelwise):
6835 * window.c (window-resize-pixelwise): Doc fixes.
6836
6837 * process.c (Finternal_default_process_filter)
6838 (Finternal_default_process_sentinel): Doc tweaks.
6839
6840 2014-02-21 Glenn Morris <rgm@gnu.org>
6841
6842 * process.c (Fprocess_buffer, Faccept_process_output)
6843 (Finternal_default_process_filter, Finternal_default_process_sentinel):
6844 Doc fixes.
6845
6846 2014-02-21 Martin Rudalics <rudalics@gmx.at>
6847
6848 * window.c (Fwindow_scroll_bar_width): New function.
6849
6850 2014-02-21 Paul Eggert <eggert@cs.ucla.edu>
6851
6852 Pacify GCC when configuring with --enable-gcc-warnings.
6853 * xdisp.c (move_it_in_display_line_to) [lint]:
6854 Initialize recently-added local.
6855
6856 2014-02-21 Daniel Colascione <dancol@dancol.org>
6857
6858 * dbusbind.c: Rename dbus-init-bus to dbus-init-bus-1.
6859
6860 2014-02-20 Eli Zaretskii <eliz@gnu.org>
6861
6862 * xdisp.c (init_iterator): Don't dereference a bogus face
6863 pointer. (Bug#16819)
6864 (try_cursor_movement): Don't use cursor position if
6865 set_cursor_from_row failed to compute it. This avoids assertion
6866 violations in MATRIX_ROW.
6867 (move_it_in_display_line_to): Save the iterator state in ppos_it
6868 only once per call. Reimplement the method used to return to the
6869 best candidate position if all the positions found in display line
6870 are beyond TO_CHARPOS. This cuts down the number of calls to
6871 bidi_shelve_cache, which moves a lot of stuff when lines are long
6872 and include bidirectional text. (Bug#15555)
6873
6874 2014-02-20 Glenn Morris <rgm@gnu.org>
6875
6876 * data.c (Fdefalias): Doc fix.
6877
6878 2014-02-19 Eli Zaretskii <eliz@gnu.org>
6879
6880 * xdisp.c (display_line): Fix horizontal scrolling of large images
6881 when fringes are turned off. This comes at a price of not
6882 displaying the truncation/continuation glyphs in this case.
6883 (Bug#16806)
6884
6885 * image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: If
6886 CreateDIBSection returns an error indication, zero out *ximg after
6887 destroying the image. This avoids crashes in memory allocations
6888 due to the fact that some of the callers also call
6889 x_destroy_x_image, which will attempt to free an already free'd
6890 block of memory.
6891
6892 2014-02-18 Martin Rudalics <rudalics@gmx.at>
6893
6894 * widget.c (update_various_frame_slots): Don't set
6895 FRAME_PIXEL_HEIGHT and FRAME_PIXEL_WIDTH here (Bug#16736).
6896
6897 2014-02-18 Michael Albinus <michael.albinus@gmx.de>
6898
6899 * dbusbind.c (xd_close_bus): Apply proper check on busobj.
6900
6901 2014-02-17 Paul Eggert <eggert@cs.ucla.edu>
6902
6903 temacs --daemon fix (Bug#16599).
6904 * emacs.c (main): Initialize daemon_pipe[1] here ...
6905 (syms_of_emacs): ... instead of here.
6906
6907 2014-02-16 Anders Lindgern <andlind@gmail.com>
6908
6909 * nsterm.m (keyDown:): Check for normal key even if NSNumericPadKeyMask
6910 is set (Bug#16505).
6911
6912 2014-02-16 Daniel Colascione <dancol@dancol.org>
6913
6914 * dbusbind.c (xd_lisp_dbus_to_dbus): New function.
6915 (xd_get_connection_address): Use it.
6916 (xd_close_bus): Use xd_lisp_dbus_to_dbus to instead of
6917 xd_get_connection_address because the latter signals if the bus
6918 we're trying to close is already disconnected.
6919
6920 2014-02-13 Eli Zaretskii <eliz@gnu.org>
6921
6922 * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last
6923 argument to CreateThread. This avoids segfaults on Windows 9X.
6924 Reported by oslsachem <oslsachem@gmail.com>.
6925
6926 2014-02-13 Paul Eggert <eggert@cs.ucla.edu>
6927
6928 Fix subspace record bug on HP-UX 10.20 (Bug#16717).
6929 * unexhp9k800.c (unexec_error): New function, to simplify the code.
6930 (check_lseek): New function, to report lseek errors.
6931 (save_data_space, update_file_ptrs, read_header, write_header)
6932 (copy_file, copy_rest, unexec): Use these news functions.
6933 (update_file_ptrs): Don't assume wraparound behavior when
6934 converting a large size_t value to off_t.
6935
6936 2014-02-13 Dmitry Antipov <dmantipov@yandex.ru>
6937
6938 * composite.c (fill_gstring_header): Pass positions as C integers
6939 and move parameters checking to...
6940 (Fcomposition_get_gstring): ...this function. Handle case when
6941 buffer positions are in reversed order and avoid crash (Bug#16739).
6942 Adjust docstring.
6943 * buffer.c (validate_region): Mention current buffer in error message.
6944
6945 2014-02-12 Marcus Karlsson <mk@acc.umu.se> (tiny change)
6946
6947 * image.c (pbm_load): Set to NO_PIXMAP on error (Bug#16683).
6948
6949 2014-02-12 Lars Ingebrigtsen <larsi@gnus.org>
6950
6951 * buffer.c (syms_of_buffer): Doc clarification (bug#9981).
6952
6953 2014-02-11 Glenn Morris <rgm@gnu.org>
6954
6955 * nsfns.m (ns_display_info_for_name, Fx_open_connection):
6956 Replace refs to "OpenStep" in messages.
6957
6958 2014-02-10 Paul Eggert <eggert@cs.ucla.edu>
6959
6960 Avoid "." at end of error diagnostics.
6961 * cmds.c (Fself_insert_command): Reword and avoid "." at end.
6962 * font.c (Ffont_at):
6963 * nsfns.m (ns_display_info_for_name):
6964 * nsselect.m (Fx_own_selection_internal):
6965 * nsterm.m (performDragOperation:):
6966 Remove "." from end of diagnostic.
6967
6968 2014-02-10 Lars Ingebrigtsen <larsi@gnus.org>
6969
6970 * fns.c (Fmaphash): Say what `maphash' returns, since it may be
6971 unintuitive (bug#15824).
6972 (Fyes_or_no_p): Doc fix (bug#15456).
6973
6974 2014-02-10 Dmitry Antipov <dmantipov@yandex.ru>
6975
6976 * cmds.c (Fself_insert_command): Respect the width of EMACS_INT
6977 and avoid warning.
6978 * eval.c (call_debugger): When exiting the debugger, do not allow
6979 max_specpdl_size less than actual binding depth (Bug#16603).
6980 (syms_of_eval): Adjust docstring.
6981
6982 2014-02-09 Lars Ingebrigtsen <larsi@gnus.org>
6983
6984 * cmds.c (Fself_insert_command): Output a clearer error message on
6985 negative repetitions (bug#9476).
6986
6987 * macros.c (Fexecute_kbd_macro): Doc fix (bug#14206).
6988
6989 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
6990
6991 * syntax.c (Fskip_syntax_backward): Doc clarification (bug#15115).
6992
6993 * minibuf.c (Fread_string): Doc clarification (bug#15422).
6994
6995 * buffer.c (Fmake_overlay): Doc clarification (bug#15489).
6996
6997 2014-02-08 Juanma Barranquero <lekktu@gmail.com>
6998
6999 * keyboard.c (Frecursive_edit): Fix typo in docstring.
7000
7001 2014-02-08 Lars Ingebrigtsen <larsi@gnus.org>
7002
7003 * xdisp.c (syms_of_xdisp): Doc clarification (bug#15657).
7004
7005 * keyboard.c (Frecursive_edit): Say more precicely how throwing
7006 `exit' works (bug#15865).
7007
7008 2014-02-07 Martin Rudalics <rudalics@gmx.at>
7009
7010 Constrain window box/body sizes and margin widths (Bug#16649).
7011 * xdisp.c (window_box_width): Don't return less than zero.
7012 (window_box_left_offset, window_box_right_offset): Don't return
7013 more than the window's pixel width.
7014 * window.c (window_body_height, window_body_width): Don't return
7015 negative value.
7016 (window_resize_apply): Adjust margin width, if necessary.
7017
7018 2014-02-07 Glenn Morris <rgm@gnu.org>
7019
7020 * nsterm.m (syms_of_nsterm): Doc fix.
7021
7022 2014-02-06 Eli Zaretskii <eliz@gnu.org>
7023
7024 * w32.c (pMultiByteToWideChar, pWideCharToMultiByte):
7025 New variables: pointers through which to call the respective APIs.
7026 (filename_to_utf16, filename_from_utf16, filename_to_ansi)
7027 (filename_from_ansi, sys_link, check_windows_init_file):
7028 Call MultiByteToWideChar and WideCharToMultiByte through pointers.
7029 This is required on Windows 9X, where we dynamically load
7030 UNICOWS.DLL which has their non-stub implementations.
7031 (maybe_load_unicows_dll): Assign addresses to these 2 function
7032 pointers after loading UNICOWS.DLL.
7033
7034 * w32fns.c (Fx_file_dialog, Fw32_shell_execute) [!CYGWIN]: Call
7035 MultiByteToWideChar and WideCharToMultiByte through function
7036 pointers.
7037
7038 * w32.h (pMultiByteToWideChar, pWideCharToMultiByte):
7039 New declarations.
7040
7041 2014-02-06 Jan Djärv <jan.h.d@swipnet.se>
7042
7043 * nsterm.m (toggleFullScreen:): Hide menubar on secondary monitor
7044 for OSX >= 10.9 if separate spaces are used.
7045 (toggleFullScreen:): Use screen of w instead of fw (Bug#16659).
7046
7047 2014-02-06 Glenn Morris <rgm@gnu.org>
7048
7049 * buffer.c (cache-long-scans): Doc fix.
7050
7051 2014-02-05 Eli Zaretskii <eliz@gnu.org>
7052
7053 * w32fns.c (Fw32_shell_execute): Doc fix.
7054
7055 2014-02-05 Bastien Guerry <bzg@gnu.org>
7056
7057 * syntax.c (Fforward_word): Call Fconstrain_to_field with
7058 ESCAPE-FROM-EDGE set to `nil' (Bug#16453).
7059
7060 2014-02-05 Martin Rudalics <rudalics@gmx.at>
7061
7062 * fringe.c (draw_fringe_bitmap_1): Don't draw a fringe if it's
7063 outside the window (Bug#16649).
7064
7065 * xdisp.c (note_mouse_highlight): When entering a margin area show
7066 a non-text cursor (Bug#16647).
7067
7068 2014-02-04 Paul Eggert <eggert@cs.ucla.edu>
7069
7070 * menu.c (Fx_popup_dialog): Remove label 'dialog_via_menu'.
7071 It prompted a compile-time diagnostic on GNU/Linux.
7072 Simplify to remove the need for the label.
7073
7074 2014-02-04 Eli Zaretskii <eliz@gnu.org>
7075
7076 * w32menu.c (w32_popup_dialog): Don't condition the whole function
7077 on HAVE_DIALOGS. If the dialog is "simple", pop up a message box
7078 to show it; otherwise return 'unsupported--w32-dialog' to signal
7079 to the caller that emulation with menus is necessary.
7080 This resurrects code inadvertently deleted by the 2013-10-08 commit.
7081 (Bug#16636)
7082 (syms_of_w32menu): DEFSYM Qunsupported__w32_dialog.
7083
7084 * w32term.h (w32_popup_dialog): Prototype is no longer conditioned
7085 by HAVE_DIALOGS.
7086
7087 * menu.c (Fx_popup_dialog): Don't condition the call to
7088 w32_popup_dialog on HAVE_DIALOGS. If w32_popup_dialog returns a
7089 special symbol 'unsupported--w32-dialog', emulate the dialog with
7090 a menu by calling x-popup-menu.
7091
7092 * menu.h (Qunsupported__w32_dialog): New extern variable.
7093
7094 2014-02-04 Michael Albinus <michael.albinus@gmx.de>
7095
7096 * keyboard.c (kbd_buffer_get_event): Read file notification events
7097 also in batch mode.
7098
7099 * xgselect.c (xg_select): Read glib events in any case, even if
7100 there are no file descriptors to watch for. (Bug#16519)
7101
7102 2014-02-03 Martin Rudalics <rudalics@gmx.at>
7103
7104 * dispextern.h (face_id): Add WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID
7105 and WINDOW_DIVIDER_LAST_PIXEL_FACE_ID.
7106 * w32term.c (w32_draw_window_divider): Handle first and last
7107 pixels specially.
7108 * w32term.h (w32_fill_area_abs): New function.
7109 * xdisp.c (x_draw_right_divider): Don't draw over bottom
7110 divider.
7111 * xfaces.c (realize_basic_faces): Handle new face ids.
7112 * xfns.c (Fx_create_frame): Call x_default_parameter for right
7113 and bottom divider width.
7114 * xterm.c (x_draw_window_divider): Handle first and last pixels
7115 specially.
7116
7117 2014-02-03 Dmitry Antipov <dmantipov@yandex.ru>
7118
7119 * print.c (Fexternal_debugging_output): Add cast to pacify
7120 --enable-gcc-warnings.
7121 * eval.c (call_debugger): Grow specpdl if the debugger was
7122 entered due to specpdl overflow (Bug#16603) and allow more
7123 specpdl space for the debugger itself.
7124
7125 2014-02-02 Martin Rudalics <rudalics@gmx.at>
7126
7127 * w32fns.c (Fx_create_frame): Process frame alpha earlier.
7128 (Bug#16619)
7129
7130 2014-02-01 Eli Zaretskii <eliz@gnu.org>
7131
7132 * w32fns.c (Ffile_system_info): Use WINAPI in the function
7133 pointers that get the address of GetDiskFreeSpaceEx. (Bug#16615)
7134
7135 * print.c (Fexternal_debugging_output): If the argument character
7136 is non-ASCII, encode it with the current locale's encoding before
7137 writing the result to the terminal. (Bug#16448)
7138
7139 * w32fns.c (Fw32_shell_execute): Don't call file-exists-p for
7140 DOCUMENT that is a "remote" file name, i.e. a file-handler exists
7141 for it. (Bug#16558)
7142
7143 2014-01-30 Andreas Schwab <schwab@linux-m68k.org>
7144
7145 * process.c (create_process): Reset SIGPROF handler in the child.
7146 * callproc.c (call_process): Likewise.
7147
7148 2014-01-29 Paul Eggert <eggert@cs.ucla.edu>
7149
7150 * xmenu.c (create_and_show_popup_menu): Port comment to C89.
7151
7152 2014-01-29 Eli Zaretskii <eliz@gnu.org>
7153
7154 * .gdbinit (xprintstr, xprintbytestr): Don't use repetition count
7155 of zero to print strings, GDB doesn't like it.
7156
7157 * print.c (print_object): Use FETCH_STRING_CHAR_ADVANCE, not
7158 STRING_CHAR_AND_LENGTH, so that if the string is relocated by GC,
7159 we still use correct addresses. (Bug#16576)
7160
7161 2014-01-27 K. Handa <handa@gnu.org>
7162
7163 Fix bug#16286 by a different method from 2014-01-26T00:32:30Z!eggert@cs.ucla.edu,
7164 to preserve the code detection behavior of 24.3.
7165 * coding.h (struct coding_system): New member detected_utf8_bytes.
7166 * coding.c (detect_coding_utf_8): Set coding->detected_utf8_bytes.
7167 (decode_coding_gap): Use short cut for UTF-8 file reading only
7168 when coding->detected_utf8_bytes equals to coding->src_bytes.
7169 * fileio.c (Finsert_file_contents): Cancel the previous change.
7170
7171 2014-01-29 Martin Rudalics <rudalics@gmx.at>
7172
7173 * w32fns.c (x_set_tool_bar_lines): Don't clear area on frames
7174 that are not visible.
7175
7176 2014-01-29 Jan Djärv <jan.h.d@swipnet.se>
7177
7178 * xmenu.c (create_and_show_popup_menu): Handle case when no key
7179 is grabbed (Bug#16565).
7180
7181 2014-01-28 Martin Rudalics <rudalics@gmx.at>
7182
7183 * xdisp.c (last_max_ascent): Re-remove after erroneously
7184 reintroducing it on 2013-11-30 and abolishing Dmitry's removal
7185 from 2013-03-29.
7186 (move_it_to): Re-remove reference to last_max_ascent.
7187 (Fwindow_text_pixel_size): Add iterator's max_ascent and
7188 max_descent here instead of calling line_bottom_y.
7189 Fix doc-string.
7190
7191 2014-01-28 Dmitry Antipov <dmantipov@yandex.ru>
7192
7193 * terminal.c (initial_free_frame_resources): New function.
7194 (init_initial_terminal): Install new hook to free face cache
7195 on initial frame and avoid memory leak. For details, see
7196 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01974.html>.
7197 * xfaces.c (free_frame_faces): Adjust comment.
7198
7199 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
7200
7201 * data.c (Fstring_to_number): Document results if unparsable
7202 (Bug#16551).
7203
7204 2014-01-26 Jan Djärv <jan.h.d@swipnet.se>
7205
7206 * xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
7207
7208 2014-01-26 Paul Eggert <eggert@cs.ucla.edu>
7209
7210 When decoding, prefer ptrdiff_t to int for buffer positions etc.
7211 * coding.c (detect_coding_utf_8, emacs_mule_char)
7212 (detect_coding_iso_2022, encode_coding_iso_2022, check_ascii)
7213 (check_utf_8, decode_coding):
7214 * coding.h (struct coding_system.errors):
7215 Use ptrdiff_t, not int, for integer values derived from buffer and
7216 string positions.
7217
7218 Fix crash with insert-file-contents and misdecoded text (Bug#16286).
7219 * fileio.c (Finsert_file_contents): Set CODING_MODE_LAST_BLOCK
7220 before invoking decode_coding_gap, since there's just one block.
7221
7222 2014-01-25 Martin Rudalics <rudalics@gmx.at>
7223
7224 Fix handling of face attributes in Fx_create_frame (Bug#16529).
7225 * w32fns.c (Fx_create_frame): Don't inhibit running Lisp code
7226 too early. Again run change_frame_size before assigning menu-
7227 and tool-bar-lines.
7228
7229 2014-01-25 Fabrice Popineau <fabrice.popineau@gmail.com>
7230
7231 * w32term.c (w32_read_socket): When the WM_DISPLAYCHANGE message
7232 arrives, call x_check_fullscreen, in case the new display has a
7233 different resolution. (Bug#16517)
7234
7235 2014-01-25 Eli Zaretskii <eliz@gnu.org>
7236
7237 * term.c (read_menu_input): If the selected frame changes, exit
7238 the menu.
7239 (tty_menu_show): If the selected frame changes while we displayed
7240 a menu, throw to top level. (Bug#16479)
7241
7242 2014-01-25 Stefan Monnier <monnier@iro.umontreal.ca>
7243
7244 * eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change.
7245
7246 2014-01-24 Paul Eggert <eggert@cs.ucla.edu>
7247
7248 Fix bool-vector-count-population bug on MinGW64 (Bug#16535).
7249 * data.c (count_one_bits_word): Fix bug (negated comparison)
7250 when BITS_PER_ULL < BITS_PER_BITS_WORD.
7251
7252 2014-01-24 Dmitry Antipov <dmantipov@yandex.ru>
7253
7254 * xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction):
7255 Avoid undefined behavior by initializing display property bit of a
7256 string processed by the bidirectional iterator. For details, see
7257 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
7258
7259 2014-01-23 Paul Eggert <eggert@cs.ucla.edu>
7260
7261 Minor cleanup of previous change.
7262 * image.c (imagemagick_error, Fimagemagick_types):
7263 Omit some recently-introduced and unnecessary casts and assignments.
7264
7265 2014-01-23 Dmitry Antipov <dmantipov@yandex.ru>
7266
7267 Fix two memory leaks discovered with Valgrind.
7268 * ftfont.c (ftfont_list) [HAVE_LIBOTF]: Call OTF_close.
7269 * image.c (Fimagemagick_types): Call MagickRelinquishMemory.
7270
7271 2014-01-22 Martin Rudalics <rudalics@gmx.at>
7272
7273 Fixes in window size functions around Bug#16430 and Bug#16470.
7274 * window.c (Fwindow_pixel_width, Fwindow_pixel_height)
7275 (Fwindow_mode_line_height, Fwindow_header_line_height)
7276 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
7277 Minor doc-string adjustments.
7278 (Fwindow_total_height, Fwindow_total_width): New argument ROUND.
7279 Rewrite doc-strings.
7280 (window_body_height, window_body_width): Do not count partially
7281 visible lines/columns when PIXELWISE is nil (Bug#16470).
7282 (Qfloor, Qceiling): New symbols.
7283
7284 2014-01-21 Eli Zaretskii <eliz@gnu.org>
7285
7286 * w32fns.c (unwind_create_frame): Avoid crashing inside assertion
7287 when the image cache is not yet allocated. (Bug#16509)
7288
7289 2014-01-21 Dmitry Antipov <dmantipov@yandex.ru>
7290
7291 * buffer.c (Fkill_buffer): When killing an indirect buffer,
7292 re-attach intervals to its base buffer (Bug#16502).
7293 * intervals.c (set_interval_object): Move from here...
7294 * intervals.h (set_interval_object): ... to here. Fix comments.
7295
7296 2014-01-20 Paul Eggert <eggert@cs.ucla.edu>
7297
7298 Avoid undefined behavior by initializing buffer redisplay bit.
7299 Reported by Dmitry Antipov in
7300 <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01756.html>.
7301 * buffer.c (Fget_buffer_create): Initialize redisplay bit.
7302
7303 Revert some of the CANNOT_DUMP fix (Bug#16494).
7304 * lread.c (init_lread): Fix typo: NILP, not !NILP.
7305
7306 2014-01-19 Eli Zaretskii <eliz@gnu.org>
7307
7308 * w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
7309 (get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
7310 [!WINDOWSNT]: These functions are no longer compiled on Cygwin;
7311 they are replaced by macros that expand into direct calls to the
7312 corresponding functions from GDI32.DLL.
7313 (globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
7314 variables in the Cygwin build, they are unused.
7315
7316 2014-01-19 K. Handa <handa@gnu.org>
7317
7318 * composite.c (composition_update_it): Fix previous change.
7319
7320 2014-01-18 Eli Zaretskii <eliz@gnu.org>
7321
7322 Fix file name handling on MS-Windows 9X.
7323 * w32.c (maybe_load_unicows_dll): New function.
7324
7325 * emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early
7326 on, to make sure we can convert file names to and from UTF-8 on
7327 Windows 9X. This fixes a failure to start up because Emacs cannot
7328 find term/w32-win.el. Reported by oslsachem <oslsachem@gmail.com>.
7329
7330 * w32font.c [WINDOWSNT]: Include w32.h.
7331 (w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead
7332 of implementing the same stuff.
7333 Remove now unused g_b_init_is_windows_9x.
7334
7335 * w32.h (maybe_load_unicows_dll): Add prototype.
7336
7337 2014-01-17 Eli Zaretskii <eliz@gnu.org>
7338
7339 * menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
7340 switch to single keyboard. Prevents daemon crashes when a new
7341 client connects while we show a TTY menu in an existing client.
7342 (Bug#16479)
7343
7344 2014-01-14 Paul Eggert <eggert@cs.ucla.edu>
7345
7346 Fix MinGW64 porting problem with _setjmp.
7347 Reported by Eli Zaretskii in:
7348 http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01297.html
7349 * image.c (FAST_SETJMP, FAST_LONGJMP): New macros, replacing
7350 the old _setjmp and _longjmp. All uses changed.
7351
7352 2014-01-13 Daniel Colascione <dancol@dancol.org>
7353
7354 * textprop.c (Fremove_list_of_text_properties):
7355 Correctly handle reaching the end of the interval tree. (Bug#15344)
7356
7357 2014-01-13 Martin Rudalics <rudalics@gmx.at>
7358
7359 * xdisp.c (resize_mini_window): Round height to a multiple of
7360 frame's line height. Fix bug in calculation of window start
7361 position (Bug#16424).
7362
7363 2014-01-13 Jan Djärv <jan.h.d@swipnet.se>
7364
7365 * macfont.m: Include termchar.h.
7366 (CG_SET_FILL_COLOR_WITH_FACE_FOREGROUND)
7367 (CG_SET_FILL_COLOR_WITH_FACE_BACKGROUND)
7368 (CG_SET_STROKE_COLOR_WITH_FACE_FOREGROUND): Modify from
7369 *_WITH_GC_* to take face and f as parameters.
7370 (macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
7371 Use *_WITH_FACE_*, and pass face as parameter (Bug#16425).
7372
7373 2014-01-13 Daniel Colascione <dancol@dancol.org>
7374
7375 Fix menu item updating in the presence of the Unity global menu
7376 GTK+ module.
7377
7378 * gtkutil.h (xg_have_tear_offs): Add frame parameter
7379 * gtkutil.c (xg_have_tear_offs): Count the global menu as a
7380 tear-off.
7381 (xg_update_menubar, xg_update_menu_item): Call g_object_notify when
7382 updating menus; explain why.
7383 (xg_update_frame_menubar): Remove the 23px hack: I can't repro the
7384 problem it's supposed to solve and it interferes with detecting
7385 the presence of a global menu.
7386 * xmenu.c (set_frame_menubar): Call xg_have_tear_offs with new
7387 parameter.
7388
7389 2014-01-11 K. Handa <handa@gnu.org>
7390
7391 * composite.c (composition_update_it): Fix indexing of
7392 LGSTRING_CHAR (Bug#15984).
7393
7394 2014-01-11 Fabrice Popineau <fabrice.popineau@gmail.com>
7395
7396 * unexw32.c (_start) [__MINGW64__]: Define to __start.
7397
7398 2014-01-11 Eli Zaretskii <eliz@gnu.org>
7399
7400 * xdisp.c (try_window_id): Don't use this function's optimizations
7401 if overlays in the buffer displayed by the window have changed
7402 since last redisplay. (Bug#16347)
7403 (message_dolog): Fix indentation.
7404
7405 2014-01-11 Martin Rudalics <rudalics@gmx.at>
7406
7407 * frame.c (frame_resize_pixelwise): Fix doc-string.
7408
7409 2014-01-10 Martin Rudalics <rudalics@gmx.at>
7410
7411 Fix handling of internal borders (Bug#16348).
7412 * dispnew.c (adjust_frame_glyphs_for_window_redisplay):
7413 Remove internal border width from pixel width of windows.
7414 (change_frame_size_1): Don't return early when frame's pixel
7415 size changes - we still have to record the new sizes in the
7416 frame structure.
7417 * w32fns.c (x_set_tool_bar_lines): Clear internal border width
7418 also when toolbar gets larger.
7419 * window.c (check_frame_size): Include internal_border_width in
7420 check.
7421 * xdisp.c (Ftool_bar_height): Fix doc-string typo.
7422 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
7423 In non-toolkit/non-GTK version clear internal border.
7424 * xterm.c (x_clear_under_internal_border): New function for
7425 non-toolkit/non-GTK version.
7426 (x_after_update_window_line): In non-toolkit/non-GTK version
7427 don't do that.
7428 (handle_one_xevent, x_set_window_size):
7429 Call x_clear_under_internal_border in non-toolkit/non-GTK version.
7430 * xterm.h (x_clear_under_internal_border): Extern it.
7431
7432 2014-01-07 Paul Eggert <eggert@cs.ucla.edu>
7433
7434 Fix misdisplay of interlaced GIFs with libgif5 (Bug#16372).
7435 * image.c (gif_load): libgif5 deinterlaces for us, so don't do
7436 it again.
7437
7438 2014-01-06 Eli Zaretskii <eliz@gnu.org>
7439
7440 * xdisp.c (redisplay_window): Don't skip window redisplay if the
7441 last value of point is not equal to buffer's point. (Bug#16129)
7442
7443 2014-01-05 Paul Eggert <eggert@cs.ucla.edu>
7444
7445 Spelling fixes.
7446 * nsterm.h (updateCollectionBehavior): Rename from
7447 updateCollectionBehaviour. All uses changed.
7448
7449 Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343).
7450 * Makefile.in (SETFATTR): New macro.
7451 (temacs$(EXEEXT)): Use it.
7452
7453 2014-01-04 Martin Rudalics <rudalics@gmx.at>
7454
7455 Fix maximization behavior on Windows (Bug#16300).
7456 * w32fns.c (w32_fullscreen_rect): Don't handle
7457 FULLSCREEN_MAXIMIZED and FULLSCREEN_NONE specially.
7458 * w32term.c (w32fullscreen_hook): Use SetWindowPlacement instead
7459 of SetWindowPos. Restore last placement also when leaving
7460 FULLSCREEN_HEIGHT and FULLSCREEN_WIDTH. Call ShowWindow in all
7461 but the FULLSCREEN_BOTH case.
7462
7463 2014-01-03 Paul Eggert <eggert@cs.ucla.edu>
7464
7465 Port to C89.
7466 * data.c (arithcompare_driver):
7467 * fileio.c (Fcar_less_than_car):
7468 * fns.c (internal_equal):
7469 * frame.c (delete_frame):
7470 * lisp.h (enum More_Lisp_Bits):
7471 * lread.c (read1):
7472 Avoid C99 constructs that don't work in C89.
7473 * data.c (ULL_MAX, count_trailing_zeros_ll): New macros,
7474 to port to C89, which doesn't have 'long long'.
7475 (count_trailing_zero_bits): Use them.
7476
7477 2014-01-03 Chong Yidong <cyd@gnu.org>
7478
7479 * doc.c (Fdocumentation): Remove dynamic-docstring-function.
7480
7481 2014-01-02 Martin Rudalics <rudalics@gmx.at>
7482
7483 Further adjust frame/window scrollbar width calculations.
7484 * window.c (apply_window_adjustment):
7485 Set windows_or_buffers_changed.
7486 (Fwindow_scroll_bars): Return actual scrollbar width.
7487 * xfns.c (x_set_scroll_bar_default_width): Rename wid to unit.
7488 For non-toolkit builds again use 14 as minimum width and set
7489 FRAME_CONFIG_SCROLL_BAR_WIDTH accordingly.
7490 * xterm.c (XTset_vertical_scroll_bar): Take width from
7491 WINDOW_SCROLL_BAR_AREA_WIDTH.
7492 (x_new_font): Rename wid to unit. Base calculation of new
7493 scrollbar width on toolkit used and make it analogous to that of
7494 x_set_scroll_bar_default_width.
7495 * w32fns.c (x_set_scroll_bar_default_width): Rename wid to unit.
7496 (Fx_create_frame): Call x_set_scroll_bar_default_width instead
7497 of GetSystemMetrics.
7498 * w32term.c (w32_set_vertical_scroll_bar): Take width from
7499 WINDOW_SCROLL_BAR_AREA_WIDTH.
7500 (x_new_font): Make it correspond to changes in xterm.c.
7501
7502 2014-01-01 Paul Eggert <eggert@cs.ucla.edu>
7503
7504 * lisp.h (EMACS_INT): Configure based on INTPTR_MAX, not LONG_MAX.
7505 This is a cleaner way to fix the MinGW-w64 porting problem.
7506 Check for INTPTR_MAX misconfiguration.
7507
7508 2014-01-01 Eli Zaretskii <eliz@gnu.org>
7509
7510 * search.c (newline_cache_on_off, find_newline): In indirect
7511 buffers, use the newline cache of the base buffer.
7512
7513 * insdel.c (invalidate_buffer_caches): If BUF is an indirect
7514 buffer, invalidate the caches of its base buffer. (Bug#16265)
7515
7516 * indent.c (width_run_cache_on_off, compute_motion): In indirect
7517 buffers, use the width-run cache of the base buffer.
7518
7519 * xdisp.c (redisplay_window): When the window displays an indirect
7520 buffer, and the character widths in the display table have
7521 changed, invalidate the width-run cache of the corresponding base
7522 buffer.
7523
7524 * fileio.c (Finsert_file_contents): When invalidating the newline
7525 cache, consider the case of inserting into indirect buffer.
7526
7527 * bidi.c (bidi_paragraph_cache_on_off, bidi_find_paragraph_start):
7528 In indirect buffers, use the paragraph cache of the base buffer.
7529
7530 2013-12-31 Martin Rudalics <rudalics@gmx.at>
7531
7532 * window.c (grow_mini_window): Fix last change.
7533
7534 2013-12-31 Jan Djärv <jan.h.d@swipnet.se>
7535
7536 * nsterm.m (windowDidResignKey:): Set mouse_moved to 0 (Bug#8421).
7537
7538 2013-12-31 Fabrice Popineau <fabrice.popineau@supelec.fr>
7539
7540 * w32term.c (w32_initialize): Use LCID and LOWORD.
7541
7542 * w32proc.c (create_child): Use pid_t for 5th argument.
7543 (IsValidLocale): Don't provide prototype for MinGW64.
7544 (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
7545 (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
7546
7547 * w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
7548 MinGW64 doesn't support.
7549
7550 * lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
7551
7552 * w32.c (set_named_security_info): New function.
7553 (acl_set_file): Fall back on set_named_security_info if
7554 set_file_security fails.
7555 (g_b_init_set_named_security_info_w)
7556 (g_b_init_set_named_security_info_a): New static variables.
7557 (globals_of_w32): Initialize them to zero.
7558 (set_named_security_info): Set them to non-zero if the
7559 corresponding API is available.
7560 (SetNamedSecurityInfoW_Proc, SetNamedSecurityInfoA_Proc):
7561 New function typedefs.
7562
7563 2013-12-31 Martin Rudalics <rudalics@gmx.at>
7564
7565 Some more fixes following pixelwise resize changes including one
7566 for Bug#16306.
7567 * gtkutil.c (x_wm_set_size_hint): Have size hints respect value
7568 of frame_resize_pixelwise.
7569 * widget.c (pixel_to_text_size): New function.
7570 (update_wm_hints): Have size hints respect value of
7571 frame_resize_pixelwise.
7572 (EmacsFrameResize): Alway process resize requests pixelwise.
7573 * window.c (grow_mini_window): Make sure mini window is at least
7574 one line tall.
7575 * xdisp.c (display_menu_bar): Make sure menubar extends till
7576 right end of frame.
7577 * xfns.c (x_set_menu_bar_lines): Resize frame windows pixelwise.
7578 (x_set_tool_bar_lines): Calculate pixelwise.
7579 * xterm.c (x_wm_set_size_hint): Have size hints respect value of
7580 frame_resize_pixelwise.
7581
7582 2013-12-30 Juanma Barranquero <lekktu@gmail.com>
7583
7584 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
7585 variables not used there.
7586
7587 2013-12-30 Eli Zaretskii <eliz@gnu.org>
7588
7589 * w32.c (sys_umask): New function. (Bug#16299)
7590
7591 2013-12-30 Martin Rudalics <rudalics@gmx.at>
7592
7593 * dispnew.c (change_frame_size_1): Take old width of root window
7594 from that window's pixel width. (Bug#16284)
7595
7596 2013-12-29 Paul Eggert <eggert@cs.ucla.edu>
7597
7598 Plain copy-file no longer chmods an existing destination (Bug#16133).
7599 * fileio.c (realmask): Now a static var, not a local.
7600 (barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
7601 Remove arg STATPTR. All uses changed.
7602 (Fcopy_file): Do not alter permissions of existing destinations,
7603 unless PRESERVE-PERMISSIONS (renamed from
7604 PRESERVE-EXTENDED-ATTRIBUTES) is non-nil.
7605 Avoid race when testing for existing destinations and for
7606 when input and output files are the same.
7607 If changing the group fails, adjust both default and
7608 preserved permissions so that access is not granted to the
7609 wrong group.
7610 (Fset_default_file_modes, init_fileio): Update realmask.
7611 (Fdefault_file_modes): Use realmask instead of calling umask.
7612
7613 2013-12-28 Paul Eggert <eggert@cs.ucla.edu>
7614
7615 Fix pipe bug with OS X emacs --daemon (Bug#16262).
7616 * emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec
7617 flags on the daemon pipe ends before execing.
7618
7619 2013-12-28 Eli Zaretskii <eliz@gnu.org>
7620
7621 * w32fns.c (Fx_create_frame): Error out if called from a TTY
7622 session. (Bug#14739)
7623
7624 2013-12-27 Jarek Czekalski <jarekczek@poczta.onet.pl>
7625
7626 * callproc.c (Vexec_path): Document that exec-directory is in it.
7627
7628 2013-12-27 Steve Purcell <steve@sanityinc.com> (tiny change)
7629
7630 * nsterm.m (syms_of_nsterm): Enable ns-use-srgb-colorspace by
7631 default.
7632
7633 2013-12-27 Chong Yidong <cyd@gnu.org>
7634
7635 * data.c (Fsymbol_function): Doc fix.
7636
7637 2013-12-26 Martin Rudalics <rudalics@gmx.at>
7638
7639 Some more tinkering with Bug#16051.
7640 * window.c (resize_frame_windows): Don't let the size of the
7641 root window drop below the frame's default character size.
7642 Never ever delete any subwindows - let the window manager do the
7643 clipping.
7644
7645 * w32fns.c (x_set_tool_bar_lines): Rewrite calculation of number
7646 of toolbar lines needed when they exceed the height of the root
7647 window.
7648 (unwind_create_frame_1): New function.
7649 (Fx_create_frame): Generally inhibit calling the window
7650 configuration change hook here. Remove extra call to
7651 change_frame_size - it's not needed when we don't run the
7652 configuration change hook.
7653
7654 2013-12-26 Paul Eggert <eggert@cs.ucla.edu>
7655
7656 Fix core dumps with gcc -fsanitize=address and GNU/Linux.
7657 On my Fedora 19 platform the core dumps were so big that
7658 my desktop became nearly catatonic.
7659 * alloc.c (no_sanitize_memcpy) [MAX_SAVE_STACK > 0]: New function.
7660 (Fgarbage_collect) [MAX_SAVE_STACK > 0]: Use it.
7661 (USE_ALIGNED_MALLOC): Do not define if addresses are sanitized.
7662 (mark_memory): Use ATTRIBUTE_NO_SANITIZE_ADDRESS rather than
7663 a clang-only syntax.
7664 * conf_post.h (__has_feature): New macro, if not already defined.
7665 (ADDRESS_SANITIZER, ADDRESS_SANITIZER_WORKAROUND)
7666 (ATTRIBUTE_NO_SANITIZE_ADDRESS): New macros.
7667
7668 2013-12-25 Eli Zaretskii <eliz@gnu.org>
7669
7670 * w32fns.c (Fw32_shell_execute): Make DOCUMENT absolute only if it
7671 is a file name. (Bug#16252)
7672
7673 2013-12-25 Chong Yidong <cyd@gnu.org>
7674
7675 * keyboard.c (Voverriding_terminal_local_map)
7676 (Voverriding_local_map): Doc fix.
7677
7678 * keymap.c (Vemulation_mode_map_alists): Doc fix.
7679
7680 2013-12-24 Eli Zaretskii <eliz@gnu.org>
7681
7682 * w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute
7683 file name when it is submitted to ShellExecute. Simplify code.
7684 Don't test DOCUMENT for being a string, as that is enforced by
7685 CHECK_STRING. Doc fix.
7686
7687 2013-12-23 Eli Zaretskii <eliz@gnu.org>
7688
7689 * xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the
7690 iterator X limits, not FRAME_TOTAL_COLS, for consistency with what
7691 redisplay_tool_bar does. Improve and fix commentary.
7692 (hscroll_window_tree): Don't assume w->cursor.vpos is within the
7693 limits of the glyph matrices. (Bug#16051)
7694 (redisplay_tool_bar): Modify the tool-bar-lines frame parameter
7695 only when the new size is different from the old one, and the new
7696 size can be achieved given the frame height.
7697
7698 2013-12-23 Jan Djärv <jan.h.d@swipnet.se>
7699
7700 * conf_post.h: Use unsigned it for bool_bf if GNUSTEP (Bug#16210).
7701
7702 2013-12-23 Glenn Morris <rgm@gnu.org>
7703
7704 * lread.c (Fload): Mention load-prefer-newer in doc.
7705
7706 2013-12-22 Martin Rudalics <rudalics@gmx.at>
7707
7708 Handle Bug#16207 by being more restrictive when running hooks.
7709 * window.c (unwind_change_frame): New function.
7710 (Fset_window_configuration): Don't run configuration change hook
7711 while the frame configuration is unsafe. Call select_window
7712 twice.
7713
7714 2013-12-22 Xue Fuqiao <xfq.free@gmail.com>
7715
7716 * lread.c (syms_of_lread) <load_prefer_newer>: Doc fix.
7717
7718 2013-12-21 Jan Djärv <jan.h.d@swipnet.se>
7719
7720 * nsterm.h: Declare EmacsColor category.
7721
7722 * nsterm.m (NSColor): Implement EmacsColor category.
7723 (ns_get_color): Use colorUsingDefaultColorSpace.
7724 (ns_get_color, ns_term_init): Use colorForEmacsRed.
7725
7726 * nsfns.m (Fxw_color_values): Use colorUsingDefaultColorSpace.
7727
7728 2013-12-21 Eli Zaretskii <eliz@gnu.org>
7729
7730 * image.c (fn_png_longjmp) [WINDOWSNT]: Mark the function as
7731 having the PNG_NORETURN attribute, to avoid compiler warning in
7732 my_png_error.
7733
7734 2013-12-21 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
7735
7736 * w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
7737
7738 * w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
7739 fringe background extension.
7740 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
7741 because they are now always the same as `left' and `width',
7742 respectively. Remove code for the case that `width' and
7743 `sb_width' are different.
7744
7745 2013-12-20 Martin Rudalics <rudalics@gmx.at>
7746
7747 Remove scroll_bar_actual_width from frames.
7748 * frame.h (struct frame): Remove scroll_bar_actual_width slot.
7749 * frame.c (Fscroll_bar_width): Return scroll bar area width.
7750 (x_figure_window_size):
7751 * nsterm.m (x_set_window_size):
7752 * widget.c (set_frame_size):
7753 * w32term.c (x_set_window_size):
7754 * xterm.c (x_set_window_size, x_set_window_size_1): Don't set
7755 scroll_bar_actual_width.
7756
7757 Convert scroll_bar members to integers on Windows.
7758 * w32term.h (struct scroll_bar): Convert top, left, width,
7759 height, start, end and dragging to integers.
7760 * w32fns.c (w32_createscrollbar): Remove XINT conversions for
7761 scroll_bar members.
7762 * w32term.c (w32_set_scroll_bar_thumb)
7763 (w32_scroll_bar_handle_click): Remove XINT conversions for
7764 scroll_bar members. Treat bar->dragging as integer.
7765 (x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as
7766 first element. Remove XINT conversions for scroll_bar members.
7767 (w32_set_vertical_scroll_bar, x_scroll_bar_report_motion):
7768 Remove XINT conversions for scroll_bar members.
7769
7770 Fix assignment for new window total sizes.
7771 * window.c (Fwindow_resize_apply_total): Assign values for
7772 minibuffer window.
7773
7774 2013-12-20 Chong Yidong <cyd@gnu.org>
7775
7776 * textprop.c (Fadd_face_text_property): Doc fix. Rename `appendp'
7777 argument to `append'.
7778
7779 2013-12-19 Eli Zaretskii <eliz@gnu.org>
7780
7781 * xdisp.c (extend_face_to_end_of_line): Use default face, not the
7782 current text face, for extending the face of the display margins.
7783 (Bug#16192)
7784
7785 * casefiddle.c (Fupcase_word, Fdowncase_word, Fcapitalize_word):
7786 Doc fix. (Bug#16190)
7787
7788 2013-12-19 Jan Djärv <jan.h.d@swipnet.se>
7789
7790 * nsterm.h (KEY_NS_DRAG_FILE, KEY_NS_DRAG_COLOR, KEY_NS_DRAG_TEXT):
7791 Remove.
7792
7793 * nsterm.m (Qfile, Qurl): New.
7794 (EV_MODIFIERS2): New macro.
7795 (EV_MODIFIERS): Use EV_MODIFIERS2.
7796 (ns_term_init): Remove font and color from DND, does not work on
7797 newer OSX, and other ports don't have them.
7798 (performDragOperation:): Handle modifiers used during drag.
7799 Use DRAG_N_DROP_EVENT instead of NS specific events (Bug#8051).
7800 Remove global Lisp variables used to communicate with ns-win.el.
7801 Remove font and color handling.
7802 (syms_of_nsterm): Defsym Qfile and Qurl.
7803
7804 2013-12-19 Anders Lindgren <andlind@gmail.com>
7805
7806 * nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros.
7807 (ns_constrain_all_frames, x_set_offset): Remove assignment to
7808 dont_constrain.
7809 (updateFrameSize:, windowWillResize:toSize:): Add trace.
7810 (constrainFrameRect): Remove special case nr_screens == 1.
7811 Don't constrain size to size of view.
7812
7813 * nsterm.h (ns_output): Remove dont_constrain.
7814
7815 2013-12-19 Anders Lindgren <andlind@gmail.com>
7816
7817 * nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT.
7818
7819 2013-12-18 Paul Eggert <eggert@cs.ucla.edu>
7820
7821 Minor fixes for recent openp changes.
7822 * lisp.h (GCPRO7): New macro.
7823 * lread.c (openp): Use bool for boolean; all callers changed.
7824 Protect save_string from GC. Don't assume that file descriptors
7825 are nonzero. Redo save_mtime comparison to avoid bogus GCC
7826 warning about uninitialized variable.
7827
7828 2013-12-18 Eli Zaretskii <eliz@gnu.org>
7829
7830 * w32fns.c (emacs_abort): Use intptr_t as argument of
7831 INT_BUFSIZE_BOUND, to avoid compiler warnings.
7832
7833 2013-12-18 Glenn Morris <rgm@gnu.org>
7834
7835 * lread.c (Fload): Pass load_prefer_newer to openp.
7836 Don't bother checking mtime if openp already did it.
7837 (openp): Add `newer' argument, to check all suffixes
7838 and find the newest file.
7839 (syms_of_lread) <load_prefer_newer>: New option. (Bug#2061)
7840 * callproc.c (call_process):
7841 * charset.c (load_charset_map_from_file):
7842 * emacs.c (init_cmdargs):
7843 * image.c (x_create_bitmap_from_file, x_find_image_file):
7844 * lisp.h (openp):
7845 * lread.c (Flocate_file_internal):
7846 * process.c (Fformat_network_address):
7847 * sound.c (Fplay_sound_internal):
7848 * w32.c (check_windows_init_file):
7849 * w32proc.c (sys_spawnve): Update for new arg spec of openp.
7850
7851 * emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend.
7852
7853 2013-12-17 Eli Zaretskii <eliz@gnu.org>
7854
7855 * w32.c (getloadavg): Don't index samples[] array with negative
7856 indices. Recover from wall-clock time being set backwards.
7857
7858 * w32term.c (w32_initialize): Declare the argument of
7859 set_user_model as const.
7860
7861 * w32menu.c <MessageBoxW_Proc>: Fix argument declarations.
7862 (w32_menu_show): Constify some arguments passed to MessageBox.
7863
7864 * w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO
7865 to initialize Lisp objects.
7866
7867 * w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to
7868 initialize Lisp objects.
7869
7870 * frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and
7871 use variables used only on X under that condition.
7872
7873 * fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
7874 variables not used there.
7875
7876 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
7877
7878 Fix problems with CANNOT_DUMP and EMACSLOADPATH.
7879 * lread.c (init_lread): If CANNOT_DUMP, we can't be dumping.
7880
7881 2013-12-16 Eli Zaretskii <eliz@gnu.org>
7882
7883 * xdisp.c (Fmove_point_visually): Fix subtle bugs in the fallback
7884 code, revealed in presence of R2L characters, character
7885 compositions, and display vectors. A better fix for Bug#16148.
7886 (extend_face_to_end_of_line): Don't reference tool_bar_window in
7887 GTK and NS builds, they don't have this member of struct frame.
7888
7889 * dispextern.h (struct composition_it): Correct a comment for the
7890 'width' member.
7891
7892 2013-12-16 Paul Eggert <eggert@cs.ucla.edu>
7893
7894 * font.h (valid_font_driver) [!ENABLE_CHECKING]: Define a dummy.
7895 This prevents a compilation error on C compilers that do not
7896 default functions to return 'int' if not declared. Also, add
7897 INLINE_HEADER_BEGIN and INLINE_HEADER_END to this include file,
7898 since it now uses inline functions.
7899
7900 2013-12-16 Eli Zaretskii <eliz@gnu.org>
7901
7902 * xdisp.c (extend_face_to_end_of_line): Don't fill background of
7903 display margins on mode line, header line, and in the frame's
7904 tool-bar window. (Bug#16165)
7905
7906 2013-12-16 Andreas Schwab <schwab@suse.de>
7907
7908 * gnutls.c (Fgnutls_boot): Properly check Flistp return value.
7909
7910 2013-12-16 Teodor Zlatanov <tzz@lifelogs.com>
7911
7912 * gnutls.c (Fgnutls_boot): Use `Flistp' instead of
7913 `CHECK_LIST_CONS'.
7914
7915 2013-12-16 Martin Rudalics <rudalics@gmx.at>
7916
7917 * w32term.c (w32_enable_frame_resize_hack): Default to 1.
7918
7919 2013-12-16 Dmitry Antipov <dmantipov@yandex.ru>
7920
7921 * font.c (valid_font_driver) [ENABLE_CHECKING]: New function
7922 intended to find bogus pointers in font objects (Bug#16140).
7923 * font.h (valid_font_driver) [ENABLE_CHECKING]: Add prototype.
7924 * alloc.c (cleanup_vector): Use valid_font_driver in eassert.
7925 (compact_font_cache_entry, compact_font_caches) [!HAVE_NTGUI]:
7926 Disable for MS-Windows due to Bug#15876; apparently this
7927 requires more or less substantial changes in fontset code.
7928 * xfont.c (xfont_close):
7929 * xftfont.c (xftfont_close): Call x_display_info_for_display
7930 to check whether 'Display *' is valid (Bug#16093 and probably
7931 Bug#16069).
7932
7933 2013-12-15 Eli Zaretskii <eliz@gnu.org>
7934
7935 * fileio.c (Fexpand_file_name) [WINDOWSNT]: Fix conditionals.
7936 Reported by Juanma Barranquero <lekktu@gmail.com>.
7937
7938 * process.c (Fprocess_send_eof): Don't crash if someone tries to
7939 open a pty on MS-Windows. (Bug#16152)
7940
7941 * emacs.c (decode_env_path): Fix bogus comparison against
7942 emacs_dir. Reported by Juanma Barranquero <lekktu@gmail.com>.
7943
7944 2013-12-15 Juanma Barranquero <lekktu@gmail.com>
7945
7946 * w32fns.c (Fw32_shell_execute): Remove unused local variable.
7947 (Fx_file_dialog): Add parentheses around && to silence warning.
7948
7949 * w32term.c (construct_drag_n_drop): Remove unused local variable.
7950
7951 2013-12-15 Eli Zaretskii <eliz@gnu.org>
7952
7953 * xdisp.c (extend_face_to_end_of_line): Extend background of
7954 non-default face in margin areas as well. (Bug#16151)
7955 (display_line): Call extend_face_to_end_of_line for continued
7956 lines as well, if the display margins have non-zero width.
7957 (set_glyph_string_background_width): When needed, set the
7958 extends_to_end_of_line_p flag on glyph strings to be drawn in
7959 margin areas, not only in the text area.
7960
7961 * frame.h (FRAME_MOUSE_UPDATE): Fix a typo that caused infloop at
7962 startup.
7963
7964 2013-12-15 Paul Eggert <eggert@cs.ucla.edu>
7965
7966 * gnutls.c (Fgnutls_boot): Fix typo; "!" applied to a Lisp_Object.
7967 Don't worry about verify_error being t, since it has to be a list.
7968
7969 2013-12-14 Paul Eggert <eggert@cs.ucla.edu>
7970
7971 Use bool for boolean, focusing on headers.
7972 * atimer.h, lisp.h, syssignal.h, syswait.h, unexelf.c:
7973 No need to include <stdbool.h>, since conf_post.h does it now.
7974 * buffer.h (BUF_COMPUTE_UNCHANGED, DECODE_POSITION)
7975 (BUFFER_CHECK_INDIRECTION, GET_OVERLAYS_AT, PER_BUFFER_VALUE_P)
7976 (SET_PER_BUFFER_VALUE_P):
7977 * ccl.c, ccl.h (setup_ccl_program):
7978 * ccl.h (CHECK_CCL_PROGRAM):
7979 * character.h (MAKE_CHAR_UNIBYTE, CHECK_CHARACTER_CAR)
7980 (CHECK_CHARACTER_CDR, CHAR_STRING_ADVANCE, NEXT_CHAR_BOUNDARY)
7981 (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE)
7982 (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE)
7983 (FETCH_STRING_CHAR_ADVANCE_NO_CHECK, FETCH_CHAR_ADVANCE)
7984 (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, INC_BOTH)
7985 (DEC_BOTH, BUF_INC_POS, BUF_DEC_POS):
7986 * charset.h (CHECK_CHARSET, CHECK_CHARSET_GET_ID)
7987 (CHECK_CHARSET_GET_ATTR, CHECK_CHARSET_GET_CHARSET)
7988 (CHARSET_FAST_MAP_SET):
7989 * coding.c (decode_coding_ccl, encode_coding_ccl):
7990 * coding.h (CHECK_CODING_SYSTEM, CHECK_CODING_SYSTEM_GET_SPEC)
7991 (CHECK_CODING_SYSTEM_GET_ID, SJIS_TO_JIS, SJIS_TO_JIS2)
7992 (JIS_TO_SJIS, JIS_TO_SJIS2, ENCODE_FILE, DECODE_FILE)
7993 (ENCODE_SYSTEM, DECODE_SYSTEM, ENCODE_UTF_8)
7994 (decode_coding_c_string):
7995 * composite.h (COMPOSITION_DECODE_REFS, COMPOSITION_DECODE_RULE):
7996 * conf_post.h (has_attribute):
7997 * dispextern.h (trace_redisplay_p)
7998 (INC_TEXT_POS, DEC_TEXT_POS, SET_GLYPH_FROM_GLYPH_CODE)
7999 (SET_CHAR_GLYPH, SET_CHAR_GLYPH_FROM_GLYPH)
8000 (SET_GLYPH_FROM_CHAR_GLYPH)
8001 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P)
8002 (FACE_SUITABLE_FOR_ASCII_CHAR_P, FACE_SUITABLE_FOR_CHAR_P)
8003 (PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
8004 (cursor_in_mouse_face_p):
8005 * dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
8006 (blank_row, prepare_desired_row)
8007 (build_frame_matrix_from_leaf_window, make_current)
8008 (mirror_make_current, mirrored_line_dance, mirror_line_dance)
8009 (update_window, scrolling_window, update_frame_line):
8010 * disptab.h (GLYPH_FOLLOW_ALIASES):
8011 * editfns.c (Fformat):
8012 * font.h (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC)
8013 (FONT_WIDTH_SYMBOLIC, FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE)
8014 (FONT_WIDTH_FOR_FACE, FONT_WEIGHT_NAME_NUMERIC)
8015 (FONT_SLANT_NAME_NUMERIC, FONT_WIDTH_NAME_NUMERIC)
8016 (FONT_SET_STYLE, CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY)
8017 (CHECK_FONT_OBJECT, CHECK_FONT_GET_OBJECT, FONT_ADD_LOG)
8018 (FONT_DEFERRED_LOG):
8019 * frame.h (FRAME_W32_P, FRAME_MSDOS_P, FRAME_WINDOW_P)
8020 (FRAME_EXTERNAL_TOOL_BAR, FRAME_EXTERNAL_MENU_BAR, FOR_EACH_FRAME)
8021 (FRAME_MOUSE_UPDATE):
8022 * fringe.c (Fdefine_fringe_bitmap):
8023 * image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
8024 (x_create_bitmap_from_xpm_data, xpm_load_image):
8025 * intervals.h (INTERVAL_HAS_PARENT, INTERVAL_PARENT)
8026 (set_interval_parent, RESET_INTERVAL, COPY_INTERVAL_CACHE)
8027 (MERGE_INTERVAL_CACHE):
8028 * keymap.h (KEYMAPP):
8029 * lisp.h (eassert, USE_LSB_TAG, CHECK_LISP_OBJECT_TYPE)
8030 (STRING_SET_UNIBYTE, STRING_SET_MULTIBYTE, DEFSYM, PSEUDOVECTORP)
8031 (CHECK_RANGED_INTEGER, CHECK_TYPE_RANGED_INTEGER)
8032 (CHECK_NUMBER_COERCE_MARKER, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER)
8033 (DEFVAR_LISP, DEFVAR_LISP_NOPRO, DEFVAR_BOOL, DEFVAR_INT)
8034 (DEFVAR_BUFFER_DEFAULTS, DEFVAR_KBOARD, QUIT)
8035 (RETURN_UNGCPRO, USE_SAFE_ALLOCA, SAFE_NALLOCA, SAFE_FREE)
8036 (SAFE_ALLOCA_LISP, FOR_EACH_ALIST_VALUE, functionp):
8037 * syntax.h (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX)
8038 (UPDATE_SYNTAX_TABLE_FORWARD, UPDATE_SYNTAX_TABLE_BACKWARD)
8039 (SETUP_BUFFER_SYNTAX_TABLE):
8040 * systime.h (timespec_valid_p):
8041 * term.c (save_and_enable_current_matrix):
8042 * window.h (WINDOW_MENU_BAR_P, WINDOW_TOOL_BAR_P):
8043 * xdisp.c (in_display_vector_p, display_tool_bar_line)
8044 (redisplay_internal, try_window_reusing_current_matrix)
8045 (sync_frame_with_window_matrix_rows, try_window_id)
8046 (display_menu_bar, display_tty_menu_item, display_mode_line)
8047 (coords_in_mouse_face_p, cursor_in_mouse_face_p):
8048 * xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
8049 * xmenu.c (xmenu_show):
8050 * xterm.c (use_xim, x_term_init):
8051 * xterm.h (XSync, GTK_CHECK_VERSION, use_xim, SET_SCROLL_BAR_X_WIDGET)
8052 (struct x_bitmap_record):
8053 Use bool for booleans.
8054 * ccl.c (struct buffer_text):
8055 * ccl.h (struct ccl_program):
8056 * charset.h (struct charset):
8057 * cm.h (struct cm):
8058 * coding.h (struct iso_2022_spec, struct coding_system):
8059 * dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
8060 (struct glyph_string, struct face, struct face_cache)
8061 (struct bidi_string_data, struct bidi_it)
8062 (struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
8063 (struct image):
8064 * editfns.c (Fformat):
8065 * frame.h (struct frame):
8066 * fringe.c (struct fringe_bitmap):
8067 * intervals.h (struct interval):
8068 * keyboard.h (struct kboard):
8069 * lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
8070 (struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
8071 (struct Lisp_Buffer_Local_Value, union specbinding):
8072 * macfont.m (struct macfont_info):
8073 * process.h (struct Lisp_Process):
8074 * termchar.h (struct tty_display_info):
8075 * window.h (struct window):
8076 * xterm.h (struct x_output):
8077 Use bool_bf for boolean bit-fields.
8078 * ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
8079 All callers changed.
8080 * ccl.h (struct ccl_program): Remove unused members private_state,
8081 src_multibyte, dst_multibyte, cr_consumed, suppress_error,
8082 eight_bit_control.
8083 (struct ccl_spec): Remove unused members cr_carryover,
8084 eight_bit_carryover.
8085 * conf_post.h: Include <stdbool.h>.
8086 (bool_bf): New type.
8087 * dispextern.h (TRACE, PREPARE_FACE_FOR_DISPLAY):
8088 * intervals.h (RESET_INTERVAL, COPY_INTERVAL_CACHE)
8089 (MERGE_INTERVAL_CACHE): Surround statement macro with proper
8090 'do { ... } while (false)' brackets.
8091 * dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
8092 Args must now be expressions; all callers changed.
8093 (SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
8094 (PRODUCE_GLYPHS): Simplify use of boolean.
8095 * fileio.c (Fcopy_file):
8096 If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
8097 * lisp.h (UNGCPRO): Return void, not int.
8098 (FOR_EACH_TAIL): Use void expression, not int expression.
8099 * region-cache.c: Reindent.
8100 * region-cache.h: Copy comments from region-cache.c, to fix
8101 incorrect remarks about booleans.
8102
8103 2013-12-14 Eli Zaretskii <eliz@gnu.org>
8104
8105 * xdisp.c (Fmove_point_visually): Expect overshoot in move_it_to
8106 when character at point is displayed from a display vector.
8107 (Bug#16148)
8108
8109 2013-12-14 Teodor Zlatanov <tzz@lifelogs.com>
8110
8111 * gnutls.c: Replace `:verify_hostname_error' with `:verify_error',
8112 now a list of certificate validation checks that will abort a
8113 connection with an error.
8114 (Fgnutls_boot): Document it and use it.
8115
8116 2013-12-14 Martin Rudalics <rudalics@gmx.at>
8117
8118 * w32term.c (w32_enable_frame_resize_hack): New variable.
8119 (x_set_window_size): Use it to hack frame resizing on Windows
8120 (Bug#16028).
8121
8122 2013-12-14 Eli Zaretskii <eliz@gnu.org>
8123
8124 * fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
8125 Windows-specific code to w32.c. Change error message text to
8126 match that of Posix platforms.
8127
8128 * w32.c (w32_copy_file): New function, most of the code copied and
8129 reworked from Fcopy_file. Improve error handling. Plug memory
8130 leak when errors are thrown. Support file names outside of the
8131 current codepage. (Bug#7100)
8132
8133 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
8134
8135 * lread.c (load_path_default): Prototype.
8136
8137 2013-12-13 Glenn Morris <rgm@gnu.org>
8138
8139 * lread.c: Unconditionally reset load-path after dumping. (Bug#16107)
8140 (dump_path): Remove.
8141 (load-path-default): Remove `changed' argument.
8142 Do not set dump_path permanently. Simplify.
8143 (init_lread): Simplify.
8144 (syms_of_lread): Remove dump_path.
8145
8146 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
8147
8148 * alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m,
8149 * nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and
8150 2013-12-12 font-related change to avoid Bug#16128, which
8151 is quite hard to fix without even more substantial changes.
8152
8153 2013-12-13 Dmitry Antipov <dmantipov@yandex.ru>
8154
8155 * font.c (font_close_object): Check for live frame (Bug#16128).
8156
8157 2013-12-13 Paul Eggert <eggert@cs.ucla.edu>
8158
8159 * gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
8160 Return ptrdiff_t, not int, since it's a buffer size.
8161 Reindent/reparen some macros to a more Gnuish style.
8162
8163 2013-12-12 Paul Eggert <eggert@cs.ucla.edu>
8164
8165 Avoid undefined behavior with huge regexp interval counts.
8166 * regex.c (GET_INTERVAL_COUNT): Rename from 'GET_UNSIGNED_NUMBER',
8167 since it's now specialized to interval counts. All uses changed.
8168 Do not assume wraparound on signed integer overflow.
8169 (regex_compile): Simplify based on the above changes.
8170
8171 2013-12-12 Eli Zaretskii <eliz@gnu.org>
8172
8173 Support file names on MS-Windows that use characters outside of
8174 the current system codepage. (Bug#7100)
8175
8176 * w32.c (get_file_security, set_file_security)
8177 (create_symbolic_link): Separate pointers and boolean flags for
8178 ANSI and Unicode APIs. Use the latter if w32_unicode_filenames is
8179 non-zero, else the former.
8180 (codepage_for_filenames, filename_to_utf16, )
8181 (filename_from_utf16, filename_to_ansi, filename_from_ansi):
8182 New functions.
8183 (init_user_info): Allow $HOME and $SHELL to include non-ANSI
8184 characters.
8185 (normalize_filename): Lose the DBCS code, now works on UTF-8.
8186 Accept only one argument; all callers changed.
8187 (dostounix_filename): Remove the second argument, now works in
8188 UTF-8. All callers changed.
8189 (parse_root): Lose DBCS code.
8190 (get_long_basename, w32_get_short_filename, init_environment)
8191 (GetCachedVolumeInformation, sys_readdir, open_unc_volume)
8192 (read_unc_volume, logon_network_drive, faccessat, sys_chdir)
8193 (sys_chmod, sys_creat, sys_fopen, sys_link, sys_mkdir, sys_open)
8194 (sys_rename_replace, sys_rmdir, sys_unlink, stat_worker, utime)
8195 (is_symlink, readlink, chase_symlinks, w32_delayed_load): Work in
8196 Unicode mode if w32_unicode_filenames is non-zero, in ANSI mode
8197 otherwise.
8198 (ansi_encode_filename): New function.
8199 (get_emacs_configuration, get_emacs_configuration_options):
8200 Functions deleted.
8201 (add_volume_info, GetCachedVolumeInformation): Run the input file
8202 name through unixtodos_filename, to ensure it is stored and
8203 referenced in canonical form.
8204 (get_volume_info): Lose the DBCS code, now works in UTF-8.
8205 (logon_network_drive, sys_link, utime): Improve error handling.
8206 (sys_access): New function.
8207 (hashval, generate_inode_val): Unused functions deleted.
8208 (symlink, readlink, readlinkat): Lose DBCS code, now works in UTF-8.
8209 (check_windows_init_file): Convert error message from UTF-8 to
8210 ANSI codepage, for display in the message box.
8211 (globals_of_w32): Set w32_unicode_filenames according to the OS
8212 version.
8213
8214 * w32term.c (construct_drag_n_drop): Work in Unicode mode when
8215 w32_unicode_filenames is non-zero, ANSI mode otherwise.
8216 (syms_of_w32term): Declare w32-unicode-filenames.
8217
8218 * w32proc.c (new_child, delete_child): Remove code that handled
8219 unused pending_deletion and input_file members of the child struct.
8220 (create_child, sys_spawnve): Convert all file names to ANSI
8221 codepage. Use ANSI APIs explicitly; forcibly fail if any file
8222 name cannot be encoded in ANSI codepage. Don't use
8223 unixtodos_filename, mirror slashes by hand.
8224 (record_infile, record_pending_deletion): Functions deleted.
8225 (Fw32_short_file_name): Call w32_get_short_filename instead of
8226 GetShortPathName.
8227
8228 * w32notify.c (add_watch): Work in Unicode mode when
8229 w32_unicode_filenames is non-zero, ANSI mode otherwise.
8230 (Fw32notify_add_watch): Rewrite to avoid using GetFullPathName;
8231 instead, do the same with Lisp primitives.
8232
8233 * w32fns.c (file_dialog_callback, Fx_file_dialog)
8234 (Fsystem_move_file_to_trash, Fw32_shell_execute)
8235 (Ffile_system_info, Fdefault_printer_name): Work in Unicode mode
8236 when w32_unicode_filenames is non-zero, ANSI mode otherwise.
8237 (Fw32_shell_execute): Improve error reporting.
8238 (Fdefault_printer_name): Ifdef away for Cygwin.
8239
8240 * w32.h (struct _child_process): Remove input_file and
8241 pending_deletion members that are no longer used.
8242 (dostounix_filename, w32_get_short_filename, filename_from_ansi)
8243 (filename_to_ansi, filename_from_utf16, filename_to_utf16)
8244 (ansi_encode_filename): New and updated prototypes.
8245
8246 * unexw32.c (open_input_file, open_output_file, unexec): Use ANSI
8247 APIs explicitly.
8248 (unexec): Don't use dostounix_filename, it expects a file name in
8249 UTF-8. Instead, mirror backslashes by hand. Convert NEW_NAME to
8250 ANSI encoding.
8251
8252 * fileio.c (Ffile_name_directory, file_name_as_directory)
8253 (directory_file_name, Fexpand_file_name)
8254 (Fsubstitute_in_file_name) [WINDOWSNT]: Adapt to the change in
8255 arguments of dostounix_filename.
8256 (Fexpand_file_name) [WINDOWSNT]: Convert value of $HOME to UTF-8.
8257 use MAX_UTF8_PATH for size of file-name strings.
8258 (emacs_readlinkat): Build an explicitly unibyte string for file
8259 names.
8260 (syms_of_fileio) <file-name-coding-system>:
8261 <default-file-name-coding-system>: Mention MS-Windows peculiarities.
8262
8263 * emacs.c (init_cmdargs) [WINDOWSNT]: Convert argv[0] to UTF-8.
8264 (main) [WINDOWSNT]: Convert the argv[] elements that are files or
8265 directories to UTF-8.
8266 (decode_env_path) [WINDOWSNT]: Convert file names taken from the
8267 environment, and each element of the input PATH, to UTF-8.
8268
8269 * dired.c (file_attributes): Use build_unibyte_string explicitly
8270 to make Lisp strings from user and group names.
8271
8272 * coding.h (ENCODE_FILE, DECODE_FILE): Just call encode_file and
8273 decode_file.
8274
8275 * coding.c (decode_file_name, encode_file_name): New functions.
8276
8277 * termcap.c (tgetent): Adapt to the change in arguments of
8278 dostounix_filename.
8279
8280 * sysdep.c (sys_subshell) [WINDOWSNT]: Use MAX_UTF8_PATH for file
8281 names.
8282
8283 * msdos.c (dostounix_filename, init_environment): Adapt to the
8284 change in arguments of dostounix_filename.
8285
8286 * image.c (xpm_load, tiff_load, gif_load, imagemagick_load)
8287 [WINDOWSNT]: Encode file names passed to the image libraries in
8288 ANSI codepage.
8289
8290 * gnutls.c (Fgnutls_boot): Encode all file names passed to GnuTLS.
8291 [WINDOWSNT]: Convert file names to the current ANSI codepage.
8292
8293 * filelock.c (lock_file) [WINDOWSNT]: Adapt to the change in
8294 arguments of dostounix_filename.
8295
8296 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
8297
8298 * font.h (struct font_entity) [HAVE_NS]: New field to record
8299 font driver which was used to create this entity.
8300 (struct font) [HAVE_WINDOW_SYSTEM]: New field to record
8301 frame where the font was opened.
8302 (font_close_object): Add prototype.
8303 * font.c (font_make_entity) [HAVE_NS]: Zero out driver field.
8304 (font_close_object): Not static any more. Lost frame arg.
8305 Adjust comment and users.
8306 * alloc.c (cleanup_vector): Call font_close_object to adjust
8307 per-frame font counters correctly. If HAVE_NS, also call
8308 driver-specific cleanup for font-entity objects.
8309 * ftfont.c (ftfont_open):
8310 * nsfont.m (nsfont_open):
8311 * w32font.c (w32font_open_internal):
8312 * xfont.c (xfont_open):
8313 * xftfont.c (xftfont_open): Save frame pointer in font object.
8314 * macfont.m (macfont_open): Likewise.
8315 (macfont_descriptor_entity): Save driver pointer to be able
8316 to call its free_entity routine when font-entity is swept.
8317 * ftxfont.c (ftxfont_open): Add eassert because frame
8318 pointer should be saved by ftfont_driver.open.
8319
8320 2013-12-12 Dmitry Antipov <dmantipov@yandex.ru>
8321
8322 * xterm.c (x_make_frame_visible): Restore hack which is needed when
8323 input polling is used. This is still meaningful for Cygwin, see
8324 http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00351.html.
8325 * keyboard.c (poll_for_input_1, input_polling_used):
8326 Define unconditionally.
8327 * dispextern.h (FACE_SUITABLE_FOR_CHAR_P): Remove unused macro.
8328 (FACE_FOR_CHAR): Simplify because face_for_char does the same.
8329 * fontset.c (face_suitable_for_char_p) [0]: Remove unused function.
8330 (font_for_char): Prefer ptrdiff_t to int for buffer position.
8331 (face_for_char): Likewise. Rearrange eassert and return ASCII
8332 face for CHAR_BYTE8_P.
8333 * fontset.h (font_for_char, face_for_char): Adjust prototypes.
8334
8335 2013-12-11 Ken Brown <kbrown@cornell.edu>
8336
8337 * dispextern.h (erase_phys_cursor):
8338 * keyboard.h (make_ctrl_char): Declare prototypes if HAVE_NTGUI.
8339
8340 2013-12-11 Dmitry Antipov <dmantipov@yandex.ru>
8341
8342 * nsterm.m (x_free_frame_resources):
8343 * term.c (tty_free_frame_resources):
8344 * xterm.c (x_free_frame_resources): Do not check for non-NULL
8345 face cache because it's implied by free_frame_faces anyway.
8346 * w32term.c (x_free_frame_resources): Likewise. Do not call
8347 free_frame_faces twice.
8348
8349 2013-12-11 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
8350
8351 * editfns.c (Fformat_time_string): Mention %F in the doc.
8352
8353 2013-12-11 Martin Rudalics <rudalics@gmx.at>
8354
8355 * window.c (resize_frame_windows): Don't return immediately when
8356 the root window's size doesn't change - the minibuffer window
8357 may still have to be repositioned/resized.
8358 * xfns.c (Fx_create_frame): Always change the frame size after
8359 initializing the frame's faces.
8360 * xterm.c (handle_one_xevent): Don't set pixel sizes here,
8361 change_frame_size should already have done it.
8362 (x_new_font): Assign new tool- and menu-bar heights.
8363 (x_set_window_size_1): Account for tool- and menu-bar heights
8364 (Bug#16013). Don't set pixel sizes since change_frame_size
8365 should already have done it.
8366
8367 2013-12-11 Paul Eggert <eggert@cs.ucla.edu>
8368
8369 Remove the option of using libcrypto.
8370 * Makefile.in (LIB_CRYPTO): Remove.
8371 (LIBES): Don't use it.
8372
8373 2013-12-11 Juri Linkov <juri@jurta.org>
8374
8375 * term.c (term_get_fkeys_1): Remove non-standard IBM terminfo
8376 as obsolete to avoid conflicts with <S-up>. (Bug#13471)
8377
8378 2013-12-10 Dmitry Antipov <dmantipov@yandex.ru>
8379
8380 * xdisp.c (display_tool_bar_line): Don't extend on a previously
8381 drawn tool bar items (Bug#16058).
8382 * font.c (font_find_for_lface): Ensure SAFE_FREE on return.
8383
8384 2013-12-09 Ken Brown <kbrown@cornell.edu>
8385
8386 * frame.c (get_frame_param): Make extern if HAVE_NTGUI.
8387
8388 * lisp.h (get_frame_param): Adjust conditions for prototype
8389 declaration.
8390
8391 2013-12-09 Dmitry Antipov <dmantipov@yandex.ru>
8392
8393 * gtkutil.c (USE_NEW_GTK_FONT_CHOOSER) [HAVE_FREETYPE]:
8394 Avoid unused macro warning if configured --without-xft.
8395
8396 2013-12-09 Jan Djärv <jan.h.d@swipnet.se>
8397
8398 * alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always.
8399
8400 2013-12-08 Jan Djärv <jan.h.d@swipnet.se>
8401
8402 * nsterm.m (updateFrameSize:): Fix GNUstep toolbar not updating.
8403
8404 * emacs.c (main): Call fixup_locale a second time for GNUstep.
8405
8406 2013-12-08 Martin Rudalics <rudalics@gmx.at>
8407
8408 * frame.c (x_set_font): Mark frame as garbaged (Bug#16028).
8409
8410 2013-12-08 Paul Eggert <eggert@cs.ucla.edu>
8411
8412 Use libcrypto's checksum implementations if available, for speed.
8413 * Makefile.in (LIB_CRYPTO): New macro.
8414 (LIBES): Use it.
8415
8416 * frame.h (SET_FRAME_VISIBLE): Now an inline function.
8417 The macro didn't conform to C99 due to type mismatch,
8418 which caused compilation failure with Sun C 5.12,
8419 and it was confusing anyway. Include window.h to declare
8420 redisplay_other_windows.
8421
8422 2013-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
8423
8424 * window.c (set_window_buffer): Update mode line (bug#16084).
8425
8426 2013-12-07 Paul Eggert <eggert@cs.ucla.edu>
8427
8428 Fix minor problems found by static checking.
8429 * keyboard.c (poll_for_input_1, input_polling_used):
8430 Define only if HAVE_NTGUI.
8431 * xmenu.c (popup_activate_callback): Omit unnecessary
8432 check against USE_X_TOOLKIT, which must be defined here anyway.
8433 * xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
8434 Now static.
8435
8436 2013-12-07 Martin Rudalics <rudalics@gmx.at>
8437
8438 * w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup.
8439
8440 2013-12-07 Jan Djärv <jan.h.d@swipnet.se>
8441
8442 * gtkutil.c (tb_size_cb): Call xg_height_or_width_changed.
8443
8444 * nsterm.m (x_set_window_size): Remove fprintf.
8445 (init): Define always. Set applicationDidFinishLaunchingCalled
8446 for GNUstep.
8447 (applicationDidFinishLaunching:):
8448 Set applicationDidFinishLaunchingCalled.
8449 (applicationDidBecomeActive:): Call applicationDidFinishLaunching if
8450 not called.
8451
8452 * nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
8453
8454 Pixel resize changes for NS (Bug#16049).
8455 * nsterm.m (x_set_window_size): Change parameters rows/cols to
8456 height/width. row/cols are locals.
8457 Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT.
8458 (updateFrameSize:): Remove gsextra. Adjust for pixelwise resize.
8459 (windowWillResize): Remove gsextra. Calculate extra as in
8460 updateFrameSize.
8461 (x_new_font): Don't change frame size if fullscreen.
8462 Change size pixelwise.
8463
8464 * nsfns.m (Fx_create_frame): Call change_frame_size twice as per
8465 comment in xfns.c. Change to pixelwise call.
8466
8467 2013-12-06 Eli Zaretskii <eliz@gnu.org>
8468
8469 * buffer.c (Fset_buffer_multibyte): Invalidate buffer caches.
8470 (Bug#16070)
8471
8472 2013-12-06 Dmitry Antipov <dmantipov@yandex.ru>
8473
8474 * xterm.c (input_signal_count): Remove.
8475 (x_dispatch_event): Define unconditionally.
8476 (x_make_frame_visible): Process X events until the frame
8477 is really visible (Bug#16027).
8478 * xterm.h (x_dispatch_event): Declare unconditionally.
8479
8480 2013-12-05 Jan Djärv <jan.h.d@swipnet.se>
8481
8482 * nsfns.m (ns_frame_parm_handlers): Add right/bottom_divider_width.
8483
8484 * nsterm.m (x_set_window_size): Handle pixelwise.
8485
8486 2013-12-05 Martin Rudalics <rudalics@gmx.at>
8487
8488 * w32term.c (x_new_font):
8489 * xterm.c (x_new_font): Calculate new frame size from new font
8490 size (Bug#16028).
8491
8492 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
8493
8494 * lisp.h (FOR_EACH_TAIL): New macro.
8495 * fns.c (Fdelq): Use it to avoid inf-loops; remove QUIT.
8496
8497 * window.c (select_window): Call second wset_redisplay before we change
8498 selected_window (bug#16034).
8499
8500 2013-12-04 Paul Eggert <eggert@cs.ucla.edu>
8501
8502 * bidi.c (LRM_CHAR, RLM_CHAR): Remove; no longer used.
8503
8504 2013-12-04 Eli Zaretskii <eliz@gnu.org>
8505
8506 * w32xfns.c: Include window.h, to avoid a compiler warning.
8507
8508 2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
8509
8510 * window.c (window_scroll): Mark window for redisplay (bug#16034).
8511 (scroll_command, Fscroll_other_window): Don't cause redisplay now that
8512 window_scroll takes care of it.
8513 (Fset_window_point, Fdelete_other_windows_internal)
8514 (set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
8515 (Fsplit_window_internal, Fdelete_window_internal)
8516 (Fresize_mini_window_internal, Fset_window_configuration)
8517 (apply_window_adjustment): Use fset_redisplay and wset_redisplay to
8518 cause redisplay instead of forcing a complete redisplay.
8519 * xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
8520 we're only affecting the selected_window.
8521
8522 2013-12-04 Eli Zaretskii <eliz@gnu.org>
8523
8524 * bidi.c (bidi_get_type, bidi_get_category): Handle the isolate
8525 directional control characters. Update type and category
8526 determination according to the UBA from Unicode v6.3.
8527 (bidi_category_t): New category EXPLICIT_FORMATTING.
8528
8529 * dispextern.h (bidi_type_t): Update to include new bidirectional
8530 properties introduced with Unicode v6.3. (Bug#16043)
8531
8532 2013-12-04 Martin Rudalics <rudalics@gmx.at>
8533
8534 * xterm.c (XTflash): Fix coordinate of bottom area to flash
8535 (Bug#16044).
8536
8537 2013-12-04 Dmitry Antipov <dmantipov@yandex.ru>
8538
8539 * font.c (font_list_entities): Remove dummy assignment.
8540 * font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are
8541 used on graphic displays only. Remove unused 'font_encoder' member.
8542 (struct font_bitmap): Remove unused 'extra' member.
8543 * nsfont.m (nsfont_open):
8544 * w32font.c (w32font_open_internal):
8545 * ftfont.c (ftfont_get_bitmap): Adjust users.
8546
8547 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
8548
8549 Use bool for boolean.
8550 * tparam.c (tparam1):
8551 * undo.c (record_point, record_property_change):
8552 Use bool for boolean, for local vars that are always true or false.
8553
8554 Minor integer overflow fixes (Bug#16033).
8555 * window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
8556 This improves on the previous fix to this function.
8557 (window_resize_check): When summing up pixel counts, don't rely on
8558 undefined behavior if the sum overflows.
8559
8560 2013-12-03 Martin Rudalics <rudalics@gmx.at>
8561
8562 * window.c (Fset_window_new_pixel): Don't choke at negative
8563 argument value (Bug#16033).
8564
8565 * xfns.c (Fx_create_frame): Add another call to change_frame_size
8566 to avoid crash in window_box_height.
8567
8568 * gtkutil.h: Fix external declaration of xg_frame_set_char_size.
8569 * gtkutil.c (xg_frame_set_char_size, style_changed_cb): Fix size
8570 calculation.
8571 * xterm.c (x_set_window_size): Fix size calculation (Bug#16013).
8572
8573 2013-12-03 Paul Eggert <eggert@cs.ucla.edu>
8574
8575 Minor integer overflow fixes.
8576 * window.c (Fset_window_new_pixel, grow_mini_window):
8577 * xdisp.c (Fwindow_text_pixel_size):
8578 Avoid undefined behavior on signed integer overflow.
8579 * xfns.c (x_set_mouse_color):
8580 Check that drag shape fits in 'unsigned', since that's what X wants.
8581
8582 2013-12-02 Eli Zaretskii <eliz@gnu.org>
8583
8584 Improve reporting of fatal exception on MS-Windows.
8585 * w32fns.c (my_exception_handler): New function.
8586 (globals_of_w32fns): Set it up as the unhandled exception
8587 handler. Initialize exception code and address to zeros.
8588 (emacs_abort): If the exception code and address are available,
8589 print them at the beginning of the backtrace. Fix the format of
8590 printing addresses (was producing 0x0x12345678 on XP).
8591 (Bug#15994)
8592
8593 2013-12-02 Helmut Eller <eller.helmut@gmail.com>
8594
8595 * eval.c (Fbacktrace__locals): New function.
8596 (syms_of_eval): Defsubr it.
8597
8598 2013-12-02 Dmitry Antipov <dmantipov@yandex.ru>
8599
8600 * font.h (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT):
8601 Define here to unify between...
8602 * nsterm.h, w32term.h, xterm.h: ...port-specific headers.
8603 * w32term.h (CHECK_W32_FRAME): Remove unused macro.
8604
8605 2013-12-02 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
8606
8607 * xterm.h (struct scroll_bar): Remove member `fringe_extended_p'.
8608
8609 * xterm.c (x_draw_fringe_bitmap, x_scroll_run): Remove code for
8610 fringe background extension.
8611 (x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
8612 because they are now always the same as `left' and `width',
8613 respectively. Remove code for the case that `width' and
8614 `sb_width' are different.
8615
8616 2013-12-01 Paul Eggert <eggert@cs.ucla.edu>
8617
8618 Fix minor problems found by static checking.
8619 * dispextern.h, xdisp.c (x_draw_bottom_divider): Now static.
8620 * frame.c (set_frame_param) [!HAVE_NTGUI]: Remove.
8621 * xdisp.c (Ftool_bar_height) [USE_GTK || HAVE_NS]: Now const function.
8622
8623 2013-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
8624
8625 * image.c (imagemagick_compute_animated_image): Don't crash if we
8626 have an animation with different-sized images (bug#15313).
8627
8628 2013-11-30 Martin Rudalics <rudalics@gmx.at>
8629
8630 Remove some unused items introduced during pixelwise change.
8631 * window.c (window_resize_total_check): Remove unused function.
8632 * xdisp.c (remember_mouse_glyph): Remove unused label.
8633 (Ftool_bar_height): Move declaration inside #if.
8634 * xterm.c (x_set_window_size): Don't use r and c.
8635
8636 2013-11-30 Juanma Barranquero <lekktu@gmail.com>
8637
8638 * xdisp.c (Fwindow_text_pixel_size): Remove unused variables
8639 `value' and `endp'.
8640
8641 * window.c (Fset_window_configuration): Comment out unused variables.
8642
8643 * w32term.c (w32_read_socket): Remove unused variable `buf'.
8644
8645 2013-11-30 Jan Djärv <jan.h.d@swipnet.se>
8646
8647 * xdisp.c (redisplay_internal): unrequest_sigio => request_sigio.
8648
8649 * xfaces.c (NEAR_SAME_COLOR_THRESHOLD): Move inside HAVE_WINDOW_SYSTEM.
8650
8651 * gnutls.c (gnutls_audit_log_function): Only declare and define if
8652 HAVE_GNUTLS3 (Bug#16001).
8653
8654 * xdisp.c (redisplay_internal): Call request_sigio at end_of_redisplay
8655 if interrupts are deferred (Bug#15801).
8656
8657 2013-11-30 Martin Rudalics <rudalics@gmx.at>
8658
8659 Support resizing frames and windows pixelwise.
8660 * dispextern.h (enum window_part): Add ON_SCROLL_BAR,
8661 ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER.
8662 (struct glyph_matrix): Replace window_left_col and
8663 window_top_line by window_pixel_left and window_pixel_top.
8664 (WINDOW_WANTS_MODELINE_P, WINDOW_WANTS_HEADER_LINE_P):
8665 Minor rewrite.
8666 (enum face_id): Add WINDOW_DIVIDER_FACE_ID.
8667 (draw_window_divider, move_it_to, x_draw_right_divider)
8668 (x_draw_bottom_divider, change_frame_size): Add or fix
8669 declarations.
8670 * dispnew.c (change_frame_size_1): Change prototype.
8671 (adjust_glyph_matrix, required_matrix_width)
8672 (adjust_frame_glyphs_for_window_redisplay): Use pixel
8673 values instead of lines and columns.
8674 (marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of
8675 WINDOW_TOTAL_FRINGE_WIDTH.
8676 (handle_window_change_signal, do_pending_window_change)
8677 (init_display): Adjusts calls of change_frame_size.
8678 (change_frame_size, change_frame_size_1): Handle pixelwise
8679 changes.
8680 * frame.c (Qright_divider_width, Qbottom_divider_width):
8681 New Lisp objects.
8682 (set_menu_bar_lines_1, set_menu_bar_lines, make_frame)
8683 (make_terminal_frame, Fmake_terminal_frame, Fframe_parameters)
8684 (x_set_internal_border_width, x_set_vertical_scroll_bars)
8685 (x_set_scroll_bar_width, x_figure_window_size): Handle pixel
8686 values.
8687 (set_frame_param): New function.
8688 (Fframe_text_cols, Fframe_text_lines, Fframe_total_cols)
8689 (Fframe_text_width, Fframe_text_height, Fscroll_bar_width)
8690 (Ffringe_width, Fborder_width, Fright_divider_width)
8691 (Fbottom_divider_width): New functions, defsubr them.
8692 (Fset_frame_height, Fset_frame_width, Fset_frame_size):
8693 New argument pixelwise.
8694 (struct frame_parm_table): New members Qright_divider_width and
8695 Qbottom_divider_width.
8696 (x_set_frame_parameters): Handle parameters for pixelwise sizes.
8697 (x_report_frame_params): Handle Qright_divider_width and
8698 Qbottom_divider_width.
8699 (x_set_right_divider_width, x_set_bottom_divider_width):
8700 New functions.
8701 (frame_resize_pixelwise): New option.
8702 * frame.h (struct frame): Add tool_bar_height, menu_bar_height,
8703 new_pixelwise, right_divider_width and bottom_divider_width;
8704 remove total_lines; rename text_lines, text_cols, new_text_lines
8705 and new_text_cols to text_height, text_width, new_height and
8706 new_width respectively.
8707 (FRAME_LINES, FRAME_COLS): Rename to FRAME_TEXT_HEIGHT and
8708 FRAME_TEXT_WIDTH respectively.
8709 (FRAME_MENU_BAR_HEIGHT, FRAME_TOOL_BAR_HEIGHT)
8710 (FRAME_RIGHT_DIVIDER_WIDTH, FRAME_BOTTOM_DIVIDER_WIDTH)
8711 (FRAME_TEXT_TO_PIXEL_WIDTH, FRAME_PIXEL_TO_TEXT_WIDTH):
8712 New macros.
8713 (FRAME_TOP_MARGIN_HEIGHT, FRAME_LEFT_SCROLL_BAR_AREA_WIDTH)
8714 (FRAME_RIGHT_SCROLL_BAR_AREA_WIDTH, FRAME_SCROLL_BAR_AREA_WIDTH)
8715 (SET_FRAME_COLS, SET_FRAME_WIDTH, SET_FRAME_HEIGHT)
8716 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH, FRAME_PIXEL_WIDTH_TO_TEXT_COLS)
8717 (FRAME_TEXT_COLS_TO_PIXEL_WIDTH): Rewrite macros.
8718 (FRAME_TOTAL_COLS_ARG): Remove macro.
8719 * fringe.c (draw_fringe_bitmap_1): Handle right divder.
8720 * gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
8721 (x_wm_set_size_hint): Handle frame pixel sizes.
8722 * indent.c (compute_motion, Fcompute_motion):
8723 Call window_body_width instead of window_body_cols.
8724 * keyboard.c (Qright_divider, Qbottom_divider): New symbols.
8725 (make_lispy_position): Handle right and bottom dividers.
8726 (Fsuspend_emacs): Pixelize call of change_frame_size.
8727 * keyboard.h: Extern Qright_divider, Qbottom_divider.
8728 * lisp.h: Extern set_frame_param.
8729 * nsfns.m (x_set_tool_bar_lines): Pixelize call of
8730 x_set_window_size.
8731 (Fx_create_frame): Add entry for vertical_drag_cursor.
8732 Pixelize call of change_frame_size.
8733 * nsterm.h (struct ns_output): Add vertical_drag_cursor.
8734 * nsterm.m (ns_update_window_end): Optionally draw right
8735 divider.
8736 (x_set_window_size): Add argument pixelwise.
8737 Call check_frame_size and change_frame_size with pixelwise zero.
8738 (ns_draw_window_divider): New function.
8739 (ns_redisplay_interface): Add ns_draw_window_divider.
8740 (updateFrameSize:): Call change_frame_size with pixelwise zero.
8741 (x_new_font): Call x_set_window_size with pixelwise zero.
8742 * print.c (print_object): For a window print its sequence
8743 number again.
8744 * term.c (Fresume_tty): Pixelize call of change_frame_size.
8745 * w32fns.c (x_set_mouse_color): Handle vertical drag cursor.
8746 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
8747 (w32_createwindow): Use scroll bar area width.
8748 (w32_wnd_proc): Handle bottom divider width.
8749 For WM_WINDOWPOSCHANGING return zero if we resize pixelwise.
8750 (Fx_create_frame): Default divider width parameters.
8751 Caclulate sizes pixelwise. Add vertical drag cursor support.
8752 (x_create_tip_frame): Default divider widths to zero.
8753 Pixelize call to change_frame_size.
8754 (Fx_show_tip): Add handling of divider widths. Pixelize window
8755 position and sizes.
8756 (Fw32_frame_rect): New function.
8757 (frame_parm_handler w32_frame_parm_handlers): Add divider
8758 widths.
8759 (Vx_window_vertical_drag_shape): Add variable.
8760 * w32inevt.c (resize_event, maybe_generate_resize_event):
8761 Pixelize change_frame_size calls.
8762 * w32menu.c (set_frame_menubar): Pixelize x_set_window_size
8763 call.
8764 * w32term.c (w32_draw_window_divider): New function.
8765 (x_update_window_end): Handle right divider.
8766 (w32_draw_fringe_bitmap, x_scroll_run)
8767 (w32_set_vertical_scroll_bar): Pixelize scrollbar widths.
8768 (w32_read_socket): Handle SIZE_MAXIMIZED separately.
8769 Calculate new frame sizes pixelwise.
8770 (x_new_font): Pixelize call to x_set_window_size.
8771 (x_check_fullscreen): Pixelize call to change_frame_size.
8772 (x_set_window_size_1, x_set_window_size): New argument
8773 pixelwise. Calculate pixelwise.
8774 (x_wm_set_size_hint): Use scroll bar area width.
8775 (w32_redisplay_interface): Add w32_draw_window_divider.
8776 * w32term.h (struct w32_output): Add vertical drag cursor.
8777 * widget.c (set_frame_size, update_wm_hints)
8778 (EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of
8779 change_frame_size.
8780 (EmacsFrameSetCharSize): Pixelize call of x_set_window_size.
8781 * window.c (sequence_number): Restore.
8782 (Fwindow_pixel_width, Fwindow_pixel_height)
8783 (Fwindow_mode_line_height, Fwindow_header_line_height)
8784 (window_pixel_to_total, Frun_window_scroll_functions)
8785 (Fset_window_new_pixel, window_resize_apply_total)
8786 (Fwindow_resize_apply_total): New functions.
8787 (window_body_height, window_body_width): Rename from
8788 window_body_lines. New argument PIXELWISE.
8789 Calculate pixelwise.
8790 (Fwindow_body_height, Fwindow_body_width): New argument
8791 PIXELWISE.
8792 (coordinates_in_window, window_relative_x_coord): Use window's
8793 pixel width instead of total width.
8794 (replace_window, recombine_windows): Initialize pixel values.
8795 (resize_root_window, resize_frame_windows, grow_mini_window)
8796 (shrink_mini_window): New argument PIXELWISE.
8797 Calculate pixelwise.
8798 (Fdelete_other_windows_internal, adjust_window_margins)
8799 (window_resize_check, window_resize_apply)
8800 (Fdelete_window_internal, Fresize_mini_window_internal)
8801 (Fwindow_text_width, Fwindow_text_height): Calculate pixelwise.
8802 (check_frame_size): Rename arguments. New argument PIXELWISE.
8803 Calculate pixelwise.
8804 (set_window_buffer): Make samebuf bool. Run configuration change
8805 hook only if buffer changed.
8806 (Fset_window_buffer): Rewrite doc-string.
8807 (make_window): Initialize new_pixel slot.
8808 (Fwindow_resize_apply): Check pixel size of root window.
8809 (Fsplit_window_internal): Call 2nd argument pixel_size.
8810 Calculate pixelwise.
8811 (Fscroll_left, Fscroll_right): Call window_body_width instead of
8812 window_body_cols.
8813 (save_window_data): New slots frame_text_width,
8814 frame_text_height, frame_menu_bar_height, frame_tool_bar_height.
8815 (saved_window): New slots pixel_left, pixel_top, pixel_height,
8816 pixel_width.
8817 (Fcurrent_window_configuration, Fset_window_configuration)
8818 (save_window_save, compare_window_configurations): Handle new
8819 slots in save_window_data and saved_window.
8820 (Fset_window_scroll_bars): Fix doc-string.
8821 (window_resize_pixelwise): New variable.
8822 (coordinates_in_window, Fcoordinates_in_window_p):
8823 Handle dividers.
8824 (make_parent_window): Adjust sequence_number.
8825 (Fwindow_right_divider_width, Fwindow_bottom_divider_width):
8826 New functions.
8827 * window.h (struct window): New members new_pixel, pixel_left,
8828 pixel_top, pixel_width, pixel_height. Restore sequence_number.
8829 (wset_new_pixel): New function.
8830 (WINDOW_PIXEL_WIDTH, WINDOW_PIXEL_HEIGHT)
8831 (MIN_SAFE_WINDOW_PIXEL_WIDTH, MIN_SAFE_WINDOW_PIXEL_HEIGHT)
8832 (WINDOW_LEFT_PIXEL_EDGE, WINDOW_RIGHT_PIXEL_EDGE)
8833 (WINDOW_TOP_PIXEL_EDGE, WINDOW_BOTTOM_PIXEL_EDGE)
8834 (WINDOW_BOTTOMMOST_P, WINDOW_BOX_LEFT_PIXEL_EDGE)
8835 (WINDOW_BOX_RIGHT_PIXEL_EDGE, WINDOW_MARGINS_COLS)
8836 (WINDOW_MARGINS_WIDTH, WINDOW_RIGHT_DIVIDER_WIDTH)
8837 (WINDOW_BOTTOM_DIVIDER_WIDTH): New macros.
8838 (WINDOW_TOTAL_FRINGE_WIDTH): Rename to WINDOW_FRINGES_WIDTH.
8839 (WINDOW_TOTAL_WIDTH, WINDOW_TOTAL_HEIGHT): Remove macros.
8840 (WINDOW_RIGHT_EDGE_X, WINDOW_LEFT_EDGE_X, WINDOW_TOP_EDGE_Y)
8841 (WINDOW_BOTTOM_EDGE_Y, WINDOW_FULL_WIDTH_P, WINDOW_LEFTMOST_P)
8842 (WINDOW_RIGHTMOST_P, WINDOW_BOX_LEFT_EDGE_X)
8843 (WINDOW_BOX_RIGHT_EDGE_X, WINDOW_FRINGE_COLS)
8844 (WINDOW_BOX_HEIGHT_NO_MODE_LINE, WINDOW_BOX_TEXT_HEIGHT):
8845 Rewrite.
8846 (resize_frame_windows, grow_mini_window, shrink_mini_window)
8847 (window_body_width, check_frame_size): Adapt external declarations.
8848 * xdisp.c (last_max_ascent): New integer.
8849 (window_text_bottom_y): Handle bottom divider.
8850 (window_box_width, window_box_height): Calculate pixelwise.
8851 (get_glyph_string_clip_rects): Handle right divider.
8852 (remember_mouse_glyph): When windows are resized pixelwise
8853 proceed with width and height set to 1.
8854 (init_iterator): Use WINDOW_PIXEL_WIDTH instead of
8855 WINDOW_TOTAL_WIDTH.
8856 (move_it_to): Calculate and return maximum x position
8857 encountered.
8858 (Fwindow_text_pixel_size): New function.
8859 (resize_mini_window, update_tool_bar): Calculate pixelwise.
8860 (tool_bar_lines_needed): Rename to tool_bar_height.
8861 Calculate pixelwise.
8862 (Ftool_bar_lines_needed): Rename to Ftool_bar_height.
8863 Calculate pixelwise.
8864 (redisplay_tool_bar): Calculate pixelwise.
8865 (redisplay_window): Calculate pixelwise. Handle dividers.
8866 (draw_glyphs, x_clear_end_of_line, note_mouse_highlight)
8867 (x_draw_vertical_border): Handle dividers.
8868 (define_frame_cursor1): Handle vertical drag cursor.
8869 (x_draw_right_divider, x_draw_bottom_divider): New functions.
8870 (expose_window): Calculate pixelwise. Handle dividers.
8871 (init_xdisp): Initialize pixel values.
8872 * xfaces.c (Qwindow_divider): New face.
8873 (realize_basic_faces): Realize it.
8874 * xfns.c (x_set_mouse_color): Handle vertical_drag_cursor.
8875 (x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
8876 (x_set_scroll_bar_default_width): Default actual width to 16.
8877 (Fx_create_frame): Set sizes pixelwise.
8878 (x_create_tip_frame): Default divider widths to zero.
8879 Pixelize call of change_frame_size.
8880 (Fx_show_tip): Handle divider widths. Initial pixel position
8881 and sizes.
8882 (frame_parm_handler x_frame_parm_handlers): Add divider widths.
8883 (Vx_window_vertical_drag_shape): New option.
8884 * xmenu.c (free_frame_menubar): Pixelize call of
8885 x_set_window_size.
8886 * xterm.c (x_draw_window_divider): New function.
8887 (x_update_window_end): Optionally draw right divider.
8888 (x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create)
8889 (XTset_vertical_scroll_bar): Use scroll bar pixel width.
8890 (handle_one_xevent, x_new_font): Calculate pixelwise.
8891 (x_set_window_size_1, x_set_window_size): New argument
8892 pixelwise. Calculate pixelwise.
8893 (x_wm_set_size_hint): Pixelize call of check_frame_size.
8894 (struct x_redisplay_interface): Add x_draw_window_divider.
8895 * xterm.h (struct x_output): Add vertical_drag_cursor.
8896
8897 2013-11-30 Stefan Monnier <monnier@iro.umontreal.ca>
8898
8899 * xdisp.c (redisplay_internal): Don't call set_window_update_flags.
8900 Set invisible frames's `redisplay' when a full redisplay is requested.
8901 (redisplay_window): Set must_be_updated_p instead (bug#15999).
8902 (redisplay_mode_lines): Don't set must_be_updated_p any more.
8903 (display_mode_lines): Set it here instead.
8904
8905 * dispnew.c (set_window_update_flags): Remove `b' argument; make static.
8906
8907 * dispextern.h (set_window_update_flags): Remove.
8908
8909 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
8910
8911 * fns.c (internal_equal): Add a hash_table argument to handle cycles.
8912
8913 * xdisp.c (REDISPLAY_SOME_P): New macro.
8914 (redisplay_internal): Use it (bug#15999).
8915 (prepare_menu_bars, redisplay_window): Use it as well.
8916
8917 * lisp.mk (lisp): Add electric.elc and uniquify.elc.
8918
8919 2013-11-29 Tom Seddon <emacs@tomseddon.plus.com> (tiny change)
8920
8921 * w32font.c (g_b_init_get_char_width_32_w): New static var.
8922 (globals_of_w32font): Zero it out.
8923 (GetCharWidth32W_Proc): New function pointer.
8924 (get_char_width_32_w): New function.
8925 (compute_metrics): If get_glyph_outline_w returns an error, try
8926 get_char_width_32_w before declaring a failure. This avoids
8927 punishing raster (a.k.a. "bitmap") fonts by slowing down
8928 redisplay. (Bug#6364).
8929
8930 2013-11-29 Eli Zaretskii <eliz@gnu.org>
8931
8932 * xdisp.c (clear_mouse_face): Don't invalidate the entire
8933 mouse-highlight info, just signal frame_up_to_date_hook that mouse
8934 highlight needs to be redisplayed. (Bug#15913)
8935
8936 2013-11-29 Paul Eggert <eggert@cs.ucla.edu>
8937
8938 Fix minor problems found by static checking.
8939 * buffer.h (struct buffer_text, struct buffer):
8940 * frame.h (struct frame):
8941 * window.h (struct window):
8942 Avoid 'bool foo : 1;', as it's not portable to pre-C99 compilers,
8943 as described in ../lib/stdbool.in.h. Use 'unsigned foo : 1;' instead.
8944 * menu.c (syms_of_menu): Define x-popup-dialog, removing a
8945 no-longer-valid use of HAVE_MENUS.
8946 * xdisp.c (propagate_buffer_redisplay): Now static.
8947
8948 2013-11-29 Stefan Monnier <monnier@iro.umontreal.ca>
8949
8950 * xmenu.c (Fmenu_or_popup_active_p):
8951 * window.c (Fset_window_configuration):
8952 * menu.c (Fx_popup_menu, Fx_popup_dialog):
8953 * keyboard.c (record_menu_key, read_char_x_menu_prompt):
8954 * fns.c (Fyes_or_no_p):
8955 * editfns.c (Fmessage_box, Fmessage_or_box):
8956 * alloc.c (make_save_ptr_ptr):
8957 * xdisp.c, w32menu.c, term.c, xterm.h, xterm.c: Remove HAVE_MENUS.
8958
8959 * window.c (Fset_window_configuration): Move select_window later.
8960
8961 2013-11-28 Stefan Monnier <monnier@iro.umontreal.ca>
8962
8963 Refine redisplay optimizations to only redisplay *some* frames/windows
8964 rather than all of them.
8965 * xdisp.c (REDISPLAY_SOME): New constant.
8966 (redisplay_other_windows, wset_redisplay, fset_redisplay)
8967 (bset_redisplay, bset_update_mode_line): New functions.
8968 (message_dolog): Use bset_redisplay.
8969 (clear_garbaged_frames): Use fset_redisplay.
8970 (echo_area_display): Use wset_redisplay.
8971 (buffer_shared_and_changed): Remove.
8972 (prepare_menu_bars): Call Vpre_redisplay_function before updating
8973 frame titles. Compute the actual set of windows redisplayed.
8974 Don't update frame titles and menu bars for frames that don't need to
8975 be redisplayed.
8976 (propagate_buffer_redisplay): New function.
8977 (AINC): New macro.
8978 (redisplay_internal): Use it. Be more selective in the set of windows
8979 we redisplay. Propagate windows_or_buffers_changed to
8980 update_mode_lines a bit later to simplify the code.
8981 (mark_window_display_accurate_1): Reset window and buffer's
8982 `redisplay' flag.
8983 (redisplay_window): Do nothing if neither the window nor the buffer nor
8984 the frame needs redisplay.
8985 * window.h (struct window): Add `redisplay' field.
8986 (wset_redisplay, fset_redisplay, bset_redisplay, bset_update_mode_line)
8987 (redisplay_other_windows, window_list): New declarations.
8988 * window.c (select_window, Fset_window_start): Use wset_redisplay.
8989 (window_list): Not static any more.
8990 (grow_mini_window, shrink_mini_window): Use fset_redisplay.
8991 * minibuf.c (read_minibuf_unwind): Don't redisplay everything.
8992 * insdel.c (prepare_to_modify_buffer_1): Use bset_redisplay.
8993 * frame.c (Fmake_frame_visible): Don't redisplay everything.
8994 * frame.h (struct frame): Add `redisplay' field.
8995 Move `external_menu_bar' bitfield next to other bit-fields.
8996 (SET_FRAME_GARBAGED): Use fset_redisplay.
8997 (SET_FRAME_VISIBLE): Don't garbage the frame;
8998 Use redisplay_other_windows.
8999 * buffer.h (struct buffer): Add `redisplay' field.
9000 * buffer.c (Fforce_mode_line_update): Pay attention to the `all' flag.
9001 (modify_overlay): Use bset_redisplay.
9002 * alloc.c (gc_sweep): Don't unmark strings while sweeping symbols.
9003
9004 2013-11-28 Eli Zaretskii <eliz@gnu.org>
9005
9006 Support w32 file notifications in batch mode.
9007 * w32proc.c (sys_select): Don't wait on interrupt_handle if it is
9008 invalid (which happens in batch mode). If non-interactive, call
9009 handle_file_notifications to store file notification events in the
9010 input queue. (Bug#15933)
9011
9012 * w32notify.c (send_notifications): Handle FRAME_INITIAL frames as well.
9013
9014 * w32inevt.c (handle_file_notifications): Now external, not static.
9015
9016 * w32term.h (handle_file_notifications): Provide prototype.
9017
9018 * emacs.c (main) [HAVE_W32NOTIFY]: When non-interactive, call
9019 init_crit, since init_display, which does that otherwise, is not
9020 called.
9021
9022 2013-11-27 Glenn Morris <rgm@gnu.org>
9023
9024 * Makefile.in ($(lispsource)/international/charprop.el): New.
9025 (emacs$(EXEEXT)): Depend on charprop.el.
9026
9027 2013-11-27 Eli Zaretskii <eliz@gnu.org>
9028
9029 * fileio.c (Finsert_file_contents): Invalidate buffer caches when
9030 deleting portions of the buffer under non-nil REPLACE argument.
9031 (Bug#15973)
9032
9033 * w32notify.c (Fw32notify_add_watch): If the argument FILE is a
9034 directory, watch it and not its parent.
9035 (add_watch): Allow empty string in FILE.
9036
9037 2013-11-27 Martin Rudalics <rudalics@gmx.at>
9038
9039 * window.c (Fset_window_start, window_resize_apply)
9040 (window_scroll): Reset window_end_valid (Bug#15957).
9041
9042 2013-11-27 Glenn Morris <rgm@gnu.org>
9043
9044 * Makefile.in (leimdir): Now in lisp source directory.
9045 ($(leimdir)/leim-list.el): Just use ../leim .
9046 * epaths.in (PATH_DUMPLOADSEARCH):
9047 * lread.c (load_path_default):
9048 * nsterm.m (ns_load_path): No more leim directory.
9049
9050 2013-11-26 Andreas Schwab <schwab@suse.de>
9051
9052 * .gdbinit (xgettype): Add cast.
9053
9054 2013-11-26 Glenn Morris <rgm@gnu.org>
9055
9056 Preload leim-list.el.
9057 * epaths.in (PATH_DUMPLOADSEARCH): Add leim/.
9058 * callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
9059 is a single directory.
9060
9061 2013-11-25 Paul Eggert <eggert@cs.ucla.edu>
9062
9063 bool-vector-subsetp is now the normal direction (Bug#15912).
9064 * data.c (Fbool_vector_subsetp): Test whether the first argument
9065 is a subset of the second one, not the reverse. Add doc string.
9066
9067 Fix minor problems found by static checking.
9068 * lread.c (load_path_default): Now static.
9069 * textprop.c (text_property_stickiness): Be consistent about the
9070 test used when deciding whether to consider the previous character.
9071 This simplifies the code a bit.
9072
9073 2013-11-25 Stefan Monnier <monnier@iro.umontreal.ca>
9074
9075 * textprop.c (text_property_stickiness): Fix front-stickiness at BOB.
9076
9077 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el.
9078 (syms_of_frame): Don't defsubr them.
9079
9080 2013-11-25 Glenn Morris <rgm@gnu.org>
9081
9082 * lread.c (load_path_default): Change the sense of the argument.
9083 (init_lread): When EMACSLOADPATH is set, do not ignore changes
9084 from dump_path. When it is not, avoid checking dump_path twice.
9085
9086 * lread.c (init_lread): Fix 2013-11-23 goof that was checking
9087 uninstalled dump_path against installed Vload_path. (Bug#15964)
9088
9089 2013-11-24 Stefan Monnier <monnier@iro.umontreal.ca>
9090
9091 Export get_pos_property to Elisp.
9092 * editfns.c (Fget_pos_property): Rename from get_pos_property.
9093 (syms_of_editfns): Export it to Elisp.
9094
9095 * data.c (Fmake_variable_buffer_local): Mention `permanent-local'.
9096
9097 2013-11-23 Romain Francoise <romain@orebokech.com>
9098
9099 * fileio.c (init_fileio): Move `write_region_inhibit_fsync'
9100 initialization here ...
9101 (syms_of_fileio): ... from here.
9102
9103 2013-11-23 Stefan Monnier <monnier@iro.umontreal.ca>
9104
9105 * lread.c (init_lread): Fix int/Lisp_Object mixup.
9106 Please use --enable-check-lisp-object-type.
9107
9108 2013-11-23 Glenn Morris <rgm@gnu.org>
9109
9110 * process.c (get_process): Explicit error for dead buffers.
9111
9112 2013-11-23 Andreas Schwab <schwab@linux-m68k.org>
9113
9114 * process.c (get_process): Check that OBJ is a live buffer. (Bug#15923)
9115
9116 2013-11-23 Glenn Morris <rgm@gnu.org>
9117
9118 Empty elements in EMACSLOADPATH stand for the default. (Bug#12100)
9119 * lread.c (load_path_check): Take path to check as argument.
9120 (load_path_default): New, split from init_lread.
9121 (init_lread): Move calc of default load-path to load_path_default.
9122 Empty elements in EMACSLOADPATH now stand for the default.
9123 (load-path): Doc fix.
9124 * emacs.c (decode_env_path): Add option to treat empty elements
9125 as nil rather than ".".
9126 * callproc.c (init_callproc_1, init_callproc):
9127 * image.c (Vx_bitmap_file_path):
9128 * lisp.h (decode_env_path):
9129 * lread.c (Vsource_directory):
9130 Update for new argument spec of decode_env_path.
9131
9132 2013-11-22 Eli Zaretskii <eliz@gnu.org>
9133
9134 * bidi.c (bidi_find_paragraph_start): Limit the returned positions
9135 to BEGV_BYTE..ZV_BYTE range. (Bug#15951)
9136
9137 2013-11-21 Paul Eggert <eggert@cs.ucla.edu>
9138
9139 Fix some dependency problems that cause unnecessary recompiles.
9140 Reported by RMS in
9141 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00421.html>.
9142 * Makefile.in (OLDXMENU_TARGET, OLDXMENU, OLDXMENU_DEPS)
9143 (really-lwlib, really-oldXMenu, stamp-oldxmenu)
9144 (../src/$(OLDXMENU), $(OLDXMENU)): Remove.
9145 (temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu.
9146 ($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets.
9147 (boostrap-clean): No need to remove stamp-oldxmenu.
9148
9149 Fix recently introduced bool vector overrun.
9150 This was due to an optimization that went awry.
9151 Reported by Glenn Morris in
9152 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00622.html>.
9153 * alloc.c (make_uninit_bool_vector): Don't allocate a dummy word
9154 for empty vectors, undoing the 2013-11-18 change.
9155 * data.c (bool_vector_binop_driver): Rely on this.
9156 Fix bug that occasionally overran the destination.
9157 * lisp.h (struct Lisp_Bool_vector): Document this.
9158
9159 2013-11-20 Jan Djärv <jan.h.d@swipnet.se>
9160
9161 * nsterm.m (init, run, stop:): Enable again. stop calls super stop
9162 to handle dialogs.
9163
9164 * nsterm.m (init, run, stop:): Comment out for now, does not work
9165 with dialogs.
9166
9167 2013-11-19 Paul Eggert <eggert@cs.ucla.edu>
9168
9169 * charset.c (syms_of_charset): Don't read past end of string.
9170
9171 2013-11-19 Glenn Morris <rgm@gnu.org>
9172
9173 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Doc fixes.
9174
9175 2013-11-19 Brian Jenkins <brian@brianjenkins.org> (tiny change)
9176
9177 Add hooks to run on gaining/losing focus. (Bug#15029)
9178 * frame.c (Qfocus_in_hook, Qfocus_out_hook): New static lisp objects.
9179 (Fhandle_focus_in, Fhandle_focus_out): Run focus hooks.
9180 (syms_of_frame): Add focus-in-hook, focus-out-hook.
9181
9182 2013-11-18 Paul Eggert <eggert@cs.ucla.edu>
9183
9184 * data.c (bool_vector_binop_driver): Rename locals for sanity's sake.
9185 The old names predated the API change that put destination at end.
9186
9187 Improve API of recently-added bool vector functions (Bug#15912).
9188 The old API had (bool-vector-count-matches A B)
9189 and (bool-vector-count-matches-at A B I), which gave the
9190 misleading impression that the two functions were variants, one
9191 with a location I. The new API has (bool-vector-count-population A)
9192 and (bool-vector-count-consecutive A B I) to make the distinction
9193 clearer. The first function no longer has a B argument, since the
9194 caller can easily determine the number of nils if the length and
9195 number of ts is known.
9196 * data.c (Fbool_vector_count_population): Rename from
9197 bool_vector_count_matches, and accept just 1 argument.
9198 (Fbool_vector_count_consecutive): Rename from
9199 Fbool_vector_count_matches_at.
9200
9201 Always allocate at least one bits_word per bool vector.
9202 See Daniel Colascione in:
9203 http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00518.html
9204 * alloc.c (make_uninit_bool_vector): Always allocate at least one word.
9205 * data.c (bool_vector_binop_driver): Rely on this. Tune.
9206 * lisp.h (struct Lisp_Bool_vector): Document this.
9207
9208 2013-11-18 Eli Zaretskii <eliz@gnu.org>
9209
9210 * insdel.c (invalidate_buffer_caches): New function, consolidated
9211 from part of prepare_to_modify_buffer.
9212 (insert_from_gap, prepare_to_modify_buffer):
9213 * coding.c (code_convert_region, code_convert_string):
9214 Call invalidate_buffer_caches. (Bug#15841)
9215
9216 * lisp.h (invalidate_buffer_caches): Add prototype.
9217
9218 2013-11-17 Eli Zaretskii <eliz@gnu.org>
9219
9220 * w32term.c (x_update_window_end): Don't invalidate the entire
9221 mouse-highlight info, just signal frame_up_to_date_hook that mouse
9222 highlight needs to be redisplayed. (Bug#15913)
9223
9224 2013-11-17 Paul Eggert <eggert@cs.ucla.edu>
9225
9226 * lisp.h (DEBUGGER_SEES_C_MACROS): Remove.
9227
9228 2013-11-16 Eli Zaretskii <eliz@gnu.org>
9229
9230 * doc.c (Fsubstitute_command_keys): Inhibit modification hooks
9231 while we are using Vprin1_to_string_buffer.
9232
9233 * keymap.c (describe_map): Don't crash if PT is 1 both before and
9234 after inserting the description string. (Bug#15907)
9235
9236 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
9237
9238 * data.c: Work around bogus GCC diagnostic about shift count.
9239 Reported by Eli Zaretskii in
9240 <http://lists.gnu.org/archive/html/emacs-devel/2013-11/msg00489.html>.
9241 (pre_value): New function.
9242 (count_trailing_zero_bits): Use it.
9243
9244 2013-11-15 Eli Zaretskii <eliz@gnu.org>
9245
9246 * lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically
9247 assume C macros are not supported even under -g3 in these old GCC
9248 versions.
9249
9250 2013-11-15 Leo Liu <sdl.web@gmail.com>
9251
9252 * minibuf.c (Ftry_completion, Fall_completions)
9253 (Ftest_completion): Use FUNCTIONP. (Bug#15889)
9254
9255 2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
9256
9257 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END):
9258 Define to empty if DEBUGGER_SEES_C_MACROS is defined.
9259 This avoids placing unnecessary constants into the Emacs code.
9260
9261 2013-11-14 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
9262
9263 * keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
9264 for Cygwin w32 build.
9265
9266 * xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
9267 for Cygwin w32 build. (Bug#15892)
9268
9269 2013-11-14 Paul Eggert <eggert@cs.ucla.edu>
9270
9271 Simplify, port and tune bool vector implementation.
9272 * alloc.c (bool_vector_exact_payload_bytes)
9273 (bool_vector_payload_bytes): Remove.
9274 (bool_vector_fill): Return its argument.
9275 * alloc.c (bool_vector_fill):
9276 * lread.c (read1):
9277 * print.c (print_object):
9278 Simplify by using bool_vector_bytes.
9279 * alloc.c (make_uninit_bool_vector):
9280 New function, broken out from Fmake_bool_vector.
9281 (Fmake_bool_vector): Use it. Use tail call.
9282 (make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
9283 * data.c (BITS_PER_ULL): New constant.
9284 (ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
9285 if long long versions don't exist.
9286 (shift_right_ull): New function.
9287 (count_one_bits_word): New function, replacing popcount_bits_word
9288 macro. Don't assume that bits_word is no wider than long long.
9289 (count_one_bits_word, count_trailing_zero_bits):
9290 Don't assume that bits_word is no wider than long long.
9291 * data.c (bool_vector_binop_driver, bool_vector_not):
9292 * fns.c (Fcopy_sequence):
9293 * lread.c (read1):
9294 Create an uninitialized destination, to avoid needless work.
9295 (internal_equal): Simplify.
9296 (Ffillarray): Prefer tail call.
9297 * data.c (bool_vector_binop_driver): Don't assume bit vectors always
9298 contain at least one word.
9299 (bits_word_to_host_endian): Prefer if to #if. Don't assume
9300 chars are narrower than ints.
9301 * data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
9302 * fns.c (Fcopy_sequence):
9303 Simplify and tune.
9304 * lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
9305 Don't try to port to hosts where bits_word values have holes; the
9306 code wouldn't work there anyway. Verify this assumption, though.
9307 (bool_vector_bytes): New function.
9308 (make_uninit_bool_vector): New decl.
9309 (bool_vector_fill): Now returns Lisp_Object.
9310
9311 * xfns.c (xic_create_fontsetname):
9312 * xrdb.c (gethomedir): Prefer tail calls.
9313
9314 2013-11-12 Paul Eggert <eggert@cs.ucla.edu>
9315
9316 * xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper,
9317 Qmeta, and Qsuper. This is safer, and it's what w32fns.c does.
9318
9319 * buffer.c (Fforce_mode_line_update): Don't fall off end of function
9320 that requires a return value.
9321 (Fset_buffer_modified_p): Take advantage of this change to do
9322 a tail call.
9323
9324 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
9325
9326 * buffer.c (Frestore_buffer_modified_p): Sync it with
9327 Fset_buffer_modified_p.
9328 (Fforce_mode_line_update): New function, moved from subr.el.
9329 (Fset_buffer_modified_p): Use them.
9330 (syms_of_buffer): Defsubr Fforce_mode_line_update.
9331
9332 2013-11-11 Paul Eggert <eggert@cs.ucla.edu>
9333
9334 * search.c (find_newline): Rewrite to prefer offsets to pointers.
9335 This avoids undefined behavior when subtracting pointers into
9336 different aways. On my platform it also makes the code a tad
9337 smaller and presumably faster.
9338
9339 2013-11-11 Stefan Monnier <monnier@iro.umontreal.ca>
9340
9341 * keyboard.c (command_loop_1): Use region-extract-function.
9342 * insdel.c (Qregion_extract_function): Not static any more (can we
9343 stop pretending that these vars can benefit from being marked static?).
9344
9345 2013-11-09 Eli Zaretskii <eliz@gnu.org>
9346
9347 * search.c (find_newline): If buffer text is relocated during the
9348 "dumb loop", adjust C pointers into buffer text to follow suit.
9349 (Bug#15841)
9350
9351 2013-11-09 Łukasz Stelmach <stlman@poczta.fm> (tiny change)
9352
9353 * gtkutil.c (xg_check_special_colors): Use rgb: instead of rgbi:
9354 for conversion (Bug#15837).
9355
9356 2013-11-09 Eli Zaretskii <eliz@gnu.org>
9357
9358 * fileio.c (Finsert_file_contents): Invalidate the newline cache
9359 for the entire range of inserted characters. (Bug#15841)
9360
9361 2013-11-08 Jan Djärv <jan.h.d@swipnet.se>
9362
9363 * xfaces.c (lface_fully_specified_p): Let distant-foreground be
9364 unspecified.
9365 (realize_default_face): Remove assignment to distant-foreground if
9366 unspecified (Bug#15815).
9367
9368 2013-11-08 Eli Zaretskii <eliz@gnu.org>
9369
9370 * xdisp.c (message_dolog): Make sure the *Messages* buffer has its
9371 cache-long-scans disabled, since we don't want to call
9372 prepare_to_modify_buffer (in insert_1_both) for each message we
9373 display.
9374
9375 * buffer.h (bset_cache_long_scans): New INLINE function, moved
9376 from buffer.c. Improve commentary to the buffer field setter
9377 functions.
9378
9379 * buffer.c (bset_cache_long_scans): Static function deleted.
9380 Improve commentary to the buffer field setter functions.
9381 (init_buffer_once): Default for cache-long-scans changed to t.
9382 (Bug#15797)
9383
9384 2013-11-08 Paul Eggert <eggert@cs.ucla.edu>
9385
9386 * gmalloc.c (special_realloc, calloc, mallochook): Use tail calls.
9387
9388 * chartab.c (make_sub_char_table): Fix size typo (Bug#15825).
9389 This bug was introduced in my 2013-06-21 change, and caused
9390 struct Lisp_Sub_Char_Table objects to be given too many slots,
9391 which broke 'make -C admin/unidata'.
9392
9393 2013-11-07 Jan Djärv <jan.h.d@swipnet.se>
9394
9395 Import changes from mac-port 4.5.
9396 * macfont.m (mac_font_copy_default_descriptors_for_language)
9397 (mac_font_copy_default_name_for_charset_and_languages): Declare.
9398 (cf_charset_table): big-5-0 has uniquifier 0x4EDC.
9399 (macfont_language_default_font_names): New.
9400 (macfont_list): Rearrange language/charset code.
9401 (macfont_close): Don't check for macfont_info->cache.
9402 (mac_ctfont_create_preferred_family_for_attributes): New font
9403 selection code, call
9404 mac_font_copy_default_name_for_charset_and_languages.
9405 (mac_font_copy_default_descriptors_for_language)
9406 (mac_font_copy_default_name_for_charset_and_languages): New functions.
9407
9408 * macfont.h (kCTVersionNumber10_9): Define if not defined.
9409
9410 2013-11-07 Paul Eggert <eggert@cs.ucla.edu>
9411
9412 Port to C11 aligned_alloc, and fix some integer overflows.
9413 * alloc.c (USE_ALIGNED_ALLOC): New symbol.
9414 (USE_POSIX_MEMALIGN): Remove. All uses replaced with USE_ALIGNED_ALLOC,
9415 and use of posix_memalign replaced with aligned_alloc.
9416 (aligned_alloc): New function, defined or declared as needed.
9417 * conf_post.h (HAVE_POSIX_MEMALIGN) [DARWIN_OS]:
9418 Don't undef; configure.ac now does this.
9419 * gmalloc.c (aligned_alloc) [MSDOS]: New decl.
9420 (calloc, aligned_alloc): Check for integer overflow.
9421 (aligned_alloc): Rename from memalign. All uses changed.
9422 (memalign): New function, an alias for aligned_alloc.
9423
9424 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
9425
9426 * xdisp.c (redisplay_internal): Fix typo in last change.
9427
9428 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
9429
9430 * regex.c: Fix --enable-gcc-warning glitch with GCC 4.5.2.
9431
9432 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
9433
9434 * xdisp.c (syms_of_xdisp): New vars redisplay--all-windows-cause and
9435 redisplay--mode-lines-cause.
9436 (redisplay_internal): Keep them uptodate. Remove redundant check of
9437 buffer_shared_and_changed.
9438 * *.[chm]: Number every assignment to update_mode_lines so we
9439 can track why it is set.
9440
9441 2013-11-06 Eli Zaretskii <eliz@gnu.org>
9442
9443 * editfns.c (Fformat_time_string): Doc fix. (Bug#15816)
9444
9445 2013-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
9446
9447 * *.[chm]: Number every assignment to windows_or_buffers_changed so we
9448 can track why it is set.
9449
9450 2013-11-06 Paul Eggert <eggert@cs.ucla.edu>
9451
9452 Integer-related fixes for term.c etc.
9453 * dispextern.h (face_tty_specified_color): New function.
9454 * term.c (turn_on_face): Don't rely on undefined behavior when
9455 assigning an out-of-range value to 'long'.
9456 Simplify test for toggling highlight.
9457 (tty_capable_p): Omit last two (unused) args. All callers changed.
9458 * term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
9459 (read_menu_input, tty_menu_activate, tty_menu_show):
9460 * xfaces.c (x_supports_face_attributes_p)
9461 (tty_supports_face_attributes_p):
9462 Use bool for boolean. All callers changed.
9463 (tty_supports_face_attributes_p): Omit defaults for color indices;
9464 no longer needed. Simplify tail call.
9465
9466 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
9467
9468 * xdisp.c (prepare_menu_bars): Mark static.
9469 * lisp.h (prepare_menu_bars): Don't declare.
9470 * xselect.c (x_handle_selection_clear):
9471 * callproc.c (call_process): Remove redundant call to prepare_menu_bars.
9472
9473 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
9474
9475 * keyboard.c (Fcommand_error_default_function): Fix pointer signedness
9476 glitch. Eliminate 'sz' prefix; Hungarian notation is not helpful here.
9477
9478 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
9479
9480 * keyboard.c (Fcommand_error_default_function): Rename from
9481 Fdefault_error_output.
9482
9483 2013-11-05 Jarek Czekalski <jarekczek@poczta.onet.pl> (tiny change)
9484
9485 * keyboard.c (Fdefault_error_output): New function, extracted from
9486 cmd_error_internal.
9487 (syms_of_keyboard): Use it for Vcommand_error_function.
9488
9489 2013-11-05 Stefan Monnier <monnier@iro.umontreal.ca>
9490
9491 * eval.c (handlerlist_sentinel): New variable (bug#15802).
9492 (init_eval): Use it to ensure handlerlist is non-NULL.
9493 (unwind_to_catch): Make sure we never set handlerlist to NULL.
9494 (Fsignal): Adjust NULLness test of handlerlist.
9495 * lisp.h (PUSH_HANDLER): Assume handlerlist is non-NULL.
9496
9497 2013-11-05 Eli Zaretskii <eliz@gnu.org>
9498
9499 * callproc.c (call_process): Call prepare_to_modify_buffer before
9500 decoding text read from the sub-process, as the decoded stuff will
9501 be inserted into the buffer. This will invalidate the various
9502 caches maintained for the buffer. (Bug#15148)
9503
9504 2013-11-05 Xue Fuqiao <xfq.free@gmail.com>
9505
9506 * xdisp.c (syms_of_xdisp): Mention the active display table in doc
9507 string of glyphless-char-display.
9508
9509 2013-11-05 Jan Djärv <jan.h.d@swipnet.se>
9510
9511 * nsfns.m (ns_get_name_from_ioreg): New function.
9512 (ns_screen_name): Don't use deprecated CGDisplayIOServicePort on
9513 OSX >= 10.9. Use ns_get_name_from_ioreg.
9514
9515 2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
9516
9517 Simplify and port recent bool vector changes.
9518 * alloc.c (ROUNDUP): Move here from lisp.h, since it's now used
9519 only in this file. Use a more-efficient implementation if the
9520 second argument is a power of 2.
9521 (ALIGN): Rewrite in terms of ROUNDUP. Make it a function.
9522 Remove no-longer-necessary compile-time checks.
9523 (bool_vector_exact_payload_bytes): New function.
9524 (bool_vector_payload_bytes): Remove 2nd arg; callers that need
9525 exact payload changed to call the new function. Do not assume
9526 that the arg or result fits in ptrdiff_t.
9527 (bool_vector_fill): New function.
9528 (Fmake_bool_vector): Use it. Don't assume bit counts fit
9529 in ptrdiff_t.
9530 (vroundup_ct): Don't assume arg fits in size_t.
9531 * category.c (SET_CATEGORY_SET): Remove. All callers now just
9532 invoke set_category_set.
9533 (set_category_set): 2nd arg is now EMACS_INT and 3rd is now bool.
9534 All callers changed. Use bool_vector_set.
9535 * category.h (XCATEGORY_SET): Remove; no longer needed.
9536 (CATEGORY_MEMBER): Now a function. Rewrite in terms of
9537 bool_vector_bitref.
9538 * data.c (Faref): Use bool_vector_ref.
9539 (Faset): Use bool_vector_set.
9540 (bits_word_to_host_endian): Don't assume you can shift by CHAR_BIT.
9541 (Fbool_vector_not, Fbool_vector_count_matches)
9542 (Fbool_vector_count_matches_at): Don't assume CHAR_BIT == 8.
9543 * fns.c (concat): Use bool_vector_ref.
9544 (Ffillarray): Use bool_vector_fill.
9545 (mapcar1): Use bool_vector_ref.
9546 (sxhash_bool_vector): Hash words, not bytes.
9547 * lisp.h (BOOL_VECTOR_BITS_PER_CHAR): Now a macro as well as
9548 a constant, since it's now used in #if.
9549 (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD): Fall back on
9550 unsigned char on unusual architectures, so that we no longer
9551 assume that the number of bits per bits_word is a power of two or
9552 is a multiple of 8 or of CHAR_BIT.
9553 (Qt): Add forward decl.
9554 (struct Lisp_Bool_Vector): Don't assume EMACS_INT is aligned
9555 at least as strictly as bits_word.
9556 (bool_vector_data, bool_vector_uchar_data): New accessors.
9557 All data structure accesses changed to use them.
9558 (bool_vector_words, bool_vector_bitref, bool_vector_ref)
9559 (bool_vector_set): New functions.
9560 (bool_vector_fill): New decl.
9561 (ROUNDUP): Move to alloc.c as described above.
9562
9563 Fix recent gnutls changes.
9564 * gnutls.c (Fgnutls_boot): Don't assume C99.
9565 * process.c (wait_reading_process_output): Fix typo in recent change.
9566
9567 2013-11-05 Teodor Zlatanov <tzz@lifelogs.com>
9568
9569 * process.c (wait_reading_process_output, read_process_output)
9570 (send_process): Check gnutls_state is not NULL.
9571
9572 * gnutls.c (emacs_gnutls_handle_error): Adjust log level for EAGAIN.
9573 (Fgnutls_boot): Set process gnutls_p later, after initialization.
9574
9575 2013-11-04 Jan Djärv <jan.h.d@swipnet.se>
9576
9577 * nsterm.m (init, run, stop:): New methods in EmacsApp for
9578 OSX >= 10.9 to prevent memory leak of GCD dispatch source.
9579
9580 * nsterm.h (EmacsApp): Add shouldKeepRunning and isFirst for
9581 OSX >= 10.9.
9582
9583 * nsfns.m (Fx_create_frame): Fix memory leak.
9584
9585 * macfont.m (CG_SET_FILL_COLOR_WITH_GC_FOREGROUND)
9586 (CG_SET_FILL_COLOR_WITH_GC_BACKGROUND)
9587 (CG_SET_STROKE_COLOR_WITH_GC_FOREGROUND): Fix memory leak.
9588
9589 2013-11-04 Eli Zaretskii <eliz@gnu.org>
9590
9591 * xdisp.c (message3_nolog, message_with_string): Encode the string
9592 before writing it to the terminal in a non-interactive session.
9593
9594 * lread.c (openp): If both FILENAME and SUFFIX are unibyte, make
9595 sure we concatenate them into a unibyte string.
9596
9597 * fileio.c (make_temp_name): Encode PREFIX, and decode the
9598 resulting temporary name before returning it to the caller.
9599 (Fexpand_file_name): If NAME is pure-ASCII and DEFAULT_DIRECTORY
9600 is a unibyte string, convert NAME to a unibyte string to ensure
9601 that the result is also a unibyte string.
9602
9603 * emacs.c (init_cmdargs): Use build_unibyte_string to make sure we
9604 create unibyte strings from default paths and directory/file
9605 names.
9606
9607 * coding.h (ENCODE_FILE): Do not attempt to encode a unibyte
9608 string.
9609
9610 * callproc.c (init_callproc): Use build_unibyte_string to make
9611 sure we create unibyte strings from default paths and
9612 directory/file names.
9613
9614 * buffer.c (init_buffer): Don't store default-directory of
9615 *scratch* in multibyte form. The original problem which led to
9616 that is described in
9617 http://lists.gnu.org/archive/html/emacs-pretest-bug/2004-11/msg00532.html,
9618 but it was solved long ago. (Bug#15260)
9619
9620 2013-11-04 Paul Eggert <eggert@cs.ucla.edu>
9621
9622 Port to stricter C99 platforms.
9623 Especially, C99 prohibits nesting a struct X inside struct Y if
9624 struct X has a flexible array member.
9625 * alloc.c (struct sdata): New type.
9626 (sdata): Implement in terms of struct sdata.
9627 Remove u member; all uses replaced by next_vector, set_next_vector.
9628 (SDATA_SELECTOR, SDATA_DATA, SDATA_DATA_OFFSET): Adjust to sdata change.
9629 (SDATA_DATA_OFFSET): Now a constant, not a macro.
9630 (struct sblock): Rename first_data member to data, which is now
9631 a flexible array member. All uses changed.
9632 (next_vector, set_next_vector, large_vector_vec): New functions.
9633 (vector_alignment): New constant.
9634 (roundup_size): Make it a multiple of ALIGNOF_STRUCT_LISP_VECTOR, too.
9635 (struct large-vector): Now merely a NEXT member, since the old approach
9636 ran afoul of stricter C99. All uses changed to use
9637 large_vector_vec or large_vector_offset.
9638 (large_vector_offset): New constant.
9639 * dispnew.c: Include tparam.h, for tgetent.
9640 Do not include term.h; no longer needed.
9641 * gnutls.c (Fgnutls_boot): Don't continue after calling a _Noreturn.
9642 * lisp.h (ENUM_BF) [__SUNPRO_C && __STDC__]: Use unsigned int.
9643 (struct Lisp_Vector): Use a flexible array member for contents,
9644 instead of a union with a member that is an array of size 1.
9645 All uses changed.
9646 (ALIGNOF_STRUCT_LISP_VECTOR): New constant, to make up for the
9647 fact that the struct no longer contains a union.
9648 (struct Lisp_Misc_Any, struct Lisp_Marker, struct Lisp_Overlay)
9649 (struct Lisp_Save_Value, struct Lisp_Free):
9650 Use unsigned, not int, for spacers, to avoid c99 warning.
9651 (union specbinding): Use unsigned, not bool, for bitfield, as
9652 bool is not portable to pre-C99 hosts.
9653
9654 2013-11-04 Glenn Morris <rgm@gnu.org>
9655
9656 * emacs.c (usage_message): Mention that `-L :...' appends.
9657
9658 2013-11-02 Glenn Morris <rgm@gnu.org>
9659
9660 * Makefile.in (abs_builddir): Remove.
9661 (bootstrap_exe): Use relative filename.
9662
9663 Use relative filenames in TAGS files.
9664 * Makefile.in (abs_srcdir): Remove it again.
9665 (.PHONY): Remove frc.
9666 (maintainer-clean): No more TAGS-LISP file.
9667 (TAGS): Pass relative file names to etags.
9668 (../lisp/TAGS): Rename from TAGS-LISP. Work in ../lisp.
9669
9670 * Makefile.in (abs_srcdir): New, set by configure.
9671 (lispdir): Remove.
9672 (maintainer-clean): Remove pointless echo. That should be in the
9673 top-level Makefile, if anywhere. Delete TAGS-LISP.
9674 (extraclean): No s/ and m/ directories for some time.
9675 (TAGS): Also depend on ctagsfiles3.
9676 Remove no-longer-defined S_FILE.
9677 Pass absolute filenames to etags once more.
9678 (TAGS-LISP): Replace lispdir with its expansion.
9679 (TAGS-LISP, $(lwlibdir)/TAGS): Correctly pass ETAGS to sub-makes.
9680 ($(lwlibdir)/TAGS): Remove useless subshell, check cd return value.
9681
9682 2013-11-02 Jan Djärv <jan.h.d@swipnet.se>
9683
9684 * xfaces.c (check_lface_attrs, realize_default_face):
9685 Add LFACE_DISTANT_FOREGROUND_INDEX (Bug#15788).
9686 (realize_default_face): Set DISTANT_FOREGROUND to unspecified_fg.
9687
9688 2013-11-02 Paul Eggert <eggert@cs.ucla.edu>
9689
9690 * emacs.c (original_pwd): Remove global var by making it local.
9691 (init_cmdargs): New arg ORIGINAL_PWD; caller changed.
9692
9693 2013-11-01 Jan Djärv <jan.h.d@swipnet.se>
9694
9695 * xfaces.c: Declare color_distance.
9696 (QCdistant_foreground): New variable.
9697 (NEAR_SAME_COLOR_THRESHOLD): New define.
9698 (load_color2): New function.
9699 (load_color): Call load_color2.
9700 (load_face_colors): Call load_color2 and if distant-color is specified
9701 calculate distant and use distant-color if colors are near.
9702 (LFACE_DISTANT_FOREGROUND): New define.
9703 (merge_face_ref, Finternal_set_lisp_face_attribute)
9704 (Finternal_get_lisp_face_attribute)
9705 (x_supports_face_attributes_p): Handle distant-foreground similar to
9706 foreground.
9707 (syms_of_xfaces): DEFSYM QCdistant_foreground.
9708
9709 * dispextern.h (lface_attribute_index):
9710 Add LFACE_DISTANT_FOREGROUND_INDEX.
9711
9712 2013-11-01 Claudio Bley <claudio.bley@googlemail.com>
9713
9714 * image.c (pbm_next_char): New function.
9715 See http://netpbm.sourceforge.net/doc/pbm.html for the details.
9716 (pbm_scan_number): Use it.
9717 (Qlibjpeg_version): New variable.
9718 (syms_of_image): DEFSYM and initialize it.
9719
9720 2013-10-31 Jan Djärv <jan.h.d@swipnet.se>
9721
9722 * emacs.c (main): Skip -psn args on OSX even if ! isatty (0).
9723
9724 2013-10-31 Glenn Morris <rgm@gnu.org>
9725
9726 * emacs.c (original_pwd): New char.
9727 (main): If using --chdir, store original_pwd.
9728 (init_cmdargs): When setting Vinvocation_directory based on a
9729 relative argv[0], use original_pwd if set. (Bug#15768)
9730
9731 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
9732
9733 * keyboard.c (command_loop_1): If command is nil, call `undefined'.
9734
9735 2013-10-29 Paul Eggert <eggert@cs.ucla.edu>
9736
9737 * insdel.c: Fix minor problems found by static checking.
9738 (Qregion_extract_function): Now static.
9739 (prepare_to_modify_buffer_1): Remove unused locals.
9740
9741 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
9742
9743 * xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function.
9744 (syms_of_xdisp): Declare pre-redisplay-function.
9745 (markpos_of_region): Remove function.
9746 (init_iterator, compute_stop_pos, handle_face_prop)
9747 (face_before_or_after_it_pos, reseat_to_string)
9748 (get_next_display_element, window_buffer_changed)
9749 (redisplay_internal, try_cursor_movement, redisplay_window)
9750 (try_window_reusing_current_matrix, try_window_id, display_line)
9751 (note_mode_line_or_margin_highlight, note_mouse_highlight)
9752 (display_string, mouse_face_from_buffer_pos): Remove region handling.
9753 * window.h (struct window): Remove field `region_showing'.
9754 * dispextern.h (struct it): Remove region_beg/end_charpos.
9755 (face_at_buffer_position, face_for_overlay_string)
9756 (face_at_string_position): Update prototypes.
9757 * xfaces.c (face_at_buffer_position, face_for_overlay_string)
9758 (face_at_string_position): Remove `region_beg' and `region_end' args.
9759 * fontset.c (Finternal_char_font):
9760 * font.c (font_at, font_range): Adjust calls accordingly.
9761 * insdel.c (Qregion_extract_function): New var.
9762 (syms_of_insdel): Initialize it.
9763 (prepare_to_modify_buffer_1): Use it.
9764
9765 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
9766
9767 Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'.
9768 * ftxfont.c (ftxfont_get_gcs):
9769 * gtkutil.c (xg_set_widget_bg, xg_set_background_color):
9770 * xfaces.c (x_free_colors, x_free_dpy_colors)
9771 (x_create_gc, unload_color):
9772 * xselect.c (x_property_data_to_lisp):
9773 * xsettings.c (parse_settings):
9774 * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color)
9775 (get_bits_and_offset): Adjust definition.
9776 * frame.c (XParseGeometry): Adjust locals.
9777 * lisp.h (toplevel): Adjust EMACS_UINT type definition.
9778 * regex.h (toplevel): Likewise for reg_syntax_t.
9779
9780 2013-10-29 Stefan Monnier <monnier@iro.umontreal.ca>
9781
9782 * eval.c (run_hook_with_args): Use FUNCTIONP.
9783
9784 2013-10-29 Dmitry Antipov <dmantipov@yandex.ru>
9785
9786 * xterm.h (struct x_output): For 'black_relief' and 'white_relief'
9787 fields, drop 'allocated_p' member and use -1 for uninitialized value.
9788 * w32term.h (struct w32_output): Similarly but do not use -1 because...
9789 * xfaces.c (unload_color) [HAVE_X_WINDOWS]: ...this function is a no-op
9790 on MS-Windows anyway.
9791 (free_face_colors): Define only if HAVE_X_WINDOWS and...
9792 (free_realized_face): ...adjust user.
9793 * xfns.c (Fx_create_frame, x_create_tip_frame): Initialize black and
9794 white relief pixels to -1.
9795 * xterm.c (x_setup_relief_color, x_free_frame_resources): Adjust users.
9796 * w32term.c (w32_setup_relief_color, x_free_frame_resources): Likewise.
9797 * dispextern.h (unload_color): Move prototype under HAVE_X_WINDOWS.
9798
9799 2013-10-28 Paul Eggert <eggert@cs.ucla.edu>
9800
9801 * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static.
9802 * xfaces.c (load_pixmap): Omit last two args, which are always NULL
9803 in practice now. All callers changed.
9804
9805 2013-10-28 Dmitry Antipov <dmantipov@yandex.ru>
9806
9807 * dispextern.h (struct face): Use bitfields for 'underline_type'
9808 and 'box' members. Remove set-but-unused members 'pixmap_w' and
9809 'pixmap_h'. If not HAVE_WINDOW_SYSTEM, also remove dummy
9810 'stipple' member. Move 'lface' member up to help...
9811 * xfaces.c (make_realized_face): ...this function to find and
9812 clear just the members that need clearing.
9813 (load_face_colors, realize_x_face):
9814 * xdisp.c (extend_face_to_end_of_line): Adjust user.
9815
9816 2013-10-27 Dmitry Antipov <dmantipov@yandex.ru>
9817
9818 * xftfont.c (struct xftfont_info): Remove set-but-unused
9819 'screen' member.
9820 (xftfont_open): Adjust user.
9821 (xftfont_get_colors): Remove useless prototype.
9822
9823 2013-10-26 Eli Zaretskii <eliz@gnu.org>
9824
9825 * emacs.c (Fdump_emacs): Encode FILENAME and SYMFILE arguments
9826 before passing them to 'unexec'. (Bug#15260)
9827
9828 2013-10-26 Xue Fuqiao <xfq.free@gmail.com>
9829
9830 * fringe.c (set_fringe_bitmap_face): Add usage note from lispref.
9831
9832 2013-10-25 Eli Zaretskii <eliz@gnu.org>
9833
9834 * w32uniscribe.c (uniscribe_close): Adjust the argument list to
9835 the changed signature of the font driver's 'close' method.
9836
9837 * w32font.h (w32font_close): Adjust the prototype to the change in
9838 function definition.
9839
9840 * w32font.c (w32font_close): Reintroduce deleted declaration of i.
9841
9842 * w32uniscribe.c (uniscribe_close): Adapt the call to
9843 w32font_close to its new prototype.
9844
9845 2013-10-25 Dmitry Antipov <dmantipov@yandex.ru>
9846
9847 Omit unused frame argument of font API's close function.
9848 * font.h (struct font): Drop frame argument. Adjust comment.
9849 * font.c (font_clear_cache, font_close_object): Adjust users.
9850 * ftfont.c (ftfont_close):
9851 * ftxfont.c (ftxfont_close):
9852 * macfont.m (macfont_close):
9853 * nsfont.m (nsfont_close):
9854 * w32font.c (w32font_close):
9855 * xfont.c (xfont_close):
9856 * xftfont.c (xftfont_close): Adjust driver-specific close functions,
9857 tweak comments and make functions safe if called more than once for
9858 the same font object.
9859
9860 Perform font-specific cleanup when font object is swept by GC. See
9861 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00740.html.
9862 * alloc.c (cleanup_vector): New function.
9863 (sweep_vector): Call it for each reclaimed vector object.
9864 * font.h (struct font): Adjust comment.
9865
9866 2013-10-24 Glenn Morris <rgm@gnu.org>
9867
9868 * Makefile.in (abs_top_srcdir): New, set by configure.
9869
9870 2013-10-23 Dmitry Antipov <dmantipov@yandex.ru>
9871
9872 Adjust recent font-related changes to fix bug#15686.
9873 * alloc.c (mark_object) [HAVE_WINDOW_SYSTEM]: If marked frame
9874 is a live window system frame, mark its default font too.
9875
9876 2013-10-23 Glenn Morris <rgm@gnu.org>
9877
9878 * Makefile.in (RUN_TEMACS): Make relative (again).
9879 ($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
9880 (bootstrap-emacs$(EXEEXT)):
9881 Quote entities that might contain whitespace.
9882
9883 2013-10-23 Paul Eggert <eggert@cs.ucla.edu>
9884
9885 Port to Solaris 10 and its bundled GCC. Reported by Timothy C. Burt.
9886 * floatfns.c (isfinite, isnan): Redefine unconditionally.
9887
9888 2013-10-21 Dmitry Antipov <dmantipov@yandex.ru>
9889
9890 Do not allow font caches to grow too large.
9891 * alloc.c (compact_font_cache_entry, compact_font_caches):
9892 New functions or stub if not HAVE_WINDOW_SYSTEM.
9893 (compact_undo_list): Factor out from Fgarbage_collect.
9894 Add comment.
9895 (mark_face_cache): Mark face font. Move down to avoid
9896 extra prototypes.
9897 (mark_terminals): Do not mark font cache here.
9898 (Fgarbage_collect): Call compaction functions described
9899 above. Adjust comment.
9900
9901 2013-10-20 Jan Djärv <jan.h.d@swipnet.se>
9902
9903 * emacs.c (main): On Cocoa, if GUI session and 0 is not a tty,
9904 chdir to HOME (bug#15607).
9905
9906 * nsterm.m (Qcocoa, Qgnustep): New variables.
9907 (syms_of_nsterm): Defsym Qcocoa, Qgnustep. Fprovide appropriate one.
9908 (ns_get_color): Make selection color work for GNUstep also.
9909
9910 2013-10-18 Eli Zaretskii <eliz@gnu.org>
9911
9912 * keyboard.c (make_lispy_event): Remove GPM-specific code that
9913 handles mouse clicks. Instead, let GPM use the same code as all
9914 the other mice use. See the discussion starting at
9915 http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00521.html
9916 for the details of the problem with the menu bar this fixes.
9917
9918 2013-10-18 Dmitry Antipov <dmantipov@yandex.ru>
9919
9920 Remove port-specific display name lists to avoid extra
9921 complexity and data duplication with display info lists.
9922 * xterm.h (x_display_name_list): Remove declaration.
9923 * xterm.c (x_display_name_list): Remove.
9924 (x_term_init, x_delete_display, syms_of_xterm): Adjust users.
9925 * xfns.c (x_display_info_for_name, Fx_display_list):
9926 Likewise. Use x_display_list where appropriate.
9927 * w32term.h (w32_display_name_list): Remove declaration.
9928 * w32term.c (w32_display_name_list): Remove.
9929 (w32_initialize_display_info, x_delete_display, syms_of_w32term):
9930 Adjust users.
9931 * w32fns.c (x_display_info_for_name, Fx_display_list):
9932 Likewise. Use x_display_list where appropriate.
9933 * nsterm.h (ns_display_name_list): Remove declaration.
9934 * nsterm.m (ns_display_name_list): Remove.
9935 (ns_term_init, syms_of_nsterm): Adjust users.
9936 * nsfns.m (ns_display_info_for_name, Fx_display_list):
9937 Likewise. Use x_display_list where appropriate.
9938 * termhooks.h (TERMINAL_FONT_CACHE): New macro.
9939 * alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER.
9940 (mark_terminals): Mark per-terminal font cache.
9941
9942 2013-10-17 Barry O'Reilly <gundaetiapo@gmail.com>
9943
9944 Don't run timers in input-pending-p. Its new check-timers param
9945 provides the prior behavior. (Bug#15045).
9946 * keyboard.c (Finput_pending_p): Accept optional check-timers param.
9947
9948 2013-10-17 Paul Eggert <eggert@cs.ucla.edu>
9949
9950 Make some functions static in non-Microsoft builds.
9951 On my platform (Fedora 19 x86-64), this shrinks the
9952 Emacs executable (text+data) by 0.25%.
9953 * dispextern.h (erase_phys_cursor) [!WINDOWSNT]:
9954 (load_color) [!MSDOS]:
9955 * gnutls.h (emacs_gnutls_transport_set_errno) [!WINDOWSNT]:
9956 * keyboard.h (make_ctrl_char) [!WINDOWSNT]:
9957 * lisp.h (check_existing):
9958 * process.h (conv_sockaddr_to_lisp, network_interface_list)
9959 (network_interface_info) [!WINDOWSNT]:
9960 * termhooks.h (encode_terminal_code) [!WINDOWSNT]:
9961 Remove extern decls.
9962 * fileio.c (check_existing):
9963 * keyboard.c (make_ctrl_char) [!WINDOWSNT]:
9964 * process.c (conv_sockaddr_to_lisp, network_interface_list)
9965 (network_interface_info) [!WINDOWSNT]:
9966 * term.c (encode_terminal_code) [!WINDOWSNT]:
9967 * xdisp.c (erase_phys_cursor) [!WINDOWSNT]:
9968 * xfaces.c (load_color) [!MSDOS]:
9969 Now static.
9970 * fileio.c (check_existing, check_executable, check_writable):
9971 * process.c (network_interface_list, network_interface_info):
9972 Move earlier, so that we don't need forward decls.
9973 * gnutls.c (fn_gnutls_transport_set_errno)
9974 (emacs_gnutls_transport_set_errno) [!WINDOWNT]:
9975 Remove; unused.
9976 * w32.c (init_environment): Use faccessat rather than
9977 check_existing, partly for consistency with the rest of the code
9978 in this file, partly so that check_existing can be static.
9979
9980 Make VALMASK visible to GDB even if clang is used (Bug#15574).
9981 * emacs.c (MAIN_PROGRAM): New macro.
9982 * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END): New macros.
9983 (ARRAY_MARK_FLAG, PSEUDOVECTOR_FLAG, VALMASK): Use them.
9984
9985 bool vector int width fixes
9986 * data.c (bool_vector_spare_mask, Fbool_vector_count_matches)
9987 (Fbool_vector_count_matches_at):
9988 Use EMACS_INT, not ptrdiff_t, to record bit counts, as a bit count
9989 can exceed PTRDIFF_MAX, at least in theory.
9990 (Fbool_vector_count_matches_at):
9991 Use int, not ptrdiff_t, to record a value that can't exceed INT_MAX.
9992
9993 2013-10-16 Paul Eggert <eggert@cs.ucla.edu>
9994
9995 * process.h (conv_sockaddr_to_lisp): New decl, for newly-extern func.
9996 (struct sockaddr): Add forward decl, for platforms that lack it.
9997
9998 2013-10-16 Jan Djärv <jan.h.d@swipnet.se>
9999
10000 * nsselect.m (ns_string_from_pasteboard): Remove Fquit, just return
10001 Qnil (Bug#15628).
10002
10003 2013-10-16 Eli Zaretskii <eliz@gnu.org>
10004
10005 * w32.c (network_interface_get_info, network_interface_list)
10006 (network_interface_info): New functions. (Bug#15610)
10007 (GetAdaptersInfo_Proc): New typedef.
10008 (get_adapters_info): New wrapper function.
10009 (globals_of_w32): Initialize g_b_init_get_adapters_info.
10010
10011 * process.h (network_interface_list, network_interface_info):
10012 New prototypes.
10013
10014 * process.c (conv_sockaddr_to_lisp): Now externally-visible.
10015 (Fnetwork_interface_list, Fnetwork_interface_info): Define for
10016 all systems. Return non-nil for systems that HAVE_NET_IF_H and
10017 for WINDOWSNT. Doc fix.
10018 (syms_of_process): Defsubr Snetwork_interface_list and
10019 Snetwork_interface_info unconditionally.
10020
10021 * menu.c (have_boxes): Fix redundant simulation of radio buttons
10022 in NS GUI sessions. (Bug#15629)
10023
10024 2013-10-16 Dmitry Antipov <dmantipov@yandex.ru>
10025
10026 * fns.c (Fstring_as_unibyte): Use xlispstrdup.
10027
10028 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
10029
10030 * print.c (print_object): Print " ..." when truncating bool vectors.
10031
10032 2013-10-15 Eli Zaretskii <eliz@gnu.org>
10033
10034 * w32inevt.c (do_mouse_event): Support mouse wheel and all the 5
10035 standard mouse buttons.
10036
10037 * termhooks.h (struct input_event): Remove incorrect commentary.
10038
10039 2013-10-15 Paul Eggert <eggert@cs.ucla.edu>
10040
10041 Disallow bool vector operations on mixed-length operands.
10042 The old behavior left garbage in the result vector sometimes,
10043 and didn't seem to be useful.
10044 * data.c (Qwrong_length_argument): New static var.
10045 (wrong_length_argument): New function.
10046 (bool_vector_binop_driver): Check that args agree in length.
10047
10048 * keyboard.c, keyboard.h (all_kboards): Now static.
10049
10050 2013-10-15 Xue Fuqiao <xfq.free@gmail.com>
10051
10052 * buffer.c (syms_of_buffer) <buffer-invisibility-spec>: Add usage
10053 note from the lispref.
10054
10055 2013-10-15 Dmitry Antipov <dmantipov@yandex.ru>
10056
10057 * nsterm.h (struct ns_display_info): Remove set-but-unused
10058 member image_cache (image caches are per-terminal anyway).
10059 (FRAME_X_IMAGE_CACHE): Remove.
10060 * nsterm.m (ns_initialize_display_info): Adjust user.
10061
10062 2013-10-14 Eli Zaretskii <eliz@gnu.org>
10063
10064 * w32proc.c: Include mingw_time.h.
10065
10066 * w32.c: Include mingw_time.h.
10067
10068 Implement scrolling of TTY menus when the screen is too short.
10069
10070 * term.c (tty_menu_display): Accept an additional argument, the
10071 menu item from which to start displaying the menu. Account for
10072 the value of Y when limiting the menu to the number of available
10073 screen lines.
10074 (mi_result): New enumeration.
10075 (read_menu_input): Return enumerated value. When the y coordinate
10076 hits min_y or max_y, return scroll indication instead of wrapping
10077 around the menu.
10078 (tty_menu_activate): Handle the scrolling indications from
10079 read_menu_input. Compute the first menu item to display and pass
10080 it to tty_menu_display.
10081
10082 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
10083
10084 * termhooks.h (FRAME_MUST_WRITE_SPACES, FRAME_LINE_INS_DEL_OK)
10085 (FRAME_CHAR_INS_DEL_OK, FRAME_SCROLL_REGION_OK)
10086 (FRAME_SCROLL_REGION_COST, FRAME_MEMORY_BELOW_FRAME):
10087 Adjust to match the change described below.
10088 (struct terminal): Move must_write_spaces, line_ins_del_ok,
10089 char_ins_del_ok, scroll_region_ok, scroll_region_cost and
10090 memory_below_frame members to...
10091 * termchar.h (struct tty_display_info): ...here because they're
10092 relevant only on TTYs. Prefer unsigned bitfield where appropriate.
10093 * term.c (init_tty):
10094 * nsterm.m (ns_create_terminal):
10095 * w32term.c (w32_create_terminal):
10096 * xterm.c (x_create_terminal): Adjust users.
10097 * dispnew.c (line_hash_code, line_draw_cost): Pass frame arg
10098 to filter out non-TTY frames. Adjust comment.
10099 (scrolling): Adjust user. Prefer eassert for debugging check.
10100
10101 2013-10-14 Dmitry Antipov <dmantipov@yandex.ru>
10102
10103 * xfaces.c (PT_PER_INCH): Remove unused macro.
10104 * termhooks.h (struct terminal): Remove set-but-unused
10105 member fast_clear_end_of_line.
10106 (FRAME_FAST_CLEAR_END_OF_LINE): Remove.
10107 * nsterm.m (ns_create_terminal):
10108 * term.c (init_tty):
10109 * w32term.c (w32_create_terminal):
10110 * xterm.c (x_create_terminal): Adjust users.
10111
10112 2013-10-14 Paul Eggert <eggert@cs.ucla.edu>
10113
10114 * lisp.h (bool_vector_size): New function.
10115 All uses of XBOOL_VECTOR (x)->size changed to bool_vector_size (x).
10116 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
10117 (Fbool_vector_not, Fbool_vector_count_matches_at):
10118 Remove uses of 'eassume' that should no longer be needed,
10119 because they are subsumed by the 'eassume' in bool_vector_size.
10120
10121 2013-10-12 Eli Zaretskii <eliz@gnu.org>
10122
10123 * image.c (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE): Move back
10124 after inclusion of gif_lib.h, thus fixing compiler warnings caused
10125 by 2013-10-10T19:15:33Z!eggert@cs.ucla.edu.
10126
10127 2013-10-11 Eli Zaretskii <eliz@gnu.org>
10128
10129 * xdisp.c (deep_copy_glyph_row): Handle the case that FROM and TO
10130 have different dimensions. (Bug#15575)
10131
10132 * dispnew.c (fill_up_frame_row_with_spaces): Now has external
10133 visibility.
10134
10135 * dispextern.h (fill_up_frame_row_with_spaces): Add prototype.
10136
10137 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
10138
10139 * term.c (tty_menu_show): Never return with unbalanced
10140 specpdl. Use eassert for debugging check. Adjust style.
10141
10142 2013-10-11 Eli Zaretskii <eliz@gnu.org>
10143
10144 * term.c (read_menu_input): Make selection of menu items
10145 cyclical. Suggested by Dmitry Antipov <dmantipov@yandex.ru>.
10146 (tty_menu_activate): Fix off-by-one error when computing max_y.
10147
10148 2013-10-11 Teodor Zlatanov <tzz@lifelogs.com>
10149
10150 * gnutls.c (gnutls_audit_log_function): Add function for GnuTLS
10151 audit logging (only used with GnuTLS 3.x) and enable it.
10152
10153 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
10154
10155 * dispnew.c (redraw_frame): Remove useless #ifdef because
10156 FRAME_MSDOS_P is a compile-time zero everywhere except MS-DOS.
10157 Also, move TTY fflush to...
10158 * term.c (tty_update_end): ...this function.
10159
10160 2013-10-11 Eli Zaretskii <eliz@gnu.org>
10161
10162 * xdisp.c (display_tty_menu_item): Make sure we never write beyond
10163 the end of the frame's glyph matrix. (Bug#15575)
10164
10165 * term.c (tty_menu_display): Don't move cursor while overwriting
10166 frame's glyphs with menu items. Limit the number of items
10167 displayed to what can be shown on the available screen lines,
10168 excluding the echo area.
10169 (tty_menu_activate): Limit the Y coordinate allowed by
10170 read_menu_input to the last screen line used for menu display.
10171
10172 2013-10-11 Paul Eggert <eggert@cs.ucla.edu>
10173
10174 * lisp.h (eassume): New macro.
10175 Also, include <verify.h>, for 'assume'.
10176 * alloc.c (bool_vector_payload_bytes, Fmake_bool_vector)
10177 (vroundup, vector_nbytes):
10178 * data.c (bool_vector_spare_mask, bool_vector_binop_driver)
10179 (Fbool_vector_not, Fbool_vector_count_matches)
10180 (Fbool_vector_count_matches_at):
10181 Use eassume, not eassert.
10182 * casetab.c (set_identity, shuffle):
10183 * composite.c (composition_gstring_put_cache):
10184 * dispnew.c (update_frame_1):
10185 * ftfont.c (ftfont_shape_by_flt):
10186 * image.c (gif_load):
10187 * intervals.c (offset_intervals):
10188 * macfont.m (macfont_shape):
10189 Remove calls to 'assume' that are no longer needed, because
10190 --enable-gcc-warnings no longer generates bogus warnings
10191 when these calls are removed.
10192
10193 2013-10-11 Dmitry Antipov <dmantipov@yandex.ru>
10194
10195 * xdisp.c (deep_copy_glyph_row): Remove unused locals.
10196
10197 2013-10-10 Stefan Monnier <monnier@iro.umontreal.ca>
10198
10199 * fileio.c (Fsubstitute_in_file_name): Use substitute-env-in-file-name.
10200 (Qsubstitute_env_in_file_name): New var.
10201 (syms_of_fileio): Define it.
10202
10203 2013-10-10 Eli Zaretskii <eliz@gnu.org>
10204
10205 * xdisp.c (deep_copy_glyph_row): Assert that the 'used' counts of
10206 FROM and TO are identical. Copy only the glyphs of TEXT_AREA.
10207 (Bug#15575)
10208
10209 * term.c (save_and_enable_current_matrix): Don't allocate and
10210 don't save margin areas.
10211 (restore_desired_matrix): Don't restore margin areas.
10212 (free_saved_screen): Don't free margin areas.
10213
10214 2013-10-10 Paul Eggert <eggert@cs.ucla.edu>
10215
10216 * image.c: Pacify --enable-gcc-warnings.
10217 (GIFLIB_MAJOR, GIFLIB_MINOR, GIFLIB_RELEASE, fn_GifErrorString):
10218 #define only if used.
10219
10220 2013-10-10 Eli Zaretskii <eliz@gnu.org>
10221
10222 * image.c (GIFLIB_MAJOR): Define to 4 if undefined.
10223 (GIFLIB_MINOR, GIFLIB_RELEASE): Define to zero if undefined.
10224 (GifErrorString) [GIFLIB_MAJOR >= 5]: Define a function pointer.
10225 (gif_load): For giflib v5.x and later, display the error message
10226 produced by giflib when its functions fail.
10227 (syms_of_image) <Qlibgif_version> [HAVE_NTGUI]: New DEFSYM.
10228 (Bug#15531)
10229
10230 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
10231
10232 * keyboard.c (last_event_timestamp): Remove. For X selection and
10233 GTK popup menus, it may be obtained from per-frame X display info.
10234 (kbd_buffer_store_event_hold, kbd_buffer_get_event)
10235 (process_special_events): Adjust users.
10236 * keyboard.h (last_event_timestamp): Remove declaration.
10237 * xmenu.c (xmenu_show, create_and_show_popup_menu): Lost last arg.
10238 Use FRAME_DISPLAY_INFO (f)->last_user_time for gtk_menu_popup.
10239 * menu.h (xmenu_show): Adjust prototype.
10240 * menu.c (Fx_popup_menu): Adjust user.
10241 * xselect.c (x_own_selection, x_get_foreign_selection)
10242 (Fx_disown_selection_internal): Use dpyinfo->last_user_time.
10243
10244 2013-10-10 Dmitry Antipov <dmantipov@yandex.ru>
10245
10246 * keyboard.c (init_kboard): Now static. Add arg
10247 to denote window system. Adjust comment.
10248 (init_keyboard): Adjust user.
10249 (allocate_kboard): New function.
10250 (syms_of_keyboard):
10251 * nsterm.m (ns_term_init):
10252 * term.c (init_tty):
10253 * w32term.c (w32_create_terminal):
10254 * xterm.c (x_term_init): Use it.
10255 * keyboard.h (init_kboard): Remove prototype.
10256 (allocate_kboard): Add prototype.
10257
10258 2013-10-10 Barry Fishman <barry_fishman@acm.org> (tiny change)
10259
10260 * image.c (GIFLIB_MAJOR): Ensure it's defined.
10261 (DGifOpen, DGifOpenFileName): Handle giflib 5 syntax. (Bug#15531)
10262
10263 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
10264
10265 * fns.c (sxhash_bool_vector): Fix buffer read overrun.
10266
10267 2013-10-09 Eli Zaretskii <eliz@gnu.org>
10268
10269 * term.c (tty_menu_activate): Flush the output stream after
10270 showing the cursor, and don't mark the frame garbaged at exit from
10271 the function. Fixes redisplay glitches when moving from one menu
10272 to another.
10273
10274 2013-10-09 Jan Djärv <jan.h.d@swipnet.se>
10275
10276 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Check input for valid UTF-8
10277 or throw error (Bug#15570).
10278
10279 2013-10-09 Paul Eggert <eggert@cs.ucla.edu>
10280
10281 * intervals.c (temp_set_point_both): Move test into 'eassert',
10282 for speed.
10283
10284 * lisp.h (eassert): Don't use 'assume'.
10285 Sometimes 'assume' wins in performance, and sometimes it loses,
10286 so it shouldn't be used all the time. Perhaps we need two
10287 flavors of 'eassert', one for where 'assume' is far more likely
10288 to help or to hurt; but that can be done later.
10289 Reported by Dmitry Antipov in
10290 <http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00276.html>.
10291 Also, don't include <verify.h>; no longer needed.
10292
10293 2013-10-09 Glenn Morris <rgm@gnu.org>
10294
10295 * eval.c (Fcond): Doc tweak.
10296
10297 2013-10-09 Eli Zaretskii <eliz@gnu.org>
10298
10299 * xfaces.c (x_free_gc) [HAVE_X_WINDOWS, HAVE_NTGUI]: Don't pass
10300 expressions with side effects to eassert. (Bug#15565)
10301
10302 2013-10-09 Stefan Monnier <monnier@iro.umontreal.ca>
10303
10304 * fns.c (hashfn_user_defined): Allow hash functions to return any
10305 Lisp_Object.
10306
10307 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
10308
10309 Fix minor problems found by static checking.
10310 * dispnew.c (save_current_matrix): Omit unnecessary casts.
10311 * dispnew.c (update_frame_with_menu): Mark debug local as used.
10312 * keyboard.c, keyboard.h (Qmouse_movement): Now static.
10313 * keyboard.c (read_menu_command): Remove unused local.
10314 * lisp.h (read_menu_command): New decl.
10315 * menu.c, menu.h (menu_item_width): Arg is now unsigned char *, for
10316 benefit of STRING_CHAR_AND_LENGTH. All uses changed.
10317 Return ptrdiff_t, not int.
10318 * term.c (tty_menu_struct): 'allocated' member is now ptrdiff_t,
10319 not int, for benefit of xpalloc.
10320 (tty_menu_create, tty_menu_make_room): Simplify by using xzalloc
10321 and xpalloc.
10322 (have_menus_p): Remove; unused.
10323 (tty_menu_add_pane, tty_menu_add_selection): Change signedness of
10324 local char * pointer to pacify STRING_CHAR_AND_LENGTH.
10325 (tty_menu_add_selection, tty_menu_locate, tty_meny_destroy):
10326 Now static.
10327 (save_and_enable_current_matrix): Omit unnecessary casts.
10328 (read_menu_input): Omit local extern decl (now in lisp.h).
10329 Don't access uninitialized storage if mouse_get_xy fails.
10330 (tty_menu_activate): Mark local as initialized, for lint.
10331 (tty_menu_activate, tty_meny_show): Remove unused locals.
10332
10333 2013-10-08 Eli Zaretskii <eliz@gnu.org>
10334
10335 Support menus on text-mode terminals.
10336 * xterm.h (xw_popup_dialog): Add prototype.
10337
10338 * xmenu.c (Fx_popup_dialog): Function moved to menu.c.
10339 (xmenu_show): Block input here, instead in Fx_popup_menu.
10340 (xw_popup_dialog): New function, with X-specific bits of popup
10341 dialogs.
10342
10343 * xdisp.c (deep_copy_glyph_row, display_tty_menu_item):
10344 New functions.
10345
10346 * window.c (Fset_window_configuration): Use run-time tests of the
10347 frame type instead of compile-time conditionals, when menu-bar
10348 lines are considered.
10349
10350 * w32term.h (w32con_hide_cursor, w32con_show_cursor)
10351 (w32_popup_dialog): New prototypes.
10352
10353 * w32menu.c (Fx_popup_dialog): Function deleted.
10354 (w32_popup_dialog): New function, with w32 specific bits of popup
10355 dialogs. Block input here.
10356
10357 * w32inevt.c (w32_console_read_socket): Minor change to add
10358 debugging TTY events.
10359
10360 * w32fns.c (show_hourglass): If returning early because the frame
10361 is not a GUI frame, unblock input.
10362
10363 * w32console.c (w32con_hide_cursor, w32con_show_cursor, cursorX)
10364 (cursorY): New functions.
10365
10366 * termhooks.h (cursorX, cursorY): Prototypes of functions on
10367 WINDOWSNT, macros that call curX and curY elsewhere.
10368
10369 * termchar.h (struct tty_display_info) <showing_menu>: New flag.
10370
10371 * term.c (tty_hide_cursor, tty_show_cursor) [WINDOWSNT]: Call w32
10372 specific function to hide and show cursor on a text-mode terminal.
10373 (tty_menu_struct, struct tty_menu_state): New structures.
10374 (tty_menu_create, tty_menu_make_room, tty_menu_search_pane)
10375 (tty_menu_calc_size, mouse_get_xy, tty_menu_display)
10376 (have_menus_p, tty_menu_add_pane, tty_menu_add_selection)
10377 (tty_menu_locate, save_and_enable_current_matrix)
10378 (restore_desired_matrix, screen_update, read_menu_input)
10379 (tty_menu_activate, tty_menu_destroy, tty_menu_help_callback)
10380 (tty_pop_down_menu, tty_menu_last_menubar_item)
10381 (tty_menu_new_item_coords, tty_menu_show): New functions.
10382 (syms_of_term): New DEFSYMs for tty-menu-* symbols.
10383
10384 * nsterm.h (ns_popup_dialog): Adjust prototype.
10385
10386 * nsmenu.m (ns_menu_show): Block and unblock input here, instead
10387 of in x-popup-menu.
10388 (ns_popup_dialog): Adapt order of arguments to the other
10389 *_menu_show implementations.
10390 (Fx_popup_dialog): Function deleted.
10391
10392 * msdos.c (x_set_menu_bar_lines): Delete unused function.
10393
10394 * menu.h (tty_menu_show, menu_item_width): Provide prototypes.
10395
10396 * menu.c (have_boxes): New function.
10397 (single_keymap_panes): Use it instead of a compile-time
10398 conditional.
10399 (single_menu_item): Use run-time tests of the frame type instead
10400 of compile-time conditionals.
10401 (encode_menu_string): New function.
10402 (list_of_items, list_of_panes): Use it instead of ENCODE_STRING
10403 the macro, since different types of frame need different encoding
10404 of menu items.
10405 (digest_single_submenu): Use run-time tests of frame type instead
10406 of, or in addition to, compile-time conditionals.
10407 (menu_item_width, Fmenu_bar_menu_at_x_y): New functions.
10408 (Fx_popup_menu): Detect when the function is called from keyboard
10409 on a TTY. Don't barf when invoked on a text-mode frame.
10410 Check frame type at run time, instead of compile-time conditionals for
10411 invoking terminal-specific menu-show functions.
10412 Call tty_menu_show on text-mode frames.
10413 (Fx_popup_dialog): Move here from xmenu.c. Test frame types at
10414 run time to determine which alternative to invoke; support dialogs
10415 on TTYs.
10416
10417 * keyboard.h <Qmouse_movement>: Declare.
10418
10419 * keyboard.c <Qmouse_movement>: Now extern.
10420 <Qecho_keystrokes>: New static variable.
10421 (read_key_sequence): Accept an additional argument, a flag to
10422 prevent redisplay during reading of the key sequence. All callers
10423 changed.
10424 (read_menu_command): New function.
10425 (read_char): When COMMANDFLAG is -2, do not redisplay and do not
10426 autosave.
10427 (toolkit_menubar_in_use): New function.
10428 (make_lispy_event): Use it instead of a compile-time test.
10429
10430 * fns.c (Fyes_or_no_p) [HAVE_MENUS]: Don't condition on
10431 window-system being available.
10432
10433 * editfns.c (Fmessage_box) [HAVE_MENUS]: Don't condition the call
10434 to x-popup-dialog on the frame type, they all now support popup
10435 dialogs.
10436
10437 * dispnew.c (save_current_matrix): Save the margin areas.
10438 (restore_current_matrix): Restore margin areas.
10439 (update_frame_with_menu): New function.
10440
10441 * dispextern.h (display_tty_menu_item, update_frame_with_menu):
10442 Add prototypes.
10443
10444 * alloc.c (make_save_ptr): Now compiled unconditionally.
10445
10446 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
10447
10448 * dispnew.c (set_window_update_flags): Add buffer arg. Adjust comment.
10449 (redraw_frame, update_frame): Adjust users.
10450 * dispextern.h (set_window_update_flags): Adjust prototype.
10451 * xdisp.c (redisplay_internal): When updating all frames with zero
10452 windows_or_buffers_changed, assume that only the windows that shows
10453 current buffer should be really updated.
10454
10455 2013-10-08 Dmitry Antipov <dmantipov@yandex.ru>
10456
10457 Do not allocate huge temporary memory areas and objects while encoding
10458 for file I/O, thus reducing an enormous memory usage for large buffers.
10459 See http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00180.html.
10460 * coding.h (struct coding_system): New member raw_destination.
10461 * coding.c (setup_coding_system): Initialize it to zero.
10462 (encode_coding_object): If raw_destination is set, do not create
10463 dst_object. Add comment.
10464 * fileio.c (toplevel): New constant E_WRITE_MAX.
10465 (e_write): Do not encode more than E_WRITE_MAX characters per one loop
10466 iteration. Use raw_destination if E_WRITE_MAX characters is encoded.
10467
10468 2013-10-08 Jan Djärv <jan.h.d@swipnet.se>
10469
10470 * nsterm.m (windowDidExitFullScreen:)
10471 (toggleFullScreen:): Change NS_IMPL_COCOA to HAVE_NATIVE_FS.
10472
10473 2013-10-08 Paul Eggert <eggert@cs.ucla.edu>
10474
10475 Fix race where emacs aborts when sent SIGTERM (Bug#15534).
10476 * keyboard.c (unblock_input_to): Don't process pending signals
10477 if a fatal error is in progress.
10478
10479 * lisp.h (bits_word, BITS_WORD_MAX): New type and macro.
10480 All uses of 'size_t' and 'SIZE_MAX' changed to use them, when
10481 they're talking about words in Lisp bool vectors.
10482 (BITS_PER_BITS_WORD): Rename from BITS_PER_SIZE_T. All uses changed.
10483 * data.c (popcount_bits_word): Rename from popcount_size_t.
10484 (bits_word_to_host_endian): Rename from size_t_to_host_endian.
10485 All uses changed.
10486
10487 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
10488
10489 Improve support for popcount and counting trailing zeros (Bug#15550).
10490 * data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
10491 (USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
10492 (NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
10493 (popcount_size_t_msc, popcount_size_t_gcc):
10494 Remove; now done by Gnulib.
10495 (popcount_size_t): Now a macro that defers to Gnulib.
10496 (count_trailing_zero_bits): Return int, for consistency with
10497 Gnulib and because Emacs prefers signed to unsigned int.
10498 Don't assume that size_t is either unsigned int or unsigned long
10499 or unsigned long long.
10500 (size_t_to_host_endian): Do not assume that size_t is either
10501 exactly 32 or exactly 64 bits wide.
10502 * lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
10503 etc., so that it's now an enum constant, not a macro.
10504 No need to assume that it's either 32 or 64.
10505
10506 2013-10-07 Jan Djärv <jan.h.d@swipnet.se>
10507
10508 * nsterm.m (windowDidEnterFullScreen:): setPresentationOptions only
10509 on >= 10.7.
10510
10511 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
10512
10513 * insdel.c (insert_from_gap): Prefer ptrdiff_t to int where needed.
10514 * xdisp.c (handle_fontified_prop): Likewise. Use bool for boolean.
10515
10516 2013-10-07 Paul Eggert <eggert@cs.ucla.edu>
10517
10518 emacs_read and emacs_write now use void *, not char *.
10519 * alloc.c (valid_pointer_p) [!WINDOWSNT]: Remove now-unnecessary cast.
10520 * sysdep.c (emacs_read, emacs_write, emacs_write_sig):
10521 Buffer arg is now void *, not char *. This matches plain
10522 'read' and 'write' better, and avoids a constraint violation
10523 on Solaris 9 with Oracle Studio.
10524
10525 2013-10-07 Dmitry Antipov <dmantipov@yandex.ru>
10526
10527 * alloc.c (Fmake_string): For ASCII char initializer, prefer
10528 memset to explicit loop. Otherwise copy largest possible chunk
10529 from initialized to uninitialized part, thus allowing the longer
10530 memcpy runs and reducing the number of loop iterations.
10531
10532 2013-10-06 Jan Djärv <jan.h.d@swipnet.se>
10533
10534 * nsterm.m (ns_update_begin): If native fullscreen and no toolbar,
10535 hide toolbar (Bug#15388).
10536 (windowDidEnterFullScreen:): If presentation options are zero,
10537 set them here (Bug#15388).
10538 (ns_update_auto_hide_menu_bar): Remove runtime check.
10539 Don't auto hide dock unless menubar is also auto hidden.
10540
10541 2013-10-05 Xue Fuqiao <xfq.free@gmail.com>
10542
10543 * editfns.c (message): Mention batch mode in doc string.
10544
10545 2013-10-05 Jan Djärv <jan.h.d@swipnet.se>
10546
10547 * nsterm.m (check_native_fs): Remove erroneous comment.
10548
10549 2013-10-04 Dmitry Antipov <dmantipov@yandex.ru>
10550
10551 * xdisp.c (redisplay_internal): Simplify because scan_for_column now
10552 uses find_newline instead of scan_newline and so doesn't move point.
10553
10554 2013-10-04 Paul Eggert <eggert@cs.ucla.edu>
10555
10556 Use hardware support for byteswapping on glibc x86 etc.
10557 On Fedora 19 x86-64, the new bswap_64 needs 1 instruction,
10558 whereas the old swap64 needed 30.
10559 * fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]:
10560 * sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]:
10561 Use byteswap.h's macros to swap bytes.
10562 * lisp.h (swap16, swap32, swap64): Remove.
10563 All uses replaced by bswap_16, bswap_32, bswap_64.
10564
10565 * bytecode.c (exec_byte_code): Use some more volatile variables
10566 to work around local variables getting clobbered by longjmp.
10567 Port to pre-C99, which doesn't allow decls after stmts.
10568
10569 2013-10-03 Paul Eggert <eggert@cs.ucla.edu>
10570
10571 * lisp.h (eassert): Assume that COND is true when optimizing.
10572 In other words, take on the behavior of eassert_and_assume.
10573 This makes Emacs 0.2% smaller on my platform (Fedora 19, x86-64).
10574 (eassert_and_assume): Remove. All uses replaced by eassert.
10575
10576 * xdisp.c (Qglyphless_char): Now static.
10577
10578 Adjust to merge from gnulib.
10579 * conf_post.h (__has_builtin, assume): Remove; gnulib now does these.
10580 * lisp.h: Include <verify.h>, for 'assume'.
10581
10582 * eval.c (clobbered_eassert): New macro.
10583 (internal_catch, internal_condition_case)
10584 (internal_condition_case_1, internal_condition_case_2)
10585 (internal_condition_case_n): Use it instead of eassert
10586 when the argument contains locals clobbered by longjmp.
10587 Don't use clobbered locals outside of clobbered_eassert.
10588 (internal_lisp_condition_case): Use a volatile variable
10589 to work around a local variable's getting clobbered.
10590
10591 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
10592
10593 * lisp.h (struct handler): Merge struct handler and struct catchtag.
10594 (PUSH_HANDLER): New macro.
10595 (catchlist): Remove.
10596 (handlerlist): Always declare.
10597
10598 * eval.c (catchlist): Remove (merge with handlerlist).
10599 (handlerlist, lisp_eval_depth): Not static any more.
10600 (internal_catch, internal_condition_case, internal_condition_case_1)
10601 (internal_condition_case_2, internal_condition_case_n):
10602 Use PUSH_HANDLER.
10603 (unwind_to_catch, Fthrow, Fsignal): Adjust to merged
10604 handlerlist/catchlist.
10605 (internal_lisp_condition_case): Use PUSH_HANDLER. Adjust to new
10606 handlerlist which can only handle a single condition-case handler at
10607 a time.
10608 (find_handler_clause): Simplify since we only a single branch here
10609 any more.
10610
10611 * bytecode.c (BYTE_CODES): Add Bpushcatch, Bpushconditioncase
10612 and Bpophandler.
10613 (bcall0): New function.
10614 (exec_byte_code): Add corresponding cases. Improve error message when
10615 encountering an invalid byte-code. Let Bunwind_protect accept
10616 a function (rather than a list of expressions) as argument.
10617
10618 * alloc.c (Fgarbage_collect): Merge scans of handlerlist and catchlist,
10619 and make them unconditional now that they're heap-allocated.
10620
10621 2013-10-03 Stefan Monnier <monnier@iro.umontreal.ca>
10622
10623 * charset.c (Fdecode_char, Fencode_char): Remove description of
10624 `restriction' arg. now that it's hidden by advertised-calling-convention.
10625
10626 2013-10-02 Jan Djärv <jan.h.d@swipnet.se>
10627
10628 * macfont.m (mac_ctfont_create_preferred_family_for_attributes):
10629 Remove unused variable (from mac-port).
10630 (macfont_draw): Use s->ybase for correct y position.
10631
10632 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
10633
10634 * frame.h (struct frame): Drop has_minibuffer member because...
10635 (FRAME_HAS_MINIBUF_P): ...this macro can be implemented without it.
10636 * frame.c (make_frame, make_minibuffer_frame): Adjust users.
10637
10638 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
10639
10640 * window.h (struct window): Prefer enum text_cursor_kinds to int
10641 for phys_cursor_type member. Move the latter, phys_cursor_width,
10642 phys_cursor_ascent and phys_cursor_height under HAVE_WINDOW_SYSTEM.
10643 * window.c (replace_window, make_window): Adjust users.
10644
10645 2013-10-02 Dmitry Antipov <dmantipov@yandex.ru>
10646
10647 * fringe.c (toplevel): Do not use HAVE_WINDOW_SYSTEM because
10648 this module is never compiled otherwise.
10649
10650 2013-10-01 Alp Aker <alp.tekin.aker@gmail.com>
10651
10652 * macfont.m (macfont_draw): Use CGRectMake rather than NSMakeRect
10653 (Bug#15500).
10654
10655 2013-09-29 Eli Zaretskii <eliz@gnu.org>
10656
10657 * xdisp.c (get_next_display_element): Don't call face_for_font in
10658 a build configured --without-x. (Bug#15484)
10659
10660 2013-09-29 Jan Djärv <jan.h.d@swipnet.se>
10661
10662 * window.c (calc_absolute_offset): #elif should be #elif defined.
10663
10664 * frame.c (delete_frame): Block/unblock input to overcome race
10665 condition (Bug#15475).
10666
10667 2013-09-29 Andreas Politz <politza@hochschule-trier.de>
10668
10669 * frame.c (delete_frame): Record selected frame only after
10670 calling Qdelete_frame_functions (Bug#15477).
10671
10672 2013-09-28 Jan Djärv <jan.h.d@swipnet.se>
10673
10674 * nsterm.m (ns_selection_color): Remove.
10675 (ns_get_color): Check for ns_selection_(fg|bg)_color using
10676 NSColor selectedText(Background)Color. Only for COCOA.
10677 (ns_term_init): Remove assignment of ns_selection_color, logic
10678 moved to ns_get_color.
10679
10680 * nsterm.h (NS_SELECTION_BG_COLOR_DEFAULT): Rename from
10681 NS_SELECTION_COLOR_DEFAULT.
10682 (NS_SELECTION_FG_COLOR_DEFAULT): New.
10683
10684 2013-09-28 Eli Zaretskii <eliz@gnu.org>
10685
10686 * xdisp.c (Fdump_tool_bar_row): Ifdef away the body if 'struct
10687 frame' does not have the tool_bar_window member.
10688
10689 2013-09-26 Barry O'Reilly <gundaetiapo@gmail.com>
10690
10691 Signal error when reading an empty byte-code object (Bug#15405)
10692 * lread.c (read1): Signal error.
10693 * alloc.c (make_byte_code): eassert header size.
10694 (sweep_vectors): Change an int to size_t.
10695
10696 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
10697
10698 * dispnew.c (clear_glyph_row, copy_row_except_pointers): Use enums
10699 instead of ints, as it's the usual style for offsetof constants. See:
10700 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00478.html
10701
10702 * data.c (POPCOUNT_STATIC_INLINE): New macro, as a hack for popcount.
10703 This is ugly, but it should fix the performance problem for older
10704 GCC versions in the short run. I'll look into integrating the
10705 Gnulib module for popcount, as a better fix.
10706 See the thread starting in:
10707 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00474.html
10708 (popcount_size_t_generic) [NEED_GENERIC_POPCOUNT]:
10709 (popcount_size_t_msc) [USE_MSC_POPCOUNT]:
10710 (popcount_size_t_gcc) [USE_GCC_POPCOUNT]:
10711 (popcount_size_t): Use it.
10712
10713 2013-09-24 Daniel Colascione <dancol@dancol.org>
10714
10715 * process.c (Fnetwork_interface_info): Fix build break due to
10716 vector changes.
10717
10718 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
10719
10720 * dispnew.c (clear_glyph_row, copy_row_except_pointers):
10721 Prefer signed to unsigned integers where either will do.
10722 No need for 'const' on locals that do not escape.
10723 Omit easserts with unnecessary and unportable assumptions about
10724 alignment. Avoid unnecessary casts to char *.
10725
10726 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
10727
10728 Use union for the payload of struct Lisp_Vector.
10729 This helps to avoid a few glitches dictated by C's aliasing rules.
10730 * lisp.h (struct Lisp_Vector): Use union for next and
10731 contents member. Adjust comment. Change related users.
10732 * alloc.c (next_in_free_list, set_next_in_free_list): Remove.
10733 Related users changed.
10734 * buffer.c, bytecode.c, ccl.c, character.h, chartab.c, composite.c:
10735 * composite.h, disptab.h, fns.c, fontset.c, indent.c, keyboard.c:
10736 * lread.c, msdos.c, process.c, w32menu.c, window.c, xdisp.c:
10737 * xfaces.c, xfont.c, xmenu.c: Related users changed.
10738
10739 2013-09-24 Dmitry Antipov <dmantipov@yandex.ru>
10740
10741 Optimize glyph row clearing and copying routines.
10742 * dispextern.h (struct glyph_row): Change layout of struct
10743 glyph_row to help copy_row_except_pointers. Adjust comment.
10744 * dispnew.c (null_row): Remove.
10745 (clear_glyph_row): Use offsetof and memset to find and clear
10746 just the members that need clearing. Adjust comment.
10747 (copy_row_except_pointers): Likewise for copying.
10748
10749 2013-09-24 Paul Eggert <eggert@cs.ucla.edu>
10750
10751 Some minor cleanups of recently-added bool vector code.
10752 * conf_post.h (assume): Always return void. Use lint version
10753 only if GCC and MSC versions don't apply.
10754 * conf_post.h (assume):
10755 * data.c (USC_MSC_POPCOUNT, count_trailing_zero_bits):
10756 Depend on _MSC_VER, not __MSC_VER, for consistency with
10757 the rest of Emacs.
10758 * data.c (bool_vector_spare_mask, popcount_size_t_generic)
10759 (popcount_size_t_msc, popcount_size_t_gcc, popcount_size_t)
10760 (bool_vector_binop_driver, count_trailing_zero_bits)
10761 (size_t_to_host_endian): Now static, not static inline;
10762 the latter isn't needed with modern compilers and doesn't
10763 work with older compilers anyway.
10764
10765 * alloc.c (valgrind_p): Use bool for boolean.
10766
10767 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
10768
10769 * xdisp.c (noninteractive_need_newline, message_log_need_newline)
10770 (overlay_arrow_seen, message_enable_multibyte, line_number_displayed)
10771 (display_last_displayed_message_p, message_buf_print)
10772 (message_cleared_p, help_echo_showing_p, hourglass_shown_p):
10773 Use bool for boolean.
10774 * dispextern.h (cancel_line, init_desired_glyphs):
10775 Remove ancient leftover.
10776 (help_echo_showing_p, hourglass_shown_p):
10777 * lisp.h (noninteractive_need_newline): Adjust declaration.
10778
10779 2013-09-23 Dmitry Antipov <dmantipov@yandex.ru>
10780
10781 * dispnew.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
10782 Move to...
10783 * frame.c (frame_garbaged, selected_frame, last_nonminibuf_frame):
10784 ...this file and convert the latter to static. Adjust comment.
10785 (make_initial_frame):
10786 * window.c (init_window_once): Adjust user.
10787 * frame.h (last_nonminibuf_frame): Remove declaration.
10788 * lisp.h (selected_frame): Likewise.
10789 * msdos.c (the_only_display_info): Adjust comment.
10790
10791 2013-09-23 Eli Zaretskii <eliz@gnu.org>
10792
10793 * xdisp.c (mouse_face_from_string_pos): Fix off-by-one error in
10794 computing the end column of mouse-highlight that comes from
10795 display or overlay strings. (Bug#15437)
10796 (note_mouse_highlight): Adapt calculation of last argument to
10797 mouse_face_from_string_pos to the above change.
10798
10799 * conf_post.h (__has_builtin): Define to zero, if undefined, on
10800 all platforms, not just for clang.
10801
10802 2013-09-23 Jan Djärv <jan.h.d@swipnet.se>
10803
10804 * filelock.c (lock_file_1): Rearrange to remove compiler warning
10805 about excess arguments to snprintf.
10806
10807 * conf_post.h(assume): Use __builtin_unreachable for clang.
10808
10809 2013-09-23 Juanma Barranquero <lekktu@gmail.com>
10810
10811 * w32console.c (initialize_w32_display): Remove unused variable hlinfo.
10812 * w32term.c (w32_scroll_bar_handle_click): Remove unused variable f.
10813
10814 2013-09-23 Daniel Colascione <dancol@dancol.org>
10815
10816 * alloc.c (USE_VALGRIND): New macro; on by default
10817 when ENABLE_CHECKING.
10818 (mark_maybe_object, mark_maybe_pointer)
10819 [USE_VALGRIND]: Mark conservatively-scanned regions valid for
10820 valgrind purposes.
10821 (valgrind_p) [USE_VALGRIND]: New variable.
10822 (init_alloc) [USE_VALGRIND]: Initialize valgrind_p.
10823
10824 2013-09-22 Jan Djärv <jan.h.d@swipnet.se>
10825
10826 * process.c (wait_reading_process_output): Change int pnamelen to
10827 socklen_t.
10828
10829 * nsterm.m (setMarkedText:selectedRange:, deleteWorkingText):
10830 * nsmenu.m (addDisplayItemWithImage:idx:tag:helpText:enabled:):
10831 * nsfont.m (ns_get_covering_families, ns_findfonts): Cast NSLog
10832 argument to unsigned long to avoid warning.
10833 (nsfont_draw): Use 0.25 instead of Fix2X (kATSItalicQDSkew).
10834
10835 * conf_post.h (assume): Fix compiler error: x shall be cond.
10836
10837 2013-09-22 Daniel Colascione <dancol@dancol.org>
10838
10839 * xfns.c (x_get_monitor_attributes): Suppress unused variable
10840 warning when compiling without a window system.
10841
10842 2013-09-22 Daniel Colascione <dancol@dancol.org>
10843
10844 * data.c (Qbool_vector_p): New symbol.
10845 (bool_vector_spare_mask, popcount_size_t_generic)
10846 (popcount_size_t_msc, popcount_size_t_gcc)
10847 (popcount_size_t)
10848 (bool_vector_binop_driver)
10849 (count_trailing_zero_bits, size_t_to_host_endian)
10850 (Fbool_vector_exclusive_or)
10851 (Fbool_vector_union)
10852 (Fbool_vector_intersection, Fbool_vector_set_difference)
10853 (Fbool_vector_subsetp, Fbool_vector_not)
10854 (Fbool_vector_count_matches)
10855 (Fbool_vector_count_matches_at): New functions.
10856 (syms_of_data): Intern new symbol, functions.
10857 * alloc.c (bool_vector_payload_bytes): New function.
10858 (Fmake_bool_vector): Instead of calling Fmake_vector,
10859 which performs redundant initialization and argument checking,
10860 just call allocate_vector ourselves. Make sure we clear any
10861 terminating padding to zero.
10862 (vector_nbytes, sweep_vectors): Use bool_vector_payload_bytes
10863 instead of open-coding the size calculation.
10864 (vroundup_ct): New macro.
10865 (vroundup): Assume argument >= 0; invoke vroundup_ct.
10866 * casetab.c (shuffle, set_identity): Change lint_assume to assume.
10867 * composite.c (composition_gstring_put_cache):
10868 Change lint_assume to assume.
10869 * conf_post.h (assume): New macro.
10870 (lint_assume): Remove.
10871 * dispnew.c (update_frame_1): Change lint_assume to assume.
10872 * ftfont.c (ftfont_shape_by_flt): Change lint_assume
10873 to assume.
10874 * image.c (gif_load): Change lint_assume to assume.
10875 * lisp.h (eassert_and_assume): New macro.
10876 (Qbool_vector_p): Declare.
10877 (CHECK_BOOL_VECTOR, ROUNDUP, BITS_PER_SIZE_T): New macros.
10878 (swap16, swap32, swap64): New inline functions.
10879 * macfont.m (macfont_shape): Change lint_assume to assume.
10880 * ralloc.c: Rename ROUNDUP to PAGE_ROUNDUP throughout.
10881 * xsettings.c (parse_settings): Use new swap16 and
10882 swap32 from lisp.h instead of file-specific macros.
10883
10884 2013-09-22 Eli Zaretskii <eliz@gnu.org>
10885
10886 * xdisp.c (try_window_id): Don't abort if cursor row could not be
10887 found (which can legitimately happen when the glyph row at the
10888 window start is disabled in the current_matrix. (Bug#15365)
10889
10890 2013-09-22 Paul Eggert <eggert@cs.ucla.edu>
10891
10892 Fix syntax.h bug introduced by recent INLINE change.
10893 syntax.h defined an extern inline function SYNTAX_ENTRY that was
10894 conditionally compiled one way in some modules, and a different
10895 way in others. This doesn't work with extern inline functions,
10896 which must have the same definition in all modules, because the
10897 defining code might be shared across modules, depending on the
10898 implementation. Symptoms reported by Martin Rudalics in:
10899 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00414.html
10900 * regex.c, syntax.c (SYNTAX_ENTRY_VIA_PROPERTY): Remove.
10901 (SYNTAX, SYNTAX_ENTRY, SYNTAX_WITH_FLAGS): New macros,
10902 overriding the corresponding functions in syntax.h.
10903 * syntax.h (syntax_property_entry, syntax_property_with_flags)
10904 (syntax_property): New inline functions.
10905 (SYNTAX_ENTRY, SYNTAX_WITH_FLAGS, SYNTAX):
10906 Rewrite in terms of these new functions.
10907
10908 2013-09-21 Eli Zaretskii <eliz@gnu.org>
10909
10910 * dired.c (directory_files_internal): Use multibyte_chars_in_text,
10911 not chars_in_text, whose result depends on the multibyteness of
10912 the current buffer. (Bug#15426)
10913
10914 2013-09-20 Paul Eggert <eggert@cs.ucla.edu>
10915
10916 Port recent change to hosts where pointers aren't 'long'.
10917 * xterm.c (x_send_scroll_bar_event, x_scroll_bar_to_input_event):
10918 Don't assume that pointers are the same width as 'long'.
10919 Add a compile-time check that a pointer fits into two X slots.
10920
10921 A simpler, centralized INLINE.
10922 * conf_post.h (INLINE): Define only if not already defined.
10923 This allows us to use a single INLINE, defined by one file
10924 per executable.
10925 * emacs.c (INLINE): Define it.
10926 Also, include category.h, charset.h, composite.h, dispextern.h,
10927 syntax.h, systime.h, so that their INLINE definitions are expanded
10928 properly for Emacs.
10929 * blockinput.h, keyboard.c (BLOCKINPUT_INLINE):
10930 * buffer.h, buffer.c (BUFFER_INLINE):
10931 * category.h, category.c (CATEGORY_INLINE):
10932 * character.h, character.c (CHARACTER_INLINE):
10933 * charset.h, charset.c (CHARSET_INLINE):
10934 * composite.h, composite.c (COMPOSITE_INLINE):
10935 * dispextern.h, dispnew.c (DISPEXTERN_INLINE):
10936 * frame.h, frame.c (FRAME_INLINE):
10937 * intervals.h, intervals.c (INTERVALS_INLINE):
10938 * keyboard.h, keyboard.c (KEYBOARD_INLINE):
10939 * lisp.h, alloc.c (LISP_INLINE):
10940 * process.h, process.c (PROCESS_INLINE):
10941 * syntax.h, syntax.c (SYNTAX_INLINE):
10942 * systime.h, sysdep.c (SYSTIME_INLINE):
10943 * termhooks.h, terminal.c (TERMHOOKS_INLINE):
10944 * window.h, window.c (WINDOW_INLINE):
10945 Remove. All uses replaced with INLINE.
10946
10947 2013-09-20 Dmitry Antipov <dmantipov@yandex.ru>
10948
10949 * xterm.c (handle_one_xevent): Revert part of 2013-09-17 change
10950 to avoid Bug#15398.
10951
10952 2013-09-19 Eli Zaretskii <eliz@gnu.org>
10953
10954 * w32reg.c (w32_get_string_resource): Make the first 2 arguments
10955 'const char *' to avoid compiler warnings due to similar change in
10956 the prototype of x_get_string_resource.
10957
10958 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
10959
10960 * xterm.h (struct x_display_info): New members last_mouse_glyph_frame,
10961 last_mouse_scroll_bar, last_mouse_glyph and last_mouse_movement_time,
10962 going to replace static variables below. Adjust comments.
10963 * xterm.c (last_mouse_glyph, last_mouse_glyph_frame)
10964 (last_mouse_scroll_bar, last_mouse_movement_time): Remove.
10965 (note_mouse_movement, XTmouse_position, x_scroll_bar_note_movement)
10966 (x_scroll_bar_report_motion, handle_one_xevent, syms_of_xterm):
10967 Related users changed.
10968 * w32term.h (struct w32_display_info): New members last_mouse_glyph_frame,
10969 last_mouse_scroll_bar, last_mouse_scroll_bar_pos, last_mouse_glyph and
10970 last_mouse_movement_time, going to replace static variables below.
10971 Adjust comments.
10972 * w32term.c (last_mouse_glyph_frame, last_mouse_scroll_bar)
10973 (last_mouse_scroll_bar_pos, last_mouse_glyph, last_mouse_movement_time):
10974 Remove.
10975 (note_mouse_movement, w32_mouse_position, w32_scroll_bar_handle_click)
10976 (x_scroll_bar_report_motion, syms_of_w32term): Related users changed.
10977 * nsterm.h (struct ns_display_info): New members last_mouse_glyph,
10978 last_mouse_movement_time and last_mouse_scroll_bar, going to replace
10979 static variables below.
10980 * nsterm.m (last_mouse_glyph, last_mouse_movement_time)
10981 (last_mouse_scroll_bar): Remove.
10982 (note_mouse_movement, ns_mouse_position, mouseMoved, mouseEntered)
10983 (mouseExited): Related users changed.
10984
10985 2013-09-19 Dmitry Antipov <dmantipov@yandex.ru>
10986
10987 Do not use external array to process X scroll bar messages.
10988 * xterm.c (scroll_bar_windows, scroll_bar_windows_size): Remove.
10989 (x_send_scroll_bar_event): Pack window pointer into two slots
10990 of XClientMessageEvent if we're 64-bit. Adjust comment.
10991 (x_scroll_bar_to_input_event): Unpack accordingly.
10992
10993 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
10994
10995 Ifdef away recent changes which aren't relevant to NS port.
10996 * dispextern.h (x_mouse_grabbed, x_redo_mouse_highlight)
10997 [!HAVE_NS]: Declare as such.
10998 * frame.c (x_mouse_grabbed, x_redo_mouse_highlight)
10999 [!HAVE_NS]: Define as such.
11000
11001 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
11002
11003 * frame.c (x_redo_mouse_highlight): New function
11004 to factor out common code used in W32 and X ports.
11005 * dispextern.h (x_redo_mouse_highlight): Add prototype.
11006 * xterm.h (struct x_display_info):
11007 * w32term.h (struct w32_display_info):
11008 * nsterm.h (struct ns_display_info): New members
11009 last_mouse_motion_frame, last_mouse_motion_x and
11010 last_mouse_motion_y, going to replace static variables below.
11011 * xterm.c (last_mouse_motion_event, last_mouse_motion_frame)
11012 (redo_mouse_highlight): Remove.
11013 (note_mouse_movement, syms_of_xterm): Adjust user.
11014 (handle_one_xevent): Likewise. Use x_redo_mouse_highlight.
11015 * w32term.c (last_mouse_motion_event, last_mouse_motion_frame)
11016 (redo_mouse_highlight): Remove.
11017 (note_mouse_movement, syms_of_w32term): Adjust user.
11018 (w32_read_socket): Likewise. Use x_redo_mouse_highlight.
11019 * nsterm.m (last_mouse_motion_position, last_mouse_motion_frame):
11020 Remove.
11021 (note_mouse_movement, mouseMoved, syms_of_nsterm):
11022 * nsfns.m (compute_tip_xy): Adjust user.
11023
11024 2013-09-18 Dmitry Antipov <dmantipov@yandex.ru>
11025
11026 * frame.c (x_mouse_grabbed): New function.
11027 * dispextern.h (x_mouse_grabbed): Add prototype.
11028 (last_mouse_frame): Remove declaration.
11029 * xterm.h (struct x_display_info):
11030 * w32term.h (struct w32_display_info):
11031 * nsterm.h (struct ns_display_info): New member
11032 last_mouse_frame, going to replace...
11033 * xdisp.c (last_mouse_frame): ...global variable.
11034 (note_tool_bar_highlight):
11035 * w32term.c (w32_mouse_position, w32_read_socket):
11036 * xterm.c (XTmouse_position, handle_one_xevent):
11037 Use x_mouse_grabbed.
11038 * nsterm.m (ns_mouse_position, mouseDown): Adjust user.
11039
11040 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11041
11042 * w32term.c (w32_read_socket): Avoid temporary
11043 variables in a call to x_real_positions.
11044 * xterm.c (handle_one_xevent): Likewise.
11045
11046 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11047
11048 * frame.h (x_set_bitmap_icon) [!HAVE_NS]: New function.
11049 (x_icon_type): Remove prototype.
11050 (x_bitmap_icon) [!HAVE_NS]: Declare as such.
11051 * frame.c (x_icon_type): Remove.
11052 * w32term.c (x_make_frame_visible, x_iconify_frame):
11053 * xterm.c (x_make_frame_visible, x_iconify_frame):
11054 Use x_set_bitmap_icon to factor out common code.
11055
11056 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11057
11058 * dispextern.h (check_x_display_info, x_get_string_resource):
11059 Declare here just once and unify the latter.
11060 * frame.c (check_x_display_info, x_get_string_resource):
11061 * nsterm.h (check_x_display_info):
11062 * xrdb.c (x_get_string_resource):
11063 * xterm.h (check_x_display_info): Remove prototypes.
11064 * nsfns.m (x_get_string_resource): Likewise. Adjust definition.
11065 * w32reg.c (x_get_string_resource): Likewise.
11066 (w32_get_rdb_resource): Adjust user.
11067
11068 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11069
11070 * xterm.h (struct x_display_info): New member
11071 x_pending_autoraise_frame, going to replace...
11072 * xterm.c (pending_autoraise_frame): ...static variable.
11073 (x_new_focus_frame, XTread_socket): Adjust users.
11074 * w32term.h (struct w32_display_info): New member
11075 w32_pending_autoraise_frame, going to replace...
11076 * w32term.c (pending_autoraise_frame): ...global variable.
11077 (x_new_focus_frame, w32_read_socket): Adjust users.
11078
11079 2013-09-17 Glenn Morris <rgm@gnu.org>
11080
11081 * xdisp.c (message_dolog): If we create *Messages*,
11082 switch it to messages-buffer-mode.
11083
11084 2013-09-17 Paul Eggert <eggert@cs.ucla.edu>
11085
11086 Don't overuse 'const' in types of locals.
11087 * bidi.c (bidi_count_bytes):
11088 * gtkutil.c, gtkutil.h (xg_event_is_for_menubar)
11089 (xg_event_is_for_scrollbar):
11090 * xselect.c (x_handle_property_notify)
11091 (x_handle_selection_notify, x_handle_dnd_message):
11092 * xsettings.c, xsettings.h (xft_settings_event):
11093 * xterm.c (x_handle_net_wm_state, handle_one_event)
11094 (x_menubar_window_to_frame, x_detect_focus_change)
11095 (construct_mouse_click, note_mouse_movement)
11096 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
11097 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
11098 (handle_one_xevent, x_handle_net_wm_state):
11099 * xterm.h (x_handle_property_notify, x_handle_selection_notify)
11100 (x_handle_dnd_message):
11101 Avoid unnecessary 'const', typically the second 'const' in
11102 'const foo * const arg', a 'const' that does not affect the API
11103 and doesn't significantly help the human reader.
11104
11105 2013-09-17 Dmitry Antipov <dmantipov@yandex.ru>
11106
11107 * image.c (fn_g_type_init) [WINDOWSNT]: Define and load
11108 only if Glib < 2.36.0.
11109 (fn_g_type_init) [!WINDOWSNT]: Define only if Glib < 2.36.0.
11110 * xsettings.c (init_gconf, init_gsettings): Do not check
11111 for g_type_init.
11112 * xterm.c (handle_one_xevent): Do not call to x_clear_area
11113 if GTK >= 2.7.0.
11114 (toplevel) [USE_MOTIF]: Include xlwmenu.h to pacify GCC.
11115
11116 2013-09-16 Jan Djärv <jan.h.d@swipnet.se>
11117
11118 * xsettings.c (init_gconf, init_gsettings): Check for Glib 2.36.0
11119 before calling g_type_init.
11120
11121 * font.c (syms_of_font): Move call to syms_of_(ns|mac)font ...
11122
11123 * nsterm.m (syms_of_nsterm): ... to here.
11124
11125 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
11126
11127 * xterm.c (toolkit_scroll_bar_interaction): Use bool for boolean.
11128 (ignore_next_mouse_click_timeout): Use Time as X does.
11129 (handle_one_xevent): Avoid cast and use unsigned comparison.
11130
11131 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
11132
11133 Do not copy X event in handle_one_xevent except KeyPress case.
11134 Wnen XEvent is processed, it is unlikely to be changed except
11135 KeyPress case, so we can avoid copying and use const pointer to
11136 const data to make sure that an event is not changed elsewhere.
11137 * xterm.c (handle_one_xevent): Change 2nd arg to 'const XEvent *
11138 const' and do not create local copy except for the KeyPress event.
11139 Use casts to avoid a few glitches. Adjust formatting. Add comments.
11140 (SET_SAVED_BUTTON_EVENT): Remove and move the code to the only user.
11141 (x_handle_net_wm_state, x_menubar_window_to_frame)
11142 (x_detect_focus_change, construct_mouse_click, note_mouse_movement)
11143 (x_scroll_bar_to_input_event, x_scroll_bar_expose)
11144 (x_scroll_bar_handle_click, x_scroll_bar_note_movement):
11145 * gtkutil.c (xg_event_is_for_menubar, xg_event_is_for_scrollbar):
11146 * xselect.c (x_handle_property_notify, x_handle_selection_notify)
11147 (x_handle_dnd_message):
11148 * xsettings.c (xft_settings_event):
11149 Use 'const XEvent * const' where appropriate.
11150 * xterm.h, gtkutil.h, xsettings.h: Adjust related prototypes.
11151
11152 2013-09-16 Dmitry Antipov <dmantipov@yandex.ru>
11153
11154 Fix X event waiting to handle multiple frames.
11155 * frame.h (struct frame) [HAVE_X_WINDOWS]: New member wait_event_type.
11156 * xterm.c (pending_event_wait): Remove. Adjust users.
11157 (x_detect_focus_change): Pass frame arg.
11158 (handle_one_xevent): Find related frame early and clear per-frame
11159 wait_event_type only if this is an event for the relevant frame.
11160 (x_wait_for_event): Use per-frame wait_event_type.
11161
11162 2013-09-15 Jan Djärv <jan.h.d@swipnet.se>
11163
11164 * nsfns.m (Fx_create_frame): Fix font driver registration for
11165 GNUstep.
11166
11167 * font.c (syms_of_font): Check MAC_OS_X_VERSION_MAX_ALLOWED >= 1050
11168 for syms_of_macfont.
11169
11170 * nsterm.m: Include macfont.h.
11171 (ns_tmp_flags, ns_tmp_font): Remove.
11172 (ns_compute_glyph_string_overhangs): Check for driver Qns.
11173 (ns_draw_glyph_string): Use local variables instead of ns_tmp_flags,
11174 ns_tmp_font. Call ns_draw_text_decoration here instead of nsfont.m.
11175 (changeFont:): Fix code style. Check for font driver type when
11176 getiing font.
11177
11178 * nsterm.h (FONT_DESCENT, FONT_ASCENT): Define to (f)->ascent and
11179 (f)->descent.
11180
11181 * nsfont.m (ns_tmp_flags, ns_tmp_font): Remove.
11182 (nsfont_open): Set font driver type.
11183 Set font->ascent and font->descent. Figure out font instead of
11184 ns_tmp_font, and flags instead of ns_tmp_flags.
11185 Fix indentation. Remove call to ns_draw_text_decoration,
11186 moved to nsterm.
11187
11188 * nsfns.m: Include macfont.h.
11189 (Fx_create_frame): Register macfont driver, make a better default font.
11190 (Fns_popup_font_panel): Get font from macfont driver, if used.
11191
11192 * macfont.m, macfont.h, macuvs.h: New files.
11193
11194 * font.h: Declare syms_of_macfont.
11195
11196 * font.c (syms_of_font): Call syms_of_macfont.
11197
11198 * Makefile.in (NS_OBJ, SOME_MACHINE_OBJECTS): Add macfont.o.
11199
11200 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
11201
11202 Drop VERTICAL_SCROLL_BAR_WIDTH_TRIM. For X, it is zero since 1999,
11203 and it is always zero for others, so I assume that this is an ancient
11204 leftover which nobody will want to change any more.
11205 * xterm.h, w32term.h, nsterm.h (VERTICAL_SCROLL_BAR_WIDTH_TRIM): Remove.
11206 (VERTICAL_SCROLL_BAR_INSIDE_WIDTH):
11207 * frame.c (x_set_scroll_bar_width):
11208 * w32fns.c (w32_createscrollbar):
11209 * w32term.c (w32_set_vertical_scroll_bar):
11210 * xfns.c (x_set_scroll_bar_default_width):
11211 * xterm.c (XTflash, x_scroll_bar_create, XTset_vertical_scroll_bar)
11212 (x_scroll_bar_expose): Related users changed.
11213
11214 2013-09-15 Dmitry Antipov <dmantipov@yandex.ru>
11215
11216 * xterm.h (FRAME_X_SCREEN_NUMBER): Add comment.
11217 (BLACK_PIX_DEFAULT, WHITE_PIX_DEFAULT): Use FRAME_X_SCREEN_NUMBER.
11218 (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET) [USE_X_TOOLKIT]:
11219 Define as such.
11220 * frame.h (FRAME_SMALLEST_CHAR_WIDTH, FRAME_SMALLEST_FONT_HEIGHT):
11221 Define once here...
11222 * nsterm.h, w32term.h, xterm.h: ...and not here.
11223 * w32term.h (SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET):
11224 Remove unused Xisms.
11225 * xterm.c, xfns.c (toplevel): Remove #ifdef HAVE_X_WINDOWS because
11226 these modules are never compiled otherwise.
11227
11228 2013-09-14 Eli Zaretskii <eliz@gnu.org>
11229
11230 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
11231 Doc fix. (Bug#15375)
11232
11233 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
11234
11235 Unify Fx_focus_frame between all ports.
11236 * frame.h (x_focus_frame): New prototype.
11237 * xfns.c (Fx_focus_frame): Remove.
11238 (syms_of_xfns): Do not defsubr it.
11239 (x_focus_frame): X implementation.
11240 * nsfns.m (Fx_focus_frame): Remove.
11241 (syms_of_nsfns): Do not defsubr it.
11242 (x_focus_frame): NS implementation.
11243 * w32term.c (Fx_focus_frame): Remove.
11244 (x_focus_on_frame): Rename to...
11245 (x_focus_frame): W32 implementation.
11246 * w32term.h (x_focus_on_frame): Remove prototype.
11247 * w32fns.c (Fx_focus_frame): Remove.
11248 (syms_of_w32fns): Do not defsubr it.
11249 * frame.c (Fx_focus_frame): Define here.
11250 (syms_of_frame): Defsubr here.
11251 * gtkutil.c (xg_tool_bar_callback): Use x_focus_frame.
11252
11253 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
11254
11255 Unify FRAME_window_system_DISPLAY_INFO macros between all ports.
11256 All of them are replaced with FRAME_DISPLAY_INFO, defined in
11257 each port to reference the port-specific window system data.
11258 * msdos.h (FRAME_X_DISPLAY_INFO): Remove.
11259 (FRAME_DISPLAY_INFO): Define.
11260 * w32term.h (FRAME_W32_DISPLAY_INFO, FRAME_X_DISPLAY_INFO): Remove.
11261 (FRAME_DISPLAY_INFO): Define. Adjust users.
11262 * xterm.h (FRAME_X_DISPLAY_INFO): Remove.
11263 (FRAME_DISPLAY_INFO): Define. Adjust users.
11264 * frame.h (FRAME_RES_X, FRAME_RES_Y): Unify.
11265 * font.c, frame.c, gtkutil.c, image.c, menu.c, msdos.c, nsfns.m:
11266 * nsfont.m, nsterm.m, w32fns.c, w32font.c, w32menu.c, w32term.c:
11267 * w32xfns.c, widget.c, xdisp.c, xfaces.c, xfns.c, xfont.c, xmenu.c:
11268 * xselect.c, xterm.c: All related users changed.
11269
11270 2013-09-13 Dmitry Antipov <dmantipov@yandex.ru>
11271
11272 * xterm.h (x_window_to_frame, x_any_window_to_frame)
11273 (x_menubar_window_to_frame): Remove prototypes.
11274 * xfns.c (x_window_to_frame, x_any_window_to_frame)
11275 (x_menubar_window_to_frame, x_top_window_to_frame):
11276 Move from here...
11277 * xterm.c (x_window_to_frame, x_any_window_to_frame)
11278 (x_menubar_window_to_frame, x_top_window_to_frame):
11279 ...to here and convert all but the last to static.
11280
11281 2013-09-12 Eli Zaretskii <eliz@gnu.org>
11282
11283 * lisp.mk (lisp): Add w32-common-fns.elc.
11284
11285 2013-09-12 Xue Fuqiao <xfq.free@gmail.com>
11286
11287 * charset.c (char_charset): Document an exception for char-charset.
11288
11289 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
11290
11291 * xterm.h (x_display_info): New field last_user_time...
11292 * xterm.c (toplevel): ...to replace static last_user_time.
11293 (handle_one_xevent, x_ewmh_activate_frame): Adjust users.
11294
11295 2013-09-12 Dmitry Antipov <dmantipov@yandex.ru>
11296
11297 * xterm.c (x_set_scroll_bar_thumb) [USE_LUCID && !HAVE_XAW3D]: Clip
11298 scroll bar values to prevent thumb from disappear and update comment.
11299
11300 2013-09-11 Glenn Morris <rgm@gnu.org>
11301
11302 * emacs.c (usage_message): Possessive apostrophe tweak.
11303
11304 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11305
11306 * nsterm.m (syms_of_nsterm): Use Qns.
11307 * w32fns.c (Fx_open_connection): Remove old '#if 0' code.
11308 * w32term.c (w32_create_terminal, syms_of_w32term): Use Qw32.
11309 * xfns.c (x_display_info_for_name, Fx_open_connection):
11310 Remove old '#if 0' code.
11311 (syms_of_xfns): Use Qx.
11312 * termhooks.h (fullscreen_hook): Remove the leftover.
11313 (struct terminal): Fix typo in comment.
11314
11315 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11316
11317 Cleaning up a few X scroll bar bits.
11318 * termhooks.h (enum scroll_bar_part): Add scroll_bar_nowhere member.
11319 * xterm.h (struct scroll_bar) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
11320 New member last_seen_part, going to replace...
11321 * xterm.c [USE_TOOLKIT_SCROLL_BARS]: ...global last_scroll_bar_part.
11322 (xt_action_hook) [USE_LUCID]: Adjust user.
11323 (xm_scroll_callback, xg_scroll_callback): Do not bloat with
11324 Lucid-specific scroll bar support.
11325 (xaw_jump_callback, xaw_scroll_callback): Prefer enum scroll_par_part
11326 to int and adjust to use last_seen_part member.
11327 (x_set_toolkit_scroll_bar_thumb) [USE_LUCID]: Adjust user.
11328 (x_scroll_bar_create) [USE_TOOLKIT_SCROLL_BARS && USE_LUCID]:
11329 Initialize last_seen_part.
11330
11331 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
11332
11333 * insdel.c (insert_from_buffer_1): Don't mark buffer as modified when
11334 insert-buffer-substring an empty string.
11335
11336 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
11337
11338 * xdisp.c (Ftool_bar_lines_needed): Declare as 'const' if ifdeffed out,
11339 avoiding a GCC warning.
11340
11341 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11342
11343 Ifdef away frame tool bar code when it is not really used.
11344 * frame.h (struct frame) [HAVE_WINDOW_SYSTEM && !USE_GTK && !HAVE_NS]:
11345 Move tool_bar_window, desired_tool_bar_string, current_tool_bar_string
11346 and minimize_tool_bar_window_p under the above.
11347 (fset_current_tool_bar_string, fset_desired_tool_bar_string)
11348 (fset_tool_bar_window): Likewise.
11349 * dispnew.c (clear_current_matrices, clear_desired_matrices)
11350 (adjust_frame_glyphs_for_window_redisplay, free_glyphs, update_frame)
11351 (change_frame_size_1):
11352 * window.c (window_from_coordinates, Frecenter): Adjust users.
11353 * window.h (WINDOW_TOOL_BAR_P): Define to zero when frame tool bar
11354 code is not really used.
11355 * xdisp.c (build_desired_tool_bar_string, display_tool_bar_line)
11356 (tool_bar_lines_needed, MAX_FRAME_TOOL_BAR_HEIGHT, tool_bar_item_info)
11357 (get_tool_bar_item, handle_tool_bar_click, note_tool_bar_highlight)
11358 [!USE_GTK && !HAVE_NS]: Define as such.
11359 (Ftool_bar_lines_needed, redisplay_tool_bar, show_mouse_face)
11360 (note_mouse_highlight, expose_frame):
11361 * xfns.c (x_set_tool_bar_lines):
11362 * xterm.c (handle_one_xevent): Adjust users.
11363
11364 2013-09-11 Paul Eggert <eggert@cs.ucla.edu>
11365
11366 Fix corruption with multiple emacsclient -t instances (Bug#15222).
11367 This bug was introduced by my 2013-08-26 patch, which incorrectly
11368 assumed that the terminfo implementation doesn't use termcap buffers.
11369 * term.c (init_tty) [TERMINFO]: Remove optimization, as
11370 these buffers apparently are used after all.
11371 * termchar.h (TERMCAP_BUFFER_SIZE) [TERMINFO]: Define here too.
11372 (struct tty_display_info): Define members termcap_term_buffer and
11373 termcap_strings_buffer even if TERMINFO.
11374
11375 2013-09-11 Dmitry Antipov <dmantipov@yandex.ru>
11376
11377 Fix last change.
11378 * data.c (Feqlsign, Flss, Fgtr, Fleq, Fgeq): Add convenient
11379 'usage' docstring entry to pacify make-docfile.
11380
11381 2013-09-11 Barry O'Reilly <gundaetiapo@gmail.com>
11382
11383 Change comparison functions =, <, >, <=, >= to take many arguments.
11384 * data.c: Change comparison functions' interface and implementation.
11385 * lisp.h: Make arithcompare available for efficient two arg
11386 comparisons.
11387 * bytecode.c: Use arithcompare.
11388 * fileio.c: Use new interface.
11389
11390 2013-09-11 Stefan Monnier <monnier@iro.umontreal.ca>
11391
11392 * keyboard.c (read_char): Don't break immediate_echo (bug#15332).
11393
11394 2013-09-10 Stefan Monnier <monnier@iro.umontreal.ca>
11395
11396 * eval.c (Feval): Document the new use of `lexical'.
11397
11398 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
11399
11400 Review and drop old frame resize hack.
11401 * frame.h (struct frame): Remove force_flush_display_p.
11402 * dispnew.c (update_frame): Adjust user and don't call
11403 flush_frame here. The comment has said that there was an issues
11404 with redisplaying fringes, but I don't see any differences with
11405 and without this hack. Hopefully we can continue without it.
11406 * xdisp.c (clear_garbaged_frames): Adjust user and do not clear
11407 current frame matrices twice if resized_p is set.
11408
11409 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
11410
11411 Do not populate pure Xism x_sync to other ports.
11412 * frame.h (x_sync): Move under HAVE_X_WINDOWS.
11413 * frame.c (other_visible_frames) [HAVE_X_WINDOWS]: Use as such.
11414 * nsfns.m, w32xfns.c (x_sync): Remove no-op.
11415 * w32term.h (x_sync): Remove prototype.
11416
11417 2013-09-09 Dmitry Antipov <dmantipov@yandex.ru>
11418
11419 Cleanup frame flushing.
11420 * dispextern.h (struct redisplay_interface):
11421 Drop flush_display_optional because flush_display is enough
11422 for X and flushing via RIF is just a no-op for others.
11423 * frame.h (flush_frame): New function.
11424 * dispnew.c (update_frame):
11425 * minibuf.c (read_minibuf):
11426 * xdisp.c (echo_area_display, redisplay_preserve_echo_area):
11427 Use it.
11428 * keyboard.c (detect_input_pending_run_timers): Do not flush
11429 all frames but selected one in redisplay_preserve_echo_area.
11430 * nsterm.m (ns_flush): Remove no-op.
11431 (ns_redisplay_interface): Adjust user.
11432 * w32term.h (x_flush): Remove no-op.
11433 (w32_redisplay_interface): Adjust user.
11434 * xterm.c (x_flush): Simplify because we do not flush all
11435 frames at once any more. Adjust comment.
11436 (x_redisplay_interface): Adjust user.
11437
11438 2013-09-07 Paul Eggert <eggert@cs.ucla.edu>
11439
11440 Port --without-x --enable-gcc-warnings to Fedora 19.
11441 * gfilenotify.c (globals_of_gfilenotify):
11442 Call g_type_init only if using an older glib version that needs it.
11443
11444 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
11445
11446 * lisp.h (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
11447 (last_glyphless_glyph_merged_face_id): Remove declarations.
11448 * dispextern.h (merge_glyphless_glyph_face): Add prototype.
11449 * xdisp.c (last_glyphless_glyph_frame, last_glyphless_glyph_face_id)
11450 (last_glyphless_glyph_merged_face_id): Now static.
11451 (merge_escape_glyph_face): New function, refactored from...
11452 (get_next_display_element): ...here.
11453 (merge_glyphless_glyph_face): New function, refactored from...
11454 (produce_glyphless_glyph): ...here...
11455 * term.c (produce_glyphless_glyph): ...and here.
11456
11457 2013-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
11458
11459 * eval.c (eval_sub): Only call Ffunction if necessary.
11460
11461 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
11462
11463 Attempt to make redisplay more selective when changing cursor type.
11464 * frame.h (struct frame): New bitfield cursor_type_changed.
11465 * xdisp.c (cursor_type_changed): Remove.
11466 (try_cursor_movement, redisplay_window, try_window_id)
11467 (set_frame_cursor_types, try_window_reusing_current_matrix):
11468 Adjust to use per-frame bitfield.
11469 (redisplay_internal): Look for cursor type change on each visible
11470 frame and consider all frames if cursor type has been changed on
11471 the frame other than selected. If cursor type has been changed on
11472 selected frame only, do not use fast update.
11473
11474 2013-09-06 Dmitry Antipov <dmantipov@yandex.ru>
11475
11476 Attempt to make redisplay more selective when changing fonts.
11477 * frame.h (struct frame): New bitfield fonts_changed.
11478 * dispextern.h (fonts_changed_p, adjust_glyphs): Remove declaration.
11479 (adjust_frame_glyphs): Add prototype.
11480 * dispnew.c (fonts_changed_p): Remove.
11481 (adjust_glyphs): Remove because we do not
11482 adjust matrices on all frames at once any more.
11483 (adjust_frame_glyphs): Block and unblock input here.
11484 (adjust_glyph_matrix): Use fonts_changed.
11485 (change_frame_size_1): Use adjust_frame_glyphs.
11486 * font.c (font_open_entity): Use fonts_changed.
11487 * frame.c (set_menu_bar_lines, Fmake_terminal_frame):
11488 * w32fns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
11489 * window.c (Fdelete_other_windows_internal, Fwindow_resize_apply)
11490 (Fsplit_window_internal, Fdelete_window_internal, grow_mini_window)
11491 (shrink_mini_window, Fresize_mini_window_internal)
11492 (window_scroll_pixel_based, Fset_window_configuration)
11493 (apply_window_adjustment, Fset_window_vscroll):
11494 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines, Fx_show_tip):
11495 Use adjust_frame_glyphs.
11496 * xdisp.c (redisplay_tool_bar, redisplay_window, try_window)
11497 (try_window_reusing_current_matrix, try_window_id, display_line)
11498 (IT_EXPAND_MATRIX_WIDTH): Use fonts_changed.
11499 (redisplay_internal): Consider fonts_changed and adjust frame
11500 matrices for each frame only if the frame is visible. If font
11501 has been changed on some frame during full redisplay, retry
11502 only visible frames where the font has been actually changed.
11503
11504 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
11505
11506 Cache current header and mode line height for each window.
11507 * window.h (struct window): New fields mode_line_height
11508 and header_line_height.
11509 * window.c (make_window): Initialize them.
11510 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
11511 (CURRENT_HEADER_LINE_HEIGHT): Use them. Adjust comment.
11512 (current_mode_line_height, current_header_line_height):
11513 Remove declaration.
11514 * xdisp.c (current_mode_line_height, current_header_line_height):
11515 Remove.
11516 (pos_visible_p, init_xdisp): Adjust user.
11517 (redisplay_window): Invalidate mode_line_height and
11518 header_line_height if current and desired matrices do not agree.
11519
11520 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
11521
11522 * fontset.c, window.c, xdisp.c (toplevel): Use TERM_HEADER.
11523 * xfaces.c (toplevel) [HAVE_X_WINDOWS]: Do not include xterm.h twice.
11524
11525 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
11526
11527 Make --without-x compatible with --enable-gcc-warnings.
11528 * font.c (register_font_driver): Move check under HAVE_WINDOW_SYSTEM.
11529 * font.h (struct font_driver): Move draw, get_bitmap and free_bitmap
11530 members under HAVE_WINDOW_SYSTEM.
11531 * keyboard.c (make_lispy_focus_out): Likewise.
11532 (record_menu_key): Move under HAVE_MENUS.
11533 * xdisp.c (toplevel): Move hourglass_shown_p, hourglass_atimer and
11534 THIN_SPACE_WIDTH under HAVE_WINDOW_SYSTEM.
11535 (syms_of_xdisp): Adjust user.
11536 (window_box_edges): Define only if HAVE_WINDOW_SYSTEM.
11537 (start_hourglass, cancel_hourglass):
11538 * xfaces.c (toplevel): Likewise with PT_PER_INCH,
11539 clear_font_table_count, CLEAR_FONT_TABLE_COUNT
11540 and CLEAR_FONT_TABLE_NFONTS.
11541 (set_font_frame_param, clear_face_gcs, realize_non_ascii_face):
11542 Declare only if HAVE_WINDOW_SYSTEM.
11543 (lface_same_font_attributes_p, clear_face_gcs): Define only
11544 if HAVE_WINDOW_SYSTEM.
11545
11546 2013-09-05 Dmitry Antipov <dmantipov@yandex.ru>
11547
11548 * frame.c (check_minibuf_window): Update 'frame' with frame pointer.
11549 * xterm.c (x_scroll_bar_handle_click) [!USE_TOOLKIT_SCROLL_BARS]:
11550 Don't pass C integer to XINT (tiny fix for 2013-09-03 change).
11551
11552 2013-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
11553
11554 * cmds.c (Fself_insert_command): Don't pass a non-integer to XINT.
11555
11556 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
11557
11558 * alloc.c (make_event_array): First arg is now ptrdiff_t, not int.
11559 This fixes a type error on hosts where ptrdiff_t is wider than int.
11560
11561 2013-09-04 Stefan Monnier <monnier@iro.umontreal.ca>
11562
11563 * keyboard.c (read_key_sequence_vs): New function.
11564 (Fread_key_sequence_vector, Fread_key_sequence): Use it to factor out
11565 common code.
11566
11567 * callint.c (Fcall_interactively): Always return a vector for 'K'.
11568
11569 2013-09-04 Paul Eggert <eggert@cs.ucla.edu>
11570
11571 Makefile improvements.
11572 * Makefile.in (config.status): Don't use double-colon rules, as
11573 they are not portable according to POSIX. Fix shell typo with `;
11574 I guess this rule has never been tested?
11575 (VCSWITNESS): New macro, to override any environment var.
11576
11577 2013-09-04 Dmitry Antipov <dmantipov@yandex.ru>
11578
11579 * xterm.h (struct x_display_info): Do not track X connection
11580 fd separately because it is always available from Display.
11581 * xterm.c (x_term_init, x_delete_terminal, x_delete_display):
11582 Adjust users.
11583
11584 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
11585
11586 * buffer.c (drop_overlay):
11587 * fileio.c (restore_point_unwind): Prefer unchain_marker to
11588 Fset_marker (X, Qnil, ...) (which is the same but a bit slower).
11589
11590 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
11591
11592 * buffer.c (Fmake_overlay, Fmove_overlay):
11593 * intervals.c (set_point_from_marker):
11594 * print.c (PRINTPREPARE): Prefer signal_error
11595 to plain error and report unsuitable marker too.
11596
11597 2013-09-03 Dmitry Antipov <dmantipov@yandex.ru>
11598
11599 * xterm.h (struct scroll_bar): Prefer int to Lisp_Object
11600 for 'dragging' member.
11601 (struct x_output): Remove set-but-unused leftovers
11602 'left_before_move' and 'top_before_move'.
11603 * gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
11604 * xterm.c (xt_action_hook, xm_scroll_callback, xg_scroll_callback)
11605 (xg_end_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
11606 (x_set_toolkit_scroll_bar_thumb, x_scroll_bar_create)
11607 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
11608 (x_scroll_bar_handle_click, x_scroll_bar_note_movement)
11609 (x_scroll_bar_report_motion, x_set_offset): Related users changed.
11610 * xfns.c, image.c (XLIB_ILLEGAL_ACCESS): No longer needed.
11611
11612 2013-09-03 Jan Djärv <jan.h.d@swipnet.se>
11613
11614 * nsfont.m (INVALID_GLYPH): New define.
11615 (nsfont_encode_char): Use INVALID_GLYPH.
11616 (ns_uni_to_glyphs): Ditto, check for NSNullGlyph (Bug#15138).
11617
11618 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
11619
11620 * xterm.c (x_last_mouse_movement_time): Revert last change.
11621 This code should use XDisplayMotionBufferSize to check display's
11622 motion history first, and there are few other issues as well.
11623 (x_scroll_bar_note_movement): Pass XMotionEvent rather than XEvent.
11624 (handle_one_xevent): Adjust user.
11625
11626 2013-09-02 Martin Rudalics <rudalics@gmx.at>
11627
11628 * dispnew.c (Flast_nonminibuf_frame): Move from here ...
11629 * frame.c (Flast_nonminibuf_frame): ... to here.
11630 (check_minibuf_window): Don't abort if no window was found
11631 (Bug#15247).
11632
11633 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
11634
11635 Use XGetMotionEvents to ask the last mouse motion time from X server.
11636 * xterm.c (X_MOTION_HISTORY): Default to 1.
11637 (x_last_mouse_movement_time) [X_MOTION_HISTORY]: New function.
11638 (x_last_mouse_movement_time) [!X_MOTION_HISTORY]: Legacy version.
11639 (note_mouse_movement, x_scroll_bar_note_movement) [!X_MOTION_HISTORY]:
11640 Ifdef away legacy code.
11641 (XTmouse_position, x_scroll_bar_report_motion):
11642 Use x_last_mouse_movement_time.
11643 (handle_one_xevent): Use event.xunmap and not event.xmap when handling
11644 UnmapNotify event.
11645
11646 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
11647
11648 * msdos.c (last_mouse_window): Move to...
11649 (dos_rawgetc): ...this function and adjust comment.
11650 * nsterm.m (last_window): Rename to last_mouse_window, move to...
11651 (mouseMoved): ...this function and adjust comment.
11652 * w32term.c (last_window): Likewise with...
11653 (w32_read_socket): ...this function.
11654 * xterm.c (last_window): Likewise with...
11655 (handle_one_xevent): ...this function.
11656
11657 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
11658
11659 * window.h (Vmouse_window, Vmouse_event): Remove the leftovers.
11660 * xterm.c (toplevel): Drop obsolete comment and move compose_status...
11661 (handle_one_xevent): ...to here.
11662 (STORE_KEYSYM_FOR_DEBUG): Move under ENABLE_CHECKING and make no-op
11663 otherwise.
11664
11665 2013-09-02 Dmitry Antipov <dmantipov@yandex.ru>
11666
11667 * msdos.c (IT_set_terminal_window): Remove no-op.
11668 (initialize_msdos_display): Adjust terminal setup.
11669 * w32console.c (w32con_set_terminal_window): Remove no-op.
11670 (initialize_w32_display): Adjust terminal setup.
11671 * w32term.c (w32_set_terminal_window): Remove no-op.
11672 (w32_create_terminal): Adjust terminal setup.
11673 * xterm.c (XTset_terminal_window): Remove no-op.
11674 (x_create_terminal): Adjust terminal setup.
11675
11676 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
11677
11678 * nsterm.m (ns_set_terminal_modes, ns_reset_terminal_modes):
11679 Remove no-ops.
11680 (ns_create_terminal): Adjust terminal setup.
11681 * w32term.c (w32_set_terminal_modes, w32_reset_terminal_modes):
11682 Remove no-ops.
11683 (w32_create_terminal): Adjust terminal setup.
11684 * xterm.c (XTset_terminal_modes, XTreset_terminal_modes):
11685 Remove no-ops.
11686 (x_create_terminal): Adjust terminal setup.
11687
11688 2013-09-01 Dmitry Antipov <dmantipov@yandex.ru>
11689
11690 * dispextern.h (SET_TEXT_POS_FROM_MARKER): Indent.
11691 (CLIP_TEXT_POS_FROM_MARKER): New macro.
11692 * dispnew.c (buffer_posn_from_coords):
11693 * window.c (Fwindow_end, displayed_window_lines):
11694 * xdisp.c (redisplay_mode_lines): Use it.
11695
11696 2013-09-01 Jan Djärv <jan.h.d@swipnet.se>
11697
11698 * fontset.c (face_for_char): Check char in the current face font first
11699 if HAVE_NS (Bug#15138).
11700
11701 2013-08-31 Martin Rudalics <rudalics@gmx.at>
11702
11703 * window.c (temp_output_buffer_show): Make sure window returned
11704 by display_buffer is live (Bug#15213).
11705
11706 2013-08-30 Dmitry Antipov <dmantipov@yandex.ru>
11707
11708 Minor cleanup to avoid forward declarations.
11709 * coding.h (struct ccl_spec): Remove forward declaration.
11710 * composite.h (toplevel): Include font.h.
11711 (struct composition_it, struct face, struct font_metrics):
11712 Remove forward declaration.
11713 * dispextern.h (struct image, struct atimer): Likewise.
11714 * emacsgtkfixed.h (struct frame): Likewise.
11715 * emacsgtkfixed.c (toplevel): Reorder headers and drop stdio.h.
11716 * font.h (struct font_driver, struct font, struct glyph_string)
11717 (struct face): Remove forward declaration.
11718 * fontset.h (struct face, struct font): Likewise.
11719 * frame.h (toplevel): Style cleanup.
11720 (enum output_method): Move to...
11721 * termhooks.h (enum output_method): ...here.
11722 (struct glyph, struct frame, struct ns_display_info)
11723 (struct x_display_info, struct w32_display_info):
11724 Remove forward declaration.
11725 * xterm.h (toplevel): Include termhooks.h.
11726 (struct font, struct window, struct glyph_matrix, struct frame)
11727 (struct input_event, struct face, struct image): Remove forward
11728 declaration.
11729 * gtkutil.h (struct _widget_value): Likewise.
11730 * keyboard.h (toplevel): Include termhooks.h.
11731 (struct input_event): Remove forward declaration.
11732
11733 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
11734
11735 * intervals.c (set_point_from_marker): New function.
11736 * editfns.c (Fgoto_char):
11737 * process.c (Finternal_default_process_filter):
11738 * window.c (select_window_1): Use it.
11739 * buffer.h (set_point_from_marker): Add prototype.
11740
11741 2013-08-29 Eli Zaretskii <eliz@gnu.org>
11742
11743 * w32.c (term_winsock): Call release_listen_threads before calling
11744 WSACleanup.
11745 (_sys_wait_accept): Wait for accept event in a loop with a finite
11746 timeout, instead of waiting indefinitely. Will hopefully avoid
11747 hanging during exit because WSACleanup deadlocks waiting for the
11748 event object to be released. (Bug#14333)
11749
11750 * w32proc.c (release_listen_threads): New function, signals all
11751 the reader threads that listen for connections to stop waiting.
11752
11753 * w32.h (release_listen_threads): Add prototype.
11754
11755 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
11756
11757 * alloc.c (Fmake_marker, build_marker): Zero need_adjustment
11758 field of new marker (for sanity and safety).
11759 * lisp.h (XSETMARKER): Remove unused macro (it doesn't work
11760 anyway because XMISCTYPE is a function and can't be an lvalue).
11761
11762 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
11763
11764 * xterm.c (x_clear_area): Lost 7th arg because it is always False.
11765 (x_after_update_window_line, x_scroll_bar_create)
11766 (x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
11767 (handle_one_xevent, x_clear_frame_area):
11768 * gtkutil.c (xg_clear_under_internal_border, xg_update_scrollbar_pos):
11769 * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): Adjust users.
11770 * xterm.h (x_clear_area): Adjust prototype.
11771
11772 2013-08-29 Dmitry Antipov <dmantipov@yandex.ru>
11773
11774 Hook scanning and indentation functions to find_newline. This helps
11775 to avoid duplicated code and renders more respect to newline cache.
11776 * lisp.h (scan_newline): Prefer ptrdiff_t to EMACS_INT.
11777 * cmds.c (Fforward_line):
11778 * indent.c (scan_for_column, Fcurrent_indentation, indented_beyond_p):
11779 Use find_newline and avoid unnecessary point movements.
11780 * search.c (scan_newline): Implement on top of find_newline.
11781
11782 2013-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
11783
11784 * eval.c (Ffuncall): Fix handling of ((lambda ..) ..) in lexically
11785 scoped code (bug#11258).
11786
11787 2013-08-28 Davor Cubranic <cubranic@stat.ubc.ca> (tiny change)
11788
11789 * nsterm.m (last_window): New variable.
11790 (EV_TRAILER2): New macro.
11791 (EV_TRAILER): Call EV_TRAILER2.
11792 (mouseMoved:): Add support for mouse-autoselect-window
11793 on nextstep (Bug#6888).
11794
11795 2013-08-28 Andreas Schwab <schwab@suse.de>
11796
11797 * regex.c (CHAR_CHARSET, CHARSET_LEADING_CODE_BASE, CHAR_HEAD_P)
11798 (SINGLE_BYTE_CHAR_P, SAME_CHARSET_P, MAKE_CHAR, BYTE8_TO_CHAR):
11799 Remove unused macro definitions.
11800 (CHARSET_RANGE_TABLE_BITS, EXTEND_RANGE_TABLE)
11801 (SET_RANGE_TABLE_WORK_AREA_BIT, SET_RANGE_TABLE_WORK_AREA):
11802 Only define if emacs.
11803
11804 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
11805
11806 Prefer enum glyph_row_area to int where appropriate.
11807 * dispextern.h (enum glyph_row_area): Add ANY_AREA member.
11808 Fix comment.
11809 (window_box, window_box_width, window_box_left, window_box_left_offset)
11810 (window_box_right, window_box_right_offset): Adjust prototypes.
11811 * xdisp.c (window_box, window_box_width, window_box_left)
11812 (window_box_left_offset, window_box_right, window_box_right_offset):
11813 Use enum glyph_row_area. Adjust users and tweak comment where needed.
11814 (window_box_edges): Likewise. Lost 2nd arg since it is always ANY_AREA.
11815 * nsterm.m (ns_clip_to_row):
11816 * w32term.c (w32_clip_to_row):
11817 * xterm.c (x_clip_to_row): Likewise.
11818
11819 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
11820
11821 * buffer.c (Foverlays_at, Foverlays_in, Fnext_overlay_change)
11822 (Fprevious_overlay_change): Fast path for buffer with no overlays.
11823
11824 2013-08-28 Paul Eggert <eggert@cs.ucla.edu>
11825
11826 * Makefile.in (SHELL): Now @SHELL@, not /bin/sh,
11827 for portability to hosts where /bin/sh has problems.
11828
11829 2013-08-28 Dmitry Antipov <dmantipov@yandex.ru>
11830
11831 Redesign redisplay interface to drop global output_cursor.
11832 * dispextern.h (struct redisplay_interface): Remove cursor_to member.
11833 (toplevel): Remove declaration of output_cursor.
11834 (set_output_cursor, x_cursor_to): Remove prototype.
11835 * window.h (struct window): New member output_cursor.
11836 (output_cursor_to): New function to replace RIF member.
11837 * dispnew.c (redraw_overlapped_rows, update_marginal_area)
11838 (update_text_area, set_window_cursor_after_update): Use it.
11839 * xdisp.c (output_cursor, set_output_cursor, x_cursor_to): Remove.
11840 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
11841 * nsterm.m (ns_update_window_begin, ns_update_window_end):
11842 * w32term.c (x_update_window_begin, x_update_window_end):
11843 * xterm.c (x_update_window_begin, x_update_window_end):
11844 Adjust to use per-window output cursor.
11845
11846 2013-08-27 Paul Eggert <eggert@cs.ucla.edu>
11847
11848 Simplify SELECT_TYPE-related code.
11849 Like EMACS_TIME, this portability layer is no longer needed, since
11850 Emacs has been using fd_set as a portability layer for some time.
11851 * sysselect.h (FD_SETSIZE): Rename from MAXDESC. All uses changed.
11852 (SELECT_TYPE): Remove. All uses changed to fd_set.
11853 (fd_set) [!FD_SET]: New typedef.
11854
11855 Simplify EMACS_TIME-related code.
11856 This portability layer is no longer needed, since Emacs has been
11857 using struct timespec as a portability layer for some time.
11858 * atimer.h, buffer.h, dispextern.h, xgselect.h:
11859 Include <time.h> rather than "systime.h"; that's all that's needed now.
11860 * dispnew.c: Include <timespec.h> rather than "systime.h";
11861 that's all that's needed now.
11862 * systime.h (EMACS_TIME): Remove. All uses changed to struct timespec.
11863 (EMACS_TIME_RESOLUTION): Remove. All uses changed to
11864 TIMESPEC_RESOLUTION.
11865 (LOG10_EMACS_TIME_RESOLUTION): Remove. All uses changed to
11866 LOG10_TIMESPEC_RESOLUTION.
11867 (EMACS_SECS, emacs_secs_addr): Remove. All uses changed to tv_sec.
11868 (EMACS_NSECS): Remove. All uses changed to tv_nsec.
11869 (make_emacs_time): Remove. All used changed to make_timespec.
11870 (invalid_timespec): Rename from invalid_emacs_time. All uses changed.
11871 (current_timespec): Rename from current_emacs_time. All uses changed.
11872 (add_emacs_time): Remove. All uses changed to timespec_add.
11873 (sub_emacs_time): Remove. All uses change dot timespec_sub.
11874 (EMACS_TIME_SIGN): Remove. All uses changed to timespec_sign.
11875 (timespec_valid_p): Rename from EMACS_TIME_VALID_P. All uses changed.
11876 (EMACS_TIME_FROM_DOUBLE): Remove. All uses changed to dtotimespec.
11877 (EMACS_TIME_TO_DOUBLE): Remove. All uses changed to timespectod.
11878 (current_timespec): Rename from current_emacs_time. All uses changed.
11879 (EMACS_TIME_EQ, EMACS_TIME_LT, EMACS_TIME_LE): Remove. All uses
11880 changed to timespec_cmp.
11881 * xgselect.c: Include <timespec.h>, since our .h files don't.
11882
11883 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
11884
11885 * xterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE:)
11886 * nsterm.h (FONT_TYPE_FOR_UNIBYTE, FONT_TYPE_FOR_MULTIBYTE):
11887 Remove the leftovers.
11888 * gtkutil.c (toplevel): Do not declare Qxft but include
11889 font.h to do so.
11890 * image.c (toplevel): Do not declare Vlibrary_cache because
11891 it's already done in lisp.h.
11892
11893 2013-08-27 Dmitry Antipov <dmantipov@yandex.ru>
11894
11895 * lisp.h (Mouse_HLInfo): Move from here...
11896 * dispextern.h (Mouse_HLInfo): ...to here and offload lisp.h.
11897 (reset_mouse_highlight): New function.
11898 * msdos.c (dos_set_window_size, IT_update_begin)
11899 (internal_terminal_init):
11900 * nsterm.m (ns_update_window_end, x_free_frame_resources)
11901 (ns_initialize_display_info):
11902 * w32console.c (initialize_w32_display):
11903 * w32term.c (x_update_window_end, x_free_frame_resources)
11904 (w32_initialize_display_info):
11905 * xterm.c (x_update_window_end, x_free_frame_resources, x_term_init):
11906 * window.c (Fdelete_other_windows_internal):
11907 * xdisp.c (clear_mouse_face, cancel_mouse_face): Use it.
11908 * termchar.h (toplevel):
11909 * xterm.h (toplevel): Include dispextern.h.
11910
11911 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
11912
11913 Fix minor problems found by static checking.
11914 * image.c (XGetPixel, XPutPixel) [HAVE_NS]: Now static.
11915 (expect): Avoid nested-if warning.
11916 (x_build_heuristic_mask) [HAVE_NS]: Avoid unused-var warning.
11917 * nsmenu.m (fillWithWidgetValue:): Avoid type warning.
11918 * nsterm.h, nsterm.m (ns_select):
11919 * xgselect.c, xgselect.h (xg_select):
11920 Adjust signature to better match pselect's.
11921 * nsterm.m (ns_select):
11922 Don't set *TIMEOUT, since pselect doesn't.
11923 * regex.c (whitespace_regexp): Now const_re_char *, to avoid
11924 diagnostic about assigning const char * to it.
11925 * xfaces.c (x_display_info) [HAVE_NS]: Remove; unused.
11926
11927 2013-08-26 Stefan Monnier <monnier@iro.umontreal.ca>
11928
11929 * lread.c (substitute_object_recurse): Handle hash-tables as well
11930 (bug#15190).
11931
11932 2013-08-26 Paul Eggert <eggert@cs.ucla.edu>
11933
11934 Fix unlikely core dump in init_tty, and simplify terminfo case.
11935 * term.c (init_tty) [TERMINFO]: Fix check for buffer overrun.
11936 The old version incorrectly dumped core if malloc returned a
11937 buffer containing only non-NUL bytes.
11938 (init_tty): Do not allocate or free termcap buffers; the
11939 struct does that for us now.
11940 * termchar.h (TERMCAP_BUFFER_SIZE) [!TERMINFO]: New constant.
11941 (struct tty_display_info): Define members termcap_term_buffer and
11942 termcap_strings_buffer only if !TERMINFO, since terminfo doesn't
11943 use them. Allocate them directly in struct rather than indirectly
11944 via a pointer, to simplify init_tty.
11945
11946 * frame.c (check_minibuf_window): Initialize 'window' properly,
11947 so that Emacs reliably aborts later if 'window' is not initialized.
11948
11949 2013-08-26 Jan Djärv <jan.h.d@swipnet.se>
11950
11951 * gtkutil.c (xg_initialize): Set gtk-menu-bar-accel to "" instead
11952 of VoidSymbol (Bug#15154).
11953
11954 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
11955
11956 * lisp.h (Mouse_HLInfo): Drop set-but-unused members
11957 mouse_face_beg_y and mouse_face_end_y.
11958 * xdisp.c (note_tool_bar_highlight, mouse_face_from_buffer_pos)
11959 (mouse_face_from_string_pos, note_mode_line_or_margin_highlight):
11960 Adjust users and update comment where appropriate.
11961
11962 2013-08-26 Martin Rudalics <rudalics@gmx.at>
11963
11964 * frame.c (check_minibuf_window): New function.
11965 (delete_frame, Fmake_frame_invisible, Ficonify_frame):
11966 Call check_minibuf_window (Bug#15183).
11967
11968 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
11969
11970 * window.h (struct window): Replace last_cursor with last_cursor_vpos
11971 because this is the only last cursor data we need to keep and consult.
11972 * window.c (replace_window, set_window_buffer, Fsplit_window_internal):
11973 * xdisp.c (mark_window_display_accurate_1, try_cursor_movement):
11974 Adjust users.
11975
11976 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
11977
11978 Fix recovering from possible decompression error.
11979 Since insert_from_gap doesn't always move point, we can't use PT as
11980 the position where the partially decompressed data ends, and
11981 should count how many bytes was produced so far.
11982 * decompress.c (struct decompress_unwind_data): Add nbytes member.
11983 (unwind_decompress): Really delete partially uncompressed data.
11984 (Fzlib_decompress_region): Take decompressed data size into account.
11985
11986 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru>
11987
11988 * syntax.c (init_syntax_once): Adjust comment and do an early
11989 initialization of Qchar_table_extra_slots just once...
11990 * casetab.c (init_casetab_once):
11991 * category.c (init_category_once):
11992 * character.c (syms_of_character):
11993 * coding.c (syms_of_coding):
11994 * xdisp.c (syms_of_xdisp): ...and omit it here.
11995
11996 2013-08-24 Eli Zaretskii <eliz@gnu.org>
11997
11998 * xdisp.c (get_next_display_element): Don't apply to characters
11999 from a display vector the logic of setting it->end_of_box_run_p
12000 suitable for characters from a buffer. (Bug#15175)
12001
12002 * w32.c (fdutimens): Call 'utime', which is implemented on w32.c
12003 to handle directories, rather than '_utime' which doesn't.
12004 (Bug#15176)
12005
12006 2013-08-24 Jan Djärv <jan.h.d@swipnet.se>
12007
12008 * gtkutil.c (x_wm_set_size_hint): Don't set hints when maximized
12009 or fullscreen (Bug#14627).
12010
12011 2013-08-24 Paul Eggert <eggert@cs.ucla.edu>
12012
12013 System-dependent integer overflow fixes.
12014 * process.c (Fset_process_window_size): Signal an error if
12015 the window size is outside the range supported by the lower level.
12016 * sysdep.c (set_window_size): Return negative on error,
12017 nonnegative on success, rather than -1, 0, 1 on not in system,
12018 failure, success. This is simpler. Caller changed.
12019 (serial_configure): Remove unnecessary initialization of local.
12020 (procfs_get_total_memory) [GNU_LINUX]: Don't assume system memory
12021 size fits in unsigned long; this isn't true on some 32-bit hosts.
12022 Avoid buffer overrun if some future version of /proc/meminfo has a
12023 variable name longer than 20 bytes.
12024 (system_process_attributes) [__FreeBSD__]:
12025 Don't assume hw.availpages fits in 'int'.
12026
12027 2013-08-23 Paul Eggert <eggert@cs.ucla.edu>
12028
12029 Don't let very long directory names overrun the stack.
12030 Fix some related minor problems involving "//", vfork.
12031 * callproc.c (encode_current_directory): New function.
12032 (call_process): Don't append "/"; not needed.
12033 * fileio.c (file_name_as_directory_slop): New constant.
12034 (file_name_as_directory): Allow SRC to be longer than SRCLEN;
12035 this can save the caller having to alloca.
12036 (Ffile_name_as_directory, Fdirectory_file_name, Fexpand_file_name):
12037 Use SAFE_ALLOCA, not alloca.
12038 (directory_file_name, Fexpand_file_name): Leave leading "//"
12039 alone, since it can be special even on POSIX platforms.
12040 * callproc.c (call_process):
12041 * process.c (Fformat_network_address):
12042 * sysdep.c (sys_subshell):
12043 Use encode_current_directory rather than rolling our own.
12044 (create_process): No need to encode directory; caller does that now.
12045 * process.h (encode_current_directory): New decl.
12046 * sysdep.c (sys_subshell): Work even if vfork trashes saved_handlers.
12047 Rework to avoid 'goto xyzzy;'.
12048
12049 2013-08-23 Eli Zaretskii <eliz@gnu.org>
12050
12051 * xdisp.c (handle_face_prop): If the default face was remapped use
12052 the remapped face for strings from prefix properties. (Bug#15155)
12053
12054 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
12055
12056 Minor cleanup for redisplay interface and few related functions.
12057 * frame.h (enum text_cursor_kinds): Move from here...
12058 * dispextern.h (enum text_cursor_kinds): ...to here.
12059 (toplevel): Drop unnecessary declarations.
12060 (struct redisplay_interface): Use bool and enum text_cursor_kinds
12061 in update_window_end_hook and draw_window_cursor functions.
12062 (display_and_set_cursor, x_update_cursor): Adjust prototypes.
12063 * nsterm.m (ns_update_window_end, ns_draw_window_cursor):
12064 * w32term.c (x_update_window_end, w32_draw_window_cursor):
12065 * xterm.c (x_update_window_end, x_draw_window_cursor):
12066 * xdisp.c (display_and_set_cursor, update_window_cursor)
12067 (update_cursor_in_window_tree, x_update_cursor): Use bool and
12068 enum text_cursor_kinds where appropriate.
12069
12070 2013-08-23 Dmitry Antipov <dmantipov@yandex.ru>
12071
12072 Redesign redisplay interface to drop updated_row and updated_area.
12073 * dispextern.h (updated_row, updated_area): Remove declaration.
12074 (struct redisplay_interface): Pass glyph row and row area parameters
12075 to write_glyphs, insert_glyphs and clear_end_of_line functions.
12076 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
12077 Adjust prototypes.
12078 * dispnew.c (updated_row, updated_area): Remove.
12079 (redraw_overlapped_rows, update_window_line): Adjust user.
12080 (update_marginal_area, update_text_area): Likewise. Pass updated row
12081 as a parameter. Prefer enum glyph_row_area to int where appropriate.
12082 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
12083 Adjust users.
12084
12085 2013-08-22 Paul Eggert <eggert@cs.ucla.edu>
12086
12087 * process.c (flush_pending_output): Remove stub.
12088 All uses removed.
12089
12090 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
12091
12092 * callproc.c: Fix race that killed background processes (Bug#15144).
12093 (call_process): New arg TEMPFILE_INDEX. Callers changed.
12094 Record deleted process-id in critical section, not afterwards.
12095 Don't mistakenly kill process created by a call-process invocation
12096 that discards output and does not wait.
12097
12098 2013-08-21 Dmitry Antipov <dmantipov@yandex.ru>
12099
12100 Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE
12101 and GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES.
12102 * alloc.c (toplevel): Remove unnecessary nested #if...#endif.
12103 (mark_maybe_object) [!GC_MARK_STACK]: Define to emacs_abort
12104 to shut up compiler in mark_object.
12105 (dump_zombies): Convert to global and add EXTERNALLY_VISIBLE.
12106
12107 2013-08-21 Paul Eggert <eggert@cs.ucla.edu>
12108
12109 * process.c (allocate_pty) [PTY_OPEN]: Set fd's FD_CLOEXEC flag.
12110 We can't portably rely on PTY_OPEN doing that, even if
12111 it calls posix_openpt with O_CLOEXEC.
12112
12113 2013-08-20 Kenichi Handa <handa@gnu.org>
12114
12115 * character.c (string_char): Improve commentary.
12116
12117 2013-08-20 Paul Eggert <eggert@cs.ucla.edu>
12118
12119 * image.c (SIGNATURE_DIGESTSIZE): Remove.
12120 (struct animation_cache): Make signature a flexible array member.
12121 All uses changed. This is a tad slower but may insulate us better
12122 from future changes to ImageMagick.
12123
12124 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
12125
12126 * image.c: Shrink memory needed for animation cache.
12127 (SIGNATURE_DIGESTSIZE): New constant.
12128 (struct animation_cache): Make 'signature' a fixed size array of bytes.
12129 (imagemagick_create_cache): Copy the signature. This saves
12130 several KB of memory that ImageMagick wastes per signature.
12131 Don't bother updating the update_time, as the caller does that now.
12132 (imagemagick_prune_animation_cache): Don't destroy the signature, as
12133 it's a fixed size struct member now.
12134 (imagemagick_get_animation_cache): Always destroy the signature,
12135 as it's now imagemagick_create_cache's responsibility to copy it.
12136 Avoid duplicate calls to strcmp and to imagemagick_create_cache,
12137 and use memcmp rather than strcmp.
12138 eassert that ImageMagick returns a signature of the specified length.
12139
12140 2013-08-19 Lars Magne Ingebrigtsen <larsi@gnus.org>
12141
12142 * image.c (imagemagick_get_animation_cache): Don't segfault on
12143 each invocation.
12144 (imagemagick_get_animation_cache): Revert to previous definition
12145 so that it actually works. But keep the memory leak fix.
12146 (imagemagick_get_animation_cache): Fix memory leak.
12147
12148 2013-08-19 Paul Eggert <eggert@cs.ucla.edu>
12149
12150 * image.c: Fix animation cache signature memory leak.
12151 Fix some other minor performance problems while we're at it.
12152 (imagemagick_create_cache): Clear just the members that
12153 need clearing. Don't set update_time, as caller does that now.
12154 (imagemagick_prune_animation_cache, imagemagick_get_animation_cache):
12155 Simplify by using pointer-to-pointer instead of a prev pointer.
12156 (imagemagick_prune_animation_cache): Use make_emacs_time rather
12157 than EMACS_TIME_FROM_DOUBLE, and DestroyString rather than free.
12158 (imagemagick_get_animation_cache): Don't xstrdup the image signature;
12159 it's already a copy. Free the signature probe unless it's cached.
12160
12161 * process.c (handle_child_signal): Fix crash; deleted pid (Bug#15106).
12162 This was introduced by my 2013-08-12 fix for Bug#15035.
12163
12164 2013-08-19 Dmitry Antipov <dmantipov@yandex.ru>
12165
12166 * image.c (imagemagick_create_cache, imagemagick_get_animation_cache)
12167 (imagemagick_prune_animation_cache): Now static.
12168
12169 2013-08-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
12170
12171 * image.c (imagemagick_get_animation_cache): Don't segfault when
12172 pruning all entries.
12173
12174 2013-08-18 Ken Brown <kbrown@cornell.edu>
12175
12176 * sheap.c (STATIC_HEAP_SIZE): Adjust to current needs; use bigger
12177 static heap if ENABLE_CHECKING is defined.
12178 (max_bss_sbrk_ptr): New variable.
12179 (bss_sbrk): Use it.
12180 (report_sheap_usage): Report maximum static heap usage instead of
12181 ending static heap usage.
12182
12183 2013-08-17 Eli Zaretskii <eliz@gnu.org>
12184
12185 * decompress.c (Fzlib_available_p) [WINDOWSNT]: Update the value
12186 of zlib_initialized according to the results of calling
12187 init_zlib_functions.
12188
12189 2013-08-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
12190
12191 * image.c: Implement an ImageMagick per-image cache.
12192 (imagemagick_get_animation_cache): Fix a double-free error.
12193 (imagemagick_load_image): Remove the ping_wand code, which only
12194 apparently saved time on invalid animated images, and slowed down
12195 everything else. Optimize for the common case.
12196
12197 2013-08-16 Xue Fuqiao <xfq.free@gmail.com>
12198
12199 * buffer.c (syms_of_buffer) <buffer-undo-list>: Doc fix.
12200
12201 * editfns.c (insert_before_markers): Mention overlay in the doc string.
12202
12203 * marker.c (set_marker): Remove documentation of undefined behavior.
12204
12205 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
12206
12207 * image.c (imagemagick_compute_animated_image): Animate correctly
12208 when sub-images are smaller than the main image.
12209 (imagemagick_compute_animated_image): Setting the iterator row to
12210 zero is apparently not allowed.
12211 (imagemagick_compute_animated_image): Allow images that say they
12212 have sub-images that are bigger than the main image, but just crop
12213 them.
12214
12215 2013-08-15 Jan Djärv <jan.h.d@swipnet.se>
12216
12217 * nsmenu.m (menuWillOpen:): Fix preprocessor test (Bug#15001).
12218
12219 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
12220
12221 * image.c (imagemagick_compute_animated_image): Respect the GIF
12222 disposal methods.
12223
12224 2013-08-15 Ken Brown <kbrown@cornell.edu>
12225
12226 * emacs.c (main): Update comment about G_SLICE_ALWAYS_MALLOC.
12227 * gmalloc.c (memalign) [CYGWIN]: Revert last change; it's not
12228 needed.
12229
12230 2013-08-15 Paul Eggert <eggert@cs.ucla.edu>
12231
12232 Fix minor problems found by static checking.
12233 * frame.c (delete_frame):
12234 * xdisp.c (next_element_from_display_vector):
12235 Avoid uninitialized local.
12236 * image.c (imagemagick_compute_animated_image): Port to C89.
12237 Prefer usual GNU indentation style for loops.
12238 Be more careful about bizarrely large sizes, by using ptrdiff_t
12239 instead of int.
12240
12241 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
12242
12243 Fix infinite frame selection loop (Bug#15025).
12244 * frame.c (delete_frame): Prefer fast ad-hoc loop to next_frame.
12245
12246 2013-08-15 Eli Zaretskii <eliz@gnu.org>
12247
12248 * xdisp.c (compute_window_start_on_continuation_line):
12249 When WORD_WRAP is in effect, use move_it_to instead of move_it_by_lines
12250 to make sure we end up setting the window start at the leftmost
12251 visible character of the display line. This avoids funky
12252 horizontal shifting because the window start is not kept on the
12253 same position. (Bug#15090)
12254 (next_element_from_display_vector): Support 'box' face attribute
12255 in the face definitions of a display vector. (Bug#15099)
12256
12257 2013-08-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
12258
12259 * image.c (imagemagick_compute_animated_image): Implement animated
12260 images (bug#14700).
12261 (imagemagick_compute_animated_image): Fix some compilation
12262 warnings. Implement a very simple cache to make the animation
12263 usable at all, but it should be replaced with a per-image cache.
12264
12265 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
12266
12267 * lisp.h (FOR_EACH_ALIST_VALUE): New macro
12268 to do `for' loops over alist values.
12269 * buffer.h (FOR_EACH_BUFFER):
12270 * process.c (FOR_EACH_PROCESS): Use it.
12271 (handle_child_signal, status_notify, Fget_buffer_process)
12272 (kill_buffer_processes): Use FOR_EACH_PROCESS.
12273
12274 2013-08-15 Dmitry Antipov <dmantipov@yandex.ru>
12275
12276 * term.c (get_named_tty, create_tty_output, tty_free_frame_resources)
12277 (tty_free_frame_resources, delete_tty): Prefer eassert to emacs_abort.
12278 * image.c (make_image_cache): For struct image_cache, prefer xmalloc
12279 to xzalloc and so avoid redundant call to memset.
12280 * xterm.c (x_term_init): Avoid unnecessary initializations of dpyinfo
12281 members because it is allocated with xzalloc and so already zeroed.
12282
12283 2013-08-14 Ken Brown <kbrown@cornell.edu>
12284
12285 * gmalloc.c (memalign) [CYGWIN]: Rename to emacs_memalign
12286 (Bug#15094).
12287
12288 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12289
12290 Utility function and macro to copy Lisp string to C string.
12291 * lisp.h (xlispstrdupa): New macro.
12292 (xlispstrdup): New prototype.
12293 * alloc.c (xlispstrdup): New function.
12294 * callint.c (Fcall_interactively):
12295 * fileio.c (Ffile_name_directory, Fexpand_file_name)
12296 (Fsubstitute_in_file_name):
12297 * frame.c (Fmake_terminal_frame): Use xlispstrdupa.
12298 * image.c (x_create_bitmap_from_file):
12299 * w32term.c (w32_term_init):
12300 * xterm.c (x_term_init): Use xlispstrdup.
12301
12302 2013-08-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
12303
12304 * image.c (imagemagick_load_image): Make animated pictures work.
12305 There's still some problems with background color settings, though
12306 (bug#14700).
12307
12308 * decompress.c (unwind_decompress): Always restore point.
12309
12310 2013-08-14 Xue Fuqiao <xfq.free@gmail.com>
12311
12312 * marker.c (set_marker): Reformat documentation.
12313
12314 2013-08-14 Paul Eggert <eggert@cs.ucla.edu>
12315
12316 * xdisp.c (cursor_type_changed): Now static.
12317
12318 * image.c (imagemagick_filename_hint): New arg HINT_BUFFER.
12319 Use changed. This avoids the need to call xmalloc and for the
12320 caller to call xfree, and avoids memory leaks in some situations.
12321
12322 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12323
12324 * xdisp.c (adjust_window_ends): Move duplicated code to new function.
12325 (try_window, try_window_reusing_current_matrix, try_window_id): Use it.
12326 (redisplay_window): If window_end_valid is cleared due to non-zero
12327 windows_or_buffers_changed, clear current_matrix_up_to_date_p and
12328 so do not call to try_cursor_movement for that window.
12329
12330 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12331
12332 * window.h (struct window): Convert window_end_pos and
12333 window_end_vpos from Lisp_Object to ptrdiff_t and int, respectively.
12334 (wset_window_end_pos, wset_window_end_vpos): Remove.
12335 * dispnew.c (adjust_glyph_matrix):
12336 * window.c (Fwindow_end, replace_window, set_window_buffer)
12337 (make_window):
12338 * xdisp.c (check_window_end, move_it_to, redisplay_internal)
12339 (set_vertical_scroll_bar, redisplay_window, try_window)
12340 (try_window_reusing_current_matrix, find_first_unchanged_at_end_row)
12341 (try_window_id, decode_mode_spec, mouse_face_from_buffer_pos)
12342 (note_mouse_highlight): Adjust users.
12343 (try_cursor_movement): Likewise. Convert old precondition to eassert.
12344 Add comment.
12345
12346 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12347
12348 Fix --enable-gcc-warnings errors introduced in 2013-08-13 commit.
12349 * image.c (imagemagick_filename_hint): Use `const char *' and
12350 prefer SSDATA to SDATA to avoid warnings.
12351
12352 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12353
12354 Cleanup window fringes, margins and scroll bars adjustments.
12355 * window.c (set_window_fringes, set_window_margins)
12356 (set_window_scroll_bars, apply_window_adjustment): New functions.
12357 (set_window_buffer, Fset_window_margins, Fset_window_fringes)
12358 (Fset_window_scroll_bars): Use them.
12359
12360 2013-08-14 Dmitry Antipov <dmantipov@yandex.ru>
12361
12362 * window.h (struct window): Convert scroll_bar_width
12363 from Lisp_Object to integer. Adjust comment.
12364 (WINDOW_CONFIG_SCROLL_BAR_WIDTH, WINDOW_CONFIG_SCROLL_BAR_COLS):
12365 Adjust users.
12366 * window.c (wset_scroll_bar_width): Remove.
12367 (make_window): Initialize scroll_bar_width.
12368 (Fsplit_window_internal): Use direct assignment.
12369 (Fset_window_configuration, save_window_save):
12370 Convert Lisp_Object to integer and back where appropriate.
12371 (Fset_window_scroll_bars): Adjust user. Return t if any scroll
12372 bar was actually changed, and mention this in docstring.
12373
12374 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
12375
12376 * decompress.c: Minor simplifications.
12377 (Fzlib_decompress_region): Don't bother verifying
12378 that avail_out <= UINT_MAX, as that was confusing.
12379 Mention the restriction in a comment instead.
12380 Prefer 'int' to 'ptrdiff_t' when 'int' is wide enough.
12381
12382 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
12383
12384 * nsmenu.m (x_activate_menubar): Check for OSX >= 10.5
12385 (trackingNotification:): Call ns_check_menu_open only for OSX >= 10.5.
12386
12387 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
12388
12389 * image.c (imagemagick_filename_hint): Check for errors in the
12390 alist structure.
12391
12392 2013-08-13 Eli Zaretskii <eliz@gnu.org>
12393
12394 * window.c (Fwindow_margins): Return nil when there's no marginal
12395 area, as per the documented API.
12396
12397 * w32term.c (x_scroll_bar_create): Use ALLOCATE_PSEUDOVECTOR, not
12398 Fmake_vector, as scroll bar's struct members are not all Lisp
12399 objects now. This avoids crashes in GC.
12400
12401 * w32term.h (struct scroll_bar): Convert fringe_extended_p to a
12402 bool, so its address could be taken.
12403
12404 2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
12405
12406 * image.c (imagemagick_filename_hint): New function to possibly
12407 apply `image-content-type-suffixes'.
12408 (imagemagick_load_image): Use it.
12409
12410 2013-08-13 Eli Zaretskii <eliz@gnu.org>
12411
12412 * decompress.c (Fzlib_decompress_region) [WINDOWSNT]: Return Qnil
12413 if loading zlib failed.
12414
12415 2013-08-13 Jan Djärv <jan.h.d@swipnet.se>
12416
12417 * nsterm.m (ns_set_vertical_scroll_bar): Fix breakage intruduced by
12418 2013-08-13 checkin below. Change bool to BOOL, rule is:
12419 All Obj-C code uses BOOL, except for interfaces callable from C.
12420
12421 * nsterm.h: Fix CGFloat for OSX 10.4 (Bug#15086).
12422
12423 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12424
12425 * window.h (WINDOW_FRINGE_EXTENDED_P): New macro.
12426 * nsterm.m (ns_set_vertical_scroll_bar): Use it. Use convenient
12427 bool instead of BOOL.
12428 * w32term.h (struct scroll_bar): Convert fringe_extended_p
12429 from Lisp_Object to bitfield. Adjust comment.
12430 * w32term.c (x_scroll_bar_create): Adjust user.
12431 Use WINDOW_FRINGE_EXTENDED_P and bool for boolean.
12432 * xterm.c (XTset_vertical_scroll_bar): Likewise.
12433 Use bool for boolean.
12434 * xterm.h (struct scroll_bar): Prefer commonly used `unsigned'
12435 to `unsigned int' when defining a bitfield.
12436
12437 2013-08-13 Paul Eggert <eggert@cs.ucla.edu>
12438
12439 * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'.
12440
12441 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12442
12443 * window.h (struct window): Convert left_margin_cols and
12444 right_margin_cols from Lisp_Objects to integers. Adjust comment.
12445 (WINDOW_LEFT_MARGIN_COLS, WINDOW_RIGHT_MARGIN_COLS)
12446 (WINDOW_LEFT_MARGIN_WIDTH, WINDOW_RIGHT_MARGIN_WIDTH):
12447 Adjust users.
12448 * dispnew.c (margin_glyphs_to_reserve): Convert 3rd arg to int.
12449 Adjust comment.
12450 (showing_window_margins_p, update_window_line, update_frame_1):
12451 * fringe.c (draw_fringe_bitmap_1):
12452 * xdisp.c (window_box_width): Adjust users.
12453 * window.c (wset_left_margin_cols, wset_right_margin_cols): Remove.
12454 (adjust_window_margins, set_window_buffer, Fsplit_window_internal):
12455 Use direct assignment.
12456 (Fset_window_configuration, save_window_save, Fwindow_margins):
12457 Convert Lisp_Object to integer and back where appropriate.
12458 (Fset_window_margins): Adjust user. Return t if any margin
12459 was actually changed, and mention this in docstring.
12460
12461 2013-08-13 Xue Fuqiao <xfq.free@gmail.com>
12462
12463 * syntax.c (forward_word):
12464 * cmds.c (forward_char, backward_char): Mention the optional argument.
12465
12466 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12467
12468 * window.h (struct window): Convert left_fringe_width
12469 and right_fringe_width from Lisp_Objects to integers.
12470 Adjust comment.
12471 (WINDOW_FRINGE_COLS, WINDOW_LEFT_FRINGE_WIDTH)
12472 (WINDOW_RIGHT_FRINGE_WIDTH): Adjust users.
12473 * window.c (wset_left_fringe_width, wset_right_fringe_width):
12474 Remove.
12475 (make_window): Initialize new integer fields to -1.
12476 (Fsplit_window_internal): Use direct assignment.
12477 (Fset_window_configuration, save_window_save):
12478 Convert Lisp_Object to integer and back where appropriate.
12479 (Fset_window_fringes): Adjust user. Return t if any fringe
12480 was actually changed, and mention this in docstring.
12481
12482 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12483
12484 * keyboard.c (Fdiscard_input): Do not increment update_mode_lines.
12485 * nsfns.m (x_set_cursor_type):
12486 * w32fns.c (x_set_cursor_type):
12487 * xfns.c (x_set_cursor_type): Do not set cursor_type_changed here...
12488 * xdisp.c (set_frame_cursor_types): ...but in common code.
12489
12490 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12491
12492 * font.c (clear_font_cache): New function, stripped from...
12493 (Fclear_font_cache): ...here, which now uses the function
12494 above. Adjust comment.
12495 * font.h (clear_font_cache): Add prototype.
12496 * xfaces.c (clear_face_cache): Use clear_font_cache.
12497
12498 2013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
12499
12500 * window.c (Fset_window_start): Compare `w', not `window' because
12501 `w' might not be equal to `window' after call to decode_live_window.
12502
12503 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
12504
12505 * process.c (deactivate_process): Reset fds to -1 (Bug#15035).
12506 This fixes a problem introduced by the Bug#15035 patch
12507 when using GPG. Reported by Herbert J. Skuhra.
12508
12509 2013-08-12 Eli Zaretskii <eliz@gnu.org>
12510
12511 * decompress.c <zlib_initialized> [WINDOWSNT]: New static variable.
12512 (Fzlib_decompress_region) [WINDOWSNT]: Call init_zlib_functions if
12513 not yet initialized.
12514
12515 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
12516
12517 * decompress.c (Fzlib_decompress_region): Support zlib
12518 decompression, too, and rename.
12519
12520 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
12521
12522 Minor zlib configuration tweaks.
12523 * decompress.c (fn_inflateInit2) [!WINDOWSNT]:
12524 Don't assume presence of fn_inflateInit2_ zlib internal function.
12525
12526 2013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
12527
12528 * decompress.c (Fzlib_decompress_gzipped_region): Rename to
12529 include the zlib prefix.
12530
12531 2013-08-12 Eli Zaretskii <eliz@gnu.org>
12532
12533 * decompress.c [WINDOWSNT]: Include windows.h and w32.h.
12534 (DEF_ZLIB_FN, LOAD_ZLIB_FN) [WINDOWSNT]: New macros. Use them to
12535 define static variables that are pointers to zlib functions to be
12536 dynamically loaded.
12537 (init_zlib_functions) [WINDOWSNT]: New function.
12538 (fn_inflateInit2_, fn_inflate, fn_inflateEnd, fn_inflateInit2):
12539 New macros.
12540 (Fdecompress_gzipped_region, unwind_decompress): Use the fn_*
12541 macros instead of invoking the zlib functions directly.
12542 (syms_of_decompress): DEFSYM Qzlib_dll.
12543 Staticpro Szlib_available_p.
12544
12545 2013-08-12 Dmitry Antipov <dmantipov@yandex.ru>
12546
12547 Avoid looping over all frame windows to freeze and unfreeze.
12548 * window.h (struct window): Drop frozen_window_start_p.
12549 (freeze_window_starts): Drop prototype.
12550 * frame.h (struct frame): New frozen_window_starts flag.
12551 (FRAME_WINDOWS_FROZEN): New macro.
12552 * window.c (freeze_window_start, freeze_window_starts):
12553 Remove.
12554 (select_window, replace_window): Adjust users.
12555 * xdisp.c (resize_mini_window): Use FRAME_WINDOWS_FROZEN.
12556 (window_frozen_p): New function.
12557 (redisplay_window): Use it.
12558
12559 2013-08-12 Paul Eggert <eggert@cs.ucla.edu>
12560
12561 Fix some fd issues when running subprocesses (Bug#15035).
12562 Fix bugs that can leak files or file descriptors on errors.
12563 Don't unlink open temp files, as that's hard for users to diagnose
12564 when things go awry (e.g., temp disk exhausted).
12565 Don't bother to lock temp files. Check for invalid recursion.
12566 * callproc.c (synch_process_fd): Remove. All uses removed.
12567 (synch_process_tempfile): New var or macro.
12568 (CALLPROC_STDOUT, CALLPROC_STDERR, CALLPROC_PIPEREAD, CALLPROC_FDS):
12569 New constants.
12570 (record_kill_process): New arg, the temp name. All callers changed.
12571 (delete_temp_file): Now just a simple wrapper around unlink.
12572 (call_process_kill): New arg, the call_process_fd array.
12573 Close them all. Clear synch_process_pid. Remove the temp file,
12574 or arrange for it to be removed.
12575 (call_process_cleanup) [MSDOS]: Arg no longer contains file name;
12576 that's been moved to synch_process_tempfile. Caller changed.
12577 Do not remove the tempfile; that's now call_process_kill's
12578 responsibility.
12579 (call_process_cleanup) [!MSDOS]: Do not record unwind-protect for
12580 call_process_kill; the caller now does that.
12581 (call_process_cleanup): Do not close the process fd; that's now
12582 call_process_kill's responsibility.
12583 (Fcall_process): Implement via new function call_process, which
12584 has most of the old body of Fcall_process, but with a different API.
12585 (call_process): New function that does not open or close filefd if
12586 it is nonnegative. Record which fds need to be closed, and let
12587 call_process_kill close (and remove the tempfile, on MSDOS) on error.
12588 Signal an error if invoked recursively (could be done via a hook).
12589 Simplify creation of the tempfile in the MSDOS case.
12590 Don't create the output file until after checking for the executable.
12591 Report any failure to open /dev/null.
12592 Don't open /dev/null for writing twice; once is enough.
12593 Don't create pipe if all output is being discarded or sent to file.
12594 Don't worry about setting up the coding system or reading from the
12595 pipe if all output is being discarded.
12596 Hoist fd_error local into top level, to lessen block nesting.
12597 Don't record deleted pid here; now done by Fcall_process_region.
12598 (Fcall_process) [MSDOS]: Report mktemp failure immediately,
12599 and note its success in synch_process_tempfile.
12600 Do not leak resources when child_setup fails.
12601 (Fcall_process) [!MSDOS && !WINDOWSNT]: Remove duplicate assignment
12602 to child_errno. Remove unnecessary close of fd0; it's close-on-exec.
12603 (create_temp_file): Now returns open fd, with an additional
12604 Lisp_Object * argument to return the name. All callers changed.
12605 Do not close the file; rewind it instead, and leave it open for
12606 the caller. Do not lock the temp file. Unwind-protect the file
12607 and the file-descriptor.
12608 (Fcall_process_region): If the input is /dev/null, unwind-protect it.
12609 If an asynchrounous process, record it here, not in call_process.
12610 (syms_of_callproc) [MSDOS]: Initialize synch_process_tempfile.
12611 * eval.c (set_unwind_protect): New function.
12612 * fileio.c (write_region): New function, generalized from the
12613 old Fwrite_region. Do not lock temp files.
12614 (Fwrite_region): Use it.
12615 * lisp.h (set_unwind_protect, write_region): New decls.
12616 * process.c: Include <verify.h>.
12617 (make_process): Mark fds as initially closed.
12618 (deleted_pid_list): Now a list of pid-filename pairs.
12619 All uses changed.
12620 (close_process_fd): New function.
12621 (SUBPROCESS_STDIN, WRITE_TO_SUBPROCESS, READ_FROM_SUBPROCESS)
12622 (SUBPROCESS_STDOUT, READ_FROM_EXEC_MONITOR, EXEC_MONITOR_OUTPUT):
12623 New constants. Verify that their number matches PROCESS_OPEN_FDS.
12624 (create_process, create_pty, Fmake_serial_process)
12625 (server_accept_connection): Record which fds need to be closed,
12626 and let deactivate_process close them.
12627 (Fmake_network_process): Do not discard the unwind-protect
12628 until it's safe to do so.
12629 (deactivate_process): Close the fds opened by create_process etc.
12630 (Fprocess_send_eof): Adjust to new way of recording open fds.
12631 Report an error if /dev/null can't be opened, instead of aborting.
12632 * process.h (PROCESS_OPEN_FDS): New constant.
12633 (struct Lisp_Process): New member open_fds.
12634 (record_kill_process, record_deleted_pid): Adjust signatures.
12635 (record_deleted_pid): Move decl here ...
12636 * syswait.h (record_deleted_pid): ... from here.
12637
12638 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
12639
12640 * decompress.c: Fix bugs with large buffers and weird inputs.
12641 Tune a bit. Reindent as per usual Emacs style.
12642 (BUFFER_SIZE): Remove.
12643 (Fdecompress_gzipped_region): Do not mishandle input buffers with
12644 more than UINT_MAX bytes. Decompress into the gap instead of into
12645 an auto buffer, as this should avoid copying. Return nil if
12646 'inflate' returns Z_NEED_DICT, as we have no dictionary. Do not
12647 set immediate_quit; we shouldn't trust zlib code that much.
12648
12649 2013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
12650
12651 * decompress.c (Fdecompress_gzipped_region): Respect all zlib
12652 errors, and really move the gap to where we want it.
12653
12654 * lisp.h: Include decompress.c support.
12655
12656 * emacs.c (main): Include decompress.c support.
12657
12658 * Makefile.in: Include -lz if present.
12659
12660 2013-08-11 Jan Djärv <jan.h.d@swipnet.se>
12661
12662 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:frame:
12663 (initWithTitle:): Initialize frame to 0.
12664 (fillWithWidgetValue:): Call fillWithWidgetValue:frame.
12665 (fillWithWidgetValue:frame:): Rename from
12666 fillWithWidgetValue:setDelegate, call initWithTile:frame: if f.
12667
12668 * nsterm.h (EmacsMenu): fillWithWidgetValue:setDelegate renamed to
12669 fillWithWidgetValue:frame:
12670
12671 * nsfns.m (Fns_convert_utf8_nfd_to_nfc): Allocate and release pool to
12672 remove memory leak warnings.
12673
12674 * nsterm.m (menu_pending_title, ns_get_pending_menu_title): Remove.
12675 (ns_check_menu_open): Handle menu == nil. Remove assignment to
12676 menu_pending_title.
12677
12678 * nsmenu.m (ns_update_menubar): Call fillWithWidgetValue:setDelegate.
12679 (x_activate_menubar): Update the whole menu.
12680 (trackingNotification:): Call ns_check_menu_open if tracking ends.
12681 (menuWillOpen:): Increment trackingMenu. For OSX <= 10.6, exit if
12682 current event is not NSSystemDefined (Bug#15001).
12683 Call ns_check_menu_open only if trackingMenu is 2.
12684 (menuDidClose:): New method, decrease trackingMenu.
12685 (fillWithWidgetValue:setDelegate:): New method.
12686 (fillWithWidgetValue:): Call the above.
12687
12688 * nsterm.h (EmacsMenu): Add fillWithWidgetValue:setDelegate:
12689
12690 2013-08-11 Paul Eggert <eggert@cs.ucla.edu>
12691
12692 Omit some unnecessary casts.
12693 Many of these go back to the old pre-C89 days, when they may have
12694 been needed, but we've been assuming C89 or later for a while now.
12695 * alloc.c (live_string_p, live_cons_p, live_symbol_p)
12696 (live_float_p, live_misc_p, live_vector_p):
12697 * buffer.c (compare_overlays, cmp_for_strings, mmap_find)
12698 (mmap_alloc, alloc_buffer_text, enlarge_buffer_text)
12699 (defvar_per_buffer):
12700 * callint.c (Fcall_interactively):
12701 * doc.c (Fsubstitute_command_keys):
12702 * filelock.c (get_boot_time):
12703 * frame.c (xrdb_get_resource):
12704 * gtkutil.c (hierarchy_ch_cb, qttip_cb, style_changed_cb)
12705 (delete_cb, xg_dialog_response_cb, xg_maybe_add_timer)
12706 (xg_get_file_name_from_selector, menuitem_destroy_callback)
12707 (menuitem_highlight_callback, menu_destroy_callback)
12708 (xg_update_menu_item, xg_modify_menubar_widgets, menubar_map_cb)
12709 (xg_tool_bar_callback, xg_get_tool_bar_widgets)
12710 (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
12711 (xg_tool_bar_help_callback, tb_size_cb):
12712 * image.c (xpm_alloc_color, png_read_from_memory)
12713 (png_read_from_file, png_load_body, our_memory_skip_input_data)
12714 (jpeg_memory_src, jpeg_file_src, imagemagick_load_image)
12715 (syms_of_image):
12716 * keymap.c (describe_map):
12717 * nsfns.m (Fns_display_monitor_attributes_list):
12718 * nsmenu.m (process_dialog:):
12719 * nsterm.m (hold_event):
12720 * process.c (wait_reading_process_output):
12721 * regex.c (REGEX_REALLOCATE, re_set_registers, re_exec, regexec):
12722 * scroll.c (do_direct_scrolling, scrolling_1):
12723 * termcap.c (tgetent):
12724 * window.c (check_window_containing, add_window_to_list)
12725 (freeze_window_starts):
12726 * xdisp.c (compare_overlay_entries, vmessage):
12727 * xfns.c (x_window, x_get_monitor_attributes_xinerama)
12728 (x_get_monitor_attributes_xrandr)
12729 (Fx_display_monitor_attributes_list, x_display_info_for_name)
12730 (Fx_open_connection, file_dialog_cb, file_dialog_unmap_cb):
12731 * xfont.c (xfont_match, xfont_open):
12732 * xmenu.c (x_menu_wait_for_event, menu_highlight_callback)
12733 (menubar_selection_callback, menu_position_func)
12734 (popup_selection_callback, create_and_show_popup_menu)
12735 (dialog_selection_callback, create_and_show_dialog):
12736 * xrdb.c (x_get_string_resource)
12737 (main) [TESTRM]:
12738 * xsmfns.c (x_session_check_input):
12739 * xterm.c (x_draw_glyphless_glyph_string_foreground)
12740 (xm_scroll_callback, xg_scroll_callback, xg_end_scroll_callback)
12741 (xaw_jump_callback, xaw_scroll_callback):
12742 Omit unnecessary casts.
12743
12744 2013-08-10 Paul Eggert <eggert@cs.ucla.edu>
12745
12746 Minor string-length refactoring.
12747 * alloc.c (xstrdup): Use memcpy, not strcpy, since the length's known.
12748 * frame.c (make_monitor_attribute_list):
12749 Prefer build_string to strlen + make_string.
12750
12751 2013-08-10 Jan Djärv <jan.h.d@swipnet.se>
12752
12753 * xterm.c (x_error_handler): Also ignore BadWindow for X_SetInputFocus,
12754 don't check minor_code (Bug#14417).
12755
12756 2013-08-09 Eli Zaretskii <eliz@gnu.org>
12757
12758 * xdisp.c (draw_glyphs): Don't compare row pointers, compare row
12759 vertical positions instead. This avoids calling MATRIX_ROW with
12760 row numbers that are possibly beyond valid limits. (Bug#15064)
12761
12762 2013-08-09 Dmitry Antipov <dmantipov@yandex.ru>
12763
12764 Use xstrdup and build_unibyte_string where applicable.
12765 * alloc.c (xstrdup): Tiny cleanup. Add eassert.
12766 * xfns.c (x_window):
12767 * xrdb.c (x_get_customization_string):
12768 * xterm.c (xim_initialize):
12769 * w32fns.c (w32_window): Use xstrdup.
12770 (w32_display_monitor_attributes_list):
12771 * emacs.c (init_cmdargs):
12772 * keyboard.c (PUSH_C_STR):
12773 * nsfont.m (nsfont_open):
12774 * sysdep.c (system_process_attributes):
12775 * w32.c (system_process_attributes):
12776 * xdisp.c (message1, message1_nolog): Use build_unibyte_string.
12777
12778 2013-08-09 Eli Zaretskii <eliz@gnu.org>
12779
12780 * w32.c (PEXCEPTION_POINTERS, PEXCEPTION_RECORD, PCONTEXT): Define
12781 variables of these types so that GDB would know about them, as aid
12782 for debugging fatal exceptions. (Bug#15024) See also
12783 http://sourceware.org/ml/gdb/2013-08/msg00010.html for related
12784 discussions.
12785
12786 2013-08-08 Jan Djärv <jan.h.d@swipnet.se>
12787
12788 * nsterm.m (ns_update_begin): Don't change clip path if it would be
12789 larger than the NSWindow (Bug#14934).
12790
12791 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
12792
12793 Redesign redisplay interface to drop global variable updated_window.
12794 Always pass currently updated window as a parameter to update routines.
12795 * dispextern.h (updated_window): Remove declaration.
12796 (struct redisplay_interface): Pass window parameter to
12797 write_glyphs, insert_glyphs, clear_end_of_line, cursor_to
12798 and after_update_window_hook.
12799 (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line, x_cursor_to):
12800 Adjust prototypes.
12801 * dispnew.c (updated_window): Remove.
12802 (redraw_overlapped_rows, update_marginal_area, update_text_area)
12803 (update_window_line): Adjust to match redisplay interface changes.
12804 * nsterm.m (ns_update_window_begin, ns_update_window_end)
12805 (ns_scroll_run, ns_after_update_window_line):
12806 * w32term.c (x_update_window_begin, x_update_window_end)
12807 (x_after_update_window_line, x_scroll_run):
12808 * xterm.c (x_update_window_begin, x_update_window_end)
12809 (x_after_update_window_line, x_scroll_run):
12810 * xdisp.c (x_write_glyphs, x_insert_glyphs, x_clear_end_of_line):
12811 Likewise. Adjust comments where appropriate.
12812 (x_cursor_to): Simplify because this is always called during window
12813 update (but install debugging check anyway).
12814 (expose_window): Check must_be_updated_p flag to see whether this
12815 function is called during window update.
12816
12817 2013-08-08 Dmitry Antipov <dmantipov@yandex.ru>
12818
12819 Do not reset window modification event counters excessively.
12820 These leftovers and poor man's tricky methods to catch extra
12821 redisplay's attention are no longer needed.
12822 * frame.c (set_menu_bar_lines_1):
12823 * minibuf.c (read_minibuf_unwind):
12824 * window.c (Fset_window_start, set_window_buffer, window_resize_apply)
12825 (grow_mini_window, shrink_mini_window, window_scroll_pixel_based)
12826 (window_scroll_line_based, Fset_window_configuration):
12827 * xdisp.c (redisplay_window): Do not reset last_modified and
12828 last_overlay_modified counters.
12829
12830 2013-08-07 Jan Djärv <jan.h.d@swipnet.se>
12831
12832 * xselect.c (x_send_client_event): Set send_event and serial, memset
12833 data.l as it might be bigger than data.b. Use 24 bit mask to
12834 XSendEvent (Bug#15034).
12835
12836 2013-08-07 Eli Zaretskii <eliz@gnu.org>
12837
12838 * xdisp.c (prepare_menu_bars): Don't call x_consider_frame_title
12839 for TTY frames that are not the top frame on their console.
12840 (Bug#14616)
12841
12842 2013-08-07 Martin Rudalics <rudalics@gmx.at>
12843
12844 * w32term.c (w32fullscreen_hook): Really maximize frame when
12845 asked for (Bug#14841).
12846
12847 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
12848
12849 Prefer selected_window to Fselected_window, likewise for frames.
12850 * buffer.c (Fbuffer_swap_text):
12851 * data.c (Fvariable_binding_locus):
12852 * window.c (run_window_configuration_change_hook): Adjust users.
12853 * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data):
12854 Use decode_live_frame.
12855
12856 2013-08-07 Dmitry Antipov <dmantipov@yandex.ru>
12857
12858 Be more careful if selected window shows the buffer other than current,
12859 use window_outdated only if this is not so. This change should also
12860 address some weird issues discussed in Bug#13012.
12861 * window.h (window_outdated): New prototype.
12862 * window.c (window_outdated): Now here. Convert from static and
12863 always assume window's buffer.
12864 (Fwindow_end, Fwindow_line_height): Use it.
12865 * xdisp.c (reconsider_clip_changes): Remove prototype, drop 2nd arg
12866 and always assume window's buffer.
12867 (redisplay_window): Adjust user.
12868 (redisplay_internal): Call to reconsider_clip_changes once and
12869 check whether mode line should be updated only if selected window
12870 shows current buffer.
12871 (run_window_scroll_functions): Use eassert for debugging check.
12872 (Fmove_point_visually, note_mouse_highlight): Use window_outdated.
12873
12874 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
12875
12876 * window.c (window_scroll, window_scroll_pixel_based)
12877 (window_scroll_line_based): Use bool for booleans.
12878
12879 2013-08-06 Paul Eggert <eggert@cs.ucla.edu>
12880
12881 * process.c: Fix minor off-by-one issues in descriptor counts.
12882 This shouldn't fix any real bugs, but it cleans up the code a bit.
12883 (max_process_desc, max_input_desc): -1, not 0, means none.
12884 All uses changed.
12885 (delete_input_desc): New function.
12886 (delete_write_fd, delete_keyboard_wait_descriptor): Use it.
12887 (deactivate_process): Scan backwards when recomuting max_process_desc;
12888 that should be faster.
12889 (init_process_emacs): Initialize max_input_desc.
12890
12891 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
12892
12893 Use region cache to speedup bidi_find_paragraph_start.
12894 * buffer.h (struct buffer): New member bidi_paragraph_cache.
12895 Rename cache_long_line_scans to cache_long_scans.
12896 * buffer.c (bset_cache_long_line_scans): Rename to
12897 bset_cache_long_scans.
12898 (Fget_buffer_create, Fmake_indirect_buffer, Fkill_buffer)
12899 (Fbuffer_swap_text, init_buffer_once): Take bidi_paragraph_cache
12900 into account.
12901 (syms_of_buffer): Rename cache-long-line-scans to
12902 cache-long-scans. Adjust docstring.
12903 * search.c (newline_cache_on_off):
12904 * indent.c (width_run_cache_on_off): Adjust users.
12905 * bidi.c (bidi_paragraph_cache_on_off): New function.
12906 (bidi_find_paragraph_start): Use bidi_paragraph_cache if needed.
12907 * insdel.c (prepare_to_modify_buffer):
12908 Invalidate bidi_paragraph_cache if enabled.
12909
12910 2013-08-06 Dmitry Antipov <dmantipov@yandex.ru>
12911
12912 Invalidate region caches only if buffer text is going to be changed.
12913 * lisp.h (modify_region_1): Remove 3rd arg and rename to...
12914 (modify_text): ...new prototype.
12915 (prepare_to_modify_buffer_1): New prototype.
12916 * textprop.c (modify_region): Rename to...
12917 (modify_text_properties): ...new function.
12918 (add_text_properties_1, set_text_properties, Fremove_text_properties)
12919 (Fremove_list_of_text_properties): Adjust users.
12920 * insdel.c (modify_region_1): Remove 3rd arg and reimplement as...
12921 (modify_text): ...new function.
12922 (prepare_to_modify_buffer): Reimplement mostly as a wrapper for...
12923 (prepare_to_modify_buffer_1): ...new function.
12924 * casefiddle.c (casify_region):
12925 * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
12926 (Ftranspose_regions): Use modify_text.
12927
12928 2013-08-05 Stefan Monnier <monnier@iro.umontreal.ca>
12929
12930 * lisp.mk (lisp): Add nadvice.elc.
12931
12932 2013-08-05 Dmitry Antipov <dmantipov@yandex.ru>
12933
12934 New macro to iterate over live buffers similar to frames.
12935 * buffer.h (FOR_EACH_LIVE_BUFFER): New macro.
12936 (Vbuffer_alist, Qpriority, Qbefore_string, Qafter_string):
12937 Declare buffer-related variables here to offload lisp.h.
12938 * buffer.c (Vbuffer_alist): Adjust comment.
12939 (Fget_file_buffer, get_truename_buffer, Fother_buffer)
12940 (other_buffer_safely):
12941 * data.c (store_symval_forwarding):
12942 * dispnew.c (Fframe_or_buffer_changed_p):
12943 * fileio.c (Fdo_auto_save):
12944 * filelock.c (unlock_all_files):
12945 * minibuf.c (read_minibuf): Use FOR_EACH_LIVE_BUFFER.
12946
12947 2013-08-04 Paul Eggert <eggert@cs.ucla.edu>
12948
12949 Fix some minor races in hosts lacking mkostemp (Bug#15015).
12950 * callproc.c (create_temp_file):
12951 * filelock.c (create_lock_file):
12952 Assume mkostemp, since it's now provided by Gnulib.
12953
12954 2013-08-04 Eli Zaretskii <eliz@gnu.org>
12955
12956 * w32.c (mkostemp): New function.
12957 (mktemp): Remove, no longer used. Most of the code reused in
12958 mkostemp. (Bug#15015)
12959 (mktemp): Don't undef.
12960
12961 2013-08-04 Dmitry Antipov <dmantipov@yandex.ru>
12962
12963 * dispnew.c (glyph_matrix_count, glyph_pool_count):
12964 Move under GLYPH_DEBUG and ENABLE_CHECKING.
12965 (new_glyph_matrix, free_glyph_matrix, new_glyph_pool)
12966 (free_glyph_pool, check_glyph_memory): Likewise for
12967 all users. Adjust comments where appropriate.
12968
12969 2013-08-03 Paul Eggert <eggert@cs.ucla.edu>
12970
12971 * composite.h: Minor fixups.
12972 (composition_registered_p): Rename from COMPOSITION_REGISTERD_P
12973 to fix a misspelling, and change it to an inline function while
12974 we're at it (it need not be a macro). All uses changed.
12975 (composition_method, composition_valid_p):
12976 Rewrite to avoid assignments in if-conditions.
12977
12978 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
12979
12980 Do not use global Lisp_Object in composition macros.
12981 * composite.h (composition_temp): Remove declaration.
12982 (COMPOSITION_METHOD, COMPOSITION_VALID_P): Replace with...
12983 (composition_method, composition_valid_p): ...inline functions.
12984 (compose_region): Remove the leftover.
12985 * composite.c (composition_temp): Remove.
12986 (run_composition_function, update_compositions)
12987 (composition_compute_stop_pos, composition_adjust_point)
12988 (Ffind_composition_internal):
12989 * coding.c (handle_composition_annotation):
12990 * xdisp.c (handle_composition_prop, check_point_in_composition):
12991 Related users changed.
12992
12993 2013-08-03 Dmitry Antipov <dmantipov@yandex.ru>
12994
12995 Drop FRAME_PTR typedef.
12996 * composite.c, font.c, font.h, fontset.c, fontset.h, frame.c, frame.h:
12997 * ftfont.c, ftxfont.c, gtkutil.c, gtkutil.h, image.c, keyboard.c:
12998 * menu.c, menu.h, msdos.c, nsfns.m, nsfont.m, nsmenu.m, nsterm.h:
12999 * nsterm.m, scroll.c, term.c, w32fns.c, w32font.c, w32font.h:
13000 * w32inevt.c, w32inevt.h, w32menu.c, w32notify.c, w32term.c, w32term.h:
13001 * w32uniscribe.c, w32xfns.c, widget.c, window.c, xdisp.c, xfaces.c:
13002 * xfns.c, xfont.c, xftfont.c, xmenu.c, xselect.c, xterm.c:
13003 All related users changed.
13004
13005 2013-08-02 Stefan Monnier <monnier@iro.umontreal.ca>
13006
13007 * eval.c (default_toplevel_binding): New function.
13008 (Fdefvar): Use it.
13009 (unbind_to, backtrace_eval_unrewind): Do a bit of CSE simplification.
13010 (Fdefault_toplevel_value, Fset_default_toplevel_value): New subrs.
13011 (syms_of_eval): Export them.
13012 * data.c (Fdefault_value): Micro cleanup.
13013 * term.c (init_tty): Use "false".
13014
13015 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
13016
13017 Fix X GC leak in GTK and raw (no toolkit) X ports.
13018 * xterm.c (x_free_frame_resources): If white and black relief
13019 GCs are allocated, always free them here.
13020 * xfns.c (x_make_gc): Omit redundant initialization.
13021 * widget.c (create_frame_gcs): Remove the leftover.
13022 (EmacsFrameDestroy): Do nothing because all GCs are now freed
13023 in x_free_frame_resources.
13024
13025 2013-08-02 Jan Djärv <jan.h.d@swipnet.se>
13026
13027 * nsterm.m (windowWillResize:toSize:): Only change title if
13028 ! maximizing_resize && FULLSCREEN_NONE (Bug#15005). strdup title before
13029 modifying it.
13030 (viewDidEndLiveResize): New method.
13031
13032 * nsterm.h (EmacsView): Add maximizing_resize, put it and old_title
13033 inside NS_IMPL_COCOA.
13034
13035 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
13036
13037 * insdel.c (adjust_after_replace, replace_range, del_range_2):
13038 Do not check whether undo is enabled because record_insert and
13039 record_delete does that themselves.
13040
13041 2013-08-02 Dmitry Antipov <dmantipov@yandex.ru>
13042
13043 * xterm.h (struct x_output) [HAVE_X_I18N]: Remove xic_base_fontname
13044 member which is not really used any more.
13045 (FRAME_XIC_BASE_FONTNAME): Remove.
13046 * xfns.c (xic_free_fontset): Adjust user.
13047 * xmenu.c (mouse_position_for_popup, x_activate_menubar)
13048 (update_frame_menubar, set_frame_menubar, free_frame_menubar)
13049 (create_and_show_popup_menu, xmenu_show, create_and_show_dialog)
13050 (xdialog_show): Use eassert for debugging check.
13051 * w32term.c (x_unfocus_frame): Remove unused dummy function.
13052
13053 2013-08-01 Paul Eggert <eggert@cs.ucla.edu>
13054
13055 * fileio.c, fns.c (merge): Move extern decl from here ...
13056 * lisp.h (merge): ... to here.
13057
13058 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13059
13060 Fix last font-related change.
13061 * w32font.h (w32font_list_internal, w32font_match_internal):
13062 Fix prototype.
13063 * w32uniscribe.c (uniscribe_list, uniscribe_match)
13064 (uniscribe_list_family): Adjust to match font API change.
13065 MS-Windows breakage reported by Juanma Barranquero <lekktu@gmail.com>
13066 at http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00006.html.
13067
13068 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13069
13070 * frame.h (FRAME_MOUSE_UPDATE):
13071 * nsterm.m (ns_frame_up_to_date): Omit redundant check
13072 whether hlinfo->mouse_face_mouse_frame is non-NULL.
13073
13074 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13075
13076 Avoid redundant Lisp_Object <-> struct frame conversions in font API.
13077 * font.h (struct font_driver): Change list, match, and list_family
13078 functions to accept struct frame * as first arg.
13079 * font.c (font_score, font_compare, font_sort_entities):
13080 Remove prototypes.
13081 (font_sort_entities, font_list_entities, font_select_entity)
13082 (font_find_for_lface, Flist_fonts, Ffont_family_list): Adjust to
13083 match font API change.
13084 * xfont.c (xfont_list, xfont_match, xfont_list_family):
13085 * ftfont.c (ftfont_list, ftfont_match, ftfont_list_family):
13086 * ftxfont.c (ftxfont_list, ftxfont_match):
13087 * xftfont.c (xftfont_list, xftfont_match):
13088 * nsfont.m (nsfont_list, nsfont_match, nsfont_list_family):
13089 * w32font.c (w32font_list, w32font_match, w32font_list)
13090 (w32font_list_internal, w32_font_match_internal): Likewise.
13091 * xfaces.c (Fx_family_fonts): Adjust user.
13092
13093 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13094
13095 Do not use pure Xism x_wm_set_icon_position in non-X ports.
13096 * frame.c (x_set_frame_parameters): Call to x_wm_set_icon_position
13097 only if HAVE_X_WINDOWS is in use.
13098 * frame.h (x_set_frame_parameters): Move under HAVE_X_WINDOWS.
13099 * nsterm.m (x_wm_set_icon_position): Remove no-op.
13100 * w32term.c (x_wm_set_icon_position): Likewise.
13101 * w32fns.c (x_icon): Adjust user.
13102
13103 2013-08-01 Dmitry Antipov <dmantipov@yandex.ru>
13104
13105 * xterm.c (last_mouse_press_frame): Remove the
13106 leftover which is not really used any more.
13107 (handle_one_xevent, syms_of_xterm): Adjust users.
13108 (x_flush): Call XFlush once per each X display, not frame.
13109 This is better because this code always unconditionally skips
13110 non-X frames in Vframe_list and issues the only XFlush if we
13111 have more than one X frame on the same X display.
13112 (any_help_event_p, x_draw_glyph_string_background, x_display_ok):
13113 Use bool for booleans.
13114 (x_draw_glyph_string_background, cvt_string_to_pixel)
13115 (cvt_pixel_dtor): Drop unnecessary prototypes.
13116 * xterm.h (x_display_ok): Adjust prototype.
13117
13118 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
13119
13120 Drop unnecessary functions that deals with frame pixel size.
13121 * frame.h, msdos.h, w32term.h, xterm.h (x_pixel_width)
13122 (x_pixel_height): Drop prototypes.
13123 * msdos.c, nsfns.m, w32fns.c, xfns.c (x_pixel_width)
13124 (x_pixel_height): Drop implementations.
13125 * frame.c (Fframe_pixel_height): Use FRAME_PIXEL_HEIGHT
13126 which should be always valid for window frame.
13127 (Frame_pixel_width): Likewise with FRAME_PIXEL_WIDTH.
13128 * w32menu.c (Fx_popup_dialog):
13129 * xmenu.c (Fx_popup_dialog): Likewise for both.
13130
13131 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
13132
13133 * frame.c (Fmake_terminal_frame): Use store_in_alist to setup
13134 frame parameters and call to Fmodify_frame_parameters just once.
13135 (Fset_frame_height, Fset_frame_width): Mention nil frame in docstring.
13136 (Fset_frame_size, Fset_frame_position): Use decode_live_frame
13137 and mention nil frame in docstring.
13138
13139 2013-07-31 Dmitry Antipov <dmantipov@yandex.ru>
13140
13141 * frame.c (make_frame, x_set_frame_parameters): Use bool for boolean.
13142 (x_figure_window_size): Likewise. Adjust to return long.
13143 (syms_of_frame): Do not DEFSYM Qterminal_live_p.
13144 (toplevel): Move Qterminal_live_p to...
13145 * terminal.c (toplevel): ...here, make it static, and...
13146 (syms_of_terminal): ...DEFSYM here.
13147 * frame.h (Qterminal_live_p): Remove declaration.
13148 (make_frame, x_figure_window_size): Adjust prototype.
13149 * nsfns.m (Fx_create_frame): Use long for window flags.
13150
13151 2013-07-30 Paul Eggert <eggert@cs.ucla.edu>
13152
13153 Fix tempfile bug on platforms lacking mkostemp and mkstemp (Bug#14986).
13154 * callproc.c (create_temp_file) [! (HAVE_MKOSTEMP || HAVE_MKSTEMP)]:
13155 Do not assume that emacs_close (INT_MAX) is a no-op.
13156
13157 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
13158
13159 * xfaces.c (make_face_cache): For struct face_cache, prefer
13160 xmalloc to xzalloc and so avoid redundant call to memset.
13161 (Finternal_set_lisp_face_attribute): Fix comment typo and style.
13162
13163 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
13164
13165 * fringe.c (draw_window_fringes, update_window_fringes)
13166 (compute_fringe_widths):
13167 * w32term.c (x_draw_glyph_string):
13168 * window.c (candidate_window_p, Frecenter):
13169 * xfaces.c (realize_basic_faces, realize_default_face)
13170 (Fbitmap_space_p, Finternal_set_lisp_face_attribute)
13171 (x_update_menu_appearance, face_attr_equal_p, lface_equal_p):
13172 * xfns.c (x_set_cursor_color, xic_free_xfontset):
13173 * xmenu.c (Fx_menu_bar_open_internal):
13174 * xselect.c (x_reply_selection_request, Fx_get_atom_name):
13175 * xsettings.c (xft_settings_event):
13176 * xterm.c (x_draw_glyph_string, x_had_errors_p):
13177 Use bool for booleans. Adjust style and comments where
13178 appropriate.
13179 * dispextern.h (draw_window_fringes, update_window_fringes)
13180 (compute_fringe_widths):
13181 * xterm.h (x_had_errors_p): Adjust prototype.
13182
13183 2013-07-30 Dmitry Antipov <dmantipov@yandex.ru>
13184
13185 * frame.c (Fmodify_frame_parameters): Always check 2nd arg with
13186 CHECK_LIST. Rewrite the loop to avoid useless local variable.
13187
13188 2013-07-29 Dmitry Antipov <dmantipov@yandex.ru>
13189
13190 * fns.c (toplevel): Remove comment before Fsafe_length because
13191 it checks for QUIT.
13192
13193 2013-07-28 Paul Eggert <eggert@cs.ucla.edu>
13194
13195 * frame.c (delete_frame): Avoid unnecessary 'this_f' test (Bug#14970).
13196
13197 2013-07-28 Eli Zaretskii <eliz@gnu.org>
13198
13199 * w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Make sure the
13200 frame which got the message is still alive, before dereferencing
13201 its pointer. (Bug#14970)
13202
13203 * frame.c (delete_frame): Test "this" frame's minibuffer window to
13204 be a live window, before using it as such. (Bug#14970)
13205
13206 2013-07-27 Eli Zaretskii <eliz@gnu.org>
13207
13208 * w32term.c (w32_read_socket) <WM_KILLFOCUS>: Call
13209 w32_detect_focus_change instead of doing part of its job by hand.
13210 This fixes the problem whereby FOCUS_OUT events were not sent to
13211 the event queue.
13212
13213 2013-07-26 Eli Zaretskii <eliz@gnu.org>
13214
13215 * process.c (Fprocess_list): Doc fix.
13216
13217 * w32term.c (w32_read_socket) <WM_EMACS_PAINT>: Warn about frame
13218 being re-exposed only if it didn't ask to become visible.
13219 <WM_SIZE>: Under SIZE_RESTORED, only set the frame visible if it
13220 was previously iconified. (Bug#14841)
13221 (x_iconify_frame): Mark the frame iconified.
13222
13223 2013-07-26 Paul Eggert <eggert@cs.ucla.edu>
13224
13225 Fix minor problems found by static checking.
13226 * eval.c (get_backtrace_frame, backtrace_eval_unrewind): Now static.
13227 (backtrace_eval_unrewind): ';' -> '{}' to pacify GCC.
13228
13229 2013-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
13230
13231 * eval.c (set_specpdl_old_value): New function.
13232 (unbind_to): Minor simplification.
13233 (get_backtrace_frame): New function.
13234 (Fbacktrace_frame): Use it. Add `base' argument.
13235 (backtrace_eval_unrewind, Fbacktrace_eval): New functions.
13236 (syms_of_eval): Export backtrace-eval.
13237 * xterm.c (x_focus_changed): Simplify.
13238
13239 2013-07-25 Paul Eggert <eggert@cs.ucla.edu>
13240
13241 * fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936).
13242
13243 2013-07-24 Eli Zaretskii <eliz@gnu.org>
13244
13245 * xdisp.c (redisplay_window): Instead of moving point out of
13246 scroll margin, reject the force_start method, and try scrolling
13247 instead. (Bug#14780)
13248
13249 2013-07-24 Ken Brown <kbrown@cornell.edu>
13250
13251 * alloc.c (make_save_ptr): Define if HAVE_NTGUI is defined
13252 (Bug#14944).
13253
13254 2013-07-24 Paul Eggert <eggert@cs.ucla.edu>
13255
13256 * eval.c (Fprogn): Do not check that BODY is a proper list.
13257 This undoes the previous change. The check slows down the
13258 interpreter, and is not needed to prevent a crash. See
13259 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00693.html>.
13260
13261 2013-07-23 Glenn Morris <rgm@gnu.org>
13262
13263 * Makefile.in ($(etc)/DOC, temacs$(EXEEXT)): Ensure etc/ exists.
13264
13265 2013-07-23 Paul Eggert <eggert@cs.ucla.edu>
13266
13267 Port to GNU/Linux systems with tinfo but not ncurses.
13268 * dispnew.c (init_display): Depend on USE_NCURSES, not GNU_LINUX,
13269 to decide whether ncurses is being used. Without this change,
13270 GCC complains about tgetent not being declared, on a system
13271 that has tinfo installed but ncurses not installed.
13272
13273 * eval.c (Fprogn): Check that BODY is a proper list.
13274
13275 Tune UNEVALLED functions by using XCAR instead of Fcar, etc.
13276 * data.c (Fsetq_default):
13277 * eval.c (Fif, Fcond, Fprog1, Fsetq, Fquote, Ffunction, Fdefvar)
13278 (Fdefconst, FletX, Flet, Fwhile, Fcatch, Funwind_protect)
13279 (Fcondition_case):
13280 Tune by taking advantage of the fact that ARGS is always a list
13281 when a function is declared to have UNEVALLED args.
13282
13283 * emacsgtkfixed.c: Port to GCC 4.6.
13284 GCC 4.6 complains about -Wunused-local-typedefs, introduced in 4.7.
13285
13286 2013-07-23 Juanma Barranquero <lekktu@gmail.com>
13287
13288 * callproc.c (child_setup)[!WINDOWSNT]: Move exec_errno and pid
13289 here to silence compiler warnings.
13290
13291 2013-07-22 Paul Eggert <eggert@cs.ucla.edu>
13292
13293 * sysdep.c (frame) [__FreeBSD__]: #define to freebsd_frame
13294 when including <sys/user.h>, to prevent Sparc/ARM machine/frame.h
13295 from messing up Emacs's 'struct frame' (Bug#14923).
13296
13297 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
13298
13299 * alloc.c (make_save_ptr_ptr): Define this function.
13300 It was inadvertently omitted. It's needed only if
13301 HAVE_MENUS && ! (USE_X_TOOLKIT || USE_GTK).
13302
13303 2013-07-21 Jan Djärv <jan.h.d@swipnet.se>
13304
13305 * nsterm.m (sendEvent:): Skip mouse moved if no dialog and no Emacs
13306 frame have focus (Bug#14895).
13307
13308 2013-07-21 Paul Eggert <eggert@cs.ucla.edu>
13309
13310 Avoid vfork-related deadlock more cleanly.
13311 * callproc.c (child_setup): When the child's exec fails, output
13312 the program name, as that's more useful. Use O_NONBLOCK to avoid
13313 deadlock.
13314 * process.c (create_process_1): Remove; no longer needed.
13315 (create_process): Remove timer hack; no longer needed, now that
13316 the child avoids deadlock.
13317
13318 2013-07-20 Glenn Morris <rgm@gnu.org>
13319
13320 * image.c (Fimage_flush): Fix doc typo.
13321
13322 2013-07-20 Paul Eggert <eggert@cs.ucla.edu>
13323
13324 Fix array bounds violation when pty allocation fails.
13325 * process.c (PTY_NAME_SIZE): New constant.
13326 (pty_name): Remove static variable; it's now auto.
13327 (allocate_pty): Define even if !HAVE_PTYS; that's simpler.
13328 Take pty_name as an arg rather than using a static variable.
13329 All callers changed.
13330 (create_process): Recover pty_flag from process, not from volatile local.
13331 (create_pty): Stay inside array even when pty allocation fails.
13332 (Fmake_serial_process): Omit unnecessary initializaiton of pty_flag.
13333
13334 * lread.c (Fload): Avoid initialization only when lint checking.
13335 Mention that it's needed only for older GCCs.
13336
13337 2013-07-20 Kenichi Handa <handa@gnu.org>
13338
13339 * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
13340 (decode_coding_iso_2022): Check the single-shift area. (Bug#8522)
13341
13342 2013-07-20 Andreas Schwab <schwab@linux-m68k.org>
13343
13344 * lread.c (Fload): Avoid uninitialized warning.
13345
13346 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
13347
13348 Fix some minor file descriptor leaks and related glitches.
13349 * filelock.c (create_lock_file) [!O_CLOEXEC]: Use fcntl with FD_CLOEXEC.
13350 (create_lock_file): Use write, not emacs_write.
13351 * image.c (slurp_file, png_load_body):
13352 * process.c (Fnetwork_interface_list, Fnetwork_interface_info)
13353 (server_accept_connection):
13354 Don't leak an fd on memory allocation failure.
13355 * image.c (slurp_file): Add a cheap heuristic for growing files.
13356 * xfaces.c (Fx_load_color_file): Block input around the fopen too,
13357 as that's what the other routines do. Maybe input need not be
13358 blocked at all, but it's better to be consistent.
13359 Avoid undefined behavior when strlen is zero.
13360
13361 * alloc.c (staticpro): Avoid buffer overrun on repeated calls.
13362 (NSTATICS): Now a constant; doesn't need to be a macro.
13363
13364 2013-07-19 Richard Stallman <rms@gnu.org>
13365
13366 * coding.c (decode_coding_utf_8): Add simple loop for fast
13367 processing of ASCII characters.
13368
13369 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
13370
13371 * conf_post.h (RE_TRANSLATE_P) [emacs]: Remove obsolete optimization.
13372
13373 2013-07-19 Eli Zaretskii <eliz@gnu.org>
13374
13375 * keyboard.c (kbd_buffer_get_event): Use Display_Info instead of
13376 unportable 'struct x_display_info'.
13377 (DISPLAY_LIST_INFO): Delete macro: not needed, since Display_Info
13378 is a portable type.
13379
13380 2013-07-19 Paul Eggert <eggert@cs.ucla.edu>
13381
13382 * sysdep.c [GNU_LINUX]: Fix fd and memory leaks and similar issues.
13383 (procfs_ttyname): Don't use uninitialized storage if emacs_fopen
13384 or fscanf fails.
13385 (system_process_attributes): Prefer plain char to unsigned char
13386 when either will do. Clean up properly if interrupted or if
13387 memory allocations fail. Don't assume sscanf succeeds.
13388 Remove no-longer-needed workaround to stop GCC from whining.
13389 Read command-line once, instead of multiple times. Check read status a
13390 bit more carefully.
13391
13392 Fix obscure porting bug with varargs functions.
13393 The code assumed that int is treated like ptrdiff_t in a vararg
13394 function, which is not a portable assumption. There was a similar
13395 -- though these days less likely -- porting problem with various
13396 assumptions that pointers of different types all smell the same as
13397 far as vararg functions is conserved. To make this problem less
13398 likely in the future, redo the API to use varargs functions.
13399 * alloc.c (make_save_value): Remove this vararg function.
13400 All uses changed to ...
13401 (make_save_int_int_int, make_save_obj_obj_obj_obj)
13402 (make_save_ptr_int, make_save_funcptr_ptr_obj, make_save_memory):
13403 New functions.
13404 (make_save_ptr): Rename from make_save_pointer, for consistency with
13405 the above. Define only on platforms that need it. All uses changed.
13406
13407 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
13408
13409 * keyboard.c: Try to fix typos in previous change.
13410 (DISPLAY_LIST_INFO): New macro.
13411 (kbd_buffer_get_event): Do not access members that are not present
13412 in X11. Revert inadvertent change of "!=" to "=".
13413
13414 2013-07-18 Juanma Barranquero <lekktu@gmail.com>
13415
13416 * keyboard.c (kbd_buffer_get_event):
13417 * w32term.c (x_focus_changed): Port FOCUS_(IN|OUT)_EVENT changes to W32.
13418 Followup to 2013-07-16T11:41:06Z!jan.h.d@swipnet.se.
13419
13420 2013-07-18 Paul Eggert <eggert@cs.ucla.edu>
13421
13422 * filelock.c: Fix unlikely file descriptor leaks.
13423 (get_boot_time_1): Rework to avoid using emacs_open.
13424 This doesn't actually fix a leak, but is better anyway.
13425 (read_lock_data): Use read, not emacs_read.
13426
13427 * doc.c: Fix minor memory and file descriptor leaks.
13428 * doc.c (get_doc_string): Fix memory leak when doc file absent.
13429 (get_doc_string, Fsnarf_documentation):
13430 Fix file descriptor leak on error.
13431
13432 * term.c: Fix minor fdopen-related file descriptor leaks.
13433 * term.c (Fresume_tty) [!MSDOS]: Close fd if fdopen (fd) fails.
13434 (init_tty) [!DOS_NT]: Likewise. Also close fd if isatty (fd) fails.
13435
13436 * charset.c: Fix file descriptor leaks and errno issues.
13437 Include <errno.h>.
13438 (load_charset_map_from_file): Don't leak file descriptor on error.
13439 Use plain record_xmalloc since the allocation is larger than
13440 MAX_ALLOCA; that's simpler here. Simplify test for exhaustion
13441 of entries.
13442 * eval.c (record_unwind_protect_nothing):
13443 * fileio.c (fclose_unwind):
13444 New functions.
13445 * lread.c (load_unwind): Remove. All uses replaced by fclose_unwind.
13446 The replacement doesn't block input, but that no longer seems
13447 necessary.
13448
13449 2013-07-17 Paul Eggert <eggert@cs.ucla.edu>
13450
13451 * lread.c: Fix file descriptor leaks and errno issues.
13452 (Fload): Close some races that leaked fds or streams when 'load'
13453 was interrupted.
13454 (Fload, openp): Report error number of last nontrivial failure to open.
13455 ENOENT counts as trivial.
13456 * eval.c (do_nothing, clear_unwind_protect, set_unwind_protect_ptr):
13457 New functions.
13458 * fileio.c (close_file_unwind): No need to test whether FD is nonnegative,
13459 now that the function is always called with a nonnegative arg.
13460 * lisp.h (set_unwind_protect_ptr, set_unwind_protect_int): Remove.
13461 All uses replaced with ...
13462 (clear_unwind_protect, set_unwind_protect_ptr): New decls.
13463
13464 A few more minor file errno-reporting bugs.
13465 * callproc.c (Fcall_process):
13466 * doc.c (Fsnarf_documentation):
13467 * fileio.c (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
13468 * process.c (set_socket_option):
13469 Don't let a constructor trash errno.
13470 * doc.c: Include <errno.h>.
13471
13472 2013-07-16 Juanma Barranquero <lekktu@gmail.com>
13473
13474 * w32fns.c (unwind_create_tip_frame): Fix declaration.
13475
13476 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
13477
13478 Fix w32 bug with call-process-region (Bug#14885).
13479 * callproc.c (Fcall_process_region): Pass nil, not "/dev/null",
13480 to Fcall_process when the input is empty. This simplifies the
13481 code a bit. It makes no difference on POSIXish platforms but
13482 apparently it fixes a bug on w32.
13483
13484 Fix bug where insert-file-contents closes a file twice (Bug#14839).
13485 * fileio.c (close_file_unwind): Don't close if FD is negative;
13486 this can happen when unwinding a zapped file descriptor.
13487 (Finsert_file_contents): Unwind-protect the fd before the point marker,
13488 in case Emacs runs out of memory between the two unwind-protects.
13489 Don't trash errno when closing FD.
13490 Zap the FD in the specpdl when closing it, instead of deferring
13491 the removal of the unwind-protect; this fixes a bug where a child
13492 function unwinds the stack past us.
13493
13494 New unwind-protect flavors to better type-check C callbacks.
13495 This also lessens the need to write wrappers for callbacks,
13496 and the need for make_save_pointer.
13497 * alloc.c (free_save_value):
13498 * atimer.c (run_all_atimers):
13499 Now extern.
13500 * alloc.c (safe_alloca_unwind):
13501 * atimer.c (unwind_stop_other_atimers):
13502 * keyboard.c (cancel_hourglass_unwind) [HAVE_WINDOW_SYSTEM]:
13503 * menu.c (cleanup_popup_menu) [HAVE_NS]:
13504 * minibuf.c (choose_minibuf_frame_1):
13505 * process.c (make_serial_process_unwind):
13506 * xdisp.c (pop_message_unwind):
13507 * xselect.c (queue_selection_requests_unwind):
13508 Remove no-longer-needed wrapper. All uses replaced by the wrappee.
13509 * alloc.c (record_xmalloc):
13510 Prefer record_unwind_protect_ptr to record_unwind_protect with
13511 make_save_pointer.
13512 * alloc.c (Fgarbage_collect):
13513 Prefer record_unwind_protect_void to passing a dummy.
13514 * buffer.c (restore_buffer):
13515 * window.c (restore_window_configuration):
13516 * xfns.c, w32fns.c (do_unwind_create_frame)
13517 New wrapper. All record-unwind uses of wrappee changed.
13518 * buffer.c (set_buffer_if_live):
13519 * callproc.c (call_process_cleanup, delete_temp_file):
13520 * coding.c (code_conversion_restore):
13521 * dired.c (directory_files_internal_w32_unwind) [WINDOWSNT]:
13522 * editfns.c (save_excursion_restore)
13523 (subst_char_in_region_unwind, subst_char_in_region_unwind_1)
13524 (save_restriction_restore):
13525 * eval.c (restore_stack_limits, un_autoload):
13526 * fns.c (require_unwind):
13527 * keyboard.c (recursive_edit_unwind, tracking_off):
13528 * lread.c (record_load_unwind, load_warn_old_style_backquotes):
13529 * macros.c (pop_kbd_macro, restore_menu_items):
13530 * nsfns.m (unwind_create_frame):
13531 * print.c (print_unwind):
13532 * process.c (start_process_unwind):
13533 * search.c (unwind_set_match_data):
13534 * window.c (select_window_norecord, select_frame_norecord):
13535 * xdisp.c (unwind_with_echo_area_buffer, unwind_format_mode_line)
13536 (fast_set_selected_frame):
13537 * xfns.c, w32fns.c (unwind_create_tip_frame):
13538 Return void, not a dummy Lisp_Object. All uses changed.
13539 * buffer.h (set_buffer_if_live): Move decl here from lisp.h.
13540 * callproc.c (call_process_kill):
13541 * fileio.c (restore_point_unwind, decide_coding_unwind)
13542 (build_annotations_unwind):
13543 * insdel.c (Fcombine_after_change_execute_1):
13544 * keyboard.c (read_char_help_form_unwind):
13545 * menu.c (unuse_menu_items):
13546 * minibuf.c (run_exit_minibuf_hook, read_minibuf_unwind):
13547 * sound.c (sound_cleanup):
13548 * xdisp.c (unwind_redisplay):
13549 * xfns.c (clean_up_dialog):
13550 * xselect.c (x_selection_request_lisp_error, x_catch_errors_unwind):
13551 Accept no args and return void, instead of accepting and returning
13552 a dummy Lisp_Object. All uses changed.
13553 * cygw32.c (fchdir_unwind):
13554 * fileio.c (close_file_unwind):
13555 * keyboard.c (restore_kboard_configuration):
13556 * lread.c (readevalllop_1):
13557 * process.c (wait_reading_process_output_unwind):
13558 Accept int and return void, rather than accepting an Emacs integer
13559 and returning a dummy object. In some cases this fixes an
13560 unlikely bug when the corresponding int is outside Emacs integer
13561 range. All uses changed.
13562 * dired.c (directory_files_internal_unwind):
13563 * fileio.c (do_auto_save_unwind):
13564 * gtkutil.c (pop_down_dialog):
13565 * insdel.c (reset_var_on_error):
13566 * lread.c (load_unwind):
13567 * xfns.c (clean_up_file_dialog):
13568 * xmenu.c, nsmenu.m (pop_down_menu):
13569 * xmenu.c (cleanup_widget_value_tree):
13570 * xselect.c (wait_for_property_change_unwind):
13571 Accept pointer and return void, rather than accepting an Emacs
13572 save value encapsulating the pointer and returning a dummy object.
13573 All uses changed.
13574 * editfns.c (Fformat): Update the saved pointer directly via
13575 set_unwind_protect_ptr rather than indirectly via make_save_pointer.
13576 * eval.c (specpdl_func): Remove. All uses replaced by definiens.
13577 (unwind_body): New function.
13578 (record_unwind_protect): First arg is now a function returning void,
13579 not a dummy Lisp_Object.
13580 (record_unwind_protect_ptr, record_unwind_protect_int)
13581 (record_unwind_protect_void): New functions.
13582 (unbind_to): Support SPECPDL_UNWIND_PTR etc.
13583 * fileio.c (struct auto_save_unwind): New type.
13584 (do_auto_save_unwind): Use it.
13585 (do_auto_save_unwind_1): Remove; subsumed by new do_auto_save_unwind.
13586 * insdel.c (struct rvoe_arg): New type.
13587 (reset_var_on_error): Use it.
13588 * lisp.h (SPECPDL_UNWIND_PTR, SPECPDL_UNWIND_INT, SPECPDL_UNWIND_VOID):
13589 New constants.
13590 (specbinding_func): Remove; there are now several such functions.
13591 (union specbinding): New members unwind_ptr, unwind_int, unwind_void.
13592 (set_unwind_protect_ptr): New function.
13593 * xselect.c: Remove unnecessary forward decls, to simplify maintenance.
13594
13595 Be simpler and more consistent about reporting I/O errors.
13596 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
13597 Say "Read error" and "Write error", rather than "I/O error", or
13598 "IO error reading", or "IO error writing", when a read or write
13599 error occurs.
13600 * process.c (Fmake_network_process, wait_reading_process_output)
13601 (send_process, Fprocess_send_eof, wait_reading_process_output):
13602 Capitalize diagnostics consistently. Put "failed foo" at the
13603 start of the diagnostic, so that we don't capitalize the
13604 function name "foo". Consistently say "failed" for such
13605 diagnostics.
13606 * sysdep.c, w32.c (serial_open): Now accepts Lisp string, not C string.
13607 All callers changed. This is so it can use report_file_error.
13608 * sysdep.c (serial_open, serial_configure): Capitalize I/O
13609 diagnostics consistently as above.
13610
13611 * fileio.c (report_file_errno): Fix errno reporting bug.
13612 If the file name is neither null nor a pair, package it up as a
13613 singleton list. All callers changed, both to this function and to
13614 report_file_error. This fixes a bug where the memory allocator
13615 invoked by list1 set errno so that the immediately following
13616 report_file_error reported the wrong errno value.
13617
13618 Fix minor problems found by --enable-gcc-warnings.
13619 * frame.c (Fhandle_focus_in, Fhandle_focus_out): Return a value.
13620 * keyboard.c (kbd_buffer_get_event): Remove unused local.
13621
13622 2013-07-16 Jan Djärv <jan.h.d@swipnet.se>
13623
13624 * xterm.c (x_focus_changed): Always generate FOCUS_IN_EVENT.
13625 Set event->arg to Qt if switch-event shall be generated.
13626 Generate FOCUS_OUT_EVENT for FocusOut if this is the focused frame.
13627
13628 * termhooks.h (enum event_kind): Add FOCUS_OUT_EVENT.
13629
13630 * nsterm.m (windowDidResignKey): If this is the focused frame, generate
13631 FOCUS_OUT_EVENT.
13632
13633 * keyboard.c (Qfocus_in, Qfocus_out): New static objects.
13634 (make_lispy_focus_in, make_lispy_focus_out): Declare and define.
13635 (kbd_buffer_get_event): For FOCUS_IN, make a focus_in event if no
13636 switch frame event is made. Check ! NILP (event->arg) if X11 (moved
13637 from xterm.c). Make focus_out event for FOCUS_OUT_EVENT if NS or X11
13638 and there is a focused frame.
13639 (head_table): Add focus-in and focus-out.
13640 (keys_of_keyboard): Add focus-in and focus-out to Vspecial_event_map,
13641 bind to handle-focus-in/out.
13642
13643 * frame.c (Fhandle_focus_in, Fhandle_focus_out): New functions.
13644 (Fhandle_switch_frame): Call Fhandle_focus_in.
13645 (syms_of_frame): defsubr handle-focus-in/out.
13646
13647 2013-07-16 Paul Eggert <eggert@cs.ucla.edu>
13648
13649 Fix porting bug to older POSIXish platforms (Bug#14862).
13650 * sysdep.c (emacs_pipe): New function, that implements
13651 pipe2 (fd, O_CLOEXEC) even on hosts that lack O_CLOEXEC.
13652 This should port better to CentOS 5 and to Mac OS X 10.6.
13653 All calls to pipe2 changed.
13654
13655 Prefer list1 (X) to Fcons (X, Qnil) when building lists.
13656 This makes the code easier to read and the executable a bit smaller.
13657 Do not replace all calls to Fcons that happen to create lists,
13658 just calls that are intended to create lists. For example, when
13659 creating an alist that maps FOO to nil, use list1 (Fcons (FOO, Qnil))
13660 rather than list1 (list1 (FOO)) or Fcons (Fcons (FOO, Qnil), Qnil).
13661 Similarly for list2 through list5.
13662 * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
13663 * bytecode.c (exec_byte_code):
13664 * callint.c (quotify_arg, Fcall_interactively):
13665 * callproc.c (Fcall_process, create_temp_file):
13666 * charset.c (load_charset_map_from_file)
13667 (Fdefine_charset_internal, init_charset):
13668 * coding.c (get_translation_table, detect_coding_system)
13669 (Fcheck_coding_systems_region)
13670 (Fset_terminal_coding_system_internal)
13671 (Fdefine_coding_system_internal, Fdefine_coding_system_alias):
13672 * composite.c (update_compositions, Ffind_composition_internal):
13673 * dired.c (directory_files_internal, file_name_completion)
13674 (Fsystem_users):
13675 * dispnew.c (Fopen_termscript, bitch_at_user, init_display):
13676 * doc.c (Fsnarf_documentation):
13677 * editfns.c (Fmessage_box):
13678 * emacs.c (main):
13679 * eval.c (do_debug_on_call, signal_error, maybe_call_debugger)
13680 (Feval, eval_sub, Ffuncall, apply_lambda):
13681 * fileio.c (make_temp_name, Fcopy_file, Faccess_file)
13682 (Fset_file_selinux_context, Fset_file_acl, Fset_file_modes)
13683 (Fset_file_times, Finsert_file_contents)
13684 (Fchoose_write_coding_system, Fwrite_region):
13685 * fns.c (Flax_plist_put, Fyes_or_no_p, syms_of_fns):
13686 * font.c (font_registry_charsets, font_parse_fcname)
13687 (font_prepare_cache, font_update_drivers, Flist_fonts):
13688 * fontset.c (Fset_fontset_font, Ffontset_info, syms_of_fontset):
13689 * frame.c (make_frame, Fmake_terminal_frame)
13690 (x_set_frame_parameters, x_report_frame_params)
13691 (x_default_parameter, Fx_parse_geometry):
13692 * ftfont.c (syms_of_ftfont):
13693 * image.c (gif_load):
13694 * keyboard.c (command_loop_1):
13695 * keymap.c (Fmake_keymap, Fmake_sparse_keymap, access_keymap_1)
13696 (Fcopy_keymap, append_key, Fcurrent_active_maps)
13697 (Fminor_mode_key_binding, accessible_keymaps_1)
13698 (Faccessible_keymaps, Fwhere_is_internal):
13699 * lread.c (read_emacs_mule_char):
13700 * menu.c (find_and_return_menu_selection):
13701 * minibuf.c (get_minibuffer):
13702 * nsfns.m (Fns_perform_service):
13703 * nsfont.m (ns_script_to_charset):
13704 * nsmenu.m (ns_popup_dialog):
13705 * nsselect.m (ns_get_local_selection, ns_string_from_pasteboard)
13706 (Fx_own_selection_internal):
13707 * nsterm.m (append2):
13708 * print.c (Fredirect_debugging_output)
13709 (print_prune_string_charset):
13710 * process.c (Fdelete_process, Fprocess_contact)
13711 (Fformat_network_address, set_socket_option)
13712 (read_and_dispose_of_process_output, write_queue_push)
13713 (send_process, exec_sentinel):
13714 * sound.c (Fplay_sound_internal):
13715 * textprop.c (validate_plist, add_properties)
13716 (Fput_text_property, Fadd_face_text_property)
13717 (copy_text_properties, text_property_list, syms_of_textprop):
13718 * unexaix.c (report_error):
13719 * unexcoff.c (report_error):
13720 * unexsol.c (unexec):
13721 * xdisp.c (redisplay_tool_bar, store_mode_line_string)
13722 (Fformat_mode_line, syms_of_xdisp):
13723 * xfaces.c (set_font_frame_param)
13724 (Finternal_lisp_face_attribute_values)
13725 (Finternal_merge_in_global_face, syms_of_xfaces):
13726 * xfns.c (x_default_scroll_bar_color_parameter)
13727 (x_default_font_parameter, x_create_tip_frame):
13728 * xfont.c (xfont_supported_scripts):
13729 * xmenu.c (Fx_popup_dialog, xmenu_show, xdialog_show)
13730 (menu_help_callback, xmenu_show):
13731 * xml.c (make_dom):
13732 * xterm.c (set_wm_state):
13733 Prefer list1 (FOO) to Fcons (FOO, Qnil) when creating a list,
13734 and similarly for list2 through list5.
13735
13736 2013-07-15 Paul Eggert <eggert@cs.ucla.edu>
13737
13738 * callproc.c (Fcall_process_region): Fix minor race and tune.
13739 (create_temp_file): New function, with the temp-file-creation part
13740 of the old Fcall_process_region. Use Fcopy_sequence to create the
13741 temp file name, rather than alloca + build_string, for simplicity.
13742 Don't bother to block input around the temp file creation;
13743 shouldn't be needed. Simplify use of mktemp.
13744 Use record_unwind_protect immediately after creating the temp file;
13745 this closes an unlikely race where the temp file was not removed.
13746 Use memcpy rather than an open-coded loop.
13747 (Fcall_process_region): Use the new function. If the input is
13748 empty, redirect from /dev/null rather than from a newly created
13749 empty temp file; this avoids unnecessary file system traffic.
13750
13751 2013-07-14 Paul Eggert <eggert@cs.ucla.edu>
13752
13753 * filelock.c (create_lock_file) [!HAVE_MKOSTEMP && !HAVE_MKSTEMP]:
13754 Simplify by making this case like the other two. This is a bit
13755 slower on obsolete hosts, but the extra complexity isn't worth it.
13756
13757 * callproc.c (child_setup, relocate_fd) [!DOS_NT]:
13758 * process.c (create_process) [!DOS_NT]:
13759 Remove now-unnecessary calls to emacs_close.
13760
13761 2013-07-13 Eli Zaretskii <eliz@gnu.org>
13762
13763 * w32term.c (x_draw_hollow_cursor): Delete the brush object when
13764 returning early. (Bug#14850)
13765
13766 * coding.c (syms_of_coding): Set up inhibit-null-byte-detection
13767 and inhibit-iso-escape-detection attributes of 'undecided'.
13768 (Bug#14822)
13769
13770 2013-07-13 Paul Eggert <eggert@cs.ucla.edu>
13771
13772 * deps.mk (sysdep.o): Remove dependency on ../lib/ignore-value.h.
13773 Reported by Herbert J. Skuhra in
13774 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00455.html>.
13775
13776 Don't lose top specpdl entry when memory is exhausted.
13777 * eval.c (grow_specpdl): Increment specpdl top by 1 and check for
13778 specpdl overflow here, to simplify callers; all callers changed.
13779 Always reserve an unused entry at the stack top; this avoids
13780 losing the top entry's information when memory is exhausted.
13781
13782 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
13783
13784 Clean up errno reporting and fix some errno-reporting bugs.
13785 * callproc.c (Fcall_process):
13786 * fileio.c (Fcopy_file, Finsert_file_contents, Fwrite_region):
13787 * process.c (create_process, Fmake_network_process):
13788 * unexaix.c (report_error):
13789 * unexcoff.c (report_error):
13790 Be more careful about reporting the errno of failed operations.
13791 The code previously reported the wrong errno sometimes.
13792 Also, prefer report_file_errno to setting errno + report_file_error.
13793 (Fcall_process): Look at openp return value rather than at path,
13794 as that's a bit faster and clearer when there's a numeric predicate.
13795 * fileio.c (report_file_errno): New function, with most of the
13796 old contents of report_file_error.
13797 (report_file_error): Use it.
13798 (Ffile_exists_p, Ffile_accessible_directory_p):
13799 Set errno to 0 when it is junk.
13800 * fileio.c (Faccess_file):
13801 * image.c (x_create_bitmap_from_file):
13802 Use faccessat rather than opening the file, to avoid the hassle of
13803 having a file descriptor open.
13804 * lisp.h (report_file_errno): New decl.
13805 * lread.c (Flocate_file_internal): File descriptor 0 is valid, too.
13806
13807 Minor EBADF fixes.
13808 * process.c (create_process, wait_reading_process_output) [AIX]:
13809 Remove obsolete SIGHUP-related code, as Emacs no longer disables
13810 SIGHUP, so EBADF is no longer acceptable here (it wouldn't work in
13811 a multithreaded environment anyway).
13812 * sysdep.c (emacs_close): It's not dangerous to invoke emacs_close (-1).
13813
13814 2013-07-12 Andreas Schwab <schwab@linux-m68k.org>
13815
13816 * image.c (x_find_image_file): Don't close a remote file handle.
13817
13818 2013-07-12 Paul Eggert <eggert@cs.ucla.edu>
13819
13820 Fix races with threads and file descriptors.
13821 * callproc.c (Fcall_process_region):
13822 * dired.c (open_directory):
13823 * emacs.c (main, Fdaemon_initialized):
13824 * image.c (x_find_image_file):
13825 * inotify.c (Finotify_rm_watch):
13826 * lread.c (Flocate_file_internal):
13827 * process.c (Fnetwork_interface_list, Fnetwork_interface_info):
13828 * term.c (term_mouse_moveto, init_tty):
13829 * termcap.c (tgetent):
13830 * unexaix.c, unexcoff.c (report_error, report_error_1, adjust_lnnoptrs)
13831 * unexaix.c, unexcoff.c, unexcw.c, unexelf.c (unexec):
13832 * unexhp9k800.c, unexmacosx.c (unexec):
13833 * callproc.c (Fcall_process_region):
13834 Use emacs_close, not close.
13835 * sysdep.c (POSIX_CLOSE_RESTART, posix_close) [!POSIX_CLOSE_RESTART]:
13836 New macro and function, which emulates the POSIX_CLOSE_RESTART macro
13837 and posix_close function on current platforms (which all lack them).
13838 (emacs_close): Use it. This should fix the races on GNU/Linux and
13839 on AIX and on future platforms that support POSIX_CLOSE_RESTART,
13840 and it should avoid closing random victim file descriptors on
13841 other platforms.
13842
13843 2013-07-11 Paul Eggert <eggert@cs.ucla.edu>
13844
13845 * inotify.c (uninitialized): Remove. All uses replaced by -1.
13846 (Finotify_add_watch): Simplify, since -1 means uninitialized now.
13847 Touch up doc a bit.
13848
13849 * eval.c (backtrace_function, backtrace_args): Now EXTERNALLY_VISIBLE.
13850 This is for .gdbinit xbacktrace.
13851
13852 * sysdep.c, term.c, termcap.c, terminal.c: Integer-related minor fixes.
13853 * sysdep.c (emacs_get_tty): Return void, since nobody uses the value.
13854 (emacs_set_tty): Now static.
13855 * sysdep.c (emacs_set_tty, tabs_safe_p, emacs_close):
13856 * term.c (tty_capable_p, tty_default_color_capabilities)
13857 (get_tty_terminal, term_mouse_movement)
13858 (handle_one_term_event, init_tty, maybe_fatal):
13859 * termcap.c (tgetst1, struct termcap_buffer, valid_filename_p)
13860 (tgetent, scan_file, name_match, compare_contin):
13861 * terminal.c (get_terminal):
13862 Use bool for boolean.
13863 * sysdep.c (init_system_name): Don't overflow stack on huge hostname.
13864 Prefer char to unsigned char if either will do.
13865 * term.c (OUTPUT, turn_on_face): Omit unnecessary casts to int.
13866 (tty_write_glyphs): Prefer int to unsigned.
13867 (produce_glyphless_glyph): Remove 2nd (unused) int arg.
13868 All callers changed.
13869 * termcap.c (tprint, main) [TEST]: Remove non-working test.
13870
13871 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
13872
13873 Port to C89.
13874 * bytecode.c (BYTE_CODE_THREADED): Do not define if __STRICT_ANSI__.
13875 (B__dummy__): New dummy symbol, to pacify C89.
13876 * dbusbind.c (XD_DEBUG_MESSAGE): Omit debugging on C89 hosts, since
13877 they can't grok varargs macros.
13878 * dispnew.c (add_window_display_history)
13879 (add_frame_display_history):
13880 * print.c (print_object):
13881 * xdisp.c (debug_method_add):
13882 Use %p printf format only for void pointers.
13883 * emacs.c (usage_message): New constant, replacing ...
13884 (USAGE1, USAGE2, USAGE3): Remove; they were too long for C89.
13885 (main): Adjust to usage reorg.
13886 * fns.c (syms_of_fns):
13887 * profiler.c (syms_of_profiler):
13888 Don't use non-constant struct initializers.
13889 * gnutls.h (gnutls_initstage_t):
13890 * lisp.h (enum Lisp_Fwd_Type):
13891 * lread.c (lisp_file_lexically_bound_p):
13892 * xsettings.c (anonymous enum):
13893 Remove trailing comma.
13894 * xsettings.c (apply_xft_settings): Use %f, not %lf; %lf is a C99ism.
13895 * lisp.h (ENUM_BF): Use unsigned if pedantic.
13896 (DEFUN_FUNCTION_INIT): New macro, that falls back on a cast if pre-C99.
13897 (DEFUN): Use it.
13898 * regex.c (const_re_char): New type, to pacify strict C89.
13899 All uses of 'const re_char' replaced to use it.
13900 * regex.h (_Restrict_): Rename from __restrict, to avoid clash
13901 with glibc when strict C89. This change is imported from gnulib.
13902 All uses changed.
13903 (_Restrict_arr_): Rename from __restrict_arr, similarly.
13904 * sysdep.c (time_from_jiffies) [!HAVE_LONG_LONG_INT]:
13905 Omit GNU_LINUX implementation, since it requires long long.
13906 * xterm.c (x_draw_underwave):
13907 Do not assume the traditional order of struct's members.
13908 (x_term_init): Rewrite to avoid the need for non-constant structure
13909 initializers.
13910
13911 Syntax cleanup, mostly replacing macros with functions.
13912 This removes the need for the syntax_temp hack.
13913 * search.c: Include syntax.h after buffer.h, since syntax.h uses BVAR.
13914 * syntax.c (SYNTAX_INLINE): New macro.
13915 (SYNTAX_FLAGS_COMSTART_FIRST, SYNTAX_FLAGS_COMSTART_SECOND)
13916 (SYNTAX_FLAGS_COMEND_FIRST, SYNTAX_FLAGS_COMEND_SECOND)
13917 (SYNTAX_FLAGS_PREFIX, SYNTAX_FLAGS_COMMENT_STYLEB)
13918 (SYNTAX_FLAGS_COMMENT_STYLEC, SYNTAX_FLAGS_COMMENT_STYLEC2)
13919 (SYNTAX_FLAGS_COMMENT_NESTED, SYNTAX_FLAGS_COMMENT_STYLE)
13920 (SYNTAX_COMEND_FIRST): Now functions, not macros.
13921 (ST_COMMENT_STYLE, ST_STRING_STYLE, INTERVALS_AT_ONCE):
13922 Now constants, not macros.
13923 (syntax_temp) [!__GNUC__]: Remove.
13924 (SYNTAX_PREFIX): Remove; all uses replaced by syntax_prefix_flag_p.
13925 (syntax_prefix_flag_p): Move implementation of SYNTAX_PREFIX here.
13926 (SET_RAW_SYNTAX_ENTRY, SET_RAW_SYNTAX_ENTRY_RANGE, SYNTAX_MATCH)
13927 (SETUP_SYNTAX_TABLE, SETUP_SYNTAX_TABLE_FOR_OBJECT):
13928 Move here from syntax.h; now functions, not macros. Except for the
13929 last function, these are static since only syntax.c uses them.
13930 (syntax_multibyte): Rename from SYNTAX_WITH_MULTIBYTE_CHECK.
13931 All uses changed. Now a function, not a macro; use this fact
13932 to simplify the code.
13933 (scan_lists, scan_sexps_forward): Remove workarounds for ancient
13934 compiler bugs; no longer relevant.
13935 * syntax.h: Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
13936 (SYNTAX_INLINE): New macro.
13937 (struct gl_state_s, gl_state): Move earlier, so that it's in scope
13938 for the new functions. Use bool for boolean member.
13939 (SYNTAX_ENTRY, SYNTAX, SYNTAX_WITH_FLAGS, SYNTAX_MATCH)
13940 (SYNTAX_TABLE_BYTE_TO_CHAR, UPDATE_SYNTAX_TABLE_FORWARD)
13941 (UPDATE_SYNTAX_TABLE_BACKWARD, UPDATE_SYNTAX_TABLE)
13942 (SETUP_BUFFER_SYNTAX_TABLE):
13943 Now extern inline functions, not macros.
13944 (CURRENT_SYNTAX_TABLE, SYNTAX_ENTRY_INT):
13945 Remove; all uses replaced by implementation.
13946 (syntax_temp) [!__GNUC__]: Remove decl.
13947 (SETUP_SYNTAX_TABLE_FOR_OBJECT): New decl.
13948
13949 2013-07-10 Jan Djärv <jan.h.d@swipnet.se>
13950
13951 * emacs.c (main): Fix syntax error.
13952
13953 2013-07-10 Paul Eggert <eggert@cs.ucla.edu>
13954
13955 Timestamp fixes for undo (Bug#14824).
13956 * atimer.c (schedule_atimer):
13957 * fileio.c (Ffile_newer_than_file_p):
13958 Minor cleanup: use EMACS_TIME_LT so that we can remove EMACS_TIME_GT.
13959 * buffer.c (buffer-undo-list): Document (t . 0) and (t . -1).
13960 * fileio.c (Fclear_visited_file_modtime): Move to lisp/files.el.
13961 (syms_of_fileio): Remove Sclear_visited_file_name.
13962 (Fvisited_file_modtime): Return -1, not (-1 ...), when the visited
13963 file doesn't exist; this avoids an ambiguity with negative timestamps.
13964 (Fset_visited_file_modtime): Accept -1 and 0 as time-list arg.
13965 * systime.h (make_emacs_time, invalid_emacs_time):
13966 Don't assume struct timespec layout; POSIX doesn't guarantee it.
13967 (EMACS_TIME_NE, EMACS_TIME_GT, EMACS_TIME_GE): Remove.
13968 * undo.c (record_first_change): Push (visited-file-modtime) onto
13969 undo list rather than reimplementing it by hand, incorrectly.
13970
13971 2013-07-09 Ken Brown <kbrown@cornell.edu>
13972
13973 * sheap.c (STATIC_HEAP_SIZE) [__x86_64__]: Increase to 18MB.
13974
13975 2013-07-09 Juanma Barranquero <lekktu@gmail.com>
13976
13977 * makefile.w32-in ($(BLD)/emacs.$(O), $(BLD)/sysdep.$(O)): Update.
13978
13979 2013-07-09 Paul Eggert <eggert@cs.ucla.edu>
13980
13981 Handle errno and exit status a bit more carefully.
13982 * callproc.c (child_setup) [!DOS_NT]: Don't try to stuff an error
13983 number into an exit status. Instead, use EXIT_CANCELED.
13984 (child_setup) [!MSDOS]: Avoid possible deadlock with vfork.
13985 * callproc.c (relocate_fd):
13986 * emacs.c (close_output_streams, main):
13987 * process.c (create_process):
13988 * sysdep.c (sys_subshell) [!DOS_NT || !WINDOWSNT]:
13989 Use emacs_perror for simplicity.
13990 * callproc.c (relocate_fd, main):
13991 * sysdep.c (sys_subshell):
13992 Exit with EXIT_CANCELED etc., not 1, when exec setup fails.
13993 (shut_down_emacs): Use emacs_write, not write.
13994 * emacs.c, sysdep.c: Don't include <ignore-value.h>.
13995 * fileio.c (Fcopy_file, e_write):
13996 * nsterm.m (ns_select):
13997 * process.c (send_process):
13998 * sound.c (vox_write):
13999 Use emacs_write_sig, not emacs_write.
14000 * lisp.h (emacs_write_sig, emacs_perror): New decls.
14001 * process.h (EXIT_CANCELED), EXIT_CANNOT_INVOKE, EXIT_ENOENT):
14002 New constants.
14003 * sysdep.c (emacs_backtrace): Use emacs_write, not ignore_value
14004 of write.
14005 (emacs_full_write): New function.
14006 (emacs_write): Rewrite to use it.
14007 (emacswrite_sig, emacs_perror): New functions.
14008 * xrdb.c (fatal): Don't invoke perror, since errno might be garbage.
14009
14010 2013-07-08 Magnus Henoch <magnus.henoch@gmail.com> (tiny change)
14011
14012 * image.c (imagemagick_load_image): Do not use MagickExportImagePixels
14013 on NS even if it is present. Pixmap on NS is a void*.
14014
14015 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
14016
14017 Port to Ubuntu 10 (Bug#14803). Reported by T.V. Raman.
14018 * process.c (close_on_exec, accept4, process_socket):
14019 Define these if !HAVE_ACCEPT4, not if !SOCK_CLOEXEC.
14020
14021 2013-07-07 Eli Zaretskii <eliz@gnu.org>
14022
14023 * w32.c (sys_dup): Declare prototype.
14024
14025 * filelock.c:
14026 * emacs.c:
14027 * callproc.c [WINDOWSNT]: Include sys/socket.h.
14028
14029 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
14030
14031 Make file descriptors close-on-exec when possible (Bug#14803).
14032 This simplifies Emacs a bit, since it no longer needs to worry
14033 about closing file descriptors by hand in some cases.
14034 It also fixes some unlikely races. Not all such races, as
14035 libraries often open files internally without setting
14036 close-on-exec, but it's an improvement.
14037 * alloc.c (valid_pointer_p) [!WINDOWSNT]:
14038 * callproc.c (Fcall_process) [!MSDOS]:
14039 * emacs.c (main) [!DOS_NT]:
14040 * nsterm.m (ns_term_init):
14041 * process.c (create_process):
14042 Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
14043 * emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
14044 * filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
14045 Prefer mkostemp with O_CLOEXEC to mkstemp.
14046 * callproc.c (relocate_fd) [!WINDOWSNT]:
14047 * emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
14048 No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
14049 now using pipe2.
14050 * filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
14051 Make the resulting file descriptor close-on-exec.
14052 * lisp.h, lread.c, process.c (close_load_descs, close_process_descs):
14053 * lread.c (load_descriptor_list, load_descriptor_unwind):
14054 Remove; no longer needed. All uses removed.
14055 * process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
14056 (close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
14057 New functions.
14058 (socket) [!SOCK_CLOEXEC]: Supply a substitute.
14059 (Fmake_network_process, Fnetwork_interface_list)
14060 (Fnetwork_interface_info, server_accept_connection):
14061 Make newly-created socket close-on-exec.
14062 * sysdep.c (emacs_open, emacs_fopen):
14063 Make new-created descriptor close-on-exec.
14064 * w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
14065 * w32.c, w32.h (pipe2): Rename from 'pipe', with new flags arg.
14066
14067 2013-07-07 Jan Djärv <jan.h.d@swipnet.se>
14068
14069 * nsterm.m (sendEvent:): Propagate keyboard events to modal windows
14070 for NS_IMPL_GNUSTEP.
14071
14072 2013-07-07 Paul Eggert <eggert@cs.ucla.edu>
14073
14074 Fix openp errno handling.
14075 * callproc.c (Fcall_process): Preserve openp errno around close.
14076 * lread.c (openp): Set errno when returning -1, as some callers
14077 expect this.
14078
14079 2013-07-06 Jan Djärv <jan.h.d@swipnet.se>
14080
14081 * nsterm.m (sendEvent:): Handle NSAPP_DATA2_RUNFILEDIALOG.
14082
14083 * nsterm.h (NSSavePanel): Update comment.
14084 (NSAPP_DATA2_RUNFILEDIALOG): Define.
14085 (ns_run_file_dialog): Declare.
14086
14087 * nsfns.m: Remove panelOK.
14088 (ns_fd_data): New.
14089 (ns_run_file_dialog): New function.
14090 (Fns_read_file_name): Fill in ns_fd_data, post an event and start the
14091 event loop, so file dialog is popped up by ns_run_file_dialog, called
14092 by sendEvent (Bug#14578).
14093 (EmacsSavePanel, EmacsOpenPanel): Remove ok and cancel methods.
14094
14095 2013-07-06 Eli Zaretskii <eliz@gnu.org>
14096
14097 * xdisp.c (default_line_pixel_height): New function.
14098 (pos_visible_p, move_it_vertically_backward, try_scrolling)
14099 (try_cursor_movement, redisplay_window, try_window)
14100 (try_window_id): Use it instead of FRAME_LINE_HEIGHT. (Bug#14771)
14101
14102 * window.c (window_scroll_pixel_based):
14103 use default_line_pixel_height.
14104
14105 * dispextern.h (default_line_pixel_height): Add prototype.
14106
14107 * frame.c (x_set_line_spacing): Accept a float value for
14108 line-spacing parameter, per the documentation.
14109
14110 * data.c (Fmultibyte_string_p): Doc fix.
14111
14112 2013-07-05 Paul Eggert <eggert@cs.ucla.edu>
14113
14114 Use emacs_open more consistently when opening files.
14115 This handles EINTR more consistently now, and makes it easier
14116 to introduce other uniform changes to file descriptor handling.
14117 * sysstdio.h: New file.
14118 * buffer.c (mmap_init):
14119 * cygw32.c (chdir_to_default_directory):
14120 * dispnew.c (Fopen_termscript):
14121 * emacs.c (Fdaemon_initialized):
14122 * fileio.c (Fdo_auto_save):
14123 * image.c (slurp_file, png_load_body, jpeg_load_body):
14124 * keyboard.c (Fopen_dribble_file):
14125 * lread.c (Fload):
14126 * print.c (Fredirect_debugging_output):
14127 * sysdep.c (get_up_time, procfs_ttyname, procfs_get_total_memory):
14128 * termcap.c (tgetent):
14129 * unexaix.c, unexcoff.c (unexec, adjust_lnnoptrs):
14130 * unexcw.c, unexelf.c, unexhp9k800.c, unexmacosx.c (unexec):
14131 * w32term.c (w32_initialize) [CYGWIN]:
14132 * xfaces.c (Fx_load_color_file):
14133 Use emacs_open instead of plain open, and emacs_fopen instead of
14134 plain fopen.
14135 * dispnew.c, fileio.c, image.c, keyboard.c, lread.c, print.c, sysdep.c:
14136 * xfaces.c: Include sysstdio.h rather than stdio.h, for emacs_fopen.
14137 * callproc.c (default_output_mode): New constant.
14138 (Fcall_process): Use it to call emacs_open instead of plain creat.
14139 * dispnew.c (Fopen_termscript): Fix minor race in opening termscript.
14140 * sysdep.c (emacs_open): Add commentary and don't call file name "path".
14141 (emacs_fopen): New function.
14142 * unexaix.c, unexcoff.c, unexelf.c, unexhp9k800.c, unexmacosx.c:
14143 Include <lisp.h>, for emacs_open.
14144 * unexelf.c (fatal): Remove decl; not needed with <lisp.h> included.
14145
14146 Remove duplicate #include directives.
14147 * alloc.c [GC_MARK_STACK == GC_USE_GCPROS_CHECK_ZOMBIES]:
14148 * xfaces.c:
14149 Don't include stdio.h twice.
14150 * buffer.c [USE_MMAP_FOR_BUFFERS]:
14151 Don't include sys/types.h or stdio.h twice.
14152 * fileio.c [WINDOWSNT | MSDOS]: Don't include fcntl.h twice.
14153 * lread.c: Don't include coding.h twice.
14154 * nsfont.m: Don't include frame.h twice.
14155 * process.c [HAVE_RES_INIT]: Don't include <netinet/in.h> twice.
14156 * ralloc.c: Don't include <unistd.h> twice.
14157 * xdisp.c: Don't include font.h twice.
14158 * xterm.c: Don't include fontset.h twice.
14159 * xterm.h [USE_X_TOOLKIT]: Don't include X11/StringDefs.h twice.
14160
14161 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
14162
14163 Scale ImageMagick images more carefully.
14164 * image.c (scale_image_size) [HAVE_IMAGEMAGICK]: New function.
14165 (compute_image_size): Use it. Define only if HAVE_IMAGEMAGICK.
14166 Be more careful about avoiding undefined behavior after
14167 integer overflow and division by zero.
14168
14169 2013-07-04 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14170
14171 * w32fns.c (Qgeometry, Qworkarea, Qmm_size, Qframes): New variables.
14172 (syms_of_w32fns): DEFSYM them.
14173 (MONITORINFOF_PRIMARY, SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN)
14174 (CCHDEVICENAME): Define macros if not defined.
14175 (struct MONITOR_INFO_EX): New struct.
14176 (MonitorEnum_Proc, EnumDisplayMonitors_Proc): New prototypes.
14177 (enum_display_monitors_fn): New variable.
14178 (globals_of_w32fns): Initialize it.
14179 (Fx_display_pixel_width, Fx_display_pixel_height)
14180 (Fx_display_mm_height, Fx_display_mm_width): Mention behavior on
14181 multi-monitor setups in docstrings.
14182 (Fx_display_mm_height, Fx_display_mm_width): Approximate whole
14183 screen size by primary monitor's millimeter per pixel.
14184 (w32_monitor_enum, w32_display_monitor_attributes_list)
14185 (w32_display_monitor_attributes_list_fallback)
14186 (Fw32_display_monitor_attributes_list): New functions.
14187 (syms_of_w32fns): Defsubr Sw32_display_monitor_attributes_list.
14188
14189 * w32term.c (SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN): Define macros
14190 if not defined.
14191 (x_display_pixel_height, x_display_pixel_width): Use GetSystemMetrics.
14192
14193 2013-07-04 Michael Albinus <michael.albinus@gmx.de>
14194
14195 * fileio.c (Qfile_notify_error): New error symbol.
14196
14197 * gfilenotify.c (Fgfile_add_watch, Fgfile_rm_watch):
14198 * inotify.c (inotify_callback, symbol_to_inotifymask)
14199 (Finotify_add_watch, Finotify_rm_watch): Use it.
14200 (inotifyevent_to_event): Exchange order of cookie and file name.
14201 (Finotify_add_watch): Adapt docstring.
14202
14203 * lisp.h (Qfile_notify_error): Declare.
14204
14205 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
14206
14207 Try again to fix FreeBSD bug re multithreaded memory alloc (Bug#14569).
14208 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
14209 Do not clear _malloc_thread_enabled_p, undoing the previous change,
14210 which did not work (see <http://bugs.gnu.org/14569#307>).
14211 (main): Do not invoke malloc_enable_thread if (! CANNOT_DUMP
14212 && (!noninteractive || initialized)). This attempts to thread
14213 the needle between the Scylla of FreeBSD and the Charybdis of Cygwin.
14214
14215 2013-07-04 Juanma Barranquero <lekktu@gmail.com>
14216
14217 * image.c (x_to_xcolors) [HAVE_NTGUI]: Remove unused var `hdc'.
14218 (x_build_heuristic_mask) [HAVE_NTGUI]: Remove unused var `frame_dc'.
14219
14220 2013-07-04 Paul Eggert <eggert@cs.ucla.edu>
14221
14222 Try to fix FreeBSD bug re multithreaded memory allocation (Bug#14569).
14223 * emacs.c (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
14224 Clear _malloc_thread_enabled_p at startup. Reported by Ashish SHUKLA in
14225 <http://lists.gnu.org/archive/html/emacs-devel/2013-07/msg00088.html>.
14226
14227 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
14228
14229 * sysdep.c (sys_siglist) [HAVE_DECL___SYS_SIGLIST]:
14230 Define to __sys_siglist.
14231
14232 2013-07-02 Eli Zaretskii <eliz@gnu.org>
14233
14234 * xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): Don't disallow
14235 word-wrap, so that overflow-newline-into-fringe would work in
14236 visual-line-mode. (Bug#2749)
14237 (move_it_in_display_line_to): When the last scanned display
14238 element fits exactly on the display line, and
14239 overflow-newline-into-fringe is non-nil, but wrap_it is valid,
14240 don't return MOVE_NEWLINE_OR_CR, but instead back up to the last
14241 wrap point and return MOVE_LINE_CONTINUED. Fixes problems with
14242 finding buffer position that corresponds to pixel coordinates,
14243 e.g. in buffer_posn_from_coords.
14244
14245 2013-07-02 Jan Djärv <jan.h.d@swipnet.se>
14246
14247 * process.c (handle_child_signal): Call catch_child_signal if
14248 NS_IMPL_GNUSTEP.
14249
14250 2013-07-02 Paul Eggert <eggert@cs.ucla.edu>
14251
14252 Don't convert function pointers to void * and back.
14253 It isn't portable C, and it's easy enough to avoid.
14254 * alloc.c: Verify SAVE_FUNCPOINTER bits, too.
14255 (make_save_value): Add support for SAVE_FUNCPOINTER.
14256 * keymap.c (map_keymap_char_table_item, map_keymap_internal):
14257 * print.c (print_object):
14258 Distinguish function from object pointers.
14259 * lisp.h (SAVE_FUNCPOINTER): New constant.
14260 (SAVE_SLOT_BITS): Adjust to it.
14261 (SAVE_TYPE_FUNCPTR_PTR_OBJ): New constant, replacing
14262 SAVE_TYPE_PTR_PTR_OBJ. Change the only use.
14263 (voidfuncptr): New typedef.
14264 (struct Lisp_Save_Value): New member data[0].funcpointer.
14265 (XSAVE_FUNCPOINTER): New function.
14266
14267 Simplify buildobj processing.
14268 * Makefile.in (buildobj.h): Make it a sequence of strings each
14269 followed by comma, rather than a single string. Put it into a
14270 .tmp file in case there's an error while generating it.
14271 (gl-stamp): Use .tmp for temp files.
14272 (mostlyclean): Clean .tmp files.
14273 * doc.c (buildobj): Move to just the routine that needs it.
14274 It's now an array of strings, so processing is simpler.
14275
14276 2013-07-01 Paul Eggert <eggert@cs.ucla.edu>
14277
14278 Fix bug re noninteractive multithreaded memory allocation (Bug#14569).
14279 * emacs.c (malloc_enable_thread): Hoist extern decl to top level.
14280 (main) [HAVE_PTHREAD && !SYSTEM_MALLOC && !DOUG_LEA_MALLOC]:
14281 Invoke malloc_enable_thread even when not interactive.
14282 Reported by Ken Brown in <http://bugs.gnu.org/14569#275>.
14283 * process.c (init_process_emacs) [CYGWIN]: Tickle glib even
14284 in this case, since the underlying bug has now been fixed.
14285
14286 2013-07-01 Juanma Barranquero <lekktu@gmail.com>
14287
14288 * emacs.c (Fkill_emacs): Expand Vauto_save_list_file_name before
14289 unlinking it (bug#14691).
14290
14291 2013-06-30 Michal Nazarewicz <mina86@mina86.com>
14292
14293 * buffer.c (FKill_buffer): Run `kill-buffer-query-functions'
14294 before checking whether buffer is modified. This lets
14295 `kill-buffer-query-functions' cancel killing of the buffer or save
14296 its content before `kill-buffer' asks user the "Buffer %s
14297 modified; kill anyway?" question.
14298
14299 2013-06-30 Jan Djärv <jan.h.d@swipnet.se>
14300
14301 * nsfns.m (handlePanelKeys): Don't process Command+Function keys.
14302 Let the super performKeyEquivalent deal with them (Bug#14747).
14303
14304 2013-06-30 Paul Eggert <eggert@cs.ucla.edu>
14305
14306 * widget.c (resize_cb): Remove unused local.
14307
14308 Do not use GTK 3 if it exists but cannot be compiled.
14309 * xmenu.c (x_menu_wait_for_event) [!USE_GTK]:
14310 * xterm.c (x_error_handler) [!USE_GTK]:
14311 Do not use GTK 3.
14312
14313 * intervals.c (get_local_map): Actually clip POSITION (Bug#14753).
14314
14315 2013-06-30 Eli Zaretskii <eliz@gnu.org>
14316
14317 * intervals.c (get_local_map): Instead of aborting, clip POSITION
14318 to the valid range of values. (Bug#14753)
14319
14320 * xdisp.c (Fmove_point_visually): Invalidate the cursor position
14321 when moving point by using the current glyph matrix. This avoids
14322 the need to force redisplay when this function is called in a
14323 loop.
14324
14325 2013-06-29 Paul Eggert <eggert@cs.ucla.edu>
14326
14327 Fix minor problems found by static checking.
14328 * coding.c (encode_inhibit_flag, inhibit_flag): New functions.
14329 Redo the latter's body to sidestep GCC parenthesization warnings.
14330 (setup_coding_system, detect_coding, detect_coding_system): Use them.
14331 * coding.c (detect_coding, detect_coding_system):
14332 * coding.h (struct undecided_spec):
14333 Use bool for boolean.
14334 * image.c (QCmax_width, QCmax_height): Now static.
14335 * xdisp.c (Fmove_point_visually): Remove unused local.
14336
14337 2013-06-29 Eli Zaretskii <eliz@gnu.org>
14338
14339 * xdisp.c (Fmove_point_visually): New function.
14340
14341 2013-06-28 Kenichi Handa <handa@gnu.org>
14342
14343 * coding.h (define_coding_undecided_arg_index): New enum.
14344 (coding_attr_index): New members
14345 coding_attr_undecided_inhibit_null_byte_detection,
14346 coding_attr_undecided_inhibit_iso_escape_detection,
14347 coding_attr_undecided_prefer_utf_8.
14348 (undecided_spec): New struct.
14349 (struct coding_system): New member `undecided' of the member
14350 `spec'.
14351
14352 * coding.c (setup_coding_system): Handle CODING->spec.undecided.
14353 (detect_coding): Likewise.
14354 (detect_coding_system): Likewise.
14355 (Fdefine_coding_system_internal): New coding system properties
14356 :inhibit-null-byte-detection, :inhibit-iso-escape-detection, and
14357 :prefer-utf-8.
14358 (syms_of_coding): Adjust for coding_arg_undecided_max.
14359
14360 2013-06-28 Paul Eggert <eggert@cs.ucla.edu>
14361
14362 * image.c (x_from_xcolors): Remove unused local.
14363
14364 2013-06-28 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
14365
14366 Defer image data transfer between X client and server until actual
14367 display happens.
14368
14369 * dispextern.h (struct image) [HAVE_X_WINDOWS]: New members `ximg'
14370 and `mask_img'.
14371
14372 * image.c (Destroy_Image): Remove.
14373 (x_clear_image_1): New arg `flags' instead of 3 bools `pixmap_p',
14374 `mask_p', and `colors_p'. All uses changed.
14375 (x_clear_image_1) [HAVE_X_WINDOWS]: Destroy `ximg' and `mask_img'.
14376 (CLEAR_IMAGE_PIXMAP, CLEAR_IMAGE_MASK, CLEAR_IMAGE_COLORS):
14377 New macros for `flags' arg to x_clear_image_1.
14378 (postprocess_image, xpm_load_image, x_build_heuristic_mask)
14379 (png_load_body): Use x_clear_image_1 instead of Free_Pixmap.
14380 (ZPixmap, XGetImage) [HAVE_NS]: Remove.
14381 (image_get_x_image_or_dc, image_unget_x_image_or_dc)
14382 (image_get_x_image, image_unget_x_image): New functions or macros.
14383 (image_background, image_background_transparent, x_to_xcolors)
14384 (x_build_heuristic_mask): Use image_get_x_image_or_dc instead of
14385 XGetImage or CreateCompatibleDC. Use image_unget_x_image_or_dc
14386 instead of Destroy_Image.
14387 (image_create_x_image_and_pixmap, image_put_x_image): New functions.
14388 (xpm_load_image, x_from_xcolors, x_build_heuristic_mask, pbm_load)
14389 (png_load_body, jpeg_load_body, tiff_load, gif_load)
14390 (imagemagick_load_image, svg_load_image): Use them instead of
14391 x_create_x_image_and_pixmap, and x_put_x_image followed by
14392 x_destroy_x_image, respectively.
14393 (xpm_load) [HAVE_XPM && !HAVE_NTGUI]: Use XpmReadFileToImage and
14394 XpmCreateImageFromBuffer instead of XpmReadFileToPixmap and
14395 XpmCreatePixmapFromBuffer. Create pixmaps. Fill background and
14396 background_transparent fields.
14397 (image_sync_to_pixmaps) [HAVE_X_WINDOWS]: New function.
14398 (prepare_image_for_display, x_disable_image) [HAVE_X_WINDOWS]: Use it.
14399
14400 2013-06-27 Paul Eggert <eggert@cs.ucla.edu>
14401
14402 Do not tickle glib SIGCHLD handling if Cygwin (Bug#14569).
14403 This mostly consists of undoing recent changes.
14404 * callproc.c (Fcall_process):
14405 * process.c (create_process):
14406 Do not worry about catching SIGCHLD here, undoing previous change.
14407 * nsterm.m (ns_term_init): Re-catch SIGCHLD, undoing previous change.
14408 * process.c, process.h (catch_child_signal):
14409 No longer extern if !NS_IMPL_GNUSTEP, undoing 06-22 change.
14410 * process.c (catch_child_handler): Don't worry about being called
14411 lazily and do not assume caller has blocked SIGCHLD, undoing
14412 previous change. Move first-time stuff back to
14413 init_process_emacs, undoing 06-22 change. If CYGWIN, do not
14414 tickle glib, as that causes Cygwin bootstrap to fail. Do not
14415 set lib_child_handler if it's already initialized, which may
14416 help avoid problems on GNUstep.
14417
14418 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
14419
14420 A more-conservative workaround for Cygwin SIGCHLD issues (Bug#14569).
14421 * callproc.c (Fcall_process):
14422 * process.c (create_process):
14423 Make sure SIGCHLD is caught before we fork,
14424 since Emacs startup no arranges to catch SIGCHLD.
14425 * process.c (lib_child_handler): Initialize to null, not to
14426 dummy_handler.
14427 (catch_child_signal): Allow self to be called lazily.
14428 Do nothing if it's already been called.
14429 Assume caller has blocked SIGCHLD (all callers do now).
14430 * emacs.c (main): Do not catch SIGCHLD here; defer it until
14431 just before it's really needed.
14432 * nsterm.m (ns_term_init): No need to re-catch SIGCHLD here,
14433 since it hasn't been caught yet.
14434
14435 2013-06-23 Lars Magne Ingebrigtsen <larsi@gnus.org>
14436
14437 * image.c (compute_image_size): New function to implement
14438 :max-width and :max-height.
14439 (imagemagick_load_image): Use it.
14440
14441 2013-06-23 Paul Eggert <eggert@cs.ucla.edu>
14442
14443 Try to avoid malloc SEGVs on Cygwin (Bug#14569).
14444 * callproc.c, process.h (block_child_signal, unblock_child_signal):
14445 Now extern.
14446 * emacs.c (main): Catch SIGCHLD just before initializing gfilenotify.
14447 * process.c (catch_child_signal): Block SIGCHLD while futzing with
14448 the SIGCHLD handler, since the code is not atomic and (due to glib)
14449 signals may be arriving now.
14450 * sysdep.c (init_signals): Do not catch child signals here;
14451 'main' now does that later, at a safer time.
14452
14453 2013-06-22 Paul Eggert <eggert@cs.ucla.edu>
14454
14455 Clean up SIGCHLD handling a bit (Bug#14569).
14456 * process.c, process.h (catch_child_signal):
14457 Now always extern, even if !NS_IMPL_GNUSTEP.
14458 * process.c (catch_child_signal): Move glib tickler here from
14459 init_process_emacs, so that it's done earlier in Emacs
14460 initialization. Also move the noninteractive && !initialized
14461 check here from init_process_emacs. This is all a bit cleaner for
14462 GNUish platforms, and I hope it works around the Cygwin bug.
14463 * sysdep.c (init_signals): Invoke catch_child_signal here, so
14464 that glib signal handling is tickled before glib creates threads.
14465
14466 * process.c (wait_reading_process_output): Avoid int overflow
14467 when reading more than 2 GiB total from a process.
14468
14469 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
14470
14471 * process.c (create_process): Handle a couple more cases,
14472 i.e., work even if new_argv and wait_child_setup[i] are cached.
14473 Use Fcall_process's style for volatile vars.
14474
14475 2013-06-21 Andreas Schwab <schwab@linux-m68k.org>
14476
14477 * process.c (create_process): Mark PROCESS volatile.
14478
14479 2013-06-21 Paul Eggert <eggert@cs.ucla.edu>
14480
14481 Use C99-style flexible array members if available.
14482 This avoids some subtle aliasing issues, which typically
14483 aren't a problem with GCC but may be a problem elsewhere.
14484 * alloc.c (sdata): New typedef, replacing the old struct sdata.
14485 It is a struct if GC_CHECK_STRING_BYTES, a union otherwise.
14486 In either case, it uses a flexible array member rather than
14487 the old struct hack. All uses changed.
14488 (SDATA_NBYTES, sweep_strings) [!GC_CHECK_STRING_BYTES]:
14489 Adjust to sdata reorganization.
14490 * alloc.c (VBLOCK_BYTES_MIN, allocate_vectorlike, Fgarbage_collect):
14491 Use offsetof (struct, flex_array_member), not sizeof (struct), as
14492 that ports better to pre-C99 non-GCC.
14493 * chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
14494 Use CHAR_TABLE_STANDARD_SLOTS rather than its definition,
14495 as the latter has changed.
14496 * conf_post.h (FLEXIBLE_ARRAY_MEMBER): Move here from w32.c,
14497 and port better to pre-C99 GCC.
14498 * image.c (struct xpm_cached_color):
14499 * lisp.h (struct Lisp_Vector, struct Lisp_Bool_Vector)
14500 (struct Lisp_Char_Table, struct Lisp_Sub_Char_Table):
14501 Use FLEXIBLE_ARRAY_MEMBER.
14502 * lisp.h (string_bytes) [GC_CHECK_STRING_BYTES]:
14503 Move decl to top level so it gets checked against implementation.
14504 (CHAR_TABLE_STANDARD_SLOTS): Adjust to struct Lisp_Char_Table change.
14505 * w32.c (FLEXIBLE_ARRAY_MEMBER): Move to conf_post.h.
14506
14507 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
14508
14509 * syntax.c: Integer cleanups.
14510 (SYNTAX_FLAGS_COMMENT_STYLEC): Return a boolean, not 0-or-2.
14511 All uses that need 0-or-2 changed to:
14512 (SYNTAX_FLAGS_COMMENT_STYLEC2): New macro, with the same semantics
14513 as the old SYNTAX_FLAGS_COMMENT_STYLEC.
14514 (struct lisp_parse_state, syntax_prefix_flag_p, update_syntax_table)
14515 (char_quoted, prev_char_comend_first, back_comment)
14516 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
14517 (in_classes, forw_comment, scan_lists, scan_sexps_forward):
14518 Use bool for boolean.
14519 (update_syntax_table, skip_chars, skip_syntaxes):
14520 Prefer int to unsigned when either will do.
14521 (back_comment): Return boolean success flag, like forw_comment,
14522 instead of positive-or-minus-1 (which might have overflowed int anyway).
14523 Don't stuff ptrdiff_t into int.
14524 (syntax_spec_code, syntax_code_spec): Now const.
14525 (Fmatching_paren, scan_lists, scan_sexps_forward):
14526 Use enum syntaxcode for syntax code.
14527 (Fmatching_paren): Check that arg is a character, not just an integer.
14528 (Fstring_to_syntax): Don't assume 0377 fits in enum syntaxcode.
14529 (Finternal_describe_syntax_value): Omit no-longer-needed
14530 comparison to 0.
14531 (skip_chars): Use char, not unsigned char, when the distinction
14532 doesn't matter.
14533 (forw_comment, scan_lists): Prefer A |= B to A = A || B when B's cheap.
14534 * bytecode.c (exec_byte_code):
14535 * syntax.c (syntax_spec_code, Fchar_syntax)
14536 (Finternal_describe_syntax_value, skip_chars, skip_syntaxes)
14537 (init_syntax_once):
14538 * syntax.h (SYNTAX_WITH_FLAGS):
14539 Omit unnecessary casts.
14540
14541 2013-06-20 Eli Zaretskii <eliz@gnu.org>
14542
14543 * w32fns.c (w32_wnd_proc): Don't compute the header line and mode
14544 line dimensions here, to avoid race conditions with the main
14545 thread. (Bug#14062, bug#14630, bug#14669)
14546
14547 * w32term.c (w32_draw_window_cursor): Compute the header line and
14548 mode line dimensions here.
14549 <w32_system_caret_window, w32_system_caret_hdr_height>:
14550 <w32_system_caret_mode_height>: New variables.
14551
14552 * w32term.h: Declare them.
14553
14554 2013-06-20 Paul Eggert <eggert@cs.ucla.edu>
14555
14556 * alloc.c (die): Move "assertion failed" string here ...
14557 * lisp.h (eassert): ... from here. Also, suppress evaluation of
14558 COND when SUPPRESS_CHECKING. This shrinks the executable text
14559 size by 0.8% to 2.2% when configured with --enable-checking,
14560 depending on optimization flags (GCC 4.8.1 x86-64).
14561
14562 * floatfns.c (Flog10): Move to Lisp (marked obsolete there).
14563
14564 2013-06-20 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
14565
14566 * floatfns.c (Flog) [HAVE_LOG2]: Use log2 if available and if the
14567 base is 2; this is more accurate.
14568
14569 2013-06-19 Juanma Barranquero <lekktu@gmail.com>
14570
14571 * sound.c (string_default): Move to !WINDOWSNT section.
14572 (Fplay_sound_internal) [WINDOWSNT]: Remove i_result to avoid warning.
14573
14574 2013-06-19 Paul Eggert <eggert@cs.ucla.edu>
14575
14576 * sound.c: Integer cleanups.
14577 Remove unnecessary forward decls.
14578 (struct sound_device): The 'file' member is now a Lisp_Object, not
14579 a char *, so that we needn't invoke alloca on a huge size.
14580 (Fplay_sound_internal): Adjust to this.
14581 (string_default): New function.
14582 (vox_open, vox_init, alsa_open, alsa_configure, alsa_init):
14583 Use it to adjust to the struct sound_device change.
14584 (parse_sound, wav_init, au_init, alsa_init): Use bool for booleans.
14585 (be2hs) [0]: Remove.
14586
14587 * syntax.c (skip_chars): Don't use uninitialized storage
14588 when searching a multibyte buffer for characters that are not in a
14589 unibyte string that contains non-ASCII characters.
14590
14591 2013-06-18 Jan Djärv <jan.h.d@swipnet.se>
14592
14593 * process.c: Include xgselect.h if HAVE_GLIB. Include glib.h
14594 if HAVE_GLIB && ! WINDOWSNT (Bug#14654).
14595
14596 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
14597
14598 * conf_post.h: Add comments for INLINE, EXTERN_INLINE, etc.
14599
14600 2013-06-18 Kenichi Handa <handa@gnu.org>
14601
14602 * font.c (Ffont_spec): Signal an error for an invalid font name
14603 (Bug#14648).
14604
14605 2013-06-18 Paul Eggert <eggert@cs.ucla.edu>
14606
14607 Porting fixes for merged specpdl and backtrace stacks (Bug#14643).
14608 In particular this ports to 32-bit sparc Sun cc.
14609 * eval.c (init_eval_once, grow_specpdl): Allocate a specbinding
14610 array with a dummy element at specpdl[-1], so that its address can
14611 be taken portably.
14612 (unbind_to): Do not copy the binding; not needed, now that we
14613 copy old_value in the one place where the copy is needed.
14614 * fileio.c (Fwrite_region): Use ptrdiff_t, not int, for specpdl count.
14615 * lisp.h (BITS_PER_PTRDIFF_T): Remove; no longer needed.
14616 (union specbinding): Rename from struct specbinding. Redo layout
14617 to avoid the need for 'ptrdiff_t nargs : BITS_PER_PTRDIFF_T - 1;',
14618 which is not portable. With Sun C 5.12 32-bit sparc, the
14619 declaration causes nargs to be an unsigned bitfield, a behavior
14620 that the C standard allows; but Emacs wants nargs to be signed.
14621 The overall type is now a union of structures rather than a
14622 structure of union of structures, and the 'kind' member is now a
14623 bitfield, so that the overall type doesn't grow. All uses changed.
14624 * process.c (Fmake_serial_process): Remove unnecessary initialization.
14625
14626 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
14627
14628 * frame.c (x_report_frame_params): Cast parent_desc to uintptr_t.
14629 Needed if HAVE_NTGUI. Reported by Juanma Barranquero.
14630
14631 * nsfont.m (ns_registry_to_script): Parenthesize while expression.
14632
14633 2013-06-17 Eli Zaretskii <eliz@gnu.org>
14634
14635 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
14636 unless we know that the window w's frame is a frame object.
14637 Another attempt at solving bug#14062 and bug#14630.
14638
14639 2013-06-17 Lars Magne Ingebrigtsen <larsi@gnus.org>
14640
14641 * textprop.c (property_set_type): New enum.
14642 (add_properties): Allow appending/prepending text properties.
14643 (add_text_properties_1): Factored out of Fadd_text_properties.
14644 (Fadd_text_properties): Move all the code into
14645 add_text_properties_1.
14646 (Fadd_face_text_property): New function that calls
14647 add_text_properties_1.
14648
14649 2013-06-17 Paul Eggert <eggert@cs.ucla.edu>
14650
14651 Move functions from lisp.h to individual modules when possible.
14652 From a suggestion by Andreas Schwab in <http://bugs.gnu.org/11935#68>.
14653 * alloc.c (XFLOAT_INIT, set_symbol_name):
14654 * buffer.c (CHECK_OVERLAY):
14655 * chartab.c (CHECK_CHAR_TABLE, set_char_table_ascii)
14656 (set_char_table_parent):
14657 * coding.c (CHECK_NATNUM_CAR, CHECK_NATNUM_CDR):
14658 * data.c (BOOLFWDP, INTFWDP, KBOARD_OBJFWDP, OBJFWDP, XBOOLFWD)
14659 (XKBOARD_OBJFWD, XINTFWD, XOBJFWD, CHECK_SUBR, set_blv_found)
14660 (blv_value, set_blv_value, set_blv_where, set_blv_defcell)
14661 (set_blv_valcell):
14662 * emacs.c (setlocale) [!HAVE_SETLOCALE]:
14663 * eval.c (specpdl_symbol, specpdl_old_value, specpdl_where)
14664 (specpdl_arg, specpdl_func, backtrace_function, backtrace_nargs)
14665 (backtrace_args, backtrace_debug_on_exit):
14666 * floatfns.c (CHECK_FLOAT):
14667 * fns.c (CHECK_HASH_TABLE, CHECK_LIST_END)
14668 (set_hash_key_and_value, set_hash_next, set_hash_next_slot)
14669 (set_hash_hash, set_hash_hash_slot, set_hash_index)
14670 (set_hash_index_slot):
14671 * keymap.c (CHECK_VECTOR_OR_CHAR_TABLE):
14672 * marker.c (CHECK_MARKER):
14673 * textprop.c (CHECK_STRING_OR_BUFFER):
14674 * window.c (CHECK_WINDOW_CONFIGURATION):
14675 Move here from lisp.h, and make these functions static rather than
14676 extern inline.
14677 * buffer.c (Qoverlayp):
14678 * data.c (Qsubrp):
14679 * fns.c (Qhash_table_p):
14680 * window.c (Qwindow_configuration_p):
14681 Now static.
14682 * lisp.h: Remove the abovementioned defns and decls.
14683
14684 Use functions, not macros, for XINT etc (Bug#11935).
14685 In lisp.h, prefer functions to function-like macros, and
14686 constants to object-like macros, when either will do. This:
14687 . simplifies use, as there's no more need to worry about
14688 arguments' side effects being evaluated multiple times.
14689 . makes the code easier to debug on some platforms.
14690 However, when using gcc -O0, keep using function-like macros
14691 for a few critical operations, for performance reasons.
14692 This sort of thing isn't needed with gcc -Og, but -Og
14693 is a GCC 4.8 feature and isn't widely-enough available yet.
14694 * alloc.c (gdb_make_enums_visible) [USE_LSB_TAG]:
14695 Remove enum lsb_bits; no longer needed.
14696 (allocate_misc, free_misc): Don't use XMISCTYPE as an lvalue.
14697 * buffer.c (Qoverlap):
14698 * data.c (Qsubrp):
14699 * fns.c (Qhash_table_p):
14700 Now extern, so lisp.h can use these symbols.
14701 * dispextern.h: Include character.h, for MAX_CHAR etc.
14702 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
14703 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
14704 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
14705 (GLYPH_CODE_P): Move here from lisp.h.
14706 (GLYPH_CHAR, GLYPH_FACE, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
14707 (GLYPH_CHAR_VALID_P, GLYPH_CODE_P): Now functions, not macros.
14708 (GLYPH_MODE_LINE_FACE): Now enums, not macros.
14709 * eval.c (Fautoload): Cast XUNTAG output to intptr_t, since
14710 XUNTAG now returns void *.
14711 * lisp.h (lisp_h_XLI, lisp_h_XIL, lisp_h_CHECK_LIST_CONS)
14712 (lisp_h_CHECK_NUMBER CHECK_SYMBOL, lisp_h_CHECK_TYPE)
14713 (lisp_h_CONSP, lisp_h_EQ, lisp_h_FLOATP, lisp_h_INTEGERP)
14714 (lisp_h_MARKERP, lisp_h_MISCP, lisp_h_NILP)
14715 (lisp_h_SET_SYMBOL_VAL, lisp_h_SYMBOL_CONSTANT_P)
14716 (lisp_h_SYMBOL_VAL, lisp_h_SYMBOLP, lisp_h_VECTORLIKEP)
14717 (lisp_h_XCAR, lisp_h_XCDR, lisp_h_XCONS, lisp_h_XHASH)
14718 (lisp_h_XPNTR, lisp_h_XSYMBOL):
14719 New macros, renamed from their sans-lisp_h_ counterparts.
14720 (XLI, XIL, CHECK_LIST_CONS, CHECK_NUMBER CHECK_SYMBOL)
14721 (CHECK_TYPE, CONSP, EQ, FLOATP, INTEGERP, MARKERP)
14722 (MISCP, NILP, SET_SYMBOL_VAL, SYMBOL_CONSTANT_P, SYMBOL_VAL, SYMBOLP)
14723 (VECTORLIKEP, XCAR, XCDR, XCONS, XHASH, XPNTR, XSYMBOL):
14724 If compiling via GCC without optimization, define these as macros
14725 in addition to inline functions.
14726 To disable this, compile with -DINLINING=0.
14727 (LISP_MACRO_DEFUN, LISP_MACRO_DEFUN_VOID): New macros.
14728 (check_cons_list) [!GC_CHECK_CONS_LIST]: Likewise.
14729 (make_number, XFASTINT, XINT, XTYPE, XUNTAG): Likewise, but
14730 hand-optimize only in the USE_LSB_TAG case, as GNUish hosts do that.
14731 (INTMASK, VALMASK): Now macros, since static values cannot be
14732 accessed from extern inline functions.
14733 (VALMASK): Also a constant, for benefit of old GDB.
14734 (LISP_INT_TAG_P): Remove; no longer needed as the only caller
14735 is INTEGERP, which can fold it in.
14736 (XLI, XIL, XHASH, XTYPE, XINT, XFASTINT, XUINT)
14737 (make_number, XPNTR, XUNTAG, EQ, XCONS, XVECTOR, XSTRING, XSYMBOL)
14738 (XFLOAT, XPROCESS, XWINDOW, XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE)
14739 (XSUB_CHAR_TABLE, XBOOL_VECTOR, make_lisp_ptr, CHECK_TYPE)
14740 (CHECK_STRING_OR_BUFFER, XCAR, XCDR, XSETCAR, XSETCDR, CAR, CDR)
14741 (CAR_SAFE, CDR_SAFE, STRING_MULTIBYTE, SDATA, SSDATA, SREF, SSET)
14742 (SCHARS, STRING_BYTES, SBYTES, STRING_SET_CHARS, STRING_COPYIN, AREF)
14743 (ASIZE, ASET, CHAR_TABLE_REF_ASCII, CHAR_TABLE_REF)
14744 (CHAR_TABLE_SET, CHAR_TABLE_EXTRA_SLOTS, SYMBOL_VAL, SYMBOL_ALIAS)
14745 (SYMBOL_BLV, SYMBOL_FWD, SET_SYMBOL_VAL, SET_SYMBOL_ALIAS)
14746 (SET_SYMBOL_BLV, SET_SYMBOL_FWD, SYMBOL_NAME, SYMBOL_INTERNED_P)
14747 (SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P, SYMBOL_CONSTANT_P)
14748 (XHASH_TABLE, HASH_TABLE_P, CHECK_HASH_TABLE, HASH_KEY, HASH_VALUE)
14749 (HASH_NEXT, HASH_HASH, HASH_INDEX, HASH_TABLE_SIZE)
14750 (XMISC, XMISCANY, XMARKER, XOVERLAY, XSAVE_VALUE, XFWDTYPE)
14751 (XINTFWD, XBOOLFWD, XOBJFWD, XBUFFER_OBJFWD, XKBOARD_OBJFWD)
14752 (XFLOAT_DATA, XFLOAT_INIT, NILP, NUMBERP, NATNUMP)
14753 (RANGED_INTEGERP, CONSP, FLOATP, MISCP, STRINGP, SYMBOLP)
14754 (INTEGERP, VECTORLIKEP, VECTORP, OVERLAYP)
14755 (MARKERP, SAVE_VALUEP, AUTOLOADP, INTFWDP, BOOLFWDP, OBJFWDP)
14756 (BUFFER_OBJFWDP, KBOARD_OBJFWDP, PSEUDOVECTOR_TYPEP)
14757 (PSEUDOVECTORP, WINDOW_CONFIGURATIONP, PROCESSP, WINDOWP)
14758 (TERMINALP, SUBRP, COMPILEDP, BUFFERP, CHAR_TABLE_P)
14759 (SUB_CHAR_TABLE_P, BOOL_VECTOR_P, FRAMEP, IMAGEP, ARRAYP)
14760 (CHECK_LIST, CHECK_LIST_CONS, CHECK_LIST_END, CHECK_STRING)
14761 (CHECK_STRING_CAR, CHECK_CONS, CHECK_SYMBOL, CHECK_CHAR_TABLE)
14762 (CHECK_VECTOR, CHECK_VECTOR_OR_STRING, CHECK_ARRAY)
14763 (CHECK_VECTOR_OR_CHAR_TABLE, CHECK_BUFFER, CHECK_WINDOW)
14764 (CHECK_WINDOW_CONFIGURATION, CHECK_PROCESS, CHECK_SUBR)
14765 (CHECK_NUMBER, CHECK_NATNUM, CHECK_MARKER, XFLOATINT)
14766 (CHECK_FLOAT, CHECK_NUMBER_OR_FLOAT, CHECK_OVERLAY)
14767 (CHECK_NUMBER_CAR, CHECK_NUMBER_CDR, CHECK_NATNUM_CAR)
14768 (CHECK_NATNUM_CDR, FUNCTIONP, SPECPDL_INDEX, LOADHIST_ATTACH)
14769 Now functions.
14770 (check_cons_list) [!GC_CHECK_CONS_LIST]: New empty function.
14771 (LISP_MAKE_RVALUE, TYPEMASK): Remove; no longer needed.
14772 (VALMASK): Define in one place rather than in two, merging the
14773 USE_LSB_TAG parts; this is simpler.
14774 (aref_addr, gc_aset, MOST_POSITIVE_FIXNUM, MOST_NEGATIVE_FIXNUM)
14775 (max, min, struct Lisp_String, UNSIGNED_CMP, ASCII_CHAR_P):
14776 Move up, to avoid use before definition.
14777 Also include "globals.h" earlier, for the same reason.
14778 (make_natnum): New function.
14779 (XUNTAG): Now returns void *, not intptr_t, as this means fewer casts.
14780 (union Lisp_Fwd, BOOLFWDP, BOOL_VECTOR_P, BUFFER_OBJFWDP, BUFFERP)
14781 (CHAR_TABLE_P, CHAR_TABLE_REF_ASCII, CONSP, FLOATP, INTEGERP, INTFWDP)
14782 (KBOARD_OBJFWDP, MARKERP, MISCP, NILP, OBJFWDP, OVERLAYP, PROCESSP)
14783 (PSEUDOVECTORP, SAVE_VALUEP, STRINGP, SUB_CHAR_TABLE_P, SUBRP, SYMBOLP)
14784 (VECTORLIKEP, WINDOWP, Qoverlayp, char_table_ref, char_table_set)
14785 (char_table_translate, Qarrayp, Qbufferp, Qbuffer_or_string_p)
14786 (Qchar_table_p, Qconsp, Qfloatp, Qintegerp, Qlambda, Qlistp, Qmarkerp)
14787 (Qnil, Qnumberp, Qsubrp, Qstringp, Qsymbolp, Qvectorp)
14788 (Qvector_or_char_table_p, Qwholenump, Ffboundp, wrong_type_argument)
14789 (initialized, Qhash_table_p, extract_float, Qprocessp, Qwindowp)
14790 (Qwindow_configuration_p, Qimage): New forward declarations.
14791 (XSETFASTINT): Simplify by rewriting in terms of make_natnum.
14792 (STRING_COPYIN): Remove; unused.
14793 (XCAR_AS_LVALUE, XCDR_AS_LVALUE): Remove these macros, replacing with ...
14794 (xcar_addr, xcdr_addr): New functions. All uses changed.
14795 (IEEE_FLOATING_POINT): Now a constant, not a macro.
14796 (GLYPH, GLYPH_CHAR, GLYPH_FACE, SET_GLYPH_CHAR, SET_GLYPH_FACE)
14797 (SET_GLYPH, GLYPH_CODE_CHAR, GLYPH_CODE_FACE)
14798 (SET_GLYPH_FROM_GLYPH_CODE, GLYPH_MODE_LINE_FACE, GLYPH_CHAR_VALID_P)
14799 (GLYPH_CODE_P): Move to dispextern.h, to avoid define-before-use.
14800 (TYPE_RANGED_INTEGERP): Simplify.
14801 (Qsubrp, Qhash_table_p, Qoverlayp): New extern decls.
14802 (setlocale, fixup_locale, synchronize_system_messages_locale)
14803 (synchronize_system_time_locale) [!HAVE_SETLOCALE]:
14804 Now empty functions, not macros.
14805 (functionp): Return bool, not int.
14806 * window.c (Qwindow_configuration_p): Now extern,
14807 so window.h can use it.
14808 * window.h (Qwindowp): Move decl back to lisp.h.
14809
14810 2013-06-15 Eli Zaretskii <eliz@gnu.org>
14811
14812 * xdisp.c (Fline_pixel_height): New function, required for solving
14813 bug #14567.
14814
14815 2013-06-15 Paul Eggert <eggert@cs.ucla.edu>
14816
14817 * fns.c (Fcopy_sequence): Simplify XTYPE calculation.
14818
14819 2013-06-13 Stefan Monnier <monnier@iro.umontreal.ca>
14820
14821 * lread.c (syms_of_lread):
14822 * fns.c (Fprovide): Adjust to new format of after-load-alist.
14823
14824 2013-06-13 Kelly Dean <kellydeanch@yahoo.com> (tiny change)
14825
14826 * fileio.c (Fdo_auto_save): Trap errors in auto-save-hook. (Bug#14479)
14827
14828 2013-06-12 Xue Fuqiao <xfq.free@gmail.com>
14829
14830 * fileio.c (expand_file_name): Doc fix.
14831
14832 2013-06-11 Paul Eggert <eggert@cs.ucla.edu>
14833
14834 Tickle glib by waiting for Emacs itself, not for process 0 (Bug#14569).
14835 * process.c (init_process_emacs) [HAVE_GLIB && !WINDOWSNT]:
14836 Wait for self, not for 0. This can't hurt on GNU or similar
14837 system, and may help with Cygwin.
14838
14839 * keyboard.c: Don't use PROP (...) as an lvalue.
14840 (parse_tool_bar_item) [!USE_GTK && !HAVE_NS]:
14841 Use set_prop (A, B), not PROP (A) = B.
14842
14843 2013-06-10 Eli Zaretskii <eliz@gnu.org>
14844
14845 * xdisp.c (get_it_property): Use it->window instead of generating
14846 a Lisp object from it->w.
14847
14848 2013-06-09 Eli Zaretskii <eliz@gnu.org>
14849
14850 * xdisp.c (get_it_property): If it->object is a buffer, pass to
14851 get-char-property the window that is being rendered, instead of
14852 the buffer, to support window-specific overlays. (Bug#14575)
14853 (compute_display_string_pos): When W is NULL, use the current
14854 buffer as the object to pass to get-char-property.
14855 (Fcurrent_bidi_paragraph_direction): Assign NULL to the window
14856 pointer member of the bidi iterator, since no window is pertinent
14857 to this function.
14858
14859 2013-06-08 Eli Zaretskii <eliz@gnu.org>
14860
14861 * bidi.c (bidi_fetch_char): Accept additional argument, the window
14862 being displayed, and pass it to compute_display_string_pos.
14863 (bidi_level_of_next_char, bidi_resolve_explicit_1)
14864 (bidi_paragraph_init): All callers changed.
14865
14866 * xdisp.c (init_from_display_pos, init_iterator)
14867 (handle_single_display_spec, next_overlay_string)
14868 (get_overlay_strings_1, reseat_1, reseat_to_string)
14869 (push_prefix_prop, Fcurrent_bidi_paragraph_direction):
14870 Set bidi_it.w member from it->w.
14871 (compute_display_string_pos): Accept additional argument, the
14872 window being displayed, and pass it to Fget_char_property.
14873 (Bug#14575)
14874
14875 * dispextern.h (struct bidi_it): New member w, the window being
14876 displayed.
14877 (compute_display_string_pos): Adjust prototype.
14878
14879 2013-06-08 Jan Djärv <jan.h.d@swipnet.se>
14880
14881 * xgselect.c: Remove unneeded include xterm.h.
14882
14883 * process.c (wait_reading_process_output): Check for NS before GLIB.
14884 GLIB may be linked in due to rsvg, but ns_select must be called.
14885
14886 * xgselect.c (xg_select): Remove call to window_system_available
14887 and g_main_context_pending at the top, so Gdk events (i.e. file
14888 notify) are processed when Emacs is started with -nw.
14889
14890 2013-06-07 Eli Zaretskii <eliz@gnu.org>
14891
14892 * Makefile.in (ctagsfiles1, ctagsfiles2): Don't include *.m files.
14893 (ctagsfiles3): New variable, includes only *.m files.
14894 (TAGS): Use an explicit language name in the regular expressions,
14895 to avoid transformation of '/SOMETHING' by MSYS to
14896 'c:\MSYS\SOMETHING'.
14897
14898 2013-06-07 Richard Copley <rcopley@gmail.com> (tiny change)
14899
14900 * epaths.in: Fix commentary to PATH_SITELOADSEARCH.
14901
14902 2013-06-06 Eli Zaretskii <eliz@gnu.org>
14903
14904 * xdisp.c (note_mouse_highlight): When mouse-highlight is off,
14905 still need to set the mouse pointer shape and activate help-echo.
14906 (Bug#14558)
14907
14908 2013-06-06 Paul Eggert <eggert@cs.ucla.edu>
14909
14910 A few porting etc. fixes for the new file monitor code.
14911 See the thread containing
14912 <http://lists.gnu.org/archive/html/emacs-devel/2013-06/msg00109.html>.
14913 * gfilenotify.c (dir_monitor_callback, Fgfile_add_watch)
14914 (Fgfile_rm_watch): Don't assume EMACS_INT is the same width as a pointer.
14915 (dir_monitor_callback, Fgfile_rm_watch):
14916 Use assq_no_quit instead of Fassoc, for speed.
14917 (dir_monitor_callback, Fgfile_rm_watch):
14918 eassert that the monitor is a fixnum.
14919 (dir_monitor_callback): No need for CDR_SAFE.
14920 Simplify building of lisp with alternative tails.
14921 (Fgfile_add_watch, Fgfile_rm_watch):
14922 Do not assume glib functions set errno reliably on failure.
14923 (Fgfile_add_watch): Check that the monitor survives the XIL trick,
14924 and signal an error otherwise.
14925 (Fgfile_rm_watch): Prefer CONSP to !NILP.
14926 Use Fdelq instead of Fdelete, for speed.
14927
14928 2013-06-05 Eli Zaretskii <eliz@gnu.org>
14929
14930 * xdisp.c (handle_tool_bar_click): When mouse-highlight is off,
14931 don't insist on being invoked on a highlighted tool-bar button.
14932 Avoids losing tool-bar functionality when mouse-highlight is nil.
14933 (note_tool_bar_highlight, note_mode_line_or_margin_highlight):
14934 Don't highlight when mouse-highlight is nil.
14935 (note_mouse_highlight): When mouse-highlight is nil, don't return
14936 right away; instead, run tool-bar and mode-line highlight
14937 subroutine, clear any existing highlight, and revert the mouse
14938 pointer to its default shape. (Bug#14558)
14939
14940 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
14941
14942 * lisp.mk (lisp): Add prog-mode.el.
14943
14944 2013-06-05 Paul Eggert <eggert@cs.ucla.edu>
14945
14946 Chain glib's SIGCHLD handler from Emacs's (Bug#14474).
14947 * process.c (dummy_handler): New function.
14948 (lib_child_handler): New static var.
14949 (handle_child_signal): Invoke it.
14950 (catch_child_signal): If a library has set up a signal handler,
14951 save it into lib_child_handler.
14952 (init_process_emacs): If using glib and not on Windows, tickle glib's
14953 child-handling code so that it initializes its private SIGCHLD handler.
14954 * syssignal.h (SA_SIGINFO): Default to 0.
14955 * xterm.c (x_term_init): Remove D-bus hack that I installed on May
14956 31; it should no longer be needed now.
14957
14958 2013-06-05 Michael Albinus <michael.albinus@gmx.de>
14959
14960 * emacs.c (main) [HAVE_GFILENOTIFY]: Call globals_of_gfilenotify.
14961
14962 * gfilenotify.c (globals_of_gfilenotify): New function.
14963 (syms_of_gfilenotify): Move global initialization there.
14964
14965 * lisp.h (globals_of_gfilenotify) [HAVE_GFILENOTIFY]: Add prototype.
14966
14967 2013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
14968
14969 * keymap.c (Fcurrent_active_maps, Fdescribe_buffer_bindings):
14970 * keyboard.c (menu_bar_items, tool_bar_items):
14971 * doc.c (Fsubstitute_command_keys): Voverriding_terminal_local_map does
14972 not override local keymaps any more.
14973
14974 2013-06-04 Eli Zaretskii <eliz@gnu.org>
14975
14976 * window.c (Fpos_visible_in_window_p): Doc fix. (Bug#14540)
14977
14978 2013-06-03 Eli Zaretskii <eliz@gnu.org>
14979
14980 * w32console.c (initialize_w32_display): Return the dimensions of
14981 the console window via 2 additional arguments, not via the current
14982 frame. This avoids crashes due to overrunning the bounds of
14983 frame's decode_mode_spec_buffer, which is not resized following
14984 the change of the frame dimensions from the initial 10x10.
14985
14986 * w32term.h (w32_initialize_display_info): Adjust prototype.
14987
14988 * term.c (init_tty): Take dimensions of the frame from the values
14989 returned by initialize_w32_display.
14990
14991 * Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
14992 (ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
14993 (LIBES): Add $(GFILENOTIFY_LIBS).
14994
14995 * w32inevt.c (handle_file_notifications): Add dummy implementation
14996 for !HAVE_W32NOTIFY.
14997
14998 * w32term.c: Wrap code with HAVE_W32NOTIFY.
14999
15000 2013-06-03 Jan Djärv <jan.h.d@swipnet.se>
15001
15002 * xgselect.c: Replace #if defined ... with #ifdef HAVE_GLIB.
15003
15004 * process.c (wait_reading_process_output): Call xg_select if HAVE_GLIB.
15005
15006 * Makefile.in (XGSELOBJ): New, xgselect.o if GLib is used, or empty.
15007
15008 2013-06-03 Paul Eggert <eggert@cs.ucla.edu>
15009
15010 Fix minor problems found by static checking.
15011 * data.c (pure_write_error):
15012 Use xsignal2, not Fsignal, as Fsignal might return.
15013 * eval.c (set_backtrace_debug_on_exit): Now static.
15014 (backtrace_p, backtrace_top, backtrace_next, record_in_backtrace):
15015 No longer inline. EXTERN_INLINE is needed only for functions
15016 defined in .h files. Reindent function header as per GNU style.
15017 (backtrace_p, backtrace_top, backtrace_next):
15018 Mark EXTERNALLY_VISIBLE so they don't get optimized away by the
15019 compiler or linker. Add extern decls to pacify gcc -Wall.
15020 * frame.c, frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
15021 Now static.
15022 * frame.c (free_monitors): Define only on platforms that need it.
15023 * nsterm.m (ns_term_init):
15024 * process.c (catch_child_signal):
15025 Don't worry about whether SIGCHLD is defined, as SIGCHLD is
15026 defined on all porting targets these days.
15027 * process.c, process.h (catch_child_signal):
15028 Make it extern only if NS_IMPL_GNUSTEP is defined.
15029
15030 2013-06-03 Eli Zaretskii <eliz@gnu.org>
15031
15032 * w32.c (gettimeofday): Make the signature identical to prototype
15033 in nt/inc/sys/time.h.
15034
15035 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
15036
15037 * eval.c (backtrace_p, backtrace_top, backtrace_next): Export them to
15038 .gdbinit.
15039
15040 * keyboard.c (safe_run_hooks_error): Improve error message.
15041
15042 * data.c (pure_write_error): Add `object' argument.
15043 * puresize.h (CHECK_IMPURE): Use it.
15044
15045 2013-06-03 Michael Albinus <michael.albinus@gmx.de>
15046
15047 * Makefile.in (NOTIFY_OBJ): New variable.
15048 (base_obj): Replace inotify.o by $(NOTIFY_OBJ).
15049
15050 * emacs.c (main): Use HAVE_W32NOTIFY to wrap respective code.
15051 Call syms_of_gfilenotify.
15052
15053 * gfilenotify.c: New file.
15054
15055 * keyboard.c (Qfile_notify): New variable. Replaces Qfile_inotify
15056 and Qfile_w32notify.
15057 (top): Wrap respective code by HAVE_GFILENOTIFY, HAVE_INOTIFY,
15058 HAVE_W32NOTIFY and USE_FILE_NOTIFY.
15059
15060 * lisp.h: Declare syms_of_gfilenotify.
15061
15062 * termhooks.h (e): Wrap enum by USE_FILE_NOTIFY.
15063
15064 2013-06-03 Stefan Monnier <monnier@iro.umontreal.ca>
15065
15066 Merge the specpdl and backtrace stacks. Make the structure of the
15067 specpdl entries more obvious via a tagged union of structs.
15068 * lisp.h (BITS_PER_PTRDIFF_T): New constant.
15069 (enum specbind_tag): New enum.
15070 (struct specbinding): Make it a tagged union of structs.
15071 Add a case for backtrace records.
15072 (specpdl_symbol, specpdl_old_value, specpdl_where, specpdl_arg)
15073 (specpdl_func, backtrace_function, backtrace_nargs, backtrace_args)
15074 (backtrace_debug_on_exit): New accessors.
15075 (struct backtrace): Remove.
15076 (struct catchtag): Remove backlist field.
15077 * data.c (let_shadows_buffer_binding_p, let_shadows_global_binding_p):
15078 Move to eval.c.
15079 (Flocal_variable_p): Speed up the common case where the binding is
15080 already loaded.
15081 * eval.c (backtrace_list): Remove.
15082 (set_specpdl_symbol, set_specpdl_old_value): Remove.
15083 (set_backtrace_args, set_backtrace_nargs)
15084 (set_backtrace_debug_on_exit, backtrace_p, backtrace_top)
15085 (backtrace_next): New functions.
15086 (Fdefvaralias, Fdefvar): Adjust to new specpdl format.
15087 (unwind_to_catch, internal_lisp_condition_case)
15088 (internal_condition_case, internal_condition_case_1)
15089 (internal_condition_case_2, internal_condition_case_n): Don't bother
15090 with backtrace_list any more.
15091 (Fsignal): Adjust to new backtrace format.
15092 (grow_specpdl): Move up.
15093 (record_in_backtrace): New function.
15094 (eval_sub, Ffuncall): Use it.
15095 (apply_lambda): Adjust to new backtrace format.
15096 (let_shadows_buffer_binding_p, let_shadows_global_binding_p): Move from
15097 data.c.
15098 (specbind): Adjust to new specpdl format. Simplify.
15099 (record_unwind_protect, unbind_to): Adjust to new specpdl format.
15100 (Fbacktrace_debug, Fbacktrace, Fbacktrace_frame): Adjust to new
15101 backtrace format.
15102 (mark_backtrace): Remove.
15103 (mark_specpdl, get_backtrace, backtrace_top_function): New functions.
15104 * xdisp.c (redisplay_internal): Use record_in_backtrace.
15105 * alloc.c (Fgarbage_collect): Use record_in_backtrace.
15106 Use mark_specpdl.
15107 * profiler.c (record_backtrace): Use get_backtrace.
15108 (handle_profiler_signal): Use backtrace_top_function.
15109 * .gdbinit (xbacktrace, hookpost-backtrace): Use new backtrace
15110 accessor functions.
15111
15112 2013-06-02 Jan Djärv <jan.h.d@swipnet.se>
15113
15114 * process.h (catch_child_signal): Declare.
15115
15116 * process.c (catch_child_signal): New function.
15117 (init_process_emacs): Call it.
15118
15119 * nsterm.m: Include process.h if NS_IMPL_GNUSTEP.
15120 (ns_menu_bar_is_hidden, menu_will_open_state): Define only if
15121 NS_IMPL_COCOA.
15122 (x_set_cursor_type): Remove declaration.
15123 (ns_update_begin): Only use r and bp if NS_IMPL_COCOA.
15124 (ns_update_end, ns_focus, ns_unfocus): Remove GNUstep specific code.
15125 (x_set_window_size): Remove 3 pixels from toolbar if NS_IMPL_GNUSTEP.
15126 (ns_get_color): Use F suffix on float.
15127 (ns_color_to_lisp, ns_query_color): Use EmacsCGFloat.
15128 (ns_get_rgb_color): Remove.
15129 (x_set_frame_alpha): Move view inside NS_IMPL_COCOA.
15130 (note_mouse_movement): x and y are CGFloat.
15131 (ns_draw_fringe_bitmap): Remove unused rowY.
15132 Change #if to COCOA && >= 10_6.
15133 (ns_draw_window_cursor): Remove unused overspill.
15134 (ns_draw_underwave): width and x are EamcsCGFloat.
15135 (ns_draw_box): thickness is CGFloat.
15136 (ns_dumpglyphs_image): Change #if to COCOA && >= 10_6.
15137 (ns_send_appdefined): When NS_IMPL_GNUSTEP, redirect to main thread
15138 if not in main thread.
15139 (ns_get_pending_menu_title, ns_check_menu_open)
15140 (ns_check_pending_open_menu): Put inside #if COCOA && >= 10_5.
15141 (ns_term_init): Call catch_child_signal if NS_IMPL_GNUSTEP && SIGCHLD.
15142 (sendFromMainThread:): New method.
15143 (changeFont:): size is CGFloat.
15144 (keyDown:): Check for Delete when NS_IMPL_GNUSTEP.
15145 Disable warning about permanent text.
15146 (characterIndexForPoint:): Adjust return type depending on GNUstep
15147 version.
15148 (mouseDown:): delta is CGFloat.
15149 (updateFrameSize): Remove unised variable f.
15150 (initFrameFromEmacs): Move toggleButton inside NS_IMPL_COCOA.
15151 Cast float to EmacsCGFloat.
15152 (windowWillUseStandardFrame:defaultFrame:): Set maximized_height
15153 also to -1 when restoring.
15154 (windowDidExitFullScreen:): Put call to updateCollectionBehaviour
15155 inside NS_IMPL_COCOA.
15156 (toggleFullScreen:): Put call to toggleFullScreen inside
15157 NS_IMPL_COCOA. Cast float to EmacsCGFloat.
15158 (setPosition:portion:whole:): por is CGFloat.
15159 (getMouseMotionPart:window:x:y:): Add F suffix to float.
15160 (mouseDown:): Use CGFloat.
15161 (mouseDragged:): Remove unised variable edge.
15162 (EmacsDocument): Implement for NS_IMPL_GNUSTEP.
15163
15164 * nsterm.h (EmacsCGFloat): Typedef for OSX and GNUstep when the size
15165 of CGFloat differs.
15166 (EmacsApp): New variable nextappdefined. Declare sendFromMainThread
15167 when NS_IMPL_GNUSTEP.
15168 (EmacsDocument): Declare when NS_IMPL_GNUSTEP.
15169 (EmacsView): Remove unlockFocusNeedsFlush, add windowDidMove.
15170 (EmacsToolbar): Add clearAll. Add tag argument to
15171 addDisplayItemWithImage.
15172 (EmacsSavePanel, EmacsOpenPanel): Remove getFilename and getDirectory.
15173
15174 * nsselect.m (ns_get_local_selection): Remove unused variable type.
15175
15176 * nsmenu.m (ns_update_menubar): Make static.
15177 (x_activate_menubar): Surround with ifdef NS_IMPL_COCOA
15178 (fillWithWidgetValue:): Add cast to SEL for setAction.
15179 (addSubmenuWithTitle:forFrame:): Add cast to SEL for action.
15180 (update_frame_tool_bar): Update code for GNUstep.
15181 (clearAll): New method.
15182 (addDisplayItemWithImage:idx:tag:helpText:enabled:): Handle new tag
15183 argument. Call insertItemWithItemIdentifier when NS_IMPL_GNUSTEP.
15184 Move identifierToItem setObject and activeIdentifiers addObject before
15185 call to insertItemWithItemIdentifier.
15186 (validateVisibleItems): Fix indentation.
15187 (toolbarAllowedItemIdentifiers:): Return activeIdentifiers.
15188 (initWithContentRect:styleMask:backing:defer:): Add ClosableWindow and
15189 UtilityWindow to aStyle, remove call to setStyleMask.
15190
15191 * nsimage.m (setXBMColor:, getPixelAtX:Y:): Use EmacsCGFloat.
15192
15193 * nsfont.m (ns_attribute_fvalue, ns_spec_to_descriptor)
15194 (ns_charset_covers, ns_get_covering_families, nsfont_open):
15195 Use F suffix on floats.
15196 (ns_char_width): Returns CGFloat.
15197 (ns_ascii_average_width): w is CGFloat instead of float.
15198 (nsfont_draw): cbuf and c are unsigned. Cast to char* in call to
15199 DPSxshow.
15200 (ns_glyph_metrics): CGFloat instead of float.
15201
15202 * nsfns.m (x_set_foreground_color, x_set_background_color):
15203 Use EmacsCGFloat.
15204 (ns_implicitly_set_icon_type, Fx_create_frame): Make static,
15205 remove unused variables.
15206 (Fns_read_file_name): Keep track if panel is for save.
15207 Use ns_filename_from_panel/ns_directory_from_panel.
15208 (Fns_list_services): delegate only used for COCOA.
15209 (Fns_convert_utf8_nfd_to_nfc): Remove warning for GNUstep.
15210 Just return the input if GNUstep.
15211 (x_screen_planes): Remove.
15212 (Fxw_color_values): Use EmacsCGFloat
15213 (Fns_display_monitor_attributes_list): Only get screen number for
15214 Cocoa.
15215 (getDirectory, getFilename): Remove from EmacsOpenPanel and
15216 EmacsSavePanel.
15217 (EmacsOpenPanel:ok:): Use ns_filename_from_panel and
15218 ns_directory_from_panel.
15219
15220 2013-06-01 Paul Eggert <eggert@cs.ucla.edu>
15221
15222 * process.c (handle_child_signal): Also use WCONTINUED.
15223 This is so that list-processes doesn't mistakenly list the process
15224 as stopped, when the process has actually been continued and is
15225 now running.
15226
15227 2013-05-31 Paul Eggert <eggert@cs.ucla.edu>
15228
15229 Don't let D-bus autolaunch mess up SIGCHLD handling (Bug#14474).
15230 * xterm.c (x_term_init): Inhibit D-Bus autolaunch if D-Bus is
15231 not already configured.
15232
15233 * fileio.c (Finsert_file_contents): Remove unused local (Bug#8447).
15234
15235 2013-05-29 Eli Zaretskii <eliz@gnu.org>
15236
15237 * Makefile.in (mostlyclean): Remove *.res files.
15238
15239 2013-05-29 Stefan Monnier <monnier@iro.umontreal.ca>
15240
15241 * fileio.c (Finsert_file_contents): Preserve undo info when reverting
15242 a buffer (bug#8447).
15243
15244 2013-05-27 Eli Zaretskii <eliz@gnu.org>
15245
15246 * xdisp.c (pos_visible_p): When CHARPOS is displayed frrom a
15247 display vector, and we backtrack, handle the case that the
15248 previous character position is also displayed from a display
15249 vector or covered by a display string or image. (Bug#14476)
15250
15251 2013-05-25 Jan Djärv <jan.h.d@swipnet.se>
15252
15253 * xfns.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
15254 (struct MonitorInfo, free_monitors): Remove.
15255 (x_make_monitor_attribute_list): Call make_monitor_attribute_list.
15256 (Fx_display_monitor_attributes_list): Call make_monitor_attribute_list.
15257 (syms_of_xfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
15258 Qframes, Qsource.
15259
15260 * nsfns.m (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Remove.
15261 (struct MonitorInfo, free_monitors): Remove.
15262 (ns_screen_name): Make static.
15263 (ns_make_monitor_attribute_list): Call make_monitor_attribute_list.
15264 (syms_of_nsfns): Remove DEFSYM for Qgeometry, Qworkarea, Qmm_size,
15265 Qframes, Qsource.
15266
15267 * frame.h (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
15268 (struct MonitorInfo): New struct.
15269 (free_monitors, make_monitor_attribute_list): Declare.
15270
15271 * frame.c (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource):
15272 New Lisp_Object:s.
15273 (free_monitors, make_monitor_attribute_list): New functions.
15274 (syms_of_frame): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes,
15275 Qsource.
15276
15277 2013-05-25 Xue Fuqiao <xfq.free@gmail.com>
15278
15279 * callproc.c (call_process): Refine the doc string. (Bug#14045)
15280
15281 2013-05-23 Stefan Monnier <monnier@iro.umontreal.ca>
15282
15283 * keyboard.c: Apply keyboard decoding only to events that come directly
15284 from the tty, not from unread-command-events (bug#14368).
15285 (read_event_from_main_queue): New function, extracted from read_char.
15286 (read_decoded_char): Remove.
15287 (read_decoded_event_from_main_queue): New function to replace it.
15288 (read_char): Use it.
15289 (read_key_sequence): Use read_char rather than read_decoded_char.
15290
15291 * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403).
15292
15293 2013-05-22 Barry O'Reilly <gundaetiapo@gmail.com>
15294
15295 * casetab.c (init_casetab_once): Fix last change (bug#14424).
15296
15297 2013-05-22 Kenichi Handa <handa@gnu.org>
15298
15299 The following changes are to fix the setting of
15300 buffer-file-coding-system on, for instance, C-x RET c unix RET
15301 _FILE_OF_DOS_EOL_TYPE_ RET.
15302
15303 * coding.h (struct coding_system): New member detected_utf8_chars.
15304
15305 * coding.c (detect_coding_utf_8): Count characters and check EOL
15306 format. Include CATEGORY_MASK_UTF_8_AUTO in detect_info->found if
15307 BOM is there.
15308 (setup_coding_system): Do not initialize coding->head_ascii.
15309 (check_ascii): Do not set coding->eol_seen but update it. Do not
15310 call adjust_coding_eol_type here.
15311 (detect_coding): Fix detection of BOM for utf-8 and utf-16.
15312 If the eol-type of CODING is already specified, adjust the eol type
15313 of the found coding-system.
15314 (decode_coding_gap): Cancel previous change. Utilize the
15315 character numbers counted by detect_coding_utf_8. Fix detection
15316 of BOM for utf-8.
15317
15318 2013-05-21 Barry O'Reilly <gundaetiapo@gmail.com>
15319
15320 * search.c (looking_at_1): Only set last_thing_searched if the match
15321 changed the match-data (bug#14281).
15322
15323 2013-05-21 Dmitry Antipov <dmantipov@yandex.ru>
15324
15325 * xdisp.c (reseat_at_previous_visible_line_start):
15326 Already declared in dispextern.h, so remove it here.
15327 (move_it_vertically_backward): Likewise.
15328
15329 2013-05-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15330
15331 * xfns.c (check_x_display_info): Don't use XINT for terminal object.
15332 (Fx_display_pixel_width, Fx_display_pixel_height)
15333 (Fx_display_mm_width, Fx_display_mm_height):
15334 Mention `display-monitor-attributes-list' in docstrings.
15335
15336 * nsfns.m (ns_get_screen): Remove function. All uses removed.
15337 (check_ns_display_info): Sync with check_x_display_info in xfns.c.
15338 (Fx_server_max_request_size, Fx_server_vendor, Fx_server_version)
15339 (Fx_display_screens, Fx_display_mm_width, Fx_display_mm_height)
15340 (Fx_display_backing_store, Fx_display_visual_class)
15341 (Fx_display_save_under, Fx_close_connection, Fxw_display_color_p)
15342 (Fx_display_grayscale_p, Fx_display_pixel_width)
15343 (Fx_display_pixel_height, Fx_display_planes)
15344 (Fx_display_color_cells): Sync args and docstrings with xfns.c.
15345 (Fx_display_screens): Don't confuse X11 screens with NS screens.
15346 (Fx_display_mm_width, Fx_display_mm_height)
15347 (Fx_display_pixel_width, Fx_display_pixel_width): Return width or
15348 height for all physical monitors as in X11.
15349
15350 * nsterm.m (x_display_pixel_width, x_display_pixel_height):
15351 Return pixel width or height for all physical monitors as in X11.
15352
15353 2013-05-18 Paul Eggert <eggert@cs.ucla.edu>
15354
15355 Port --enable-gcc-warnings to clang.
15356 * bytecode.c (exec_byte_code):
15357 * regex.c:
15358 Redo diagnostic pragmas to pacify clang, too.
15359 * dbusbind.c (xd_retrieve_arg): Do not use uninitialized variable.
15360 * editfns.c (Fencode_time):
15361 * fileio.c (file_accessible_directory_p):
15362 * font.c (font_unparse_xlfd):
15363 Use '&"string"[index]' instead of '"string" + (index)'.
15364 * undo.c (user_error): Remove; unused.
15365
15366 2013-05-16 Eli Zaretskii <eliz@gnu.org>
15367
15368 * insdel.c (insert_1_both): Document the arguments, instead of
15369 referring to insert_1, which no longer exists.
15370
15371 * xdisp.c (message_dolog): If the *Messages* buffer is shown in
15372 some window, increment windows_or_buffers_changed, so that
15373 *Messages* display in that window is updated. (Bug#14408)
15374
15375 * w32.c: Include epaths.h.
15376 (init_environment): Use cmdproxy.exe without leading directories.
15377 Support emacs.exe in src; point SHELL to cmdproxy in ../nt in that
15378 case.
15379 (gettimeofday): Adjust signature and return value to Posix
15380 expectations.
15381
15382 * unexw32.c (open_output_file): Delete the existing emacs.exe
15383 before creating it, to break the hard link to the versioned
15384 executable.
15385
15386 * Makefile.in (EMACS_MANIFEST, CM_OBJ, TEMACS_POST_LINK)
15387 (ADDSECTION, EMACS_HEAPSIZE, MINGW_TEMACS_POST_LINK)
15388 (FIRSTFILE_OBJ): New variables.
15389 (W32_RES): Rename to EMACSRES. All users changed.
15390 (base_obj): Use $(CM_OBJ).
15391 (ALLOBJS): Use $(FIRSTFILE_OBJ).
15392 (emacs$(EXEEXT)): Depend on $(ADDSECTION).
15393 (temacs$(EXEEXT)): Use $(TEMACS_POST_LINK), and move
15394 $(W32_RES_LINK) before $(LIBES).
15395 (emacs.res): Depend on $(EMACS_MANIFEST). Put emacs.rc in nt.
15396
15397 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
15398
15399 * makefile.w32-in (DOC): Use just "DOC".
15400
15401 * Makefile.in (bootstrap-clean): DOC-* doesn't exist any more.
15402
15403 * process.c: Export default filters and sentinels to Elisp.
15404 (Qinternal_default_process_sentinel, Qinternal_default_process_filter):
15405 New constants.
15406 (pset_filter, pset_sentinel, make_process, Fset_process_filter)
15407 (Fset_process_sentinel, Fformat_network_address):
15408 Default to them instead of nil.
15409 (server_accept_connection): Sentinels can't be nil any more.
15410 (read_and_dispose_of_process_output): New function, extracted from
15411 read_process_output.
15412 (read_process_output): Use it; filters can't be nil.
15413 (Finternal_default_process_filter): New function, extracted from
15414 read_process_output.
15415 (exec_sentinel_unwind): Remove function.
15416 (exec_sentinel): Don't zilch sentinel while running.
15417 (status_notify): Sentinels can't be nil.
15418 (Finternal_default_process_sentinel): New function extracted from
15419 status_notify.
15420 (setup_process_coding_systems): Default filter is not nil any more.
15421 (syms_of_process): Export new Elisp functions and initialize
15422 new constants.
15423 * lisp.h (make_lisp_proc): New function.
15424
15425 2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
15426
15427 * regex.c (regex_compile) [\=, \>, \<]: Don't forget to set laststart.
15428
15429 2013-05-14 Eli Zaretskii <eliz@gnu.org>
15430
15431 * w32fns.c (w32_wnd_proc): Don't call WINDOW_HEADER_LINE_HEIGHT
15432 unless we know that the window w is a leaf window.
15433 Another attempt at solving bug#14062.
15434
15435 2013-05-14 Jan Djärv <jan.h.d@swipnet.se>
15436
15437 * nsfont.m (ns_spec_to_descriptor): Retain and autorelease
15438 fdesc (Bug#14375).
15439
15440 2013-05-12 Paul Eggert <eggert@cs.ucla.edu>
15441
15442 * image.c (gif_load): Check that subimages fit (Bug#14345).
15443
15444 2013-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
15445
15446 * lread.c (skip_dyn_eof): New function.
15447 (read1): Use it to skip the end of a file in response to #@00.
15448
15449 * doc.c (get_doc_string): Slightly relax the sanity checking.
15450
15451 2013-05-09 Jan Djärv <jan.h.d@swipnet.se>
15452
15453 * nsfns.m: Include IOGraphicsLib.h if Cocoa.
15454 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): Declare.
15455 (MonitorInfo): New struct.
15456 (free_monitors, ns_screen_name, ns_make_monitor_attribute_list)
15457 (Fns_display_monitor_attributes_list): New functions.
15458 (display-usable-bounds): Remove.
15459 (syms_of_nsfns): DEFSYM Qgeometry, Qworkarea, Qmm_size, Qframes and
15460 Qsource.
15461
15462 2013-05-09 Paul Eggert <eggert@cs.ucla.edu>
15463
15464 * xterm.h (GTK_PREREQ): Remove, replacing with GTK_CHECK_VERSION.
15465 (GTK_CHECK_VERSION): New macro, if not already defined.
15466 All uses of GTK_PREREQ, GTK_MAJOR_VERSION, etc.
15467 replaced by GTK_CHECK_VERSION.
15468
15469 2013-05-08 Paul Eggert <eggert@cs.ucla.edu>
15470
15471 * xterm.h (GTK_PREREQ): New macro.
15472 All simple uses of GTK_MAJOR_VERSION and GTK_MINOR_VERSION changed
15473 to use this macro instead, for consistency and clarity.
15474
15475 2013-05-08 Eli Zaretskii <eliz@gnu.org>
15476
15477 * xdisp.c (row_for_charpos_p): New function, with code of
15478 cursor_row_p, but accepts an additional argument CHARPOS instead
15479 of using a hardcoded PT.
15480 (cursor_row_p): Call row_for_charpos_p with 2nd argument PT.
15481 (row_containing_pos): Call row_for_charpos_p instead of partially
15482 doing the same. Fixes cursor positioning under longlines-mode
15483 when longlines-show-effect includes more than one newline, when
15484 moving the cursor vertically up.
15485
15486 2013-05-08 Juanma Barranquero <lekktu@gmail.com>
15487
15488 * makefile.w32-in (ACL_H): New macro.
15489 ($(BLD)/fileio.$(O)): Update dependencies.
15490
15491 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
15492
15493 Use Gnulib ACL implementation, for benefit of Solaris etc. (Bug#14295)
15494 * Makefile.in (LIB_ACL): New macro.
15495 (LIBACL_LIBS): Remove.
15496 (LIBES): Use LIB_ACL, not LIBACL_LIBS.
15497 * fileio.c: Include <acl.h>.
15498 Use HAVE_ACL_SET_FILE rather than HAVE_POSIX_ACL.
15499 (ACL_NOT_WELL_SUPPORTED): Remove. All uses replaced by
15500 !acl_errno_valid.
15501 (Fcopy_file) [!WINDOWSNT]: Use qcopy_acl instead of rolling
15502 it ourselves.
15503
15504 * unexelf.c: Don't assume ElfW (Half) fits in int.
15505 (entry_address, find_section, unexec): Use ptrdiff_t, not int,
15506 when dealing with ElfW (Half) values, since they can exceed 2**31
15507 on 64-bit OpenBSD hosts. Reported by Han Boetes (privately).
15508 (entry_address): Omit unused NUM arg. All uses changed.
15509
15510 2013-05-07 Juri Linkov <juri@jurta.org>
15511
15512 * callint.c (Fcall_interactively): Set `visargs[i]' for code 'n'
15513 to the string converted from number with `Fnumber_to_string'.
15514 (Bug#14254)
15515
15516 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
15517
15518 * xfns.c (x_get_net_workarea): Define only if !GTK || GTK<3.4.
15519 This fixes a problem introduced by my previous change.
15520
15521 2013-05-07 Glenn Morris <rgm@gnu.org>
15522
15523 * lread.c (readchar): Don't read from a dead buffer. (Bug#14280)
15524
15525 2013-05-07 Jan Djärv <jan.h.d@swipnet.se>
15526
15527 * xfns.c: Move misplaced ifndef USE_GTK from previous checkin.
15528
15529 2013-05-07 Paul Eggert <eggert@cs.ucla.edu>
15530
15531 Static checking by GCC 4.8.0.
15532 * xfns.c (x_get_net_workarea, struct MonitorInfo, free_monitors)
15533 (x_get_monitor_for_frame, x_make_monitor_attribute_list)
15534 (x_get_monitor_attributes_fallback)
15535 (x_get_monitor_attributes_xinerama)
15536 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes):
15537 Define only if USE_GTK.
15538 (free_monitors): Define only if HAVE_XINERAMA || HAVE_XRANDR.
15539 (x_get_monitor_attributes_fallback): Omit unused locals.
15540 (x_get_monitor_attributes_xinerama, Fx_display_monitor_attributes_list):
15541 Use double, not float, to avoid mixed-mode floating point arithmetic.
15542
15543 2013-05-07 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
15544 Jan Djärv <jan.h.d@swipnet.se>
15545
15546 * Makefile.in (XRANDR_LIBS, XRANDR_CFLAGS, XINERAMA_LIBS)
15547 (XINERAMA_CFLAGS): New macros.
15548 (ALL_CFLAGS, LIBES): Use them.
15549
15550 * xfns.c: Include <X11/extensions/Xrandr.h> if HAVE_XRANDR, and
15551 include <X11/extensions/Xinerama.h> if HAVE_XINERAMA.
15552 (Qgeometry, Qworkarea, Qmm_size, Qframes, Qsource): New variables.
15553 (syms_of_xfns): DEFSYM them.
15554 (struct MonitorInfo): New struct.
15555 (x_get_net_workarea, free_monitors, x_get_monitor_for_frame)
15556 (x_make_monitor_attribute_list, x_get_monitor_attributes_fallback)
15557 (x_get_monitor_attributes_xrandr, x_get_monitor_attributes)
15558 (x_get_monitor_attributes_xinerama): New functions.
15559 (Fx_display_monitor_attributes_list): New primitive.
15560 (syms_of_xfns): Defsubr it.
15561
15562 * xterm.h (x_display_info): Add Xatom_net_workarea and
15563 Xatom_net_current_desktop.
15564
15565 * xterm.c (x_term_init): Initialize dpyinfo->Xatom_net_workarea
15566 and dpyinfo->Xatom_net_current_desktop.
15567
15568 2013-05-06 Eli Zaretskii <eliz@gnu.org>
15569
15570 * xdisp.c (pos_visible_p): Use the special code for finding the
15571 beginning of a display property or overlay for any "replacing"
15572 display property, not just for display strings. This solves
15573 incorrect reporting of position by posn-at-point. (Bug#14241)
15574
15575 2013-05-06 Paul Eggert <eggert@cs.ucla.edu>
15576
15577 * unexelf.c: Fix some 32-bit integer problems, notably when debugging.
15578 Include <limits.h>, <stdbool.h>, <intprops.h>, <verify.h>.
15579 Verify that ElfW (Half) fits in int.
15580 (fatal): Use same signature as lisp.h.
15581 (UNEXELF_DEBUG): New macro, replacing DEBUG, so that people can
15582 configure and build with -DUNEXELF_DEBUG without worrying about
15583 other modules that use DEBUG.
15584 (DEBUG_LOG) [UNEXELF_DEBUG]: New macro. All debug code that prints
15585 possibly-wide integers now uses it instead of plain fprintf.
15586 (entry_address): New function, which avoids problems with 32-bit
15587 overflow on 64-bit hosts.
15588 (OLD_SECTION_H, NEW_SECTION_H, NEW_PROGRAM_H): Use it.
15589 (round_up): Don't assume the remainder fits in int.
15590 (find_section): Use bool for boolean. Simplify debug code.
15591 (unexec): Don't assume file sizes fit in int or size_t.
15592 Omit unnecessary trailing newline in 'fatal' format.
15593 Use strerror rather than outputting decimal error number.
15594 Remove unused code when emacs is not defined;
15595 this file relies on Emacs now.
15596 Don't assume e_phnum and e_shnum are positive.
15597
15598 * regex.c: Fix problems when DEBUG is defined.
15599 (extract_number, extract_number_and_incr): Define regardless of
15600 whether DEBUG is defined; that's simpler and makes the code less
15601 likely to go stale in the normal case when DEBUG is not defined.
15602 Return int rather than taking an int * arg. All callers changed.
15603 (DEBUG_PRINT1, DEBUG_PRINT2, DEBUG_PRINT3, DEBUG_PRINT4):
15604 Remove, replacing with ...
15605 (DEBUG_PRINT): New macro. All callers changed.
15606 (DEBUG_COMPILES_ARGUMENTS): New macro.
15607 (print_fastmap, print_partial_compiled_pattern) [DEBUG]:
15608 (print_compiled_pattern, print_double_string) [DEBUG]:
15609 Use prototype rather than old-style definition.
15610 (print_partial_compiled_pattern, print_compiled_pattern) [DEBUG]:
15611 (ENSURE_FAIL_STACK, PUSH_FAILURE_REG) [DEBUG]:
15612 (POP_FAILURE_REG_OR_COUNT, PUSH_FAILURE_POINT) [DEBUG]:
15613 (POP_FAILURE_POINT, re_match_2_internal) [DEBUG]:
15614 Don't assume ptrdiff_t, size_t, and long are the same width as int.
15615 (POINTER_TO_OFFSET): Return ptrdiff_t, not regoff_t.
15616 This matters only when DEBUG is defined.
15617
15618 2013-05-05 Eli Zaretskii <eliz@gnu.org>
15619
15620 * xdisp.c (set_iterator_to_next): Set the
15621 ignore_overlay_strings_at_pos_p flag only if we are _really_
15622 iterating over an overlay string, as indicated by the
15623 current.overlay_string_index member. (Bug#14306)
15624
15625 2013-05-05 Jan Djärv <jan.h.d@swipnet.se>
15626
15627 * nsmenu.m (ns_update_menubar): Move initialization of submenuTitle
15628 to where it is used, to avoid autorelease issues (Bug#14050).
15629
15630 2013-05-05 Paul Eggert <eggert@cs.ucla.edu>
15631
15632 `write-region-inhibit-fsync' defaults to noninteractive (Bug#14273).
15633 * fileio.c (syms_of_fileio): Implement this.
15634 * filelock.c (create_lock_file): If symbolic links don't work, so
15635 we use a regular file as a lock file, do not fsync the lock file;
15636 it's not needed.
15637
15638 2013-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
15639
15640 * minibuf.c (Fread_minibuffer, Feval_minibuffer): Move to Elisp.
15641 (syms_of_minibuf): Adjust accodingly.
15642 * lread.c (Fread):
15643 * callint.c (Fcall_interactively): Adjust calls accordingly.
15644
15645 2013-05-04 Eli Zaretskii <eliz@gnu.org>
15646
15647 * dispextern.h (WINDOW_WANTS_HEADER_LINE_P): Verify that
15648 w->contents is a buffer before computing everything else.
15649 Use parentheses to disambiguate last part of the condition.
15650
15651 * w32fns.c (w32_wnd_proc): Remove temporary code used to trap
15652 assertion violations. (Bug#14062)
15653
15654 2013-05-01 David Reitter <david.reitter@gmail.com>
15655
15656 * nsfns.m (ns_tooltip): Initialize.
15657
15658 2013-04-28 Eli Zaretskii <eliz@gnu.org>
15659
15660 * coding.c (decode_coding_gap): Don't remove the character before
15661 a newline unless it's a CR character. (Bug#14287)
15662
15663 2013-04-28 Dan Nicolaescu <dann@gnu.org>
15664
15665 * dispextern.h (struct face): Move enum face_underline_type
15666 earlier so that bitfields can be in the same word.
15667
15668 2013-04-28 Jan Djärv <jan.h.d@swipnet.se>
15669
15670 * nsfns.m (handlePanelKeys): New function.
15671 (EmacsOpenPanel:performKeyEquivalent:)
15672 (EmacsSavePanel:performKeyEquivalent:): Call handlePanelKeys to handle
15673 arrows/function/control and copy/paste keys (Bug#14296).
15674
15675 2013-04-27 Juri Linkov <juri@jurta.org>
15676
15677 * callint.c (Fcall_interactively): Call `Qread_number' for
15678 interactive code letter `n' instead of using duplicate code.
15679 (Bug#14254)
15680
15681 2013-04-27 Paul Eggert <eggert@cs.ucla.edu>
15682
15683 * systime.h (make_timeval): Declare as 'const'.
15684
15685 2013-04-27 Kenichi Handa <handa@gnu.org>
15686
15687 * font.c (font_open_entity): Always open a font of manageable
15688 size.
15689
15690 2013-04-26 Paul Eggert <eggert@cs.ucla.edu>
15691
15692 Port better to AIX (Bug#14258).
15693 * lisp.h (ENUM_BF) [__IBMC__]: Make it 'unsigned int' here, too,
15694 to pacify AIX xlc.
15695
15696 2013-04-24 Kenichi Handa <handa@gnu.org>
15697
15698 * coding.c (decode_coding_iso_2022): When an invalid escape
15699 sequence is encountered, reset the invocation and designation
15700 status to the safest one.
15701
15702 2013-04-22 Paul Eggert <eggert@cs.ucla.edu>
15703
15704 * Makefile.in (bootstrap-clean): Remove stamp-h1 too.
15705 Without this fix, "make distclean" leaves stamp-h1 behind.
15706
15707 2013-04-20 Erik Charlebois <erikcharlebois@gmail.com>
15708
15709 * w32fns.c (w32_fullscreen_rect): New function to compute the
15710 window rectangle for the given fullscreen mode.
15711 (w32_wnd_proc): When in a fullscreen mode, WM_WINDOWPOSCHANGING no
15712 longer tunes the window size. This keeps the window's edges flush
15713 with the screen and allows the taskbar to hide itself in fullboth.
15714
15715 * w32term.c (w32fullscreen_hook): 'fullboth' now shows without
15716 window decorations and uses the entire screen.
15717
15718 * w32term.h (w32_fullscreen_rect) Add prototype.
15719 (struct w32_output): Replace normal_width, normal_height,
15720 normal_top, and normal_left members with a single normal_placement
15721 struct.
15722 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP):
15723 Remove macros.
15724 (FRAME_NORMAL_PLACEMENT): New macro.
15725
15726 2013-04-16 Juanma Barranquero <lekktu@gmail.com>
15727
15728 * minibuf.c (Ftest_completion): Silence compiler warning.
15729
15730 2013-04-15 Eli Zaretskii <eliz@gnu.org>
15731
15732 * w32fns.c (w32_wnd_proc): Add more assertions to investigate
15733 bug#14062.
15734
15735 * frame.h (WINDOW_FRAME): Protect macro and its argument with
15736 parentheses.
15737
15738 * dispextern.h (CURRENT_MODE_LINE_HEIGHT)
15739 (CURRENT_HEADER_LINE_HEIGHT, WINDOW_WANTS_MODELINE_P)
15740 (WINDOW_WANTS_HEADER_LINE_P): Protect macro arguments with
15741 parentheses where appropriate.
15742
15743 2013-04-14 Paul Eggert <eggert@cs.ucla.edu>
15744
15745 * keyboard.c (timer_start_idle): Remove no-longer-used local.
15746
15747 2013-04-14 Eli Zaretskii <eliz@gnu.org>
15748
15749 * buffer.c (syms_of_buffer) <left-margin-width, right-margin-width>:
15750 <left-fringe-width, right-fringe-width, fringes-outside-margins>:
15751 Mention in the doc string that setting these variables takes
15752 effect only after a call to set-window-buffer. (Bug#14200)
15753
15754 2013-04-13 Eli Zaretskii <eliz@gnu.org>
15755
15756 * indent.c (Fvertical_motion): Don't consider display strings on
15757 overlay strings as display strings on the buffer position we
15758 started from. This prevents vertical cursor motion from jumping
15759 more than one line when there's an overlay string with a display
15760 property at end of line.
15761 Reported by Karl Chen <Karl.Chen@quarl.org> in
15762 http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
15763
15764 2013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
15765
15766 * window.c (select_window): `record_buffer' even if window is
15767 already selected (bug#14191).
15768
15769 2013-04-11 Eli Zaretskii <eliz@gnu.org>
15770
15771 * window.c (Fwindow_end): Test more flags, including the buffer's
15772 last_overlay_modified flag, to determine whether the window's
15773 display is really up-to-date. Prevents the function from
15774 returning a stale value. (Bug#14170)
15775 (Fwindow_line_height): Fix the test for up-to-date-ness of the
15776 current matrix.
15777
15778 2013-04-10 Eli Zaretskii <eliz@gnu.org>
15779
15780 * frame.c (do_switch_frame): Mark the TTY frame we switch to as
15781 garbaged only if it is not already the top frame on its TTY.
15782 This prevents flickering due to constant redrawing of TTY frames when
15783 there are GUI frames open in the same session. (Bug#13864)
15784
15785 2013-04-10 Stefan Monnier <monnier@iro.umontreal.ca>
15786
15787 * keyboard.c (timer_start_idle): Call internal-timer-start-idle instead
15788 of marking the idle timers directly.
15789
15790 2013-04-09 Stefan Monnier <monnier@iro.umontreal.ca>
15791
15792 * minibuf.c (Ftest_completion): Ignore non-string/symbol keys in hash
15793 tables (bug#14054).
15794
15795 2013-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
15796
15797 * window.c (select_window): Don't record_buffer while the invariant is
15798 temporarily broken (bug#14161).
15799
15800 * fns.c (Fdelq): Don't assume !NILP => CONSP.
15801
15802 2013-04-07 Eli Zaretskii <eliz@gnu.org>
15803
15804 * fileio.c (ACL_NOT_WELL_SUPPORTED): Define macro for WINDOWSNT.
15805
15806 2013-04-07 Romain Francoise <romain@orebokech.com>
15807
15808 Ignore additional platform-specific ACL errors (Bug#13702).
15809 * fileio.c (ACL_NOT_WELL_SUPPORTED): New macro copied from gnulib.
15810 (Fcopy_file, Fset_file_acl) [HAVE_POSIX_ACL]: Use it.
15811
15812 2013-03-31 Jan Djärv <jan.h.d@swipnet.se>
15813
15814 * nsterm.m (ns_mouse_position): Use NS_FRAME_P instead of checking
15815 f->output_data.ns.
15816
15817 2013-04-07 Paul Eggert <eggert@cs.ucla.edu>
15818
15819 Fix --enable-profiling bug introduced by 2013-02-25 change (Bug#13783).
15820 This bug was introduced by my 2013-02-25 change that simplified
15821 data_start configuration. Without this change, on GNU/Linux
15822 an Emacs configured with --enable-profiling fails immediately
15823 due to a profiler signal.
15824 * Makefile.in: Compile with $(PROFILING_CFLAGS), but do not link
15825 with these flags. On platforms where special flags are needed
15826 when linking temacs, the flags are now in LD_SWITCH_SYSTEM_TEMACS.
15827 (ALL_CFLAGS): Remove $(PROFILING_CFLAGS).
15828 (.c.o, .m.o): Compile with $(PROFILING_CFLAGS).
15829
15830 2013-04-07 Dmitry Antipov <dmantipov@yandex.ru>
15831
15832 Get rid of some platform-specific functions examining window
15833 system and its capabilities. This is a partial rework of the
15834 2013-04-05 change.
15835 * lisp.h (have_menus_p): Remove prototype. This function is
15836 replaced with platform-independent window_system_available.
15837 (check_window_system): Move to...
15838 * frame.h (decode_window_system_frame, window_system_available):
15839 ...here, add new prototypes.
15840 * frame.c (window_system_available, decode_window_system_frame):
15841 New functions.
15842 (check_window_system): Platform-independent now.
15843 * xterm.h (x_in_use): Remove declaration.
15844 (check_x_frame):
15845 * w32term.h (check_x_frame):
15846 * nsterm.h (check_x_frame): Remove prototypes. This function
15847 is replaced with platform-independent decode_window_system_frame.
15848 * msdos.c (have_menus_p): Remove.
15849 * nsfns.m (check_window_system, have_menus_p, check_ns_frame):
15850 Remove platform-specific functions. Use check_window_system,
15851 decode_window_system_frame and check_ns_display_info where
15852 appropriate. Minor style and comment tweaks.
15853 * w32fns.c (w32_in_use, check_window_system, have_menus_p)
15854 (check_x_frame): Likewise.
15855 * xfns.c (x_in_use, check_window_system, have_menus_p, check_x_frame):
15856 Likewise.
15857 * fileio.c, fns.c, font.c, fontset.c, image.c, menu.c, nsmenu.m:
15858 * nsselect.m, nsterm.m, w32font.c, w32menu.c, xfaces.c, xgselect.c:
15859 * xmenu.c, xselect.c: All related users changed.
15860
15861 2013-04-03 Kenichi Handa <handa@gnu.org>
15862
15863 The following changes is to optimize the code for reading UTF-8
15864 files.
15865
15866 * coding.c (check_ascii): Rename from detect_ascii. Return value
15867 changed. Check EOL format. Do not call adjust_coding_eol_type
15868 here.
15869 (check_utf_8): New function.
15870 (adjust_coding_eol_type): Do nothing if already adjusted.
15871 (detect_coding): Compare the return value of check_ascii with
15872 coding->src_bytes. Call adjust_coding_eol_type if necessary.
15873 (decode_coding_gap): Optimize for valid UTF-8.
15874
15875 2013-03-21 Kenichi Handa <handa@gnu.org>
15876
15877 * coding.c (syms_of_coding): Cancel previous change.
15878
15879 * insdel.c (insert_from_gap): Fix previous change.
15880
15881 2013-04-05 Dmitry Antipov <dmantipov@yandex.ru>
15882
15883 Consistently use platform-specific function to detect window system.
15884 * lisp.h (check_window_system): New prototype. This function is
15885 going to replace check_x, check_w32 and check_ns.
15886 (have_menus_p): Mention msdos.c in comment.
15887 * fontset.c (check_window_system_func): Remove. Adjust all users.
15888 * fontset.h (check_window_system_func): Remove prototype.
15889 * nsterm.h (check_ns):
15890 * xterm.h (check_x):
15891 * w32term.h (check_w32): Likewise.
15892 * menu.c (Fx_popup_menu): Use check_window_system.
15893 * msdos.c (check_window_system): Define for MS-DOS.
15894 * nsfns.m (check_window_system): Define for NS. Adjust all users.
15895 * w32fns.c (check_window_system): Likewise for MS-Windows.
15896 * xfns.c (check_window_system): Likewise for X.
15897 * font.c, frame.c, nsmenu.m, nsselect.m, nsterm.m, w32menu.c:
15898 * xfaces.c, xmenu.c: Use check_window_system where appropriate.
15899
15900 2013-04-02 Paul Eggert <eggert@cs.ucla.edu>
15901
15902 Prefer < to > in range checks such as 0 <= i && i < N.
15903 This makes it easier to visualize quantities on a number line.
15904 This patch doesn't apply to all such range checks,
15905 only to the range checks affected by the 2013-03-24 change.
15906 This patch reverts most of the 2013-03-24 change.
15907 * alloc.c (xpalloc, Fgarbage_collect):
15908 * ccl.c (ccl_driver, resolve_symbol_ccl_program):
15909 * character.c (string_escape_byte8):
15910 * charset.c (read_hex):
15911 * data.c (cons_to_unsigned):
15912 * dispnew.c (update_frame_1):
15913 * doc.c (Fsubstitute_command_keys):
15914 * doprnt.c (doprnt):
15915 * editfns.c (hi_time, decode_time_components):
15916 * fileio.c (file_offset):
15917 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
15918 * font.c (font_intern_prop):
15919 * frame.c (x_set_alpha):
15920 * gtkutil.c (get_utf8_string):
15921 * indent.c (check_display_width):
15922 * keymap.c (Fkey_description):
15923 * lisp.h (FIXNUM_OVERFLOW_P, vcopy):
15924 * lread.c (read1):
15925 * minibuf.c (read_minibuf_noninteractive):
15926 * process.c (wait_reading_process_output):
15927 * search.c (Freplace_match):
15928 * window.c (get_phys_cursor_glyph):
15929 * xdisp.c (redisplay_internal):
15930 * xsmfns.c (smc_save_yourself_CB):
15931 Prefer < to > for range checks.
15932 * dispnew.c (sit_for): Don't mishandle NaNs.
15933 This fixes a bug introduced in the 2013-03-24 change.
15934 * editfns.c (decode_time_components): Don't hoist comparison.
15935 This fixes another bug introduced in the 2013-03-24 change.
15936
15937 2013-03-31 Dmitry Antipov <dmantipov@yandex.ru>
15938
15939 * frame.h (struct frame): Drop scroll_bottom_vpos
15940 member becaue all real users are dead long ago.
15941 (FRAME_SCROLL_BOTTOM_VPOS): Remove.
15942 * xdisp.c (redisplay_internal): Adjust user.
15943
15944 2013-03-30 Darren Hoo <darren.hoo@gmail.com> (tiny change)
15945
15946 * nsmenu.m (showAtX:Y:for:): setLevel to
15947 NSPopUpMenuWindowLevel (Bug#13998).
15948
15949 2013-03-30 Jan Djärv <jan.h.d@swipnet.se>
15950
15951 * nsterm.h (ns_get_pending_menu_title, ns_check_menu_open)
15952 (ns_check_pending_open_menu): Declare.
15953
15954 * nsmenu.m (ns_update_menubar): Correct NSTRACE.
15955 (x_activate_menubar): Update the menu with title that matches
15956 ns_get_pending_menu_title, and call
15957 ns_check_pending_openmenu (Bug#12698).
15958 (menuWillOpen:): New method.
15959 (menuNeedsUpdate:): Add check for ! COCOA || OSX < 10.5 (Bug#12698).
15960
15961 * nsterm.m (menu_will_open_state, menu_mouse_point)
15962 (menu_pending_title): New varaibles.
15963 (ns_get_pending_menu_title, ns_check_menu_open)
15964 (ns_check_pending_open_menu): New functions.
15965
15966 2013-03-29 Dmitry Antipov <dmantipov@yandex.ru>
15967
15968 * indent.c (current_column_bol_cache): Remove leftover which is not
15969 used in Fmove_to_column any more.
15970 (current_column, scan_for_column): Adjust users.
15971 * keyboard.c (last_point_position_buffer, last_point_position_window):
15972 Remove leftovers which are not used for recording undo any more.
15973 (command_loop_1, syms_of_keyboard): Adjust users.
15974 * xdisp.c (last_max_ascent): Remove leftover which is not used in
15975 redisplay_window any more.
15976 (move_it_to): Adjust user.
15977
15978 2013-03-29 Juanma Barranquero <lekktu@gmail.com>
15979
15980 * makefile.w32-in ($(BLD)/filelock.$(O), $(BLD)/filelock.$(O)):
15981 Update dependencies.
15982
15983 2013-03-28 Stefan Monnier <monnier@iro.umontreal.ca>
15984
15985 * lisp.h (save_type, XSAVE_POINTER, set_save_pointer, XSAVE_INTEGER)
15986 (set_save_integer, XSAVE_OBJECT, XSAVE_VALUE): Move to avoid
15987 forward references.
15988
15989 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
15990
15991 * window.h (struct window): Replace hchild, vchild and buffer slots
15992 with a single slot 'contents'. This is possible because each valid
15993 window may have either the child window (in vertical or horizontal
15994 combination) or buffer to display (for the leaf window). Using that,
15995 a lot of operations to traverse and/or change window hierarchies may
15996 be simplified. New member horizontal is used to distinguish between
15997 horizontal and vertical combinations of internal windows.
15998 (WINDOW_LEAF_P, WINDOW_HORIZONTAL_COMBINATION_P)
15999 (WINDOW_VERTICAL_COMBINATION_P): New macros.
16000 (WINDOW_VALID_P, WINDOW_LIVE_P): Adjust to match struct window changes.
16001 * window.c (wset_hchild, wset_vchild): Remove. Adjust all users.
16002 Use contents slot, not buffer, where appropriate.
16003 (wset_combination): New function.
16004 (wset_buffer): Add eassert.
16005 (Fframe_first_window): Simplify the loop reaching first window.
16006 (Fwindow_buffer): Use WINDOW_LEAF_P.
16007 (Fwindow_top_child): Use WINDOW_VERTICAL_COMBINATION_P.
16008 (Fwindow_left_child): Use WINDOW_HORIZONTAL_COMBINATION_P.
16009 (unshow_buffer): Convert initial debugging check to eassert.
16010 (replace_window, recombine_windows, Fdelete_other_windows_internal)
16011 (make_parent_window, window_resize_check, window_resize_apply)
16012 (resize_frame_windows, Fsplit_window_internal, Fdelete_window_internal)
16013 (Fset_window_configuration, delete_all_child_windows, save_window_save):
16014 Adjust to match struct window changes.
16015 (window_loop): Check for broken markers in CHECK_ALL_WINDOWS.
16016 (mark_window_cursors_off, count_windows, get_leaf_windows)
16017 (foreach_window_1): Simplify the loop.
16018 * alloc.c (mark_object): Do not check for the leaf window because
16019 internal windows has no glyph matrices anyway.
16020 * dispnew.c (clear_window_matrices, showing_window_margins_p)
16021 (allocate_matrices_for_window_redisplay, fake_current_matrices)
16022 (allocate_matrices_for_frame_redisplay, free_window_matrices)
16023 (build_frame_matrix_from_window_tree, mirror_make_current)
16024 (frame_row_to_window, mirror_line_dance, check_window_matrix_pointers)
16025 (update_window_tree, set_window_update_flags): Simplify the loop.
16026 (sync_window_with_frame_matrix_rows): Enforce live window.
16027 Use contents slot, not buffer, where appropriate.
16028 * frame.c (set_menu_bar_lines_1): Use WINDOW_VERTICAL_COMBINATION_P
16029 and WINDOW_HORIZONTAL_COMBINATION_P.
16030 (make_frame_visible_1): Simplify the loop.
16031 Use contents slot, not buffer, where appropriate.
16032 * xdisp.c (hscroll_window_tree, mark_window_display_accurate)
16033 (redisplay_windows, redisplay_mode_lines, update_cursor_in_window_tree)
16034 (expose_window_tree): Likewise.
16035 Use contents slot, not buffer, where appropriate.
16036 * textprop.c (get_char_property_and_overlay): Add CHECK_LIVE_WINDOW
16037 to avoid deleted windows. Use contents slot instead of buffer.
16038 * buffer.c, dispextern.h, editfns.c, fileio.c, font.c, fringe.c:
16039 * indent.c, insdel.c, keyboard.c, keymap.c, minibuf.c, msdos.c:
16040 * nsfns.m, nsmenu.m, nsterm.m, print.c, w32fns.c, w32menu.c, xfaces.c:
16041 * xfns.c, xmenu.c: Use contents slot, not buffer, where appropriate.
16042
16043 2013-03-28 Eli Zaretskii <eliz@gnu.org>
16044
16045 * w32fns.c (w32_wnd_proc) [ENABLE_CHECKING]: Add code to help
16046 identify the reasons for assertion violations in bug#14062 and
16047 similar ones.
16048 (Fx_show_tip): Fix compilation error under
16049 "--enable-check-lisp-object-type". (Bug#14073)
16050
16051 * image.c (g_error_free) [WINDOWSNT]: Add DEF_IMGLIB_FN.
16052 Reported by <rzl24ozi@gmail.com>.
16053
16054 2013-03-28 Dmitry Antipov <dmantipov@yandex.ru>
16055
16056 * xdisp.c (with_echo_area_buffer_unwind_data): Save window
16057 start marker...
16058 (unwind_with_echo_area_buffer): ...to restore it here.
16059 This is needed to ensure that...
16060 (redisplay_window): ...both window markers are valid here,
16061 which is verified by eassert.
16062 * editfns.c (save_excursion_save): Do not assume that
16063 selected_window always displays the buffer.
16064 * buffer.c (Fbuffer_swap_text): Adjust window start markers.
16065 Fix comment.
16066
16067 2013-03-27 Stefan Monnier <monnier@iro.umontreal.ca>
16068
16069 * casetab.c (init_casetab_once): Don't abuse the ascii eqv table for
16070 the upcase table.
16071
16072 2013-03-27 rzl24ozi <rzl24ozi@gmail.com> (tiny changes)
16073
16074 * image.c [WINDOWSNT]: Fix calls to DEF_IMGLIB_FN for SVG function.
16075
16076 2013-03-27 Eli Zaretskii <eliz@gnu.org>
16077
16078 * w32proc.c (IsValidLocale) [__GNUC__]: Don't declare prototype,
16079 since MinGW's w32api headers do. This avoids compiler warnings.
16080
16081 * w32.c (FSCTL_GET_REPARSE_POINT) [_MSC_VER || _W64]: Don't define
16082 if already defined.
16083
16084 2013-03-26 Eli Zaretskii <eliz@gnu.org>
16085
16086 * w32.c (_REPARSE_DATA_BUFFER): Condition by _MSVC and _W64.
16087
16088 2013-03-26 Jan Djärv <jan.h.d@swipnet.se>
16089
16090 * gtkutil.c (style_changed_cb): Check if frame is live and an
16091 X frame (Bug#14038).
16092
16093 2013-03-26 Eli Zaretskii <eliz@gnu.org>
16094
16095 * w32.c (_PROCESS_MEMORY_COUNTERS_EX) [_WIN32_WINNT < 0x0500]:
16096 Define only for _WIN32_WINNT less than 0x0500.
16097 (_ANONYMOUS_UNION, _ANONYMOUS_STRUCT) [!_W64]: Don't define for
16098 MinGW64.
16099 Move inclusion of time.h before sys/time.h, so that MinGW64 could
16100 see its own definitions of 'struct timeval' and 'struct timezone'.
16101
16102 Fix incompatibilities between MinGW.org and MinGW64 headers.
16103 * w32term.c (WCRANGE, GLYPHSET): Don't define if _W64 is defined.
16104
16105 * w32.c (REPARSE_DATA_BUFFER): Guard with
16106 MAXIMUM_REPARSE_DATA_BUFFER_SIZE being defined.
16107
16108 2013-03-25 Jan Djärv <jan.h.d@swipnet.se>
16109
16110 * xterm.c: Include X11/XKBlib.h
16111 (XTring_bell): Use XkbBell if HAVE_XKB (Bug#14041).
16112
16113 2013-03-24 Andreas Schwab <schwab@linux-m68k.org>
16114
16115 * alloc.c (xpalloc, Fgarbage_collect): Reorder conditions that are
16116 written backwards.
16117 * blockinput.h (input_blocked_p): Likewise.
16118 * bytecode.c (exec_byte_code): Likewise.
16119 * callproc.c (call_process_kill, call_process_cleanup)
16120 (Fcall_process): Likewise.
16121 * ccl.c (ccl_driver, resolve_symbol_ccl_program)
16122 (Fccl_execute_on_string): Likewise.
16123 * character.c (string_escape_byte8): Likewise.
16124 * charset.c (read_hex): Likewise.
16125 * cm.c (calccost): Likewise.
16126 * data.c (cons_to_unsigned): Likewise.
16127 * dired.c (directory_files_internal, file_name_completion):
16128 Likewise.
16129 * dispnew.c (scrolling_window, update_frame_1, Fsleep_for)
16130 (sit_for): Likewise.
16131 * doc.c (Fsubstitute_command_keys): Likewise.
16132 * doprnt.c (doprnt): Likewise.
16133 * editfns.c (hi_time, decode_time_components, Fformat): Likewise.
16134 * emacsgtkfixed.c: Likewise.
16135 * fileio.c (file_offset, Fwrite_region): Likewise.
16136 * floatfns.c (Fexpt, fmod_float): Likewise.
16137 * fns.c (larger_vector, make_hash_table, Fmake_hash_table):
16138 Likewise.
16139 * font.c (font_intern_prop): Likewise.
16140 * frame.c (x_set_alpha): Likewise.
16141 * gtkutil.c (get_utf8_string): Likewise.
16142 * indent.c (check_display_width): Likewise.
16143 * intervals.c (create_root_interval, rotate_right, rotate_left)
16144 (split_interval_right, split_interval_left)
16145 (adjust_intervals_for_insertion, delete_node)
16146 (interval_deletion_adjustment, adjust_intervals_for_deletion)
16147 (merge_interval_right, merge_interval_left, copy_intervals)
16148 (set_intervals_multibyte_1): Likewise.
16149 * keyboard.c (gobble_input, append_tool_bar_item): Likewise.
16150 * keymap.c (Fkey_description): Likewise.
16151 * lisp.h (FIXNUM_OVERFLOW_P, vcopy): Likewise.
16152 * lread.c (openp, read_integer, read1, string_to_number):
16153 Likewise.
16154 * menu.c (ensure_menu_items): Likewise.
16155 * minibuf.c (read_minibuf_noninteractive): Likewise.
16156 * print.c (printchar, strout): Likewise.
16157 * process.c (create_process, Faccept_process_output)
16158 (wait_reading_process_output, read_process_output, send_process)
16159 (wait_reading_process_output): Likewise.
16160 * profiler.c (make_log, handle_profiler_signal): Likewise.
16161 * regex.c (re_exec): Likewise.
16162 * regex.h: Likewise.
16163 * search.c (looking_at_1, Freplace_match): Likewise.
16164 * sysdep.c (get_child_status, procfs_ttyname)
16165 (procfs_get_total_memory): Likewise.
16166 * systime.h (EMACS_TIME_VALID_P): Likewise.
16167 * term.c (dissociate_if_controlling_tty): Likewise.
16168 * window.c (get_phys_cursor_glyph): Likewise.
16169 * xdisp.c (init_iterator, redisplay_internal, redisplay_window)
16170 (try_window_reusing_current_matrix, try_window_id, pint2hrstr):
16171 Likewise.
16172 * xfns.c (Fx_window_property): Likewise.
16173 * xmenu.c (set_frame_menubar): Likewise.
16174 * xselect.c (x_get_window_property, x_handle_dnd_message):
16175 Likewise.
16176 * xsmfns.c (smc_save_yourself_CB): Likewise.
16177 * xterm.c (x_scroll_bar_set_handle): Likewise.
16178
16179 2013-03-24 Dmitry Antipov <dmantipov@yandex.ru>
16180
16181 * xfaces.c (Finternal_face_x_get_resource): Allow 3rd (frame) argument
16182 to be optional or nil. Adjust comment and convert it to docstring.
16183 * xselect.c (Fx_send_client_event): Rename to Fx_send_client_message.
16184 * frame.c (display_x_get_resource, Fx_get_resource): Break long line.
16185
16186 2013-03-24 Paul Eggert <eggert@cs.ucla.edu>
16187
16188 Static checking by GCC 4.8-20130319.
16189 * image.c (gif_load): Assume pass < 3 to pacify GCC.
16190 * process.c (Fset_process_datagram_address)
16191 (Fmake_network_process): Check get_lisp_to_sockaddr_size return value.
16192 * xdisp.c (get_char_face_and_encoding)
16193 (get_glyph_face_and_encoding): Ensure that *CHAR2B is initialized.
16194 (get_glyph_face_and_encoding): Prepare face before possibly using it.
16195 (get_per_char_metric): Don't use CHAR2B if it might not be initialized.
16196
16197 2013-03-24 Ken Brown <kbrown@cornell.edu>
16198
16199 * w32fns.c (emacs_abort) [CYGWIN]: Define `_open' as a macro to
16200 fix compilation on 64-bit Cygwin, where underscores are not
16201 automatically prepended.
16202
16203 * w32term.c (w32_initialize): Silence compiler warning.
16204
16205 2013-03-23 Eli Zaretskii <eliz@gnu.org>
16206
16207 * w32term.c (w32fullscreen_hook): Use FRAME_NORMAL_WIDTH,
16208 FRAME_NORMAL_HEIGHT, and FRAME_PREV_FSMODE, instead of static
16209 variables, to save and restore frame dimensions.
16210 Use FRAME_NORMAL_LEFT and FRAME_NORMAL_TOP to restore frame position
16211 after returning from a 'fullscreen' configuration.
16212 use SendMessage instead of PostMessage to send the SC_RESTORE message,
16213 to avoid races between the main thread and the input thread.
16214
16215 * w32term.h (struct w32_output): New members normal_width,
16216 normal_height, normal_top, normal_left, and prev_fsmode.
16217 (FRAME_NORMAL_WIDTH, FRAME_NORMAL_HEIGHT, FRAME_NORMAL_TOP)
16218 (FRAME_NORMAL_LEFT, FRAME_PREV_FSMODE): New macros to access these
16219 members of a frame.
16220
16221 * w32term.c (w32fullscreen_hook): Record last value of the frame's
16222 'fullscreen' parameter. Always record previous width and height
16223 of the frame, except when switching out of maximized modes, so
16224 that they could be restored correctly, instead of resetting to the
16225 default frame dimensions. Send SC_RESTORE command to the frame,
16226 unless we are going to send SC_MAXIMIZE, to restore the frame
16227 resize hints in the mouse pointer shown by the window manager.
16228 (Bug#14032)
16229
16230 * frame.c (get_frame_param): Now extern for WINDOWSNT as well.
16231
16232 * lisp.h (get_frame_param): Adjust conditions for prototype
16233 declaration.
16234
16235 2013-03-22 Ken Brown <kbrown@cornell.edu>
16236
16237 * unexcw.c: Drop unneeded inclusion of w32common.h.
16238 (report_sheap_usage): Declare.
16239 (read_exe_header): Add magic numbers for x86_64.
16240 (fixup_executable): Fix printf format specifier for unsigned long
16241 argument.
16242
16243 2013-03-22 Dmitry Antipov <dmantipov@yandex.ru>
16244
16245 * frame.h (struct frame): Put menu_bar_window under #ifdef
16246 because this member is not needed when X toolkit is in use.
16247 (fset_menu_bar_window):
16248 * dispnew.c (clear_current_matrices, clear_desired_matrices)
16249 (free_glyphs, update_frame):
16250 * xdisp.c (expose_frame): Likewise.
16251 (display_menu_bar): Likewise. Remove redundant eassert.
16252 * window.h (WINDOW_MENU_BAR_P): Always define to 0 if X
16253 toolkit is in use.
16254
16255 2013-03-21 Paul Eggert <eggert@cs.ucla.edu>
16256
16257 Use functions and constants to manipulate Lisp_Save_Value objects.
16258 This replaces code that used macros and strings and token-pasting.
16259 The change makes the C source a bit easier to follow,
16260 and shrinks the Emacs executable a bit.
16261 * alloc.c: Verify some properties of Lisp_Save_Value's representation.
16262 (make_save_value): Change 1st arg from string to enum. All callers
16263 changed.
16264 (INTX): Remove.
16265 (mark_object): Use if, not #if, for GC_MARK_STACK.
16266 * lisp.h (SAVE_VALUEP, XSAVE_VALUE, XSAVE_POINTER, XSAVE_INTEGER)
16267 (XSAVE_OBJECT): Now functions, not macros.
16268 (STRING_BYTES_BOUND): Now just a macro, not a constant too;
16269 the constant was never used.
16270 (SAVE_SLOT_BITS, SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, SAVE_TYPE_INT_INT)
16271 (SAVE_TYPE_INT_INT_INT, SAVE_TYPE_OBJ_OBJ, SAVE_TYPE_OBJ_OBJ_OBJ)
16272 (SAVE_TYPE_OBJ_OBJ_OBJ_OBJ, SAVE_TYPE_PTR_INT, SAVE_TYPE_PTR_OBJ)
16273 (SAVE_TYPE_PTR_PTR, SAVE_TYPE_PTR_PTR_OBJ, SAVE_TYPE_MEMORY):
16274 New constants.
16275 (struct Lisp_Save_Value): Replace members area, type0, type1, type2,
16276 type3 with a single member save_type. All uses changed.
16277 (save_type, set_save_pointer, set_save_integer): New functions.
16278 * print.c (PRINTX): Remove.
16279
16280 * alloc.c: Remove redundant static declarations.
16281
16282 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
16283
16284 * window.h (struct window): Convert left_col, top_line, total_lines
16285 and total_cols from Lisp_Objects to integers. Adjust comments.
16286 (wset_left_col, wset_top_line, wset_total_cols, wset_total_lines):
16287 Remove.
16288 (WINDOW_TOTAL_COLS, WINDOW_TOTAL_LINES, WINDOW_LEFT_EDGE_COL)
16289 (WINDOW_TOP_EDGE_LINE): Drop Lisp_Object to integer conversion.
16290 * dispnew.c, frame.c, w32fns.c, window.c, xdisp.c, xfns.c:
16291 Adjust users where appropriate.
16292
16293 2013-03-20 Dmitry Antipov <dmantipov@yandex.ru>
16294
16295 * frame.h (struct frame): Drop resx and resy because the same data is
16296 available from window system-specific output context. Adjust users.
16297 (default_pixels_per_inch_x, default_pixels_per_inch_y):
16298 New functions to provide defaults when no window system available.
16299 (FRAME_RES_X, FRAME_RES_Y): New macros.
16300 (NUMVAL): Move from xdisp.c.
16301 * font.c (font_pixel_size, font_find_for_lface, font_open_for_lface)
16302 (Ffont_face_attributes, Fopen_font):
16303 * image.c (gs_load):
16304 * w32font.c (fill_in_logfont):
16305 * xdisp.c (calc_pixel_width_or_height):
16306 * xfaces.c (Fx_family_fonts, set_lface_from_font): Use them.
16307 * xsettings.c (apply_xft_settings): Drop frame loop and adjust comment.
16308
16309 2013-03-20 Kenichi Handa <handa@gnu.org>
16310
16311 * coding.c (syms_of_coding): Initialize disable_ascii_optimization
16312 to 1 (temporary workaround until a bug related to ASCII
16313 optimization is fixed).
16314
16315 2013-03-19 Dmitry Antipov <dmantipov@yandex.ru>
16316
16317 * window.c (Fwindow_combination_limit, Fset_window_combination_limit):
16318 Signal error if window is not internal. Adjust docstring.
16319 (delete_all_child_windows): Use combination_limit to save the buffer.
16320 (Fset_window_configuration): Adjust accordingly.
16321 * print.c (syms_of_print): Initialize debugging output not here...
16322 (init_print_once): ...but in a new function here.
16323 * lisp.h (init_print_once): Add prototype.
16324 * emacs.c (main): Add call to init_print_once. Adjust comments.
16325
16326 2013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
16327
16328 * window.c (window_resize_check, window_resize_apply)
16329 (window_from_coordinates, recombine_windows, set_window_buffer)
16330 (make_parent_window, Fwindow_resize_apply, resize_frame_windows)
16331 (Fsplit_window_internal, Fdelete_window_internal)
16332 (freeze_window_starts): Use bool for booleans.
16333 * window.h (window_frame_coordinates, resize_frame_windows)
16334 (freeze_window_starts, set_window_buffer): Adjust prototypes.
16335
16336 2013-03-17 Stefan Monnier <monnier@iro.umontreal.ca>
16337
16338 * dispnew.c (bitch_at_user): Use `user-error'.
16339
16340 2013-03-17 Ken Brown <kbrown@cornell.edu>
16341
16342 * dispextern.h (RGB_PIXEL_COLOR): Move here from image.c. Use it
16343 as return type of image_background. (Bug#13981)
16344 * image.c (RGB_PIXEL_COLOR): Move to dispextern.h.
16345
16346 2013-03-16 Jan Djärv <jan.h.d@swipnet.se>
16347
16348 * nsterm.m (updateFrameSize:): Change resize increments if needed.
16349 (ns_select): Don't return with result uninitialized.
16350
16351 * nsterm.h (EmacsSavePanel, EmacsOpenPanel): Add getFilename
16352 and getDirectory.
16353
16354 * nsfns.m (ns_filename_from_panel, ns_directory_from_panel):
16355 New functions.
16356 (Fns_read_file_name): ret is BOOL. If ! dir_only_p, don't choose
16357 directories. If filename is nil, get directory name (Bug#13932).
16358 Use getFilename and getDirectory.
16359 (getFilename, getDirectory): New methods for EmacsSavePanel and
16360 EmacsOpenPanel.
16361 (ok:): In EmacsOpenPanel, if we can't choose directories, just return.
16362
16363 2013-03-15 Paul Eggert <eggert@cs.ucla.edu>
16364
16365 * coding.c (decode_coding_gap): Fix typo caught by static checking.
16366
16367 2013-03-15 Kenichi Handa <handa@gnu.org>
16368
16369 * insdel.c (insert_from_gap): New arg text_at_gap_tail.
16370 (adjust_after_replace): Make it back to static. Delete the third
16371 arg text_at_gap_tail. Cancel the code for handling it.
16372
16373 * coding.h (struct coding_system): New member eol_seen.
16374
16375 * coding.c (detect_ascii): New function.
16376 (detect_coding): Set coding->head_ascii and coding->eol_seen only
16377 when the source bytes are actually scanned. On detecting for
16378 coding_category_utf_8_auto, call detect_ascii instead of scanning
16379 source bytes directly.
16380 (produce_chars): Call insert_from_gap with the new arg 0.
16381 (encode_coding): Likewise.
16382 (decode_coding_gap): Control ASCII optimization by the variable
16383 disable_ascii_optimization instead of #ifndef .. #endif.
16384 Deccode EOL format according to coding->eol_seen.
16385 (syms_of_coding): Declare disable-ascii-optimization as a Lisp
16386 variable.
16387
16388 * lisp.h (adjust_after_replace): Cancel externing it.
16389 (insert_from_gap): Adjust prototype.
16390
16391 2013-03-15 Eli Zaretskii <eliz@gnu.org>
16392
16393 * w32term.c (w32fullscreen_hook): Swap FULLSCREEN_BOTH and
16394 FULLSCREEN_MAXIMIZED. (Bug#13935)
16395
16396 2013-03-15 Dmitry Antipov <dmantipov@yandex.ru>
16397
16398 * region-cache.c (find_cache_boundary, move_cache_gap)
16399 (insert_cache_boundary, delete_cache_boundaries, set_cache_region):
16400 Simplify debugging check and convert to eassert. Adjust comment.
16401 (pp_cache): Put under ENABLE_CHECKING.
16402
16403 2013-03-14 Eli Zaretskii <eliz@gnu.org>
16404
16405 * w32term.c (w32_read_socket) <WM_WINDOWPOSCHANGED>: Remove old
16406 and incorrect code. Treat WM_WINDOWPOSCHANGED like WM_ACTIVATE
16407 and WM_ACTIVATEAPP.
16408 (w32fullscreen_hook): If the frame is visible, reset
16409 f->want_fullscreen flag after changing the frame size. If the
16410 frame is not visible, set f->want_fullscreen to FULLSCREEN_WAIT.
16411 (Bug#13953)
16412
16413 2013-03-13 Daniel Colascione <dancol@dancol.org>
16414
16415 * emacs.c (main): Call syms_of_cygw32 on CYGWIN non-NTGUI builds
16416 too so that these builds can use Cygwin's file conversion
16417 functions. (We've been building and linking cygw32.o all along
16418 and just not using it.)
16419
16420 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
16421
16422 File synchronization fixes (Bug#13944).
16423 * Makefile.in (LIB_FDATASYNC): New macro.
16424 (LIBES): Use it.
16425 * conf_post.h (BSD_SYSTEM, BSD_SYSTEM_AHB): Remove; no longer needed.
16426 * fileio.c (Fwrite_region, write_region_inhibit_fsync):
16427 Don't worry about HAVE_FSYNC, since a substitute fsync is
16428 available if the system lacks one.
16429 (Fwrite_regin): Retry fsync if interrupted.
16430
16431 2013-03-13 Eli Zaretskii <eliz@gnu.org>
16432
16433 * w32term.c (w32_read_socket): If the Emacs frame is being
16434 activated, call w32fullscreen_hook, to make sure the new frame
16435 dimensions are in effect. (Bug#13937)
16436
16437 2013-03-13 Dmitry Antipov <dmantipov@yandex.ru>
16438
16439 * xdisp.c (init_iterator): Simplify because both character and byte
16440 positions are either specified or -1. Add eassert. Adjust comment.
16441 * window.c (Fscroll_other_window): Use SET_PT_BOTH because both
16442 character and byte positions can be obtained from marker.
16443
16444 2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
16445
16446 Static checking by Sun C 5.12.
16447 * alloc.c (buffer_memory_full) [REL_ALLOC]:
16448 * bytecode.c (exec_byte_code):
16449 * dispnew.c (init_display):
16450 * eval.c (error):
16451 * fileio.c (Fsubstitute_in_file_name):
16452 * keyboard.c (Fevent_convert_list):
16453 * keymap.c (Fsingle_key_description):
16454 * term.c (maybe_fatal, fatal):
16455 * xfns.c (Fx_display_backing_store, Fx_display_visual_class):
16456 * xsmfns.c (Fhandle_save_session):
16457 Omit unreachable code.
16458 * keymap.c (map_keymap_char_table_item): Cast void * to
16459 a function pointer type; the C Standard requires this.
16460
16461 * sysdep.c: Remove a use of BSD_SYSTEM, which I'm trying to phase out.
16462 Include <sys/param.h> unconditionally, as that works elsewhere and
16463 is simpler here. Include <sys/sysctl.h> if DARWIN_OS ||
16464 __FreeBSD__, not if BSD_SYSTEM, since it's needed only for Darwin
16465 and FreeBSD now.
16466
16467 See ChangeLog.12 for earlier changes.
16468
16469 ;; Local Variables:
16470 ;; coding: utf-8
16471 ;; End:
16472
16473 Copyright (C) 2011-2015 Free Software Foundation, Inc.
16474
16475 This file is part of GNU Emacs.
16476
16477 GNU Emacs is free software: you can redistribute it and/or modify
16478 it under the terms of the GNU General Public License as published by
16479 the Free Software Foundation, either version 3 of the License, or
16480 (at your option) any later version.
16481
16482 GNU Emacs is distributed in the hope that it will be useful,
16483 but WITHOUT ANY WARRANTY; without even the implied warranty of
16484 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16485 GNU General Public License for more details.
16486
16487 You should have received a copy of the GNU General Public License
16488 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.