ChangeLog 706 KB
Newer Older
1 2
2015-04-03  Jan Djärv  <jan.h.d@swipnet.se>

3 4 5 6 7 8 9
	* image.c (prepare_image_for_display): Don't load if USE_CAIRO.
	(x_clear_image): If USE_CAIRO, also free possible img->ximg->obdata and
	don't return early.
	(ALLOC_XPM_COLORS): Don't define when USE_CAIRO.
	(xpm_load): Convert simple Xpms (32 bit ZPixmap) to CAIRO_FORMAT_ARGB32
	and create a surface.

10 11
	* xterm.c (handle_one_xevent): Always redraw tool tips on
	MapNotify.  Update tool tip frame sizes on ConfigureNotify.
12 13
	(x_update_begin): Don't create any surface for non-visible
	tip frames, the geometry may be wrong.
14

15 16 17 18 19
2015-03-31  Eli Zaretskii  <eliz@gnu.org>

	* keyboard.c (read_key_sequence): Don't let
	this_single_command_key_start become negative.  (Bug#20223)

Jan D's avatar
Jan D committed
20 21 22 23 24 25
2015-03-29  Jan Djärv  <jan.h.d@swipnet.se>

	* gtkutil.c (xg_display_open):
	* xterm.c (x_display_ok, x_term_init): Block SIGIO when opening
	a display (Bug#19175).

Paul Eggert's avatar
Paul Eggert committed
26
2015-03-29  Martin Rudalics  <rudalics@gmx.at>
27 28 29 30

	* gtkutil.c (update_theme_scrollbar_width): Don't round up
	scroll bar width with GTK3 (Bug#20182).

Jan D's avatar
Jan D committed
31 32 33 34 35
2015-03-28  Jan Djärv  <jan.h.d@swipnet.se>

	* xsmfns.c (smc_save_yourself_CB): Return if Vinvocation_name or
	user_login_name are not strings.

36 37 38 39 40
2015-03-28  Eli Zaretskii  <eliz@gnu.org>

	* w32.c (sys_connect): Fix a mistake in previous commit that broke
	blocking connections.  (Bug#20159)

41 42
2015-03-27  Paul Eggert  <eggert@cs.ucla.edu>

43 44 45 46 47 48 49 50 51 52 53 54
	Avoid some core dumps in X session management
	Derived from a bug report by Nicolas Richard in:
	http://bugs.gnu.org/20191#20
	* xsmfns.c (smc_save_yourself_CB): Don't dump core if
	invocation-name is not a string.  Initialize user-login-name if it
	is not already initialized, and don't dump core if it is not a
	string.
	(create_client_leader_window): Don't dump core if x-resource-name
	and x-resource-class are not both strings.
	(x_session_initialize): Don't dump core if x-session-previous-id,
	invocation-directory, and invocation-name are not strings.

55
	Port user-login-name initialization to Qnil == 0
56 57
	Derived from a bug report by Nicolas Richard in:
	http://bugs.gnu.org/20191#20
58 59 60 61
	* editfns.c (Fuser_login_name, Fuser_real_login_name)
	(syms_of_editfns): Don't rely on all-bits-zero being an Elisp integer,
	as this is no longer true now that Qnil == 0.

62 63 64 65 66 67 68
	Assume !BROKEN_NON_BLOCKING_CONNECT
	From a suggestion by Eli Zaretskii in:
	http://lists.gnu.org/archive/html/emacs-devel/2015-03/msg00824.html
	* process.c (NON_BLOCKING_CONNECT): Simplify by assuming that
	BROKEN_NON_BLOCKING_CONNECT is not defined.
	(SELECT_CAN_DO_WRITE_MASK): Remove, and assume it's now true.

69 70
2015-03-27  Eli Zaretskii  <eliz@gnu.org>

71 72 73 74 75 76
	* lread.c (substitute_object_recurse): For sub-char-tables, start
	the recursive SUBSTITUTE loop from index of 2, to skip the
	non-Lisp members of the sub-char-table.  See the discussion at
	http://lists.gnu.org/archive/html/emacs-devel/2015-03/msg00520.html
	for the details.

77 78 79 80 81 82 83 84 85 86 87 88
	Support non-blocking connect on MS-Windows.
	Based on ideas from Kim F. Storm <storm@cua.dk>, see
	http://lists.gnu.org/archive/html/emacs-devel/2006-12/msg00873.html.

	* w32proc.c (reader_thread): If the FILE_CONNECT flag is set, call
	'_sys_wait_connect'.  If it returns STATUS_CONNECT_FAILED, exit
	the thread with code 2.
	(sys_select): Support 'wfds' in addition to 'rfds'.  If a
	descriptor in 'wfds' has its bit set, but the corresponding
	fd_info member doesn't have its FILE_CONNECT flag set, ignore the
	descriptor.  Otherwise, acknowledge a successful non-blocking
	connect by resetting the FILE_CONNECT flag and setting cp->status
89
	to STATUS_READ_ACKNOWLEDGED.  (Bug#20159)
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109

	* w32.h (STATUS_CONNECT_FAILED): New enumeration value.
	(struct _child_process): New member 'errcode'.
	(FILE_CONNECT): New flag.
	(_sys_wait_connect): Add prototype.

	* w32.c (pfn_WSAEnumNetworkEvents): New function pointer.
	(init_winsock): Load WSAEnumNetworkEvents from winsock DLL.
	(set_errno): Map WSAEWOULDBLOCK and WSAENOTCONN.
	(sys_connect): Support non-blocking 'connect' calls by setting the
	FILE_CONNECT flag in the fd_info member and returning EINPROGRESS.
	(_sys_read_ahead): Add debug message if this function is called
	for a descriptor that waits for a non-blocking connect to complete.
	(_sys_wait_connect): New function.
	(sys_read): Support STATUS_CONNECT_FAILED.  Return the error code
	recorded by _sys_wait_connect when the non-blocking connect
	failed.  Don't call WSAGetLastError before a call to set_errno had
	a chance to use its value, since WSAGetLastError clears the last
	error.

110 111 112 113 114 115
2015-03-25  Stefan Monnier  <monnier@iro.umontreal.ca>

	* editfns.c (save_excursion_save): Don't save the mark.
	(save_excursion_restore): Don't restore the mark.
	(Fsave_excursion): Fix docstring accordingly.

Paul Eggert's avatar
Paul Eggert committed
116 117 118 119 120 121 122
2015-03-24  Paul Eggert  <eggert@cs.ucla.edu>

	Fix minor ldexp issues
	* floatfns.c (Fldexp): Require 2 args.  Avoid undefined behavior
	if the exponent is out of 'int' range.  Improve documentation.
	Fixes: bug#20185

123 124 125 126 127
2015-03-24  Daniel Colascione  <dancol@dancol.org>

	* process.c (Fprocess_running_child_p): Return number identifier of
	the foreground process group if we know it.

128 129 130 131 132 133
2015-03-23  Paul Eggert  <eggert@cs.ucla.edu>

	Minor refactoring of new Fmake_process code
	* process.c (Fmake_process): Refactor to avoid call to Flength, to
	avoid cast to 'char **', and to reduce indenting and reuse of locals.

134 135 136 137 138 139 140 141
2015-03-23  Daiki Ueno  <ueno@gnu.org>

	* process.c (Fmake_process): New function.
	(create_process, create_pty): Check p->pty_flag instead of
	Vprocess_connection_type.
	(syms_of_process): Register QCcommand, QCconnection_type, Qpty,
	Qpipe, and Smake_process.  Unregister Sstart_process.

Jan D's avatar
Jan D committed
142 143 144 145 146
2015-03-22  Jan Djärv  <jan.h.d@swipnet.se>

	* fontset.c (fontset_pattern_regexp): Replace + 1 with + 3 for
	regexsize (Bug#20156).

147 148 149 150 151 152
2015-03-21  Eli Zaretskii  <eliz@gnu.org>

	* emacs.c (synchronize_locale) [WINDOWSNT]: Ignore 'category' and
	always use LC_ALL instead.  Fixes problems with setting
	system-time-locale to something non-default.

Paul Eggert's avatar
Paul Eggert committed
153
2015-03-18  Glenn Morris  <rgm@gnu.org>
Glenn Morris's avatar
Glenn Morris committed
154 155 156 157

	* frame.h (x_set_bitmap_icon): Don't set the icon if icon-type is
	nil/not present in the parameter alist.  (Bug#19680)

158 159 160 161
2015-03-18  Stefan Monnier  <monnier@iro.umontreal.ca>

	* alloc.c (purecopy): Handle hash-tables.

162 163 164 165 166
2015-03-16  Stefan Monnier  <monnier@iro.umontreal.ca>

	* minibuf.c (Fread_buffer): Add `predicate' argument.
	* callint.c (Fcall_interactively): Adjust calls accordingly.

167 168 169
2015-03-15  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (handle_invisible_prop): Fix up it->position even when
170
	we are going to load overlays at the beginning of the invisible text.
171 172 173
	(setup_for_ellipsis): Reset the ignore_overlay_strings_at_pos_p
	flag also here.
	(next_overlay_string): Set the overlay_strings_at_end_processed_p
174
	flag only if the overlays just processed were actually loaded at EOB.
175

176 177 178 179 180
2015-03-14  Daniel Colascione  <dancol@dancol.org>

	* emacs.c (standard_args): Add --no-x-resources.
	(usage_message): Document that -Q implies --no-x-resources.

181 182
2015-03-13  Paul Eggert  <eggert@cs.ucla.edu>

183 184
	* frame.c (x_get_resource_string) [!USE_GTK]: Don't define.

185 186
	* editfns.c, systime.h (mktime_z) [!HAVE_TZALLOC]: Now static.

187 188 189 190 191 192 193 194 195 196 197 198
2015-03-12  Eli Zaretskii  <eliz@gnu.org>

	* w32font.c (font_supported_scripts): Add subranges for Latin
	Supplement, Latin Extended-A/B, Vai, Supplemental Punctuation, Tai
	Le, Buginese, Yijing Hexagrams, Ancient Greek Numbers, Tai Xuan
	Jing, Counting Rods, Sundanese, Lepcha, Ol Chiki, Saurashtra,
	Kayah Li, Rejang, Ancient Symbols, Phistos Disc, Carian, Lycian,
	Lydian, Dominoe Tiles, and Mahjong Tiles.  Break the Mathematical
	Alphanumeric Symbols into several "scripts" like fontset.el does.
	(Bug#19993)
	(syms_of_w32font): DEFSYM all the new script symbols.

199 200 201 202 203 204 205 206 207
2015-03-07  Eli Zaretskii  <eliz@gnu.org>

	* w32fns.c <ImmReleaseContext_Proc, ImmSetCompositionWindow_Proc>:
	Fix typedefs to be consistent with the corresponding w32 API
	signatures.
	(w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Don't invoke
	DefWindowProc if we successfully handled the message, as doing so
	causes problems in displaying selection dialogs.  (Bug#11732)

208 209 210 211 212 213
2015-03-05  Paul Eggert  <eggert@cs.ucla.edu>

	Work around x86 glibc backtrace bug
	* sysdep.c (emacs_backtrace): Don't dump core on x86.
	Fixes: bug#19959

214 215 216 217 218 219 220 221 222
2015-03-05  Eli Zaretskii  <eliz@gnu.org>

	* keyboard.c (make_lispy_position): When the click is on the
	right-side vertical scroll bar, pass the rightmost X coordinate to
	buffer_posn_from_coords, so that the returned text position
	reflects the closest point to the click.  Fixes region extension
	when mouse moves outside the Emacs frame that has scroll bars on
	the right.

223 224 225 226 227
2015-03-04  Martin Rudalics  <rudalics@gmx.at>

	* frame.c (x_set_font): Try to keep frame height and width
	unchanged if tool bar size changes with new font.

Paul Eggert's avatar
Paul Eggert committed
228
2015-03-03  Eli Zaretskii  <eliz@gnu.org>
229 230 231 232

	* search.c (find_newline): Avoid assertion violations in
	CHAR_TO_BYTE when a portion of the buffer was deleted and we look
	for newlines near the end of the buffer.  This happens in Rmail
233
	when JIT font-lock fontifies a newly displayed portion of the
234 235
	buffer.

Paul Eggert's avatar
Paul Eggert committed
236
2015-03-03  Eli Zaretskii  <eliz@gnu.org>
237 238 239 240

	* w32fns.c (Fw32__menu_bar_in_use): New internal function.
	(Bug#19925)

Paul Eggert's avatar
Paul Eggert committed
241
2015-03-03  Glenn Morris  <rgm@gnu.org>
242 243 244

	* fileio.c (Fmake_temp_name): Doc tweaks.  (Bug#19858)

Paul Eggert's avatar
Paul Eggert committed
245
2015-03-03  Eli Zaretskii  <eliz@gnu.org>
246 247 248 249

	* menu.c (Fx_popup_menu) [HAVE_X_WINDOWS]: Call
	mouse_position_for_popup only for X frames.  (Bug#19862)

Paul Eggert's avatar
Paul Eggert committed
250
2015-03-03  Eli Zaretskii  <eliz@gnu.org>
251 252 253

	* buffer.c (syms_of_buffer): Doc fix.  (Bug#19841)

Paul Eggert's avatar
Paul Eggert committed
254
2015-03-03  Eli Zaretskii  <eliz@gnu.org>
255 256 257 258 259

	* xfaces.c (map_tty_color): Use assoc_no_quit instead of
	assq_no_quit to fetch color definition by its string name.
	(Bug#19802)

Paul Eggert's avatar
Paul Eggert committed
260
2015-03-03  Eli Zaretskii  <eliz@gnu.org>
261 262 263 264 265 266

	* xdisp.c (move_it_in_display_line_to): Handle the case where the
	last character of a screen line is whitespace, and we are under
	word-wrap with overflow-newline-into-fringe turned on.
	(Bug#19769)

Paul Eggert's avatar
Paul Eggert committed
267
2015-03-03  Eli Zaretskii  <eliz@gnu.org>
268 269 270 271 272 273 274 275 276 277

	* xdisp.c (handle_stop, handle_single_display_spec)
	(next-element_from_image): Don't reset the
	ignore_overlay_strings_at_pos_p flag here.
	(next_element_from_buffer): Reset ignore_overlay_strings_at_pos_p
	here.
	(next_overlay_string): Set ignore_overlay_strings_at_pos_p here,
	after we've exhausted all the overlay strings at the current
	position.  (Bug#19307)

Paul Eggert's avatar
Paul Eggert committed
278
2015-03-03  Eli Zaretskii  <eliz@gnu.org>
279

280 281 282 283
	* xdisp.c (set_iterator_to_next): Set value of stop_charpos
	according to the object we are about to resume iterating.
	(Bug#19307)

284 285 286 287 288 289 290
	* dispnew.c (adjust_glyph_matrix): Set the update_mode_line flag
	of the window whose current glyph matrix was resized, which
	disables the mode-line row as side effect.

	* xdisp.c (redisplay_window): Don't avoid redisplay of a window
	whose update_mode_line flag is set.  (Bug#19721)

Paul Eggert's avatar
Paul Eggert committed
291
2015-03-03  Eli Zaretskii  <eliz@gnu.org>
292 293

	* dispextern.h (FACE_FOR_CHAR): Fix the commentary.
294

295 296 297 298
2015-03-03  Daniel Colascione  <dancol@dancol.org>

	* alloc.c (syms_of_alloc): Rename `gc-precise-p' to `gc-precise'.

299 300 301 302 303
2015-03-03  Paul Eggert  <eggert@cs.ucla.edu>

	* alloc.c (run_finalizers): Omit unused local.
	Also, redo newly-added code as per usual Emacs style.

304 305 306 307 308 309 310
2015-03-03  Martin Rudalics  <rudalics@gmx.at>

	* frame.c (adjust_frame_size): If the pixel sizes remain
	unchanged but the number of lines or columns of the frame
	changes, run `window--pixel-to-total' (Bug#19972).
	(Qwindow_pixel_to_total): DEFSYM it.

311 312 313 314 315 316 317 318
2015-03-03  Daniel Colascione  <dancol@dancol.org>

	* print.c (print_object): Print whether a finalizer has
	been called.

	* data.c (Ftype_of): Make `type-of' work with finalizers.
	(syms_of_data): Register Qfinalizer.

Daniel Colascione's avatar
Daniel Colascione committed
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336
2015-03-02  Daniel Colascione  <dancol@dancol.org>

	* print.c (print_object): Print finalizers.

	* alloc.c:
	(finalizers, doomed_finalizers): New variables.
	(init_finalizer_list, finalizer_insert, unchain_finalizer)
	(mark_finalizer_list, queue_doomed_finalizers)
	(run_finalizer_handler, run_finalizer_function, run_finalizers):
	New functions.
	(garbage_collect_1, mark_object, sweep_misc)
	(init_alloc_once, syms_of_alloc): Support finalizers.
	(gc-precise-p): New Lisp variable.

	* lisp.h (Lisp_Misc_Type): New value Lisp_Misc_Finalizer.
	(FINALIZERP, XFINALIZER): New functions.
	(Lisp_Finalizer): New structure.

337 338 339 340 341 342
2015-02-28  Paul Eggert  <eggert@cs.ucla.edu>

	* character.c (alphabeticp, decimalnump): Avoid undefined behavior
	if CATEGORY is not an integer, or is an integer out of
	unicode_category_t range.

343 344
2015-02-28  Martin Rudalics  <rudalics@gmx.at>

345 346
	* frame.c (make_initial_frame, Fmake_terminal_frame):
	Set can_x_set_window_size and after_make_frame (Bug#19962).
347

348 349 350 351 352 353 354 355 356 357 358 359 360
2015-02-28  Eli Zaretskii  <eliz@gnu.org>

	* character.c (alphabeticp, decimalnump): New functions.
	* character.h (alphabeticp, decimalnump): Add prototypes.

	* regex.c (ISALNUM, ISALPHA): Check Unicode character properties
	for multibyte characters by calling alphabeticp and decimalnump.
	(BIT_ALPHA, BIT_ALNUM): New bit masks.
	(re_wctype_to_bit): Return them when the class is RECC_ALPHA or
	RECC_ALNUM.
	(re_match_2_internal): Call ISALPHA and ISALNUM when appropriate.
	(Bug#19878)

361 362 363 364 365 366 367 368 369 370 371 372
2015-02-27  Jan Djärv  <jan.h.d@swipnet.se>

	* xterm.h (x_real_pos_and_offsets): Take outer_border as arg also.

	* xmenu.c (x_menu_show): Adjust for new arg to x_real_pos_and_offsets.

	* xfns.c (x_real_pos_and_offsets): Take outer_border as arg also.
	Initialize all args.  Get outer_border from window attributes.
	Fix typo for top_offset_y.
	(x_real_positions): Adjust for new arg to x_real_pos_and_offsets.
	(Fx_frame_geometry): Get outer_border also.  Use attrs.width/height.

373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
2015-02-27  Mark Laws  <mdl@60hz.org>

	Support daemon mode on MS-Windows (bug#19688)
	* emacs.c <w32_daemon_event> [WINDOWSNT]: New global var.
	(main) [WINDOWSNT]: Initialize it to NULL.  Create the event to
	signal clients we are ready for connections.
	(Fdaemon_initialized): Use DAEMON_RUNNING.
	[WINDOWSNT]: MS-Windows specific code to signal clients we are
	ready for connections.

	* lisp.h (DAEMON_RUNNING): New macro, encapsulates Posix and
	MS-Windows conditions for running in daemon mode.

	* minibuf.c (read_minibuf): Use DAEMON_RUNNING.

	* keyboard.c (kbd_buffer_get_event): Use DAEMON_RUNNING.

	* dispnew.c (init_display) [WINDOWSNT]: Initialize frames/terminal
	even in daemon mode.

393 394 395 396 397 398 399
2015-02-26  Jan Djärv  <jan.h.d@swipnet.se>

	* xmenu.c (create_and_show_popup_menu): Call XTranslateCoordinates,
	dont use OUTER_TO_INNER macros.
	(x_menu_show): Call x_real_pos_and_offsets, don't use
	OUTER_TO_INNER macros.

Paul Eggert's avatar
Paul Eggert committed
400
2015-02-26  Eli Zaretskii  <eliz@gnu.org>
401 402 403

	* dispextern.h (FACE_FOR_CHAR): Fix the commentary.

Paul Eggert's avatar
Paul Eggert committed
404
2015-02-26  Hans Wennborg  <hwennborg@google.com>  (tiny change)
405 406 407 408

	* emacs.c (decode_env_path): Add parentheses around ternary
	operator to increase readability and pacify compiler warnings.

Paul Eggert's avatar
Paul Eggert committed
409
2015-02-26  Eli Zaretskii  <eliz@gnu.org>
Eli Zaretskii's avatar
Eli Zaretskii committed
410 411 412 413

	* w32.c (sys_readdir): Map ERROR_NOT_READY (as in "device not
	ready") to ENOENT.

414 415 416 417
2015-02-26  Paul Eggert  <eggert@cs.ucla.edu>

	* xfns.c (x_real_pos_and_offsets): Fix pointer signedness.

418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
2015-02-25  Jan Djärv  <jan.h.d@swipnet.se>

	* xterm.h (struct x_output): Remove x_pixels_outer_diff,
	y_pixels_outer_diff, FRAME_OUTER_TO_INNER_DIFF_X,
	FRAME_OUTER_TO_INNER_DIFF_Y. Declare x_real_pos_and_offsets.

	* xmenu.c (create_and_show_popup_menu): Use XTranslateCoordinates
	instead of OUTER_TO_INNER_DIFF macros.

	* xfns.c (x_real_pos_and_offsets): New function, basically the code
	from x_real_positions.
	(x_real_positions): Call x_real_pos_and_offsets.
	(x_relative_mouse_position): Use XTranslateCoordinates instead of
	OUTER_TO_INNER_DIFF macros.
	(Fx_frame_geometry): Get offsets with x_real_pos_and_offsets,
	border from window attributes.  Adjust tool bar and menu widths.

	* w32fns.c (x_real_positions): Remove setting of x_pixels_diff,
	y_pixels_diff.

	* frame.h (struct frame): Remove x_pixels_diff, y_pixels_diff.

440 441 442 443 444 445 446 447 448 449
2015-02-25  Paul Eggert  <eggert@cs.ucla.edu>

	Backtrace after malloc arena is corrupted
	Without this change, if the malloc arena is corrupted and then
	'backtrace' is called, the backtrace can crash because 'backtrace'
	calls 'malloc'.  For more, please see:
	https://sourceware.org/ml/libc-alpha/2015-02/msg00678.html
	* emacs.c (main): Initialize tables used by 'backtrace'.
	* sysdep.c (emacs_backtrace): Document the newly used part of the API.

Jan D's avatar
Jan D committed
450 451 452 453 454
2015-02-22  Jan Djärv  <jan.h.d@swipnet.se>

	* nsfns.m (Fx_frame_geometry): New function.
	(syms_of_nsfns): Defsubr Sx_frame_geometry.

Paul Eggert's avatar
Paul Eggert committed
455 456 457 458 459 460
2015-02-22  Paul Eggert  <eggert@cs.ucla.edu>

	Spelling fixes
	* lisp.h (DEFINE_NON_NIL_Q_SYMBOL_MACROS):
	Rename from DEFINE_NONNIL_Q_SYMBOL_MACROS.  All uses changed.

461 462 463 464 465 466 467
2015-02-21  Eli Zaretskii  <eliz@gnu.org>

	* w32term.c (queue_notifications):
	* w32inevt.c (handle_file_notifications):
	* w32font.c (w32_enumfont_pattern_entity): Prefer 'Qfoo' to
	'intern ("foo")'.

468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496
2015-02-21  Paul Eggert  <eggert@cs.ucla.edu>

	Prefer 'Qfoo' to 'intern ("foo")'
	* buffer.c (syms_of_buffer):
	* bytecode.c (exec_byte_code):
	* callint.c (Fcall_interactively):
	* callproc.c (create_temp_file):
	* charset.c (define_charset_internal):
	* coding.c (syms_of_coding):
	* editfns.c (syms_of_editfns):
	* emacs.c (main):
	* fns.c (syms_of_fns):
	* frame.c (delete_frame, Fframe_parameters):
	* keyboard.c (syms_of_keyboard):
	* keymap.c (syms_of_keymap):
	* minibuf.c (read_minibuf, syms_of_minibuf):
	* nsfns.m (ns_cursor_type_to_lisp):
	* textprop.c (syms_of_textprop):
	* xdisp.c (Fformat_mode_line, syms_of_xdisp):
	* xfns.c (x_create_tip_frame, Fx_select_font):
	* xml.c (parse_region):
	Prefer constants like 'Qfoo' to calls like 'intern ("foo")'.
	* buffer.c (syms_of_buffer): OK to do (put 'erase-buffer 'disabled
	t) here now ...
	(keys_of_buffer): ... instead of here.
	* ftfont.c (syms_of_ftfont): Move DEFSYM of Qmono from here ...
	* xfns.c (syms_of_xfns): ... to here, since ftfont.c is more
	optional than xfns.c.

497 498 499 500 501 502
2015-02-20  Jan Djärv  <jan.h.d@swipnet.se>

	* emacs.c (terminate_due_to_signal): Move totally_unblock_input after
	setting fatal_error_in_progress, so gobble_input and *read_socket are
	not read if there are pending_signals.

503 504 505 506 507 508 509 510 511
2015-02-20  Paul Eggert  <eggert@cs.ucla.edu>

	Simplify binary I/O configuration
	* lread.c (Fload): Prefer FOPEN_TEXT and FOPEN_BINARY to #ifdef DOS_NT.
	* sysstdio.h: Add copyright notice.  Include <fcntl.h>.
	(FOPEN_BINARY, FOPEN_TEXT): New macros.
	* xfaces.c (Fx_load_color_file): Use FOPEN_TEXT, since POSIX
	doesn't guarantee that "t" will work.

512 513 514 515 516 517
2015-02-19  Eli Zaretskii  <eliz@gnu.org>

	* keyboard.c (read_char): Make sure this_single_command_key_start
	is in sync with this_command_key_count, around the call to
	input-method-function.  (Bug#19774)

518 519 520 521 522 523
2015-02-19  Fujii Hironori  <fujii.hironori@gmail.com>  (tiny change)

	* w32fns.c (w32_wnd_proc) <WM_IME_STARTCOMPOSITION>: Pass the
	message to DefWindowProc, after positioning the IME window, to
	trigger its display.  (Bug#11732)

524 525 526 527 528
2015-02-18  Eli Zaretskii  <eliz@gnu.org>

	* emacs.c (Fkill_emacs): Exit with specified exit code even if
	stdin is at EOF.  (Bug#19897)

529 530 531 532 533 534
2015-02-18  Oscar Fuentes <ofv@wanadoo.es>

	* keyboard.c (read_char): When there is an input method function,
	do not restore the echo area if a prefix argument is being
	introduced.  (Bug#19875)

535 536 537 538
2015-02-16  Kelly Dean  <kelly@prtime.org>

	* src/keyboard.c (timer_check_2): Fix incorrect comment.

539 540 541 542 543
2015-02-14  Martin Rudalics  <rudalics@gmx.at>

	* xterm.c (x_frame_normalize_before_maximize): Fix doc-string.
	Suggested by Alan Mackenzie <acm@muc.de>.

544 545 546 547 548
2015-02-14  Eli Zaretskii  <eliz@gnu.org>

	* menu.c (Fx_popup_menu) [HAVE_X_WINDOWS]: Call
	x_relative_mouse_position only for X frames.  (Bug#19862)

549 550 551 552 553 554 555
2015-02-13  Paul Eggert  <eggert@cs.ucla.edu>

	Better support for future plugins
	* lisp.h (DEFINE_LISP_SYMBOL): New macro, replacing and simplifying
	DEFINE_LISP_SYMBOL_BEGIN / DEFINE_LISP_SYMBOL_END.  All uses changed.
	(DEFINE_NONNIL_Q_SYMBOL_MACROS): New macro, defaulting to true.

556 557 558 559
2015-02-19  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* ftcrfont.c (ftcrfont_draw): Don't flush when drawing to screen.

560 561 562 563 564 565 566 567
2015-02-17  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* xterm.c [USE_CAIRO]: Include math.h.
	(enum corners) [USE_CAIRO]: New enum.
	(x_erase_corners_for_relief) [USE_CAIRO]: New function.
	(x_draw_relief_rect) [USE_CAIRO]: Use it.  If box width is larger
	than 1, draw the outermost line using the black relief.

568 569
2015-02-16  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

570 571 572 573 574 575
	* gtkutil.c (xg_page_setup_dialog, xg_get_page_setup, draw_page)
	(xg_print_frames_dialog): Modernize k&r declarations.

	* xfns.c (Fx_export_frames, Fx_page_setup_dialog, Fx_get_page_setup)
	(Fx_print_frames_dialog): Modernize k&r declarations.

576 577
	* xterm.c (x_draw_window_divider): Use x_fill_rectangle instead of
	XFillRectangle.
578 579
	(x_draw_horizontal_wave) [USE_CAIRO]: New function.
	(x_draw_underwave) [USE_CAIRO]: Use it.
580 581 582 583 584 585 586 587
	(x_gc_get_ext_data, x_extension_initialize, x_begin_cr_clip)
	(x_end_cr_clip, x_set_cr_source_with_gc_foreground)
	(x_set_cr_source_with_gc_background, x_cr_define_fringe_bitmap)
	(x_cr_destroy_fringe_bitmap, x_cr_draw_frame, x_cr_accumulate_data)
	(x_cr_destroy, x_cr_export_frames, x_prepare_for_xlibdraw)
	(x_set_clip_rectangles, x_reset_clip_rectangles, x_fill_rectangle)
	(x_draw_rectangle, x_clear_window, x_fill_trapezoid_for_relief)
	(x_clear_area): Modernize k&r declarations.
588 589 590
	(x_cr_draw_image, x_fill_rectangle, x_draw_rectangle)
	(x_fill_trapezoid_for_relief): Use int instead of unsigned int for
	width and height args.
591 592
	(x_draw_stretch_glyph_string): Call x_reset_clip_rectangles instead
	of XSetClipMask.
593
	(x_draw_relief_rect) [USE_CAIRO]: Reset clipping.
594
	(x_fill_trapezoid_for_relief): Remove unnecessary cairo_close_path.
595

596 597 598 599 600 601 602
2015-02-14  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* fringe.c (init_fringe_bitmap) [USE_CAIRO]: Adjust bitmap data for
	cairo image surface.

	* xterm.c (x_cr_define_fringe_bitmap): Call cairo_surface_mark_dirty.

Jan D's avatar
Jan D committed
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740
2015-02-11  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
	    Jan Djärv  <jan.h.d@swipnet.se>

	* xterm.h: Add include of cairo header files.
	(x_bitmap_record): Add img if cairo.
	(x_gc_ext_data): New struct for cairo.
	(x_display_info): Add ext_codes for cairo.
	(x_output): Add cr_context and cr_surface for cairo.
	(x_clear_area): Change arguments from Display*/Window to frame pointer.
	(x_query_color, x_begin_cr_clip, x_end_cr_clip)
	(x_set_cr_source_with_gc_foreground, x_set_cr_source_with_gc_background)
	(x_cr_draw_frame, x_cr_export_frames): Declare.

	* xterm.c (x_clear_area1, x_prepare_for_xlibdraw)
	(x_set_clip_rectangles, x_reset_clip_rectangles, x_fill_rectangle)
	(x_draw_rectangle, x_fill_trapezoid_for_relief, x_clear_window)
	(x_gc_get_ext_data, x_extension_initialize, x_cr_accumulate_data):
	Declare.
	(FRAME_CR_CONTEXT, FRAME_CR_SURFACE): New macros.
	(max_fringe_bmp, fringe_bmp): New variables.
	(x_gc_get_ext_data, x_extension_initialize)
	(x_cr_destroy_surface, x_begin_cr_clip, x_end_cr_clip)
	(x_set_cr_source_with_gc_foreground)
	(x_set_cr_source_with_gc_background, x_cr_define_fringe_bitmap)
	(x_cr_destroy_fringe_bitmap, x_cr_draw_image, x_cr_draw_frame)
	(x_cr_accumulate_data, x_cr_destroy, x_cr_export_frames)
	(x_prepare_for_xlibdraw, x_set_clip_rectangles)
	(x_reset_clip_rectangles, x_fill_rectangle, x_draw_rectangle)
	(x_clear_window, x_fill_trapezoid_for_relief): New functions.
	(x_update_begin): Create cairo surface if needed.
	(x_draw_vertical_window_border): Call x_fill_rectangle for cairo.
	(x_update_end): Paint cairo drawing surface to xlib surface.
	(x_clear_under_internal_border, x_after_update_window_line): Adjust
	arguments to x_clear_area.
	(x_draw_fringe_bitmap): Call x_fill_rectangle.  Get GC values and
	call x_cr_draw_image for cairo.  Call x_reset_clip_rectangles instead
	of XSetClipMask.
	(x_set_glyph_string_clipping)
	(x_set_glyph_string_clipping_exactly): Use x_set_clip_rectangles
	instead of XSetClipRectangles.
	(x_clear_glyph_string_rect, x_draw_glyph_string_background): Use
	x_fill_rectangle instead of XFillRectangle.
	(x_draw_glyph_string_foreground)
	(x_draw_composite_glyph_string_foreground)
	(x_draw_glyphless_glyph_string_foreground): Use x_draw_rectangle instead
	of XDrawRectangle.
	(x_draw_relief_rect): Add code for USE_CAIRO.
	Call x_reset_clip_rectangles instead of XSetClipMask.
	(x_draw_box_rect): x_set_clip_rectangles instead of XSetClipRectangles,
	x_fill_rectangle instead of XFillRectangle, x_reset_clip_rectangles
	instead of XSetClipMask.
	(x_draw_image_foreground, x_draw_image_foreground_1):
	x_draw_rectangle instead of XDrawRectangle.
	(x_draw_glyph_string_bg_rect): x_fill_rectangle instead of
	XFillRectangle.
	(x_draw_image_glyph_string): If img has cr_data, use it as
	a cairo surface.
	(x_draw_stretch_glyph_string): x_set_clip_rectangles instead of
	XSetClipRectangles, x_fill_rectangle instead of XFillRectangle.
	(x_draw_glyph_string): x_fill_rectangle instead of XFillRectangle.,
	x_reset_clip_rectangles instead of XSetClipMask.
	(x_shift_glyphs_for_insert): Call x_prepare_for_xlibdraw.
	(x_clear_area1): New function that calls XClearArea.
	(x_clear_area): Takes frame as parameter, calls x_clear_area1 for
	non-cairo.
	(x_clear_frame): x_clear_window instead of XClearWindow.
	(x_scroll_run): Set frame garbaged if cairo.
	(XTmouse_position): Initialize *part to 0.
	(x_scroll_bar_create): Adjust arguments to x_clear_area.
	(x_scroll_bar_set_handle): x_clear_area1 instead of x_clear_area,
	x_fill_rectangle instead of XFillRectangle.
	(XTset_vertical_scroll_bar, XTset_horizontal_scroll_bar): Adjust
	arguments to x_clear_area.
	(x_scroll_bar_expose): x_draw_rectangle instead of XDrawRectangle.
	(handle_one_xevent): Adjust arguments to x_clear_area.
	Destroy cairo surface for frame if ConfigureNotify.
	(x_clip_to_row): x_set_clip_rectangles instead of XSetClipRectangles.
	(x_draw_hollow_cursor): x_draw_rectangle instead of XDrawRectangle,
	x_reset_clip_rectangles instead of XSetClipMask.
	(x_draw_bar_cursor): x_fill_rectangle instead of XFillRectangle,
	x_reset_clip_rectangles instead of XSetClipMask.
	(x_clear_frame_area): Adjust arguments to x_clear_area.
	(x_free_frame_resources): Call x_prepare_for_xlibdraw.
	(x_term_init): Call x_extension_initialize if cairo.
	(x_redisplay_interface): Add x_cr_define_fringe_bitmap,
	x_cr_destroy_fringe_bitmap for cairo.
	(x_initialize): Call x_cr_init_fringe for cairo.

	* xfns.c: New section Printing.
	(x-export-frames, x-page-setup-dialog, x-get-page-setup)
	(x-print-frames-dialog): New printing functions.
	(Fx_create_frame, x_create_tip_frame): Register ftcrfont if
	cairo.
	(syms_of_xfns): Defsym Qorientation, Qtop_margin, Qbottom_margin,
	Qportrait, Qlandscape, Qreverse_portrait, Qreverse_landscape).
	(syms_of_xfns): Provide cairo and defvar cairo-version-string.
	defsubr Sx_page_setup_dialog, Sx_get_page_setup, Sx_print_frames_dialog.

	* image.c: Add defined (USE_CAIRO) for PNG.
	Add !defined USE_CAIRO for W32 PNG code.
	(x_clear_image): If cairo, destroy the surface in cr_data.
	(png_load): Add new cairo compatible implementation.
	(lookup_image_type): Add defined (USE_CAIRO) for define png_type.

	* gtkutil.h (xg_page_setup_dialog, xg_get_page_setup)
	(xg_print_frames_dialog): Declare.

	* gtkutil.c (xg_clear_under_internal_border)
	(xg_update_scrollbar_pos, xg_update_horizontal_scrollbar_pos): Only
	queue_draw if not cairo.  Change args to x_clear_area.
	(xg_get_font): Use Qftcr when using cairo, Qxft otherwise.
	(xg_page_setup_dialog, xg_get_page_setup, draw_page)
	(xg_print_frames_dialog): New functions for printing.

	* ftfont.h (ftfont_open2, ftfont_info_size): Declare.

	* ftfont.c (ftfont_info_size); New global variable.
	(ftfont_open2): New extern function almost the same as old ftfont_open,
	but takes the font_object as argument.
	(ftfont_open): Build font object and call ftfont_open2.

	* ftcrfont.c: New font driver for cairo, based on the ftfont driver.

	* fringe.c (x_cr_init_fringe): New function name that shares code
	with w32_init_fringe.

	* font.h (ftcrfont_driver, syms_of_ftcrfont): Declare

	* font.c (syms_of_font): Call syms_of_ftcrfont for cairo.

	* dispextern.h (struct image): Add cr_data for cairo.
	(x_cr_init_fringe): Declare.

	* Makefile.in (CAIRO_CFLAGS, CAIRO_LIBS): New variables.
	(FONT_OBJ): Add comment about ftcrfont.
	(ALL_CFLAGS): Add CAIRO_CFLAGS.
	(LIBES): Add CAIRO_LIBS.

741 742 743 744 745 746 747 748 749 750 751 752
2015-02-11  Martin Rudalics  <rudalics@gmx.at>

	* w32term.c (w32_read_socket): In SIZE_MAXIMIZED and
	SIZE_RESTORED cases correctly handle `maximized' value for the
	`fullscreen' parameter.  Don't use 'maximized' frame parameter
	any more.
	(w32fullscreen_hook): Include menu bar height when calculating
	new text height in FULLSCREEN_BOTH case.
	* xterm.c (do_ewmh_fullscreen): Handle transition from
	FULLSCREEN_BOTH to FULLSCREEN_MAXIMIZED when
	x_frame_normalize_before_maximize is set.

Paul Eggert's avatar
Paul Eggert committed
753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784
2015-02-10  Paul Eggert  <eggert@cs.ucla.edu>

	Use bool for boolean in xdisp.c
	* dispextern.h (display_prop_intangible_p, resize_mini_window)
	(pixel_to_glyph_coords, mark_window_display_accurate)
	(compute_display_string_pos, handle_tool_bar_click)
	(x_intersect_rectangles, clear_mouse_face, display_tty_menu_item):
	* lisp.h (setup_echo_area_for_printing, message_with_string)
	(pos_visible_p): Use bool for boolean.
	* xdisp.c: Use bool, true, false intstead of int, 1, 0.
	Remove unnecessary forward decls.
	(trace_move) [DEBUG_TRACE_MOVE]: Now static.
	(CHECK_IT, CHECK_WINDOW_END):
	Now an inline function that is always defined.
	(check_it) [0]:
	(check_window_end) [oGLYPH_DEBUG && ENABLE_CHECKING]:
	Remove; no longer needed.
	(handle_stop): Prefer (X && !Y) to (X ? !Y : 0).
	(get_overlay_strings): Omit unnecessary casts.
	(forward_to_next_line_start):
	(Ftool_bar_height):
	Prefer !BOOL to (BOOL ? 0 : 1).
	(next_element_function): New typedef.
	(get_next_element): Use it.  Now const.
	(IT_POS_VALID_AFTER_MOVE_P): Prefer !X || Y==0 to (X ? Y==0 : 1).
	(vmessage): Now ATTRIBUTE_FORMAT_PRINTF (1, 0), to pacify GCC 4.9.2
	(display_echo_area): Prefer BOOLEXPR to BOOLEXPR ? 1 : 0.
	(tool_bar_item_info): Simplify.
	(invisible_prop): Rename from invisible_p, since it doesn't
	return bool.  All callers changed.
	(x_produce_glyphs): Simplify.

Paul Eggert's avatar
Paul Eggert committed
785 786
2015-02-09  Paul Eggert  <eggert@cs.ucla.edu>

787 788 789 790 791 792
	Check for some overflows in vertical-motion
	* indent.c (window_column_x): New function.
	(Fvertical_motion): Use it to protect against integer overflow
	when computing column.  Prefer extract_float to doing things by hand.
	Avoid unnecessary casts.

Paul Eggert's avatar
Paul Eggert committed
793 794 795 796
	* xfont.c: Minor style fixes
	(xfont_list_pattern): Reindent to 80 cols and use Emacs-style comments.
	Redo loop so that less indentation is needed.

797 798 799 800
2015-02-09  Eli Zaretskii  <eliz@gnu.org>

	* indent.c (Fvertical_motion): Accept an additional argument
	CUR-COL and use it as the starting screen coordinate.
801 802
	* window.c (window_scroll_line_based, Fmove_to_window_line):
	All callers of vertical-motion changed.
803

Dima Kogan's avatar
Dima Kogan committed
804 805 806 807
2015-02-09  Dima Kogan  <dima@secretsauce.net>

	* font.c (font_score): Remove unused variable assignment.

808 809 810 811 812 813 814
2015-02-09  Dima Kogan  <dima@secretsauce.net>

	* xfaces.c (realize_basic_faces): Don't set Qscalable_fonts_allowed to
	t.
	* font.c (font_score): Try to find a font without scaling first,
	and only accept scalable fonts if we did not get a match (Bug#19117).

815 816 817 818
2015-02-09  Stefan Monnier  <monnier@iro.umontreal.ca>

	* keyboard.c (syms_of_keyboard): Use non-nil default value.

819 820
2015-02-09  Paul Eggert  <eggert@cs.ucla.edu>

821 822 823 824 825 826
	Use C99's INFINITY and NAN macros
	* lread.c: Include <math.h>.
	(string_to_number): Use INFINITY and NAN rather than rolling our own.
	This avoids some runtime diagnostics when building with
	gcc -fsanitize=undefined.

827 828 829 830
	Fix bidi_explicit_dir_char undefined behavior
	* bidi.c (bidi_explicit_dir_char): Avoid subscript error when
	argument is BIDI_EOB.  This can happen in bidi_level_of_next_char.

831 832 833 834 835 836 837 838
	Better distinguish infinite from invalid times
	* editfns.c (check_time_validity): New function.
	(decode_time_components): Return int, not bool.
	Return -1 (not 0) if the time is out of range.
	All callers changed.
	(lisp_time_struct, lisp_seconds_argument): Distinguish better
	between time overflow and invalid time values.

839 840 841 842 843 844 845 846 847
2015-02-08  Paul Eggert  <eggert@cs.ucla.edu>

	Minor tweaks to frame_size_history_add
	* frame.c (frame_size_history_add): Don't assume length fits in 'int'.
	Prefer XCAR and XCDR to Fcar and Fcdr when the arg is a cons.
	(Fframe_after_make_frame): Simplify.
	* gtkutil.c: Remove commented-out code.
	* xfns.c (Fx_create_frame): Fix indenting.

848 849 850 851 852 853
2015-02-08  Eli Zaretskii  <eliz@gnu.org>

	* frame.c (Fframe_parameter): Don't replace a non-nil value of
	foreground-color or background-color parameters with a nil value.
	(Bug#19802)

854 855 856 857 858
2015-02-08  Stefan Monnier  <monnier@iro.umontreal.ca>

	* data.c (Findirect_function): Like `symbol-function', don't signal an
	error for void functions any more.

859 860 861 862
2015-02-07  Martin Rudalics  <rudalics@gmx.at>

	* frame.c (frame_size_history_add): New function.
	(frame_inhibit_resize): Consider frame_inhibit_implied_resize
863 864 865
	only after frame's after_make_frame slot is true.
	Inhibit resizing fullwidth-/height frames in one direction only.
	Update frame_size_history.
866 867 868 869
	(adjust_frame_size): Call frame_size_history_add.
	(make_frame): Initalize after_make_frame slot.
	(Fmake_terminal_frame): Adjust adjust_frame_size call.
	(Fcan_run_window_configuration_change_hook): Rename to
870 871
	Fframe_after_make_frame.  Set after_make_frame slot.
	Return second argument.
872
	(x_set_frame_parameters): Postpone handling fullscreen parameter
873 874
	until after width and height parameters have been set.
	Apply width and height changes only if can_x_set_window_size is true.
875 876 877 878 879 880 881 882
	Update frame_size_history.
	(Qadjust_frame_size_1, Qadjust_frame_size_2)
	(Qadjust_frame_size_3, QEmacsFrameResize, Qframe_inhibit_resize)
	(Qx_set_fullscreen, Qx_check_fullscreen, Qx_set_window_size_1)
	(Qxg_frame_resized, Qxg_frame_set_char_size_1)
	(Qxg_frame_set_char_size_2, Qxg_frame_set_char_size_3)
	(Qxg_change_toolbar_position, Qx_net_wm_state)
	(Qx_handle_net_wm_state, Qtb_size_cb, Qupdate_frame_tool_bar)
883
	(Qfree_frame_tool_bar): New symbol for updating frame_size_history.
884 885
	(Qtip_frame, Qterminal_frame): New symbols.
	(Vframe_adjust_size_history): Rename to frame_size_history.
886 887
	* frame.h (struct frame):
	Rename can_run_window_configuration_change_hook slot to
888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911
	after_make_frame.
	(frame_size_history_add): Extern.
	* gtkutil.c (xg_frame_resized): Call frame_size_history_add.
	Don't set FRAME_PIXEL_WIDTH and FRAME_PIXEL_HEIGHT here.
	(xg_frame_set_char_size): Try to preserve the status of
	fullwidth/-height frames.  Call frame_size_history_add.
	(tb_size_cb, update_frame_tool_bar, free_frame_tool_bar)
	(xg_change_toolbar_position): Call frame_size_history_add.
	* w32fns.c (x_change_tool_bar_height): Handle frame's fullscreen
	status.
	(Fx_create_frame): Process fullscreen parameter after frame has
	been resized.
	(x_create_tip_frame): Pass Qtip_frame to adjust_frame_size.
	(Fx_frame_geometry): Don't pollute pure storage.
	* w32term.c (w32_read_socket): For WM_WINDOWPOSCHANGED,
	WM_ACTIVATE and WM_ACTIVATEAPP set frame's visibility before
	calling w32fullscreen_hook.  For WM_DISPLAYCHANGE call
	w32fullscreen_hook immediately.
	(x_fullscreen_adjust, x_check_fullscreen): Remove.
	(w32fullscreen_hook): Call change_frame_size just as with a
	"normal" frame resize operation.  Call do_pending_window_change.
	(x_set_window_size): Try to handle fullwidth and fullheight more
	accurately.  Don't rely on w32_enable_frame_resize_hack.
	(w32_enable_frame_resize_hack): Remove variable.
912 913 914 915
	* widget.c (EmacsFrameResize): Remove dead code.
	Call frame_size_history_add
	* window.c (run_window_configuration_change_hook):
	Check f->after_make_frame instead of
916 917 918 919 920
	f->can_run_window_configuration_change_hook.
	* xfns.c (x_change_tool_bar_height): Handle frame's fullscreen status.
	(Fx_create_frame): Process fullscreen parameter after frame has
	been resized.
	(Fx_frame_geometry): Don't pollute pure storage.
921 922
	* xterm.c (x_net_wm_state, x_handle_net_wm_state):
	Call frame_size_history_add.
923 924
	(do_ewmh_fullscreen): Handle x_frame_normalize_before_maximize.
	(x_check_fullscreen): Count in menubar when calling
925 926
	XResizeWindow.  Wait for ConfigureNotify event.
	Call frame_size_history_add.
927 928 929 930 931 932 933
	(x_set_window_size_1): Remove PIXELWISE argument.  Try to handle
	changing a fullheight frame's width or a fullwidth frame's
	height.  Call frame_size_history_add.
	(x_set_window_size): Simplify xg_frame_set_char_size and
	x_set_window_size_1 calls.
	(x_frame_normalize_before_maximize): New variable.

934 935 936 937 938 939 940 941 942
2015-02-07  Paul Eggert  <eggert@cs.ucla.edu>

	Remove no-longer-used cursor_in_echo_area code
	* dispnew.c (set_window_cursor_after_update, update_frame_1):
	Remove checks for negative cursor_in_echo_area, since this var is
	a boolean, and has been a boolean for some time.  Simplify.
	* dispnew.c (init_display):
	* xdisp.c (message3_nolog, vmessage): Use bool for boolean.

943 944 945 946 947
2015-02-05  Stefan Monnier  <monnier@iro.umontreal.ca>

	* eval.c (Ffunction): Handle the new (:documentation ...) form.
	(syms_of_eval): Declare `:documentation'.

948 949 950 951 952
2015-02-05  Martin Rudalics  <rudalics@gmx.at>

	* xdisp.c (Fwindow_text_pixel_size): Remove optional BUFFER
	argument added on 2015-02-01.

953 954 955 956 957 958 959 960
2015-02-04  Paul Eggert  <eggert@cs.ucla.edu>

	Remove no-longer-used two_byte_p calculations
	* dispextern.h (struct glyph_string): Remove member two_byte_p.
	All uses removed.
	* xdisp.c (get_glyph_face_and_encoding): Remove arg two_byte_p.
	All callers changed.

961 962 963 964 965 966
2015-02-03  Paul Eggert  <eggert@cs.ucla.edu>

	Omit unnecessary var if GTK or NS
	* frame.c, frame.h (frame_default_tool_bar_height) [USE_GTK||HAVE_NS]:
	Now a constant zero on these platforms.

967 968 969 970
2015-02-01  Martin Rudalics  <rudalics@gmx.at>

	* xdisp.c (Fwindow_text_pixel_size): Add optional argument BUFFER.

971 972 973 974 975 976 977 978 979
2015-01-31  Eli Zaretskii  <eliz@gnu.org>

	* coding.c (raw_text_coding_system_p): New function.

	* keyboard.c (read_decoded_event_from_main_queue): Use it when the
	keyboard coding-system is 'raw-text'.  (Bug#19532)

	* coding.h (raw_text_coding_system_p): Add prototype.

980 981 982 983 984 985
2015-01-31  Andreas Schwab  <schwab@linux-m68k.org>

	* Makefile.in (gl-stamp): Generate globals.h through the use of
	move-if-change.
	(globals.h): Replace with empty command.

986 987
2015-01-31  Eli Zaretskii  <eliz@gnu.org>

988 989 990 991
	* keyboard.c (kbd_buffer_store_event_hold): Ignore FOCUS_OUT_EVENT
	and ICONIFY_EVENT for the purposes of breaking while-no-input
	loops.  (Bug#19547)

992 993 994 995
	* dired.c (read_dirent): Correct the "MSDOS hacks" hack: the
	special code for errno = ENOENT or EACCES is needed for WINDOWSNT,
	not for MSDOS.

996 997 998 999 1000 1001 1002
2015-01-31  Paul Eggert  <eggert@cs.ucla.edu>

	Simplify read_dirent's MSDOS hacks
	* dired.c (read_dirent): Simplify by removing the need for the
	DIR_ENTRY argument.  All callers changed.  This separates the
	MS-DOS idiosyncrasies better from the rest of the code.

1003 1004 1005 1006 1007 1008 1009 1010 1011
2015-01-30  Eli Zaretskii  <eliz@gnu.org>

	* dired.c (read_dirent): Accept an additional argument
	FIRST_ENTRY.  If readdir fails with ENOENT or EACCES the first
	time it is called, report the error as if it happened in
	open_directory.
	(directory_files_internal, file_name_completion): Adjust callers
	or read_dirent.

1012 1013 1014 1015 1016 1017
2015-01-30  Paul Eggert  <eggert@cs.ucla.edu>

	Refactor calls to opendir for simplicity
	* dired.c (open_directory): Accept Lisp_Object, not char *, for
	dirname.  Signal an error if the open fails.  All callers changed.

Paul Eggert's avatar
Paul Eggert committed
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027
2015-01-29  Paul Eggert  <eggert@cs.ucla.edu>

	Report readdir failures
	Previously, on non-MS-Windows platforms the code treated most
	readdir failures as EOF.  This was incorrect, e.g., when readdir
	fails with errno == EOVERFLOW.  Signal an error instead.
	* dired.c (read_dirent):
	New function, which signals an error when readdir fails.
	(directory_files_internal, file_name_completion): Use it.

Paul Eggert's avatar
Paul Eggert committed
1028 1029
2015-01-29  Eli Zaretskii  <eliz@gnu.org>

1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040
	Use bool for boolean in w32menu.c, w32font.c, w32uniscribe.c.
	* w32uniscribe.c (uniscribe_list, uniscribe_match): Use bool where
	appropriate.

	* w32font.c (struct font_callback_data, w32font_list_internal)
	(w32font_driver, w32font_match_internal): Use bool where appropriate.

	* w32menu.c (x_activate_menubar, set_frame_menubar)
	(w32_dialog_show, initialize_frame_menubar, w32_menu_show)
	(is_simple_dialog): Use bool where appropriate.

1041 1042 1043 1044 1045 1046
2015-01-28  Paul Eggert  <eggert@cs.ucla.edu>

	Use bool, not int, to track face changes
	* xfaces.c (face_change): Rename from face_change_count, and
	change from int to bool.  The var is now true (instead of nonzero)
	if attributes have changed; this is simpler.  All uses changed.
Glenn Morris's avatar
Glenn Morris committed
1047 1048 1049 1050 1051 1052 1053
	(Bug#19698)

2015-01-28  Eli Zaretskii  <eliz@gnu.org>

	* dired.c (directory_files_internal, file_name_completion)
	[WINDOWSNT]: Signal an error when errno is set non-zero by
	'readdir', regardless of its value.
1054

Glenn Morris's avatar
Glenn Morris committed
1055 1056 1057 1058 1059 1060
	* w32.c (sys_readdir): Set errno to ENOENT when the directory
	doesn't exist and to EACCES when it's not accessible to the
	current user.  Set errno to zero when FindNextFile exhausts the
	directory, so that callers don't interpret that as an error and
	don't signal a file-error.
	(open_unc_volume): Set errno to ENOENT if WNetOpenEnum fails.
1061 1062 1063 1064 1065 1066 1067 1068

	* dired.c (directory_files_internal) [WINDOWSNT]: If readdir
	returns NULL and errno is ENOTDIR, behave as if opendir failed to
	open the directory.  (Bug#19701)

	* w32.c (sys_readdir): If FindFirstFile fails because the
	directory doesn't exist, set errno to ENOTDIR.

Glenn Morris's avatar
Glenn Morris committed
1069
2015-01-28  Jan Djärv  <jan.h.d@swipnet.se>
Jan D's avatar
Jan D committed
1070 1071 1072

	* nsterm.m (drawRect:): Add block/unblock_input (Bug#19660).

Glenn Morris's avatar
Glenn Morris committed
1073
2015-01-28  Paul Eggert  <eggert@cs.ucla.edu>
1074

Paul Eggert's avatar
Paul Eggert committed
1075 1076 1077 1078
	Fix coding.c subscript error
	* coding.c (CODING_ISO_INVOKED_CHARSET):
	Avoid undefined behavior if CODING_ISO_INVOCATION returns negative.

Glenn Morris's avatar
Glenn Morris committed
1079
2015-01-28  Eli Zaretskii  <eliz@gnu.org>
1080 1081 1082 1083 1084

	* xdisp.c (produce_image_glyph): Fix display of images in R2L
	screen lines: prepend the new glyph to the ones already there
	instead of appending it.

1085 1086 1087 1088 1089
	* w32fns.c (w32_set_title_bar_text): New function, including
	support for titles with non-ASCII characters outside of the
	current system codepage.
	(x_set_name, x_set_title): Use it.  (Bug#19590)

1090 1091 1092
	* indent.c (Fvertical_motion): Return zero if we started from ZV
	and there's an overlay after-string there.  (Bug#19553)

1093 1094 1095
	* emacs.c (usage_message): Fix the description of the -nl switch.
	(Bug#19542)

1096 1097 1098 1099 1100 1101
	* xdisp.c (move_it_to, try_cursor_movement): Don't use the window
	end information if the window_end_valid flag is unset.
	(try_window_id): If the call to display_line invalidated the
	window end information, give up the try_window_id optimization.
	(Bug#19511)

1102 1103 1104
	* w32fns.c (Fx_server_version, Fx_server_vendor): Doc fix.
	* xfns.c (Fx_server_version, Fx_server_vendor): Doc fix.

Glenn Morris's avatar
Glenn Morris committed
1105
	* emacs.c (syms_of_emacs) <system-configuration>: Doc fix.  (Bug#19502)
1106

1107 1108 1109 1110
2015-01-28  Stefan Monnier  <monnier@iro.umontreal.ca>

	* lisp.mk (lisp): Add cl-preloaded.

Paul Eggert's avatar
Paul Eggert committed
1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153
2015-01-27  Paul Eggert  <eggert@cs.ucla.edu>

	Use bool for boolean in xfaces.c
	* dispextern.h: Adjust to signature changes.
	* font.c (font_at, font_range):
	* fontset.c (Finternal_char_font):
	* fringe.c (draw_fringe_bitmap_1):
	* xdisp.c (handle_face_prop, face_before_or_after_it_pos)
	(get_next_display_element, highlight_trailing_whitespace)
	(display_string, calc_line_height_property)
	(note_mode_line_or_margin_highlight, note_mouse_highlight):
	* xfaces.c (tty_suppress_bold_inverse_default_colors_p)
	(menu_face_changed_default, recompute_basic_faces)
	(Fbitmap_spec_p, parse_rgb_list, tty_lookup_color)
	(tty_defined_color, defined_color, face_color_gray_p)
	(face_color_supported_p, load_color2, load_face_colors)
	(Fx_list_fonts, LFACEP, push_named_merge_point)
	(resolve_face_name, lface_from_face_name_no_resolve)
	(lface_from_face_name, get_lface_attributes_no_remap)
	(get_lface_attributes, lface_fully_specified_p)
	(set_lface_from_font, merge_face_vectors, merge_named_face)
	(merge_face_ref, Finternal_make_lisp_face)
	(Finternal_lisp_face_p, Finternal_copy_lisp_face)
	(Finternal_set_lisp_face_attribute)
	(update_face_from_frame_parameter, set_font_frame_param)
	(face_boolean_x_resource_value)
	(Finternal_set_lisp_face_attribute_from_resource)
	(x_update_menu_appearance, Finternal_get_lisp_face_attribute)
	(Finternal_merge_in_global_face, Fface_font, face_attr_equal_p)
	(lface_equal_p, Finternal_lisp_face_equal_p)
	(Finternal_lisp_face_empty_p, lface_same_font_attributes_p)
	(Fcolor_distance, lookup_named_face, lookup_basic_face)
	(lookup_derived_face, Fface_attributes_as_vector)
	(x_supports_face_attributes_p, tty_supports_face_attributes_p)
	(Fdisplay_supports_face_attributes_p, realize_basic_faces)
	(realize_default_face, realize_named_face)
	(realize_non_ascii_face, realize_x_face, map_tty_color)
	(realize_tty_face, compute_char_face, face_at_buffer_position)
	(face_for_overlay_string, face_at_string_position):
	Use bool for boolean.
	* xfaces.c (set_lface_from_font):
	Return void, since callers never use the result.

1154 1155 1156 1157 1158 1159 1160 1161 1162 1163
2015-01-26  Andreas Schwab  <schwab@linux-m68k.org>

	* image.c (lookup_pixel_color): Reorder conditions that are
	written backwards.
	(x_to_xcolors): Likewise.
	(x_detect_edges): Likewise.
	(png_load_body): Likewise.
	(gif_close): Likewise.
	(gif_load): Likewise.

1164 1165
2015-01-25  Eli Zaretskii  <eliz@gnu.org>

1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178
	Use bool for boolean in w32term.c
	* w32term.c (x_update_window_begin, x_update_window_end)
	(x_update_end, x_after_update_window_line)
	(x_set_glyph_string_gc, x_draw_glyph_string_background)
	(x_draw_glyph_string_foreground)
	(x_draw_composite_glyph_string_foreground)
	(x_draw_glyphless_glyph_string_foreground)
	(x_draw_image_glyph_string, x_draw_glyph_string)
	(x_draw_stretch_glyph_string, note_mouse_movement)
	(w32_mouse_position, x_scroll_bar_report_motion)
	(x_horizontal_scroll_bar_report_motion, w32_read_socket)
	(w32_set_vertical_scroll_bar, w32_set_horizontal_scroll_bar)
	(w32_draw_window_cursor, x_new_font, x_set_offset)
1179 1180
	(x_set_window_size, x_make_frame_invisible, x_iconify_frame):
	Use bool where appropriate.
1181

1182 1183 1184 1185 1186 1187 1188 1189
	Use bool for boolean in w32fns.c
	* w32fns.c (w32_defined_color, x_decode_color)
	(Fxw_color_defined_p, Fxw_color_values, x_set_icon_type)
	(x_set_menu_bar_lines, x_change_tool_bar_height)
	(x_set_internal_border_width, x_explicitly_set_name)
	(x_implicitly_set_name, Fx_create_frame, w32_window)
	(x_create_tip_frame, Fx_show_tip): Use bool where appropriate.

Paul Eggert's avatar
Paul Eggert committed
1190 1191
2015-01-25  Paul Eggert  <eggert@cs.ucla.edu>

Paul Eggert's avatar
Paul Eggert committed
1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209
	Use bool for boolean in xfns.c
	* xfaces.c (x_update_menu_appearance):
	* xfns.c (x_real_positions, x_defined_color, x_decode_color)
	(xg_set_icon, xg_set_icon_from_xpm_data, x_set_cursor_color)
	(x_set_icon_type, x_set_icon_name, x_set_menu_bar_lines)
	(x_change_tool_bar_height, x_set_internal_border_width)
	(x_encode_text, x_set_name_internal, x_explicitly_set_name)
	(x_implicitly_set_name, x_default_scroll_bar_color_parameter)
	(hack_wm_protocols, xic_create_fontsetname, xic_free_xfontset)
	(x_window, x_icon, Fx_wm_set_size_hint, Fx_create_frame)
	(Fxw_color_defined_p, Fxw_color_values, x_create_tip_frame)
	(Fx_show_tip, clean_up_file_dialog, Fx_file_dialog)
	(clean_up_dialog, syms_of_xfns):
	* xterm.h (xg_set_icon, xg_set_icon_from_xpm_data)
	(xic_create_fontsetname):
	Use bool for boolean.
	* xfns.c: Include bitmaps/gray.xbm unconditionally.

1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262
	Count MANY function args more reliably
	* alloc.c (Fgc_status, purecopy, unbind_to, garbage_collect_1):
	* buffer.c (Fbuffer_list, Fkill_buffer):
	* callint.c (read_file_name, Fcall_interactively):
	* charset.c (Fset_charset_priority, syms_of_charset):
	* chartab.c (uniprop_encode_value_numeric):
	* coding.c (syms_of_coding):
	* composite.c (syms_of_composite):
	* data.c (wrong_range):
	* dbusbind.c (syms_of_dbusbind):
	* dired.c (file_attributes):
	* editfns.c (Fdecode_time, update_buffer_properties, format2):
	* eval.c (run_hook_with_args_2, apply1, call1, call2, call3)
	(call4, call5, call6, call7):
	* fileio.c (Finsert_file_contents, choose_write_coding_system)
	(Fcar_less_than_car, build_annotations, auto_save_error):
	* filelock.c (get_boot_time):
	* fns.c (internal_equal, nconc2, Fyes_or_no_p, Fwidget_apply):
	(maybe_resize_hash_table, secure_hash):
	* font.c (font_style_to_value, font_open_by_name, Flist_fonts):
	* fontset.c (fontset_add, Fset_fontset_font):
	* ftfont.c (ftfont_lookup_cache):
	* gtkutil.c (xg_get_font):
	* insdel.c (signal_before_change, signal_after_change):
	* keymap.c (append_key):
	* lread.c (load_warn_old_style_backquotes, Fload, init_lread):
	* minibuf.c (Fread_buffer):
	* print.c (print_preprocess):
	* process.c (Fformat_network_address, Fmake_network_process)
	(server_accept_connection):
	* sound.c (Fplay_sound_internal):
	* term.c (Fsuspend_tty, Fresume_tty):
	* window.c (window_list):
	* xdisp.c (run_redisplay_end_trigger_hook, add_to_log)
	(message_with_string):
	* xfaces.c (Fx_list_fonts):
	* xfont.c (syms_of_xfont):
	* xselect.c (x_handle_selection_request)
	(x_handle_selection_clear, x_clear_frame_selections)
	(x_clipboard_manager_error_1):
	Prefer CALLMANY and CALLN to counting args by hand.
	* doc.c (reread_doc_file): Remove unused code.
	* fns.c (concat2, concat3): Redo to avoid need for local-var vector.
	(cmpfn_user_defined, hashfn_user_defined, Fmaphash):
	Prefer call1 and call2 to Ffuncall.
	* keyboard.c (safe_run_hook_funcall, safe_run_hooks):
	Use struct literal rather than a local var, for simplicity.
	* keymap.c (where_is_internal): Use NULL rather than a pointer
	to unused args.
	* lisp.h (CALLMANY, CALLN): New macros.
	* sound.c (Fplay_sound_internal): Coalesce duplicate code.
	Fixes: bug#19634

Paul Eggert's avatar
Paul Eggert committed
1263 1264 1265 1266 1267
	Use gnustep-config if available
	* emacs.c [NS_IMPL_GNUSTEP]: Don't include <GNUstepBase/GSConfig.h>.
	It doesn't appear to be needed, and the inclusion breaks on
	Ubuntu 14.10 when 'configure' uses 'gnustep-config'.

1268 1269 1270 1271
2015-01-22  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (init_iterator): Restore a comment lost in transition.

1272 1273
2015-01-22  Paul Eggert  <eggert@cs.ucla.edu>

1274 1275 1276 1277 1278 1279 1280 1281 1282
	Use bool for boolean in xfont.c, xftfont.c, xgselect.c
	* xfont.c (xfont_driver, xfont_chars_supported)
	(xfont_text_extents):
	* xftfont.c (xftfont_get_colors, xftfont_open)
	(xftfont_prepare_face, xftfont_done_face)
	(xftfont_cached_font_ok):
	* xgselect.c (xg_select):
	Use bool for boolean.

1283 1284 1285 1286
	Don't downcase system diagnostics' first letters
	* fileio.c (report_file_errno): Don't downcase, and simplify.
	Fixes: bug#19642

1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298
	Isolate NIL_IS_ZERO-assuming code better
	Suggested by Stefan Monnier in:
	http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00588.html
	* alloc.c (allocate_pseudovector):
	Use memclear, not memsetnil, to remove a 'verify'.
	* callint.c (Fcall_interactively):
	* dispnew.c (realloc_glyph_pool):
	* xdisp.c (init_iterator):
	Use memclear, not memset, to remove a 'verify'.
	* lisp.h (memclear): Rename from memsetnil, and take a byte
	count rather than a word count.  All callers changed.

1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313
2015-01-20  Paul Eggert  <eggert@cs.ucla.edu>

	Undo port to hypothetical nonzero Qnil case
	This mostly undoes the previous change in this area.  See:
	http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00570.html
	* alloc.c (allocate_pseudovector):
	* callint.c (Fcall_interactively):
	* dispnew.c (realloc_glyph_pool):
	* fringe.c (init_fringe):
	* lisp.h (memsetnil):
	* xdisp.c (init_iterator):
	Simplify by assuming that Qnil is zero, but verify the assumption.
	* lisp.h (NIL_IS_ZERO): Revert back to this symbol, removing
	NIL_IS_NONZERO.  All uses changed.

Jan Djärv's avatar
Jan Djärv committed
1314 1315 1316 1317
2015-01-20  Jan Djärv  <jan.h.d@swipnet.se>

	* nsterm.m (EV_TRAILER2): Set Vinhibit_quit to Qt (Bug#19531).

1318 1319 1320 1321 1322 1323 1324 1325
2015-01-20  Dmitry Antipov  <dmantipov@yandex.ru>

	Prefer xlispstrdup to avoid dumb calls to strlen.
	* nsfont.m (ns_get_family):
	* nsterm.m (ns_term_init):
	* w32fns.c (w32_window):
	* xfns.c (x_window, Fx_select_font): Use xlispstrdup.

1326 1327
2015-01-20  Paul Eggert  <eggert@cs.ucla.edu>

1328 1329 1330 1331
	Correct an old fix for GTK font selection
	* gtkutil.c (xg_get_font): Fix off-by-2 typo.
	Fixes: bug#3228

1332 1333 1334 1335 1336
	Fix minor bugs with printing null bytes
	* minibuf.c (read_minibuf_noninteractive):
	* xdisp.c (Ftrace_to_stderr) [GLYPH_DEBUG]:
	Work even if the Lisp string contains a null byte.

1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352
	Port to hypothetical case where Qnil is nonzero
	* alloc.c (allocate_pseudovector):
	* callint.c (Fcall_interactively):
	* coding.c (syms_of_coding):
	* dispnew.c (realloc_glyph_pool):
	* fringe.c (init_fringe):
	* lisp.h (memsetnil):
	* xdisp.c (init_iterator):
	Port to the currently-hypothetical case where Qnil is nonzero.
	* dispnew.c (adjust_glyph_matrix): Remove unnecessary verification,
	as there are no Lisp_Object values in the data here.
	* lisp.h (NIL_IS_NONZERO): New symbol, replacing NIL_IS_ZERO.
	All uses changed.  Define only if not already defined, so that one
	can debug with -DNIL_IS_NONZERO.
	* xdisp.c (init_iterator): Remove unnecessary initializations to 0.

1353 1354 1355 1356 1357 1358 1359 1360 1361 1362
2015-01-19  Eli Zaretskii  <eliz@gnu.org>

	* dispnew.c (adjust_glyph_matrix, realloc_glyph_pool): Verify that
	Qnil is represented as zero, before using that to initialize parts
	of the glyph structure.

	* xdisp.c (init_iterator): Verify that Qnil is represented as
	zero, before using that to initialize parts of the iterator
	structure.

1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388
2015-01-19  Paul Eggert  <eggert@cs.ucla.edu>

	Prefer memset to repeatedly assigning Qnil
	* alloc.c (allocate_pseudovector): Catch more bogus values.
	* alloc.c (allocate_pseudovector):
	* callint.c (Fcall_interactively):
	* coding.c (syms_of_coding):
	* fringe.c (init_fringe):
	Verify that Qnil == 0.
	* callint.c (Fcall_interactively):
	* eval.c (Fapply, Ffuncall):
	* fns.c (mapcar1, larger_vector):
	* font.c (font_expand_wildcards):
	* fringe.c (init_fringe):
	Prefer memset to assigning zeros by hand.
	* callint.c (Fcall_interactively):
	Remove duplicate assignment of Qnil to args[i].
	* coding.c (syms_of_coding):
	Prefer LISP_INITIALLY_ZERO to assigning zeros by hand.
	* fileio.c (Ffile_selinux_context):
	Rewrite to avoid need for Lisp_Object array.
	* lisp.h (XLI_BUILTIN_LISPSYM): New macro.
	(DEFINE_LISP_SYMBOL_END): Use it.
	(NIL_IS_ZERO): New constant.
	(memsetnil): New function.

1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405
2015-01-16  Dmitry Antipov  <dmantipov@yandex.ru>

	Tune pseudovector allocation assuming Qnil == 0.
	* alloc.c (allocate_pseudovector): Use memset for both
	Lisp_Objects and regular slots.  Add zerolen arg.
	* lisp.h (allocate_pseudovector): Adjust prototype.
	(ALLOCATE_PSEUDOVECTOR): Adjust user.
	(ALLOCATE_ZEROED_PSEUDOVECTOR): New macro.
	(allocate_hash_table, allocate_window, allocate_frame)
	(allocate_process, allocate_terminal): Remove prototypes.
	* fns.c (allocate_hash_table): Now static here.
	* frame.c (allocate_frame):
	* process.c (allocate_process):
	* terminal.c (allocate_terminal):
	* window.c (allocate_window): Now static here.
	Use ALLOCATE_ZEROED_PSEUDOVECTOR.  Add comment.

Dmitry Antipov's avatar
Dmitry Antipov committed
1406 1407 1408
	* lisp.h (XTERMINAL): Add eassert.
	* process.c (make_lisp_proc): Now static here.

1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419
	Prefer INLINE functions in font.h to match style used in lisp.h.
	* font.h (FONTP, FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P)
	(CHECK_FONT, CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT)
	(XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, CHECK_FONT_GET_OBJECT):
	Now functions.
	* font.c (Ffont_otf_alternates, Fquery_font, Ffont_get_glyphs):
	* ftfont.c (ftfont_shape):
	* macfont.m (macfont_shape):
	* w32uniscribe.c (uniscribe_shape):
	* xftfont.c (xftfont_shape): Adjust CHECK_FONT_GET_OBJECT users.

1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430
2015-01-16  Paul Eggert  <eggert@cs.ucla.edu>

	Give up on -Wsuggest-attribute=const
	* decompress.c (Fzlib_available_p):
	* gnutls.c (Fgnutls_available_p):
	* gtkutil.h (xg_uses_old_file_dialog):
	* xdisp.c (Ftool_bar_height):
	* xmenu.c (popup_activated):
	No longer const, since it's not const on at lest some
	configurations, and we shouldn't lie to the compiler.

1431 1432 1433 1434 1435 1436 1437
2015-01-15  Eli Zaretskii  <eliz@gnu.org>

	* fileio.c: Include binary-io.h.
	(Fset_binary_mode): New function.
	(syms_of_fileio): Defsubr it.
	(syms_of_fileio) <Qstdin, Qstdout, Qstderr>: DEFSYM them.

1438 1439 1440 1441 1442 1443 1444
2015-01-15  Teodor Zlatanov  <tzz@lifelogs.com>

	* gnutls.c (init_gnutls_functions): Import gnutls_x509_crt_check_issuer.
	(Fgnutls_peer_status): Use it to set the :self-signed flag.
	Rename the previous :self-signed to :unknown-ca. (Bug#19404)
	(Fgnutls_peer_status_warning_describe): Explain :unknown-ca flag.

1445 1446 1447 1448 1449
2015-01-14  Eli Zaretskii  <eliz@gnu.org>

	* w32fns.c (w32_wnd_proc): Ignore MENUITEMINFO's dwItemData data
	when FLAGS indicate the item is not highlighted.  (Bug#19596)

1450 1451 1452 1453
2015-01-14  Martin Rudalics  <rudalics@gmx.at>

	* xmenu.c (update_frame_menubar): Remove garbaged code.

1454 1455 1456 1457 1458 1459
2015-01-14  Paul Eggert  <eggert@cs.ucla.edu>

	remove_slash_colon need not be inline
	* process.c, process.h (remove_slash_colon): No longer inline.
	This saves text bytes without hurting runtime performance.

1460 1461 1462 1463 1464 1465 1466 1467
2015-01-14  Dmitry Antipov  <dmantipov@yandex.ru>

	Avoid extra multibyteness check in ENCODE_FILE users.
	* callproc.c (encode_current_directory, Fcall_process, call_process):
	* dired.c (directory_files_internal, file_name_completion):
	Do not check for STRING_MULTIBYTE because encode_file_name
	is a no-op for unibyte strings.

1468 1469 1470 1471
	* process.h (remove_slash_colon): New function.
	* callproc.c (encode_current_directory, call_process):
	* process.c (Fstart_process): Use it.

1472 1473 1474 1475 1476
	Consistently handle time zone specification.
	* editfns.c (decode_time_zone): New function, refactored out from ...
	(Fencode_time): ... adjusted user.
	(Fset_time_zone_rule): Use decode_time_zone.

1477 1478 1479 1480
	* editfns.c (make_buffer_string_both): If requested range intersects
	the gap, don't move the latter but copy in two regions, thus avoiding
	unnecessary relocation of buffer data.

1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502
2015-01-14  Paul Eggert  <eggert@cs.ucla.edu>

	Use bool for boolean in xmenu.c, xml.c
	* xmenu.c (x_menu_set_in_use, popup_get_selection)
	(Fx_menu_bar_open_internal, popup_widget_loop)
	(x_activate_menubar, xg_crazy_callback_abort)
	(update_frame_menubar, set_frame_menubar)
	(initialize_frame_menubar, free_frame_menubar)
	(create_and_show_popup_menu, x_menu_show)
	(create_and_show_dialog, x_dialog_show):
	* xml.c (libxml2_loaded_p, init_libxml2_functions, parse_region)
	(Flibxml_parse_html_region, Flibxml_parse_xml_region):
	* xrdb.c (main) [TESTRM]:
	* xsettings.c (init_gsettings):
	* xterm.c (XFillRectangle, xg_scroll_callback)
	(xg_end_scroll_callback):
	* xterm.h (x_menu_set_in_use) [USE_GTK || USE_MOTIF]:
	Use bool for boolean.
	* xmenu.c (TRUE): Remove; no longer used.
	(show_help_event): Remove long-unused code.
	(set_frame_menubar): Remove "#if 1" and corresponding "#endif" lines.

1503 1504
2015-01-13  Paul Eggert  <eggert@cs.ucla.edu>

1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515
	Don't say Fnext_read_file_uses_dialog_p is const
	It's const only if a windowing system is not used; don't say it's
	const otherwise.  See:
	http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00310.html
	* fileio.c (next_read_file_uses_dialog_p): Remove.
	Move guts back to ...
	(Fnext_read_file_uses_dialog_p): ... here.
	Don't declare as const, as make-docfile.c now has a special case
	for this function.  This is an ugly hack, but it's better than
	lying to the compiler.

1516 1517 1518 1519 1520
	Remove now-unnecessary forward XTYPE decl
	* lisp.h (XTYPE): Remove forward declaration.  The recent merge
	from emacs-24 fixed the problem in a better way, by moving XPNTR's
	definition to after XTYPE's.

1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559
2015-01-13  Eli Zaretskii  <eliz@gnu.org>

	Fix problems with 32-bit wide-int build exposed by MinGW.
	* lisp.h (XPNTR): Move definition to after XTYPE, to avoid
	compilation error in an unoptimized build when !USE_LSB_TAG.

	* w32heap.c (DUMPED_HEAP_SIZE): For 32-bit wide-int build, use the
	same larger value as for the 64-bit build.

	* w32term.h (SCROLL_BAR_PACK): Cast the result to UINT_PTR to
	avoid compiler warnings.

	* w32proc.c (Fw32_get_codepage_charset, Fw32_set_keyboard_layout):
	Avoid compiler warnings about cast from integer to pointer of
	different size.

	* w32menu.c (menubar_selection_callback, w32_menu_show): Cast to
	UINT_PTR instead of EMACS_INT, to avoid compiler warnings about
	casting from integer to pointer of different size.
	(add_menu_item): Pass the help-echo string as a pointer to
	Lisp_String, not as a Lisp_Object.
	(w32_menu_display_help): Use make_lisp_ptr to reconstruct a Lisp
	string object from its C pointer.

	* w32fns.c (w32_msg_pump) <WM_EMACS_UNREGISTER_HOT_KEY>: Use
	make_lisp_ptr instead of XIL, to reconstruct a Lisp_Cons from its
	C pointer.
	<WM_EMACS_TOGGLE_LOCK_KEY>: msg.lparam is now a C integer.
	(Fx_create_frame): Type-cast the result of XFASTINT to avoild
	compiler warnings about size differences.
	(Fw32_unregister_hot_key): Pass the tail of w32_grabbed_keys as a
	pointer to a Lisp_Cons struct, not as a disguised EMACS_INT.
	(Fw32_toggle_lock_key): Pass the new state of the key as a C
	integer; use -1 for nil.  Doc fix.

	* .gdbinit (xgetsym): New subroutine.
	(xsymname, xsymbol): Use it.
	(xprintsym): No need to call xgetptr.

1560 1561 1562 1563 1564
2015-01-13  Martin Rudalics  <rudalics@gmx.at>

	* frame.c (adjust_frame_size): Make sure new numbers of
	lines/columns get installed after font size change (Bug#19575).

1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584
2015-01-13  Dmitry Antipov  <dmantipov@yandex.ru>

	Add DEFUN attributes.
	* callint.c (Finteractive):
	* character.c (Fcharacterp, Fmax_char):
	* data.c (Feq, Fnull, Fconsp, Fatom, Flistp, Fnlistp, Fsymbolp)
	(Fstringp, Fchar_or_string_p, Fintegerp, Fnatnump, Fnumberp)
	(Ffloatp, Fbyteorder):
	* decompress.c (Fzlib_available_p):
	* fns.c (Fidentity):
	* frame.c (Fframe_windows_min_size):
	* gnutls.c (Fgnutls_error_p, Fgnutls_available_p):
	* window.c (Fwindow__sanitize_window_sizes):
	* xdisp.c (Ftool_bar_height):
	* xfaces.c (Fface_attribute_relative_p): Add const attribute.
	* emacs.c (Fkill_emacs):
	* eval.c (Fthrow):
	* keyboard.c (Ftop_level, Fexit_recursive_edit)
	(Fabor_recursive_edit): Add noreturn attribute.

1585 1586 1587 1588 1589 1590 1591 1592 1593
	* search.c (fast_string_match_internal): New function,
	consolidated from...
	(fast_string_match, fast_string_match_ignore_case): ...functions
	which are...
	* lisp.h (fast_string_match, fast_string_match_ignore_case):
	inlined from here now.
	(fast_string_match_internal): Add prototype.
	* dired.c (file_name_completion): Use fast_string_match_internal.

1594 1595 1596 1597 1598
	* fileio.c (next_read_file_uses_dialog_p): New workaround ...
	(Fnext_read_file_uses_dialog_p): ... called from here to avoid
	ATTRIBUTE_CONST dependency from #ifdefs.  For details, see
	http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00289.html.

1599 1600 1601 1602 1603 1604 1605 1606 1607
2015-01-12  Paul Eggert  <eggert@cs.ucla.edu>

	Port to 32-bit MingGW --with-wide-int
	Problem reported by Eli Zaretskii in:
	http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00265.html
	* lisp.h (struct Lisp_Sub_Char_Table): Check that offset matches
	what we think it is, rather than checking only its alignment (and
	doing so incorrectly on MinGW).

1608 1609 1610 1611 1612 1613 1614
2015-01-12  Dmitry Antipov  <dmantipov@yandex.ru>

	* fileio.c (Ffile_name_as_directory, Fdirectory_file_name):
	Remove dead NILP check.
	* image.c (Flookup_image): Use regular format for docstring.
	* keyboard.c (apply_modifiers_uncached): Use stpcpy.

1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648
2015-01-12  Martin Rudalics  <rudalics@gmx.at>

	* dispnew.c (change_frame_size_1): Pass Qchange_frame_size to
	adjust_frame_size.
	* frame.c (frame_default_tool_bar_height): New variable.
	(adjust_frame_size): Possibly add requested adjustment to
	Vframe_adjust_size_history.
	(make_frame): Initialize tool_bar_redisplayed_once slot.
	(Fset_frame_height, Fset_frame_width, Fset_frame_size): Clarify
	doc-string.  Call adjust_frame_size unconditionally (the frame's
	text size may remain unaltered but the pixel size may change).
	(x_figure_window_size): If frame_default_tool_bar_height was
	set, use it instead of calculating the tool bar height from
	DEFAULT_TOOL_BAR_IMAGE_HEIGHT.  Don't set
	Vframe_initial_frame_tool_bar_height.
	(Qchange_frame_size, Qxg_frame_set_char_size)
	(Qset_window_configuration, Qx_create_frame_1)
	(Qx_create_frame_2): New symbols.
	(Vframe_initial_frame_tool_bar_height): Remove.
	(Vframe_adjust_size_history): New history variable for debugging
	frame size adjustments.
	* frame.h (struct frame): New boolean slot
	tool_bar_redisplayed_once.
	(frame_default_tool_bar_height): Extern.
	* gtkutil.c (xg_frame_set_char_size): Pass Qxg_frame_set_char_size
	to adjust_frame_size.
	* nsfns.m (Fx_create_frame): Pass Pass Qx_create_frame_1 and
	Qx_create_frame_2 to adjust_frame_size.
	* w32fns.c (x_change_tool_bar_height): Call adjust_frame_size with
	inhibit 1 when we have not redisplayed the tool bar yet.
	(Fx_create_frame): Pass Pass Qx_create_frame_1 and
	Qx_create_frame_2 to adjust_frame_size.
	* w32menu.c (set_frame_menubar): Simplify adjust_frame_size
	call.
1649 1650
	* window.c (Fset_window_configuration):
	Pass Qset_window_configuration to adjust_frame_size.
1651 1652 1653 1654 1655 1656 1657 1658 1659 1660
	* xdisp.c (redisplay_tool_bar): Assign new height to
	frame_default_tool_bar_height.
	(redisplay_internal): If we haven't redisplayed this frame's
	tool bar, call redisplay_tool_bar early so we can adjust the
	frame size accordingly.
	* xfns.c (x_change_tool_bar_height): Call adjust_frame_size with
	inhibit 1 when we have not redisplayed the tool bar yet.
	(Fx_create_frame): Pass Pass Qx_create_frame_1 and
	Qx_create_frame_2 to adjust_frame_size.

1661 1662 1663