ChangeLog 346 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
2011-12-04  Andreas Schwab  <schwab@linux-m68k.org>

	* emacs.c (Qkill_emacs): Define.
	(syms_of_emacs): Initialize it.
	* keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
	Qquit_flag to `kill-emacs' instead.
	(quit_throw_to_read_char): Add parameter `from_signal'.  All
	callers changed.  Call Fkill_emacs if requested and safe.
	* lisp.h (QUIT): Call Fkill_emacs if requested.

11 12 13 14 15 16 17 18 19 20
2011-12-03  Jan Djärv  <jan.h.d@swipnet.se>

	* widget.c (update_wm_hints): Return if wmshell is null.
	(widget_update_wm_size_hints): New function.

	* widget.h (widget_update_wm_size_hints): Declare.

	* xterm.c (x_wm_set_size_hint): If USE_X_TOOLKIT, call
	widget_update_wm_size_hints (Bug#10104).

21 22 23 24 25
2011-12-03  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (handle_invisible_prop): If the invisible text ends just
	before a newline, prepare the bidi iterator for consuming the
	newline, and keep the current paragraph direction.  (Bug#10183)
26
	(redisplay_window): Don't let `margin' become negative.  (Bug#10192)
27

28 29 30 31 32 33 34 35 36
2011-12-02  Juri Linkov  <juri@jurta.org>

	* search.c (Fword_search_regexp): New Lisp function created from
	`wordify'.  Change type of arg `lax' from `int' to `Lisp_Object'.
	(Fword_search_backward, Fword_search_forward)
	(Fword_search_backward_lax, Fword_search_forward_lax):
	Use `Fword_search_regexp' instead of `wordify'.  Doc fix.
	(syms_of_search): Define `Sword_search_regexp'.  (Bug#10145)

37 38 39 40 41 42 43
2011-12-01  Stefan Monnier  <monnier@iro.umontreal.ca>

	* fileio.c (Finsert_file_contents): Move after-change-function call
	to before the "handled:" label, since all "goto handled" appear in
	cases where the *-change-functions have already been properly called
	(bug#10117).

Andreas Schwab's avatar
Andreas Schwab committed
44 45 46 47 48
2011-12-01  Andreas Schwab  <schwab@linux-m68k.org>

	* keyboard.c (interrupt_signal): Don't call kill-emacs when
	waiting for input.  (Bug#10169)

49 50 51 52 53 54
2011-11-30  Eli Zaretskii  <eliz@gnu.org>

	* dispnew.c (adjust_glyph_matrix): Remove the assertion that
	verifies glyph row's hash code--we have just reallocated the
	glyphs, so their contents can be complete garbage.  (Bug#10164)

55 56 57 58
2011-11-30  Juanma Barranquero  <lekktu@gmail.com>

	* dispnew.c (adjust_glyph_matrix) [XASSERTS]: Add missing check.

59 60 61 62 63 64
2011-11-30  Eli Zaretskii  <eliz@gnu.org>

	* dispnew.c (adjust_glyph_matrix) [XASSERTS]: Ensure ROW's
	attributes are tested _before_ calling verify_row_hash, to protect
	against GCC re-ordering of the tests.  (Bug#10164)

65 66 67 68 69 70 71 72 73
2011-11-29  Jan Djärv  <jan.h.d@swipnet.se>

	* xterm.h (struct x_output): net_wm_state_hidden_seen is new.

	* xterm.c (handle_one_xevent): Only set async_visible and friends
	if net_wm_state_hidden_seen is non-zero (Bug#10002)
	(get_current_wm_state):  Set net_wm_state_hidden_seen to 1 if
	_NET_WM_STATE_HIDDEN is in NET_WM_STATE.

74 75 76 77 78 79 80 81 82 83
2011-11-28  Paul Eggert  <eggert@cs.ucla.edu>

	Remove GCPRO-related macros that exist only to avoid shadowing locals.
	* lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR, GCPRO5_VAR)
	(GCPRO6_VAR, UNGCPRO_VAR): Remove.  See
	<http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.
	All uses changed to use GCPRO1 etc.
	(GCPRO1, GCPRO2, GCPRO3, GCPRO4, GCPRO5, GCPRO6, UNGCPRO):
	Revert to old implementation (i.e., before 2011-03-11).

84 85 86 87 88 89
2011-11-28  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* dispnew.c (scrolling_window): Truncate overlaps in copy destination
	of scroll runs so as to avoid assigning disabled bogus rows and
	unnecessary graphics copy operations.

90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
2011-11-27  Eli Zaretskii  <eliz@gnu.org>

	* s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
	(snprintf) [_MSC_VER]: Redirect to _snprintf.
	(strtoll) [_MSC_VER]: Redirect to _strtoi64.
	(malloc, free, realloc, calloc): Redirect to e_* only when
	compiling Emacs.

	* lisp.h (GCTYPEBITS): Move before first use.
	(ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
	(DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
	this macro definition.

	* s/ms-w32.h (tzname): Redirect to _tzname for all values of
	_MSC_VER.

106 107 108 109 110 111
2011-11-27  Jan Djärv  <jan.h.d@swipnet.se>

	* gtkutil.c (xg_create_frame_widgets): Call
	gtk_window_set_has_resize_grip (FALSE) if that function is
	present with Gtk+ 2.0.

112 113 114 115 116
2011-11-26  Paul Eggert  <eggert@cs.ucla.edu>

	* fileio.c (Finsert_file_contents): Undo previous change; see
	<http://lists.gnu.org/archive/html/emacs-diffs/2011-11/msg00265.html>.

117 118 119 120 121 122 123 124 125
2011-11-26  Paul Eggert  <eggert@cs.ucla.edu>

	Rename locals to avoid shadowing.
	* fileio.c (Finsert_file_contents):
	Rename inner 'gcpro1' to 'inner_gcpro1' to avoid shadowing.
	* process.c (wait_reading_process_output):
	Rename inner 'proc' to 'p' to avoid shadowing.
	Indent for consistency with usual Emacs style.

126 127 128 129 130 131
2011-11-25  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (redisplay_window): If cursor row is not fully visible
	after recentering, and scroll-conservatively is set to a large
	number, scroll window by a few more lines to make the cursor fully
	visible and out of scroll-margin.  (Bug#10105)
132 133 134
	(start_display): Don't move to the next line if the display should
	start at a newline that is part of a display vector or an overlay
	string.  (Bug#10119)
135

136 137 138 139 140
2011-11-24  Juri Linkov  <juri@jurta.org>

	* image.c (imagemagick_load_image): Move `MagickSetResolution' down
	after the `MagickPingImage' call.  (Bug#10112)

141 142 143 144
2011-11-23  Chong Yidong  <cyd@gnu.org>

	* window.c (Fcoordinates_in_window_p): Accept only live windows.

145 146 147 148 149
2011-11-23  Martin Rudalics  <rudalics@gmx.at>

	* buffer.c (Fkill_buffer): Run replace_buffer_in_windows before
	making another buffer current.  (Bug#10114)

150 151 152 153
2011-11-23  Glenn Morris  <rgm@gnu.org>

	* font.c (font_find_for_lface) [HAVE_NS]: Ignore case.  (Bug#2526)

154 155 156 157 158
2011-11-23  Chong Yidong  <cyd@gnu.org>

	* xdisp.c (compute_stop_pos): Check validity of end_charpos before
	using it (Bug#5984).

159 160 161 162 163 164 165 166 167
2011-11-22  Eli Zaretskii  <eliz@gnu.org>

	* dispnew.c (adjust_glyph_matrix): Don't verify hash code of mode-
	and header-lines, as they don't have one computed for them.
	(Bug#10098)

	* .gdbinit (prow): Make displayed values more self-explaining.
	Add row's hash code.

168 169 170 171
2011-11-21  Lars Magne Ingebrigtsen  <larsi@gnus.org>

	* process.c (wait_reading_process_output): Fix asynchrounous
	GnuTLS socket handling on some versions of the GnuTLS library.
172
	(wait_reading_process_output): Add comment and URL.
173

174 175 176 177
2011-11-21  Jan Djärv  <jan.h.d@swipnet.se>

	* xterm.c (x_clear_frame): Reinstate the XClearWindow call.

178 179 180 181
2011-11-21  Chong Yidong  <cyd@gnu.org>

	* window.c (Fnext_window, Fprevious_window): Doc fix.

182 183 184 185
2011-11-20  Stefan Monnier  <monnier@iro.umontreal.ca>

	* window.c (get_phys_cursor_glyph): Fix Lisp_Object/int mixup.

Juanma Barranquero's avatar
Juanma Barranquero committed
186 187 188 189
2011-11-20  Juanma Barranquero  <lekktu@gmail.com>

	* nsfont.m (syms_of_nsfont) <ns-reg-to-script>: Fix typo.

190 191 192 193 194 195
2011-11-20  Martin Rudalics  <rudalics@gmx.at>

	* window.c (Fset_window_combination_limit): Rename argument
	STATUS to LIMIT.
	(Vwindow_combination_limit): Remove "status" from doc-string.

196 197 198 199 200
2011-11-20  Andreas Schwab  <schwab@linux-m68k.org>

	* m/ibms390.h: Remove.
	* m/ibms390x.h: Don't include "ibms390.h".

201 202 203 204 205
2011-11-20  Stefan Monnier  <monnier@iro.umontreal.ca>

	* fileio.c (Finsert_file_contents): Add missing gcpro1 variable.
	Suggested by Dmitry Antipov <dmantipov@yandex.ru>.

Juanma Barranquero's avatar
Juanma Barranquero committed
206 207 208 209 210
2011-11-20  Juanma Barranquero  <lekktu@gmail.com>

	* casetab.c (Fset_case_table):
	* charset.c (Fcharset_after): Fix typos.

Paul Eggert's avatar
Paul Eggert committed
211
2011-11-20  Paul Eggert  <eggert@cs.ucla.edu>
212

213 214 215
	Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
	Otherwise, valgrind does not work on some platforms.
	Problem reported by Andreas Schwab in
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
	<http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00081.html>.
	* puresize.h (pure, PURE_P): Always behave as if VIRT_ADDR_VARIES
	is set, removing the need for VIRT_ADDRESS_VARIES.
	(PURE_P): Use a more-efficient implementation that needs just one
	comparison, not two: on x86-64 with GCC 4.6.2, this cut down the
	number of instructions from 6 (xorl, cmpq, jge, xorl, cmpq, setge)
	to 4 (xorl, subq, cmpq, setbe).
	* alloc.c (pure): Always extern now, since that's the
	VIRT_ADDR_VARIES behavior.
	(PURE_POINTER_P): Use a single comparison, not two, for
	consistency with the new puresize.h.
	* lisp.h (PNTR_COMPARISON_TYPE): Remove; no longer needed.
	* m/ibms390.h, m/intel386.h, m/template.h, s/cygwin.h, s/hpux10-20.h:
	Remove VIRT_ADDR_VARIES no longer needed.

231 232 233 234 235 236 237 238 239 240 241
2011-11-19  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (x_write_glyphs, draw_phys_cursor_glyph)
	(erase_phys_cursor, update_window_cursor, show_mouse_face)
	(cursor_in_mouse_face_p): If the cursor position is out of bounds,
	behave as if the cursor position were at the window margin.

	* window.c (get_phys_cursor_glyph): If the window is hscrolled,
	and the cursor position is out of bounds, behave as if the cursor
	position were at the window margin.  (Bug#10075)

242 243 244 245 246 247
2011-11-18  Chong Yidong  <cyd@gnu.org>

	* window.c (Fwindow_combination_limit): Make first argument
	non-optional, since it is meaningless for live windows like the
	selected window.

248 249 250 251
2011-11-18  Dmitry Antipov  <dmantipov@yandex.ru>

	* keymap.c (Fwhere_is_internal): Add missing RETURN_UNGCPROs.

252 253 254 255 256
2011-11-18  Stefan Monnier  <monnier@iro.umontreal.ca>

	* intervals.c: Fix grafting over the whole buffer (bug#10071).
	(graft_intervals_into_buffer): Simplify.

257 258 259 260 261 262
2011-11-18  Eli Zaretskii  <eliz@gnu.org>

	* dispnew.c (swap_glyph_pointers): Swap the used[] arrays and the
	hash values of the two rows.
	(copy_row_except_pointers): Preserve the used[] arrays and the
	hash values of the two rows.  (Bug#10035)
263
	(add_row_entry): Add xassert to verify that ROW's hash code is valid.
264 265 266 267 268 269 270 271 272 273 274

	* xdisp.c (row_hash): New function, body extracted from
	compute_line_metrics.
	(compute_line_metrics): Call row_hash, instead of computing the
	hash code inline.

	* dispnew.c (verify_row_hash): Call row_hash for computing the
	hash code of a row, instead of duplicating code from xdisp.c.

	* dispextern.h (row_hash): Add prototype.

275 276 277 278 279
2011-11-18  Tassilo Horn  <tassilo@member.fsf.org>

	* frame.c (delete_frame): Don't delete the terminal when the last
	X frame is closed if emacs is built with GTK toolkit.

Juanma Barranquero's avatar
Juanma Barranquero committed
280 281 282 283
2011-11-17  Juanma Barranquero  <lekktu@gmail.com>

	* window.c (syms_of_window) <window-combination-resize>: Fix typo.

284 285 286 287 288 289 290
2011-11-17  Martin Rudalics  <rudalics@gmx.at>

	* window.c (Vwindow_splits): Rename to
	Vwindow_combination_resize.  Suggested by Juri Linkov.
	(Fsplit_window_internal): Use Vwindow_combination_resize instead
	of Vwindow_splits.

Juanma Barranquero's avatar
Juanma Barranquero committed
291 292
2011-11-16  Juanma Barranquero  <lekktu@gmail.com>

Juanma Barranquero's avatar
Juanma Barranquero committed
293 294
	* nsfns.m (Fns_font_name):
	* window.c (syms_of_window) <window-combination-limit>: Fix typos.
Juanma Barranquero's avatar
Juanma Barranquero committed
295

296 297 298 299 300 301 302 303 304 305 306
2011-11-16  Martin Rudalics  <rudalics@gmx.at>

	* window.h (window): Rename slot "nest" to "combination_limit".
	* window.c (Fwindow_nest): Rename to Fwindow_combination_limit.
	(Fset_window_nest): Rename to Fset_window_combination_limit.
	(Vwindow_nest): Rename to Vwindow_combination_limit.
	(recombine_windows, make_parent_window, make_window)
	(Fsplit_window_internal, saved_window)
	(Fset_window_configuration, save_window_save): Rename all
	occurrences of window_nest to window_combination_limit.

Juanma Barranquero's avatar
Juanma Barranquero committed
307 308 309 310
2011-11-15  Juanma Barranquero  <lekktu@gmail.com>

	* image.c (imagemagick_load_image): Fix typo.

311 312 313 314 315 316 317 318
2011-11-14  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (display_line): Move the call to
	highlight_trailing_whitespace before the call to
	compute_line_metrics, since the latter needs to see the final
	faces of all the glyphs to compute ROW's hash value.  Fixes
	assertion violations in row_equal_p.  (Bug#10035)

Juanma Barranquero's avatar
Juanma Barranquero committed
319 320 321 322 323
2011-11-14  Juanma Barranquero  <lekktu@gmail.com>

	* w32proc.c (reader_thread): Don't check pending input if cp->fd < 0,
	just return (bug#10044).

324 325
2011-11-12  Eli Zaretskii  <eliz@gnu.org>

326 327 328 329 330
	* makefile.w32-in (HEAPSIZE): New variable, allows to build temacs
	with user-defined heap size.  Bump the default size of the temacs
	heap to 27MB, to avoid memory warning when running temacs.
	($(TEMACS)): Use HEAPSIZE instead of a hardcoded value.

331 332
	* dispnew.c (scrolling_window): Fix incorrect indices in accessing
	current_matrix and desired_matrix.  (Bug#9990)
333 334 335
	(verify_row_hash) [XASSERTS]: New function.
	(adjust_glyph_matrix, row_equal_p): Use it in xassert to verify
	that the hash value of glyph rows is correct.
336

Martin Rudalics's avatar
Martin Rudalics committed
337 338 339 340 341 342 343 344 345 346 347
2011-11-12  Martin Rudalics  <rudalics@gmx.at>

	* window.h (window): Remove splits slot.
	* window.c (Fwindow_splits, Fset_window_splits): Remove.
	(Fdelete_other_windows_internal, make_parent_window)
	(make_window, Fsplit_window_internal, Fdelete_window_internal)
	(Fset_window_configuration, save_window_save): Don't deal with
	split status of windows.
	(saved_window): Remove splits slot.
	(Vwindow_splits): Rewrite doc-string.

Jan Djärv's avatar
Jan Djärv committed
348 349 350 351 352 353 354
2011-11-11  Jan Djärv  <jan.h.d@swipnet.se>

	* xfns.c (unwind_create_frame):
	* nsfns.m (unwind_create_frame):
	* w32fns.c (unwind_create_frame): Use Fmemq to check if frame is in
	Vframe_list (Bug#9999).

355 356
2011-11-11  Dmitry Antipov  <dmantipov@yandex.ru>

Juanma Barranquero's avatar
Juanma Barranquero committed
357
	* xdisp.c (syms_of_xdisp): Remove duplicated definition of Qtext.
358

359 360 361 362 363
2011-11-11  Kenichi Handa  <handa@m17n.org>

	* callproc.c (Fcall_process): Set the member dst_multibyte of
	process_coding.

364 365 366 367 368
2011-11-11  Johan Bockgård  <bojohan@gnu.org>

	* xdisp.c (fill_composite_glyph_string): Always set s->face, to
	avoid a crash (bug#9496).

369 370 371 372 373
2011-11-09  Chong Yidong  <cyd@gnu.org>

	* window.c (Fwindow_inside_edges, Fwindow_inside_pixel_edges)
	(Fwindow_inside_absolute_pixel_edges): Only allow live windows.

374 375 376 377
2011-11-08  Paul Eggert  <eggert@cs.ucla.edu>

	* s/gnu.h (GC_MARK_STACK): Define to GC_MAKE_GCPROS_NOOPS (Bug#9926).

378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397
2011-11-08  Paul Eggert  <eggert@cs.ucla.edu>

	Avoid some portability problems by eschewing 'extern inline' functions.
	The trivial performance wins aren't worth the portability hassles; see
	<http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>
	et seq.
	* dispextern.h (window_box, window_box_height, window_text_bottom_y)
	(window_box_width, window_box_left, window_box_left_offset)
	(window_box_right, window_box_right_offset): Undo previous change,
	by removing the "extern"s.
	* intervals.c (adjust_intervals_for_insertion)
	(adjust_intervals_for_deletion): Undo previous change,
	making these static again.
	(offset_intervals, temp_set_point_both, temp_set_point)
	(copy_intervals_to_string): No longer inline.
	* xdisp.c (window_text_bottom_y, window_box_width)
	(window_box_height, window_box_left_offset)
	(window_box_right_offset, window_box_left, window_box_right)
	(window_box): No longer inline.

398 399 400 401 402 403 404 405
2011-11-08  Chong Yidong  <cyd@gnu.org>

	* window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
	(Fwindow_body_height, Fwindow_body_width): Move from Lisp.  Signal
	an error if not a live window.
	(Fwindow_total_width, Fwindow_total_height): Move from Lisp.
	(Fwindow_total_size, Fwindow_body_size): Move to Lisp.

406 407 408 409 410
2011-11-07  Juanma Barranquero  <lekktu@gmail.com>

	* lisp.h (syms_of_abbrev): Remove declaration.
	Reported by CHENG Gao <chenggao@royau.me>.

411 412 413 414 415 416
2011-11-07  Eli Zaretskii  <eliz@gnu.org>

	* w32.c (check_windows_init_file): Don't look for term/w32-win.el
	if Vpurify_flag is non-nil.  Fixes a crash when running w32 build
	of temacs in GUI mode.

417 418 419 420 421 422 423 424 425 426 427 428 429
2011-11-07  Martin Rudalics  <rudalics@gmx.at>

	* window.h: Declare delete_all_child_windows instead of
	delete_all_subwindows.
	* window.c (Fwindow_nest, Fset_window_nest)
	(Fset_window_new_total, Fset_window_new_normal)
	(Fwindow_resize_apply): Don't use term subwindow in doc-strings.
	(delete_all_subwindows): Rename to delete_all_child_windows.
	(Fdelete_other_windows_internal, Fset_window_configuration):
	Call delete_all_child_windows instead of delete_all_subwindows.
	* frame.c (delete_frame): Call delete_all_child_windows instead
	of delete_all_subwindows.

430 431 432 433 434 435 436
2011-11-07  Paul Eggert  <eggert@cs.ucla.edu>

	* alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926).
	This is also needed for porting to any host where GC_MARK_STACK is
	not GC_MAKE_GCPROS_NOOPS.
	(which_symbols): Use it.

437 438 439 440 441 442 443 444 445 446 447
2011-11-07  Kenichi Handa  <handa@m17n.org>

	* coding.c (coding_set_destination): Check coding->src_pos only
	when coding->src_object is a buffer (bug#9910).

	* process.c (send_process): Set the member src_multibyte of coding
	to 0 (bug#9911) when sending a unibyte text.

	* callproc.c (Fcall_process): Set the member src_multibyte of
	process_coding to 0 (bug#9912).

448
2011-11-06  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
449 450 451 452 453

	* xmenu.c (cleanup_widget_value_tree): New function.
	(xmenu_show, xdialog_show): Use it in record_unwind_protect instead of
	calling free_menubar_widget_value_tree directly (Bug#9830).

454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471
2011-11-06  Paul Eggert  <eggert@cs.ucla.edu>

	Fix some portability problems with 'inline'.
	* dispextern.h (window_box, window_box_height, window_text_bottom_y)
	(window_box_width, window_box_left, window_box_left_offset)
	(window_box_right, window_box_right_offset): Declare extern.
	Otherwise, these inline functions do not conform to C99 and
	are miscompiled by Microsoft compilers.  Reported by Eli Zaretskii in
	<http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00084.html>.
	* intervals.c (adjust_intervals_for_insertion)
	(adjust_intervals_for_deletion): Now extern, because otherwise the
	extern inline functions 'offset_intervals' couldn't refer to it.
	(static_offset_intervals): Remove.
	(offset_intervals): Rewrite using the old contents of
	static_offset_intervals.  The old version didn't conform to C99
	because an extern inline function contained a reference to an
	identifier with static linkage.

472 473 474 475 476
2011-11-06  Andreas Schwab  <schwab@linux-m68k.org>

	* keyboard.c (interrupt_signal): Don't call kill-emacs while in
	GC.

477 478 479 480 481 482 483
2011-11-06  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (init_iterator, reseat_to_string): Don't set the
	iterator's bidi_p flag if Vpurify_flag is non-nil.  (Bug#9963)
	(Fcurrent_bidi_paragraph_direction): If Vpurify_flag is non-nil,
	return Qleft_to_right.

484 485 486 487 488 489 490 491 492 493 494 495 496
2011-11-06  Chong Yidong  <cyd@gnu.org>

	* window.c (Fwindow_live_p, Fwindow_frame, Fframe_root_window)
	(Fminibuffer_window, Fwindow_buffer, Fwindow_splits)
	(Fset_window_splits, Fwindow_nest, Fset_window_nest)
	(Fwindow_use_time, Fwindow_total_size, Fwindow_normal_size)
	(Fwindow_new_normal, Fwindow_left_column, Fwindow_top_line)
	(Fwindow_margins, Fwindow_fringes, Fwindow_scroll_bars)
	(Fwindow_vscroll): Doc fix.
	(Fwindow_top_child, Fwindow_left_child): Eliminate a nil default
	argument, since it makes no sense to pass a live window and for
	consistency with window-child.

497 498 499 500 501
2011-11-05  Christoph Scholtes  <cschol2112@googlemail.com>

	* makefile.w32-in ($(TEMACS), (gl-stamp)): Use $(THISDIR) to
	support MSVC.

502 503 504 505 506 507 508 509 510
2011-11-05  Jason Rumney  <jasonr@gnu.org>

	* w32font.c (font_matches_spec): Filter out non-Japanese kana fonts.
	(add_font_entity_to_list): Filter out non-Japanese Shift-JIS
	fonts (Bug#6029).
	(add_font_entity_to_list): Fix logic errors in mixed boolean and
	bitwise arithmetic preventing use of unicode-sip and non-truetype
	opentype fonts.

511 512
2011-11-05  Eli Zaretskii  <eliz@gnu.org>

Eli Zaretskii's avatar
Eli Zaretskii committed
513 514 515
	* s/ms-w32.h (fstat, stat, utime): Move redirections to
	"emacs"-only part.

516 517 518 519
	* w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
	initialization code to keep similarity to xfns.c after changes
	from 2011-11-05.

520 521
2011-11-05  Jan Djärv  <jan.h.d@swipnet.se>

522 523 524 525 526 527 528 529 530 531 532
	* nsfns.m: Declare image_cache_refcount if GLYPH_DEBUG.
	(unwind_create_frame): New function (Bug#9943).
	(Fx_create_frame): Restructure code to be more similar to the one in
	xfns.c.  Call record_unwind_protect with unwind_create_frame (Bug#9943).
	Initialize image_cache_refcount if GLYPH_DEBUG (Bug#9943).
	Move terminal->reference_count++ just before making the frame official
	(Bug#9943).

	* nsterm.m (x_free_frame_resources): New function.
	(x_destroy_window): Move code to x_free_frame_resources.

533 534 535 536 537 538
	* xfns.c (unwind_create_frame): Fix comment.
	(Fx_create_frame, x_create_tip_frame): Move
	terminal->reference_count++ just before making the frame
	official. Move initialization of image_cache_refcount and
	dpyinfo_refcount before calling init_frame_faces (Bug#9943).

539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556
2011-11-05  Eli Zaretskii  <eliz@gnu.org>

	Support MSVC build with newer versions of Visual Studio.
	* makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
	Nmake barfs on that.  Use $(OBJ*_c) variables instead, defined on
	nt/gmake.defs.

	* lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
	which are not supported by MSVC.
	(Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
	(Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
	bitfields.
	(Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
	types in bitfields.
	(DEFUN) [_MSC_VER]: Define in a different way for MSVC.

	* w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.

Juanma Barranquero's avatar
Juanma Barranquero committed
557
2011-11-05  Fabrice Popineau  <fabrice.popineau@supelec.fr>  (tiny change)
558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573

	Support MSVC build with newer versions of Visual Studio.
	* w32.c: Don't include w32api.h for MSVC.
	(init_environment) [_MSC_VER]: Call sys_access, not _access.

	* s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
	[_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
	(fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
	(malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
	e_* cousins.
	(alloca) [_MSC_VER]: Define to _alloca.

	* lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.

	* regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.

574 575 576 577 578 579
2011-11-04  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (note_mouse_highlight): If either of
	previous/next-single-property-change returns nil, treat that as
	the beginning or the end of the buffer.  (Bug#9955)

580 581
2011-11-04  Jan Djärv  <jan.h.d@swipnet.se>

582
	* gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
583 584 585 586
	label is not null (Bug#9951).
	(xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
	may be NULL.

587 588 589 590 591
2011-11-04  Eli Zaretskii  <eliz@gnu.org>

	* window.c (Fwindow_body_size): Mention in the doc string that the
	return value is in frame's canonical units.  (Bug#9949)

592 593
2011-11-03  Eli Zaretskii  <eliz@gnu.org>

594 595
	* xdisp.c (note_mouse_highlight): Initialize `area'.  (Bug#9947)

596
	* w32fns.c (unwind_create_frame): If needed, free the glyph
597
	matrices of the partially constructed frame.  (Bug#9943)
Eli Zaretskii's avatar
Eli Zaretskii committed
598
	* xfns.c (unwind_create_frame): Likewise.
599

600 601 602 603 604
2011-11-01  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
	Don't stop backward scan on the continuation glyph, even though
	its CHARPOS is positive.
605 606
	(mouse_face_from_buffer_pos, note_mouse_highlight): Rename
	cover_string to disp_string.
607

608 609 610 611 612 613
2011-11-01  Martin Rudalics  <rudalics@gmx.at>

	* window.c (temp_output_buffer_show): Don't use
	Vtemp_buffer_show_specifiers.
	(Vtemp_buffer_show_specifiers): Remove unused variable.

614 615 616 617 618
2011-10-30  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (try_cursor_movement): Make sure ROW isn't decremented
	past the beginning of the current glyph matrix.

Juanma Barranquero's avatar
Juanma Barranquero committed
619
2011-10-30  Adam Sjøgren  <asjo@koldfront.dk>  (tiny change)
Jan Djärv's avatar
Jan Djärv committed
620 621 622 623

	* xterm.c: Include X11/Xproto.h if HAVE_GTK3.
	(x_error_handler): Ignore BadMatch for X_SetInputFocus for
	HAVE_GTK3 (Bug#9869).
624

625 626 627
	* gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
	type to GDK_NOTHING so valgrind does not complain (Bug#9901).

628 629 630 631 632 633 634 635 636 637 638
	* xterm.h (x_display_info): Add Xatom_net_wm_state_hidden (Bug#9893).

	* xterm.c: Declare x_handle_net_wm_state to return int.
	(handle_one_xevent): Check if we are iconified but don't have
	_NET_WM_STATE_HIDDEN.  If do, treat as deiconify (Bug#9893).
	(get_current_wm_state): Return non-zero if not hidden,
	check for _NET_WM_STATE_HIDDEN (Bug#9893).
	(do_ewmh_fullscreen): Ignore return value from get_current_wm_state.
	(x_handle_net_wm_state): Return what get_current_wm_state returns.
	(x_term_init): Initialize dpyinfo->Xatom_net_wm_state_hidden.

639 640 641 642 643 644
2011-10-29  Paul Eggert  <eggert@cs.ucla.edu>

	* alloc.c (which_symbols): Declare EXTERNALLY_VISIBLE,
	so that this new function doesn't get optimized away by a
	whole-program optimizer.  Make the 2nd arg EMACS_INT, not int.

645 646 647 648
2011-10-29  Andreas Schwab  <schwab@linux-m68k.org>

	* frame.h (MOUSE_HL_INFO): Remove excess parens.

649 650 651 652
2011-10-29  Eli Zaretskii  <eliz@gnu.org>

	Fix the `xbytecode' command.
	* .gdbinit (xprintbytestr): New command.
653
	(xwhichsymbols): Rename from `which'; all callers changed.
654 655
	(xbytecode): Print the byte-code string as well.

656 657
2011-10-29  Kim Storm  <storm@cua.dk>

658 659
	* alloc.c (which_symbols): New function.

Andreas Schwab's avatar
Andreas Schwab committed
660 661 662 663 664
2011-10-29  Andreas Schwab  <schwab@linux-m68k.org>

	* minibuf.c (read_minibuf_noninteractive): Allow reading empty
	line.  (Bug#9903)

665 666 667 668 669
2011-10-29  Glenn Morris  <rgm@gnu.org>

	* process.c (wait_reading_process_output): Revert 2009-08-30 change.
	Not clear what it was for, and it causes various bugs.  (Bug#9839)

670 671 672 673 674 675
2011-10-28  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (note_mouse_highlight): Initialize `part', to avoid a
	possible random value that matches one of those tested as
	condition to clear the mouse face.

676 677 678 679
2011-10-28  Chong Yidong  <cyd@gnu.org>

	* xdisp.c (note_mouse_highlight): Fix use of uninitialized var.

680 681 682 683
2011-10-28  Dan Nicolaescu  <dann@ics.uci.edu>

	* window.c (make_window): Initialize phys_cursor_on_p.

684 685 686 687
2011-10-28  Stefan Monnier  <monnier@iro.umontreal.ca>

	* lisp.h (struct Lisp_Symbol): Update comments.

688 689 690 691
2011-10-28  Juanma Barranquero  <lekktu@gmail.com>

	* w32font.c (w32_load_unicows_or_gdi32): Add missing return.

692 693 694 695 696 697 698 699 700 701 702
2011-10-28  Eli Zaretskii  <eliz@gnu.org>

	Fix Emacs on Windows 9X (bug#8562).  Thanks to oslsachem
	<oslsachem@gmail.com> for helping to debug this.

	* w32font.c (g_b_init_is_w9x, g_b_init_get_outline_metrics_w)
	(g_b_init_get_text_metrics_w, g_b_init_get_glyph_outline_w)
	(g_b_init_get_glyph_outline_w): New static variables.
	(GetOutlineTextMetricsW_Proc, GetTextMetricsW_Proc)
	(GetGlyphOutlineW_Proc): New typedefs.
	(w32_load_unicows_or_gdi32, get_outline_metrics_w)
703 704 705 706
	(get_text_metrics_w, get_glyph_outline_w, globals_of_w32font):
	New functions.
	(w32font_open_internal, compute_metrics):
	Call get_outline_metrics_w, get_text_metrics_w, and get_glyph_outline_w
707 708 709 710 711 712
	instead of calling the "wide" APIs directly.

	* emacs.c (main) [HAVE_NTGUI]: Call globals_of_w32font.

	* w32.h (syms_of_w32font): Add prototype.

713 714 715 716 717 718 719
2011-10-27  Juanma Barranquero  <lekktu@gmail.com>

	* window.c (Fframe_root_window, Fframe_first_window, Fwindow_end)
	(Fframe_selected_window, Ftemp_output_buffer_show, Fnext_window)
	(Fdelete_window_internal, Fwindow_parameters): Fix typos in docstrings.
	(Fmove_to_window_line): Doc fix.

Chong Yidong's avatar
Chong Yidong committed
720 721 722 723 724 725 726 727 728 729 730
2011-10-27  Chong Yidong  <cyd@gnu.org>

	* process.c (make_process): Set gnutls_state to NULL.

	* gnutls.c (emacs_gnutls_deinit): Deinit the gnutls_state if it is
	non-NULL, regardless of GNUTLS_INITSTAGE.
	(Fgnutls_boot): Cleanups.  Call emacs_gnutls_deinit if we signal
	an error.  Set process slots as soon as we allocate them.

	* gnutls.h (GNUTLS_LOG, GNUTLS_LOG2): Fix macros.

731 732
2011-10-27  Chong Yidong  <cyd@gnu.org>

733 734
	* gnutls.c (emacs_gnutls_deinit): New function.
	Deallocate credentials structures as well as calling gnutls_deinit.
735 736 737 738 739
	(Fgnutls_deinit, Fgnutls_boot): Use it.

	* process.c (make_process): Initialize GnuTLS credentials to NULL.
	(deactivate_process): Call emacs_gnutls_deinit.

740 741 742 743 744 745 746
2011-10-27  Juanma Barranquero  <lekktu@gmail.com>

	* image.c (x_create_x_image_and_pixmap):
	* w32.c (sys_rename, w32_delayed_load):
	* w32font.c (fill_in_logfont):
	* w32reg.c (x_get_string_resource): Silence compiler warnings.

747 748 749 750
2011-10-26  Juanma Barranquero  <lekktu@gmail.com>

	* w32fns.c (w32_default_color_map): New function,
	extracted from Fw32_default_color_map.
Juanma Barranquero's avatar
Juanma Barranquero committed
751
	(Fw32_default_color_map, Fx_open_connection): Use it.  (Bug#9785)
752

753 754 755 756
2011-10-25  Paul Eggert  <eggert@cs.ucla.edu>

	* dispextern.h (Fcontrolling_tty_p): New decl (Bug#6649 part 2).

757 758 759 760 761
2011-10-25  Stefan Monnier  <monnier@iro.umontreal.ca>

	* keyboard.c (test_undefined): New function (bug#9751).
	(read_key_sequence): Use it to detect when a key is bound to `undefined'.

762 763 764 765 766
2011-10-25  Enami Tsugutomo  <tsugutomo.enami@jp.sony.com>

	* sysdep.c (init_sys_modes): Fix the check for the controlling
	terminal (Bug#6649).

767 768 769 770 771 772 773 774 775 776 777 778 779
2011-10-20  Eli Zaretskii  <eliz@gnu.org>

	* dispextern.h (struct bidi_it): New member next_en_type.

	* bidi.c (bidi_line_init): Initialize the next_en_type member.
	(bidi_resolve_explicit_1): When next_en_pos is valid for the
	current character, check also for next_en_type being WEAK_EN.
	(bidi_resolve_weak): Don't enter the expensive loop if the current
	position is before next_en_pos.  Record the bidi type of the first
	non-ET, non-BN character we find, in addition to its position.
	(bidi_level_of_next_char): Invalidate next_en_type when
	next_en_pos is over-stepped.

780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800
2011-10-20  Paul Eggert  <eggert@cs.ucla.edu>

	Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
	* editfns.c: Rewrite current-time-zone so that it invokes
	the equivalent of (format-time-string "%Z") to get the time zone name.
	This fixes a bug when the time zone name contains characters that
	need converting from the system time locale to Emacs internal format.
	This fixes a shortcoming that I introduced in my 1999-10-19 patch:
	that patch fixed format-time-string to do the conversion, but
	I forgot to fix current-time-zone.
	(format_time_string): New function, containing most of
	what Fformat_time_string used to contain.
	(Fformat_time_string): Rewrite in terms of format_time_string.
	This doesn't change this function's behavior.
	(current-time-zone): Rewrite to use format_time_string.
	This fixes the bug reported by Michael Schierl in
	<http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
	Jason Rumney's 2007-06-07 change worked around this bug, but
	didn't fix it.
	* systime.h (tzname, timezone): Remove no-longer-used declarations.

801 802 803 804
2011-10-19  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (start_display): If the character at POS is displayed
	via a display vector, reset IT->current.dpvec_index to zero.
805 806 807 808
	(try_window_reusing_current_matrix): If a line ends in a display
	vector or the next line starts in a display vector, continue
	redrawing the window even though the character position of
	start_row was reached.
809 810
	(Bug#9771, part 2)

811 812 813 814 815
2011-10-18  Chong Yidong  <cyd@gnu.org>

	* xdisp.c (get_next_display_element): Handle U+2010 and U+2011
	with nobreak-char-display too.

816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834
2011-10-18  Eli Zaretskii  <eliz@gnu.org>

	Fix part 3 of bug#9771.
	* bidi.c (bidi_line_init): Initialize next_en_pos to zero, not -1.
	(bidi_resolve_neutral): Don't enter the expensive loop looking for
	non-neutral characters if the current character is a paragraph
	separator (a.k.a. Newline).  This avoids running the same
	expensive loop twice, once when we consume the preceding newline
	and the other time when the line actually needs to be displayed.
	Avoid the loop when we see neutrals on the base embedding level
	following a character whose directionality is the same as the
	paragraph's.  This avoids running the expensive loop when a line
	ends in a long sequence of neutrals, like control characters.
	Add assertion against STRONG_AL type.  Slightly rearrange code
	that determines the type of a neutral given the first non-neutral
	that follows it.
	(bidi_level_of_next_char): Set next_en_pos to zero when
	invalidating its info.

835 836 837 838 839
2011-10-17  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (push_display_prop): Determine whether to record string
	or buffer position by IT->string, not by IT->method.  Allow
	GET_FROM_DISPLAY_VECTOR as IT->method on entry.  (Bug#9771, part 4)
840 841 842
	(move_it_vertically_backward): Don't look for character position
	immediately after the newline when in a continuation line.
	(Bug#9771, part 1)
843

844 845 846 847 848
2011-10-15  Martin Rudalics  <rudalics@gmx.at>

	* window.c (coordinates_in_window): Rewrite and delabelize
	vertical border check.  (Bug#5357) (Bug#9618)

849 850 851 852 853
2011-10-14  Stefan Monnier  <monnier@iro.umontreal.ca>

	* xterm.c (frame_highlight, frame_unhighlight): Ignore unexplained
	errors in XSetWindowBorder (bug#9310).

854 855 856 857 858
2011-10-13  Dmitry Antipov  <dmantipov@yandex.ru>

	* editfns.c (Fset_time_zone_rule): Replace free with xfree to
	avoid crash when xmalloc overrun checking is enabled.

859 860 861 862 863 864 865 866 867
2011-10-13  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (Fcurrent_bidi_paragraph_direction): Initialize
	itb.paragraph_dir to NEUTRAL_DIR.  Fixes an occasional incorrect
	cursor motion with <left> and <right> arrow keys.

	* bidi.c (bidi_init_it): Don't initialize paragraph_dir here, as
	some callers set that themselves.

868 869 870 871 872 873
2011-10-12  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (find_row_edges): Handle the case where ROW comes from a
	display string and the previous row comes from the same string and
	is empty.  (Bug#9739)  (Bug#9738)

874 875 876 877
2011-10-12  Stefan Monnier  <monnier@iro.umontreal.ca>

	* doc.c (get_doc_string): Encode file name (bug#9735).

878 879
2011-10-12  Eli Zaretskii  <eliz@gnu.org>

880 881 882 883
	* bidi.c (bidi_level_of_next_char):
	* xdisp.c (get_visually_first_element): Remove old incorrect
	comments regarding the Unicode Line Separator character.

884 885
	* bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.

886 887 888 889 890 891
2011-10-12  Dmitry Antipov  <dmantipov@yandex.ru>

	* alloc.c (Fgc_status): Do not access beyond zombies array
	boundary if nzombies > MAX_ZOMBIES.
	* alloc.c (dump_zombies): Add missing format specifier.

892 893
2011-10-12  Paul Eggert  <eggert@cs.ucla.edu>

894 895 896
	* xdisp.c (set_cursor_from_row): Simplify conditionals,
	to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.

897 898 899
	* lread.c (read_escape): Allow hex escapes as large as ?\xfffffff.
	Some packages use them to denote characters with modifiers.

900 901 902 903 904 905
2011-10-11  Andreas Schwab  <schwab@linux-m68k.org>

	* lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)
	(GCPRO5_VAR, GCPRO6_VAR, UNGCPRO_VAR): Add whitespace to avoid
	matching a pp-number.  Rename parameter var to var1.

906 907 908 909
2011-10-11  Stefan Monnier  <monnier@iro.umontreal.ca>

	* minibuf.c (Finternal_complete_buffer): Fix last change (bug#9709).

Glenn Morris's avatar
Glenn Morris committed
910 911 912 913 914
2011-10-08  Glenn Morris  <rgm@gnu.org>

	* callint.c (Fcall_interactively): Give a more explicit error for the
	'c' case with a non-character input.  (Bug#8479)

915 916
2011-10-08  Eli Zaretskii  <eliz@gnu.org>

917 918
	* xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
	lines.
919 920
	(set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
	lines that are hscrolled on the left.
921

922 923 924
	* dispnew.c (buffer_posn_from_coords): Account for a possible
	presence of header-line.  (Bug#4426)

925 926
2011-10-07  Stefan Monnier  <monnier@iro.umontreal.ca>

927 928
	* buffer.c (syms_of_buffer) <enable-multibyte-characters>:
	Don't advertise functionality which we discourage or doesn't work.
929

930 931 932 933 934 935 936 937 938 939 940 941
2011-10-07  Paul Eggert  <eggert@cs.ucla.edu>

	* alloc.c (GC_LISP_OBJECT_ALIGNMENT): Use offsetof, not __alignof__
	or sizeof.  __alignof__ gives the wrong answer on Fedora x86-64
	with GCC 4.6.1 when configured with CC='gcc -m32' --with-wide-int;
	this makes Emacs dump core during garbage collection on rare
	occasions.  sizeof is obviously inferior to offsetof here, so
	stick with offsetof.
	(GC_POINTER_ALIGNMENT): New macro.
	(mark_memory): Omit 3rd (offset) arg; caller changed.
	Don't assume EMACS_INT alignment is the same as pointer alignment.

942 943 944 945 946 947
2011-10-03  Stefan Monnier  <monnier@iro.umontreal.ca>

	* keyboard.c (read_key_sequence_remapped): New var.
	(read_key_sequence): Compute remapping in the right buffer.
	(command_loop_1): Use read_key_sequence's remapping directly.

948 949
2011-10-02  Stefan Monnier  <monnier@iro.umontreal.ca>

950 951 952 953
	* dired.c (file_name_completion): Don't expand file name.
	(Ffile_name_completion, Ffile_name_all_completions): Expand file name
	before checking file name handler.

954 955 956
	* minibuf.c (Finternal_complete_buffer): Only show internal buffers if
	they've been requested explicitly (bug#9591).

Chong Yidong's avatar
Chong Yidong committed
957
2011-10-01  Andreas Schwab  <schwab@linux-m68k.org>
958 959 960 961 962

	* keymap.c (Fsingle_key_description): Use make_specified_string
	instead of build_string to build string from push_key_description.
	(Bug#5193)

963 964
2011-09-30  Paul Eggert  <eggert@cs.ucla.edu>

965 966 967 968 969 970 971 972
	* buffer.h (struct buffer): Use time_t, not int, for a time stamp.
	This fixes a Y2038 bug on 64-bit hosts.
	* buffer.c (reset_buffer):
	* fileio.c (Fdo_auto_save, Fset_buffer_auto_saved)
	(Fclear_buffer_auto_save_failure):
	Use 0, not -1, to represent an unset failure time, since time_t
	might not be signed.

973 974 975 976 977 978 979 980 981 982 983 984 985 986
	Remove dependency on glibc malloc internals.
	* alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
	Move back here from lisp.h, but with their new implementations.
	(XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
	(XMALLOC_OVERRUN_SIZE_SIZE): Move these new lisp.h macros here.
	* charset.c (charset_table_init): New static var.
	(syms_of_charset): Use it instead of xmalloc.  This removes a
	dependency on glibc malloc internals.  See Eli Zaretskii's comment in
	<http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00815.html>.
	* lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
	Move back to alloc.c.
	(XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
	(XMALLOC_OVERRUN_SIZE_SIZE): Move to alloc.c.

987 988 989 990 991 992
2011-09-30  Jan Djärv  <jan.h.d@swipnet.se>

	* nsterm.m (windowDidResize): Call x_set_window_size only when
	ns_in_resize is true.  Otherwise set pixelwidth/height and
	call change_frame_size (Bug#9628).

993 994
2011-09-30  Paul Eggert  <eggert@cs.ucla.edu>

995 996 997 998
	Port --enable-checking=all to Fedora 14 x86-64.
	* charset.c (syms_of_charset): Also account for glibc malloc's
	internal overhead when calculating the initial malloc maximum.

999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016
	Port --enable-checking=all to Fedora 14 x86.
	* alloc.c (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
	Move to lisp.h.
	(xmalloc_put_size, xmalloc_get_size, overrun_check_malloc)
	(overrun_check_realloc, overrun_check_free):
	Use XMALLOC_OVERRUN_SIZE_SIZE, not sizeof (size_t).
	That way, xmalloc returns a properly-aligned pointer even if
	XMALLOC_OVERRUN_CHECK is defined.  The old debugging code happened
	to align OK on typical 64-bit hosts, but not on Fedora 14 x86.
	* charset.c (syms_of_charset): Take XMALLOC_OVERRUN_CHECK_OVERHEAD
	into account when calculating the initial malloc maximum.
	* lisp.h (XMALLOC_OVERRUN_CHECK_OVERHEAD, XMALLOC_OVERRUN_CHECK_SIZE):
	Move here from alloc.c, so that charset.c can use it too.
	Properly align; the old code wasn't right for common 32-bit hosts
	when configured with --enable-checking=all.
	(XMALLOC_BASE_ALIGNMENT, COMMON_MULTIPLE, XMALLOC_HEADER_ALIGNMENT)
	(XMALLOC_OVERRUN_SIZE_SIZE): New macros.

Eli Zaretskii's avatar
Eli Zaretskii committed
1017 1018
2011-09-29  Eli Zaretskii  <eliz@gnu.org>

1019
	* sysdep.c (snprintf) [!EOVERFLOW]: If EOVERFLOW is not defined,
Eli Zaretskii's avatar
Eli Zaretskii committed
1020 1021
	use EDOM.

1022 1023 1024 1025 1026 1027 1028 1029 1030
2011-09-28  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (compute_display_string_end): If there's no display
	string at CHARPOS, return -1.

	* bidi.c (bidi_fetch_char): When compute_display_string_end
	returns a negative value, treat the character as a normal
	character not covered by a display string.  (Bug#9624)

Juanma Barranquero's avatar
Juanma Barranquero committed
1031 1032 1033 1034
2011-09-28  Juanma Barranquero  <lekktu@gmail.com>

	* lread.c (Fread_from_string): Fix typo in docstring.

1035 1036 1037 1038 1039
2011-09-27  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (handle_invisible_prop): If invisible text ends on a
	newline, reseat the iterator instead of bidi-iterating there one
	character at a time.  (Bug#9610)
1040 1041
	(BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
	TO_CHARPOS if the bidi iterator is at base embedding level.
1042

1043 1044 1045 1046 1047
2011-09-27  Andreas Schwab  <schwab@linux-m68k.org>

	* lread.c (readevalloop): Use correct code for NBSP.
	(read1): Likewise.  (Bug#9608)

1048 1049 1050 1051 1052
2011-09-25  Michael Albinus  <michael.albinus@gmx.de>

	* dbusbind.c (Fdbus_register_signal): When service is not
	registered, use nil in Vdbus_registered_objects_table.  (Bug#9581)

1053 1054 1055 1056
2011-09-25  Glenn Morris  <rgm@gnu.org>

	* buffer.c (truncate-lines): Doc fix.

1057 1058 1059 1060 1061
2011-09-24  Chong Yidong  <cyd@stupidchicken.com>

	* window.c (Fwindow_prev_buffers, Fset_window_prev_buffers)
	(Fset_window_next_buffers): Doc fix.

1062 1063 1064 1065
2011-09-24  Glenn Morris  <rgm@gnu.org>

	* minibuf.c (read_minibuf): Disable line truncation.  (Bug#5715)

1066 1067
2011-09-24  Paul Eggert  <eggert@cs.ucla.edu>

1068 1069
	Fix minor problems found by static checking.
	* xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
1070 1071
	* indent.c (Fvertical_motion): Fix == vs = typo.

1072 1073
2011-09-24  Eli Zaretskii  <eliz@gnu.org>

1074 1075
	* dispnew.c (syms_of_display) <redisplay-dont-pause>:
	Default value is now t.  Doc fix.
1076

1077
	* indent.c (Fvertical_motion): Compute and apply the overshoot
1078
	logic when moving up, not only when moving down.  Fix the
1079
	confusing name and values of the it_overshoot_expected variable;
1080
	logic changes accordingly.  (Bug#9254) (Bug#9549)
1081 1082 1083 1084 1085 1086

	* xdisp.c (pos_visible_p): Produce correct pixel coordinates when
	CHARPOS is covered by a display string which includes newlines.
	(move_it_vertically_backward): Avoid inflooping when START_CHARPOS
	is covered by a display string with embedded newlines.

1087 1088 1089 1090
2011-09-24  Michael Albinus  <michael.albinus@gmx.de>

	* dbusbind.c (Fdbus_register_signal): Add match rule to
	Vdbus_registered_objects_table.  (Bug#9581)
1091 1092
	(Fdbus_register_method, Vdbus_registered_objects_table):
	Fix docstring.
1093

1094 1095
2011-09-24  Jim Meyering  <meyering@redhat.com>

1096
	do not ignore write error for any output size
1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108
	The previous change was incomplete.
	While it makes emacs --batch detect the vast majority of stdout
	write failures, errors were still ignored whenever the output size is
	k * (BUFSIZ+1) - 4.  E.g., on a system with BUFSIZ of 4096,
	  $ emacs --batch --eval '(print (format "%4093d" 0))' > /dev/full \
	      && echo FAIL: ignored write error
	  FAIL: ignored write error
	  $ emacs --batch --eval '(print (format "%20481d" 0))' > /dev/full \
	      && echo FAIL: ignored write error
	  FAIL: ignored write error
	* emacs.c (Fkill_emacs): Also test ferror.  (Bug#9574)

1109 1110 1111 1112 1113
2011-09-23  Andreas Schwab  <schwab@linux-m68k.org>

	* emacs.c (Fkill_emacs): In noninteractive mode exit
	non-successfully if a write error occurred on stdout.  (Bug#9574)

1114 1115 1116 1117 1118 1119 1120 1121
2011-09-21  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (pop_it): Allow it->object that is a cons cell to pass
	the xassert test.

	* dispextern.h (struct it): Update the comment documenting what
	can it->OBJECT be.

1122 1123 1124 1125 1126 1127 1128
2011-09-20  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (set_cursor_from_row): If the row ends in a newline from
	a display string, extend search for cursor position to end of row.
	(find_row_edges): If the row ends in a newline from a display
	string, increment its MATRIX_ROW_END_CHARPOS by one.  (Bug#9549)
	Handle the case of a display string with multiple newlines.
1129 1130 1131
	(Fcurrent_bidi_paragraph_direction): Fix search for previous
	non-empty line.  Fixes confusing cursor motion with arrow keys at
	the beginning of a line that starts with whitespace.
1132

1133 1134 1135 1136 1137
2011-09-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>

	* lread.c (Fread_from_string): Document what FINAL-STRING-INDEX is
	(bug#9493).

1138 1139 1140 1141 1142
2011-09-18  Chong Yidong  <cyd@stupidchicken.com>

	* xfns.c (Fx_create_frame): Handle the bitmapIcon resource as
	boolean (Bug#9154).

Eli Zaretskii's avatar
Eli Zaretskii committed
1143 1144 1145 1146 1147 1148 1149
2011-09-18  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (display_line): Record maximum and minimum buffer
	positions even if no glyphs were produced (e.g., by a zero-width
	stretch).  Fixes bug#9530 on a TTY.  Under word-wrap, don't record
	buffer positions that will be removed from the glyph row because
	they don't fit.
1150 1151 1152
	(produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
	column is beyond frame width: don't subtract 1 "pixel" when
	computing width of the stretch.
1153 1154 1155
	(reseat_at_next_visible_line_start): Undo the change made on
	2011-09-17 that saved paragraph information and restored it after
	the call to `reseat'.  (Bug#9545)
Eli Zaretskii's avatar
Eli Zaretskii committed
1156

1157
2011-09-18  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
1158 1159 1160 1161

	* xdisp.c (expose_window): Save original value of phys_cursor_on_p
	and turn window cursor on if cleared (Bug#9415).

1162
2011-09-18  Andreas Schwab  <schwab@linux-m68k.org>
1163 1164 1165 1166

	* search.c (boyer_moore): Take unibyte characters from pattern
	literally.  (Bug#9458)

1167 1168 1169 1170
2011-09-18  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (reseat_at_next_visible_line_start): Fix last change.

1171 1172
2011-09-18  Paul Eggert  <eggert@cs.ucla.edu>

1173 1174 1175 1176
	Fix minor problem found by static checking.
	* xdisp.c (reseat_at_next_visible_line_start): Mark locals as
	initialized, to pacify gcc -Wuninitialized.

1177 1178 1179 1180 1181
	* fileio.c: Report proper errno when syscall falls.
	(Finsert_file_contents): Save and restore errno,
	so that report_file_error outputs the correct diagnostic.
	(Fwrite_region) [CLASH_DETECTION]: Likewise.

1182 1183 1184 1185
2011-09-18  Eli Zaretskii  <eliz@gnu.org>

	* .gdbinit (pgx): Fix references to fields of `struct glyph'.

1186 1187 1188 1189 1190
2011-09-17  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (produce_stretch_glyph): Another fix for changes made on
	2011-08-30T17:32:44Z!eliz@gnu.org.  (Bug#9530)

1191 1192
2011-09-17  Eli Zaretskii  <eliz@gnu.org>

1193
	* xdisp.c (reseat_at_next_visible_line_start): Keep information
1194
	about the current paragraph and restore it after the call to reseat.
1195 1196 1197 1198 1199 1200 1201 1202

	* bidi.c (MAX_PARAGRAPH_SEARCH): New macro.
	(bidi_find_paragraph_start): Search back for paragraph beginning
	at most MAX_PARAGRAPH_SEARCH lines; if not found, return BEGV_BYTE.
	(bidi_move_to_visually_next): Only trigger paragraph-related
	computations when the last character is a newline or at EOB, not
	just any NEUTRAL_B.  (Bug#9470)

1203 1204 1205
	* xdisp.c (set_cursor_from_row): Don't invoke special treatment of
	truncated lines if point is covered by a display string.  (Bug#9524)

1206 1207 1208 1209 1210 1211 1212 1213
2011-09-16  Paul Eggert  <eggert@cs.ucla.edu>

	* xselect.c: Relax test for outgoing X longs (Bug#9498).
	(cons_to_x_long): New function.
	(lisp_data_to_selection_data): Use it.  Correct the test for
	short-versus-long data; it was negated.  Break out of vector
	loop, for efficiency, when a long datum is discovered.

1214 1215 1216 1217
2011-09-16  Stefan Monnier  <monnier@iro.umontreal.ca>

	* eval.c (Fquote): Document its non-consing behavior (bug#9482).

1218 1219 1220 1221 1222
2011-09-16  Eli Zaretskii  <eliz@gnu.org>

	* image.c (tiff_handler): Work around a bug in MinGW GCC 3.x (see
	GCC PR/17406) by declaring this function with external scope.

1223 1224 1225 1226 1227
2011-09-15  Paul Eggert  <eggert@cs.ucla.edu>

	* editfns.c (Fformat): Fix bug in text-property fix (Bug#9514).
	Don't mishandle (length (format "%%")) and (format "%4000s%%" "").

1228 1229 1230 1231
2011-09-15  Andreas Schwab  <schwab@linux-m68k.org>

	* editfns.c (Fformat): Correctly handle text properties on "%%".

1232 1233 1234 1235 1236 1237 1238 1239 1240 1241
2011-09-15  Eli Zaretskii  <eliz@gnu.org>

	* xterm.c (x_draw_composite_glyph_string_foreground):
	* w32term.c (x_draw_composite_glyph_string_foreground):
	* term.c (encode_terminal_code):
	* composite.c (composition_update_it, get_composition_id):
	* xdisp.c (get_next_display_element)
	(fill_composite_glyph_string): Add comments about special meaning
	of TAB characters in a composition.

1242 1243 1244
2011-09-15  Paul Eggert  <eggert@cs.ucla.edu>

	* editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
Paul Eggert's avatar
Paul Eggert committed
1245 1246
	This occurs when processing a multibyte format.
	Problem reported by Wolfgang Jenker.
1247

1248 1249 1250 1251 1252
2011-09-15  Johan Bockgård  <bojohan@gnu.org>

	* xdisp.c (try_cursor_movement): Only check for exact match if
	cursor hpos found by set_cursor_from_row is valid.  (Bug#9495)

Paul Eggert's avatar
Paul Eggert committed
1253 1254 1255 1256 1257 1258 1259 1260 1261 1262
2011-09-14  Paul Eggert  <eggert@cs.ucla.edu>

	Remove unused external symbols.
	* dispextern.h (calc_pixel_width_or_height): Remove decl.
	* xdisp.c (calc_pixel_width_or_height): Now static.
	* doprnt.c (exprintf) [! (HAVE_X_WINDOWS && USE_X_TOOLKIT)]: Remove.
	* indent.c (check_display_width):
	* w32term.c: Fix comment to match code.
	* xterm.c, xterm.h (x_catching_errors): Remove.

1263 1264 1265 1266 1267 1268 1269 1270 1271 1272
2011-09-14  Paul Eggert  <eggert@cs.ucla.edu>

	* xselect.c: Use signed conversions more consistently (Bug#9498).
	(selection_data_to_lisp_data): Assume incoming selection data are
	signed integers, not unsigned.  This is to be consistent with
	outgoing selection data, which was modified to use signed integers
	in as part of the fix to Bug#9196 in response to Jan D.'s comment
	in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
	expects long, not unsigned long.

1273 1274 1275 1276 1277 1278
2011-09-14  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (try_window_reusing_current_matrix): Fix incorrect
	computation of loop end.  Reported by Johan Bockgård
	<bojohan@gnu.org>.

1279 1280 1281 1282
2011-09-13  Chong Yidong  <cyd@stupidchicken.com>

	* frame.c (Fother_visible_frames_p): Function deleted.

1283 1284 1285 1286 1287
2011-09-12  Eli Zaretskii  <eliz@gnu.org>

	* indent.c (compute_motion): Process display vector front to back
	rather than the other way around.  (Bug#2496)

1288 1289 1290 1291
2011-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>

	* fileio.c (Finsert_file_contents): Don't assume beg_offset is 0.

1292 1293 1294 1295
2011-09-11  Chong Yidong  <cyd@stupidchicken.com>

	* minibuf.c (Fread_from_minibuffer): Doc fix.

1296 1297 1298 1299 1300
2011-09-11  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (produce_stretch_glyph): Fix a typo made in changes from
	2011-08-30T17:32:44Z!eliz@gnu.org.  (Bug#9475)

1301 1302 1303 1304 1305
2011-09-11  Lars Magne Ingebrigtsen  <larsi@gnus.org>

	* fileio.c (Fvisited_file_modtime): Document `(-1 65535)' as a
	value for non-existent files.

1306 1307 1308 1309 1310 1311 1312 1313
2011-09-11  Eli Zaretskii  <eliz@gnu.org>

	* fileio.c (Finsert_file_contents): If the file cannot be opened,
	set its "size" to -1.  This will set the modtime_size field of
	the corresponding buffer to -1, which is what
	verify-visited-file-modtime expects for files that do not exist.
	(Bug#9139)

1314 1315 1316 1317 1318 1319 1320 1321 1322
2011-09-11  Paul Eggert  <eggert@cs.ucla.edu>

	* keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls
	here ...
	* lisp.h: ... from here.  push_key_description is no longer
	defined in keyboard.c, so its declaration should not be in
	lisp.h's "Defined in keyboard.c" section, and KEY_DESCRIPTION_SIZE
	logically belongs with push_key_description.

1323 1324 1325 1326 1327 1328
2011-09-10  Paul Eggert  <eggert@cs.ucla.edu>

	* buffer.h: Include <sys/types.h> instead of <time.h>.
	Otherwise, off_t wasn't defined on FreeBSD 9.0-BETA2 i386.
	Problem reported by Herbert J. Skuhra.

1329 1330 1331 1332 1333
2011-09-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>

	* xml.c (parse_region): Make the parsing work for
	non-comment-starting XML files again (bug#9144).

1334 1335 1336 1337 1338
2011-09-10  Andreas Schwab  <schwab@linux-m68k.org>

	* image.c (gif_load): Fix calculation of bottom and right corner.
	(Bug#9468)

1339 1340 1341 1342 1343
2011-09-10  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (MAX_DISP_SCAN): Decrease to 250.  Prevents sluggish
	redisplay in small windows.

1344 1345 1346 1347
2011-09-09  Eli Zaretskii  <eliz@gnu.org>

	* frame.c (x_report_frame_params): Cast to avoid compiler warnings.

1348 1349 1350 1351 1352
2011-09-08  Martin Rudalics  <rudalics@gmx.at>

	* window.c (Fset_window_prev_buffers, Fset_window_next_buffers):
	Operate on live windows only.

1353 1354 1355 1356
2011-09-08  Juanma Barranquero  <lekktu@gmail.com>

	* emacs.c (my_heap_start): #ifdef to avoid warnings when unused.

1357 1358 1359 1360 1361
2011-09-07  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (move_it_in_display_line_to): Call RESTORE_IT on ppos_it
	only under bidi iteration.

1362 1363 1364 1365
2011-09-07  Jan Djärv  <jan.h.d@swipnet.se>

	* gtkutil.c (xg_make_tool_item): Insert comment about eventbox.

1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379
2011-09-06  Paul Eggert  <eggert@cs.ucla.edu>

	isnan: Fix porting problem to Solaris 10 with bundled gcc.
	Without this fix, the command to link temacs failed due to an
	undefined symbol __builtin_isnan.  This is because
	/usr/include/iso/math_c99.h #defines isnan(x) to
	__builtin_isnan(x), but the bundled gcc, which identifies itself
	as gcc 3.4.3 (csl-sol210-3_4-branch+sol_rpath), does not have
	a __builtin_isnan.
	* floatfns.c (isnan): #undef, and then #define to a clone of
	what's in data.c.
	(Fisnan): Always define, since it's always available now.
	(syms_of_floatfns): Always define isnan at the Lisp level.

Paul Eggert's avatar
Paul Eggert committed
1380
2011-09-06  Paul Eggert  <eggert@cs.ucla.edu>
Paul Eggert's avatar
Paul Eggert committed
1381 1382 1383

	* Makefile.in (gl-stamp): move-if-change now in build-aux (Bug#9169).

Paul Eggert's avatar
Paul Eggert committed
1384
2011-09-06  Paul Eggert  <eggert@cs.ucla.edu>
1385

Paul Eggert's avatar
Paul Eggert committed
1386
	* fileio.c: Fix bugs with large file offsets (Bug#9428).
1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402
	The previous code assumed that file offsets (off_t values) fit in
	EMACS_INT variables, which is not true on typical 32-bit hosts.
	The code messed up by falsely reporting buffer overflow in cases
	such as (insert-file-contents "big" nil 1 2) into an empty buffer
	when "big" contains more than 2**29 bytes, even though this
	inserts just one byte and does not overflow the buffer.
	(Finsert_file_contents): Store file offsets as off_t
	values, not as EMACS_INT values.  Check for overflow when
	converting between EMACS_INT and off_t.  When checking for
	buffer overflow or for overlap, take the offsets into account.
	Don't use EMACS_INT for small values where int suffices.
	When checking for overlap, fix a typo: ZV was used where
	ZV_BYTE was intended.
	(Fwrite_region): Don't assume off_t fits into 'long'.
	* buffer.h (struct buffer.modtime_size): Now off_t, not EMACS_INT.

1403 1404 1405 1406
2011-09-05  Michael Albinus  <michael.albinus@gmx.de>

	* dbusbind.c (xd_signature_cat): Rename from signature_cat.

Paul Eggert's avatar
Paul Eggert committed
1407
2011-09-04  Paul Eggert  <eggert@cs.ucla.edu>
Paul Eggert's avatar
Paul Eggert committed
1408

Paul Eggert's avatar
Paul Eggert committed
1409
	sprintf-related integer and memory overflow issues (Bug#9412).
1410 1411

	* doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
1412
	(esprintf, exprintf, evxprintf): New functions.
1413
	* keyboard.c (command_loop_level): Now EMACS_INT, not int.
1414
	(cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425
	(modify_event_symbol): Do not assume that the length of
	name_alist_or_stem is safe to alloca and fits in int.
	(Fexecute_extended_command): Likewise for function name and binding.
	(Frecursion_depth): Wrap around reliably on integer overflow.
	* keymap.c (push_key_description): First arg is now EMACS_INT, not int,
	since some callers pass EMACS_INT values.
	(Fsingle_key_description): Don't crash if symbol name contains more
	than MAX_ALLOCA bytes.
	* minibuf.c (minibuf_level): Now EMACS_INT, not int.
	(get_minibuffer): Arg is now EMACS_INT, not int.
	* lisp.h (get_minibuffer, push_key_description): Reflect API changes.
1426
	(esprintf, exprintf, evxprintf): New decls.
1427 1428
	* window.h (command_loop_level, minibuf_level): Reflect API changes.

1429 1430
	* dbusbind.c (signature_cat): New function.
	(xd_signature, Fdbus_register_signal):
1431 1432
	Do not overrun buffer; instead, report string overflow.

1433 1434 1435
	* dispnew.c (add_window_display_history): Don't overrun buffer.
	Truncate instead; this is OK since it's just a log.

1436 1437 1438 1439
	* editfns.c (Fcurrent_time_zone): Don't overrun buffer
	even if the time zone offset is outlandishly large.
	Don't mishandle offset == INT_MIN.

1440 1441 1442
	* emacs.c (main) [NS_IMPL_COCOA]: Don't overrun buffer
	when creating daemon; the previous buffer-overflow check was incorrect.

1443 1444 1445
	* eval.c (verror): Simplify by rewriting in terms of evxprintf,
	which has the guts of the old verror function.

1446 1447 1448
	* filelock.c (lock_file_1, lock_file): Don't blindly alloca long name;
	use SAFE_ALLOCA instead.  Use esprintf to avoid int-overflow issues.

1449 1450
	* font.c: Include <float.h>, for DBL_MAX_10_EXP.
	(font_unparse_xlfd): Don't blindly alloca long strings.
1451
	Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
1452
	fits in int, when using sprintf.  Use single snprintf to count
1453 1454 1455 1456 1457 1458
	length of string rather than counting it via multiple sprintfs;
	that's simpler and more reliable.
	(font_unparse_fcname): Use it to avoid sprintf buffer overrun.
	(generate_otf_features) [0 && HAVE_LIBOTF]: Use esprintf, not
	sprintf, in case result does not fit in int.

1459 1460 1461
	* fontset.c (num_auto_fontsets): Now printmax_t, not int.
	(fontset_from_font): Print it.

1462 1463 1464 1465 1466 1467 1468 1469 1470 1471
	* frame.c (tty_frame_count): Now printmax_t, not int.
	(make_terminal_frame, set_term_frame_name): Print it.
	(x_report_frame_params): In X, window IDs are unsigned long,
	not signed long, so print them as unsigned.
	(validate_x_resource_name): Check for implausibly long names,
	and don't assume name length fits in 'int'.
	(x_get_resource_string): Don't blindly alloca invocation name;
	use SAFE_ALLOCA.  Use esprintf, not sprintf, in case result does
	not fit in int.

1472 1473
	* gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
	(xg_check_special_colors, xg_set_geometry):
1474 1475
	Make sprintf buffers a bit bigger, to avoid potential buffer overrun.

1476 1477 1478
	* lread.c (dir_warning): Don't blindly alloca buffer; use SAFE_ALLOCA.
	Use esprintf, not sprintf, in case result does not fit in int.

1479 1480 1481 1482 1483 1484
	* macros.c (executing_kbd_macro_iterations): Now EMACS_INT, not int.
	(Fend_kbd_macro): Don't mishandle MOST_NEGATIVE_FIXNUM by treating
	it as a large positive number.
	(Fexecute_kbd_macro): Don't assume repeat count fits in int.
	* macros.h (executing_kbd_macro_iterations): Now EMACS_INT, not int.

1485 1486 1487
	* nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
	in case result does not fit in int.

1488 1489 1490 1491 1492 1493 1494 1495
	* print.c (float_to_string): Detect width overflow more reliably.
	(print_object): Make sprintf buffer a bit bigger, to avoid potential
	buffer overrun.  Don't assume list length fits in 'int'.  Treat
	print length of 0 as 0, not as infinity; to be consistent with other
	uses of print length in this function.  Don't overflow print length
	index.  Don't assume hash table size fits in 'long', or that
	vectorlike size fits in 'unsigned long'.

1496 1497 1498
	* process.c (make_process): Use printmax_t, not int, to format
	process-name gensyms.

1499 1500
	* sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.

1501 1502 1503
	* term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
	to avoid potential buffer overrun.

1504 1505 1506
	* xfaces.c (x_update_menu_appearance): Don't overrun buffer
	if X resource line is longer than 512 bytes.

1507 1508 1509
	* xfns.c (x_window): Make sprintf buffer a bit bigger
	to avoid potential buffer overrun.

1510 1511
	* xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.

1512 1513
	* xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.

1514 1515
2011-09-04  Paul Eggert  <eggert@cs.ucla.edu>

1516
	Integer overflow fixes for scrolling, etc.
Paul Eggert's avatar
Paul Eggert committed
1517 1518
	Without these, Emacs silently mishandles large integers sometimes.
	For example, "C-u 4294967297 M-x recenter" was treated as if
1519 1520
	it were "C-u 1 M-x recenter" on a typical 64-bit host.

Paul Eggert's avatar
Paul Eggert committed
1521 1522
	* xdisp.c (try_window_id): Check Emacs fixnum range before
	converting to 'int'.
Paul Eggert's avatar
Paul Eggert committed
1523

Paul Eggert's avatar
Paul Eggert committed
1524
	* window.c (window_scroll_line_based, Frecenter):
1525 1526 1527 1528 1529 1530 1531 1532
	Check that an Emacs fixnum is in range before assigning it to 'int'.
	(Frecenter, Fmove_to_window_line): Use EMACS_INT, not int, for
	values converted from Emacs fixnums.
	(Frecenter): Don't wrap around a line count if it is out of 'int'
	range; instead, treat it as an extreme value.
	(Fset_window_configuration, compare_window_configurations):
	Use ptrdiff_t, not int, for index that might exceed 2 GiB.

Paul Eggert's avatar
Paul Eggert committed
1533 1534 1535
	* search.c (Freplace_match): Use ptrdiff_t, not int, for indexes
	that can exceed INT_MAX.  Check that EMACS_INT value is in range
	before assigning it to the (possibly-narrower) index.