ChangeLog 340 KB
Newer Older
1 2 3 4 5 6
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.

7 8 9 10 11
2011-11-20  Andreas Schwab  <schwab@linux-m68k.org>

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

12 13 14 15 16
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
17 18 19 20 21
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
22
2011-11-20  Paul Eggert  <eggert@cs.ucla.edu>
23

24 25 26
	Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
	Otherwise, valgrind does not work on some platforms.
	Problem reported by Andreas Schwab in
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
	<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.

42 43 44 45 46 47 48 49 50 51 52
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)

53 54 55 56 57 58
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.

59 60 61 62
2011-11-18  Dmitry Antipov  <dmantipov@yandex.ru>

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

63 64 65 66 67
2011-11-18  Stefan Monnier  <monnier@iro.umontreal.ca>

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

68 69 70 71 72 73
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)
74
	(add_row_entry): Add xassert to verify that ROW's hash code is valid.
75 76 77 78 79 80 81 82 83 84 85

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

86 87 88 89 90
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
91 92 93 94
2011-11-17  Juanma Barranquero  <lekktu@gmail.com>

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

95 96 97 98 99 100 101
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
102 103
2011-11-16  Juanma Barranquero  <lekktu@gmail.com>

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

107 108 109 110 111 112 113 114 115 116 117
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
118 119 120 121
2011-11-15  Juanma Barranquero  <lekktu@gmail.com>

	* image.c (imagemagick_load_image): Fix typo.

122 123 124 125 126 127 128 129
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
130 131 132 133 134
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).

135 136
2011-11-12  Eli Zaretskii  <eliz@gnu.org>

137 138 139 140 141
	* 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.

142 143
	* dispnew.c (scrolling_window): Fix incorrect indices in accessing
	current_matrix and desired_matrix.  (Bug#9990)
144 145 146
	(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.
147

Martin Rudalics's avatar
Martin Rudalics committed
148 149 150 151 152 153 154 155 156 157 158
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
159 160 161 162 163 164 165
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).

166 167
2011-11-11  Dmitry Antipov  <dmantipov@yandex.ru>

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

170 171 172 173 174
2011-11-11  Kenichi Handa  <handa@m17n.org>

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

175 176 177 178 179
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).

180 181 182 183 184
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.

185 186 187 188
2011-11-08  Paul Eggert  <eggert@cs.ucla.edu>

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

189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
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.

209 210 211 212 213 214 215 216
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.

217 218 219 220 221
2011-11-07  Juanma Barranquero  <lekktu@gmail.com>

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

222 223 224 225 226 227
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.

228 229 230 231 232 233 234 235 236 237 238 239 240
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.

241 242 243 244 245 246 247
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.

248 249 250 251 252 253 254 255 256 257 258
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).

259
2011-11-06  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
260 261 262 263 264

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

265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282
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.

283 284 285 286 287
2011-11-06  Andreas Schwab  <schwab@linux-m68k.org>

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

288 289 290 291 292 293 294
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.

295 296 297 298 299 300 301 302 303 304 305 306 307
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.

308 309 310 311 312
2011-11-05  Christoph Scholtes  <cschol2112@googlemail.com>

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

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

322 323
2011-11-05  Eli Zaretskii  <eliz@gnu.org>

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

327 328 329 330
	* w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
	initialization code to keep similarity to xfns.c after changes
	from 2011-11-05.

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

333 334 335 336 337 338 339 340 341 342 343
	* 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.

344 345 346 347 348 349
	* 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).

350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367
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
368
2011-11-05  Fabrice Popineau  <fabrice.popineau@supelec.fr>  (tiny change)
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384

	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.

385 386 387 388 389 390
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)

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

393
	* gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
394 395 396 397
	label is not null (Bug#9951).
	(xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
	may be NULL.

398 399 400 401 402
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)

403 404
2011-11-03  Eli Zaretskii  <eliz@gnu.org>

405 406
	* xdisp.c (note_mouse_highlight): Initialize `area'.  (Bug#9947)

407
	* w32fns.c (unwind_create_frame): If needed, free the glyph
408
	matrices of the partially constructed frame.  (Bug#9943)
Eli Zaretskii's avatar
Eli Zaretskii committed
409
	* xfns.c (unwind_create_frame): Likewise.
410

411 412 413 414 415
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.
416 417
	(mouse_face_from_buffer_pos, note_mouse_highlight): Rename
	cover_string to disp_string.
418

419 420 421 422 423 424
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.

425 426 427 428 429
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
430
2011-10-30  Adam Sjøgren  <asjo@koldfront.dk>  (tiny change)
Jan Djärv's avatar
Jan Djärv committed
431 432 433 434

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

436 437 438
	* gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
	type to GDK_NOTHING so valgrind does not complain (Bug#9901).

439 440 441 442 443 444 445 446 447 448 449
	* 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.

450 451 452 453 454 455
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.

456 457 458 459
2011-10-29  Andreas Schwab  <schwab@linux-m68k.org>

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

460 461 462 463
2011-10-29  Eli Zaretskii  <eliz@gnu.org>

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

467 468
2011-10-29  Kim Storm  <storm@cua.dk>

469 470
	* alloc.c (which_symbols): New function.

Andreas Schwab's avatar
Andreas Schwab committed
471 472 473 474 475
2011-10-29  Andreas Schwab  <schwab@linux-m68k.org>

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

476 477 478 479 480
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)

481 482 483 484 485 486
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.

487 488 489 490
2011-10-28  Chong Yidong  <cyd@gnu.org>

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

491 492 493 494
2011-10-28  Dan Nicolaescu  <dann@ics.uci.edu>

	* window.c (make_window): Initialize phys_cursor_on_p.

495 496 497 498
2011-10-28  Stefan Monnier  <monnier@iro.umontreal.ca>

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

499 500 501 502
2011-10-28  Juanma Barranquero  <lekktu@gmail.com>

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

503 504 505 506 507 508 509 510 511 512 513
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)
514 515 516 517
	(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
518 519 520 521 522 523
	instead of calling the "wide" APIs directly.

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

	* w32.h (syms_of_w32font): Add prototype.

524 525 526 527 528 529 530
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
531 532 533 534 535 536 537 538 539 540 541
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.

542 543
2011-10-27  Chong Yidong  <cyd@gnu.org>

544 545
	* gnutls.c (emacs_gnutls_deinit): New function.
	Deallocate credentials structures as well as calling gnutls_deinit.
546 547 548 549 550
	(Fgnutls_deinit, Fgnutls_boot): Use it.

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

551 552 553 554 555 556 557
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.

558 559 560 561
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
562
	(Fw32_default_color_map, Fx_open_connection): Use it.  (Bug#9785)
563

564 565 566 567
2011-10-25  Paul Eggert  <eggert@cs.ucla.edu>

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

568 569 570 571 572
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'.

573 574 575 576 577
2011-10-25  Enami Tsugutomo  <tsugutomo.enami@jp.sony.com>

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

578 579 580 581 582 583 584 585 586 587 588 589 590
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.

591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611
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.

612 613 614 615
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.
616 617 618 619
	(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.
620 621
	(Bug#9771, part 2)

622 623 624 625 626
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.

627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645
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.

646 647 648 649 650
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)
651 652 653
	(move_it_vertically_backward): Don't look for character position
	immediately after the newline when in a continuation line.
	(Bug#9771, part 1)
654

655 656 657 658 659
2011-10-15  Martin Rudalics  <rudalics@gmx.at>

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

660 661 662 663 664
2011-10-14  Stefan Monnier  <monnier@iro.umontreal.ca>

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

665 666 667 668 669
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.

670 671 672 673 674 675 676 677 678
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.

679 680 681 682 683 684
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)

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

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

689 690
2011-10-12  Eli Zaretskii  <eliz@gnu.org>

691 692 693 694
	* bidi.c (bidi_level_of_next_char):
	* xdisp.c (get_visually_first_element): Remove old incorrect
	comments regarding the Unicode Line Separator character.

695 696
	* bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.

697 698 699 700 701 702
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.

703 704
2011-10-12  Paul Eggert  <eggert@cs.ucla.edu>

705 706 707
	* xdisp.c (set_cursor_from_row): Simplify conditionals,
	to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.

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

711 712 713 714 715 716
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.

717 718 719 720
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
721 722 723 724 725
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)

726 727
2011-10-08  Eli Zaretskii  <eliz@gnu.org>

728 729
	* xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
	lines.
730 731
	(set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
	lines that are hscrolled on the left.
732

733 734 735
	* dispnew.c (buffer_posn_from_coords): Account for a possible
	presence of header-line.  (Bug#4426)

736 737
2011-10-07  Stefan Monnier  <monnier@iro.umontreal.ca>

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

741 742 743 744 745 746 747 748 749 750 751 752
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.

753 754 755 756 757 758
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.

759 760
2011-10-02  Stefan Monnier  <monnier@iro.umontreal.ca>

761 762 763 764
	* 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.

765 766 767
	* minibuf.c (Finternal_complete_buffer): Only show internal buffers if
	they've been requested explicitly (bug#9591).

Chong Yidong's avatar
Chong Yidong committed
768
2011-10-01  Andreas Schwab  <schwab@linux-m68k.org>
769 770 771 772 773

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

774 775
2011-09-30  Paul Eggert  <eggert@cs.ucla.edu>

776 777 778 779 780 781 782 783
	* 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.

784 785 786 787 788 789 790 791 792 793 794 795 796 797
	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.

798 799 800 801 802 803
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).

804 805
2011-09-30  Paul Eggert  <eggert@cs.ucla.edu>

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

810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827
	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
828 829
2011-09-29  Eli Zaretskii  <eliz@gnu.org>

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

833 834 835 836 837 838 839 840 841
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
842 843 844 845
2011-09-28  Juanma Barranquero  <lekktu@gmail.com>

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

846 847 848 849 850
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)
851 852
	(BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
	TO_CHARPOS if the bidi iterator is at base embedding level.
853

854 855 856 857 858
2011-09-27  Andreas Schwab  <schwab@linux-m68k.org>

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

859 860 861 862 863
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)

864 865 866 867
2011-09-25  Glenn Morris  <rgm@gnu.org>

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

868 869 870 871 872
2011-09-24  Chong Yidong  <cyd@stupidchicken.com>

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

873 874 875 876
2011-09-24  Glenn Morris  <rgm@gnu.org>

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

877 878
2011-09-24  Paul Eggert  <eggert@cs.ucla.edu>

879 880
	Fix minor problems found by static checking.
	* xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
881 882
	* indent.c (Fvertical_motion): Fix == vs = typo.

883 884
2011-09-24  Eli Zaretskii  <eliz@gnu.org>

885 886
	* dispnew.c (syms_of_display) <redisplay-dont-pause>:
	Default value is now t.  Doc fix.
887

888
	* indent.c (Fvertical_motion): Compute and apply the overshoot
889
	logic when moving up, not only when moving down.  Fix the
890
	confusing name and values of the it_overshoot_expected variable;
891
	logic changes accordingly.  (Bug#9254) (Bug#9549)
892 893 894 895 896 897

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

898 899 900 901
2011-09-24  Michael Albinus  <michael.albinus@gmx.de>

	* dbusbind.c (Fdbus_register_signal): Add match rule to
	Vdbus_registered_objects_table.  (Bug#9581)
902 903
	(Fdbus_register_method, Vdbus_registered_objects_table):
	Fix docstring.
904

905 906
2011-09-24  Jim Meyering  <meyering@redhat.com>

907
	do not ignore write error for any output size
908 909 910 911 912 913 914 915 916 917 918 919
	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)

920 921 922 923 924
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)

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

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

944 945 946 947 948
2011-09-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>

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

949 950 951 952 953
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
954 955 956 957 958 959 960
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.
961 962 963
	(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.
964 965 966
	(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
967

968
2011-09-18  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
969 970 971 972

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

973
2011-09-18  Andreas Schwab  <schwab@linux-m68k.org>
974 975 976 977

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

978 979 980 981
2011-09-18  Eli Zaretskii  <eliz@gnu.org>

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

982 983
2011-09-18  Paul Eggert  <eggert@cs.ucla.edu>

984 985 986 987
	Fix minor problem found by static checking.
	* xdisp.c (reseat_at_next_visible_line_start): Mark locals as
	initialized, to pacify gcc -Wuninitialized.

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

993 994 995 996
2011-09-18  Eli Zaretskii  <eliz@gnu.org>

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

997 998 999 1000 1001
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)

1002 1003
2011-09-17  Eli Zaretskii  <eliz@gnu.org>

1004
	* xdisp.c (reseat_at_next_visible_line_start): Keep information
1005
	about the current paragraph and restore it after the call to reseat.
1006 1007 1008 1009 1010 1011 1012 1013

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

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

1017 1018 1019 1020 1021 1022 1023 1024
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.

1025 1026 1027 1028
2011-09-16  Stefan Monnier  <monnier@iro.umontreal.ca>

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

1029 1030 1031 1032 1033
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.

1034 1035 1036 1037 1038
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%%" "").

1039 1040 1041 1042
2011-09-15  Andreas Schwab  <schwab@linux-m68k.org>

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

1043 1044 1045 1046 1047 1048 1049 1050 1051 1052
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.

1053 1054 1055
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
1056 1057
	This occurs when processing a multibyte format.
	Problem reported by Wolfgang Jenker.
1058

1059 1060 1061 1062 1063
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
1064 1065 1066 1067 1068 1069 1070 1071 1072 1073
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.

1074 1075 1076 1077 1078 1079 1080 1081 1082 1083
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.

1084 1085 1086 1087 1088 1089
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>.

1090 1091 1092 1093
2011-09-13  Chong Yidong  <cyd@stupidchicken.com>

	* frame.c (Fother_visible_frames_p): Function deleted.

1094 1095 1096 1097 1098
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)

1099 1100 1101 1102
2011-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>

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

1103 1104 1105 1106
2011-09-11  Chong Yidong  <cyd@stupidchicken.com>

	* minibuf.c (Fread_from_minibuffer): Doc fix.

1107 1108 1109 1110 1111
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)

1112 1113 1114 1115 1116
2011-09-11  Lars Magne Ingebrigtsen  <larsi@gnus.org>

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

1117 1118 1119 1120 1121 1122 1123 1124
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)

1125 1126 1127 1128 1129 1130 1131 1132 1133
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.

1134 1135 1136 1137 1138 1139
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.

1140 1141 1142 1143 1144
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).

1145 1146 1147 1148 1149
2011-09-10  Andreas Schwab  <schwab@linux-m68k.org>

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

1150 1151 1152 1153 1154
2011-09-10  Eli Zaretskii  <eliz@gnu.org>

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

1155 1156 1157 1158
2011-09-09  Eli Zaretskii  <eliz@gnu.org>

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

1159 1160 1161 1162 1163
2011-09-08  Martin Rudalics  <rudalics@gmx.at>

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

1164 1165 1166 1167
2011-09-08  Juanma Barranquero  <lekktu@gmail.com>

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

1168 1169 1170 1171 1172
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.

1173 1174 1175 1176
2011-09-07  Jan Djärv  <jan.h.d@swipnet.se>

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

1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190
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
1191
2011-09-06  Paul Eggert  <eggert@cs.ucla.edu>
Paul Eggert's avatar
Paul Eggert committed
1192 1193 1194

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

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

Paul Eggert's avatar
Paul Eggert committed
1197
	* fileio.c: Fix bugs with large file offsets (Bug#9428).
1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213
	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.

1214 1215 1216 1217
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
1218
2011-09-04  Paul Eggert  <eggert@cs.ucla.edu>
Paul Eggert's avatar
Paul Eggert committed
1219

Paul Eggert's avatar
Paul Eggert committed
1220
	sprintf-related integer and memory overflow issues (Bug#9412).
1221 1222

	* doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
1223
	(esprintf, exprintf, evxprintf): New functions.
1224
	* keyboard.c (command_loop_level): Now EMACS_INT, not int.
1225
	(cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236
	(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.
1237
	(esprintf, exprintf, evxprintf): New decls.
1238 1239
	* window.h (command_loop_level, minibuf_level): Reflect API changes.

1240 1241
	* dbusbind.c (signature_cat): New function.
	(xd_signature, Fdbus_register_signal):
1242 1243
	Do not overrun buffer; instead, report string overflow.

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

1247 1248 1249 1250
	* editfns.c (Fcurrent_time_zone): Don't overrun buffer
	even if the time zone offset is outlandishly large.
	Don't mishandle offset == INT_MIN.

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

1254 1255 1256
	* eval.c (verror): Simplify by rewriting in terms of evxprintf,
	which has the guts of the old verror function.

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

1260 1261
	* font.c: Include <float.h>, for DBL_MAX_10_EXP.
	(font_unparse_xlfd): Don't blindly alloca long strings.
1262
	Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
1263
	fits in int, when using sprintf.  Use single snprintf to count
1264 1265 1266 1267 1268 1269
	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.

1270 1271 1272
	* fontset.c (num_auto_fontsets): Now printmax_t, not int.
	(fontset_from_font): Print it.

1273 1274 1275 1276 1277 1278 1279 1280 1281 1282
	* 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.

1283 1284
	* gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
	(xg_check_special_colors, xg_set_geometry):
1285 1286
	Make sprintf buffers a bit bigger, to avoid potential buffer overrun.

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

1290 1291 1292 1293 1294 1295
	* 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.

1296 1297 1298
	* nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
	in case result does not fit in int.

1299 1300 1301 1302 1303 1304 1305 1306
	* 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'.

1307 1308 1309
	* process.c (make_process): Use printmax_t, not int, to format
	process-name gensyms.

1310 1311
	* sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.

1312 1313 1314
	* term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
	to avoid potential buffer overrun.

1315 1316 1317
	* xfaces.c (x_update_menu_appearance): Don't overrun buffer
	if X resource line is longer than 512 bytes.

1318 1319 1320
	* xfns.c (x_window): Make sprintf buffer a bit bigger
	to avoid potential buffer overrun.

1321 1322
	* xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.

1323 1324
	* xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.

1325 1326
2011-09-04  Paul Eggert  <eggert@cs.ucla.edu>

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

Paul Eggert's avatar
Paul Eggert committed
1332 1333
	* xdisp.c (try_window_id): Check Emacs fixnum range before
	converting to 'int'.
Paul Eggert's avatar
Paul Eggert committed
1334

Paul Eggert's avatar
Paul Eggert committed
1335
	* window.c (window_scroll_line_based, Frecenter):
1336 1337 1338 1339 1340 1341 1342 1343
	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
1344 1345 1346
	* 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.
1347 1348
	(match_limit): Don't assume that a fixnum can fit in 'int'.

Paul Eggert's avatar
Paul Eggert committed
1349
	* print.c (print_object): Use ptrdiff_t, not int, for index that can
Paul Eggert's avatar
Paul Eggert committed
1350 1351
	exceed INT_MAX.

Paul Eggert's avatar
Paul Eggert committed
1352
	* indent.c (position_indentation): Now takes ptrdiff_t, not int.
1353 1354 1355 1356
	(Fvertical_motion): Don't wrap around LINES values that don't fit
	in 'int'.  Instead, treat them as extreme values.  This is good
	enough for windows, which can't have more than INT_MAX lines anyway.

1357 1358
2011-09-03  Lars Magne Ingebrigtsen  <larsi@gnus.org>

1359 1360
	* Require libxml/parser.h to avoid compilation warning.

1361 1362 1363 1364 1365
	* emacs.c (shut_down_emacs): Call xmlCleanupParser on shutdown.

	* xml.c (parse_region): Don't call xmlCleanupParser after parsing,
	since this reportedly can destroy thread storage.

1366 1367 1368 1369 1370
2011-08-30  Chong Yidong  <cyd@stupidchicken.com>

	* syntax.c (find_defun_start): Update all cache variables if
	exiting early (Bug#9401).

1371 1372
2011-08-30  Eli Zaretskii  <eliz@gnu.org>

1373 1374
	* image.c (x_bitmap_pixmap): Cast to int to avoid compiler warnings.