ChangeLog 845 KB
Newer Older
1 2 3 4 5 6 7 8
2013-01-17  Paul Eggert  <eggert@cs.ucla.edu>

	Close a race when statting and reading files (Bug#13149).
	* fileio.c (Finsert_file_contents): Use open+fstat, not stat+open.
	This avoids a race if the file is renamed between stat and open.
	This race is not the problem originally noted in Bug#13149;
	see <http://bugs.gnu.org/13149#73> and later messages in the thread.

9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
2013-01-17  Dmitry Antipov  <dmantipov@yandex.ru>

	* lisp.h (toplevel): Add comment about using Lisp_Save_Value
	objects, related functions and macros.
	(make_save_value): Adjust prototype.
	(make_save_pointer): New prototype.
	(SAFE_NALLOCA): Fix indentation.  Use make_save_pointer.
	(SAFE_ALLOCA_LISP): Adjust make_save_value usage.
	* alloc.c (format_save_value): Rename to make_save_value.
	(make_save_pointer): New function.
	(record_xmalloc): Use make_save_pointer.
	* dired.c, editfns.c, fileio.c, font.c, gtkutil.c, lread.c:
	* nsmenu.m, nsterm.m, xfns.c, xmenu.c, xselect.c, keymap.c:
	Change users of make_save_value to make_save_pointer.
	Likewise for format_save_value and make_save_value.

25 26 27 28 29 30 31
2013-01-17  Dmitry Antipov  <dmantipov@yandex.ru>

	* buffer.h (NARROWED, BUF_NARROWED): Drop unused macros.
	(DECODE_POSITION, BUFFER_CHECK_INDIRECTION): Fix indentation.
	* buffer.c (toplevel, syms_of_buffer): Drop old commented-out
	debugging stubs.

32 33 34 35
2013-01-15  Paul Eggert  <eggert@cs.ucla.edu>

	* alloc.c (free_save_value): Now static.

36 37 38 39 40 41 42 43 44 45 46 47 48 49
2013-01-15  Dmitry Antipov  <dmantipov@yandex.ru>

	* keymap.c (map_keymap_internal): Use format_save_value.
	(map_keymap_char_table_item): Adjust accordingly.
	* fileio.c (non_regular_fd, non_regular_inserted)
	(non_regular_nbytes): Remove.
	(Finsert_file_contents): Convert trytry to ptrdiff_t.  Use
	format_save_value to pass parameters to read_non_regular.
	(read_non_regular): Use XSAVE_ macros to extract parameters.
	Adjust comment.
	* xmenu.c (xmenu_show) [!USE_X_TOOLKIT && !USE_GTK]: Use
	format_save_value.
	(pop_down_menu) [!USE_X_TOOLKIT && !USE_GTK]: Adjust user.

50 51 52 53 54 55 56 57
2013-01-15  Dmitry Antipov  <dmantipov@yandex.ru>

	* lisp.h (XSAVE_POINTER, XSAVE_INTEGER): Change to allow
	extraction from any Lisp_Save_Value slot.  Add type checking.
	* alloc.c, dired.c, editfns.c, fileio.c, ftfont.c, gtkutil.c:
	* keymap.c, lread.c, nsterm.h, nsmenu.c, xfns.c, xmenu.c:
	* xselect.c: All users changed.

58 59 60 61 62 63 64 65 66 67 68 69 70
2013-01-15  Dmitry Antipov  <dmantipov@yandex.ru>

	Some convenient bits to deal with Lisp_Save_Values.
	* lisp.h (XSAVE_OBJECT): New macro to extract saved objects.
	(allocate_misc): Remove prototype.
	(format_save_value): New prototype.
	* alloc.c (allocate_misc): Revert back to static.
	(format_save_value): New function to build Lisp_Save_Value
	object with the specified internal structure.
	(make_save_value): Reimplement using format_save_value.
	* editfns.c (save_excursion_save): Use format_save_value.
	(save_excursion_restore): Use XSAVE_OBJECT.

71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
2013-01-14  Paul Eggert  <eggert@cs.ucla.edu>

	Avoid needless casts with XSAVE_POINTER.
	* alloc.c (mark_object) [GC_MARK_STACK]:
	* dired.c (directory_files_internal_unwind):
	* fileio.c (do_auto_save_unwind):
	* gtkutil.c (pop_down_dialog):
	* keymap.c (map_keymap_char_table_item):
	* lread.c (load_unwind):
	* nsmenu.m (pop_down_menu):
	* print.c (print_object) [GC_MARK_STACK]:
	* xfns.c (clean_up_file_dialog):
	* xmenu.c (cleanup_widget_value_tree):
	Omit casts between XSAVE_POINTER and a pointer type.

86 87 88 89 90 91
2013-01-14  Dmitry Antipov  <dmantipov@yandex.ru>

	Fix compilation with GC_MARK_STACK == GC_USE_GCPROS_AS_BEFORE.
	* eval.c (eval_sub): Protect `form' from being GCed before its
	car and cdr becomes protected with the backtrace entry.

92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
2013-01-14  Dmitry Antipov  <dmantipov@yandex.ru>

	Make Lisp_Save_Value more versatile storage for up to four objects.
	* lisp.h (toplevel): Enumeration to describe types of saved objects.
	(struct Lisp_Save_Value): New layout.  Adjust comments.
	(XSAVE_POINTER): New macro.
	(XSAVE_INTEGER): Likewise.
	(allocate_misc): Add prototype.
	(free_misc): Likewise.
	* alloc.c (allocate_misc): Now global.
	(free_misc): Likewise.  Adjust comment.
	(make_save_value): Use new Lisp_Save_Value layout.  Adjust comment.
	(free_save_value): Likewise.
	(mark_object): Likewise.
	* editfns.c (save_excursion_save): Pack everything within
	Lisp_Save_Value and so avoid xmalloc.
	(save_excursion_restore): Adjust to match new layout.  Use free_misc
	because we do not allocate extra memory any more.  Add eassert.
	* print.c (print_object): New code to print Lisp_Save_Value.  Do not
	rely on valid_lisp_object_p if !GC_MARK_STACK.  Adjust comments.
	* dired.c, fileio.c, font.c, ftfont.c, gtkutil.c, keymap.c,
	* lread.c, nsmenu.m, nsterm.h, xfns.c, xmenu.c, xselect.c:
	Use XSAVE_POINTER and XSAVE_INTEGER where appropriate.

116 117 118 119 120
2013-01-13  Jan Djärv  <jan.h.d@swipnet.se>

	* nsfont.m (LCD_SMOOTHING_MARGIN): New define.
	(nsfont_draw): Remove disabling of LCD smoothing.
	(ns_glyph_metrics): Add LCD_SMOOTHING_MARGIN to bearings to fix
Jan Djärv's avatar
Jan Djärv committed
121
	Bug#11484 with LCD smoothing on.
122

123
2013-01-13  Paul Eggert  <eggert@cs.ucla.edu>
124

Paul Eggert's avatar
Paul Eggert committed
125 126 127 128
	Fix SIGDANGER handlers, for AIX (Bug#13408).
	* sysdep.c.c (handle_danger_signal, deliver_danger_signal) [SIGDANGER]:
	Move handlers here from emacs.c; they were out of place.

129 130 131 132 133
2013-01-11  Jan Djärv  <jan.h.d@swipnet.se>

	* xterm.c (syms_of_xterm): Adjust documentation for
	scroll-bar-adjust-thumb-portion.

Glenn Morris's avatar
Glenn Morris committed
134
2012-12-31  Adam Sjøgren  <asjo@koldfront.dk>  (tiny change)
135 136 137 138 139 140 141 142

	* xterm.c (scroll-bar-adjust-thumb-portion): New variable to
	determine whether scroll bar thumb size should be adjusted or
	not. Use variable for MOTIF.

	* gtkutil.c (scroll-bar-adjust-thumb-portion): Use variable for
	GTK.

143 144
2013-01-13  Jan Djärv  <jan.h.d@swipnet.se>

145 146 147 148
	* nsterm.m (keyDown:): Set processingCompose to NO if an emacs key
	event is generated.
	(doCommandBySelector:): Set processingCompose to NO.

149 150 151 152 153 154 155
	* nsfont.m (ns_findfonts): Add block/unblock_input calls.
	Remove check for fkeys count > zero, block/unblock fixes the real bug.
	(nsfont_list_family): Add block/unblock_input calls.
	(nsfont_open): Move block_input earlier.  Add unblock_input before early
	return.
	(nsfont_draw): Add block/unblock_input calls.

156 157 158 159 160
2013-01-12  Dmitry Antipov  <dmantipov@yandex.ru>

	* indent.c (Fvertical_motion): Remove now-incorrect GCPROs
	for old_charpos and old_bytepos.

161 162 163 164 165 166 167
2013-01-12  Paul Eggert  <eggert@cs.ucla.edu>

	Fix bug with set-time-zone-rule and LOCALTIME_CACHE (Bug#13415).
	* editfns.c (set_time_zone_rule) [LOCALTIME_CACHE]:
	Clear tzvalbuf_in_environ if this workaround is in effect.
	Problem and fix reported by Kazuhiro Ito.

168 169 170 171 172 173 174 175 176 177 178
2013-01-11  Aaron S. Hawley  <Aaron.Hawley@vtinfo.com>

	* insdel.c (Fcombine_after_change_execute, syms_of_insdel): Fix
	 ambiguous doc string cross-reference(s).

	* keyboard.c (Fcommand_execute, syms_of_keyboard): Fix ambiguous
	 doc string cross-reference(s).

	* window.c (Fwindow_point, syms_of_window): Fix ambiguous doc
	 string cross-reference(s).

179 180 181 182 183 184 185 186 187 188 189
2013-01-11  Dmitry Antipov  <dmantipov@yandex.ru>

	Avoid unnecessary byte position calculation for the gap movement.
	Since all users of move_gap do CHAR_TO_BYTE for other purposes
	anyway, all of them should use move_gap_both instead.
	* lisp.h (move_gap): Remove prototype.
	* insdel.c (move_gap): Remove.
	(move_gap_both): Add eassert.
	* editfns.c (Ftranspose_regions): Tweak to use move_gap_both.
	* xml.c (parse_region): Likewise.

190 191 192 193 194 195 196 197 198 199 200 201 202 203
2013-01-11  Paul Eggert  <eggert@cs.ucla.edu>

	emacsclient -t should not suspend Emacs server (Bug#13387)
	* lisp.h, sysdep.c (block_tty_out_signal, unblock_tty_out_signal):
	New functions.
	* term.c (init_tty): Use them instead of rolling our own code.
	* sysdep.c (tcsetpgrp_without_stopping): Likewise.  Here, this
	switches from 'signal' to 'pthread_sigmask', which is safer in
	multithreaded applications.
	* term.c (Fresume_tty): Don't bother dissociating if O_IGNORE_CTTY,
	which has already arranged for that.
	(dissociate_if_controlling_tty): If setsid fails, fall back on TIOCNOTTY.
	This is the main part of the bug fix.

Glenn Morris's avatar
Glenn Morris committed
204
2013-01-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>  (tiny change)
205 206 207 208

	* gtkutil.c (xg_initialize): Add ifdef HAVE_FREETYPE around
	x_last_font_name (Bug#13403).

209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
2013-01-10  Dmitry Antipov  <dmantipov@yandex.ru>

	Omit buffer_slot_type_mismatch and use generic predicates to enforce
	the type of per-buffer values where appropriate.
	* lisp.h (struct Lisp_Buffer_Objfwd): Rename slottype member to
	predicate, which is how it's really used now.  Adjust comment.
	* buffer.h (buffer_slot_type_mismatch): Remove prototype.
	* buffer.c (buffer_slot_type_mismatch): Remove.
	(DEFVAR_PER_BUFFER, defvar_per_buffer): Rename type argument to
	predicate.  Adjust comment.
	(syms_of_buffer): Use Qsymbolp for major-mode.  Use Qintegerp for
	fill-column, left-margin, tab-width, buffer-saved-size,
	left-margin-width, right-margin-width, left-fringe-width,
	right-fringe-width, scroll-bar-width and buffer-display-count.
	Use Qstringp for default-directory, buffer-file-name,
	buffer-file-truename and buffer-auto-save-file-name.  Use Qfloatp for
	scroll-up-aggressively and scroll-down-aggressively.  Use Qnumberp for
	line-spacing.
	* data.c (store_symval_forwarding): Adjust to call the predicate.

229 230 231 232 233
2013-01-09  Juanma Barranquero  <lekktu@gmail.com>

	* w32.c (get_name_and_id, acl_set_file):
	* w32term.c (w32fullscreen_hook): Remove unused local variables.

234 235 236 237 238 239 240 241
2013-01-09  Dmitry Antipov  <dmantipov@yandex.ru>

	* lisp.h (make_gap_1): New prototype.
	* buffer.h (GAP_BYTES_DFL, GAP_BYTES_MIN): New macros for the special
	gap size values.
	* editfns.c (Fbuffer_size): Rename from Fbufsize to fit the common
	naming convention.
	(syms_of_editfns): Adjust defsubr.  Drop commented-out obsolete code.
242
	* insdel.c (make_gap_larger): Use GAP_BYTES_DFL.  Adjust comment.
243 244 245 246 247 248
	(make_gap_smaller): Use GAP_BYTES_MIN.  Adjust comment.
	(make_gap_1): New function to adjust the gap of any buffer.
	* coding.c (coding_alloc_by_making_gap): Use it.
	* buffer.c (compact_buffer): Likewise.  Use BUF_Z_BYTE, BUF_GAP_SIZE,
	GAP_BYTES_DFL and GAP_BYTES_MIN.  Adjust comment.

249 250 251 252 253
2013-01-08  Juri Linkov  <juri@jurta.org>

	* xfaces.c (tty_supports_face_attributes_p): Return 0 for the case
	of (supports :underline (:style wave)).  (Bug#13000)

254 255 256 257 258
2013-01-08  Aaron S. Hawley  <aaron.s.hawley@gmail.com>

	* undo.c (Fprimitive_undo): Move to simple.el.
	(syms_of_undo): Remove declarations for Sprimitive_undo.

259 260 261 262
2013-01-08  Stefan Monnier  <monnier@iro.umontreal.ca>

	* keyboard.c (echo_add_key): Rename from echo_add_char.

Chong Yidong's avatar
Chong Yidong committed
263 264 265 266 267 268 269 270 271
2013-01-06  Chong Yidong  <cyd@gnu.org>

	* keyboard.c (echo_add_char): New function, factored out from
	echo_char.  Don't add a space if the previous echo string was
	empty (Bug#13255).
	(echo_char): Use it.
	(read_key_sequence): When echoing mock input, ensure that the
	trailing dash is properly added.

272 273 274 275
2013-01-05  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (dump_glyph): Align glyph data better.  Use "pD" instead
	of a non-portable "t" to print ptrdiff_t values.  Allow up to 9
276 277
	digits for buffer positions, before misalignment starts.
	Display "0" for integer "object" field.
278 279 280
	(dump_glyph_row): Adapt the header line to changes in dump_glyph.
	Display the newline glyph more unambiguously.

281 282 283 284 285 286 287
2013-01-04  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* nsterm.m (ns_draw_underwave):
	* w32term.c (w32_draw_underwave):
	* xterm.c (x_draw_underwave): Make underwave look more triangular
	and also degrade gracefully for small fonts.  (Bug#13000)

288 289 290 291 292
	* nsterm.m (ns_draw_text_decoration):
	* w32term.c (x_draw_glyph_string):
	* xterm.c (x_draw_glyph_string): Don't use previous underline
	thickness and position if previous underline type is underwave.

293 294 295 296
2013-01-04  Stefan Monnier  <monnier@iro.umontreal.ca>

	* fileio.c (Ffile_acl): Undocument return format.

297
2013-01-02  Glenn Morris  <rgm@gnu.org>
298 299 300

	* keymap.c (Fkey_description): Doc fix.  (Bug#13323)

Paul Eggert's avatar
Paul Eggert committed
301 302 303 304 305 306 307 308 309 310 311 312 313 314
2013-01-02  Paul Eggert  <eggert@cs.ucla.edu>

	Simplify via eabs.
	* dired.c (file_name_completion):
	* doc.c (get_doc_string):
	* floatfns.c (round2):
	* font.c (font_score, font_delete_unmatched):
	* fringe.c (compute_fringe_widths):
	* lread.c (read_list):
	* minibuf.c (Ftry_completion):
	* term.c (tty_ins_del_lines):
	* xterm.c (x_draw_image_foreground, x_draw_image_foreground_1):
	Use eabs (x) rather than open-coding it as (x < 0 ? -x : x).

315 316 317
2012-12-31  Eli Zaretskii  <eliz@gnu.org>

	* w32.c (unsetenv): Set up the string passed to _putenv
318 319
	correctly.
	See http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00863.html
320 321
	for the bug this caused.

Paul Eggert's avatar
Paul Eggert committed
322 323 324 325
2012-12-30  Paul Eggert  <eggert@cs.ucla.edu>

	* coding.c (Qmac): Now static.

326 327 328 329 330 331 332 333 334 335 336 337 338
2012-12-30  Jan Djärv  <jan.h.d@swipnet.se>

	* gtkutil.c (TOOLBAR_TOP_WIDGET): New macro.
	(xg_pack_tool_bar): Use TOOLBAR_TOP_WIDGET, condition out use of
	handlebox_widget.  Set toolbar_in_hbox to false/true, set
	toolbar_is_packed to true.
	(xg_update_tool_bar_sizes): Use widget returned by TOOLBAR_TOP_WIDGET.
	(update_frame_tool_bar): Check toolbar_is_packed for packing.
	Show all on TOOLBAR_TOP_WIDGET.
	(free_frame_tool_bar): Check toolbar_is_packed.  Use widget returned
	by TOOLBAR_TOP_WIDGET.
	(xg_change_toolbar_position): Use widget returned by TOOLBAR_TOP_WIDGET.
	Check toolbar_is_packed.
339 340 341 342 343 344 345 346 347 348 349
	(xg_have_tear_offs, tearoff_remove, tearoff_activate): Condition on
	HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
	(xg_have_tear_offs): When ! HAVE_GTK_TEAROFF_MENU_ITEM_NEW, return
	false.
	(create_menus): Create tearoff only if HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
	(xg_update_menubar): Update title only if
	HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
	(xg_update_submenu): Skip tearoff only if
	HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
	(xg_initialize): Initialize xg_detached_menus only if
	HAVE_GTK_TEAROFF_MENU_ITEM_NEW.
350 351 352 353 354

	* xterm.h (struct x_output): Surround handlebox_widget with
	#ifdef HAVE_GTK_HANDLE_BOX_NEW.  toolbar_is_packed is new,
	toolbar_in_hbox is bool.

355
2012-12-30  Andreas Schwab  <schwab@linux-m68k.org>
356 357 358 359 360 361

	* src/Makefile.in (TEMACS_LDFLAGS2): Remove.
	(LIBS_GNUSTEP): Define.
	(LIBES): Add $(LIBS_GNUSTEP).
	(temacs$(EXEEXT)): Use $(LDFLAGS) instead of $(TEMACS_LDFLAGS2).

362
2012-12-30  Eli Zaretskii  <eliz@gnu.org>
363 364 365 366 367

	* xdisp.c (set_cursor_from_row): Don't confuse a truncation or
	continuation glyph on a TTY with an indication of an empty line.
	(Bug#13277)

368 369
2012-12-29  Eli Zaretskii  <eliz@gnu.org>

370 371 372
	* fileio.c (Fset_file_selinux_context, Fset_file_acl): Return t if
	file's SELinux context or ACLs successfully set, nil otherwise.
	(Bug#13298)
373
	(Fcopy_file) [WINDOWSNT]: Improve diagnostics when CopyFile fails.
374

375 376 377
	* w32proc.c (reader_thread): Avoid passing NULL handles to
	SetEvent and WaitForSingleObject.

378 379 380 381 382 383
2012-12-28  Paul Eggert  <eggert@cs.ucla.edu>

	Port EXTERNALLY_VISIBLE to Clang 3.2.
	* conf_post.h (__has_attribute): New macro.
	(EXTERNALLY_VISIBLE): Use it.  This ports to Clang 3.2.

384 385 386 387 388
2012-12-27  Glenn Morris  <rgm@gnu.org>

	* cygw32.c (Fcygwin_convert_file_name_to_windows)
	(Fcygwin_convert_file_name_from_windows): Doc fixes.

389
2012-12-27  Eli Zaretskii  <eliz@gnu.org>
390

391 392
	* fileio.c (file_name_as_directory, directory_file_name):
	Accept an additional argument MULTIBYTE to indicate whether the input C
393 394 395 396 397 398 399 400 401 402 403
	came from a multibyte or a unibyte Lisp string; all callers
	adjusted.  Don't assume the input string is always multibyte.
	(Bug#13262)
	(Ffile_name_directory) [DOS_NT]: Handle unibyte strings correctly:
	don't ENCODE_FILE them, and return a unibyte string if the input
	was unibyte.
	(Fexpand_file_name): Don't mix unibyte with multibyte strings, and
	don't assume the input strings will always be multibyte.  If the
	input strings are multibyte, decode strings obtained from C
	library functions.

404 405 406 407
2012-12-26  Dmitry Antipov  <dmantipov@yandex.ru>

	* lisp.h (toplevel): Add two notices to the comment about
	defining a new Lisp data type.
408 409 410 411
	* print.c (print_object): If Lisp_Save_Value object's pointer
	is the address of a memory area containing Lisp_Objects, try
	to print them.
	* alloc.c (valid_lisp_object_p): Adjust comment.
412

413 414 415 416 417 418 419 420 421 422 423 424 425
2012-12-26  Dmitry Antipov  <dmantipov@yandex.ru>

	* keyboard.c (record_asynch_buffer_change): Initialize an event
	only if it's really needed.
	* frame.h (enum output_method): Remove output_mac member since
	it's a leftover from the deleted code.
	* frame.c (Fframep): Adjust user here ...
	* terminal.c (Fterminal_live_p): ... and here.
	* coding.c (Qmac): Now here because it's only used to denote
	end-of-line encoding type.
	(syms_of_coding): DEFSYM it.
	* frame.h (Qmac): Remove duplicated declaration.

426 427 428 429
2012-12-26  Paul Eggert  <eggert@cs.ucla.edu>

	* window.c (select_window_1): Now static, since it's used only here.

430 431 432 433 434 435 436
2012-12-25  Eli Zaretskii  <eliz@gnu.org>

	* window.c (window_body_cols): Subtract display margins from the
	window body width on TTYs as well.  See
	http://lists.gnu.org/archive/html/help-gnu-emacs/2012-12/msg00317.html
	for the original report.

437 438 439 440
2012-12-25  Dmitry Antipov  <dmantipov@yandex.ru>

	* xdisp.c (redisplay_window): Remove inner local variable
	because the outer shadowed one has the same meaning.
441 442 443 444
	* xterm.h (struct x_output): Remove toolbar_detached member since it's
	set but never used.
	* gtkutil.c (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
	(xg_create_tool_bar): Adjust users.
445

446 447 448 449 450 451 452
2012-12-24  Dmitry Antipov  <dmantipov@yandex.ru>

	* buffer.h (BUF_COMPACT): New macro to follow the common style.
	* buffer.c (Fget_buffer_create): Use it to set compact field of
	struct buffer_text to avoid accessing an uninitialized value
	when compact_buffer is called for the first time.
	(compact_buffer): Use convenient BUF_COMPACT and BUF_MODIFF.
453 454 455
	(Fset_buffer_modified_p): Use buffer_window_count to check
	whether the buffer is displayed in some window.
	* xdisp.c (message_dolog): Likewise.
456

457 458
2012-12-23  Eli Zaretskii  <eliz@gnu.org>

459 460 461 462 463 464
	* w32.c (acl_set_file): If setting the file security descriptor
	fails, and the new DACL is identical to the existing one, silently
	return success.  This fixes problems for users backing up their
	own files without having the necessary privileges for setting
	security descriptors.

465 466 467 468 469 470 471 472 473 474 475
	* w32proc.c (reader_thread): Do not index fd_info[] with negative
	values.
	(reader_thread): Exit when cp->status becomes STATUS_READ_ERROR
	after WaitForSingleObject returns normally.  This expedites reader
	thread shutdown when delete_child triggers it.
	(reap_subprocess): More accurate commentary for why we call
	delete_child only when cp->fd is negative.

	* w32.c (sys_close): Do not call delete_child on a subprocess
	whose handle is not yet closed.  Instead, set its file descriptor
	to a negative value, so that reap_subprocess will call
476 477
	delete_child on that subprocess when its SIGCHLD arrives.
	This avoids closing handles used for communications between sys_select
478 479 480 481
	and reader_thread, which doesn't give sys_select a chance to
	notice that the process exited and invoke the SIGCHLD handler for
	it.

482 483 484 485 486 487 488
2012-12-23  Jan Djärv  <jan.h.d@swipnet.se>

	* nsfns.m (Fns_do_applescript): Run event loop until script has
	been executed (Bug#12969).
	(ns_run_ascript): Chech as_script for nil, set to nil after
	executing script.

489 490 491 492
2012-12-22  Martin Rudalics  <rudalics@gmx.at>

	* window.c (Fselect_window): Reword doc-string (Bug#13248).

493 494 495 496 497
2012-12-22  Eli Zaretskii  <eliz@gnu.org>

	* w32term.c (w32fullscreen_hook): New function.
	(w32_create_terminal): Plug it into the terminal's fullscreen_hook.

498 499
2012-12-21  Eli Zaretskii  <eliz@gnu.org>

500 501
	* fileio.c (Finsert_file_contents): Doc fix.

502 503 504 505 506 507 508 509 510
	* w32proc.c (new_child, delete_child, find_child_pid): For a
	subprocess, consider its slot being in use as long as its process
	handle (procinfo.hProcess) is not NULL.  This avoids reusing the
	slot when a new process is started immediately after killing
	another one, without waiting enough time for the first process to
	be reaped and resources allocated for it be orderly freed.
	(Bug#13086)
	Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.

511 512 513 514
2012-12-21  Chong Yidong  <cyd@gnu.org>

	* buffer.c (Fset_buffer_major_mode): Doc fix (Bug#13231).

515 516
	* fns.c (Fcompare_strings): Doc fix (Bug#13081).

517
2012-12-21  Eli Zaretskii  <eliz@gnu.org>
518 519 520 521 522 523 524 525

	* w32.c (get_name_and_id): Always pass NULL as the first argument
	of lookup_account_sid.  Avoids crashes with UNC file names that
	refer to DFS domains, not to specific machine names.  (Bug#12621)
	Remove now unused argument FNAME; all callers changed.
	(get_file_owner_and_group): Remove now unused argument FNAME; all
	callers changed.

526 527 528 529 530
2012-12-21  Chong Yidong  <cyd@gnu.org>

	* editfns.c (Finsert_char): Since read-char-by-name now signals an
	error for invalid chars, don't check for a nil return value.

531 532 533 534 535 536 537 538 539 540 541
2012-12-20  Dmitry Antipov  <dmantipov@yandex.ru>

	Avoid calls to CHAR_TO_BYTE if byte position is known.
	* editfns.c (make_buffer_string_both): Use move_gap_both.
	(Fbuffer_string): Use make_buffer_string_both.
	* marker.c (buf_charpos_to_bytepos): Convert to eassert.
	Adjust comment.
	(buf_bytepos_to_charpos): Likewise.
	(charpos_to_bytepos): Remove.
	* fileio.c (Finsert_file_contents): Use move_gap_both.
	* search.c (Freplace_match): Likewise.
542
	* process.c (process_send_region): Likewise.  Use convenient
543 544 545 546 547
	names for byte positions.
	* lisp.h (charpos_to_bytepos): Remove prototype.
	* indent.c (scan_for_column): Use CHAR_TO_BYTE.
	* insdel.c (move_gap): Likewise.

548 549 550 551
2012-12-20  Paul Eggert  <eggert@cs.ucla.edu>

	* xdisp.c (redisplay_internal): Remove now-unused local.

552 553 554 555
2012-12-20  Stefan Monnier  <monnier@iro.umontreal.ca>

	* xdisp.c (select_frame_for_redisplay, ensure_selected_frame): Remove.
	(redisplay_internal): Don't bother selecting the frame to get the
556
	proper value of frame-local variables (bug#13225).
557

558 559 560 561 562 563
2012-12-20  Dmitry Antipov  <dmantipov@yandex.ru>

	* textprop.c (set_text_properties_1): Do not allow NULL interval.
	Rename 4th argument since it may be buffer or string.  Adjust comment.
	* intervals.c (graft_intervals_info_buffer): Find an interval here.

564 565 566 567 568 569
2012-12-19  Dmitry Antipov  <dmantipov@yandex.ru>

	* coding.c (Fdetect_coding_region): Do not check start and end with
	CHECK_NUMBER_COERCE_MARKER since validate_region does that itself.
	(code_convert_region): Likewise.

570 571 572 573 574 575 576 577
2012-12-18  Eli Zaretskii  <eliz@gnu.org>

	* w32.c (acl_get_file, acl_set_file): Run the file name through
	map_w32_filename, and resolve any symlinks in the file name, like
	Posix platforms do.
	(acl_set_file): Call revert_to_self, if any privileges were
	enabled.

578 579 580 581 582
2012-12-17  Juanma Barranquero  <lekktu@gmail.com>

	* makefile.w32-in ($(BLD)/editfns.$(O), $(BLD)/fileio.$(O))
	($(BLD)/w32.$(O)): Update dependencies.

583 584 585 586 587 588 589 590 591 592
2012-12-17  Stefan Monnier  <monnier@iro.umontreal.ca>

	* xdisp.c (select_frame_for_redisplay): Use select_window_1 to
	propagate redisplay's scrolling (if any) to the right window.
	(redisplay_internal): Use ensure_selected_frame.
	(display_mode_lines): Complete last fix.
	* window.c (select_window_1): New func, extracted from select_window.
	(select_window): Use it.
	* window.h (select_window_1): Declare.

593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616
2012-12-17  Eli Zaretskii  <eliz@gnu.org>

	Emulate Posix ACL APIs on MS-Windows.
	* w32.c: Include sddl.h and sys/acl.h.
	(SDDL_REVISION_1): Define if not already defined.
	(g_b_init_get_security_descriptor_dacl)
	(g_b_init_convert_sd_to_sddl, g_b_init_convert_sddl_to_sd)
	(g_b_init_is_valid_security_descriptor)
	(g_b_init_set_file_security): New static flags.
	(globals_of_w32): Initialize them to zero.
	(SetFileSecurity_Name): New string constant.
	(SetFileSecurity_Proc, GetSecurityDescriptorDacl_Proc)
	(ConvertStringSecurityDescriptorToSecurityDescriptor_Proc)
	(ConvertSecurityDescriptorToStringSecurityDescriptor_Proc)
	(IsValidSecurityDescriptor_Proc): New typedefs.
	(get_file_security, get_security_descriptor_owner)
	(get_security_descriptor_group): Set errno to ENOTSUP.
	(set_file_security, get_security_descriptor_dacl)
	(is_valid_security_descriptor, convert_sd_to_sddl)
	(convert_sddl_to_sd, acl_valid, acl_to_text, acl_from_text)
	(acl_free, acl_get_file, acl_set_file): New functions.

	* fileio.c (Fcopy_file) [WINDOWSNT]: Support copying ACLs.

617 618 619 620 621 622 623 624 625 626
2012-12-17  Paul Eggert  <eggert@cs.ucla.edu>

	Don't reraise SIGCHLD, as that can now lose (Bug#13192).
	With the 2012-12-03 fix for Bug#12980 in place, an old workaround
	for some of that bug's symptoms can now cause Emacs to abort.
	Remove the workaround.
	* process.c (wait_reading_process_output): Don't reraise SIGCHLD.
	The bug that caused SIGCHLD to get lost has been fixed, and the
	workaround for it can now cause Emacs to abort.

627 628 629 630 631 632
2012-12-16  Paul Eggert  <eggert@cs.ucla.edu>

	* sysdep.c (emacs_abort): Bump backtrace size to 40.
	Companion to the 2012-09-30 patch.  Suggested by Eli Zaretskii in
	<http://lists.gnu.org/archive/html/emacs-devel/2012-09/msg00796.html>.

633 634 635 636
2012-12-16  Romain Francoise  <romain@orebokech.com>

	* fileio.c (Ffile_acl, Fset_file_acl): New functions.
	(Fcopy_file): Change last arg to `preserve_extended_attributes'
637
	and copy ACL entries of file in addition to SELinux context if set.
638 639 640 641 642
	(syms_of_fileio): Add `file-acl' and `set-file-acl'.

	* Makefile.in (LIBACL_LIBS): New macro.
	(LIBES): Use it.

643 644 645 646
2012-12-15  Paul Eggert  <eggert@cs.ucla.edu>

	* fileio.c (internal_delete_file): Use bool for boolean.

647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677
2012-12-15  Eli Zaretskii  <eliz@gnu.org>

	Fix bug #13079 on MS-Windows with temp files not being deleted.
	* w32.h (_child_process): New members input_file and
	pending_deletion.
	(register_child): First argument is now pid_t.
	(record_infile, record_pending_deletion): New prototypes.

	* w32proc.c (new_child): Initialize input_file and
	pending_deletion members of the child.
	(delete_child): Delete the child's temporary input file, if any,
	that is pending deletion.
	(register_child): First argument is now pid_t.
	(record_infile, record_pending_deletion): New functions.
	(reap_subprocess): Fix a typo in DebPrint string.
	(sys_spawnve, sys_kill): Use pid_t for PID arguments.

	* fileio.c (internal_delete_file): Return an int again: non-zero
	if delete-file succeeds, zero otherwise.

	* lisp.h (internal_delete_file): Adjust prototype.

	* callproc.c (Fcall_process): Don't overwrite infile with result
	of DECODE_FILE.
	[WINDOWSNT] If BUFFER is an integer, i.e. we are launching an
	asynchronous subprocess, record the name of the input file name,
	if any.
	(delete_temp_file) [WINDOWSNT]: If internal_delete_file fails to
	delete the file, record it as pending deletion when the subprocess
	exits.

678 679 680 681 682 683
2012-12-14  Eli Zaretskii  <eliz@gnu.org>

	* editfns.c [HAVE_PWD_H]: Include grp.h.

	* makefile.w32-in ($(BLD)/editfns.$(O)): Add $(NT_INC)/grp.h.

684 685 686 687 688 689 690 691 692
2012-12-14  Paul Eggert  <eggert@cs.ucla.edu>

	Fix permissions bugs with setgid directories etc. (Bug#13125)
	* dired.c (Ffile_attributes): Return t as the 9th attribute,
	to mark it as a placeholder.  The old value was often wrong.
	The only user of this attribute has been changed to use
	file-ownership-preserved-p instead, with its new group arg.
	* editfns.c (Fgroup_gid, Fgroup_real_gid): New functions.

693 694
2012-12-14  Stefan Monnier  <monnier@iro.umontreal.ca>

695 696
	* xdisp.c (select_frame_for_redisplay, display_mode_lines):
	Keep selected_window and selected_frame in sync.
697

698 699 700 701 702 703 704
2012-12-14  Eli Zaretskii  <eliz@gnu.org>

	* w32.c (stat_worker): If w32_stat_get_owner_group is zero, do not
	try to get accurate owner and group information from NT file
	security APIs.  This is to make most callers of 'stat' and
	'lstat', which don't need that information, much faster.

705 706
	* dired.c (Ffile_attributes) [WINDOWSNT]:
	Set w32_stat_get_owner_group to a non-zero value, to request accurate
707 708
	owner and group information from 'lstat'.

Paul Eggert's avatar
Paul Eggert committed
709 710
2012-12-13  Paul Eggert  <eggert@cs.ucla.edu>

711 712 713 714 715
	* fileio.c (Finsert_file_contents): Don't put tail into head area,
	as that confuses set-auto-coding, so insist on the head-read
	returning the full 1024 bytes.  Let lseek compute the tail offset;
	less work for us.  Do not ignore I/O errors when reading the tail.

Paul Eggert's avatar
Paul Eggert committed
716 717 718 719
	* xdisp.c: Minor style fixes.
	(init_iterator): Hoist assignment out of if-expression.
	(markpos_of_region): Callers now test for sign, not for -1.

720 721 722 723 724 725 726 727 728
2012-12-13  Dmitry Antipov  <dmantipov@yandex.ru>

	Minor redisplay optimization when the region length is zero.
	* xdisp.c (markpos_of_region): New function.
	(init_iterator): Do not highlight the region of zero length.
	(redisplay_window): Check whether the region is of non-zero length.
	(try_cursor_movement): Allow if the region length is zero.
	(try_window_reusing_current_matrix, try_window_id): Likewise.

729
2012-12-13  Eli Zaretskii  <eliz@gnu.org>
730 731 732 733 734

	* search.c (search_buffer): Check the inverse translations of each
	character in pattern when the buffer being searched is unibyte.
	(Bug#13084)

735
2012-12-13  Paul Eggert  <eggert@cs.ucla.edu>
736 737 738

	* fileio.c (Fvisited_file_modtime): Return (-1 ...) for nonexistent
	files, fixing a regression from 24.2.
739
	(Fverify_visited_file_modtime): Don't read uninitialized st.st_size.
740

741 742 743 744 745 746 747 748 749
2012-12-13  Paul Eggert  <eggert@cs.ucla.edu>

	* fileio.c (Fcopy_file): Make fstat failure as serious as open failure.
	fstat shouldn't fail, and if it does fail copy-file should not proceed.
	Remove unnecessary S_ISLNK test, as (contra the comments) this
	function can't copy symlinks.  Improve quality of error message
	when attempting to copy files that are neither regular files nor
	directories.

750 751 752 753 754 755 756 757
2012-12-12  Dmitry Antipov  <dmantipov@yandex.ru>

	* dispnew.c (set_window_cursor_after_update): Use clip_to_bounds.
	* gtkutil.c (xg_set_toolkit_scroll_bar_thumb):
	* window.c (Frecenter):
	* xdisp.c (resize_mini_window, hscroll_window_tree, draw_glyphs):
	* xterm.c (x_set_toolkit_scroll_bar_thumb): Likewise.

758 759
2012-12-12  Daniel Colascione  <dancol@dancol.org>

760
	* unexcw.c (fixup_executable): Use posix_fallocate to ensure that
761 762 763
	the dumped Emacs is not a sparse file, greatly improving Cygwin
	"make bootstrap" performance.

764 765 766 767 768
2012-12-11  Michael Albinus  <michael.albinus@gmx.de>

	* inotify.c (inotify_callback): Generate an Emacs event for every
	incoming inotify event.

769 770 771 772 773 774 775 776 777 778 779 780 781
2012-12-11  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (handle_face_prop): Fix logic of computing
	it->start_of_box_run_p.
	(append_space_for_newline): If the glyph row is R2L, reset the
	iterator's end_of_box_run_p flag before prepending the space glyph.
	(extend_face_to_end_of_line): If the glyph row is R2L, reset the
	iterator's start_of_box_run_p flag before prepending the stretch.
	(append_glyph, produce_image_glyph, append_composite_glyph)
	(append_stretch_glyph, append_glyphless_glyph): Reverse the
	left_box_line_p and right_box_line_p flags of the glyph for R2L
	glyph rows.  (Bug#13011)

782 783 784 785 786 787 788 789 790 791
2012-12-11  Dmitry Antipov  <dmantipov@yandex.ru>

	* buffer.c (Fset_buffer_multibyte): Do not force redisplay
	if changed buffer is not shown in a window.
	* insdel.c (prepare_to_modify_buffer): Likewise.
	* window.c (replace_buffer_in_windows_safely): Do nothing
	if buffer is not shown in a window.
	(Fforce_window_update): Likewise if string or buffer argument
	is passed.

792 793 794 795 796
2012-12-11  Eli Zaretskii  <eliz@gnu.org>

	* inotify.c (Finotify_add_watch): Rename decoded_file_name to
	encoded_file_name, which is what it is.

797 798 799 800 801 802 803 804 805 806 807 808 809 810 811
2012-12-11  Dmitry Antipov  <dmantipov@yandex.ru>

	Consistently use marker_position and marker_byte_position.
	* fringe.c (Ffringe_bitmaps_at_pos):
	* indent.c (Fvertical_motion):
	* insdel.c (prepare_to_modify_buffer):
	* keyboard.c (make_lispy_position):
	* window.c (Fwindow_end, Fpos_visible_in_window_p, unshow_buffer)
	(window_scroll_pixel_based, displayed_window_lines)
	(Fset_window_configuration):
	* xdisp.c (message_dolog, with_echo_area_buffer_unwind_data)
	(mark_window_display_accurate_1, redisplay_window, decode_mode_spec):
	Replace direct access to marker fields with calls
	to marker_position and/or marker_byte_position.

812 813 814 815 816 817
2012-12-11  Juanma Barranquero  <lekktu@gmail.com>

	* makefile.w32-in (SIG2STR_H): New macro.
	(SYSWAIT_H, $(BLD)/emacs.$(O), $(BLD)/process.$(O))
	($(BLD)/w32notify.$(O)): Update dependencies.

818 819
2012-12-10  Daniel Colascione  <dancol@dancol.org>

Daniel Colascione's avatar
Daniel Colascione committed
820 821 822
	* w32term.c, keyboard.c: Fix build break in cygw32 by omitting
	Windows file notification functionality unless WINDOWSNT.

823 824 825 826 827 828
	* w32gui.h (hprevinst, lpCmdLine, nCmdShow): Remove unused
	declarations.

	* w32fns.c (cache_system_info): Initialize the global hinst
	variable here so various initialization calls DTRT.

829
	* unexw32.c (hprevinst, lpCmdLine, nCmdShow): Remove unused variables.
830 831 832 833 834 835 836
	(hinst): Remove unneeded extern declaration.
	(_start): Remove initialization of above variables; remove
	initialization of hinst, as cache_system_info now does that.

	* emacs.c (main): Call cache_system_info early in startup; we
	previously weren't calling it in Cygwin builds.

837 838
	* Makefile.in (ntsource, WINDRES, W32_RES, W#@_RES_LINK):
	Teach the autoconf build system how to compile a Windows resource file
839 840
	and link it to Emacs.

Dmitry Antipov's avatar
Dmitry Antipov committed
841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861
2012-12-10  Dmitry Antipov  <dmantipov@yandex.ru>

	Per-buffer window counters.
	* buffer.h (struct buffer): New member window_count.
	(buffer_window_count): New function.
	* buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
	Initialize window_count.
	(Fkill_buffer): Verify window_count for the buffer being killed.
	(modify_overlay): Do not force redisplay if buffer is not shown
	in any window.
	(init_buffer_once): Initialize window_count for buffer_defaults
	and buffer_local_symbols.
	* window.h (buffer_shared): Remove declaration.
	(wset_buffer): Convert from inline ...
	* window.c (wset_buffer): ... to an ordinary function.
	(adjust_window_count): New function.
	(make_parent_window): Use it.
	* xdisp.c (buffer_shared): Remove.
	(redisplay_internal, redisplay_window): Adjust users.
	(buffer_shared_and_changed): Use per-buffer window counter.

862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900
2012-12-10  Eli Zaretskii  <eliz@gnu.org>

	Support for filesystem notifications on MS-Windows.
	* w32proc.c (sys_select): If drain_message_queue returns non-zero,
	and this is a TTY frame, signal the caller that keyboard input is
	available.

	* w32xfns.c (drain_message_queue): Now returns an int: an
	indication whether any WM_EMACS_FILENOTIFY messages were found in
	the queue.

	* w32inevt.c (handle_file_notifications): New function.
	(w32_console_read_socket): Call it to process file notifications.

	* w32console.c (initialize_w32_display): Record the main thread ID
	in dwMainThreadId.

	* deps.mk (inotify.o): New dependency list.

	* Makefile.in (SOME_MACHINE_OBJECTS): Add w32notify.o.

	* w32term.h (WM_EMACS_FILENOTIFY): New custom message.
	(WM_EMACS_END): Bump value by 1.
	(notification_buffer_in_use, file_notifications)
	(notifications_size, notifications_desc): Declare.
	(w32_get_watch_object, lispy_file_action, globals_of_w32notify):
	Add prototypes.

	* w32term.c (lispy_file_action, queue_notifications): New functions.
	(syms_of_w32term) <Qadded, Qremoved, Qmodified, Qrenamed_from>
	<Qrenamed_to>: New symbols.
	(w32_read_socket): Handle the WM_EMACS_FILENOTIFY message.

	* w32notify.c: New file, implements file event notifications for
	MS-Windows.

	* w32fns.c (w32_wnd_proc): Handle the WM_EMACS_FILENOTIFY message
	by posting it to the w32_read_socket queue.

901
	* termhooks.h (enum event_kind) [HAVE_NTGUI]: Support FILE_NOTIFY_EVENT.
902 903 904 905 906 907 908

	* makefile.w32-in (OBJ2): Add $(BLD)/w32notify.$(O).
	(GLOBAL_SOURCES): Add w32notify.c
	($(BLD)/w32notify.$(O)): New set of dependencies.

	* lisp.h (syms_of_w32notify) [WINDOWSNT]: Add prototype.

909 910
	* keyboard.c (kbd_buffer_get_event) [WINDOWSNT]:
	Handle FILE_NOTIFY_EVENT.
911 912 913 914 915 916 917
	(syms_of_keyboard) [HAVE_NTGUI] <Qfile_notify>: New symbol.
	(keys_of_keyboard) [WINDOWSNT]: Bind file-notify to
	w32notify-handle-event by default.

	* emacs.c (main) [WINDOWSNT]: Call globals_of_w32notify and
	syms_of_w32notify.

918 919
2012-12-10  Rüdiger Sonderfeld  <ruediger@c-plusplus.de>

920
	Support for filesystem notifications on GNU/Linux via inotify.
921
	* termhooks.h (enum event_kind) [HAVE_INOTIFY]: Add FILE_NOTIFY_EVENT.
922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938

	* lisp.h (syms_of_inotify) [HAVE_INOTIFY]: Add prototype.

	* keyboard.c (Qfile_inotify) [HAVE_INOTIFY]: New variable.
	(syms_of_keyboard): DEFSYM it.
	(kbd_buffer_get_event) [HAVE_INOTIFY]: Generate FILE_NOTIFY_EVENT.
	(make_lispy_event): Support FILE_NOTIFY_EVENT by generating
	Qfile_inotify events.
	(keys_of_keyboard) [HAVE_INOTIFY]: Bind file-inotify events in
	special-event-map to inotify-handle-event.

	* emacs.c (main) [HAVE_INOTIFY]: Call syms_of_inotify.

	* Makefile.in (base_obj): Add inotify.o.

	* inotify.c: New file.

939
2012-12-10  Jan Djärv  <jan.h.d@swipnet.se>
940 941 942

	* nsterm.m (fd_handler:): FD_ZERO fds (Bug#13103).

943
2012-12-10  Fabrice Popineau  <fabrice.popineau@gmail.com>
944 945 946 947

	* w32fns.c (cache_system_info): Cast sysinfo_cache.dwPageSize to
	DWORD_PTR, for compatibility with 64-bit builds.

948
	* w32.c (_PROCESS_MEMORY_COUNTERS_EX):
949 950 951 952
	(GetProcessWorkingSetSize_Proc, get_process_working_set_size)
	(system_process_attributes): Use SIZE_T rather than DWORD, for
	compatibility with 64-bit builds.

953
2012-12-10  Christopher Schmidt  <christopher@ch.ristopher.com>
954 955 956

	* lread.c (Vload_source_file_function): Doc fix (Bug#11647).

957
2012-12-10  Eli Zaretskii  <eliz@gnu.org>
958 959 960 961 962

	* indent.c (Fvertical_motion): If a display string will be
	displayed on the left or the right margin, don't consider it as a
	factor in cursor positioning.  (Bug#13108)

963
2012-12-10  Martin Rudalics  <rudalics@gmx.at>
964 965 966

	* editfns.c (Fcompare_buffer_substrings): Reword doc-string.

967 968 969 970 971
2012-12-10  Paul Eggert  <eggert@cs.ucla.edu>

	* fileio.c (Fsubstitute_in_file_name): Use ptrdiff_t, not int,
	for string length.

972 973 974 975
2012-12-08  Eli Zaretskii  <eliz@gnu.org>

	* w32.c (unsetenv): Return 0 if the input string is too long.

976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001
2012-12-08  Paul Eggert  <eggert@cs.ucla.edu>

	Use putenv+unsetenv instead of modifying environ directly (Bug#13070).
	* alloc.c (xputenv): New function.
	* dbusbind.c (Fdbus_init_bus):
	* emacs.c (main):
	* xterm.c (x_term_init):
	Use xputenv instead of setenv or putenv, to detect memory exhaustion.
	* editfns.c (initial_tz): Move static var decl up.
	(tzvalbuf_in_environ): New static var.
	(init_editfns):	Initialize these two static vars.
	(Fencode_time): Don't assume arbitrary limit on EMACS_INT width.
	Save old TZ value on stack, if it's small.
	(Fencode_time, set_time_zone_rule): Don't modify 'environ' directly;
	instead, use xputenv+unsetenv to set and restore TZ.
	(environbuf): Remove static var.  All uses removed.
	(Fset_time_zone_rule): Do not save TZ and environ;
	no longer needed here.
	(set_time_zone_rule_tz1, set_time_zone_rule_tz2) [LOCALTIME_CACHE]:
	Move to inside set_time_zone_rule; they don't need file scope any more.
	(set_time_zone_rule): Maintain the TZ=value string separately.
	(syms_of_editfns): Don't initialize initial_tz;
	init_editfns now does it.
	* emacs.c (dump_tz) [HAVE_TZSET]: Now const.
	* lisp.h (xputenv): New decl.

1002 1003 1004 1005
2012-12-08  Fabrice Popineau  <fabrice.popineau@gmail.com>

	* w32fns.c (emacs_abort): Don't do arithmetics on void pointers.

1006 1007 1008 1009
2012-12-08  Eli Zaretskii  <eliz@gnu.org>

	* w32.c (unsetenv, sys_putenv): New functions.

1010 1011 1012 1013 1014
2012-12-08  Chong Yidong  <cyd@gnu.org>

	* editfns.c (Finsert_char): Make the error message more
	informative (Bug#12992).

1015 1016
2012-12-08  Paul Eggert  <eggert@cs.ucla.edu>

Paul Eggert's avatar
Paul Eggert committed
1017 1018 1019 1020 1021
	Simplify get_lim_data.
	* vm-limit.c (get_lim_data): Combine RLIMIT_AS and RLIMIT_DATA methods.
	Remove USG and vlimit methods; no longer used these days.
	Add #error catchall just in case.

1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042
	Assume POSIX 1003.1-1988 or later for signal.h (Bug#13026).
	Exceptions: do not assume SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN,
	SIGTTOU, SIGUSR1, SIGUSR2, as Microsoft platforms lack these.
	* process.c [subprocesses]: Include <c-ctype.h>, <sig2str.h>.
	(deleted_pid_list, Fdelete_process, create_process)
	(record_child_status_change, handle_child_signal, deliver_child_signal)
	(init_process_emacs, syms_of_process):
	Assume SIGCHLD is defined.
	(parse_signal): Remove.  All uses removed.
	(abbr_to_signal): New static function.
	(Fsignal_process): Use it to convert signal names to ints.
	* sysdep.c (sys_suspend) [!DOS_NT]: Use kill (0, ...) rather than
	kill (getpgrp (), ...).
	(emacs_sigaction_init): Assume SIGCHLD is defined.
	(init_signals): Assume SIGALRM, SIGCHLD, SIGHUP, SIGKILL,
	SIGPIPE, and SIGQUIT are defined.  Do not worry about SIGCLD any more.
	* syssignal.h (EMACS_KILLPG): Remove.
	All uses replaced by 'kill' with a negative pid.
	(SIGCHLD): Remove definition, as we now assume SIGCHLD.
	* w32proc.c (sys_kill): Support negative pids compatibly with POSIX.

1043 1044 1045 1046 1047 1048
2012-12-07  Paul Eggert  <eggert@cs.ucla.edu>

	* sysdep.c (get_child_status): Abort on internal error (Bug#13086).
	This will cause a production Emacs to dump core instead of
	infinite-looping.

1049 1050 1051 1052 1053 1054 1055 1056
2012-12-07  Dmitry Antipov  <dmantipov@yandex.ru>

	* frame.c (make_frame): Do not set window's buffer to t.
	* window.c (Fsplit_window_internal): Likewise.  Previously it was
	used to indicate that the window is being set up.  Now we use
	set_window_buffer for all new windows, so the condition in ...
	(Fset_window_buffer): ... is always true and can be removed.

1057 1058 1059 1060 1061 1062 1063 1064
2012-12-07  Dmitry Antipov  <dmantipov@yandex.ru>

	Convenient macro to check whether the buffer is hidden.
	* buffer.h (BUFFER_HIDDEN_P): New macro.
	* frame.c (make_frame): Use it.  Adjust comment.
	* buffer.c (candidate_buffer): New function.
	(Fother_buffer, other_buffer_safely): Use it.

1065 1066 1067 1068 1069 1070
2012-12-06  Eli Zaretskii  <eliz@gnu.org>

	* w32proc.c (waitpid): Avoid busy-waiting when called with WNOHANG
	if the child process is still running.  Instead, exit the wait
	loop and return zero.  (Bug#13086)

1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083
2012-12-06  Dmitry Antipov  <dmantipov@yandex.ru>

	* frame.h (x_char_width, x_char_height): Remove prototypes.
	* w32term.h (x_char_width, x_char_height): Likewise.
	* xfns.c (x_char_width, x_char_height): Remove.
	* w32fns.c (x_char_width, x_char_height): Likewise.
	* nsfns.c (x_char_width, x_char_height): Likewise.
	* frame.c (Fframe_char_width): Use FRAME_COLUMN_WIDTH for
	all window frames.
	(Fframe_char_height): Likewise with FRAME_LINE_HEIGHT.
	* keyboard.c (command_loop_1): Remove prototype.
	(command_loop_2, top_level_1): Add static to match prototype.

1084 1085 1086 1087 1088 1089 1090 1091 1092 1093
2012-12-06  Paul Eggert  <eggert@cs.ucla.edu>

	Fix a recently-introduced delete-process race condition.
	* callproc.c, process.h (record_kill_process):
	New function, containing part of the old call_process_kill.
	(call_process_kill): Use it.
	This does not change call_process_kill's behavior.
	* process.c (Fdelete_process): Use record_kill_process to fix a
	race condition that could cause Emacs to lose track of a child.

1094 1095 1096 1097 1098 1099
2012-12-06  Dmitry Antipov  <dmantipov@yandex.ru>

	Avoid code duplication between prev_frame and next_frame.
	* frame.c (candidate_frame): New function.  Add comment.
	(prev_frame, next_frame): Use it.  Adjust comment.

1100
2012-12-06  Eli Zaretskii  <eliz@gnu.org>
1101 1102 1103 1104

	* callproc.c (Fcall_process_region) [!HAVE_MKSTEMP]: If mktemp
	fails, signal an error instead of continuing with an empty
	string.  (Bug#13079)
1105 1106
	Encode expanded temp file pattern before passing it to mkstemp or
	mktemp.
1107

1108 1109 1110 1111 1112
	* fileio.c (file_name_as_directory, directory_file_name) [DOS_NT]:
	Encode the file name before passing it to dostounix_filename, in
	case it will downcase it (under w32-downcase-file-names).
	(Bug#12933)

Paul Eggert's avatar
Paul Eggert committed
1113 1114 1115 1116 1117 1118 1119 1120
2012-12-05  Paul Eggert  <eggert@cs.ucla.edu>

	Minor call-process cleanups.
	* callproc.c (Fcall_process): Do record-unwind-protect on MSDOS
	at the same time as other platforms, to simplify analysis.
	No need for fd0_volatile since we have synch_process_fd.
	Avoid needless emacs_close; arg is always negative.

1121 1122 1123 1124 1125
2012-12-04  Andreas Schwab  <schwab@linux-m68k.org>

	* callproc.c (Fcall_process): Fix specpdl nesting for asynchronous
	processes.

1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138
2012-12-04  Dmitry Antipov  <dmantipov@yandex.ru>

	* lisp.h (Mouse_HLInfo): Remove set-but-unused mouse_face_image_state
	member.  Adjust users.  Convert mouse_face_past_end, mouse_face_defer
	and mouse_face_hidden members to a bitfields.
	* frame.h (struct frame): Remove set-but-not-used space_width member.
	(FRAME_SPACE_WIDTH): Remove.
	* nsterm.m, w32term.c, xterm.c: Adjust users.
	* termchar.h (struct tty_display_info): Remove set-but-unused se_is_so
	member.  Adjust users.  Convert term_initted, delete_in_insert_mode,
	costs_set, insert_mode, standout_mode, cursor_hidden and flow_control
	members to a bitfields.

1139 1140
2012-12-03  Paul Eggert  <eggert@cs.ucla.edu>

1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197
	Don't let call-process be a zombie factory (Bug#12980).
	Fixing this bug required some cleanup of the signal-handling code.
	As a side effect, this change also fixes a longstanding rare race
	condition whereby Emacs could mistakenly kill unrelated processes,
	and it fixes a bug where a second C-g does not kill a recalcitrant
	synchronous process in GNU/Linux and similar platforms.
	The patch should also fix the last vestiges of Bug#9488,
	a bug which has mostly been fixed on the trunk by other changes.
	* callproc.c, process.h (synch_process_alive, synch_process_death)
	(synch_process_termsig, sync_process_retcode):
	Remove.  All uses removed, to simplify analysis and so that
	less consing is done inside critical sections.
	* callproc.c (call_process_exited): Remove.  All uses replaced
	with !synch_process_pid.
	* callproc.c (synch_process_pid, synch_process_fd): New static vars.
	These take the role of what used to be in unwind-protect arg.
	All uses changed.
	(block_child_signal, unblock_child_signal):
	New functions, to avoid races that could kill innocent-victim processes.
	(call_process_kill, call_process_cleanup, Fcall_process): Use them.
	(call_process_kill): Record killed processes as deleted, so that
	zombies do not clutter up the system.  Do this inside a critical
	section, to avoid a race that would allow the clutter.
	(call_process_cleanup): Fix code so that the second C-g works again
	on common platforms such as GNU/Linux.
	(Fcall_process): Create the child process in a critical section,
	to fix a race condition.  If creating an asynchronous process,
	record it as deleted so that zombies do not clutter up the system.
	Do unwind-protect for WINDOWSNT too, as that's simpler in the
	light of these changes.  Omit unnecessary call to emacs_close
	before failure, as the unwind-protect code does that.
	* callproc.c (call_process_cleanup):
	* w32proc.c (waitpid): Simplify now that synch_process_alive is gone.
	* process.c (record_deleted_pid): New function, containing
	code refactored out of Fdelete_process.
	(Fdelete_process): Use it.
	(process_status_retrieved): Remove.  All callers changed to use
	child_status_change.
	(record_child_status_change): Remove, folding its contents into ...
	(handle_child_signal): ... this signal handler.  Now, this
	function is purely a handler for SIGCHLD, and is not called after
	a synchronous waitpid returns; the synchronous code is moved to
	wait_for_termination.  There is no need to worry about reaping
	more than one child now.
	* sysdep.c (get_child_status, child_status_changed): New functions.
	(wait_for_termination): Now takes int * status and bool
	interruptible arguments, too.  Do not record child status change;
	that's now the caller's responsibility.  All callers changed.
	Reimplement in terms of get_child_status.
	(wait_for_termination_1, interruptible_wait_for_termination):
	Remove.  All callers changed to use wait_for_termination.
	* syswait.h: Include <stdbool.h>, for bool.
	(record_child_status_change, interruptible_wait_for_termination):
	Remove decls.
	(record_deleted_pid, child_status_changed): New decls.
	(wait_for_termination): Adjust to API changes noted above.

1198 1199 1200
	* bytecode.c, lisp.h (Qbytecode): Remove.
	No longer needed after 2012-11-20 interactive-p changes.

1201 1202 1203 1204 1205
2012-12-03  Eli Zaretskii  <eliz@gnu.org>

	* xdisp.c (redisplay_window): If the cursor is visible, but inside
	the scroll margin, move point outside the margin.  (Bug#13055)

1206 1207 1208 1209 1210
2012-12-03  Jan Djärv  <jan.h.d@swipnet.se>

	* gtkutil.c (my_log_handler): New function.
	(xg_set_geometry): Set log handler to my_log_handler (Bug#11177).

1211 1212 1213 1214 1215 1216 1217 1218 1219
2012-12-03  Dmitry Antipov  <dmantipov@yandex.ru>

	* lisp.h (modify_region): Rename to...
	(modify_region_1): ...new prototype.
	* textprop.c (modify_region): Now static.  Adjust users.
	* insdel.c (modify_region): Rename to...
	(modify_region_1): ...new function to work with current buffer.
	Adjust comment and users.  Use true and false for booleans.

1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230
2012-12-03  Dmitry Antipov  <dmantipov@yandex.ru>

	* alloc.c (free_save_value): New function.
	(safe_alloca_unwind): Use it.
	* lisp.h (free_save_value): New prototype.
	* editfns.c (save_excursion_save): Use Lisp_Misc_Save_Value.
	Add comment.
	(save_excursion_restore): Adjust to match saved data structure.
	Use free_save_value to offload some work from GC.  Drop obsolete
	#if 0 code.

1231
2012-12-03  Chong Yidong  <cyd@gnu.org>
1232 1233 1234

	* fileio.c (Vauto_save_list_file_name): Doc fix.

1235
2012-12-03  Fabrice Popineau  <fabrice.popineau@gmail.com>
1236 1237

	* w32fns.c: Remove prototype of atof.
1238
	(syspage_mask): Make it DWORD_PTR, for compatibility with 64-bit
1239
	builds.
1240
	(file_dialog_callback): Make it UINT_PTR.
1241 1242 1243 1244 1245 1246 1247 1248

	* w32common.h (syspage_mask): Declare DWORD_PTR, for compatibility
	with 64-bit builds.

	* w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
	(FILE_ANY_ACCESS, CTL_CODE) [_MSC_VER]: Define only if not already
	defined.

1249
2012-12-03  Glenn Morris  <rgm@gnu.org>
1250

1251
	* data.c (Fboundp, Fsymbol_value): Doc fix re lexical-binding.
1252

1253 1254
2012-12-02  Paul Eggert  <eggert@cs.ucla.edu>

1255 1256 1257 1258 1259 1260 1261
	Fix xpalloc confusion after memory is exhausted.
	* alloc.c (xpalloc): Comment fix.
	* charset.c (Fdefine_charset_internal): If xpalloc exhausts memory
	and signals an error, do not clear charset_table_size, as
	charset_table is still valid.
	* doprnt.c (evxprintf): Clear *BUF after freeing it.

1262 1263 1264 1265 1266 1267 1268
	Use execve to avoid need to munge environ (Bug#13054).
	* callproc.c (Fcall_process):
	* process.c (create_process):
	Don't save and restore environ;	no longer needed.
	* callproc.c (child_setup):
	Use execve, not execvp, to preserve environ.

1269 1270 1271 1272
2012-12-01  Paul Eggert  <eggert@cs.ucla.edu>

	* xterm.c (x_draw_image_relief): Remove unused locals (Bug#10500).

1273 1274 1275 1276 1277 1278 1279
2012-12-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>

	* xterm.c (x_draw_relief_rect, x_draw_image_relief): Fix relief
	display for sliced images (Bug#10500).

	* w32term.c (w32_draw_relief_rect, x_draw_image_relief): Likewise.

Juanma Barranquero's avatar
Juanma Barranquero committed
1280 1281 1282 1283 1284
2012-11-30  Juanma Barranquero  <lekktu@gmail.com>

	* doc.c (Fdocumentation): Re-add handling of function-documentation,
	accidentally removed in 2012-11-09T04:10:16Z!monnier@iro.umontreal.ca (bug#13034).

1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295
2012-11-29  Dmitry Antipov  <dmantipov@yandex.ru>

	* xdisp.c (window_outdated): Remove eassert since it hits
	some suspicious corner cases (see Bug#13007 and Bug#13012).
	(mode_line_update_needed): New function.
	(redisplay_internal, redisplay_window): Use it.
	(ensure_selected_frame): New function.
	(redisplay_internal, unwind_redisplay): Use it.
	(redisplay_internal): Move comment about buffer_shared...
	(buffer_shared_and_changed): ...near to its real use.

1296 1297 1298 1299
2012-11-29  Paul Eggert  <eggert@cs.ucla.edu>

	* callproc.c (Fcall_process): Don't misreport vfork failure.

1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310
2012-11-28  Paul Eggert  <eggert@cs.ucla.edu>

	* callproc.c (Fcall_process): Fix vfork portability problems.
	Do not assume that fd[0], count, filefd, and save_environ survive
	vfork.  Fix bug whereby wrong errno value could be reported for
	pipe failure.  Some minor cleanups, too, as follows.  Move buf and
	bufsize to the context where they're needed.  Change new_argv to
	be of type char **, as this is more convenient and avoids casts.
	(CALLPROC_BUFFER_SIZE_MIN, CALLPROC_BUFFER_SIZE_MAX):
	Now local constants, not macros.

1311 1312 1313 1314 1315
2012-11-18  Kenichi Handa  <handa@gnu.org>

	* font.c (font_unparse_xlfd): Fix previous change.  Keep "const"
	for the variable "f".

1316 1317 1318 1319 1320
2012-11-13  Kenichi Handa  <handa@gnu.org>

	* font.c (font_unparse_xlfd): Exclude special characters from the
	generating XLFD name.

1321 1322
2012-11-27  Paul Eggert  <eggert@cs.ucla.edu>

1323 1324 1325 1326
	Assume POSIX 1003.1-1988 or later for grp.h, pwd.h.
	* dired.c (stat_uname, stat_gname):
	* fileio.c (Fexpand_file_name): Remove no-longer-needed casts.

1327 1328 1329
	Assume POSIX 1003.1-1988 or later for errno.h (Bug#12968).
	* dired.c (directory_files_internal, file_name_completion):
	Assume EAGAIN and EINTR are defined.
1330

1331 1332 1333 1334 1335 1336 1337 1338
	* fileio.c (Fcopy_file): Assume EISDIR is defined.
	* gmalloc.c (ENOMEM, EINVAL): Assume they're defined.
	* gnutls.c (emacs_gnutls_write): Assume EAGAIN is defined.
	* lread.c (readbyte_from_file): Assume EINTR is defined.
	* process.c (wait_reading_process_output, send_process) [subprocesses]:
	Assume EIO and EAGAIN are defined.
	* unexcoff.c (write_segment): Assume EFAULT is defined.

1339
2012-11-27  Eli Zaretskii  <eliz@gnu.org>
1340 1341 1342 1343

	* fontset.c (Finternal_char_font): Return nil on non-GUI frames.
	(Bug#11964)

1344 1345 1346 1347 1348
	* xdisp.c (draw_glyphs): Don't draw in mouse face if mouse
	highlighting on the frame was cleared.  Prevents assertion
	violations when repeatedly clicking on the "Top" link of the
	"bread-crumbs" in Info buffers.

1349 1350 1351 1352
2012-11-25  Paul Eggert  <eggert@cs.ucla.edu>

	* sysdep.c (sys_subshell): Don't assume pid_t fits in int.

1353 1354 1355 1356 1357 1358
2012-11-24  Ken Brown  <kbrown@cornell.edu>

	* keyboard.c (HAVE_MOUSE):
	* frame.c (HAVE_MOUSE): Remove, and rewrite code as if HAVE_MOUSE
	were always defined.

1359
2012-11-24  Eli Zaretskii  <eliz@gnu.org>
1360

1361 1362 1363 1364
	* xdisp.c (set_cursor_from_row): Skip step 2 only if point is not
	between bpos_covered and bpos_max.  This fixes cursor display when
	several display strings follow each other.

1365 1366 1367 1368
	* .gdbinit (pgx): If the glyph's object is a string, display the
	pointer to string data, rather than the value of the string object
	itself (which barfs under CHECK_LISP_OBJECT_TYPE).

1369 1370 1371 1372
	* indent.c (Fvertical_motion): If the starting position is covered
	by a display string, return to one position before that, to avoid
	overshooting it inside move_it_to.  (Bug#12930)

1373 1374 1375 1376 1377 1378 1379 1380 1381 1382
2012-11-23  Dmitry Antipov  <dmantipov@yandex.ru>

	* frame.h (struct frame): Remove display_preempted member
	since all users are dead long ago.
	* nsterm.h (struct x_output): Use the only dummy member.
	* w32menu.c (pending_menu_activation): Remove since not
	really used.
	(set_frame_menubar): Adjust user.
	* w32term.h (struct x_output): Drop outdated #if 0 code.
	(struct w32_output): Use bitfields for explicit_parent,
1383 1384
	asked_for_visible and menubar_active members.
	Drop unused pending_menu_activation member.
1385 1386 1387 1388
	* xterm.h (struct x_output): Drop outdated #if 0 code.
	Use bitfields for explicit_parent, asked_for_visible,
	has_been_visible and net_wm_state_hidden_seen members.

1389 1390 1391 1392 1393 1394
2012-11-23  Eli Zaretskii  <eliz@gnu.org>

	* makefile.w32-in (globals.h, gl-stamp): Use $(SWITCHCHAR) instead
	of a literal "/".  (Bug#12955)
	(gl-stamp): Invoke fc.exe directly, not through cmd.

1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411
2012-11-23  Paul Eggert  <eggert@cs.ucla.edu>

	Assume POSIX 1003.1-1988 or later for dirent.h (Bug#12958).
	* dired.c: Assume HAVE_DIRENT_H.
	(NAMLEN): Remove, replacing with ...
	(dirent_namelen): New function.  All uses changed.  Use the GNU macro
	_D_EXACT_NAMELEN if available, as it's faster than strlen.
	(DIRENTRY): Remove, replacing all uses with 'struct dirent'.
	(DIRENTRY_NONEMPTY): Remove.  All callers now assume it's nonzero.
	* makefile.w32-in (DIR_H): Remove.  All uses replaced with
	$(NT_INC)/dirent.h.
	($(BLD)/w32.$(O)): Do not depend on $(SRC)/ndir.h.
	* ndir.h: Rename to ../nt/inc/dirent.h.
	* sysdep.h (closedir) [!HAVE_CLOSEDIR]: Remove.
	Do not include <dirent.h>; no longer needed.
	* w32.c: Include <dirent.h> rather than "ndir.h".

1412 1413 1414 1415
2012-11-23  Chong Yidong  <cyd@gnu.org>

	* xftfont.c (xftfont_open): Remove duplicate assignment.

1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429
2012-11-22  Dmitry Antipov  <dmantipov@yandex.ru>

	* alloc.c (Fgarbage_collect): Unblock input after clearing
	gc_in_progress to avoid note_mouse_highlight glitch with GC.
	* frame.h (FRAME_MOUSE_UPDATE): New macro.
	* msdos.c (IT_frame_up_to_date): Use it here...
	* w32term.c (w32_frame_up_to_date): ...here...
	* xterm.c (XTframe_up_to_date): ...and here...
	* nsterm.m (ns_frame_up_to_date): ...but not here.
	* lisp.h (Mouse_HLInfo): Remove mouse_face_deferred_gc member.
	Adjust users.
	* xdisp.c (message2_nolog, message3_nolog, note_mouse_highlight):
	Do not check whether GC is in progress.

1430 1431 1432 1433 1434 1435 1436 1437
2012-11-22  Dmitry Antipov  <dmantipov@yandex.ru>

	* xdisp.c (window_buffer_changed): New function.
	(update_menu_bar, update_tool_bar): Use it to
	simplify large 'if' statements.
	(redisplay_internal): Generalize commonly used
	'tail' and 'frame' local variables.

1438 1439 1440 1441 1442
2012-11-22  Eli Zaretskii  <eliz@gnu.org>

	* w32.c (getcwd): Fix the 2nd argument type, to prevent conflicts
	with Windows system header.

1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453
2012-11-21  Paul Eggert  <eggert@cs.ucla.edu>

	Assume POSIX 1003.1-1988 or later for unistd.h (Bug#12945).
	* alloc.c: Assume unistd.h exists.
	* fileio.c (Fexpand_file_name) [DOS_NT]: Use getcwd, not getwd.
	* sysdep.c (get_current_dir_name): Assume getcwd exists.
	(getwd) [USG]: Remove; no longer needed.
	(sys_subshell) [DOS_NT]: Use getcwd, not getwd.
	* w32.c (getcwd): Rename from getwd, and switch to getcwd's API.
	* w32.h (getcwd): Remove decl.

1454 1455 1456 1457 1458 1459
2012-11-21  Stefan Monnier  <monnier@iro.umontreal.ca>

	* xdisp.c (fast_set_selected_frame): Rename from update_tool_bar_unwind.
	Make it set selected_window as well.
	(update_tool_bar): Use it.

1460
2012-11-21  Ken Brown  <kbrown@cornell.edu>
Ken Brown's avatar
Ken Brown committed
1461 1462 1463 1464 1465

	* emacs.c (main): Set the G_SLICE environment variable for all
	Cygwin builds, not just GTK builds.  See
	https://lists.gnu.org/archive/html/emacs-devel/2012-11/msg00368.html.

1466
2012-11-21  Eli Zaretskii  <eliz@gnu.org>
1467 1468 1469 1470 1471

	* w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
	(FILE_ANY_ACCESS, CTL_CODE, FSCTL_GET_REPARSE_POINT) [_MSC_VER]:
	Define for the MSVC compiler.

1472
	* w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing semi-colon.
1473 1474 1475 1476

	* fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
	(Fexpand_file_name) [DOS_NT]: Pass encoded file name to
	dostounix_filename.  Prevents crashes down the road, because
1477 1478
	dostounix_filename assumes it gets a unibyte string.
	Reported by Michel de Ruiter <michel@sentient.nl>, see
1479 1480
	http://lists.gnu.org/archive/html/help-emacs-windows/2012-11/msg00017.html

1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493
2012-11-20  Stefan Monnier  <monnier@iro.umontreal.ca>

	Conflate Qnil and Qunbound for `symbol-function'.
	* alloc.c (Fmake_symbol): Initialize `function' to Qnil.
	* lread.c (init_obarray): Set `function' fields to Qnil.
	* eval.c (Fcommandp): Ignore Qunbound.
	(Fautoload, eval_sub, Fapply, Ffuncall, Fmacroexpand):
	* data.c (Ffset, Ffboundp, indirect_function, Findirect_function):
	Test NILP rather than Qunbound.
	(Ffmakunbound): Set to Qnil.
	(Fsymbol_function): Never signal an error.
	(Finteractive_form): Ignore Qunbound.

1494 1495 1496 1497
2012-11-20  Paul Eggert  <eggert@cs.ucla.edu>

	* eval.c (interactive_p): Remove no-longer-used decl.

1498 1499 1500 1501 1502 1503
2012-11-20  Dmitry Antipov  <dmantipov@yandex.ru>

	* xdisp.c (buffer_shared): Adjust comment.
	(buffer_shared_and_changed): New function.
	(prepare_menu_bars, redisplay_internal): Use it to
	decide whether all windows or frames should be updated.
1504 1505 1506
	(window_outdated): New function.
	(text_outside_line_unchanged_p, redisplay_window): Use it.
	(redisplay_internal): Likewise.  Fix indentation.
1507

1508 1509 1510 1511 1512 1513
2012-11-20  Stefan Monnier  <monnier@iro.umontreal.ca>

	* eval.c (Finteractive_p, Fcalled_interactively_p, interactive_p): Remove.
	(syms_of_eval): Remove corresponding defsubr.
	* bytecode.c (exec_byte_code): `interactive-p' is now a Lisp function.

1514 1515 1516 1517 1518 1519 1520 1521 1522
2012-11-19  Daniel Colascione  <dancol@dancol.org>

	* w32fns.c (Fx_file_dialog):
	(Fx_file_dialog): Accomodate rename of cygwin_convert_path* to
	cygwin_convert_file_name*.

	* cygw32.c (Fcygwin_convert_path_to_windows, syms_of_cygw32):
	Rename cygwin_convert_path* to cygwin_convert_file_name*.

1523 1524 1525 1526
2012-11-18  Paul Eggert  <eggert@cs.ucla.edu>

	* nsterm.m (ns_select): Send SIGIO only to self, not to process group.

1527
2012-11-18  Eli Zaretskii  <eliz@gnu.org>
1528 1529 1530 1531 1532

	* w32select.c: Include w32common.h before w32term.h, so that
	windows.h gets included before w32term.h uses some of its
	features, see below.

1533 1534 1535 1536
	* w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]:
	New typedefs.
	(EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]:
	New prototypes.
1537