ChangeLog 685 KB
Newer Older
1 2 3 4 5
2015-02-28  Martin Rudalics  <rudalics@gmx.at>

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

6 7 8 9 10 11 12 13 14 15 16 17 18
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)

19 20 21 22 23 24 25 26 27 28 29 30
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.

31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
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.

51 52 53 54 55 56 57
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
58
2015-02-26  Eli Zaretskii  <eliz@gnu.org>
59 60 61

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

Paul Eggert's avatar
Paul Eggert committed
62
2015-02-26  Hans Wennborg  <hwennborg@google.com>  (tiny change)
63 64 65 66

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

Paul Eggert's avatar
Paul Eggert committed
67
2015-02-26  Eli Zaretskii  <eliz@gnu.org>
Eli Zaretskii's avatar
Eli Zaretskii committed
68 69 70 71

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

72 73 74 75
2015-02-26  Paul Eggert  <eggert@cs.ucla.edu>

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

76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
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.

98 99 100 101 102 103 104 105 106 107
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
108 109 110 111 112
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
113 114 115 116 117 118
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.

119 120 121 122 123 124 125
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")'.

126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
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.

155 156 157 158 159 160
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.

161 162 163 164 165 166 167 168 169
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.

170 171 172 173 174 175
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)

176 177 178 179 180 181
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)

182 183 184 185 186
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)

187 188 189 190 191 192
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)

193 194 195 196
2015-02-16  Kelly Dean  <kelly@prtime.org>

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

197 198 199 200 201
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>.

202 203 204 205 206
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)

207 208 209 210 211 212 213
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.

214 215 216 217 218 219 220 221 222 223 224 225
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
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
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
258 259
2015-02-09  Paul Eggert  <eggert@cs.ucla.edu>

260 261 262 263 264 265
	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
266 267 268 269
	* 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.

270 271 272 273 274 275 276
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.
	* window.c (window_scroll_line_based, Fmove_to_window_line): All
	callers of vertical-motion changed.

Dima Kogan's avatar
Dima Kogan committed
277 278 279 280
2015-02-09  Dima Kogan  <dima@secretsauce.net>

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

281 282 283 284 285 286 287
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).

288 289 290 291
2015-02-09  Stefan Monnier  <monnier@iro.umontreal.ca>

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

292 293
2015-02-09  Paul Eggert  <eggert@cs.ucla.edu>

294 295 296 297 298 299
	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.

300 301 302 303
	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.

304 305 306 307 308 309 310 311
	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.

312 313 314 315 316 317 318 319 320
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.

321 322 323 324 325 326
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)

327 328 329 330 331
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.

332 333 334 335
2015-02-07  Martin Rudalics  <rudalics@gmx.at>

	* frame.c (frame_size_history_add): New function.
	(frame_inhibit_resize): Consider frame_inhibit_implied_resize
336 337 338
	only after frame's after_make_frame slot is true.
	Inhibit resizing fullwidth-/height frames in one direction only.
	Update frame_size_history.
339 340 341 342
	(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
343 344
	Fframe_after_make_frame.  Set after_make_frame slot.
	Return second argument.
345
	(x_set_frame_parameters): Postpone handling fullscreen parameter
346 347
	until after width and height parameters have been set.
	Apply width and height changes only if can_x_set_window_size is true.
348 349 350 351 352 353 354 355
	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)
356
	(Qfree_frame_tool_bar): New symbol for updating frame_size_history.
357 358
	(Qtip_frame, Qterminal_frame): New symbols.
	(Vframe_adjust_size_history): Rename to frame_size_history.
359 360
	* frame.h (struct frame):
	Rename can_run_window_configuration_change_hook slot to
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384
	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.
385 386 387 388
	* 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
389 390 391 392 393
	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.
394 395
	* xterm.c (x_net_wm_state, x_handle_net_wm_state):
	Call frame_size_history_add.
396 397
	(do_ewmh_fullscreen): Handle x_frame_normalize_before_maximize.
	(x_check_fullscreen): Count in menubar when calling
398 399
	XResizeWindow.  Wait for ConfigureNotify event.
	Call frame_size_history_add.
400 401 402 403 404 405 406
	(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.

407 408 409 410 411 412 413 414 415
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.

416 417 418 419 420
2015-02-05  Stefan Monnier  <monnier@iro.umontreal.ca>

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

421 422 423 424 425
2015-02-05  Martin Rudalics  <rudalics@gmx.at>

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

426 427 428 429 430 431 432 433
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.

434 435 436 437 438 439
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.

440 441 442 443
2015-02-01  Martin Rudalics  <rudalics@gmx.at>

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

444 445 446 447 448 449 450 451 452
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.

453 454 455 456 457 458
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.

459 460
2015-01-31  Eli Zaretskii  <eliz@gnu.org>

461 462 463 464
	* 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)

465 466 467 468
	* dired.c (read_dirent): Correct the "MSDOS hacks" hack: the
	special code for errno = ENOENT or EACCES is needed for WINDOWSNT,
	not for MSDOS.

469 470 471 472 473 474 475
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.

476 477 478 479 480 481 482 483 484
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.

485 486 487 488 489 490
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
491 492 493 494 495 496 497 498 499 500
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
501 502
2015-01-29  Eli Zaretskii  <eliz@gnu.org>

503 504 505 506 507 508 509 510 511 512 513
	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.

514 515 516 517 518 519
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
520 521 522 523 524 525 526
	(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.
527

Glenn Morris's avatar
Glenn Morris committed
528 529 530 531 532 533
	* 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.
534 535 536 537 538 539 540 541

	* 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
542
2015-01-28  Jan Djärv  <jan.h.d@swipnet.se>
Jan D's avatar
Jan D committed
543 544 545

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

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

Paul Eggert's avatar
Paul Eggert committed
548 549 550 551
	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
552
2015-01-28  Eli Zaretskii  <eliz@gnu.org>
553 554 555 556 557

	* 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.

558 559 560 561 562
	* 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)

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

566 567 568
	* emacs.c (usage_message): Fix the description of the -nl switch.
	(Bug#19542)

569 570 571 572 573 574
	* 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)

575 576 577
	* 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
578
	* emacs.c (syms_of_emacs) <system-configuration>: Doc fix.  (Bug#19502)
579

580 581 582 583
2015-01-28  Stefan Monnier  <monnier@iro.umontreal.ca>

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

Paul Eggert's avatar
Paul Eggert committed
584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626
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.

627 628 629 630 631 632 633 634 635 636
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.

637 638
2015-01-25  Eli Zaretskii  <eliz@gnu.org>

639 640 641 642 643 644 645 646 647 648 649 650 651
	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)
652 653
	(x_set_window_size, x_make_frame_invisible, x_iconify_frame):
	Use bool where appropriate.
654

655 656 657 658 659 660 661 662
	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
663 664
2015-01-25  Paul Eggert  <eggert@cs.ucla.edu>

Paul Eggert's avatar
Paul Eggert committed
665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682
	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.

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
	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
736 737 738 739 740
	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'.

741 742 743 744
2015-01-22  Eli Zaretskii  <eliz@gnu.org>

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

745 746
2015-01-22  Paul Eggert  <eggert@cs.ucla.edu>

747 748 749 750 751 752 753 754 755
	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.

756 757 758 759
	Don't downcase system diagnostics' first letters
	* fileio.c (report_file_errno): Don't downcase, and simplify.
	Fixes: bug#19642

760 761 762 763 764 765 766 767 768 769 770 771
	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.

772 773 774 775 776 777 778 779 780 781 782 783 784 785 786
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
787 788 789 790
2015-01-20  Jan Djärv  <jan.h.d@swipnet.se>

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

791 792 793 794 795 796 797 798
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.

799 800
2015-01-20  Paul Eggert  <eggert@cs.ucla.edu>

801 802 803 804
	Correct an old fix for GTK font selection
	* gtkutil.c (xg_get_font): Fix off-by-2 typo.
	Fixes: bug#3228

805 806 807 808 809
	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.

810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825
	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.

826 827 828 829 830 831 832 833 834 835
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.

836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861
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.

862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878
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
879 880 881
	* lisp.h (XTERMINAL): Add eassert.
	* process.c (make_lisp_proc): Now static here.

882 883 884 885 886 887 888 889 890 891 892
	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.

893 894 895 896 897 898 899 900 901 902 903
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.

904 905 906 907 908 909 910
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.

911 912 913 914 915 916 917
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.

918 919 920 921 922
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)

923 924 925 926
2015-01-14  Martin Rudalics  <rudalics@gmx.at>

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

927 928 929 930 931 932
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.

933 934 935 936 937 938 939 940
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.

941 942 943 944
	* process.h (remove_slash_colon): New function.
	* callproc.c (encode_current_directory, call_process):
	* process.c (Fstart_process): Use it.

945 946 947 948 949
	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.

950 951 952 953
	* 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.

954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975
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.

976 977
2015-01-13  Paul Eggert  <eggert@cs.ucla.edu>

978 979 980 981 982 983 984 985 986 987 988
	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.

989 990 991 992 993
	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.

994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032
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.

1033 1034 1035 1036 1037
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).

1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057
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.

1058 1059 1060 1061 1062 1063 1064 1065 1066
	* 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.

1067 1068 1069 1070 1071
	* 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.

1072 1073 1074 1075 1076 1077 1078 1079 1080
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).

1081 1082 1083 1084 1085 1086 1087
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.

1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121
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.
1122 1123
	* window.c (Fset_window_configuration):
	Pass Qset_window_configuration to adjust_frame_size.
1124 1125 1126 1127 1128 1129 1130 1131 1132 1133
	* 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.

1134 1135 1136 1137 1138 1139 1140
2015-01-12  Paul Eggert  <eggert@cs.ucla.edu>

	Have 'make' output better GEN names
	* Makefile.in (gl-stamp, globals.h): Simplify by putting the new
	contents of globals.h into gl-stamp.  This lets us use AM_V_GEN
	more naturally so that 'make' can output more-accurate names.

1141 1142 1143 1144 1145 1146
2015-01-11  Stefan Monnier  <monnier@iro.umontreal.ca>

	* buffer.c (init_buffer_once): Initialize buffer_local_flags before
	calling reset_buffer_local_variables, and make sure we initialize
	it completely.

1147 1148 1149 1150
2015-01-11  Dmitry Antipov  <dmantipov@yandex.ru>

	* coding.c (Fcoding_system_plist): Use common style for docstring.

1151 1152 1153 1154 1155 1156 1157
2015-01-11  Paul Eggert  <eggert@cs.ucla.edu>

	Port to MSB hosts without optimization
	E.g., when configuring --with-wide-int CFLAGS='-O0' on x86,
	the inline function XTYPE needs to be declared before being used.
	* lisp.h (XTYPE): New forward declaration.

1158 1159
2015-01-10  Paul Eggert  <eggert@cs.ucla.edu>

Paul Eggert's avatar
Paul Eggert committed
1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181
	Port to 32-bit --with-wide-int
	Prefer symbol indexes to struct Lisp_Symbol * casted and then
	widened, as the latter had trouble with GCC on Fedora 21 when
	configured --with-wide-int and when used in static initializers.
	* alloc.c (garbage_collect_1, which_symbols):
	* lread.c (init_obarray):
	Prefer builtin_lisp_symbol when it can be used.
	* dispextern.h (struct image_type.type):
	* font.c (font_property_table.key):
	* frame.c (struct frame_parm_table.sym):
	* keyboard.c (scroll_bar_parts, struct event_head):
	* xdisp.c (struct props.name):
	Use the index of a builtin symbol rather than its address.
	All uses changed.
	* lisp.h (TAG_SYMPTR, XSYMBOL_INIT): Remove, replacing with ...
	(TAG_SYMOFFSET, SYMBOL_INDEX): ... new macros that deal with
	symbol indexes rather than pointers, and which work better on MSB
	hosts because they shift right before tagging.  All uses changed.
	(DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
	No longer noops on wide-int hosts, since they work now.
	(builtin_lisp_symbol): New function.

1182 1183 1184 1185 1186
	Port to HAVE_FREETYPE && !HAVE_XFT
	* dispextern.h (struct face.extra) [HAVE_FREETYPE && !HAVE_XFT]:
	* font.h (syms_of_xftfont) [HAVE_FREETYPE && !HAVE_XFT]:
	Declare in this case too.

1187 1188 1189 1190
2015-01-10  Eli Zaretskii  <eliz@gnu.org>

	* w32fns.c (Fw32_register_hot_key): Use XINT instead of XLI.

1191 1192
	* w32notify.c (Fw32notify_add_watch, w32_get_watch_object):
	Use make_pointer_integer instead of XIL.
1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207
	(Fw32notify_rm_watch): Use XINTPTR instead of XLI.

	* w32inevt.c (handle_file_notifications): Use make_pointer_integer
	instead of XIL.  Put a list of the descriptor, action, and file
	name in event->arg, instead of spreading them between event->code
	and event->arg.

	* w32term.c (queue_notifications): Use make_pointer_integer
	instead of XIL.  Put a list of the descriptor, action, and file
	name in event->arg, instead of spreading them between event->code
	and event->arg.

	* keyboard.c (kbd_buffer_get_event) [HAVE_W32NOTIFY]: Adjust Lisp
	event creation to changes in w32term.c and w32inevt.c above.

1208 1209
2015-01-09  Paul Eggert  <eggert@cs.ucla.edu>

1210 1211 1212 1213 1214 1215 1216 1217 1218
	Port Qnil==0 changes to 32-bit --with-wide-int
	* lisp.h (lisp_h_XSYMBOL, XSYMBOL): Assume USE_LSB_TAG in the
	macro-implemented version.  For the non-USE_LSB_TAG case, supply
	a new inline function that is the inverse of the new TAG_SYMPTR.
	(lisp_h_XUNTAGBASE, XUNTAGBASE): Remove.  All uses removed.
	(TAG_SYMPTR) [!USE_LSB_TAG]: If the pointer subtraction yields a
	negative number, don't allow sign bits to bleed into the encoded
	value.  Shift in zero bits instead.

1219 1220 1221 1222 1223 1224 1225
	Refactor pointer-to-integer conversion
	* gfilenotify.c (monitor_to_lisp, lisp_to_monitor):
	Rename and move to lisp.h.  All uses changed.
	* lisp.h (XINTPTR, make_pointer_integer): New inline functions,
	which are renamed from gfilenotify.c's lisp_to_monitor and
	monitor_to_lisp, and with more-generic void * signatures.

1226 1227
2015-01-08  Eli Zaretskii  <eliz@gnu.org>

1228 1229 1230 1231 1232
	* dispnew.c (buffer_posn_from_coords): Fix the value of the column
	returned for right-to-left screen lines.  (Before the change on
	2014-12-30, the incorrectly-computed X pixel coordinate concealed
	this bug.)

1233 1234 1235 1236 1237
	* .gdbinit (xsymname): New subroutine.
	(xprintsym, initial-tbreak): Use it to access the name of a symbol
	in a way that doesn't cause GDB to barf when it tries to
	dereference a NULL pointer.

1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258
	* xdisp.c (next_element_from_c_string): Use Lisp integer zero as
	the object.
	(set_cursor_from_row, try_cursor_movement, dump_glyph)
	(insert_left_trunc_glyphs, append_space_for_newline)
	(extend_face_to_end_of_line, highlight_trailing_whitespace)
	(find_row_edges, ROW_GLYPH_NEWLINE_P, Fmove_point_visually)
	(Fbidi_resolved_levels, produce_special_glyphs)
	(rows_from_pos_range, mouse_face_from_buffer_pos)
	(note_mouse_highlight): Use nil as the object for glyphs inserted
	by the display engine, and test with NILP instead of INTEGERP.
	(Bug#19535)

	* w32fns.c (Fx_show_tip): Use NILP to test for glyphs inserted by
	the display engine.

	* xfns.c (Fx_show_tip): Use NILP to test for glyphs inserted by
	the display engine.

	* dispextern.h (struct glyph, struct it): Update comments for the
	OBJECT members.

1259 1260
2015-01-08  Paul Eggert  <eggert@cs.ucla.edu>

1261 1262 1263 1264 1265 1266
	Port new Lisp symbol init to x86 --with-wide-int
	* lisp.h (DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END):
	Define to empty on platforms where EMACS_INT_MAX != INTPTR_MAX, as
	GCC (at least) does not allow a constant initializer to widen an
	address constant.

1267 1268 1269 1270 1271
	* lisp.h (TAG_SYMPTR): Don't do arithmetic on NULL.
	This is a followup to the "Port Qnil==0 XUNTAG to clang" patch.
	Although clang doesn't need it, some other compiler might, and
	it's easy enough to be safe.

1272 1273 1274
	* conf_post.h (ATTRIBUTE_ALLOC_SIZE): Port to clang 3.5.0.
	Apparently clang removed support for the alloc_size attribute.

Paul Eggert's avatar
Paul Eggert committed
1275 1276 1277 1278 1279 1280 1281
	Port Qnil==0 XUNTAG to clang
	clang has undefined behavior if the program subtracts an integer
	from (char *) 0.  Problem reported by YAMAMOTO Mitsuharu in:
	http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00132.html
	* lisp.h (lisp_h_XUNTAG) [USE_LSB_TAG]:
	(XUNTAG) [!USE_LSB_TAG]: Port to clang 3.5.0.

1282 1283 1284 1285 1286
	Port GFileMonitor * hack to Qnil==0 platforms
	Reported by Glenn Morris in: http://bugs.gnu.org/15880#112
	* gfilenotify.c (monitor_to_lisp, lisp_to_monitor): New functions.
	(dir_monitor_callback, Fgfile_add_watch, Fgfile_rm_watch): Use them.

1287 1288 1289 1290 1291
2015-01-06  Jan Djärv  <jan.h.d@swipnet.se>

	* nsterm.m (x_set_window_size): Call updateFrameSize to get real
	size instead of using widht/height.  The frame may be constrained.

1292 1293 1294 1295 1296 1297
2015-01-05  Paul Eggert  <eggert@cs.ucla.edu>

	* lisp.h (XSYMBOL): Parenthesize id in forward decl.
	Needed when neither optimizing nor inlining.
	Also, sort decls alphabetically.

1298 1299 1300 1301 1302 1303
2015-01-05  Eli Zaretskii  <eliz@gnu.org>

	* w32proc.c, w32.h, w32fns.c, w32font.c, w32menu.c, w32notify.c:
	* w32proc.c, w32select.c, w32term.c, w32uniscribe.c: Remove
	declarations of Q* variables that represent symbols.

1304 1305
2015-01-05  Paul Eggert  <eggert@cs.ucla.edu>

Paul Eggert's avatar
Paul Eggert committed
1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323
	Use 0 for Qnil
	Fixes Bug#15880.
	If USE_LSB_TAG, arrange for the representation of Qnil to be zero so
	that NILP (x) is equivalent to testing whether x is 0 at the
	machine level.  The overall effects of this and the previous patch
	shrink the size of the text segment by 2.3% and speeds up
	compilation of all the .elc files by about 0.5% on my platform,
	which is Fedora 20 x86-64.
	* lisp.h (lisp_h_XPNTR, lisp_h_XSYMBOL, lisp_h_XUNTAG)
	(make_lisp_symbol) [USE_LSB_TAG]:
	Symbols now tag the difference from lispsym, not the pointer.
	(lisp_h_XUNTAGBASE, TAG_SYMPTR): New macros.
	(Lisp_Int0, Lisp_Int1, Lisp_Symbol, Lisp_Misc, Lisp_String, Lisp_Cons):
	Renumber so that Lisp_Symbol is 0, so that Qnil is zero.
	(XSYMBOL): New forward decl.
	(XUNTAGBASE): New function.
	(XUNTAG): Use it.

1324 1325 1326 1327
	Compute C decls for DEFSYMs automatically
	Fixes Bug#15880.
	This patch also makes Q constants (e.g., Qnil) constant addresses
	from the C point of view.
Glenn Morris's avatar
Glenn Morris committed
1328
	* alloc.c, bidi.c, buffer.c, bytecode.c, callint.c, casefiddle.c:
1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357
	* casetab.c, category.c, ccl.c, charset.c, chartab.c, cmds.c, coding.c:
	* composite.c, data.c, dbusbind.c, decompress.c, dired.c, dispnew.c:
	* doc.c, editfns.c, emacs.c, eval.c, fileio.c, fns.c, font.c, fontset.c:
	* frame.c, fringe.c, ftfont.c, ftxfont.c, gfilenotify.c, gnutls.c:
	* image.c, inotify.c, insdel.c, keyboard.c, keymap.c, lread.c:
	* macfont.m, macros.c, minibuf.c, nsfns.m, nsfont.m, nsimage.m:
	* nsmenu.m, nsselect.m, nsterm.m, print.c, process.c, profiler.c:
	* search.c, sound.c, syntax.c, term.c, terminal.c, textprop.c, undo.c:
	* window.c, xdisp.c, xfaces.c, xfns.c, xftfont.c, xmenu.c, xml.c:
	* xselect.c, xsettings.c, xterm.c:
	Remove Q vars that represent symbols (e.g., Qnil, Qt, Qemacs).
	These names are now defined automatically by make-docfile.
	* alloc.c (init_symbol): New function.
	(Fmake_symbol): Use it.
	(c_symbol_p): New function.
	(valid_lisp_object_p, purecopy): Use it.
	* alloc.c (marked_pinned_symbols):
	Use make_lisp_symbol instead of make_lisp_ptr.
	(garbage_collect_1): Mark lispsym symbols.
	(CHECK_ALLOCATED_AND_LIVE_SYMBOL): New macro.
	(mark_object): Use it.
	(sweep_symbols): Sweep lispsym symbols.
	(symbol_uses_obj): New function.
	(which_symbols): Use it.  Work for lispsym symbols, too.
	(init_alloc_once): Initialize Vpurify_flag here; no need to wait,
	since Qt's address is already known now.
	(syms_of_alloc): Add lispsym count to symbols_consed.
	* buffer.c (init_buffer_once): Compare to Qnil, not to make_number (0),
	when testing whether storage is all bits zero.
Glenn Morris's avatar
Glenn Morris committed
1358
	* dispextern.h (struct image_type):
1359 1360 1361 1362 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 1389 1390 1391 1392 1393
	* font.c (font_property_table):
	* frame.c (struct frame_parm_table, frame_parms):
	* keyboard.c (scroll_bar_parts, struct event_head):
	* xdisp.c (struct props):
	Use XSYMBOL_INIT (Qfoo) and struct Lisp_Symbol * rather than &Qfoo and
	Lisp_Object *, since Qfoo is no longer an object whose address can be
	taken.  All uses changed.
	* eval.c (run_hook): New function.  Most uses of Frun_hooks changed to
	use it, so that they no longer need to take the address of a Lisp sym.
	(syms_of_eval): Don't use DEFSYM on Vrun_hooks, as it's a variable.
	* frame.c (syms_of_frame): Add defsyms for the frame_parms table.
	* keyboard.c (syms_of_keyboard): Don't DEFSYM Qmenu_bar here.
	DEFSYM Qdeactivate_mark before the corresponding var.
	* keymap.c (syms_of_keymap): Use DEFSYM for Qmenu_bar and Qmode_line
	instead of interning their symbols; this avoids duplicates.
	(LISP_INITIALLY, TAG_PTR)
	(DEFINE_LISP_SYMBOL_BEGIN, DEFINE_LISP_SYMBOL_END, XSYMBOL_INIT):
	New macros.
	(LISP_INITIALLY_ZERO): Use it.
	(enum symbol_interned, enum symbol_redirect, struct Lisp_Symbol)
	(EXFUN, DEFUN_ARGS_MANY, DEFUN_ARGS_UNEVALLED, DEFUN_ARGS_*):
	Move decls up, to avoid forward uses.  Include globals.h earlier, too.
	(make_lisp_symbol): New function.
	(XSETSYMBOL): Use it.
	(DEFSYM): Now just a placeholder for make-docfile.
	* lread.c (DEFINE_SYMBOLS): Define, for globals.h.
	(intern_sym): New function, with body taken from old intern_driver.
	(intern_driver): Use it.  Last arg is now Lisp integer, not ptrdiff_t.
	All uses changed.
	(define_symbol): New function.
	(init_obarray): Define the C symbols taken from lispsym.
	Use plain DEFSYM for Qt and Qnil.
	* syntax.c (init_syntax_once): No need to worry about
	Qchar_table_extra_slots.

1394 1395
2015-01-04  Paul Eggert  <eggert@cs.ucla.edu>

1396 1397 1398 1399 1400 1401 1402 1403 1404
	'temacs -nw' should not call missing functions
	Without this patch, "temacs -nw" fails with the diagnostic
	"emacs: Symbol's function definition is void: frame-windows-min-size"
	and messes up the tty's state.
	* frame.c (Fframe_windows_min_size): New placeholder function.
	(syms_of_frame): Define it.
	* window.c (Fwindow__sanitize_window_sizes): New placeholder.
	(syms_of_window): Define it.

Paul Eggert's avatar
Paul Eggert committed
1405 1406 1407 1408
	Less 'make' chatter for lisp dir
	* Makefile.in (%.elc): Adjust to compile-onefile change in
	../lisp/Makefile.in.

1409 1410 1411 1412 1413
	batch write-region no longer says "Wrote FOO"
	This cuts down on 'make' chatter a bit.
	* fileio.c (Fwrite_region):
	Don't output "Wrote /whatever/foo.elc" if noninteractive.

Paul Eggert's avatar
Paul Eggert committed
1414 1415
2015-01-03  Paul Eggert  <eggert@cs.ucla.edu>

1416 1417 1418
	Revert previous change to produce_composite_glyph
	* term.c (produce_composite_glyph): Revert previous change (Bug#19496).

Paul Eggert's avatar
Paul Eggert committed
1419 1420 1421
	Pacify gcc -Wparentheses
	* frame.c (x_set_frame_parameters): Add parens (Bug#19428).

1422 1423 1424 1425 1426 1427 1428
2015-01-03  Martin Rudalics  <rudalics@gmx.at>

	* frame.c (x_set_frame_parameters): Call Fset_frame_size only if
	f->can_x_set_window_size is true.
	* xterm.c (x_set_window_size_1): Call change_frame_size with
	text sizes instead of pixel sizes (Bug#19428).

Paul Eggert's avatar
Paul Eggert committed
1429
2015-01-01  Eli Zaretskii  <eliz@gnu.org>
1430 1431 1432 1433

	* xdisp.c (pos_visible_p): Fix up the X coordinate for
	right-to-left screen lines.  (Bug#19473)

Paul Eggert's avatar
Paul Eggert committed
1434
2015-01-01  Eli Zaretskii  <eliz@gnu.org>
1435 1436 1437

	* w32proc.c (Fw32_get_codepage_charset): Doc fix.  (Bug#19458)

1438 1439 1440 1441 1442 1443 1444 1445 1446
2014-12-31  Paul Eggert  <eggert@cs.ucla.edu>

	Simplify setfattr use by assuming GNU make
	* Makefile.in (PAXCTL_if_present, SETFATTR_if_present): New macros.
	(emacs$(EXEEXT), temacs$(EXEEXT), bootstrap-emacs$(EXEEXT)): Use them.
	Simplify by using GNU make rather than shell conditionals,
	by using ln -f rather than rm -f followed by ln,
	and by preferring $@ to spelling out the destination.

Eli Zaretskii's avatar
Eli Zaretskii committed
1447 1448 1449 1450 1451
2014-12-29  Eli Zaretskii  <eliz@gnu.org>

	* sysdep.c [WINDOWSNT]: Include sys/socket.h, without which this
	file doesn't compile on MS-Windows.

Glenn Morris's avatar
Glenn Morris committed
1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469
2014-12-29  Paul Eggert  <eggert@cs.ucla.edu>

	Allow return value of system-name to vary.  (Bug#19438)
	* filelock.c (current_lock_owner):
	* xrdb.c (get_environ_db):
	* xterm.c (same_x_server):
	* xterm.c (x_term_init):
	Prefer (system-name) to system-name, and avoid naming
	locals 'system-name'.
	* editfns.c (cached_system_name): New static var.
	(init_and_cache_system_name): New function.
	(init_editfns, Fsystem_name): Use it.
	(syms_of_editfns): Initialize it and Vsystem_name to the same value.
	* sysdep.c [HAVE_SOCKETS]: Don't include <sys/socket.h>, <netdb.h>.
	(h_errno) [TRY_AGAIN && !HAVE_H_ERRNO]: Remove decl.
	(init_system_name) [HAVE_SOCKETS]: Don't canonicalize the name.
	Don't create a new string if the current value is already correct.

Paul Eggert's avatar
Paul Eggert committed
1470 1471 1472 1473 1474 1475
2014-12-28  Paul Eggert  <eggert@cs.ucla.edu>

	Fix produce_composite_width typo
	* term.c (produce_composite_glyph):
	Fix typo that confused number of columns for pixel width.

1476 1477
2014-12-28  Paul Eggert  <eggert@Penguin.CS.UCLA.EDU>

Paul Eggert's avatar
Paul Eggert committed
1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491
	Wrap dll functions more simply
	* decompress.c, gnutls.c, image.c, xml.c:
	If WINDOWSNT, use '#define FOO fn_FOO' to wrap dll functions,
	rather than the inverse when not WINDOWSNT.  This isolates the
	fn_* business into the WINDOWSNT-specific section of the code,
	which makes it easier to maintain the generic code.
	* decompress.c (DEF_ZLIB_FN, LOAD_ZLIB_FN):
	* gnutls.c (DEF_GNUTLS_FN, LOAD_GNUTLS_FN):
	* image.c (DEF_IMGLIB_FN, LOAD_IMGLIB_FN):
	* xml.c (DEF_XML2_FN, LOAD_XML2_FN):
	Remove.  All uses replaced by DEF_DLL_FN.
	* decompress.c (inflateInit2): Remove; no longer needed.
	* w32.h (DEF_DLL_FN, LOAD_DLL_FN): New macros.

1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502
	Port memory-full checking to GnuTLS 3.3
	Instead of using gnutls_global_set_mem_functions, check every call
	to a GnuTLS function that might return an indication of memory
	exhaustion.  Suggested by Dmitry Antipov in:
	http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg02056.html
	* gnutls.c (gnutls_global_set_mem_functions) [WINDOWSNT]: Remove.
	(init_gnutls_functions): Do not load gnutls_global_set_mem_functions.
	(fn_gnutls_global_set_mem_functions) [!WINDOWSNT]: Remove.
	All uses removed.
	(check_memory_full): New function.
	(emacs_gnutls_handshake, emacs_gnutls_handle_error)
Paul Eggert's avatar
Paul Eggert committed
1503 1504
	(gnutls_make_error, gnutls_certificate_details, Fgnutls_peer_status)
	(Fgnutls_boot): Use it.
1505 1506
	(emacs_gnutls_global_init): Avoid gnutls_global_set_mem_functions.

1507 1508 1509 1510 1511 1512 1513 1514
2014-12-27  Paul Eggert  <eggert@cs.ucla.edu>

	Fix parse_settings to match internal documentation
	* xsettings.c (parse_settings): Return the number of settings seen.
	Count the settings changes accurately.
	(read_settings): Don't confuse number of settings changes with
	the return code from XGetWindowProperty.

1515
2014-12-27  Eli Zaretskii  <eliz@gnu.org>
1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527

	* xdisp.c (set_iterator_to_next) <GET_FROM_STRING>: Limit search in
	composition_compute_stop_pos to the number of characters in the
	string.  (Bug#19435)
	<GET_FROM_BUFFER, GET_FROM_STRING>: Simplify code.

	* composite.c (composition_compute_stop_pos): If no composition
	was found in a string before ENDPOS, and ENDPOS is the string end,
	no need to back up to a safe point.

	* dispextern.h (struct it) <end_charpos>: Improve commentary.

1528
2014-12-27  Jan Djärv  <jan.h.d@swipnet.se>
1529 1530 1531 1532 1533

	* nsimage.m (allocInitFromFile:): Initialize bmRep.
	(dealloc): Release bmRep.
        (setPixmapData): Make bmRep local so class member is not
        set (Bug#19133).
Jan D's avatar
Jan D committed
1534 1535
	(setPixmapData): Rename local variable bmRep to avoid compiler
	warning.
1536

1537
2014-12-27  Jan Djärv  <jan.h.d@swipnet.se>
Jan D's avatar
Jan D committed
1538 1539 1540

	* xterm.c (do_ewmh_fullscreen): Don't remove maximized_horz/vert
	when going to fullscreen (Bug#0x180004f).
1541

1542 1543 1544 1545
2014-12-27  Eli Zaretskii  <eliz@gnu.org>

	* window.c (Fwindow_body_width): Doc fix.  (Bug#19395)

1546
2014-12-27  Stefan Monnier  <monnier@iro.umontreal.ca>
1547 1548 1549

	* buffer.c (syms_of_buffer) <Vafter_change_functions>: fix docstring.

1550
2014-12-27  Eli Zaretskii  <eliz@gnu.org>
1551 1552 1553

	* gnutls.c (gnutls_init): Fix deprecation warning from GCC.

1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577
2014-12-26  Paul Eggert  <eggert@cs.ucla.edu>

	Use bool for boolean in xselect.c, xsettings.c
	* xselect.c (x_get_local_selection, struct selection_data)
	(x_selection_request_lisp_error, struct prop_location)
	(x_handle_selection_request, x_convert_selection)
	(waiting_for_other_props_on_window, expect_property_change)
	(wait_for_property_change, x_handle_property_notify)
	(x_get_foreign_selection, x_get_window_property)
	(receive_incremental_selection)
	(x_get_window_property_as_lisp_data)
	(lisp_data_to_selection_data, Fx_get_selection_internal)
	(x_send_client_event):
	* xselect.c, xterm.h (x_handle_dnd_message):
	* xsettings.c (dpyinfo_valid, parse_settings, read_settings)
	(apply_xft_settings, read_and_apply_settings)
	(xft_settings_event, init_gsettings, init_xsettings)
	(syms_of_xsettings):
	Use bool for boolean.
	* xselect.c (x_get_window_property): Omit last arg, which was an
	unused boolean.
	* xsettings.c (apply_xft_settings): Remove 2nd arg, which was
	always true.  All callers changed.

1578 1579 1580 1581 1582 1583 1584 1585 1586 1587
2014-12-26  Eli Zaretskii  <eliz@gnu.org>

	* w32proc.c (sys_spawnve, get_lcid_callback): Use strcpy instead
	of strcat.

	* w32menu.c (add_menu_item): Use stpcpy instead of strcat.

	* w32.c (sys_readdir, stat_worker, symlink): Use strcpy instead of
	strcat.

Paul Eggert's avatar
Paul Eggert committed
1588 1589 1590 1591 1592 1593 1594 1595 1596
2014-12-26  Paul Eggert  <eggert@cs.ucla.edu>

	Use bool for boolean in xsmfns.c
	* xsmfns.c, xterm.h (x_session_have_connection):
	* xsmfns.c (doing_interact, smc_interact_CB, Fhandle_save_session):
	Use bool for boolean.
	(x_session_initialize, Fhandle_save_session):
	Prefer NILP (x) to EQ (x, Qnil).

Glenn Morris's avatar
Glenn Morris committed
1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614
2014-12-25  Paul Eggert  <eggert@cs.ucla.edu>

	* callproc.c (child_setup):
	* dbusbind.c (xd_signature_cat):
	* doc.c (get_doc_string, Fsnarf_documentation):
	* editfns.c (Fuser_full_name):
	* frame.c (xrdb_get_resource):
	* gtkutil.c (xg_get_file_with_chooser):
	* tparam.c (tparam1):
	* xfns.c (xic_create_fontsetname):
	* xrdb.c (gethomedir, get_user_db, get_environ_db):
	* xsmfns.c (smc_save_yourself_CB):
	Rewrite to avoid the need for strcat, typically by using stpcpy
	and/or lispstpcpy.  strcat tends to be part of O(N**2) algorithms.
	* doc.c (sibling_etc):
	* xrdb.c (xdefaults):
	Now a top-level static constant.

Didier Verna's avatar
Didier Verna committed
1615 1616 1617 1618 1619
2014-12-23  Didier Verna  <didier@didierverna.net> (tiny change).

	* nsselect.m (Fns_selection_owner_p): Return a Lisp boolean, not a
	C one (Bug#19396).

1620 1621 1622 1623 1624
2014-12-22  Jan Djärv  <jan.h.d@swipnet.se>

	* xterm.c (x_bitmap_icon): Partly revert change from 2014-03-21 which
	breaks icon setting for Gtk+ except for initial frame (Bug#19403).

Paul Eggert's avatar
Paul Eggert committed
1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671
2014-12-22  Paul Eggert  <eggert@cs.ucla.edu>

	Use bool for boolean in xterm.c
	* frame.h, nsterm.m, w32term.c, w32term.h, xterm.c:
	(x_set_window_size, x_bitmap_icon):
	* nsterm.m (ns_frame_raise_lower, x_new_font):
	* termhooks.h (struct terminal.toggle_invisible_pointer_hook)
	(struct terminal.frame_raise_lower_hook):
	* w32term.c (w32_frame_raise_lower):
	* xterm.c, xterm.h (x_text_icon):
	* xterm.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_alloc_lighter_color, x_draw_relief_rect)
	(x_draw_glyph_string_box, x_draw_image_relief)
	(x_draw_image_glyph_string, x_draw_stretch_glyph_string)
	(x_draw_underwave, x_draw_glyph_string, x_show_hourglass)
	(x_hide_hourglass):
	(XFillRectangle) [HAVE_GTK3]:
	(XTtoggle_invisible_pointer, frame_highlight, frame_unhighlight)
	(x_focus_changed, x_find_modifier_meanings, note_mouse_movement)
	(XTmouse_position, xt_action_hook, xt_horizontal_action_hook)
	(x_send_scroll_bar_event, xm_scroll_callback)
	(xg_scroll_callback, xaw_jump_callback, xaw_scroll_callback)
	(x_create_toolkit_scroll_bar)
	(x_create_horizontal_toolkit_scroll_bar)
	(x_set_toolkit_horizontal_scroll_bar_thumb, x_scroll_bar_create)
	(x_scroll_bar_set_handle, XTset_vertical_scroll_bar)
	(XTset_horizontal_scroll_bar, x_scroll_bar_expose)
	(x_scroll_bar_handle_click, x_scroll_bar_note_movement)
	(x_scroll_bar_report_motion)
	(x_horizontal_scroll_bar_report_motion, x_net_wm_state)
	(handle_one_xevent, XTread_socket, x_draw_bar_cursor)
	(x_draw_window_cursor, x_clear_errors)
	(x_trace_wire, x_new_font, x_set_offset, wm_supports)
	(set_wm_state, x_set_sticky, get_current_wm_state)
	(do_ewmh_fullscreen, x_handle_net_wm_state)
	(x_check_expected_move, x_sync_with_move, x_wait_for_event)
	(x_set_window_size_1, XTframe_raise_lower)
	(x_make_frame_visible, x_iconify_frame)
	(x_timeout_atimer_activated_flag, same_x_server, x_display_ok)
	(x_term_init, x_process_timeouts, x_activate_timeout_atimer)
	(x_delete_terminal, x_initialize, syms_of_xterm):
	Use bool for boolean.

1672 1673
2014-12-20  Paul Eggert  <eggert@cs.ucla.edu>

1674 1675 1676
	* composite.h (struct composition.width): Now int
	instead of unsigned short, as we prefer signed integers.

1677 1678 1679 1680 1681 1682
	Let charset tick grow past USHRT_MAX
	* charset.c, charset.h (charset_ordered_list_tick):
	Now EMACS_UINT, not unsigned short.
	* fontset.c (reorder_font_vector): Allow the tick to grow to the
	maximum representable Emacs integer value before wrapping it around.

1683 1684 1685 1686 1687 1688 1689 1690 1691
	Simplify unexec file mode setting
	* unexaix.c, unexcoff.c, unexelf.c, unexmacosx.c:
	Don't include <sys/stat.h> when no longer needed.
	(unexec): Create file with correct mode in the first place,
	rather than overwriting the mode later and fiddling with the
	global umask in the mean time.  Avoid bogus usage like
	'umask (777)', which should have been 'umask (0777)'.
	(mark_x): Remove. All callers removed.

1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707
2014-12-19  Paul Eggert  <eggert@cs.ucla.edu>

	Minor cleanups for Lisp objects and symbols
	* alloc.c (next_vector, set_next_vector):
	* lisp.h (lisp_h_INTEGERP, make_number, XFASTINT, make_natnum):
	(lisp_h_make_number) [USE_LSB_TAG]:
	Use Lisp_Int0 instead of the mystery constant 0.
	* alloc.c (mark_object): Always set and use po; that's simpler.
	(CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE):
	Properly parenthesize definientia.
	* bidi.c (bidi_initialize):
	* buffer.c (init_buffer_once):
	* nsfns.m (syms_of_nsfns):
	* nsmenu.m (syms_of_nsmenu):
	* nsselect.m (syms_of_nsselect):
	Prefer DEFSYM to defining by hand.
1708
	* buffer.c (syms_of_buffer): Omit unneeded staticpros.
1709 1710 1711 1712 1713 1714 1715 1716
	* data.c: Fix too-long line.
	* lisp.h (DECLARE_GDB_SYM): New macro.
	(DEFINE_GDB_SYMBOL_BEGIN): Use it.
	(DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END) [!MAIN_PROGRAM]:
	Declare the symbol, so it's visible to everywhere lisp.h is included.
	Move forward decls as far forward as they can go,
	to allow future changes to use them.