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

10 11 12 13
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.
14
	(wait_reading_process_output): Add comment and URL.
15

16 17 18 19
2011-11-21  Jan Djärv  <jan.h.d@swipnet.se>

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

20 21 22 23
2011-11-21  Chong Yidong  <cyd@gnu.org>

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

24 25 26 27
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
28 29 30 31
2011-11-20  Juanma Barranquero  <lekktu@gmail.com>

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

32 33 34 35 36 37
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.

38 39 40 41 42
2011-11-20  Andreas Schwab  <schwab@linux-m68k.org>

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

43 44 45 46 47
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
48 49 50 51 52
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
53
2011-11-20  Paul Eggert  <eggert@cs.ucla.edu>
54

55 56 57
	Standardize on VIRT_ADDR_VARIES behavior (Bug#10042).
	Otherwise, valgrind does not work on some platforms.
	Problem reported by Andreas Schwab in
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
	<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.

73 74 75 76 77 78 79 80 81 82 83
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)

84 85 86 87 88 89
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.

90 91 92 93
2011-11-18  Dmitry Antipov  <dmantipov@yandex.ru>

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

94 95 96 97 98
2011-11-18  Stefan Monnier  <monnier@iro.umontreal.ca>

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

99 100 101 102 103 104
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)
105
	(add_row_entry): Add xassert to verify that ROW's hash code is valid.
106 107 108 109 110 111 112 113 114 115 116

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

117 118 119 120 121
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
122 123 124 125
2011-11-17  Juanma Barranquero  <lekktu@gmail.com>

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

126 127 128 129 130 131 132
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
133 134
2011-11-16  Juanma Barranquero  <lekktu@gmail.com>

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

138 139 140 141 142 143 144 145 146 147 148
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
149 150 151 152
2011-11-15  Juanma Barranquero  <lekktu@gmail.com>

	* image.c (imagemagick_load_image): Fix typo.

153 154 155 156 157 158 159 160
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
161 162 163 164 165
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).

166 167
2011-11-12  Eli Zaretskii  <eliz@gnu.org>

168 169 170 171 172
	* 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.

173 174
	* dispnew.c (scrolling_window): Fix incorrect indices in accessing
	current_matrix and desired_matrix.  (Bug#9990)
175 176 177
	(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.
178

Martin Rudalics's avatar
Martin Rudalics committed
179 180 181 182 183 184 185 186 187 188 189
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
190 191 192 193 194 195 196
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).

197 198
2011-11-11  Dmitry Antipov  <dmantipov@yandex.ru>

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

201 202 203 204 205
2011-11-11  Kenichi Handa  <handa@m17n.org>

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

206 207 208 209 210
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).

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

216 217 218 219
2011-11-08  Paul Eggert  <eggert@cs.ucla.edu>

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

220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
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.

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

248 249 250 251 252
2011-11-07  Juanma Barranquero  <lekktu@gmail.com>

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

253 254 255 256 257 258
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.

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

272 273 274 275 276 277 278
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.

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

290
2011-11-06  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
291 292 293 294 295

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

296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313
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.

314 315 316 317 318
2011-11-06  Andreas Schwab  <schwab@linux-m68k.org>

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

319 320 321 322 323 324 325
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.

326 327 328 329 330 331 332 333 334 335 336 337 338
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.

339 340 341 342 343
2011-11-05  Christoph Scholtes  <cschol2112@googlemail.com>

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

344 345 346 347 348 349 350 351 352
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.

353 354
2011-11-05  Eli Zaretskii  <eliz@gnu.org>

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

358 359 360 361
	* w32fns.c (x_create_tip_frame, Fx_create_frame): Rearrange
	initialization code to keep similarity to xfns.c after changes
	from 2011-11-05.

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

364 365 366 367 368 369 370 371 372 373 374
	* 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.

375 376 377 378 379 380
	* 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).

381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398
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
399
2011-11-05  Fabrice Popineau  <fabrice.popineau@supelec.fr>  (tiny change)
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415

	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.

416 417 418 419 420 421
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)

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

424
	* gtkutil.c (xg_make_tool_item): Add callbacks if one of wimage or
425 426 427 428
	label is not null (Bug#9951).
	(xg_tool_item_stale_p): Handle the fact that wimage and/or wlbl
	may be NULL.

429 430 431 432 433
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)

434 435
2011-11-03  Eli Zaretskii  <eliz@gnu.org>

436 437
	* xdisp.c (note_mouse_highlight): Initialize `area'.  (Bug#9947)

438
	* w32fns.c (unwind_create_frame): If needed, free the glyph
439
	matrices of the partially constructed frame.  (Bug#9943)
Eli Zaretskii's avatar
Eli Zaretskii committed
440
	* xfns.c (unwind_create_frame): Likewise.
441

442 443 444 445 446
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.
447 448
	(mouse_face_from_buffer_pos, note_mouse_highlight): Rename
	cover_string to disp_string.
449

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

456 457 458 459 460
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
461
2011-10-30  Adam Sjøgren  <asjo@koldfront.dk>  (tiny change)
Jan Djärv's avatar
Jan Djärv committed
462 463 464 465

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

467 468 469
	* gtkutil.c (xg_win_to_widget, xg_event_is_for_menubar): Initialize
	type to GDK_NOTHING so valgrind does not complain (Bug#9901).

470 471 472 473 474 475 476 477 478 479 480
	* 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.

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

487 488 489 490
2011-10-29  Andreas Schwab  <schwab@linux-m68k.org>

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

491 492 493 494
2011-10-29  Eli Zaretskii  <eliz@gnu.org>

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

498 499
2011-10-29  Kim Storm  <storm@cua.dk>

500 501
	* alloc.c (which_symbols): New function.

Andreas Schwab's avatar
Andreas Schwab committed
502 503 504 505 506
2011-10-29  Andreas Schwab  <schwab@linux-m68k.org>

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

507 508 509 510 511
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)

512 513 514 515 516 517
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.

518 519 520 521
2011-10-28  Chong Yidong  <cyd@gnu.org>

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

522 523 524 525
2011-10-28  Dan Nicolaescu  <dann@ics.uci.edu>

	* window.c (make_window): Initialize phys_cursor_on_p.

526 527 528 529
2011-10-28  Stefan Monnier  <monnier@iro.umontreal.ca>

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

530 531 532 533
2011-10-28  Juanma Barranquero  <lekktu@gmail.com>

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

534 535 536 537 538 539 540 541 542 543 544
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)
545 546 547 548
	(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
549 550 551 552 553 554
	instead of calling the "wide" APIs directly.

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

	* w32.h (syms_of_w32font): Add prototype.

555 556 557 558 559 560 561
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
562 563 564 565 566 567 568 569 570 571 572
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.

573 574
2011-10-27  Chong Yidong  <cyd@gnu.org>

575 576
	* gnutls.c (emacs_gnutls_deinit): New function.
	Deallocate credentials structures as well as calling gnutls_deinit.
577 578 579 580 581
	(Fgnutls_deinit, Fgnutls_boot): Use it.

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

582 583 584 585 586 587 588
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.

589 590 591 592
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
593
	(Fw32_default_color_map, Fx_open_connection): Use it.  (Bug#9785)
594

595 596 597 598
2011-10-25  Paul Eggert  <eggert@cs.ucla.edu>

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

599 600 601 602 603
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'.

604 605 606 607 608
2011-10-25  Enami Tsugutomo  <tsugutomo.enami@jp.sony.com>

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

609 610 611 612 613 614 615 616 617 618 619 620 621
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.

622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642
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.

643 644 645 646
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.
647 648 649 650
	(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.
651 652
	(Bug#9771, part 2)

653 654 655 656 657
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.

658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676
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.

677 678 679 680 681
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)
682 683 684
	(move_it_vertically_backward): Don't look for character position
	immediately after the newline when in a continuation line.
	(Bug#9771, part 1)
685

686 687 688 689 690
2011-10-15  Martin Rudalics  <rudalics@gmx.at>

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

691 692 693 694 695
2011-10-14  Stefan Monnier  <monnier@iro.umontreal.ca>

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

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

701 702 703 704 705 706 707 708 709
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.

710 711 712 713 714 715
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)

716 717 718 719
2011-10-12  Stefan Monnier  <monnier@iro.umontreal.ca>

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

720 721
2011-10-12  Eli Zaretskii  <eliz@gnu.org>

722 723 724 725
	* bidi.c (bidi_level_of_next_char):
	* xdisp.c (get_visually_first_element): Remove old incorrect
	comments regarding the Unicode Line Separator character.

726 727
	* bidi.c (bidi_init_it): Initialize paragraph_dir to NEUTRAL_DIR.

728 729 730 731 732 733
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.

734 735
2011-10-12  Paul Eggert  <eggert@cs.ucla.edu>

736 737 738
	* xdisp.c (set_cursor_from_row): Simplify conditionals,
	to pacify GCC 4.6.1 x86-64 with -O2 -Wstrict-overflow.

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

742 743 744 745 746 747
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.

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

757 758
2011-10-08  Eli Zaretskii  <eliz@gnu.org>

759 760
	* xdisp.c (hscroll_window_tree): Support hscroll in right-to-left
	lines.
761 762
	(set_cursor_from_row): Fix cursor positioning in mixed L2R+R2L
	lines that are hscrolled on the left.
763

764 765 766
	* dispnew.c (buffer_posn_from_coords): Account for a possible
	presence of header-line.  (Bug#4426)

767 768
2011-10-07  Stefan Monnier  <monnier@iro.umontreal.ca>

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

772 773 774 775 776 777 778 779 780 781 782 783
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.

784 785 786 787 788 789
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.

790 791
2011-10-02  Stefan Monnier  <monnier@iro.umontreal.ca>

792 793 794 795
	* 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.

796 797 798
	* minibuf.c (Finternal_complete_buffer): Only show internal buffers if
	they've been requested explicitly (bug#9591).

Chong Yidong's avatar
Chong Yidong committed
799
2011-10-01  Andreas Schwab  <schwab@linux-m68k.org>
800 801 802 803 804

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

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

807 808 809 810 811 812 813 814
	* 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.

815 816 817 818 819 820 821 822 823 824 825 826 827 828
	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.

829 830 831 832 833 834
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).

835 836
2011-09-30  Paul Eggert  <eggert@cs.ucla.edu>

837 838 839 840
	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.

841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858
	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
859 860
2011-09-29  Eli Zaretskii  <eliz@gnu.org>

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

864 865 866 867 868 869 870 871 872
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
873 874 875 876
2011-09-28  Juanma Barranquero  <lekktu@gmail.com>

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

877 878 879 880 881
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)
882 883
	(BUFFER_POS_REACHED_P, move_it_in_display_line_to): Bail when past
	TO_CHARPOS if the bidi iterator is at base embedding level.
884

885 886 887 888 889
2011-09-27  Andreas Schwab  <schwab@linux-m68k.org>

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

890 891 892 893 894
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)

895 896 897 898
2011-09-25  Glenn Morris  <rgm@gnu.org>

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

899 900 901 902 903
2011-09-24  Chong Yidong  <cyd@stupidchicken.com>

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

904 905 906 907
2011-09-24  Glenn Morris  <rgm@gnu.org>

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

908 909
2011-09-24  Paul Eggert  <eggert@cs.ucla.edu>

910 911
	Fix minor problems found by static checking.
	* xdisp.c (string_from_display_spec): Don't assume vecsize fits in int.
912 913
	* indent.c (Fvertical_motion): Fix == vs = typo.

914 915
2011-09-24  Eli Zaretskii  <eliz@gnu.org>

916 917
	* dispnew.c (syms_of_display) <redisplay-dont-pause>:
	Default value is now t.  Doc fix.
918

919
	* indent.c (Fvertical_motion): Compute and apply the overshoot
920
	logic when moving up, not only when moving down.  Fix the
921
	confusing name and values of the it_overshoot_expected variable;
922
	logic changes accordingly.  (Bug#9254) (Bug#9549)
923 924 925 926 927 928

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

929 930 931 932
2011-09-24  Michael Albinus  <michael.albinus@gmx.de>

	* dbusbind.c (Fdbus_register_signal): Add match rule to
	Vdbus_registered_objects_table.  (Bug#9581)
933 934
	(Fdbus_register_method, Vdbus_registered_objects_table):
	Fix docstring.
935

936 937
2011-09-24  Jim Meyering  <meyering@redhat.com>

938
	do not ignore write error for any output size
939 940 941 942 943 944 945 946 947 948 949 950
	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)

951 952 953 954 955
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)

956 957 958 959 960 961 962 963
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.

964 965 966 967 968 969 970
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.
971 972 973
	(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.
974

975 976 977 978 979
2011-09-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>

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

980 981 982 983 984
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
985 986 987 988 989 990 991
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.
992 993 994
	(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.
995 996 997
	(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
998

999
2011-09-18  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
1000 1001 1002 1003

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

1004
2011-09-18  Andreas Schwab  <schwab@linux-m68k.org>
1005 1006 1007 1008

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

1009 1010 1011 1012
2011-09-18  Eli Zaretskii  <eliz@gnu.org>

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

1013 1014
2011-09-18  Paul Eggert  <eggert@cs.ucla.edu>

1015 1016 1017 1018
	Fix minor problem found by static checking.
	* xdisp.c (reseat_at_next_visible_line_start): Mark locals as
	initialized, to pacify gcc -Wuninitialized.

1019 1020 1021 1022 1023
	* 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.

1024 1025 1026 1027
2011-09-18  Eli Zaretskii  <eliz@gnu.org>

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

1028 1029 1030 1031 1032
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)

1033 1034
2011-09-17  Eli Zaretskii  <eliz@gnu.org>

1035
	* xdisp.c (reseat_at_next_visible_line_start): Keep information
1036
	about the current paragraph and restore it after the call to reseat.
1037 1038 1039 1040 1041 1042 1043 1044

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

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

1048 1049 1050 1051 1052 1053 1054 1055
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.

1056 1057 1058 1059
2011-09-16  Stefan Monnier  <monnier@iro.umontreal.ca>

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

1060 1061 1062 1063 1064
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.

1065 1066 1067 1068 1069
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%%" "").

1070 1071 1072 1073
2011-09-15  Andreas Schwab  <schwab@linux-m68k.org>

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

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

1084 1085 1086
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
1087 1088
	This occurs when processing a multibyte format.
	Problem reported by Wolfgang Jenker.
1089

1090 1091 1092 1093 1094
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
1095 1096 1097 1098 1099 1100 1101 1102 1103 1104
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.

1105 1106 1107 1108 1109 1110 1111 1112 1113 1114
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.

1115 1116 1117 1118 1119 1120
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>.

1121 1122 1123 1124
2011-09-13  Chong Yidong  <cyd@stupidchicken.com>

	* frame.c (Fother_visible_frames_p): Function deleted.

1125 1126 1127 1128 1129
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)

1130 1131 1132 1133
2011-09-12  Stefan Monnier  <monnier@iro.umontreal.ca>

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

1134 1135 1136 1137
2011-09-11  Chong Yidong  <cyd@stupidchicken.com>

	* minibuf.c (Fread_from_minibuffer): Doc fix.

1138 1139 1140 1141 1142
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)

1143 1144 1145 1146 1147
2011-09-11  Lars Magne Ingebrigtsen  <larsi@gnus.org>

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

1148 1149 1150 1151 1152 1153 1154 1155
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)

1156 1157 1158 1159 1160 1161 1162 1163 1164
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.

1165 1166 1167 1168 1169 1170
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.

1171 1172 1173 1174 1175
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).

1176 1177 1178 1179 1180
2011-09-10  Andreas Schwab  <schwab@linux-m68k.org>

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

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

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

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

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

1190 1191 1192 1193 1194
2011-09-08  Martin Rudalics  <rudalics@gmx.at>

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

1195 1196 1197 1198
2011-09-08  Juanma Barranquero  <lekktu@gmail.com>

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

1199 1200 1201 1202 1203
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.

1204 1205 1206 1207
2011-09-07  Jan Djärv  <jan.h.d@swipnet.se>

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

1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221
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
1222
2011-09-06  Paul Eggert  <eggert@cs.ucla.edu>
Paul Eggert's avatar
Paul Eggert committed
1223 1224 1225

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

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

Paul Eggert's avatar
Paul Eggert committed
1228
	* fileio.c: Fix bugs with large file offsets (Bug#9428).
1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244
	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.

1245 1246 1247 1248
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
1249
2011-09-04  Paul Eggert  <eggert@cs.ucla.edu>
Paul Eggert's avatar
Paul Eggert committed
1250

Paul Eggert's avatar
Paul Eggert committed
1251
	sprintf-related integer and memory overflow issues (Bug#9412).
1252 1253

	* doprnt.c (doprnt): Support printing ptrdiff_t and intmax_t values.
1254
	(esprintf, exprintf, evxprintf): New functions.
1255
	* keyboard.c (command_loop_level): Now EMACS_INT, not int.
1256
	(cmd_error): Kbd macro iterations count is now EMACS_INT, not int.
1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267
	(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.
1268
	(esprintf, exprintf, evxprintf): New decls.
1269 1270
	* window.h (command_loop_level, minibuf_level): Reflect API changes.

1271 1272
	* dbusbind.c (signature_cat): New function.
	(xd_signature, Fdbus_register_signal):
1273 1274
	Do not overrun buffer; instead, report string overflow.

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

1278 1279 1280 1281
	* editfns.c (Fcurrent_time_zone): Don't overrun buffer
	even if the time zone offset is outlandishly large.
	Don't mishandle offset == INT_MIN.

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

1285 1286 1287
	* eval.c (verror): Simplify by rewriting in terms of evxprintf,
	which has the guts of the old verror function.

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

1291 1292
	* font.c: Include <float.h>, for DBL_MAX_10_EXP.
	(font_unparse_xlfd): Don't blindly alloca long strings.
1293
	Don't assume XINT result fits in int, or that XFLOAT_DATA * 10
1294
	fits in int, when using sprintf.  Use single snprintf to count
1295 1296 1297 1298 1299 1300
	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.

1301 1302 1303
	* fontset.c (num_auto_fontsets): Now printmax_t, not int.
	(fontset_from_font): Print it.

1304 1305 1306 1307 1308 1309 1310 1311 1312 1313
	* 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.

1314 1315
	* gtkutil.c: Include <float.h>, for DBL_MAX_10_EXP.
	(xg_check_special_colors, xg_set_geometry):
1316 1317
	Make sprintf buffers a bit bigger, to avoid potential buffer overrun.

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

1321 1322 1323 1324 1325 1326
	* 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.

1327 1328 1329
	* nsterm.m ((NSSize)windowWillResize): Use esprintf, not sprintf,
	in case result does not fit in int.

1330 1331 1332 1333 1334 1335 1336 1337
	* 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'.

1338 1339 1340
	* process.c (make_process): Use printmax_t, not int, to format
	process-name gensyms.

1341 1342
	* sysdep.c (snprintf) [! HAVE_SNPRINTF]: New function.

1343 1344 1345
	* term.c (produce_glyphless_glyph): Make sprintf buffer a bit bigger
	to avoid potential buffer overrun.

1346 1347 1348
	* xfaces.c (x_update_menu_appearance): Don't overrun buffer
	if X resource line is longer than 512 bytes.

1349 1350 1351
	* xfns.c (x_window): Make sprintf buffer a bit bigger
	to avoid potential buffer overrun.

1352 1353
	* xterm.c (x_io_error_quitter): Don't overrun sprintf buffer.

1354 1355
	* xterm.h (x_check_errors): Add ATTRIBUTE_FORMAT_PRINTF.

1356 1357
2011-09-04  Paul Eggert  <eggert@cs.ucla.edu>

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

Paul Eggert's avatar
Paul Eggert committed
1363 1364
	* xdisp.c (try_window_id): Check Emacs fixnum range before
	converting to 'int'.
Paul Eggert's avatar
Paul Eggert committed
1365

Paul Eggert's avatar
Paul Eggert committed
1366
	* window.c (window_scroll_line_based, Frecenter):
1367 1368 1369 1370 1371 1372 1373 1374
	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
1375 1376 1377
	* 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.
1378 1379
	(match_limit): Don't assume that a fixnum can fit in 'int'.