Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
11489 lines (8909 sloc) 445 KB
2015-02-03 Eli Zaretskii <>
* xdisp.c (handle_stop, handle_single_display_spec)
(next-element_from_image): Don't reset the
ignore_overlay_strings_at_pos_p flag here.
(next_element_from_buffer): Reset ignore_overlay_strings_at_pos_p
(next_overlay_string): Set ignore_overlay_strings_at_pos_p here,
after we've exhausted all the overlay strings at the current
position. (Bug#19307)
2015-02-02 Eli Zaretskii <>
* xdisp.c (set_iterator_to_next): Set value of stop_charpos
according to the object we are about to resume iterating.
* dispnew.c (adjust_glyph_matrix): Set the update_mode_line flag
of the window whose current glyph matrix was resized, which
disables the mode-line row as side effect.
* xdisp.c (redisplay_window): Don't avoid redisplay of a window
whose update_mode_line flag is set. (Bug#19721)
2015-01-30 Eli Zaretskii <>
* dispextern.h (FACE_FOR_CHAR): Fix the commentary.
2015-01-29 Hans Wennborg <> (tiny change)
* emacs.c (decode_env_path): Add parentheses around ternary
operator to increase readability and pacify compiler warnings.
2015-01-29 Eli Zaretskii <>
* w32.c (sys_readdir): Map ERROR_NOT_READY (as in "device not
ready") to ENOENT.
2015-01-28 Eli Zaretskii <>
* dired.c (directory_files_internal, file_name_completion)
[WINDOWSNT]: Signal an error when errno is set non-zero by
'readdir', regardless of its value.
* w32.c (sys_readdir): Set errno to ENOENT when the directory
doesn't exist and to EACCES when it's not accessible to the
current user. Set errno to zero when FindNextFile exhausts the
directory, so that callers don't interpret that as an error and
don't signal a file-error.
(open_unc_volume): Set errno to ENOENT if WNetOpenEnum fails.
2015-01-27 Eli Zaretskii <>
* dired.c (directory_files_internal) [WINDOWSNT]: If readdir
returns NULL and errno is ENOTDIR, behave as if opendir failed to
open the directory. (Bug#19701)
* w32.c (sys_readdir): If FindFirstFile fails because the
directory doesn't exist, set errno to ENOTDIR.
2015-01-24 Jan Djärv <>
* nsterm.m (drawRect:): Add block/unblock_input (Bug#19660).
2015-01-21 Paul Eggert <>
Fix coding.c subscript error
Avoid undefined behavior if CODING_ISO_INVOCATION returns negative.
Backport: correct old fix for GTK font selection
* gtkutil.c (xg_get_font): Fix off-by-2 typo.
Fixes: bug#3228
2015-01-21 Jan Djärv <>
* nsterm.m (EV_TRAILER2): Set Vinhibit_quit to Qt (Bug#19531).
2015-01-17 Eli Zaretskii <>
* xdisp.c (produce_image_glyph): Fix display of images in R2L
screen lines: prepend the new glyph to the ones already there
instead of appending it.
2015-01-14 Eli Zaretskii <>
* w32fns.c (w32_set_title_bar_text): New function, including
support for titles with non-ASCII characters outside of the
current system codepage.
(x_set_name, x_set_title): Use it. (Bug#19590)
2015-01-10 Eli Zaretskii <>
* indent.c (Fvertical_motion): Return zero if we started from ZV
and there's an overlay after-string there. (Bug#19553)
2015-01-09 Eli Zaretskii <>
* emacs.c (usage_message): Fix the description of the -nl switch.
2015-01-08 Eli Zaretskii <>
* dispnew.c (buffer_posn_from_coords): Fix the value of the column
returned for right-to-left screen lines. (Before the change on
2014-12-30, the incorrectly-computed X pixel coordinate concealed
this bug.)
2015-01-05 Eli Zaretskii <>
* xdisp.c (move_it_to, try_cursor_movement): Don't use the window
end information if the window_end_valid flag is unset.
(try_window_id): If the call to display_line invalidated the
window end information, give up the try_window_id optimization.
2015-01-04 Eli Zaretskii <>
* w32fns.c (Fx_server_version, Fx_server_vendor): Doc fix.
* xfns.c (Fx_server_version, Fx_server_vendor): Doc fix.
* emacs.c (syms_of_emacs) <system-configuration>: Doc fix.
2014-12-30 Eli Zaretskii <>
* xdisp.c (pos_visible_p): Fix up the X coordinate for
right-to-left screen lines. (Bug#19473)
2014-12-28 Eli Zaretskii <>
* w32proc.c (Fw32_get_codepage_charset): Doc fix. (Bug#19458)
2014-12-28 Paul Eggert <eggert@Penguin.CS.UCLA.EDU>
Port memory-full checking to GnuTLS 3.3
Instead of using gnutls_global_set_mem_functions, check every call
to a GnuTLS function that might return an indication of memory
exhaustion. Suggested by Dmitry Antipov in:
* gnutls.c (gnutls_global_set_mem_functions) [WINDOWSNT]: Remove.
(init_gnutls_functions): Do not load gnutls_global_set_mem_functions.
(fn_gnutls_global_set_mem_functions) [!WINDOWSNT]: Remove.
All uses removed.
(check_memory_full): New function.
(emacs_gnutls_handshake, emacs_gnutls_handle_error)
(gnutls_make_error, Fgnutls_boot): Use it.
(emacs_gnutls_global_init): Avoid gnutls_global_set_mem_functions.
2014-12-25 Eli Zaretskii <>
* xdisp.c (set_iterator_to_next) <GET_FROM_STRING>: Limit search in
composition_compute_stop_pos to the number of characters in the
string. (Bug#19435)
* composite.c (composition_compute_stop_pos): If no composition
was found in a string before ENDPOS, and ENDPOS is the string end,
no need to back up to a safe point.
* dispextern.h (struct it) <end_charpos>: Improve commentary.
2014-12-24 Jan Djärv <>
* nsimage.m (allocInitFromFile:): Initialize bmRep.
(dealloc): Release bmRep.
(setPixmapData): Make bmRep local so class member is not
set (Bug#19133).
(setPixmapData): Rename local variable bmRep to avoid compiler
2014-12-24 Jan Djärv <>
* nsterm.h (EmacsImage): Remove imageListNext, refCount, reference,
imageListSetNext, imageListNext.
* nsimage.m (ImageList, imageListNext, imageListSetNext:)
(reference): Remove.
(allocInitFromFile:): Remove searching ImageList and calling
reference (Bug#18918).
(dealloc): Remove handling if ImageList.
2014-12-22 Jan Djärv <>
* xterm.c (do_ewmh_fullscreen): Don't remove maximized_horz/vert
when going to fullscreen (Bug#19427).
2014-12-18 Eli Zaretskii <>
* window.c (Fwindow_body_width): Doc fix. (Bug#19395)
2014-12-15 Stefan Monnier <>
* buffer.c (syms_of_buffer) <Vafter_change_functions>: fix docstring.
2014-12-13 Eli Zaretskii <>
* gnutls.c (gnutls_init): Fix deprecation warning from GCC.
2014-12-12 Eli Zaretskii <>
* gnutls.c (Fgnutls_available_p, syms_of_gnutls):
Move gnutls-available-p out of the HAVE_GNUTLS conditional, and define
them only once.
2014-12-11 Teodor Zlatanov <>
* emacs.c (main): Always include gnutls.h and run syms_of_gnutls.
* gnutls.h: Always declare syms_of_gnutls.
* gnutls.c (Fgnutls_available_p syms_of_gnutls): Move later for
clarity. Let the availability check return Qnil when the GnuTLS
integration is not available, instead of erroring out.
2014-12-10 Eli Zaretskii <>
* xdisp.c (move_it_in_display_line_to, display_line):
Don't disallow overflow-newline-into-fringe when word-wrap is in
effect. (Bug#19300)
2014-12-04 Lee Duhem <> (tiny change)
* eval.c (Fsignal): Remove duplicate test.
(Fautoload_do_load): Fix up docstring.
2014-12-02 Jan Djärv <>
* nsterm.m (represented_filename, represented_frame): New variables.
(ns_set_represented_filename): New function.
(sendEvent:): Set represented filename here to avoid flicker,
related to Bug#18757.
* nsterm.h: Declare ns_set_represented_filename.
* nsfns.m (ns_set_name_as_filename): Don't set represented filename
at once, call ns_set_represented_filename instead.
2014-11-27 Eli Zaretskii <>
* xdisp.c (handle_single_display_spec): When ignoring a fringe
bitmap display, reset the ignore_overlay_strings_at_pos_p flag.
(next_element_from_buffer): When done with overlays, reset the
ignore_overlay_strings_at_pos_p flag. (Bug#19201)
2014-11-25 Eli Zaretskii <>
* w32fns.c (Fw32_shell_execute): Convert forward slashes in
DOCUMENT to backslashes, if DOCUMENT is a file. (Bug#19141)
2014-11-25 Ulrich Müller <>
* (temacs$(EXEEXT)): Use consistent flag settings
for paxctl and setfattr. Fixes temacs startup failure with
grsecurity/PaX enabled Linux kernel (bug#19067).
2014-11-17 Oscar Fuentes <>
* src/w32.c: Use MINGW_W64 instead of _W64.
* src/w32term.c: Likewise.
2014-11-16 Stefan Monnier <>
* frame.c (Fhandle_switch_frame): Deactivate shift-region (bug#19003).
2014-11-15 Jan Djärv <>
* nsterm.m (ns_send_appdefined): Check for application defined
event on Cocoa (Bug#18993). Backport from trunk.
2014-11-15 Eli Zaretskii <>
* window.c (window_scroll_pixel_based): Avoid truncation/rounding
errors in computing the number of pixels to scroll.
Suggested by Kelly Dean <>. (Bug#19060)
2014-11-15 Jan Djärv <>
* nsmenu.m (update_frame_tool_bar): If tool bar changes height,
call updateFrameSize.
* nsterm.m (setFrame:): Remove call to display (Bug#18757).
2014-11-14 Jan Djärv <>
* nsfns.m (x_set_foreground_color, x_set_background_color)
(x_set_cursor_color, Fxw_color_values): Block/unblock input,
use SET_FRAME_GARBAGED instead of redraw_frame (Bug#19036).
2014-11-09 Eli Zaretskii <>
* fileio.c (Finsert_file_contents): Invalidate buffer caches also
when the inserted text does not need decoding. (Bug#18982)
* w32heap.c (allocate_heap): Set the lower limit of heap at 8MB.
2014-11-09 Jan Djärv <>
* nsterm.h (EmacsScroller): judge returns bool.
* nsterm.m (ns_set_vertical_scroll_bar): Release bar.
(ns_judge_scroll_bars): Only set removed if judge returns true.
(judge): Returns bool == condemned. Remove self from window.
(setPosition:portion:whole:): Remove raise SIGIO (Bug#18757).
2014-11-08 Jan Djärv <>
* nsterm.m (init): Replace OSX 10.9 check with IMPL_COCOA.
(run): Ditto. Only use non-system event loop if OSX version is
exactly 10.9 (Bug#18993).
(ns_set_vertical_scroll_bar): Don't call bar setPosition: unless
needed (Bug#18757).
2014-11-07 Michael Albinus <>
* callproc.c (encode_current_directory): Support handling of file
names prepended by "/:". (Bug#18891)
2014-11-06 Alan Mackenzie <>
* syntax.c (back_comment): Fix off-by-one error (bug#18022).
2014-11-06 Dima Kogan <>
* xgselect.c (xg_select): Use g_main_context_acquire (bug#18861).
2014-11-05 Michael Albinus <>
* dired.c (Ffile_attributes): Return Qnil, if Fexpand_file_name
raises an error. (Bug#18891)
2014-11-03 Eli Zaretskii <>
* xdisp.c (Fdump_glyph_matrix, Fdump_frame_glyph_matrix): Doc fix.
(Fdump_frame_glyph_matrix): Don't segfault if invoked on a GUI
frame; instead, print an error message.
2014-11-03 Jan Djärv <>
* nsfns.m (ns_set_doc_edited): Check for FRAME_NS (Bug#18925).
2014-10-31 Jan Djärv <>
* macfont.m (macfont_glyph_extents): Turn off syntetic bold
if force_integral_p (i.e. no antialias).
(macfont_draw): Check ns_antialias_text, also turn off syntetic
bold if no antialias (Bug#18876).
* emacs.c (main): Don't chdir to $HOME on Cocoa if --chdir
was given (Bug#18846).
2014-10-30 Jan Djärv <>
* nsterm.h (ns_set_doc_edited): Declare taking no args.
* nsfns.m (ns_set_doc_edited): Do all logic (check frames) here
instead of in xdisp.c, function now takes void. (Bug#18884).
* xdisp.c (prepare_menu_bars): Remove HAVE_NS code.
(redisplay_internal): Call ns_set_doc_edited if HAVE_NS (Bug#18884).
* nsterm.h (EmacsScroller): Replace Lisp_Object win with
struct window* (Bug#18889).
Remove getMouseMotionPart.
(ns_output): Make icon_top/left int.
* nsfns.m (x_icon): icon_top/left is int.
* nsterm.m (ns_mouse_position): Remove unused code.
(initFrame:window:, dealloc): Use window instead of win.
(getMouseMotionPart:window:x:y:): Remove, unused.
(sendScrollEventAtLoc:fromEvent:): Make Lisp_Object win from window.
2014-10-30 Samuel Bronson <>
* unexmacosx.c (copy_data_segment): Port to GCC 4.6+ (Bug#9927).
2014-10-28 Eli Zaretskii <>
* fileio.c (Fexpand_file_name): Use make_unibyte_string, not
build_string, when importing a home directory. (Bug#18873)
2014-10-26 Eli Zaretskii <>
* dispnew.c (buffer_posn_from_coords):
account for the header-line height. (Bug#18839)
2014-10-22 YAMAMOTO Mitsuharu <>
* xdisp.c (draw_glyphs): Set clipping to highlight boundaries.
(erase_phys_cursor): Fix confusion between window-relative and
text area-relative x-coordinates. [Backport]
2014-10-20 Glenn Morris <>
* minibuf.c (history-length): Increase default from 30 to 100.
2014-10-20 Stefan Monnier <>
* xdisp.c (redisplay_window): Re-run pre-redisplay-function after we
move point.
2014-10-20 Glenn Morris <>
* Version 24.4 released.
2014-10-17 Eli Zaretskii <>
* xterm.c (x_draw_hollow_cursor): Fix display of hollow cursor on
1-pixel R2L characters.
Reported by Dmitry Antipov <>, see
2014-10-10 Paul Eggert <>
Fix port to Debian GNU/kFreeBSD 7 (wheezy) (Bug#18666).
* process.c (accept4) [!HAVE_ACCEPT4]: New macro.
2014-10-09 Stefan Monnier <>
* frame.c (Fmouse_pixel_position): Call Vmouse_position_function
2014-10-08 K. Handa <>
* coding.c (detect_coding_iso_2022): Set coding->rejected
correctly when an invalid escape sequence is found (Bug#18610).
2014-10-03 Dmitry Antipov <>
* font.c (font_list_entities): Do not add empty vector to font cache.
(font_matching_entity): Likewise. If matching entity is found, insert
1-item vector with this entity instead of an entity itself (Bug#17125).
2014-10-02 Eli Zaretskii <>
* xdisp.c (move_it_by_lines): Call reseat_1 after moving the
iterator backwards, to resync the bidi iterator. (Bug#18584)
2014-10-01 Jan Djärv <>
* xfaces.c (Finternal_set_lisp_face_attribute): Don't try to
make a font_object from a tty frame (Bug#18573).
(Finternal_set_lisp_face_attribute): Add FIXME comment.
2014-09-30 Eli Zaretskii <>
* w32fns.c (w32_createwindow): Accept an additional argument, an
array of 2 values specifying the coordinates of the frame's
top-left corner. Use these values instead of calling x_get_arg,
which can cons Lisp objects, and therefore cannot be called except
from the main thread. Remove redundant tests for the default values.
(my_create_window): Move the calculation of the coordinates of the
frame's top-left edge here. Pass them to the input thread via the
second parameter of the WM_EMACS_CREATEWINDOW message.
for the details.
2014-09-29 Eli Zaretskii <>
* xdisp.c (cursor_row_fully_visible_p): Update commentary.
(redisplay_window): Treat the frame's frozen_window_starts flag
the same way as the optional_new_start flag for the window: only
obey it if the glyph row showing point will be fully visible.
Likewise when the window start is in a continuation line. If,
after trying everything under the 'force_start' label, point is
still not fully visible, give up and scroll the window.
Add debugging traces. (Bug#18545)
* window.c (Frecenter): Set the window's redisplay flag.
2014-09-24 Eli Zaretskii <>
* w32term.c (w32_read_socket): Don't use frame dimensions for
resizing if GetClientRect returned an empty (0, 0, 0, 0)
rectangle. Check the return value of GetClientRect, and don't use
the results if it didn't succeed.
* dispnew.c (change_frame_size_1): Recompute the frame dimensions
in columns and lines after correcting the pixel dimensions in
(adjust_decode_mode_spec_buffer): Add assertion to avoid passing
negative values to xrealloc. (Bug#18528)
2014-09-22 Dmitry Antipov <>
On OSX, do not free font-specific data more than once (Bug#18501).
* macfont.m (macfont_close): Release and free font-specific data
only if it wasn't previously freed.
2014-09-21 David Caldwell <> (tiny change)
* unexmacosx.c (dump_it): Improve error message.
2014-09-18 Juri Linkov <>
* image.c (imagemagick_load_image): Add delay to imagemagick metadata.
(Bug#10747, bug#18334)
2014-09-18 Eli Zaretskii <>
* frame.c (Fmouse_position, Fset_mouse_position): Clarify the
units in which the position is measured. (Bug#18493)
* xdisp.c (redisplay_internal): Force redisplay of all windows
that show a buffer whose narrowing has changed. (Bug#18490)
2014-09-16 Eli Zaretskii <>
* xterm.c (x_draw_hollow_cursor, x_draw_bar_cursor):
* w32term.c (x_draw_hollow_cursor, x_draw_bar_cursor): In R2L
lines, draw the hollow-box and hbar cursors on the right side of
cursor-glyph. Thanks to martin rudalics <> for
testing on X.
* xterm.c (x_draw_stretch_glyph_string):
* w32term.c (x_draw_stretch_glyph_string): Fix a thinko that
caused the block cursor to disappear on a TAB in R2L lines in
every window except the leftmost one. Reported by Martin Rudalics
2014-09-16 Dmitry Antipov <>
Always use matched specpdl entry to record call arguments (Bug#18473).
* lisp.h (record_in_backtrace): Adjust prototype.
* eval.c (record_in_backtrace): Return current specpdl level.
(set_backtrace_args, set_backtrace_nargs): Merge. Adjust all users.
(eval_sub, Ffuncall): Record call arguments in matched specpdl
entry and use that entry in call to backtrace_debug_on_exit.
(apply_lambda): Likewise. Get current specpdl level as 3rd arg.
(do_debug_on_call): Get current specpdl level as 2nd arg.
Prefer ptrdiff_t to int and avoid integer overflows.
* fileio.c (make_temp_name):
* font.c (font_parse_family_registry): Avoid integer
overflow on string size calculation.
* data.c (Faset): Likewise for byte index.
2014-09-15 Eli Zaretskii <>
Fix display of R2L lines in partial-width windows.
* xdisp.c (init_iterator): Don't use it->bidi_p before it is
assigned the correct value.
(extend_face_to_end_of_line): Account for truncation and
continuation glyphs in R2L rows when one of the fringes is not
(display_line): Don't assign negative X offset to a row if we are
going to produce a truncation glyph for it. When handling
truncated R2L rows, consider the width of the left fringe instead
of the right one.
(produce_special_glyphs): Fix bogus assignments.
2014-09-14 Eli Zaretskii <>
* w32.c (fcntl): Support O_NONBLOCK fcntl on the write side of
(sys_write): When a write to a non-blocking pipe returns ENOSPC,
set errno to EAGAIN instead, to allow the caller to retry the
write after some waiting. Fixes deadlocks when Emacs exchanges a
lot of data through the pipe. (Bug#18420)
2014-09-13 Eli Zaretskii <>
* sound.c (Fplay_sound_internal): Encode the sound file name in
the ANSI codepage. Expand it against data-directory, as per docs,
not against the current directory. No need to make a local copy
of the file name; pass the encoded file name directly to
do_play_sound. (Bug#18463)
* w32.c (ansi_encode_filename): If w32_get_short_filename returns
NULL, and the file name is not encodable in ANSI codepage, return
the string with "?" replacement characters, which will fail the
caller. This avoids returning a random value in that case.
2014-09-11 Martin Rudalics <>
* window.c (Fresize_mini_window_internal): Set w->total_lines
from w->pixel_height (Bug#18422).
2014-09-09 Jan Djärv <>
* nsterm.m (updateFrameSize:, initFrameFromEmacs:)
(toggleFullScreen:): Take frame_resize_pixelwise into account when
setting resize increments (Bug#18435).
2014-09-09 Eli Zaretskii <>
* xdisp.c (pos_visible_p): Properly save and restore the iterator
state around the call to line_bottom, since it can move the
iterator to another screen line. This fixes off-by-one errors in
the reported row in some rare cases.
2014-09-07 Eli Zaretskii <>
* dispnew.c (prepare_desired_row): When MODE_LINE_P is zero,
always make sure the marginal areas of the row are in sync with
what the window wants. (Bug#18419)
2014-09-04 Eli Zaretskii <>
* data.c (set_internal): Use assq_no_quit, not Fassq, to find an
existing binding of a variable, to avoid silently aborting
commands that use specbind. (Bug#18331)
2014-09-02 Eli Zaretskii <>
* dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in
the reported row in the case of a window with a header line, by
improving on the fix committed in 2011-10-08T10:58:50Z! (Bug#18384)
2014-09-02 Paul Eggert <>
* eval.c (internal_lisp_condition_case): Don't overrun the stack
when configured --with-wide-int on typical 32-bit platforms.
2014-08-31 Eli Zaretskii <>
* xdisp.c (display_and_set_cursor): Call erase_phys_cursor also
when HPOS is negative, for the benefit of R2L glyph rows whose
newline overflows into the fringe.
2014-08-30 Ken Brown <>
* conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define.
2014-08-28 Eli Zaretskii <>
* syntax.c (scan_lists): Don't examine positions before BEGV.
2014-08-25 Eli Zaretskii <>
* conf_post.h (_GL_EXECINFO_INLINE) [MSDOS]: Don't define.
2014-08-18 Eli Zaretskii <>
* xdisp.c (handle_stop): Improve commentary.
* indent.c (Fvertical_motion): Fix vertical motion up through a
display property after a newline. (Bug#18276)
2014-08-17 Eli Zaretskii <>
* xdisp.c (display_line): Don't assume that the call to
reseat_at_next_visible_line_start ends up at a character
immediately following the newline on the previous line.
Avoids setting the ends_at_zv_p flag on screen lines that are not at or
beyond ZV, which causes infloop in redisplay. For the details, see
* dispnew.c (buffer_posn_from_coords): Fix mirroring of X
coordinate for hscrolled R2L screen lines. (Bug#18277)
2014-08-11 Ken Brown <>
* gmalloc.c (_malloc_mutex, _aligned_blocks_mutex) [CYGWIN]: Use
ERRORCHECK mutexes. (Bug#18222)
2014-08-11 Glenn Morris <>
* fileio.c: Revert 2013-01-31 change, which chose coding system for
writing before backing up, since it causes a more serious problem
than the one it solves. (Closes Bug#18141, reopens Bug#13522.)
(choose_write_coding_system): No longer callable from Lisp.
Move last piece back here from Fwrite_region.
(Fwrite_region, syms_of_fileio): Update for above changes.
2014-08-09 Martin Rudalics <>
* window.c (Fwindow_new_total, Fwindow_new_normal)
(Fwindow_new_pixel, Fset_window_new_pixel)
(Fset_window_new_total, Fset_window_new_normal): Second attempt
to fix the doc-strings of these functions. See:
2014-08-08 Martin Rudalics <>
* window.c (Fwindow_valid_p): Fix doc-string (Bug#18194).
(Fwindow_new_total, Fwindow_normal_size, Fwindow_new_normal)
(Fwindow_new_pixel, Fset_window_new_pixel)
(Fset_window_new_total, Fset_window_new_normal)
(Fwindow_resize_apply): Fix doc-strings (see Bug#18112).
2014-08-07 Eli Zaretskii <>
* fontset.c (Finternal_char_font): Recompute basic faces if the
frame's face cache was cleared. (Bug#18162)
2014-08-05 Dmitry Antipov <>
Fix bug with uninitialized undo list of an indirect buffer (Bug#18180).
* buffer.c (Fmake_indirect_buffer): Initialize undo list with the
base buffer's undo list.
2014-08-03 Dmitry Antipov <>
Fix bug with an attempt to select uninitialized frame (Bug#18161).
* xfns.c (Fx_create_frame): Move call to change_frame_size to
a section where Lisp evaluation is disabled. This way a pointer
to uninitialized frame is not accessible from Lisp, which becomes
critical if following call to x_figure_window_size throws an error.
2014-08-02 Paul Eggert <>
Fix bug with clang + directory_files_internal + GC (Bug#16986).
* dired.c (directory_files_internal): Use a volatile variable
to prevent the compiler from optimizing away all copies of a local.
I wonder how many other GC-related bugs like this lurk elsewhere?
Avoid 100% CPU utilization on ssh session exit (Bug#17691).
* xterm.h (struct x_display_info): New member 'connection'.
* xterm.c (x_term_init, x_delete_terminal): Set and use it,
so that x_delete_terminal has a file descriptor to pass to
2014-08-01 Eli Zaretskii <>
Fix display of R2L lines when the last character fits only partially.
for the details.
* xdisp.c (extend_face_to_end_of_line): If the last glyph of an
R2L row is visible only partially, give the row a negative x
(display_line): Fix the calculation of the glyph whose pixel width
is used to decide whether the last produced glyph fits on the
line. When the last glyph fits only partially, give the row a
negative x offset.
2014-07-29 Eli Zaretskii <>
Fix hscroll of R2L lines that begin with a TAB or another wide glyph.
* xdisp.c (append_stretch_glyph): In a R2L glyph row, decrease the
pixel width of the first glyph that is hscrolled from display.
(display_line): In R2L glyph rows, don't give a negative offset to
row->x when the first glyph begins before first_visible_x.
2014-07-29 Andreas Schwab <>
* macros.c (Fstart_kbd_macro): Initialize kbd_macro_ptr and
kbd_macro_end together with kbd_macro_buffer. (Bug#18140)
2014-07-28 Eli Zaretskii <>
* xdisp.c (display_line): If called with iterator set up to write
to a marginal area, delay the call to handle_line_prefix until we
switch back to the text area. (Bug#18035)
* .gdbinit (xwindow): The members total_cols, total_lines,
left_col, and top_line are C integers (and has been so for the
last 1.5 years).
2014-07-20 Jan Djärv <>
* nsterm.m (applicationDidFinishLaunching:): Call
antialiasThresholdDidChange, register for antialias changes (Bug#17534).
(antialiasThresholdDidChange:): New method for EmacsApp.
* nsterm.h (EmacsApp): Add antialiasThresholdDidChange.
* macfont.m (macfont_update_antialias_threshold): Remove static.
* macfont.h (macfont_update_antialias_threshold): Declare.
2014-07-17 Eli Zaretskii <>
* w32select.c (setup_windows_coding_system):
Apply CODING_ANNOTATION_MASK to the common_flags member of struct
coding_system. Reported by martin rudalics <>.
* w16select.c (Fw16_get_clipboard_data):
Apply CODING_ANNOTATION_MASK to the common_flags member of struct
* xdisp.c (init_iterator): Initialize it->stop_charpos to the
buffer position where we are to start the iteration.
(handle_invisible_prop): Record in it->stop_charpos the position
where the invisible text ends. (Bug#18035)
(hscroll_window_tree): Don't try hscrolling windows whose cursor
row has zero buffer position as their start position.
Reported by martin rudalics <>.
2014-07-16 Eli Zaretskii <>
* xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
infinite looping in redisplay when display lines don't have enough
space to display even a single character. (Bug#18036)
2014-07-13 Eli Zaretskii <>
* xdisp.c (decode_mode_spec): Call file-remote-p on the current
buffer's default-directory only if it is a string. (Bug#17986)
2014-07-12 Eli Zaretskii <>
* xdisp.c (display_line): Don't call FETCH_BYTE with argument less
than 1. (Bug#17962)
* w32fns.c (Fx_file_dialog): Mention in the doc string the
behavior on Windows 7 and later when the function is repeatedly
invoked with the same value of DIR. (Bug#17950)
* xfns.c (Fx_file_dialog) [USE_MOTIF, USE_GTK]: Update the doc
string to match the one in w32fns.c.
2014-07-08 Eli Zaretskii <>
* xdisp.c (move_it_to): Adjust calculation of line_start_x to what
x_produce_glyphs does when it generates a stretch glyph that
represents a TAB. (Bug#17969)
2014-07-05 Eli Zaretskii <>
* xdisp.c (pos_visible_p): If CHARPOS is at beginning of window,
and there is a display property at that position, don't call
move_it_to to move to a position before window start. (Bug#17942)
Fix condition for finding CHARPOS by the first call to move_it_to.
2014-07-05 Stefan Monnier <>
* syntax.c (find_defun_start): Try the cache even
if !open_paren_in_column_0_is_defun_start.
(back_comment): If find_defun_start was pessimistic, use the
scan_sexps_forward result to improve the cache (bug#16526).
2014-07-04 Daniel Colascione <>
Backport from trunk.
* xfns.c (create_frame_xic): Pass XNStatusAttributes to XCreateIC
only if xic_style calls for it. This change allows Emacs to work
with ibus. Also, don't leak resources if create_frame_xic fails,
and stop caching xic_style across different displays (Bug#17928).
(supported_xim_styles): Make const.
(best_xim_style): Remove first parameter: it's always just
supported_xim_styles. Change to look at supported_xim_styles directly.
2014-07-04 Eli Zaretskii <>
* xdisp.c (redisplay_window): If redisplay of a window ends up
with point in a partially visible line at end of the window, make
sure the amended position of point actually has smaller Y
coordinate; if not, give up and scroll the display. (Bug#17905)
* window.c (window_scroll_pixel_based): When point ends up at the
last fully visible line, don't let move_it_to stop at the left
edge of the line and dupe us into thinking point is inside the
scroll margin.
* w32.c (network_interface_info): Make sure the argument is a
Lisp string.
2014-07-01 Eli Zaretskii <>
* dispnew.c (prepare_desired_row): Accept 2 additional arguments:
the window whose glyph row is being prepared and a flag whether it
is for mode/header line. Make sure the glyph row's marginal areas
are in sync with what the window wants.
* xdisp.c (display_line, display_mode_line):
Call prepare_desired_row with additional arguments, as appropriate.
* dispextern.h (prepare_desired_row): Adjust prototype.
2014-07-01 Dmitry Antipov <>
* xfaces.c (init_frame_faces): Always realize basic faces (Bug#17889).
* menu.c (Fx_popup_dialog): Set Vmenu_updating_frame to avoid crash
caused by xw_popup_dialog in daemon mode (Bug#17891).
2014-06-30 Eli Zaretskii <>
* frame.c (do_switch_frame): When switching to another TTY frame,
make sure FrameCols and FrameRows are in sync with the new frame's
data. (Bug#17875)
2014-06-28 Andreas Schwab <>
* coding.c (encode_coding_utf_8): Correctly count produced_chars
also in unibyte case. (Bug#17865)
2014-06-25 Glenn Morris <>
* puresize.h (BASE_PURESIZE): Increase a bit. (Bug#17846)
2014-06-21 Eli Zaretskii <>
* indent.c (Fvertical_motion): Doc fix.
Move to the goal column, if any, with a single call to
move_it_in_display_line, not in two calls. Doing this with two
calls causes move_it_in_display_line apply the line-prefix
handling twice instead of just once. (Bug#17823)
2014-06-21 Paul Eggert <>
Port to OS X ACLs (Bug#17810).
* fileio.c (Ffile_acl): Port to OS X, where acl_get_file (...,
ACL_TYPE_ACCESS) doesn't work.
2014-06-19 Stefan Monnier <>
* keyboard.c (read_key_sequence): Don't invoke Vprefix_help_command
before checking key-translation-map (bug#17659).
2014-06-19 Dmitry Antipov <>
* font.c (font_make_object): Avoid dangling pointer which may
crash GC (Bug#17771).
2014-06-18 Eli Zaretskii <>
* image.c [5 < GIFLIB_MAJOR + (1 <= GIFLIB_MINOR)]: Declare the
prototype of DGifCloseFile as appropriate for older and newer
versions of giflib.
(gif_close): New function, encapsulates the differences in the
calling sequence of DGifCloseFile before v5.1.0 and after it.
(gif_load): Call gif_close instead of DGifCloseFile. Divulge the
error string where appropriate. (Bug#17790)
2014-06-16 Eli Zaretskii <>
* xdisp.c (Fmove_point_visually): Instead of testing for keyboard
macro execution, make sure point didn't move since last complete
redisplay, as the condition for using the glyph matrix
information. (Bug#17777)
2014-06-14 Eli Zaretskii <>
* xdisp.c (Fmove_point_visually): Don't use the glyph matrix
information if we are in the middle of executing a keyboard macro,
since redisplay doesn't update the screen until the macro is
finished. (Bug#17777)
2014-06-13 Eli Zaretskii <>
* alloc.c (cleanup_vector): Don't dereference a font driver
pointer if it is NULL. (Bug#17771)
2014-06-11 Eli Zaretskii <>
* xdisp.c (set_cursor_from_row): Fix an off-by-one error when
matching overlay strings with 'cursor' property against buffer
positions traversed in the glyph row. (Bug#17744)
2014-06-08 Glenn Morris <>
* fileio.c (write-region-inhibit-fsync): Doc tweak.
* data.c (Flss, Fgtr, Fleq, Fgeq): Doc tweaks.
2014-06-04 Eli Zaretskii <>
* sysdep.c (reset_sys_modes): Use cursorX, not curX, as the latter
contains garbage on WINDOWSNT (which could potentially infloop at
Minimize cursor motion during TTY menu updates.
* term.c (tty_menu_display): Don't position cursor here. Instead,
pass the cursor coordinates to update_frame_with_menu.
(tty_menu_activate): Send the hide cursor command only once in an
iteration through the outer 'while' loop.
* dispnew.c (update_frame_1): Accept an additional argument
SET_CURSOR_P, and position the cursor at the end of the frame
update only if that argument is non-zero. All callers changed to
provide the additional argument as non-zero, except for
(update_frame_with_menu): Accept 2 additional arguments ROW and
COL; if they are non-negative, instruct update_frame_1 not to
position the cursor, and instead position it according to ROW and
* dispextern.h (update_frame_with_menu): Update prototype.
2014-06-02 Stefan Monnier <>
* callproc.c (call_process): Don't check read-only if we don't insert
anything (bug#17666).
2014-06-02 Eli Zaretskii <>
* dispnew.c (update_frame_with_menu): Set display_completed.
2014-06-01 Paul Eggert <>
* frame.c (x_set_frame_parameters): Don't read uninitialized storage.
2014-06-01 Jan Djärv <>
* xterm.c (xg_scroll_callback): Remove position, for jump set portion
to min(value, whole).
2014-06-01 Paul Eggert <>
Bring back the changes to GDB-visible symbols, but only on AIX.
And only if it's not pre-4.2 GCC.
* lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
New macros.
2014-05-31 Eli Zaretskii <>
* fileio.c (Finsert_file_contents): Call prepare_to_modify_buffer
with PT, not GPT. (Bug#16433)
Revert last changes to GDB-visible symbols.
* lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): Delete macros.
Delete macros.
2014-05-31 Glenn Morris <>
* cmds.c (Fself_insert_command): Allow zero repeat count. (Bug#17649)
2014-05-30 Paul Eggert <>
Fix port to 32-bit AIX with xlc (Bug#17598).
* alloc.c (gdb_make_enums_visible): Remove FLOAT_TO_STRING_BUFSIZE.
* conf_post.h (FLEXIBLE_ARRAY_MEMBER) [__IBMC__]: Don't define to empty.
* lisp.h (FLOAT_TO_STRING_BUFSIZE): Make it a macro, instead of an enum,
to work around a compiler bug in IBM xlc 12.1.
2014-05-29 Eli Zaretskii <>
* xterm.c (x_update_window_end): Don't invalidate the entire
mouse-highlight info, just signal frame_up_to_date_hook that mouse
highlight needs to be redisplayed. (Bug#17588)
2014-05-29 Paul Eggert <>
Port the GDB-visible symbols to AIX.
Without them, GDB doesn't work to debug Emacs, since the AIX linker
optimizes away the relevant external symbols. Use enums instead;
this suffices for the AIX port, which is 32-bit-only anyway.
* lisp.h (ENUMABLE, DEFINE_GDB_SYMBOL_ENUM): New macros.
New macros.
2014-05-26 Paul Eggert <>
Include sources used to create macuvs.h.
* ($(srcdir)/macuvs.h): New rule.
* macuvs.h: Use automatically-generated header.
2014-05-25 Eli Zaretskii <>
* xdisp.c (move_it_in_display_line_to): Don't record wrap position
if we are iterating over an object that generates glyphs for
marginal areas. (Bug#17585)
2014-05-24 Paul Eggert <>
* xdisp.c (safe__call1, safe__eval): Now static.
2014-05-24 Eli Zaretskii <>
* xdisp.c (safe__call): Accept va_list argument instead of '...'.
(safe_call, safe__call1): Construct a va_list argument for safe_call.
(safe_call1): Call safe_call instead of safe__call directly.
2014-05-24 Ken Brown <>
* w32term.c (x_delete_display) [CYGWIN]: Don't free
dpyinfo->w32_id_name, to make sure it doesn't get freed more than
once. (Bug#17510)
2014-05-24 Stefan Monnier <>
* xdisp.c: Bind inhibit-quit during pre-redisplay-function.
(safe__call, safe__call1, safe__eval): New functions.
(safe_call): Use it.
(prepare_menu_bars): Use it for pre-redisplay-function (bug#17577).
(display_mode_element): Same for `:eval'.
2014-05-22 Paul Eggert <>
Fix port to 32-bit AIX (Bug#17540).
* unexaix.c (copy_text_and_data): Don't add text_scnptr to ptr
twice. _text already includes this offset.
(unrelocate_symbols): Don't cast 64-bit integer to pointer.
2014-05-21 Eli Zaretskii <>
* xdisp.c (move_it_in_display_line_to): Avoid infinite recursion:
when closest_pos is identical to to_charpos, don't recurse, since
we already tried that, and failed. (Bug#17539)
2014-05-20 Eli Zaretskii <>
* w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: If we are
unwinding when frame's faces were not initialized yet, increment
the frame's image-cache reference count before calling
x_free_frame_resources. Don't dereference
dpyinfo->terminal->image_cache if it is NULL. (Bug#17524)
2014-05-11 Glenn Morris <>
* fileio.c (Ffile_executable_p): Doc tweak.
2014-05-10 Jan Djärv <>
* xsettings.c (init_gsettings): Use g_settings_schema_source_lookup
instead of deprecated g_settings_list_schemas if possible (Bug#17434).
2014-05-07 Paul Eggert <>
* minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430).
2014-05-07 Jarek Czekalski <>
Fix initialization of minibuffer history variable (Bug#17430).
* minibuf.c (read_minibuf): Initialize histval to Qnil if unbound.
Move the initialization up to prevent any "value void" message.
2014-05-06 Samuel Bronson <>
* keyboard.c (Frecursive_edit): Ensure inc&dec of command_loop_level
are matched (bug#17413).
2014-05-06 Jarek Czekalski <>
Stop tooltips pulling Emacs window to front (Bug#17408).
* w32fns.c (Fx_show_tip): Add SWP_NOOWNERZORDER flag to
SetWindowPos invocations.
2014-05-05 Jan Djärv <>
* nsselect.m (Fx_selection_exists_p): Just return Qnil if window system
not initialized (Bug#17398).
2014-05-04 Paul Eggert <>
Revert recent libpng changes (Bug#17339).
* (PNG_CFLAGS): Remove; all uses removed.
* image.c [HAVE_LIBPNG_PNG_H]: Include <libpng/png.h>, not <png.h>.
2014-05-03 Paul Eggert <>
Handle systems without WCONTINUED consistently. (Bug#15110, 17339)
* process.c (handle_child_signal): Remove WCONTINUED ifdef,
because WCONTINUED is always defined now.
* syswait.h (WCONTINUED): Move here from ../lib-src/emacsclient.c.
2014-05-03 Eli Zaretskii <>
* buffer.c (overlay_strings): Fix the wording of the commentary.
2014-05-02 Paul Eggert <>
Consult libpng-config more consistently (Bug#17339).
* (PNG_CFLAGS): New var.
(ALL_CFLAGS): Use it.
* image.c [HAVE_PNG]: Don't worry about <libpng/png.h>, as
CFLAGS now handles this.
2014-05-01 Glenn Morris <>
* floatfns.c (Fisnan):
* profiler.c (Fprofiler_cpu_running_p): Doc fix (replace `iff').
2014-05-01 Eli Zaretskii <>
* term.c (tty_menu_activate): A better initialization for cursor
2014-05-01 Stefan Monnier <>
* intervals.c: Tighten assertions.
(create_root_interval): Make sure the interval is not empty.
(intervals_equal): Use booleans.
(rotate_right, rotate_left): Check LENGTHs rather than TOTAL_LENGTH.
(balance_an_interval): Sanity check LENGTHs and TOTAL_LENGTHs.
(balance_possible_root_interval): Simplify and use booleans.
(split_interval_right, split_interval_left): Check LENGTH, and remove
now redundant assertion.
(adjust_intervals_for_insertion): Remove now redundant assertions.
(delete_node, interval_deletion_adjustment)
(adjust_intervals_for_deletion, merge_interval_right)
(merge_interval_left): Check LENGTH rather than TOTAL_LENGTH.
(reproduce_interval): Make sure the interval is not empty.
2014-04-30 Paul Eggert <>
* term.c (tty_menu_activate): Don't assume row and col are initialized.
GCC 4.9.0 warned about this, and I couldn't easily prove to my own
satisfaction that they would always be initialized.
2014-04-29 Eli Zaretskii <>
* term.c (tty_menu_display): Move the cursor to the active menu item.
(tty_menu_activate): Return the cursor to the active menu item
after displaying the menu and after displaying help-echo.
for the details of why this is needed by screen readers and
Braille displays.
2014-04-29 Glenn Morris <>
* process.c (handle_child_signal):
Handle systems without WCONTINUED. (Bug#15110, 17339)
2014-04-23 Eli Zaretskii <>
* search.c (Fnewline_cache_check): Don't try to count newlines
outside the buffer's restriction, as find_newline doesn't support that.
2014-04-22 Paul Eggert <>
Port to GCC 4.9.0 with --enable-gcc-warnings.
* image.c (struct my_jpeg_error_mgr) [lint]: Remove member fp.
All uses removed.
(jpeg_load_body) [lint]: Add a 'volatile' to pacify a buggy GCC in
a way that also works with GCC 4.9.0.
* search.c (Fnewline_cache_check): Remove unused locals.
2014-04-22 Eli Zaretskii <>
* search.c (find_newline1): New subroutine.
(Fnewline_cache_check): New function.
(syms_of_search): Defsubr it.
2014-04-21 Jarek Czekalski <>
Fix freezing with scroll bars of GTK3 Toolkit (bug#15801).
* keyboard.c (unblock_input): Add comment.
* xgselect.c (xg_select): Prevent Glib main loop recursion.
2014-04-19 Stefan Monnier <>
* intervals.c (rotate_right, rotate_left): Fix up length computation.
Also change identifiers to match the comments, and add more assertions
2014-04-18 Eli Zaretskii <>
* xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation
glyph is written to TEXT_AREA of the temporary glyph_row.
2014-04-18 Paul Eggert <>
* emacs.c (close_output_streams): Don't clear and restore errno.
2014-04-17 Jan Djärv <>
* xterm.c (x_make_frame_visible): Prevent endless loop when frame
never becomes visible, i.e. using XMonad (Bug#17237).
2014-04-17 Eli Zaretskii <>
* xdisp.c (Fline_pixel_height): Don't assume that the current
buffer and the selected window's buffer are one and the same.
* insdel.c (invalidate_buffer_caches): Invalidate the bidi
paragraph-start cache before the newline cache. (Bug#17269)
2014-04-16 Stefan Monnier <>
* window.c (save_window_save): Lookup window_point_insertion_type in
the right buffer (bug#15457).
(Qwindow_point_insertion_type): New var.
(syms_of_window): Initialize it.
2014-04-16 Eli Zaretskii <>
Fix the MSDOS build.
* unexcoff.c [MSDOS]: Include libc/atexit.h.
(copy_text_and_data): Zero out the atexit chain pointer before
dumping Emacs.
* termhooks.h (encode_terminal_code): Update prototype.
* term.c (encode_terminal_code) [DOS_NT]: Make it externally
visible for all DOS_NT ports, not just WINDOWSNT.
(syms_of_term) [!MSDOS]: Don't define 'tty-menu-*' symbols on MSDOS.
* sysdep.c (emacs_sigaction_init, init_signals): Don't use SIGCHLD
unless it is defined.
(emacs_pipe) [MSDOS]: Redirect to 'pipe'.
* process.c (close_on_exec, accept4, process_socket): Move into
the "ifdef subprocesses" part.
(catch_child_signal): Condition by "ifdef subprocesses".
(syms_of_process) <Qinternal_default_process_sentinel>
<Qinternal_default_process_filter>: Condition by "ifdef subprocesses".
* msdos.h: Add prototypes for new functions.
(O_CLOEXEC): Define to zero.
* msdos.c (check_window_system): Remove unnecessary an
incompatible duplicate function.
(sys_opendir, readlinkat, faccessat, fstatat, unsetenv):
New functions in support of new functionality.
* menu.c (single_menu_item): Add visual indication of submenu
also for menus on MSDOS frames.
(Fx_popup_menu) [!MSDOS]: Do not call tty_menu_show on MSDOS.
* lisp.h (CHECK_PROCESS) [!subprocesses]: Do not define
when async subprocesses aren't supported.
* font.h (FONT_WIDTH) [MSDOS]: MSDOS-specific definition.
* emacs.c (close_output_streams): Zero out errno before calling
* dired.c [MSDOS]: Include msdos.h.
* conf_post.h (opendir) [MSDOS]: Redirect to sys_opendir.
* callproc.c (block_child_signal, unblock_child_signal) [MSDOS]:
Ifdef away for MSDOS.
(record_kill_process) [MSDOS]: Ifdef away the entire body for MSDOS.
(call_process_cleanup) [MSDOS]: Ifdef away portions not relevant
for MSDOS.
(call_process) [MSDOS]: Fix call sequence of dostounix_filename.
Use temporary file template that is compatible with mkostemp.
Move vfork-related portions under #ifndef MSDOS.
(syms_of_callproc): Unify templates of MSDOS and WINDOWSNT.
2014-04-15 Stefan Monnier <>
* buffer.c (Foverlays_at): Add argument `sorted'.
2014-04-14 Eli Zaretskii <>
* insdel.c (invalidate_buffer_caches): When deleting or replacing
text, invalidate the bidi_paragraph_cache upto and including the
preceding newline.
2014-04-13 Paul Eggert <>
Port to IRIX 6.5 (Bug#9684).
* alloc.c (TAGGABLE_NULL): New constant,
for porting to hosts with nontrivial DATA_SEG_BITS settings.
(next_vector, set_next_vector): Use it.
* conf_post.h (INET6) [IRIX6_5]: Define.
* data.c (BITS_PER_ULL): Don't assume ULLONG_MAX is defined.
* lisp.h (lisp_h_XPNTR): Don't OR in bits that aren't masked out,
for consistency with how TAGGABLE_NULL is computed.
2014-04-13 Eli Zaretskii <>
* keyboard.c (Fopen_dribble_file): Encode the dribble file-name
before passing it to system APIs.
* puresize.h (BASE_PURESIZE): Bump by 1K. (Bug#17255)
2014-04-13 Stefan Monnier <>
* bytecode.c (exec_byte_code): Rework the volatiles. Most importantly,
make sure stack.byte_string_start is not de-adjusted by pushhandler.
2014-04-12 Paul Eggert <>
* keyboard.c (Fopen_dribble_file): Avoid some races. (Bug#17187)
2014-04-12 Eli Zaretskii <>
* xdisp.c (move_it_by_lines): If a large portion of buffer text is
covered by a display string that ends in a newline, and that cases
going back by DVPOS lines to hit the search limit, lift the limit
and go back until DVPOS is reached. (Bug#17244)
* indent.c (Fvertical_motion): Handle correctly the case when the
display string is preceded by an empty line.
2014-04-11 Eli Zaretskii <>
* w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and
use S_IWRITE instead.
2014-04-11 Glenn Morris <>
* keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187)
2014-04-09 Ken Brown <>
* (EMACS_MANIFEST): Revert last change.
2014-04-07 Stefan Monnier <>
* lisp.h (struct Lisp_Symbol): New bitfield `pinned'.
* alloc.c: Keep track of symbols referenced from pure space (bug#17168).
(symbol_block_pinned): New var.
(Fmake_symbol): Initialize `pinned'.
(purecopy): New function, extracted from Fpurecopy. Mark symbols as
pinned and signal an error for un-purifiable objects.
(pure_cons): Use it.
(Fpurecopy): Use it, except for objects that can't be purified.
(mark_pinned_symbols): New function.
(Fgarbage_collect): Use it.
(gc_sweep): Remove hack made unnecessary.
2014-04-05 Glenn Morris <>
* keyboard.c (Fopen_dribble_file): Doc tweak.
2014-04-04 Jan Djärv <>
Backport from trunk.
* nsterm.m (updateFrameSize:): If waiting for the tool bar and tool
bar is zero height, just return (Bug#16976).
(initFrameFromEmacs:): Initialize wait_for_tool_bar.
* nsterm.h (EmacsView): Add wait_for_tool_bar.
* nsmenu.m (update_frame_tool_bar): Return early if view or toolbar
is nil. If waiting for toolbar to complete, force a redraw.
(free_frame_tool_bar): Set wait_for_tool_bar = NO (Bug#16976).
2014-04-03 Ken Brown <>
* (EMACS_MANIFEST): Update comment. (Bug#17176)
2014-04-02 Martin Rudalics <>
* xterm.c (x_new_font): Don't calculate non-toolkit scrollbar
width from font width (Bug#17163).
2014-03-30 Martin Rudalics <>
* frame.c (x_set_frame_parameters): Calculate default values of
new frame sizes only after all other frame parameters have been
processed (Bug#17142).
2014-03-28 Ken Brown <>
* conf_post.h (SYSTEM_PURESIZE_EXTRA) [CYGWIN]: Set to 10000.
2014-03-28 YAMAMOTO Mitsuharu <>
* xterm.c (x_draw_image_glyph_string): Adjust image background
width accordingly when its x position is adjusted. (Bug#17115)
2014-03-27 YAMAMOTO Mitsuharu <>
* w32term.c (x_draw_image_glyph_string): Fix computation of height
and width of image background when it is displayed with a 'box'
face. (Bug#17115)
2014-03-26 Paul Eggert <>
More backward-compatible fix to char-equal core dump (Bug#17011).
* editfns.c (Fchar_equal): In unibyte buffers, assume values in
range 128-255 are raw bytes. Suggested by Eli Zaretskii.
Fix core dump in char-equal (Bug#17011).
* editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
unibyte buffers, as we can't tell whether the characters are
actually unibyte.
* insdel.c (adjust_markers_for_delete): Remove unused local.
2014-03-24 Barry O'Reilly <>
Have (MARKER . ADJUSTMENT) undo records always be immediately
after their corresponding (TEXT . POS) record in undo list.
* lisp.h (record-delete): New arg record_markers.
(record_marker_adjustment): No longer needed outside undo.c.
* insdel.c (adjust_markers_for_delete): Move calculation of marker
adjustments to undo.c's record_marker_adjustments. Note that
fileio.c's decide_coding_unwind is another caller to
adjust_markers_for_delete. Because it has undo list bound to t,
it does not rely on adjust_markers_for_delete to record marker
(del_range_2): Swap call to record_delete and
adjust_markers_for_delete so as undo marker adjustments are
recorded before current deletion's adjustments, as before.
(replace_range): Pass value for new record_markers arg to
* undo.c (record_marker_adjustment): Rename to
record_marker_adjustments and made static.
(record_delete): Check record_markers arg and call
(record_change): Pass value for new record_markers arg to
(record_point): at_boundary calculation no longer needs to account
for marker adjustments.
2014-03-24 Martin Rudalics <>
* w32term.c (x_set_window_size): Refine fix from 2014-03-14
2014-03-23 Glenn Morris <>
* fileio.c (Ffile_symlink_p): Doc fix. (Bug#17073)
2014-03-23 Stefan Monnier <>
* buffer.c (struct sortvec): Add field `spriority'.
(compare_overlays): Use it.
(sort_overlays): Set it.
2014-03-23 Eli Zaretskii <>
* xdisp.c (redisplay_window): If all previous attempts to find the
cursor row failed, try a few alternatives before falling back to
the top-most row of the window. Use row_containing_pos. (Bug#17047)
2014-03-22 Daniel Colascione <>
* process.c (conv_sockaddr_to_lisp): When extracting the string
names of AF_LOCAL sockets, stop before reading uninitialized
2014-03-23 Daniel Colascione <>
* process.c (DATAGRAM_CONN_P): Don't underflow datagram_address
array. (ASAN caught.)
2014-03-21 YAMAMOTO Mitsuharu <>
Fix regression introduced by patch for Bug#10500.
* xterm.c (x_draw_image_relief): Respect Vtool_bar_button_margin.
* w32term.c (x_draw_image_relief): Likewise.
2014-03-21 Martin Rudalics <>
* w32fns.c (w32_wnd_proc): For WM_WINDOWPOSCHANGING don't
constrain frame size in SW_SHOWMAXIMIZED case so we can truly
maximize a frame for odd default fonts.
2014-03-20 Paul Eggert <>
* doc.c (store_function_docstring): Fix pointer signedness mismatch.
2014-03-20 Stefan Monnier <>
* doc.c (store_function_docstring): Warn when we don't know where to
put a docstring.
(Fsubstitute_command_keys): Don't advertise the fact that
text-properties are dropped, since we think it's a bug that we'll fix
in 24.5.
* frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.
* xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame.
* frame.c (frame_garbaged): Make "docstring" more precise.
2014-03-20 Glenn Morris <>
* charset.c (init_charset): When we cannot find the charsets directory,
mention if EMACSDATA is set.
2014-03-19 Paul Eggert <>
* fns.c (Frandom): Fix rare bug where the result isn't random.
Fix porting inconsistency about rounding to even.
* floatfns.c (emacs_rint) [!HAVE_RINT]: Round to even.
This way, the unusual !HAVE_RINT case acts like the usual
HAVE_RINT case, and we can fix the documentation accordingly.
2014-03-19 Eli Zaretskii <>
* w32fns.c (reset_modifiers): Zero out keystate[] before using it.
(w32_wnd_proc): Initialize the dwHoverTime member of
2014-03-17 Teodor Zlatanov <>
* gnutls.c (Fgnutls_boot): Fix case of :verify-error = t.
2014-03-16 Eli Zaretskii <>
* search.c (find_newline): Speed up the function when using the
newline cache, by halving the number of calls to
region_cache_forward and region_cache_backward. (Bug#16830)
2014-03-15 Juanma Barranquero <>
* buffer.c (Fset_buffer): Document return value (bug#17015).
2014-03-14 Martin Rudalics <>
* w32term.c (x_set_window_size): When frame-resize-pixelwise is
nil, always resize character wise to avoid potential loss of the
mode line (Bug#16923 related).
2014-03-12 Martin Rudalics <>
* frame.c (x_set_frame_parameters): Always calculate new sizes
pixelwise to avoid potential loss when rounding.
2014-03-11 Dmitry Antipov <>
* xfns.c (x_set_mouse_color): Recolor vertical_drag_cursor.
* xterm.c (x_free_frame_resources): Free all allocated cursors.
2014-03-10 Eli Zaretskii <>
* w32.c (fstatat): Don't add an extra slash if the argument ends
with a slash: this fails the subsequent call to stat_worker on
Windows 9X. Reported by oslsachem <>.
2014-03-09 Martin Rudalics <>
* xdisp.c (Fwindow_text_pixel_size): Adjust doc-string.
2014-03-08 Jan Djärv <>
* nsterm.h (MAC_OS_X_VERSION_10_9): Add.
* nsterm.m (constrainFrameRect:toScreen:): Constrain normally
when frame is only on one screen (Bug#14713).
2014-03-08 Eli Zaretskii <>
* xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and
there's a valid wrap point in the display line, the last glyph
cannot "just barely fit" on this row, because display_line doesn't
let it. Instead, proceed as if the last glyph didn't fit, so that
we eventually back up the iterator to the wrap point. This avoids
delusional behavior of move_it_to, whereby it proceeds to the next
display line, but sets current_x to zero for all the glyphs that
without word-wrap would fit on the previous display line.
One result was that visual-order cursor movement behaved erratically
under word-wrap.
(Fmove_point_visually): Add code to find the x coordinate of the
last character before wrap point, under word-wrap on a TTY.
2014-03-07 Eli Zaretskii <>
* xdisp.c (Fmove_point_visually): When under word-wrap, accept
also return value of MOVE_POS_MATCH_OR_ZV from
move_it_in_display_line_to, when moving from beginning of line to
point's position. (Bug#16961)
2014-03-07 Martin Rudalics <>
* buffer.c (Vbuffer_list_update_hook): Doc-string fix.
* window.c (Fselect_window): Explain NORECORD and
`buffer-list-update-hook' in doc-string.
2014-03-06 Martin Rudalics <>
* window.c (Fother_window_for_scrolling): Check that
Vother_window_scroll_buffer is a buffer.
2014-03-06 Dmitry Antipov <>
* xterm.c (xim_initialize): Always pass a copy of resource name
to XRegisterIMInstantiateCallback and eassert whether return
value is True. Passing copy is important because Xlib doesn't
make its own copy and resource name argument usually points to
SSDATA (Vx_resource_name), which may be changed from Lisp.
(xim_close_display): For XUnregisterIMInstantiateCallback,
always eassert return value and pass exactly the same values
as were used for XRegisterIMInstantiateCallback.
Otherwise XUnregisterIMInstantiateCallback will always fail. See Xlib
sources to check why if you are interested.
2014-03-05 Martin Rudalics <>
* dispnew.c (change_frame_size_1): Add new_lines instead of
new_height, the latter may be still zero if passed as such.
* window.c (Fwindow_pixel_height): Mention bottom divider in
2014-03-05 Paul Eggert <>
Fix "resource temporarily unavailable" with xgselect
* xgselect.c: Include <stdbool.h>.
(xg_select) [!USE_GTK]: Don't lose track of errno.
Fix minor --enable-gcc-warnings issues.
* widget.c (update_various_frame_slots, EmacsFrameResize):
Avoid unused locals. Prefer 'if' to '#if' when either will do.
2014-03-04 Ken Brown <>
* gmalloc.c (aligned_alloc): Clarify the code by making `adj'
represent the actual adjustment needed for alignment.
2014-03-04 Eli Zaretskii <>
* gmalloc.c (aligned_alloc): Don't allocate more memory than
needed, and don't reallocate if the initial allocation already
fits the bill. Suggested by Ken Brown <>.
2014-03-04 YAMAMOTO Mitsuharu <>
* xterm.c (x_draw_stretch_glyph_string): Reset clipping.
2014-03-04 Michal Nazarewicz <>
* cmds.c (delete-char): Update docstring pointing out that the
function ignores `delete-active-region' and `overwrite-mode'.
2014-03-03 Eli Zaretskii <>
* font.c (Fframe_font_cache): Fix last change. (Bug#16930)
* gmalloc.c (aligned_alloc): Fix adjustment of size of the
allocated buffer due to alignment.
(freehook): If the block to be freed was allocated by
'aligned_alloc', find its real pointer before calling 'free'.
(mabort) [emacs]: Call 'emacs_abort', not 'abort', to provide a
2014-03-03 Dmitry Antipov <>
* font.c (toplevel): Adjust comment about font cache layout.
(font_clear_cache): Fix to match real font cache layout.
Suggested by <> in Bug#16069.
(Fframe_font_cache) [FONT_DEBUG]: New function.
(syms_of_font) [FONT_DEBUG]: Defsubr it.
Avoid crashes when X fonts are erroneously freed on reused X
'Display *' connection data (Bug#16069). Note that X font
resources still may be leaked, but currently there is no way
to completely avoid it.
* xterm.h (struct x_display_info): New member x_id. Add comments.
* xterm.c (x_display_id): New variable.
(x_term_init): Assign identifier to each opened X connection.
* xfont.c (struct xfont): New member x_display_id.
(xfont_open): Initialize it with frame's display id.
(xfont_close): Check whether font's display id matches the one
recorded for the given display. Adjust comment.
* xftfont.c (struct xftfont_info):
(xftfont_open, xftfont_close): Exactly as above with xfont stuff.
2014-03-01 Martin Rudalics <>
Consider Vother_window_scroll_buffer valid iff it's a live buffer.
* window.c (Fother_window_for_scrolling): Don't try to scroll a
killed Vother_window_scroll_buffer.
(Vother_window_scroll_buffer): Fix doc-string accordingly.
2014-03-01 Eli Zaretskii <>
* fileio.c (Fexpand_file_name) [WINDOWSNT]: Don't treat file names
that start with more than 2 slashes as UNCs. (Bug#16751)
2014-02-28 Paul Eggert <>
Fix a few crashes and leaks when cloning C strings.
* alloc.c, lisp.h (dupstring): New function.
* gtkutil.c (xg_get_font):
* term.c (tty_default_color_capabilities):
* xsettings.c (store_monospaced_changed)
(store_font_name_changed, parse_settings)
(read_and_apply_settings, init_gsettings, init_gconf): Use it.
This avoids some unlikely crashes due to accessing freed storage,
and avoids some minor memory leaks in the more-typical case.
2014-02-28 Martin Rudalics <>
* xdisp.c (note_mode_line_or_margin_highlight): Don't show drag
cursor when modeline can't be dragged (Bug#16647).
2014-02-28 Glenn Morris <>
* doc.c (Fsnarf_documentation): Snarf not-yet-bound variables
from custom-delayed-init-variables. (Bug#11565)
2014-02-27 Martin Rudalics <>
More fixes for mouse glyph calculations (Bug#16647).
* window.c (coordinates_in_window): In intersection of
horizontal and vertical window dividers prefer the horizontal
one. Add some extra parens to last fix.
(window_relative_x_coord): Return x-coordinate for header and
mode line too.
* xdisp.c (remember_mouse_glyph): In text area don't extend
glyph into mode line to show the vertical drag cursor there
immediately. Subdivide mouse glyphs in right fringes to show a
horizontal drag cursor as soon as we enter the "grabbable width"
portion. Handle vertical border case separately. Do not
subdivide window divider areas.
(note_mouse_highlight): On bottom divider of bottommost windows
show vertical drag cursor only when the minibuffer window can be
2014-02-27 Eli Zaretskii <>
* xdisp.c (pop_it): Restore the it->face_box_p flag which could be
reset by the face of the object just displayed. See also bug#76.
(get_next_display_element): If the string came from a display
property, examine the box face attribute at it->position, not at
it->current.pos, since the latter was not updated yet. (Bug#16870)
(handle_face_prop): Improve commentary.
2014-02-27 Michael Albinus <>
* dbusbind.c (Fdbus__init_bus, Qdbus__init_bus, Sdbus__init_bus):
Rename from Fdbus_init_bus_1, Qdbus_init_bus_1, Sdbus_init_bus_1.
2014-02-26 Martin Rudalics <>
Fixes around Bug#16647.
* xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and
* window.c (coordinates_in_window): Return ON_VERTICAL_BORDER
only if the window has no right divider.
(Fcoordinates_in_window_p): Fix doc-string.
2014-02-25 Juanma Barranquero <>
* lread.c (Funintern): Fix doc to match advertised calling convention.
2014-02-24 Daniel Colascione <>
* keyboard.c (read_char): Close race that resulted in lost events.
2014-02-22 Glenn Morris <>
* frame.c (frame-alpha-lower-limit, frame-resize-pixelwise):
* window.c (window-resize-pixelwise): Doc fixes.
* process.c (Finternal_default_process_filter)
(Finternal_default_process_sentinel): Doc tweaks.
2014-02-21 Glenn Morris <>
* process.c (Fprocess_buffer, Faccept_process_output)
(Finternal_default_process_filter, Finternal_default_process_sentinel):
Doc fixes.
2014-02-21 Martin Rudalics <>
* window.c (Fwindow_scroll_bar_width): New function.
2014-02-21 Paul Eggert <>
Pacify GCC when configuring with --enable-gcc-warnings.
* xdisp.c (move_it_in_display_line_to) [lint]:
Initialize recently-added local.
2014-02-21 Daniel Colascione <>
* dbusbind.c: Rename dbus-init-bus to dbus-init-bus-1.
2014-02-20 Eli Zaretskii <>
* xdisp.c (init_iterator): Don't dereference a bogus face
pointer. (Bug#16819)
(try_cursor_movement): Don't use cursor position if
set_cursor_from_row failed to compute it. This avoids assertion
violations in MATRIX_ROW.
(move_it_in_display_line_to): Save the iterator state in ppos_it
only once per call. Reimplement the method used to return to the
best candidate position if all the positions found in display line
are beyond TO_CHARPOS. This cuts down the number of calls to
bidi_shelve_cache, which moves a lot of stuff when lines are long
and include bidirectional text. (Bug#15555)
2014-02-20 Glenn Morris <>
* data.c (Fdefalias): Doc fix.
2014-02-19 Eli Zaretskii <>
* xdisp.c (display_line): Fix horizontal scrolling of large images
when fringes are turned off. This comes at a price of not
displaying the truncation/continuation glyphs in this case.
* image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: If
CreateDIBSection returns an error indication, zero out *ximg after
destroying the image. This avoids crashes in memory allocations
due to the fact that some of the callers also call
x_destroy_x_image, which will attempt to free an already free'd
block of memory.
2014-02-18 Martin Rudalics <>
* widget.c (update_various_frame_slots): Don't set
2014-02-18 Michael Albinus <>
* dbusbind.c (xd_close_bus): Apply proper check on busobj.
2014-02-17 Paul Eggert <>
temacs --daemon fix (Bug#16599).
* emacs.c (main): Initialize daemon_pipe[1] here ...
(syms_of_emacs): ... instead of here.
2014-02-16 Anders Lindgern <>
* nsterm.m (keyDown:): Check for normal key even if NSNumericPadKeyMask
is set (Bug#16505).
2014-02-16 Daniel Colascione <>
* dbusbind.c (xd_lisp_dbus_to_dbus): New function.
(xd_get_connection_address): Use it.
(xd_close_bus): Use xd_lisp_dbus_to_dbus to instead of
xd_get_connection_address because the latter signals if the bus
we're trying to close is already disconnected.
2014-02-13 Eli Zaretskii <>
* w32proc.c (start_timer_thread): Pass a non-NULL pointer as last
argument to CreateThread. This avoids segfaults on Windows 9X.
Reported by oslsachem <>.
2014-02-13 Paul Eggert <>
Fix subspace record bug on HP-UX 10.20 (Bug#16717).
* unexhp9k800.c (unexec_error): New function, to simplify the code.
(check_lseek): New function, to report lseek errors.
(save_data_space, update_file_ptrs, read_header, write_header)
(copy_file, copy_rest, unexec): Use these news functions.
(update_file_ptrs): Don't assume wraparound behavior when
converting a large size_t value to off_t.
2014-02-13 Dmitry Antipov <>
* composite.c (fill_gstring_header): Pass positions as C integers
and move parameters checking to...
(Fcomposition_get_gstring): ...this function. Handle case when
buffer positions are in reversed order and avoid crash (Bug#16739).
Adjust docstring.
* buffer.c (validate_region): Mention current buffer in error message.
2014-02-12 Marcus Karlsson <> (tiny change)
* image.c (pbm_load): Set to NO_PIXMAP on error (Bug#16683).
2014-02-12 Lars Ingebrigtsen <>
* buffer.c (syms_of_buffer): Doc clarification (bug#9981).
2014-02-11 Glenn Morris <>
* nsfns.m (ns_display_info_for_name, Fx_open_connection):
Replace refs to "OpenStep" in messages.
2014-02-10 Paul Eggert <>
Avoid "." at end of error diagnostics.
* cmds.c (Fself_insert_command): Reword and avoid "." at end.
* font.c (Ffont_at):
* nsfns.m (ns_display_info_for_name):
* nsselect.m (Fx_own_selection_internal):
* nsterm.m (performDragOperation:):
Remove "." from end of diagnostic.
2014-02-10 Lars Ingebrigtsen <>
* fns.c (Fmaphash): Say what `maphash' returns, since it may be
unintuitive (bug#15824).
(Fyes_or_no_p): Doc fix (bug#15456).
2014-02-10 Dmitry Antipov <>
* cmds.c (Fself_insert_command): Respect the width of EMACS_INT
and avoid warning.
* eval.c (call_debugger): When exiting the debugger, do not allow
max_specpdl_size less than actual binding depth (Bug#16603).
(syms_of_eval): Adjust docstring.
2014-02-09 Lars Ingebrigtsen <>
* cmds.c (Fself_insert_command): Output a clearer error message on
negative repetitions (bug#9476).
* macros.c (Fexecute_kbd_macro): Doc fix (bug#14206).
2014-02-08 Lars Ingebrigtsen <>
* syntax.c (Fskip_syntax_backward): Doc clarification (bug#15115).
* minibuf.c (Fread_string): Doc clarification (bug#15422).
* buffer.c (Fmake_overlay): Doc clarification (bug#15489).
2014-02-08 Juanma Barranquero <>
* keyboard.c (Frecursive_edit): Fix typo in docstring.
2014-02-08 Lars Ingebrigtsen <>
* xdisp.c (syms_of_xdisp): Doc clarification (bug#15657).
* keyboard.c (Frecursive_edit): Say more precicely how throwing
`exit' works (bug#15865).
2014-02-07 Martin Rudalics <>
Constrain window box/body sizes and margin widths (Bug#16649).
* xdisp.c (window_box_width): Don't return less than zero.
(window_box_left_offset, window_box_right_offset): Don't return
more than the window's pixel width.
* window.c (window_body_height, window_body_width): Don't return
negative value.
(window_resize_apply): Adjust margin width, if necessary.
2014-02-07 Glenn Morris <>
* nsterm.m (syms_of_nsterm): Doc fix.
2014-02-06 Eli Zaretskii <>
* w32.c (pMultiByteToWideChar, pWideCharToMultiByte):
New variables: pointers through which to call the respective APIs.
(filename_to_utf16, filename_from_utf16, filename_to_ansi)
(filename_from_ansi, sys_link, check_windows_init_file):
Call MultiByteToWideChar and WideCharToMultiByte through pointers.
This is required on Windows 9X, where we dynamically load
UNICOWS.DLL which has their non-stub implementations.
(maybe_load_unicows_dll): Assign addresses to these 2 function
pointers after loading UNICOWS.DLL.
* w32fns.c (Fx_file_dialog, Fw32_shell_execute) [!CYGWIN]: Call
MultiByteToWideChar and WideCharToMultiByte through function
* w32.h (pMultiByteToWideChar, pWideCharToMultiByte):
New declarations.
2014-02-06 Jan Djärv <>
* nsterm.m (toggleFullScreen:): Hide menubar on secondary monitor
for OSX >= 10.9 if separate spaces are used.
(toggleFullScreen:): Use screen of w instead of fw (Bug#16659).
2014-02-06 Glenn Morris <>
* buffer.c (cache-long-scans): Doc fix.
2014-02-05 Eli Zaretskii <>
* w32fns.c (Fw32_shell_execute): Doc fix.
2014-02-05 Bastien Guerry <>
* syntax.c (Fforward_word): Call Fconstrain_to_field with
ESCAPE-FROM-EDGE set to `nil' (Bug#16453).
2014-02-05 Martin Rudalics <>
* fringe.c (draw_fringe_bitmap_1): Don't draw a fringe if it's
outside the window (Bug#16649).
* xdisp.c (note_mouse_highlight): When entering a margin area show
a non-text cursor (Bug#16647).
2014-02-04 Paul Eggert <>
* menu.c (Fx_popup_dialog): Remove label 'dialog_via_menu'.
It prompted a compile-time diagnostic on GNU/Linux.
Simplify to remove the need for the label.
2014-02-04 Eli Zaretskii <>
* w32menu.c (w32_popup_dialog): Don't condition the whole function
on HAVE_DIALOGS. If the dialog is "simple", pop up a message box
to show it; otherwise return 'unsupported--w32-dialog' to signal
to the caller that emulation with menus is necessary.
This resurrects code inadvertently deleted by the 2013-10-08 commit.
(syms_of_w32menu): DEFSYM Qunsupported__w32_dialog.
* w32term.h (w32_popup_dialog): Prototype is no longer conditioned
* menu.c (Fx_popup_dialog): Don't condition the call to
w32_popup_dialog on HAVE_DIALOGS. If w32_popup_dialog returns a
special symbol 'unsupported--w32-dialog', emulate the dialog with
a menu by calling x-popup-menu.
* menu.h (Qunsupported__w32_dialog): New extern variable.
2014-02-04 Michael Albinus <>
* keyboard.c (kbd_buffer_get_event): Read file notification events
also in batch mode.
* xgselect.c (xg_select): Read glib events in any case, even if
there are no file descriptors to watch for. (Bug#16519)
2014-02-03 Martin Rudalics <>
* dispextern.h (face_id): Add WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID
* w32term.c (w32_draw_window_divider): Handle first and last
pixels specially.
* w32term.h (w32_fill_area_abs): New function.
* xdisp.c (x_draw_right_divider): Don't draw over bottom
* xfaces.c (realize_basic_faces): Handle new face ids.
* xfns.c (Fx_create_frame): Call x_default_parameter for right
and bottom divider width.
* xterm.c (x_draw_window_divider): Handle first and last pixels
2014-02-03 Dmitry Antipov <>
* print.c (Fexternal_debugging_output): Add cast to pacify
* eval.c (call_debugger): Grow specpdl if the debugger was
entered due to specpdl overflow (Bug#16603) and allow more
specpdl space for the debugger itself.
2014-02-02 Martin Rudalics <>
* w32fns.c (Fx_create_frame): Process frame alpha earlier.
2014-02-01 Eli Zaretskii <>
* w32fns.c (Ffile_system_info): Use WINAPI in the function
pointers that get the address of GetDiskFreeSpaceEx. (Bug#16615)
* print.c (Fexternal_debugging_output): If the argument character
is non-ASCII, encode it with the current locale's encoding before
writing the result to the terminal. (Bug#16448)
* w32fns.c (Fw32_shell_execute): Don't call file-exists-p for
DOCUMENT that is a "remote" file name, i.e. a file-handler exists
for it. (Bug#16558)
2014-01-30 Andreas Schwab <>
* process.c (create_process): Reset SIGPROF handler in the child.
* callproc.c (call_process): Likewise.
2014-01-29 Paul Eggert <>
* xmenu.c (create_and_show_popup_menu): Port comment to C89.
2014-01-29 Eli Zaretskii <>
* .gdbinit (xprintstr, xprintbytestr): Don't use repetition count
of zero to print strings, GDB doesn't like it.
* print.c (print_object): Use FETCH_STRING_CHAR_ADVANCE, not
STRING_CHAR_AND_LENGTH, so that if the string is relocated by GC,
we still use correct addresses. (Bug#16576)
2014-01-27 K. Handa <>
Fix bug#16286 by a different method from 2014-01-26T00:32:30Z!,
to preserve the code detection behavior of 24.3.
* coding.h (struct coding_system): New member detected_utf8_bytes.
* coding.c (detect_coding_utf_8): Set coding->detected_utf8_bytes.
(decode_coding_gap): Use short cut for UTF-8 file reading only
when coding->detected_utf8_bytes equals to coding->src_bytes.
* fileio.c (Finsert_file_contents): Cancel the previous change.
2014-01-29 Martin Rudalics <>
* w32fns.c (x_set_tool_bar_lines): Don't clear area on frames
that are not visible.
2014-01-29 Jan Djärv <>
* xmenu.c (create_and_show_popup_menu): Handle case when no key
is grabbed (Bug#16565).
2014-01-28 Martin Rudalics <>
* xdisp.c (last_max_ascent): Re-remove after erroneously
reintroducing it on 2013-11-30 and abolishing Dmitry's removal
from 2013-03-29.
(move_it_to): Re-remove reference to last_max_ascent.
(Fwindow_text_pixel_size): Add iterator's max_ascent and
max_descent here instead of calling line_bottom_y.
Fix doc-string.
2014-01-28 Dmitry Antipov <>
* terminal.c (initial_free_frame_resources): New function.
(init_initial_terminal): Install new hook to free face cache
on initial frame and avoid memory leak. For details, see
* xfaces.c (free_frame_faces): Adjust comment.
2014-01-26 Paul Eggert <>
* data.c (Fstring_to_number): Document results if unparsable
2014-01-26 Jan Djärv <>
* xterm.c (x_focus_changed): Check for non-X terminal-frame (Bug#16540)
2014-01-26 Paul Eggert <>
When decoding, prefer ptrdiff_t to int for buffer positions etc.
* coding.c (detect_coding_utf_8, emacs_mule_char)
(detect_coding_iso_2022, encode_coding_iso_2022, check_ascii)
(check_utf_8, decode_coding):
* coding.h (struct coding_system.errors):
Use ptrdiff_t, not int, for integer values derived from buffer and
string positions.
Fix crash with insert-file-contents and misdecoded text (Bug#16286).
* fileio.c (Finsert_file_contents): Set CODING_MODE_LAST_BLOCK
before invoking decode_coding_gap, since there's just one block.
2014-01-25 Martin Rudalics <>
Fix handling of face attributes in Fx_create_frame (Bug#16529).
* w32fns.c (Fx_create_frame): Don't inhibit running Lisp code
too early. Again run change_frame_size before assigning menu-
and tool-bar-lines.
2014-01-25 Fabrice Popineau <>
* w32term.c (w32_read_socket): When the WM_DISPLAYCHANGE message
arrives, call x_check_fullscreen, in case the new display has a
different resolution. (Bug#16517)
2014-01-25 Eli Zaretskii <>
* term.c (read_menu_input): If the selected frame changes, exit
the menu.
(tty_menu_show): If the selected frame changes while we displayed
a menu, throw to top level. (Bug#16479)
2014-01-25 Stefan Monnier <>
* eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change.
2014-01-24 Paul Eggert <>
Fix bool-vector-count-population bug on MinGW64 (Bug#16535).
* data.c (count_one_bits_word): Fix bug (negated comparison)
2014-01-24 Dmitry Antipov <>
* xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction):
Avoid undefined behavior by initializing display property bit of a
string processed by the bidirectional iterator. For details, see
2014-01-23 Paul Eggert <>
Minor cleanup of previous change.
* image.c (imagemagick_error, Fimagemagick_types):
Omit some recently-introduced and unnecessary casts and assignments.
2014-01-23 Dmitry Antipov <>
Fix two memory leaks discovered with Valgrind.
* ftfont.c (ftfont_list) [HAVE_LIBOTF]: Call OTF_close.
* image.c (Fimagemagick_types): Call MagickRelinquishMemory.
2014-01-22 Martin Rudalics <>
Fixes in window size functions around Bug#16430 and Bug#16470.
* window.c (Fwindow_pixel_width, Fwindow_pixel_height)
(Fwindow_mode_line_height, Fwindow_header_line_height)
(Fwindow_right_divider_width, Fwindow_bottom_divider_width):
Minor doc-string adjustments.
(Fwindow_total_height, Fwindow_total_width): New argument ROUND.
Rewrite doc-strings.
(window_body_height, window_body_width): Do not count partially
visible lines/columns when PIXELWISE is nil (Bug#16470).
(Qfloor, Qceiling): New symbols.
2014-01-21 Eli Zaretskii <>
* w32fns.c (unwind_create_frame): Avoid crashing inside assertion
when the image cache is not yet allocated. (Bug#16509)
2014-01-21 Dmitry Antipov <>
* buffer.c (Fkill_buffer): When killing an indirect buffer,
re-attach intervals to its base buffer (Bug#16502).
* intervals.c (set_interval_object): Move from here...
* intervals.h (set_interval_object): ... to here. Fix comments.
2014-01-20 Paul Eggert <>
Avoid undefined behavior by initializing buffer redisplay bit.
Problem reported by Dmitry Antipov in
* buffer.c (Fget_buffer_create): Initialize redisplay bit.
Revert some of the CANNOT_DUMP fix (Bug#16494).
* lread.c (init_lread): Fix typo: NILP, not !NILP.
2014-01-19 Eli Zaretskii <>
* w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
(get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
[!WINDOWSNT]: These functions are no longer compiled on Cygwin;
they are replaced by macros that expand into direct calls to the
corresponding functions from GDI32.DLL.
(globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
variables in the Cygwin build, they are unused.
2014-01-19 K. Handa <>
* composite.c (composition_update_it): Fix previous change.
2014-01-18 Eli Zaretskii <>
Fix file name handling on MS-Windows 9X.
* w32.c (maybe_load_unicows_dll): New function.
* emacs.c (main) [WINDOWSNT]: Call maybe_load_unicows_dll early
on, to make sure we can convert file names to and from UTF-8 on
Windows 9X. This fixes a failure to start up because Emacs cannot
find term/w32-win.el. Reported by oslsachem <>.
* w32font.c [WINDOWSNT]: Include w32.h.
(w32_load_unicows_or_gdi32): Call maybe_load_unicows_dll, instead
of implementing the same stuff.
Remove now unused g_b_init_is_windows_9x.
* w32.h (maybe_load_unicows_dll): Add prototype.
2014-01-17 Eli Zaretskii <>
* menu.c (Fx_popup_menu): When invoking tty_menu_show, temporarily
switch to single keyboard. Prevents daemon crashes when a new
client connects while we show a TTY menu in an existing client.
2014-01-14 Paul Eggert <>
Fix MinGW64 porting problem with _setjmp.
Reported by Eli Zaretskii in:
* image.c (FAST_SETJMP, FAST_LONGJMP): New macros, replacing
the old _setjmp and _longjmp. All uses changed.
2014-01-13 Daniel Colascione <>
* textprop.c (Fremove_list_of_text_properties):
Correctly handle reaching the end of the interval tree. (Bug#15344)
2014-01-13 Martin Rudalics <>
* xdisp.c (resize_mini_window): Round height to a multiple of
frame's line height. Fix bug in calculation of window start
position (Bug#16424).
2014-01-13 Jan Djärv <>
* macfont.m: Include termchar.h.
*_WITH_GC_* to take face and f as parameters.
(macfont_draw): Check for DRAW_MOUSE_FACE and set face accordingly.
Use *_WITH_FACE_*, and pass face as parameter (Bug#16425).
2014-01-13 Daniel Colascione <>
Fix menu item updating in the presence of the Unity global menu
GTK+ module.
* gtkutil.h (xg_have_tear_offs): Add frame parameter
* gtkutil.c (xg_have_tear_offs): Count the global menu as a
(xg_update_menubar, xg_update_menu_item): Call g_object_notify when
updating menus; explain why.
(xg_update_frame_menubar): Remove the 23px hack: I can't repro the
problem it's supposed to solve and it interferes with detecting
the presence of a global menu.
* xmenu.c (set_frame_menubar): Call xg_have_tear_offs with new
2014-01-11 K. Handa <>
* composite.c (composition_update_it): Fix indexing of
LGSTRING_CHAR (Bug#15984).
2014-01-11 Fabrice Popineau <>
* unexw32.c (_start) [__MINGW64__]: Define to __start.
2014-01-11 Eli Zaretskii <>
* xdisp.c (try_window_id): Don't use this function's optimizations
if overlays in the buffer displayed by the window have changed
since last redisplay. (Bug#16347)
(message_dolog): Fix indentation.
2014-01-11 Martin Rudalics <>
* frame.c (frame_resize_pixelwise): Fix doc-string.
2014-01-10 Martin Rudalics <>
Fix handling of internal borders (Bug#16348).
* dispnew.c (adjust_frame_glyphs_for_window_redisplay):
Remove internal border width from pixel width of windows.
(change_frame_size_1): Don't return early when frame's pixel
size changes - we still have to record the new sizes in the
frame structure.
* w32fns.c (x_set_tool_bar_lines): Clear internal border width
also when toolbar gets larger.
* window.c (check_frame_size): Include internal_border_width in
* xdisp.c (Ftool_bar_height): Fix doc-string typo.
* xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines):
In non-toolkit/non-GTK version clear internal border.
* xterm.c (x_clear_under_internal_border): New function for
non-toolkit/non-GTK version.
(x_after_update_window_line): In non-toolkit/non-GTK version
don't do that.
(handle_one_xevent, x_set_window_size):
Call x_clear_under_internal_border in non-toolkit/non-GTK version.
* xterm.h (x_clear_under_internal_border): Extern it.
2014-01-07 Paul Eggert <>
Fix misdisplay of interlaced GIFs with libgif5 (Bug#16372).
* image.c (gif_load): libgif5 deinterlaces for us, so don't do
it again.
2014-01-06 Eli Zaretskii <>
* xdisp.c (redisplay_window): Don't skip window redisplay if the
last value of point is not equal to buffer's point. (Bug#16129)
2014-01-05 Paul Eggert <>
Spelling fixes.
* nsterm.h (updateCollectionBehavior): Rename from
updateCollectionBehaviour. All uses changed.
Port to GNU/Linux with recent grsecurity/PaX patches (Bug#16343).
* (SETFATTR): New macro.
(temacs$(EXEEXT)): Use it.
2014-01-04 Martin Rudalics <>
Fix maximization behavior on Windows (Bug#16300).
* w32fns.c (w32_fullscreen_rect): Don't handle
* w32term.c (w32fullscreen_hook): Use SetWindowPlacement instead
of SetWindowPos. Restore last placement also when leaving
but the FULLSCREEN_BOTH case.
2014-01-03 Paul Eggert <>
Port to C89.
* data.c (arithcompare_driver):
* fileio.c (Fcar_less_than_car):
* fns.c (internal_equal):
* frame.c (delete_frame):
* lisp.h (enum More_Lisp_Bits):
* lread.c (read1):
Avoid C99 constructs that don't work in C89.
* data.c (ULL_MAX, count_trailing_zeros_ll): New macros,
to port to C89, which doesn't have 'long long'.
(count_trailing_zero_bits): Use them.
2014-01-03 Chong Yidong <>
* doc.c (Fdocumentation): Remove dynamic-docstring-function.
2014-01-02 Martin Rudalics <>
Further adjust frame/window scrollbar width calculations.
* window.c (apply_window_adjustment):
Set windows_or_buffers_changed.
(Fwindow_scroll_bars): Return actual scrollbar width.
* xfns.c (x_set_scroll_bar_default_width): Rename wid to unit.
For non-toolkit builds again use 14 as minimum width and set
* xterm.c (XTset_vertical_scroll_bar): Take width from
(x_new_font): Rename wid to unit. Base calculation of new
scrollbar width on toolkit used and make it analogous to that of
* w32fns.c (x_set_scroll_bar_default_width): Rename wid to unit.
(Fx_create_frame): Call x_set_scroll_bar_default_width instead
of GetSystemMetrics.
* w32term.c (w32_set_vertical_scroll_bar): Take width from
(x_new_font): Make it correspond to changes in xterm.c.
2014-01-01 Paul Eggert <>
* lisp.h (EMACS_INT): Configure based on INTPTR_MAX, not LONG_MAX.
This is a cleaner way to fix the MinGW-w64 porting problem.
Check for INTPTR_MAX misconfiguration.
2014-01-01 Eli Zaretskii <>
* search.c (newline_cache_on_off, find_newline): In indirect
buffers, use the newline cache of the base buffer.
* insdel.c (invalidate_buffer_caches): If BUF is an indirect
buffer, invalidate the caches of its base buffer. (Bug#16265)
* indent.c (width_run_cache_on_off, compute_motion): In indirect
buffers, use the width-run cache of the base buffer.
* xdisp.c (redisplay_window): When the window displays an indirect
buffer, and the character widths in the display table have
changed, invalidate the width-run cache of the corresponding base
* fileio.c (Finsert_file_contents): When invalidating the newline
cache, consider the case of inserting into indirect buffer.
* bidi.c (bidi_paragraph_cache_on_off, bidi_find_paragraph_start):
In indirect buffers, use the paragraph cache of the base buffer.
2013-12-31 Martin Rudalics <>
* window.c (grow_mini_window): Fix last change.
2013-12-31 Jan Djärv <>
* nsterm.m (windowDidResignKey:): Set mouse_moved to 0 (Bug#8421).
2013-12-31 Fabrice Popineau <>
* w32term.c (w32_initialize): Use LCID and LOWORD.
* w32proc.c (create_child): Use pid_t for 5th argument.
(IsValidLocale): Don't provide prototype for MinGW64.
(Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
(Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
* w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
MinGW64 doesn't support.
* lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
* w32.c (set_named_security_info): New function.
(acl_set_file): Fall back on set_named_security_info if
set_file_security fails.
(g_b_init_set_named_security_info_a): New static variables.
(globals_of_w32): Initialize them to zero.
(set_named_security_info): Set them to non-zero if the
corresponding API is available.
(SetNamedSecurityInfoW_Proc, SetNamedSecurityInfoA_Proc):
New function typedefs.
2013-12-31 Martin Rudalics <>
Some more fixes following pixelwise resize changes including one
for Bug#16306.
* gtkutil.c (x_wm_set_size_hint): Have size hints respect value
of frame_resize_pixelwise.
* widget.c (pixel_to_text_size): New function.
(update_wm_hints): Have size hints respect value of
(EmacsFrameResize): Alway process resize requests pixelwise.
* window.c (grow_mini_window): Make sure mini window is at least
one line tall.
* xdisp.c (display_menu_bar): Make sure menubar extends till
right end of frame.
* xfns.c (x_set_menu_bar_lines): Resize frame windows pixelwise.
(x_set_tool_bar_lines): Calculate pixelwise.
* xterm.c (x_wm_set_size_hint): Have size hints respect value of
2013-12-30 Juanma Barranquero <>
* fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
variables not used there.
2013-12-30 Eli Zaretskii <>
* w32.c (sys_umask): New function. (Bug#16299)
2013-12-30 Martin Rudalics <>
* dispnew.c (change_frame_size_1): Take old width of root window
from that window's pixel width. (Bug#16284)
2013-12-29 Paul Eggert <>
Plain copy-file no longer chmods an existing destination (Bug#16133).
* fileio.c (realmask): Now a static var, not a local.
(barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
Remove arg STATPTR. All uses changed.
(Fcopy_file): Do not alter permissions of existing destinations,
unless PRESERVE-PERMISSIONS (renamed from
Avoid race when testing for existing destinations and for
when input and output files are the same.
If changing the group fails, adjust both default and
preserved permissions so that access is not granted to the
wrong group.
(Fset_default_file_modes, init_fileio): Update realmask.
(Fdefault_file_modes): Use realmask instead of calling umask.
2013-12-28 Paul Eggert <>
Fix pipe bug with OS X emacs --daemon (Bug#16262).
* emacs.c (main) [DAEMON_MUST_EXEC]: Clear the close-on-exec
flags on the daemon pipe ends before execing.
2013-12-28 Eli Zaretskii <>
* w32fns.c (Fx_create_frame): Error out if called from a TTY
session. (Bug#14739)
2013-12-27 Jarek Czekalski <>
* callproc.c (Vexec_path): Document that exec-directory is in it.
2013-12-27 Steve Purcell <> (tiny change)
* nsterm.m (syms_of_nsterm): Enable ns-use-srgb-colorspace by
2013-12-27 Chong Yidong <>
* data.c (Fsymbol_function): Doc fix.
2013-12-26 Martin Rudalics <>
Some more tinkering with Bug#16051.
* window.c (resize_frame_windows): Don't let the size of the
root window drop below the frame's default character size.
Never ever delete any subwindows - let the window manager do the
* w32fns.c (x_set_tool_bar_lines): Rewrite calculation of number
of toolbar lines needed when they exceed the height of the root
(unwind_create_frame_1): New function.
(Fx_create_frame): Generally inhibit calling the window
configuration change hook here. Remove extra call to
change_frame_size - it's not needed when we don't run the
configuration change hook.
2013-12-26 Paul Eggert <>
Fix core dumps with gcc -fsanitize=address and GNU/Linux.
On my Fedora 19 platform the core dumps were so big that
my desktop became nearly catatonic.
* alloc.c (no_sanitize_memcpy) [MAX_SAVE_STACK > 0]: New function.
(Fgarbage_collect) [MAX_SAVE_STACK > 0]: Use it.
(USE_ALIGNED_MALLOC): Do not define if addresses are sanitized.
(mark_memory): Use ATTRIBUTE_NO_SANITIZE_ADDRESS rather than
a clang-only syntax.
* conf_post.h (__has_feature): New macro, if not already defined.
2013-12-25 Eli Zaretskii <>
* w32fns.c (Fw32_shell_execute): Make DOCUMENT absolute only if it
is a file name. (Bug#16252)
2013-12-25 Chong Yidong <>
* keyboard.c (Voverriding_terminal_local_map)
(Voverriding_local_map): Doc fix.
* keymap.c (Vemulation_mode_map_alists): Doc fix.
2013-12-24 Eli Zaretskii <>
* w32fns.c (Fw32_shell_execute): Ensure DOCUMENT is an absolute
file name when it is submitted to ShellExecute. Simplify code.
Don't test DOCUMENT for being a string, as that is enforced by
2013-12-23 Eli Zaretskii <>
* xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the
iterator X limits, not FRAME_TOTAL_COLS, for consistency with what
redisplay_tool_bar does. Improve and fix commentary.
(hscroll_window_tree): Don't assume w->cursor.vpos is within the
limits of the glyph matrices. (Bug#16051)
(redisplay_tool_bar): Modify the tool-bar-lines frame parameter
only when the new size is different from the old one, and the new
size can be achieved given the frame height.
2013-12-23 Jan Djärv <>
* conf_post.h: Use unsigned it for bool_bf if GNUSTEP (Bug#16210).
2013-12-23 Glenn Morris <>
* lread.c (Fload): Mention load-prefer-newer in doc.
2013-12-22 Martin Rudalics <>
Handle Bug#16207 by being more restrictive when running hooks.
* window.c (unwind_change_frame): New function.
(Fset_window_configuration): Don't run configuration change hook
while the frame configuration is unsafe. Call select_window
2013-12-22 Xue Fuqiao <>
* lread.c (syms_of_lread) <load_prefer_newer>: Doc fix.
2013-12-21 Jan Djärv <>
* nsterm.h: Declare EmacsColor category.
* nsterm.m (NSColor): Implement EmacsColor category.
(ns_get_color): Use colorUsingDefaultColorSpace.
(ns_get_color, ns_term_init): Use colorForEmacsRed.
* nsfns.m (Fxw_color_values): Use colorUsingDefaultColorSpace.
2013-12-21 Eli Zaretskii <>
* image.c (fn_png_longjmp) [WINDOWSNT]: Mark the function as
having the PNG_NORETURN attribute, to avoid compiler warning in
2013-12-21 YAMAMOTO Mitsuharu <>
* w32term.h (struct scroll_bar): Remove member `fringe_extended_p'.
* w32term.c (w32_draw_fringe_bitmap, x_scroll_run): Remove code for
fringe background extension.
(x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
because they are now always the same as `left' and `width',
respectively. Remove code for the case that `width' and
`sb_width' are different.
2013-12-20 Martin Rudalics <>
Remove scroll_bar_actual_width from frames.
* frame.h (struct frame): Remove scroll_bar_actual_width slot.
* frame.c (Fscroll_bar_width): Return scroll bar area width.
* nsterm.m (x_set_window_size):
* widget.c (set_frame_size):
* w32term.c (x_set_window_size):
* xterm.c (x_set_window_size, x_set_window_size_1): Don't set
Convert scroll_bar members to integers on Windows.
* w32term.h (struct scroll_bar): Convert top, left, width,
height, start, end and dragging to integers.
* w32fns.c (w32_createscrollbar): Remove XINT conversions for
scroll_bar members.
* w32term.c (w32_set_scroll_bar_thumb)
(w32_scroll_bar_handle_click): Remove XINT conversions for
scroll_bar members. Treat bar->dragging as integer.
(x_scroll_bar_create): Call ALLOCATE_PSEUDOVECTOR with "top" as
first element. Remove XINT conversions for scroll_bar members.
(w32_set_vertical_scroll_bar, x_scroll_bar_report_motion):
Remove XINT conversions for scroll_bar members.
Fix assignment for new window total sizes.
* window.c (Fwindow_resize_apply_total): Assign values for
minibuffer window.
2013-12-20 Chong Yidong <>
* textprop.c (Fadd_face_text_property): Doc fix. Rename `appendp'
argument to `append'.
2013-12-19 Eli Zaretskii <>
* xdisp.c (extend_face_to_end_of_line): Use default face, not the
current text face, for extending the face of the display margins.
* casefiddle.c (Fupcase_word, Fdowncase_word, Fcapitalize_word):
Doc fix. (Bug#16190)
2013-12-19 Jan Djärv <>
* nsterm.m (Qfile, Qurl): New.
(EV_MODIFIERS2): New macro.
(ns_term_init): Remove font and color from DND, does not work on
newer OSX, and other ports don't have them.
(performDragOperation:): Handle modifiers used during drag.
Use DRAG_N_DROP_EVENT instead of NS specific events (Bug#8051).
Remove global Lisp variables used to communicate with ns-win.el.
Remove font and color handling.
(syms_of_nsterm): Defsym Qfile and Qurl.
2013-12-19 Anders Lindgren <>
* nsterm.m (NSTRACE_SIZE, NSTRACE_RECT): New macros.
(ns_constrain_all_frames, x_set_offset): Remove assignment to
(updateFrameSize:, windowWillResize:toSize:): Add trace.
(constrainFrameRect): Remove special case nr_screens == 1.
Don't constrain size to size of view.
* nsterm.h (ns_output): Remove dont_constrain.
2013-12-19 Anders Lindgren <>
* nsterm.m (mouseDown:): Generate HORIZ_WHEEL_EVENT.
2013-12-18 Paul Eggert <>
Minor fixes for recent openp changes.
* lisp.h (GCPRO7): New macro.
* lread.c (openp): Use bool for boolean; all callers changed.
Protect save_string from GC. Don't assume that file descriptors
are nonzero. Redo save_mtime comparison to avoid bogus GCC
warning about uninitialized variable.
2013-12-18 Eli Zaretskii <>
* w32fns.c (emacs_abort): Use intptr_t as argument of
INT_BUFSIZE_BOUND, to avoid compiler warnings.
2013-12-18 Glenn Morris <>
* lread.c (Fload): Pass load_prefer_newer to openp.
Don't bother checking mtime if openp already did it.
(openp): Add `newer' argument, to check all suffixes
and find the newest file.
(syms_of_lread) <load_prefer_newer>: New option. (Bug#2061)
* callproc.c (call_process):
* charset.c (load_charset_map_from_file):
* emacs.c (init_cmdargs):
* image.c (x_create_bitmap_from_file, x_find_image_file):
* lisp.h (openp):
* lread.c (Flocate_file_internal):
* process.c (Fformat_network_address):
* sound.c (Fplay_sound_internal):
* w32.c (check_windows_init_file):
* w32proc.c (sys_spawnve): Update for new arg spec of openp.
* emacs.c (standard_args) [HAVE_NS]: Remove -disable-font-backend.
2013-12-17 Eli Zaretskii <>
* w32.c (getloadavg): Don't index samples[] array with negative
indices. Recover from wall-clock time being set backwards.
* w32term.c (w32_initialize): Declare the argument of
set_user_model as const.
* w32menu.c <MessageBoxW_Proc>: Fix argument declarations.
(w32_menu_show): Constify some arguments passed to MessageBox.
* w32uniscribe.c (uniscribe_font_driver): Use LISP_INITIALLY_ZERO
to initialize Lisp objects.
* w32font.c (w32font_driver): Use LISP_INITIALLY_ZERO to
initialize Lisp objects.
* frame.c (x_set_frame_parameters) [HAVE_X_WINDOWS]: Declare and
use variables used only on X under that condition.
* fileio.c (Fcopy_file) [!WINDOWSNT]: Don't declare on Windows
variables not used there.
2013-12-16 Paul Eggert <>
Fix problems with CANNOT_DUMP and EMACSLOADPATH.
* lread.c (init_lread): If CANNOT_DUMP, we can't be dumping.
2013-12-16 Eli Zaretskii <>
* xdisp.c (Fmove_point_visually): Fix subtle bugs in the fallback
code, revealed in presence of R2L characters, character
compositions, and display vectors. A better fix for Bug#16148.
(extend_face_to_end_of_line): Don't reference tool_bar_window in
GTK and NS builds, they don't have this member of struct frame.
* dispextern.h (struct composition_it): Correct a comment for the
'width' member.
2013-12-16 Paul Eggert <>
* font.h (valid_font_driver) [!ENABLE_CHECKING]: Define a dummy.
This prevents a compilation error on C compilers that do not
default functions to return 'int' if not declared. Also, add
since it now uses inline functions.
2013-12-16 Eli Zaretskii <>
* xdisp.c (extend_face_to_end_of_line): Don't fill background of
display margins on mode line, header line, and in the frame's
tool-bar window. (Bug#16165)
2013-12-16 Andreas Schwab <>
* gnutls.c (Fgnutls_boot): Properly check Flistp return value.
2013-12-16 Teodor Zlatanov <>
* gnutls.c (Fgnutls_boot): Use `Flistp' instead of
2013-12-16 Martin Rudalics <>
* w32term.c (w32_enable_frame_resize_hack): Default to 1.
2013-12-16 Dmitry Antipov <>
* font.c (valid_font_driver) [ENABLE_CHECKING]: New function
intended to find bogus pointers in font objects (Bug#16140).
* font.h (valid_font_driver) [ENABLE_CHECKING]: Add prototype.
* alloc.c (cleanup_vector): Use valid_font_driver in eassert.
(compact_font_cache_entry, compact_font_caches) [!HAVE_NTGUI]:
Disable for MS-Windows due to Bug#15876; apparently this
requires more or less substantial changes in fontset code.
* xfont.c (xfont_close):
* xftfont.c (xftfont_close): Call x_display_info_for_display
to check whether 'Display *' is valid (Bug#16093 and probably
2013-12-15 Eli Zaretskii <>
* fileio.c (Fexpand_file_name) [WINDOWSNT]: Fix conditionals.
Reported by Juanma Barranquero <>.
* process.c (Fprocess_send_eof): Don't crash if someone tries to
open a pty on MS-Windows. (Bug#16152)
* emacs.c (decode_env_path): Fix bogus comparison against
emacs_dir. Reported by Juanma Barranquero <>.
2013-12-15 Juanma Barranquero <>
* w32fns.c (Fw32_shell_execute): Remove unused local variable.
(Fx_file_dialog): Add parentheses around && to silence warning.
* w32term.c (construct_drag_n_drop): Remove unused local variable.
2013-12-15 Eli Zaretskii <>
* xdisp.c (extend_face_to_end_of_line): Extend background of
non-default face in margin areas as well. (Bug#16151)
(display_line): Call extend_face_to_end_of_line for continued
lines as well, if the display margins have non-zero width.
(set_glyph_string_background_width): When needed, set the
extends_to_end_of_line_p flag on glyph strings to be drawn in
margin areas, not only in the text area.
* frame.h (FRAME_MOUSE_UPDATE): Fix a typo that caused infloop at
2013-12-15 Paul Eggert <>
* gnutls.c (Fgnutls_boot): Fix typo; "!" applied to a Lisp_Object.
Don't worry about verify_error being t, since it has to be a list.
2013-12-14 Paul Eggert <>
Use bool for boolean, focusing on headers.
* atimer.h, lisp.h, syssignal.h, syswait.h, unexelf.c:
No need to include <stdbool.h>, since conf_post.h does it now.
* ccl.c, ccl.h (setup_ccl_program):
* coding.c (decode_coding_ccl, encode_coding_ccl):
* conf_post.h (has_attribute):
* dispextern.h (trace_redisplay_p)
(PRODUCE_GLYPHS, reset_mouse_highlight, in_display_vector_p)
* dispnew.c (adjust_glyph_matrix, clear_glyph_matrix_rows)
(blank_row, prepare_desired_row)
(build_frame_matrix_from_leaf_window, make_current)
(mirror_make_current, mirrored_line_dance, mirror_line_dance)
(update_window, scrolling_window, update_frame_line):
* editfns.c (Fformat):
* fringe.c (Fdefine_fringe_bitmap):
* image.c (x_create_bitmap_from_data, x_create_bitmap_mask)
(x_create_bitmap_from_xpm_data, xpm_load_image):
* keymap.h (KEYMAPP):
* systime.h (timespec_valid_p):
* term.c (save_and_enable_current_matrix):
* xdisp.c (in_display_vector_p, display_tool_bar_line)
(redisplay_internal, try_window_reusing_current_matrix)
(sync_frame_with_window_matrix_rows, try_window_id)
(display_menu_bar, display_tty_menu_item, display_mode_line)
(coords_in_mouse_face_p, cursor_in_mouse_face_p):
* xdisp.c (trace_redisplay_p) [GLYPH_DEBUG]:
* xmenu.c (xmenu_show):
* xterm.c (use_xim, x_term_init):
(struct x_bitmap_record):
Use bool for booleans.
* ccl.c (struct buffer_text):
* ccl.h (struct ccl_program):
* charset.h (struct charset):
* cm.h (struct cm):
* coding.h (struct iso_2022_spec, struct coding_system):
* dispextern.h (struct glyph, struct glyph_matrix, struct glyph_row)
(struct glyph_string, struct face, struct face_cache)
(struct bidi_string_data, struct bidi_it)
(struct draw_fringe_bitmap_params, struct it, Mouse_HLInfo)
(struct image):
* editfns.c (Fformat):
* frame.h (struct frame):
* fringe.c (struct fringe_bitmap):
* intervals.h (struct interval):
* keyboard.h (struct kboard):
* lisp.h (struct Lisp_Symbol, struct Lisp_Misc_Any, struct Lisp_Marker)
(struct Lisp_Overlay, struct Lisp_Save_Value, struct Lisp_Free)
(struct Lisp_Buffer_Local_Value, union specbinding):
* macfont.m (struct macfont_info):
* process.h (struct Lisp_Process):
* termchar.h (struct tty_display_info):
* window.h (struct window):
* xterm.h (struct x_output):
Use bool_bf for boolean bit-fields.
* ccl.c (setup_ccl_program): Now returns bool instead of -1 or 0.
All callers changed.
* ccl.h (struct ccl_program): Remove unused members private_state,
src_multibyte, dst_multibyte, cr_consumed, suppress_error,
(struct ccl_spec): Remove unused members cr_carryover,
* conf_post.h: Include <stdbool.h>.
(bool_bf): New type.
(MERGE_INTERVAL_CACHE): Surround statement macro with proper
'do { ... } while (false)' brackets.
* dispextern.h (IF_DEBUG): Properly parenthesize and convert to void.
Args must now be expressions; all callers changed.
(SET_MATRIX_ROW_ENABLED_P): Assume 2nd arg is bool.
(PRODUCE_GLYPHS): Simplify use of boolean.
* fileio.c (Fcopy_file):
If I is an integer, prefer 'if (I != 0)' to 'if (I)'.
* lisp.h (UNGCPRO): Return void, not int.
(FOR_EACH_TAIL): Use void expression, not int expression.
* region-cache.c: Reindent.
* region-cache.h: Copy comments from region-cache.c, to fix
incorrect remarks about booleans.
2013-12-14 Eli Zaretskii <>
* xdisp.c (Fmove_point_visually): Expect overshoot in move_it_to
when character at point is displayed from a display vector.
2013-12-14 Teodor Zlatanov <>
* gnutls.c: Replace `:verify_hostname_error' with `:verify_error',
now a list of certificate validation checks that will abort a
connection with an error.
(Fgnutls_boot): Document it and use it.
2013-12-14 Martin Rudalics <>
* w32term.c (w32_enable_frame_resize_hack): New variable.
(x_set_window_size): Use it to hack frame resizing on Windows
2013-12-14 Eli Zaretskii <>
* fileio.c (Fcopy_file) [WINDOWSNT]: Move most of the
Windows-specific code to w32.c. Change error message text to
match that of Posix platforms.
* w32.c (w32_copy_file): New function, most of the code copied and
reworked from Fcopy_file. Improve error handling. Plug memory
leak when errors are thrown. Support file names outside of the
current codepage. (Bug#7100)
2013-12-13 Paul Eggert <>
* lread.c (load_path_default): Prototype.
2013-12-13 Glenn Morris <>
* lread.c: Unconditionally reset load-path after dumping. (Bug#16107)
(dump_path): Remove.
(load-path-default): Remove `changed' argument.
Do not set dump_path permanently. Simplify.
(init_lread): Simplify.
(syms_of_lread): Remove dump_path.
2013-12-13 Dmitry Antipov <>
* alloc.c, font.c, font.h, ftfont.c, ftxfont.c, macfont.m,
* nsfont.m, w32font.c, xfont.c, xftfont.c: Revert last and
2013-12-12 font-related change to avoid Bug#16128, which
is quite hard to fix without even more substantial changes.
2013-12-13 Dmitry Antipov <>
* font.c (font_close_object): Check for live frame (Bug#16128).
2013-12-13 Paul Eggert <>
* gnutls.c, gnutls.h (emacs_gnutls_record_check_pending):
Return ptrdiff_t, not int, since it's a buffer size.
Reindent/reparen some macros to a more Gnuish style.
2013-12-12 Paul Eggert <>
Avoid undefined behavior with huge regexp interval counts.
since it's now specialized to interval counts. All uses changed.
Do not assume wraparound on signed integer overflow.
(regex_compile): Simplify based on the above changes.
2013-12-12 Eli Zaretskii <>
Support file names on MS-Windows that use characters outside of
the current system codepage. (Bug#7100)
* w32.c (get_file_security, set_file_security)
(create_symbolic_link): Separate pointers and boolean flags for
ANSI and Unicode APIs. Use the latter if w32_unicode_filenames is
non-zero, else the former.
(codepage_for_filenames, filename_to_utf16, )
(filename_from_utf16, filename_to_ansi, filename_from_ansi):
New functions.
(init_user_info): Allow $HOME and $SHELL to include non-ANSI
(normalize_filename): Lose the DBCS code, now works on UTF-8.
Accept only one argument; all callers changed.
(dostounix_filename): Remove the second argument, now works in
UTF-8. All callers changed.
(parse_root): Lose DBCS code.
(get_long_basename, w32_get_short_filename, init_environment)
(GetCachedVolumeInformation, sys_readdir, open_unc_volume)
(read_unc_volume, logon_network_drive, faccessat, sys_chdir)
(sys_chmod, sys_creat, sys_fopen, sys_link, sys_mkdir, sys_open)
(sys_rename_replace, sys_rmdir, sys_unlink, stat_worker, utime)
(is_symlink, readlink, chase_symlinks, w32_delayed_load): Work in
Unicode mode if w32_unicode_filenames is non-zero, in ANSI mode
(ansi_encode_filename): New function.
(get_emacs_configuration, get_emacs_configuration_options):
Functions deleted.
(add_volume_info, GetCachedVolumeInformation): Run the input file
name through unixtodos_filename, to ensure it is stored and
referenced in canonical form.
(get_volume_info): Lose the DBCS code, now works in UTF-8.
(logon_network_drive, sys_link, utime): Improve error handling.
(sys_access): New function.
(hashval, generate_inode_val): Unused functions deleted.
(symlink, readlink, readlinkat): Lose DBCS code, now works in UTF-8.
(check_windows_init_file): Convert error message from UTF-8 to
ANSI codepage, for display in the message box.
(globals_of_w32): Set w32_unicode_filenames according to the OS
* w32term.c (construct_drag_n_drop): Work in Unicode mode when
w32_unicode_filenames is non-zero, ANSI mode otherwise.
(syms_of_w32term): Declare w32-unicode-filenames.
* w32proc.c (new_child, delete_child): Remove code that handled
unused pending_deletion and input_file members of the child struct.
(create_child, sys_spawnve): Convert all file names to ANSI
codepage. Use ANSI APIs explicitly; forcibly fail if any file
name cannot be encoded in ANSI codepage. Don't use
unixtodos_filename, mirror slashes by hand.
(record_infile, record_pending_deletion): Functions deleted.
(Fw32_short_file_name): Call w32_get_short_filename instead of
* w32notify.c (add_watch): Work in Unicode mode when
w32_unicode_filenames is non-zero, ANSI mode otherwise.
(Fw32notify_add_watch): Rewrite to avoid using GetFullPathName;
instead, do the same with Lisp primitives.
* w32fns.c (file_dialog_callback, Fx_file_dialog)
(Fsystem_move_file_to_trash, Fw32_shell_execute)
(Ffile_system_info, Fdefault_printer_name): Work in Unicode mode
when w32_unicode_filenames is non-zero, ANSI mode otherwise.
(Fw32_shell_execute): Improve error reporting.
(Fdefault_printer_name): Ifdef away for Cygwin.
* w32.h (struct _child_process): Remove input_file and
pending_deletion members that are no longer used.
(dostounix_filename, w32_get_short_filename, filename_from_ansi)
(filename_to_ansi, filename_from_utf16, filename_to_utf16)
(ansi_encode_filename): New and updated prototypes.
* unexw32.c (open_input_file, open_output_file, unexec): Use ANSI
APIs explicitly.
(unexec): Don't use dostounix_filename, it expects a file name in
UTF-8. Instead, mirror backslashes by hand. Convert NEW_NAME to
ANSI encoding.
* fileio.c (Ffile_name_directory, file_name_as_directory)
(directory_file_name, Fexpand_file_name)
(Fsubstitute_in_file_name) [WINDOWSNT]: Adapt to the change in
arguments of dostounix_filename.
(Fexpand_file_name) [WINDOWSNT]: Convert value of $HOME to UTF-8.
use MAX_UTF8_PATH for size of file-name strings.
(emacs_readlinkat): Build an explicitly unibyte string for file
(syms_of_fileio) <file-name-coding-system>:
<default-file-name-coding-system>: Mention MS-Windows peculiarities.
* emacs.c (init_cmdargs) [WINDOWSNT]: Convert argv[0] to UTF-8.
(main) [WINDOWSNT]: Convert the argv[] elements that are files or
directories to UTF-8.
(decode_env_path) [WINDOWSNT]: Convert file names taken from the
environment, and each element of the input PATH, to UTF-8.
* dired.c (file_attributes): Use build_unibyte_string explicitly
to make Lisp strings from user and group names.
* coding.h (ENCODE_FILE, DECODE_FILE): Just call encode_file and
* coding.c (decode_file_name, encode_file_name): New functions.
* termcap.c (tgetent): Adapt to the change in arguments of
* sysdep.c (sys_subshell) [WINDOWSNT]: Use MAX_UTF8_PATH for file
* msdos.c (dostounix_filename, init_environment): Adapt to the
change in arguments of dostounix_filename.
* image.c (xpm_load, tiff_load, gif_load, imagemagick_load)
[WINDOWSNT]: Encode file names passed to the image libraries in
ANSI codepage.
* gnutls.c (Fgnutls_boot): Encode all file names passed to GnuTLS.
[WINDOWSNT]: Convert file names to the current ANSI codepage.
* filelock.c (lock_file) [WINDOWSNT]: Adapt to the change in
arguments of dostounix_filename.
2013-12-12 Dmitry Antipov <>
* font.h (struct font_entity) [HAVE_NS]: New field to record
font driver which was used to create this entity.
(struct font) [HAVE_WINDOW_SYSTEM]: New field to record
frame where the font was opened.
(font_close_object): Add prototype.
* font.c (font_make_entity) [HAVE_NS]: Zero out driver field.
(font_close_object): Not static any more. Lost frame arg.
Adjust comment and users.
* alloc.c (cleanup_vector): Call font_close_object to adjust
per-frame font counters correctly. If HAVE_NS, also call
driver-specific cleanup for font-entity objects.
* ftfont.c (ftfont_open):
* nsfont.m (nsfont_open):
* w32font.c (w32font_open_internal):
* xfont.c (xfont_open):
* xftfont.c (xftfont_open): Save frame pointer in font object.
* macfont.m (macfont_open): Likewise.
(macfont_descriptor_entity): Save driver pointer to be able
to call its free_entity routine when font-entity is swept.
* ftxfont.c (ftxfont_open): Add eassert because frame
pointer should be saved by
2013-12-12 Dmitry Antipov <>
* xterm.c (x_make_frame_visible): Restore hack which is needed when
input polling is used. This is still meaningful for Cygwin, see
* keyboard.c (poll_for_input_1, input_polling_used):
Define unconditionally.
* dispextern.h (FACE_SUITABLE_FOR_CHAR_P): Remove unused macro.
(FACE_FOR_CHAR): Simplify because face_for_char does the same.
* fontset.c (face_suitable_for_char_p) [0]: Remove unused function.
(font_for_char): Prefer ptrdiff_t to int for buffer position.
(face_for_char): Likewise. Rearrange eassert and return ASCII
face for CHAR_BYTE8_P.
* fontset.h (font_for_char, face_for_char): Adjust prototypes.
2013-12-11 Ken Brown <>
* dispextern.h (erase_phys_cursor):
* keyboard.h (make_ctrl_char): Declare prototypes if HAVE_NTGUI.
2013-12-11 Dmitry Antipov <>
* nsterm.m (x_free_frame_resources):
* term.c (tty_free_frame_resources):
* xterm.c (x_free_frame_resources): Do not check for non-NULL
face cache because it's implied by free_frame_faces anyway.
* w32term.c (x_free_frame_resources): Likewise. Do not call
free_frame_faces twice.
2013-12-11 Rüdiger Sonderfeld <>
* editfns.c (Fformat_time_string): Mention %F in the doc.
2013-12-11 Martin Rudalics <>
* window.c (resize_frame_windows): Don't return immediately when
the root window's size doesn't change - the minibuffer window
may still have to be repositioned/resized.
* xfns.c (Fx_create_frame): Always change the frame size after
initializing the frame's faces.
* xterm.c (handle_one_xevent): Don't set pixel sizes here,
change_frame_size should already have done it.
(x_new_font): Assign new tool- and menu-bar heights.
(x_set_window_size_1): Account for tool- and menu-bar heights
(Bug#16013). Don't set pixel sizes since change_frame_size
should already have done it.
2013-12-11 Paul Eggert <>
Remove the option of using libcrypto.
* (LIB_CRYPTO): Remove.
(LIBES): Don't use it.
2013-12-11 Juri Linkov <>
* term.c (term_get_fkeys_1): Remove non-standard IBM terminfo
as obsolete to avoid conflicts with <S-up>. (Bug#13471)
2013-12-10 Dmitry Antipov <>
* xdisp.c (display_tool_bar_line): Don't extend on a previously
drawn tool bar items (Bug#16058).
* font.c (font_find_for_lface): Ensure SAFE_FREE on return.
2013-12-09 Ken Brown <>
* frame.c (get_frame_param): Make extern if HAVE_NTGUI.
* lisp.h (get_frame_param): Adjust conditions for prototype
2013-12-09 Dmitry Antipov <>
Avoid unused macro warning if configured --without-xft.
2013-12-09 Jan Djärv <>
* alloc.c (Fmemory_limit): Avoid compiler warning. Return 0 always.
2013-12-08 Jan Djärv <>
* nsterm.m (updateFrameSize:): Fix GNUstep toolbar not updating.
* emacs.c (main): Call fixup_locale a second time for GNUstep.
2013-12-08 Martin Rudalics <>
* frame.c (x_set_font): Mark frame as garbaged (Bug#16028).
2013-12-08 Paul Eggert <>
Use libcrypto's checksum implementations if available, for speed.
* (LIB_CRYPTO): New macro.
(LIBES): Use it.
* frame.h (SET_FRAME_VISIBLE): Now an inline function.
The macro didn't conform to C99 due to type mismatch,
which caused compilation failure with Sun C 5.12,
and it was confusing anyway. Include window.h to declare
2013-12-08 Stefan Monnier <>
* window.c (set_window_buffer): Update mode line (bug#16084).
2013-12-07 Paul Eggert <>
Fix minor problems found by static checking.
* keyboard.c (poll_for_input_1, input_polling_used):
Define only if HAVE_NTGUI.
* xmenu.c (popup_activate_callback): Omit unnecessary
check against USE_X_TOOLKIT, which must be defined here anyway.
* xterm.c, xterm.h (x_dispatch_event) [! (USE_X_TOOLKIT || USE_MOTIF)]:
Now static.
2013-12-07 Martin Rudalics <>
* w32term.c (w32_read_socket): Fix int/Lisp_Object type mixup.
2013-12-07 Jan Djärv <>
* gtkutil.c (tb_size_cb): Call xg_height_or_width_changed.
* nsterm.m (x_set_window_size): Remove fprintf.
(init): Define always. Set applicationDidFinishLaunchingCalled
for GNUstep.
Set applicationDidFinishLaunchingCalled.
(applicationDidBecomeActive:): Call applicationDidFinishLaunching if
not called.
* nsterm.h (EmacsApp): Add applicationDidFinishLaunchingCalled.
Pixel resize changes for NS (Bug#16049).
* nsterm.m (x_set_window_size): Change parameters rows/cols to
height/width. row/cols are locals.
Pass pixelwise to check_frame_size. Don't set FRAME_PIXEL_WIDTH/HEIGHT.
(updateFrameSize:): Remove gsextra. Adjust for pixelwise resize.
(windowWillResize): Remove gsextra. Calculate extra as in
(x_new_font): Don't change frame size if fullscreen.
Change size pixelwise.
* nsfns.m (Fx_create_frame): Call change_frame_size twice as per
comment in xfns.c. Change to pixelwise call.
2013-12-06 Eli Zaretskii <>
* buffer.c (Fset_buffer_multibyte): Invalidate buffer caches.
2013-12-06 Dmitry Antipov <>
* xterm.c (input_signal_count): Remove.
(x_dispatch_event): Define unconditionally.
(x_make_frame_visible): Process X events until the frame
is really visible (Bug#16027).
* xterm.h (x_dispatch_event): Declare unconditionally.
2013-12-05 Jan Djärv <>
* nsfns.m (ns_frame_parm_handlers): Add right/bottom_divider_width.
* nsterm.m (x_set_window_size): Handle pixelwise.
2013-12-05 Martin Rudalics <>
* w32term.c (x_new_font):
* xterm.c (x_new_font): Calculate new frame size from new font
size (Bug#16028).
2013-12-04 Stefan Monnier <>
* lisp.h (FOR_EACH_TAIL): New macro.
* fns.c (Fdelq): Use it to avoid inf-loops; remove QUIT.
* window.c (select_window): Call second wset_redisplay before we change
selected_window (bug#16034).
2013-12-04 Paul Eggert <>
* bidi.c (LRM_CHAR, RLM_CHAR): Remove; no longer used.
2013-12-04 Eli Zaretskii <>
* w32xfns.c: Include window.h, to avoid a compiler warning.
2013-12-04 Stefan Monnier <>
* window.c (window_scroll): Mark window for redisplay (bug#16034).
(scroll_command, Fscroll_other_window): Don't cause redisplay now that
window_scroll takes care of it.
(Fset_window_point, Fdelete_other_windows_internal)
(set_window_buffer, Fwindow_resize_apply, resize_frame_windows)
(Fsplit_window_internal, Fdelete_window_internal)
(Fresize_mini_window_internal, Fset_window_configuration)
(apply_window_adjustment): Use fset_redisplay and wset_redisplay to
cause redisplay instead of forcing a complete redisplay.
* xdisp.c (wset_redisplay): Don't set windows_or_buffers_changed if
we're only affecting the selected_window.
2013-12-04 Eli Zaretskii <>
* bidi.c (bidi_get_type, bidi_get_category): Handle the isolate
directional control characters. Update type and category
determination according to the UBA from Unicode v6.3.
(bidi_category_t): New category EXPLICIT_FORMATTING.
* dispextern.h (bidi_type_t): Update to include new bidirectional
properties introduced with Unicode v6.3. (Bug#16043)
2013-12-04 Martin Rudalics <>
* xterm.c (XTflash): Fix coordinate of bottom area to flash
2013-12-04 Dmitry Antipov <>
* font.c (font_list_entities): Remove dummy assignment.
* font.h (struct font) [HAVE_WINDOW_SYSTEM]: Group members which are
used on graphic displays only. Remove unused 'font_encoder' member.
(struct font_bitmap): Remove unused 'extra' member.
* nsfont.m (nsfont_open):
* w32font.c (w32font_open_internal):
* ftfont.c (ftfont_get_bitmap): Adjust users.
2013-12-03 Paul Eggert <>
Use bool for boolean.
* tparam.c (tparam1):
* undo.c (record_point, record_property_change):
Use bool for boolean, for local vars that are always true or false.
Minor integer overflow fixes (Bug#16033).
* window.c (Fset_window_new_pixel): Don't let new_pixel go negative.
This improves on the previous fix to this function.
(window_resize_check): When summing up pixel counts, don't rely on
undefined behavior if the sum overflows.
2013-12-03 Martin Rudalics <>
* window.c (Fset_window_new_pixel): Don't choke at negative
argument value (Bug#16033).
* xfns.c (Fx_create_frame): Add another call to change_frame_size
to avoid crash in window_box_height.
* gtkutil.h: Fix external declaration of xg_frame_set_char_size.
* gtkutil.c (xg_frame_set_char_size, style_changed_cb): Fix size
* xterm.c (x_set_window_size): Fix size calculation (Bug#16013).
2013-12-03 Paul Eggert <>
Minor integer overflow fixes.
* window.c (Fset_window_new_pixel, grow_mini_window):
* xdisp.c (Fwindow_text_pixel_size):
Avoid undefined behavior on signed integer overflow.
* xfns.c (x_set_mouse_color):
Check that drag shape fits in 'unsigned', since that's what X wants.
2013-12-02 Eli Zaretskii <>
Improve reporting of fatal exception on MS-Windows.
* w32fns.c (my_exception_handler): New function.
(globals_of_w32fns): Set it up as the unhandled exception
handler. Initialize exception code and address to zeros.
(emacs_abort): If the exception code and address are available,
print them at the beginning of the backtrace. Fix the format of
printing addresses (was producing 0x0x12345678 on XP).
2013-12-02 Helmut Eller <>
* eval.c (Fbacktrace__locals): New function.
(syms_of_eval): Defsubr it.
2013-12-02 Dmitry Antipov <>
Define here to unify between...
* nsterm.h, w32term.h, xterm.h: ...port-specific headers.
* w32term.h (CHECK_W32_FRAME): Remove unused macro.
2013-12-02 YAMAMOTO Mitsuharu <>
* xterm.h (struct scroll_bar): Remove member `fringe_extended_p'.
* xterm.c (x_draw_fringe_bitmap, x_scroll_run): Remove code for
fringe background extension.
(x_scroll_bar_create): Remove variables `sb_left' and `sb_width',
because they are now always the same as `left' and `width',
respectively. Remove code for the case that `width' and
`sb_width' are different.
2013-12-01 Paul Eggert <>
Fix minor problems found by static checking.
* dispextern.h, xdisp.c (x_draw_bottom_divider): Now static.
* frame.c (set_frame_param) [!HAVE_NTGUI]: Remove.
* xdisp.c (Ftool_bar_height) [USE_GTK || HAVE_NS]: Now const function.
2013-12-01 Lars Magne Ingebrigtsen <>
* image.c (imagemagick_compute_animated_image): Don't crash if we
have an animation with different-sized images (bug#15313).
2013-11-30 Martin Rudalics <>
Remove some unused items introduced during pixelwise change.
* window.c (window_resize_total_check): Remove unused function.
* xdisp.c (remember_mouse_glyph): Remove unused label.
(Ftool_bar_height): Move declaration inside #if.
* xterm.c (x_set_window_size): Don't use r and c.
2013-11-30 Juanma Barranquero <>
* xdisp.c (Fwindow_text_pixel_size): Remove unused variables
`value' and `endp'.
* window.c (Fset_window_configuration): Comment out unused variables.
* w32term.c (w32_read_socket): Remove unused variable `buf'.
2013-11-30 Jan Djärv <>
* xdisp.c (redisplay_internal): unrequest_sigio => request_sigio.
* gnutls.c (gnutls_audit_log_function): Only declare and define if
HAVE_GNUTLS3 (Bug#16001).
* xdisp.c (redisplay_internal): Call request_sigio at end_of_redisplay
if interrupts are deferred (Bug#15801).
2013-11-30 Martin Rudalics <>
Support resizing frames and windows pixelwise.
* dispextern.h (enum window_part): Add ON_SCROLL_BAR,
(struct glyph_matrix): Replace window_left_col and
window_top_line by window_pixel_left and window_pixel_top.
Minor rewrite.
(enum face_id): Add WINDOW_DIVIDER_FACE_ID.
(draw_window_divider, move_it_to, x_draw_right_divider)
(x_draw_bottom_divider, change_frame_size): Add or fix
* dispnew.c (change_frame_size_1): Change prototype.
(adjust_glyph_matrix, required_matrix_width)
(adjust_frame_glyphs_for_window_redisplay): Use pixel
values instead of lines and columns.
(marginal_area_string): Use WINDOW_FRINGES_WIDTH instead of
(handle_window_change_signal, do_pending_window_change)
(init_display): Adjusts calls of change_frame_size.
(change_frame_size, change_frame_size_1): Handle pixelwise
* frame.c (Qright_divider_width, Qbottom_divider_width):
New Lisp objects.
(set_menu_bar_lines_1, set_menu_bar_lines, make_frame)
(make_terminal_frame, Fmake_terminal_frame, Fframe_parameters)
(x_set_internal_border_width, x_set_vertical_scroll_bars)
(x_set_scroll_bar_width, x_figure_window_size): Handle pixel
(set_frame_param): New function.
(Fframe_text_cols, Fframe_text_lines, Fframe_total_cols)
(Fframe_text_width, Fframe_text_height, Fscroll_bar_width)
(Ffringe_width, Fborder_width, Fright_divider_width)
(Fbottom_divider_width): New functions, defsubr them.
(Fset_frame_height, Fset_frame_width, Fset_frame_size):
New argument pixelwise.
(struct frame_parm_table): New members Qright_divider_width and
(x_set_frame_parameters): Handle parameters for pixelwise sizes.
(x_report_frame_params): Handle Qright_divider_width and
(x_set_right_divider_width, x_set_bottom_divider_width):
New functions.
(frame_resize_pixelwise): New option.
* frame.h (struct frame): Add tool_bar_height, menu_bar_height,
new_pixelwise, right_divider_width and bottom_divider_width;
remove total_lines; rename text_lines, text_cols, new_text_lines
and new_text_cols to text_height, text_width, new_height and
new_width respectively.
FRAME_TEXT_WIDTH respectively.
New macros.
(FRAME_TOTAL_COLS_ARG): Remove macro.
* fringe.c (draw_fringe_bitmap_1): Handle right divder.
* gtkutil.c (xg_frame_resized, xg_frame_set_char_size)
(x_wm_set_size_hint): Handle frame pixel sizes.
* indent.c (compute_motion, Fcompute_motion):
Call window_body_width instead of window_body_cols.
* keyboard.c (Qright_divider, Qbottom_divider): New symbols.
(make_lispy_position): Handle right and bottom dividers.
(Fsuspend_emacs): Pixelize call of change_frame_size.
* keyboard.h: Extern Qright_divider, Qbottom_divider.
* lisp.h: Extern set_frame_param.
* nsfns.m (x_set_tool_bar_lines): Pixelize call of
(Fx_create_frame): Add entry for vertical_drag_cursor.
Pixelize call of change_frame_size.
* nsterm.h (struct ns_output): Add vertical_drag_cursor.
* nsterm.m (ns_update_window_end): Optionally draw right
(x_set_window_size): Add argument pixelwise.
Call check_frame_size and change_frame_size with pixelwise zero.
(ns_draw_window_divider): New function.
(ns_redisplay_interface): Add ns_draw_window_divider.
(updateFrameSize:): Call change_frame_size with pixelwise zero.
(x_new_font): Call x_set_window_size with pixelwise zero.
* print.c (print_object): For a window print its sequence
number again.
* term.c (Fresume_tty): Pixelize call of change_frame_size.
* w32fns.c (x_set_mouse_color): Handle vertical drag cursor.
(x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
(w32_createwindow): Use scroll bar area width.
(w32_wnd_proc): Handle bottom divider width.
For WM_WINDOWPOSCHANGING return zero if we resize pixelwise.
(Fx_create_frame): Default divider width parameters.
Caclulate sizes pixelwise. Add vertical drag cursor support.
(x_create_tip_frame): Default divider widths to zero.
Pixelize call to change_frame_size.
(Fx_show_tip): Add handling of divider widths. Pixelize window
position and sizes.
(Fw32_frame_rect): New function.
(frame_parm_handler w32_frame_parm_handlers): Add divider
(Vx_window_vertical_drag_shape): Add variable.
* w32inevt.c (resize_event, maybe_generate_resize_event):
Pixelize change_frame_size calls.
* w32menu.c (set_frame_menubar): Pixelize x_set_window_size
* w32term.c (w32_draw_window_divider): New function.
(x_update_window_end): Handle right divider.
(w32_draw_fringe_bitmap, x_scroll_run)
(w32_set_vertical_scroll_bar): Pixelize scrollbar widths.
(w32_read_socket): Handle SIZE_MAXIMIZED separately.
Calculate new frame sizes pixelwise.
(x_new_font): Pixelize call to x_set_window_size.
(x_check_fullscreen): Pixelize call to change_frame_size.
(x_set_window_size_1, x_set_window_size): New argument
pixelwise. Calculate pixelwise.
(x_wm_set_size_hint): Use scroll bar area width.
(w32_redisplay_interface): Add w32_draw_window_divider.
* w32term.h (struct w32_output): Add vertical drag cursor.
* widget.c (set_frame_size, update_wm_hints)
(EmacsFrameResize, EmacsFrameSetValues): Pixelize calls of
(EmacsFrameSetCharSize): Pixelize call of x_set_window_size.
* window.c (sequence_number): Restore.
(Fwindow_pixel_width, Fwindow_pixel_height)
(Fwindow_mode_line_height, Fwindow_header_line_height)
(window_pixel_to_total, Frun_window_scroll_functions)
(Fset_window_new_pixel, window_resize_apply_total)
(Fwindow_resize_apply_total): New functions.
(window_body_height, window_body_width): Rename from
window_body_lines. New argument PIXELWISE.
Calculate pixelwise.
(Fwindow_body_height, Fwindow_body_width): New argument
(coordinates_in_window, window_relative_x_coord): Use window's
pixel width instead of total width.
(replace_window, recombine_windows): Initialize pixel values.
(resize_root_window, resize_frame_windows, grow_mini_window)
(shrink_mini_window): New argument PIXELWISE.
Calculate pixelwise.
(Fdelete_other_windows_internal, adjust_window_margins)
(window_resize_check, window_resize_apply)
(Fdelete_window_internal, Fresize_mini_window_internal)
(Fwindow_text_width, Fwindow_text_height): Calculate pixelwise.
(check_frame_size): Rename arguments. New argument PIXELWISE.
Calculate pixelwise.
(set_window_buffer): Make samebuf bool. Run configuration change
hook only if buffer changed.
(Fset_window_buffer): Rewrite doc-string.
(make_window): Initialize new_pixel slot.
(Fwindow_resize_apply): Check pixel size of root window.
(Fsplit_window_internal): Call 2nd argument pixel_size.
Calculate pixelwise.
(Fscroll_left, Fscroll_right): Call window_body_width instead of
(save_window_data): New slots frame_text_width,
frame_text_height, frame_menu_bar_height, frame_tool_bar_height.
(saved_window): New slots pixel_left, pixel_top, pixel_height,
(Fcurrent_window_configuration, Fset_window_configuration)
(save_window_save, compare_window_configurations): Handle new
slots in save_window_data and saved_window.
(Fset_window_scroll_bars): Fix doc-string.
(window_resize_pixelwise): New variable.
(coordinates_in_window, Fcoordinates_in_window_p):
Handle dividers.
(make_parent_window): Adjust sequence_number.
(Fwindow_right_divider_width, Fwindow_bottom_divider_width):
New functions.
* window.h (struct window): New members new_pixel, pixel_left,
pixel_top, pixel_width, pixel_height. Restore sequence_number.
(wset_new_pixel): New function.
(resize_frame_windows, grow_mini_window, shrink_mini_window)
(window_body_width, check_frame_size): Adapt external declarations.
* xdisp.c (last_max_ascent): New integer.
(window_text_bottom_y): Handle bottom divider.
(window_box_width, window_box_height): Calculate pixelwise.
(get_glyph_string_clip_rects): Handle right divider.
(remember_mouse_glyph): When windows are resized pixelwise
proceed with width and height set to 1.
(init_iterator): Use WINDOW_PIXEL_WIDTH instead of
(move_it_to): Calculate and return maximum x position
(Fwindow_text_pixel_size): New function.
(resize_mini_window, update_tool_bar): Calculate pixelwise.
(tool_bar_lines_needed): Rename to tool_bar_height.
Calculate pixelwise.
(Ftool_bar_lines_needed): Rename to Ftool_bar_height.
Calculate pixelwise.
(redisplay_tool_bar): Calculate pixelwise.
(redisplay_window): Calculate pixelwise. Handle dividers.
(draw_glyphs, x_clear_end_of_line, note_mouse_highlight)
(x_draw_vertical_border): Handle dividers.
(define_frame_cursor1): Handle vertical drag cursor.
(x_draw_right_divider, x_draw_bottom_divider): New functions.
(expose_window): Calculate pixelwise. Handle dividers.
(init_xdisp): Initialize pixel values.
* xfaces.c (Qwindow_divider): New face.
(realize_basic_faces): Realize it.
* xfns.c (x_set_mouse_color): Handle vertical_drag_cursor.
(x_set_menu_bar_lines, x_set_tool_bar_lines): Calculate pixelwise.
(x_set_scroll_bar_default_width): Default actual width to 16.
(Fx_create_frame): Set sizes pixelwise.
(x_create_tip_frame): Default divider widths to zero.
Pixelize call of change_frame_size.
(Fx_show_tip): Handle divider widths. Initial pixel position
and sizes.
(frame_parm_handler x_frame_parm_handlers): Add divider widths.
(Vx_window_vertical_drag_shape): New option.
* xmenu.c (free_frame_menubar): Pixelize call of
* xterm.c (x_draw_window_divider): New function.
(x_update_window_end): Optionally draw right divider.
(x_draw_fringe_bitmap, x_scroll_run, x_scroll_bar_create)
(XTset_vertical_scroll_bar): Use scroll bar pixel width.
(handle_one_xevent, x_new_font): Calculate pixelwise.
(x_set_window_size_1, x_set_window_size): New argument
pixelwise. Calculate pixelwise.
(x_wm_set_size_hint): Pixelize call of check_frame_size.
(struct x_redisplay_interface): Add x_draw_window_divider.
* xterm.h (struct x_output): Add vertical_drag_cursor.
2013-11-30 Stefan Monnier <>
* xdisp.c (redisplay_internal): Don't call set_window_update_flags.
Set invisible frames's `redisplay' when a full redisplay is requested.
(redisplay_window): Set must_be_updated_p instead (bug#15999).
(redisplay_mode_lines): Don't set must_be_updated_p any more.
(display_mode_lines): Set it here instead.
* dispnew.c (set_window_update_flags): Remove `b' argument; make static.
* dispextern.h (set_window_update_flags): Remove.
2013-11-29 Stefan Monnier <>
* fns.c (internal_equal): Add a hash_table argument to handle cycles.
* xdisp.c (REDISPLAY_SOME_P): New macro.
(redisplay_internal): Use it (bug#15999).
(prepare_menu_bars, redisplay_window): Use it as well.
* (lisp): Add electric.elc and uniquify.elc.
2013-11-29 Tom Seddon <> (tiny change)
* w32font.c (g_b_init_get_char_width_32_w): New static var.
(globals_of_w32font): Zero it out.
(GetCharWidth32W_Proc): New function pointer.
(get_char_width_32_w): New function.
(compute_metrics): If get_glyph_outline_w returns an error, try
get_char_width_32_w before declaring a failure. This avoids
punishing raster (a.k.a. "bitmap") fonts by slowing down
redisplay. (Bug#6364).
2013-11-29 Eli Zaretskii <>
* xdisp.c (clear_mouse_face): Don't invalidate the entire
mouse-highlight info, just signal frame_up_to_date_hook that mouse
highlight needs to be redisplayed. (Bug#15913)
2013-11-29 Paul Eggert <>
Fix minor problems found by static checking.
* buffer.h (struct buffer_text, struct buffer):
* frame.h (struct frame):
* window.h (struct window):
Avoid 'bool foo : 1;', as it's not portable to pre-C99 compilers,
as described in ../lib/ Use 'unsigned foo : 1;' instead.
* menu.c (syms_of_menu): Define x-popup-dialog, removing a
no-longer-valid use of HAVE_MENUS.
* xdisp.c (propagate_buffer_redisplay): Now static.
2013-11-29 Stefan Monnier <>
* xmenu.c (Fmenu_or_popup_active_p):
* window.c (Fset_window_configuration):
* menu.c (Fx_popup_menu, Fx_popup_dialog):
* keyboard.c (record_menu_key, read_char_x_menu_prompt):
* fns.c (Fyes_or_no_p):
* editfns.c (Fmessage_box, Fmessage_or_box):
* alloc.c (make_save_ptr_ptr):
* xdisp.c, w32menu.c, term.c, xterm.h, xterm.c: Remove HAVE_MENUS.
* window.c (Fset_window_configuration): Move select_window later.
2013-11-28 Stefan Monnier <>
Refine redisplay optimizations to only redisplay *some* frames/windows
rather than all of them.
* xdisp.c (REDISPLAY_SOME): New constant.
(redisplay_other_windows, wset_redisplay, fset_redisplay)
(bset_redisplay, bset_update_mode_line): New functions.
(message_dolog): Use bset_redisplay.
(clear_garbaged_frames): Use fset_redisplay.
(echo_area_display): Use wset_redisplay.
(buffer_shared_and_changed): Remove.
(prepare_menu_bars): Call Vpre_redisplay_function before updating
frame titles. Compute the actual set of windows redisplayed.
Don't update frame titles and menu bars for frames that don't need to
be redisplayed.
(propagate_buffer_redisplay): New function.
(AINC): New macro.
(redisplay_internal): Use it. Be more selective in the set of windows
we redisplay. Propagate windows_or_buffers_changed to
update_mode_lines a bit later to simplify the code.
(mark_window_display_accurate_1): Reset window and buffer's
`redisplay' flag.
(redisplay_window): Do nothing if neither the window nor the buffer nor
the frame needs redisplay.
* window.h (struct window): Add `redisplay' field.
(wset_redisplay, fset_redisplay, bset_redisplay, bset_update_mode_line)
(redisplay_other_windows, window_list): New declarations.
* window.c (select_window, Fset_window_start): Use wset_redisplay.
(window_list): Not static any more.
(grow_mini_window, shrink_mini_window): Use fset_redisplay.
* minibuf.c (read_minibuf_unwind): Don't redisplay everything.
* insdel.c (prepare_to_modify_buffer_1): Use bset_redisplay.
* frame.c (Fmake_frame_visible): Don't redisplay everything.
* frame.h (struct frame): Add `redisplay' field.
Move `external_menu_bar' bitfield next to other bit-fields.
(SET_FRAME_GARBAGED): Use fset_redisplay.
(SET_FRAME_VISIBLE): Don't garbage the frame;
Use redisplay_other_windows.
* buffer.h (struct buffer): Add `redisplay' field.
* buffer.c (Fforce_mode_line_update): Pay attention to the `all' flag.
(modify_overlay): Use bset_redisplay.
* alloc.c (gc_sweep): Don't unmark strings while sweeping symbols.
2013-11-28 Eli Zaretskii <>
Support w32 file notifications in batch mode.
* w32proc.c (sys_select): Don't wait on interrupt_handle if it is
invalid (which happens in batch mode). If non-interactive, call
handle_file_notifications to store file notification events in the
input queue. (Bug#15933)
* w32notify.c (send_notifications): Handle FRAME_INITIAL frames as well.
* w32inevt.c (handle_file_notifications): Now external, not static.
* w32term.h (handle_file_notifications): Provide prototype.
* emacs.c (main) [HAVE_W32NOTIFY]: When non-interactive, call
init_crit, since init_display, which does that otherwise, is not
2013-11-27 Glenn Morris <>
* ($(lispsource)/international/charprop.el): New.
(emacs$(EXEEXT)): Depend on charprop.el.
2013-11-27 Eli Zaretskii <>
* fileio.c (Finsert_file_contents): Invalidate buffer caches when
deleting portions of the buffer under non-nil REPLACE argument.
* w32notify.c (Fw32notify_add_watch): If the argument FILE is a
directory, watch it and not its parent.
(add_watch): Allow empty string in FILE.
2013-11-27 Martin Rudalics <>
* window.c (Fset_window_start, window_resize_apply)
(window_scroll): Reset window_end_valid (Bug#15957).
2013-11-27 Glenn Morris <>
* (leimdir): Now in lisp source directory.
($(leimdir)/leim-list.el): Just use ../leim .
* lread.c (load_path_default):
* nsterm.m (ns_load_path): No more leim directory.
2013-11-26 Andreas Schwab <>
* .gdbinit (xgettype): Add cast.
2013-11-26 Glenn Morris <>
Preload leim-list.el.
* callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
is a single directory.
2013-11-25 Paul Eggert <>
bool-vector-subsetp is now the normal direction (Bug#15912).
* data.c (Fbool_vector_subsetp): Test whether the first argument
is a subset of the second one, not the reverse. Add doc string.
Fix minor problems found by static checking.
* lread.c (load_path_default): Now static.
* textprop.c (text_property_stickiness): Be consistent about the
test used when deciding whether to consider the previous character.
This simplifies the code a bit.
2013-11-25 Stefan Monnier <>
* textprop.c (text_property_stickiness): Fix front-stickiness at BOB.
* frame.c (Fhandle_focus_in, Fhandle_focus_out): Move to frame.el.
(syms_of_frame): Don't defsubr them.
2013-11-25 Glenn Morris <>
* lread.c (load_path_default): Change the sense of the argument.
(init_lread): When EMACSLOADPATH is set, do not ignore changes
from dump_path. When it is not, avoid checking dump_path twice.
* lread.c (init_lread): Fix 2013-11-23 goof that was checking
uninstalled dump_path against installed Vload_path. (Bug#15964)
2013-11-24 Stefan Monnier <>
Export get_pos_property to Elisp.
* editfns.c (Fget_pos_property): Rename from get_pos_property.
(syms_of_editfns): Export it to Elisp.
* data.c (Fmake_variable_buffer_local): Mention `permanent-local'.
2013-11-23 Romain Francoise <>
* fileio.c (init_fileio): Move `write_region_inhibit_fsync'
initialization here ...
(syms_of_fileio): ... from here.
2013-11-23 Stefan Monnier <>
* lread.c (init_lread): Fix int/Lisp_Object mixup.
Please use --enable-check-lisp-object-type.
2013-11-23 Glenn Morris <>
* process.c (get_process): Explicit error for dead buffers.
2013-11-23 Andreas Schwab <>
* process.c (get_process): Check that OBJ is a live buffer. (Bug#15923)
2013-11-23 Glenn Morris <>
Empty elements in EMACSLOADPATH stand for the default. (Bug#12100)
* lread.c (load_path_check): Take path to check as argument.
(load_path_default): New, split from init_lread.
(init_lread): Move calc of default load-path to load_path_default.
Empty elements in EMACSLOADPATH now stand for the default.
(load-path): Doc fix.
* emacs.c (decode_env_path): Add option to treat empty elements
as nil rather than ".".
* callproc.c (init_callproc_1, init_callproc):
* image.c (Vx_bitmap_file_path):
* lisp.h (decode_env_path):
* lread.c (Vsource_directory):
Update for new argument spec of decode_env_path.
2013-11-22 Eli Zaretskii <>
* bidi.c (bidi_find_paragraph_start): Limit the returned positions
to BEGV_BYTE..ZV_BYTE range. (Bug#15951)
2013-11-21 Paul Eggert <>
Fix some dependency problems that cause unnecessary recompiles.
Problem reported by RMS in
(really-lwlib, really-oldXMenu, stamp-oldxmenu)
(../src/$(OLDXMENU), $(OLDXMENU)): Remove.
(temacs$(EXEEXT)): Depend on $(LIBXMENU), not stamp-oldxmenu.
($(lwlibdir)/liblw.a, $(oldXMenudir)/libXMenu11.a, FORCE): New targets.
(boostrap-clean): No need to remove stamp-oldxmenu.
Fix recently introduced bool vector overrun.
This was due to an optimization that went awry.
Reported by Glenn Morris in
* alloc.c (make_uninit_bool_vector): Don't allocate a dummy word
for empty vectors, undoing the 2013-11-18 change.
* data.c (bool_vector_binop_driver): Rely on this.
Fix bug that occasionally overran the destination.
* lisp.h (struct Lisp_Bool_vector): Document this.
2013-11-20 Jan Djärv <>
* nsterm.m (init, run, stop:): Enable again. stop calls super stop
to handle dialogs.
* nsterm.m (init, run, stop:): Comment out for now, does not work
with dialogs.
2013-11-19 Paul Eggert <>
* charset.c (syms_of_charset): Don't read past end of string.
2013-11-19 Glenn Morris <>
* frame.c (Fhandle_focus_in, Fhandle_focus_out): Doc fixes.
2013-11-19 Brian Jenkins <> (tiny change)
Add hooks to run on gaining/losing focus. (Bug#15029)
* frame.c (Qfocus_in_hook, Qfocus_out_hook): New static lisp objects.
(Fhandle_focus_in, Fhandle_focus_out): Run focus hooks.
(syms_of_frame): Add focus-in-hook, focus-out-hook.
2013-11-18 Paul Eggert <>
* data.c (bool_vector_binop_driver): Rename locals for sanity's sake.
The old names predated the API change that put destination at end.
Improve API of recently-added bool vector functions (Bug#15912).
The old API had (bool-vector-count-matches A B)
and (bool-vector-count-matches-at A B I), which gave the
misleading impression that the two functions were variants, one
with a location I. The new API has (bool-vector-count-population A)
and (bool-vector-count-consecutive A B I) to make the distinction
clearer. The first function no longer has a B argument, since the
caller can easily determine the number of nils if the length and
number of ts is known.
* data.c (Fbool_vector_count_population): Rename from
bool_vector_count_matches, and accept just 1 argument.
(Fbool_vector_count_consecutive): Rename from
Always allocate at least one bits_word per bool vector.
See Daniel Colascione in:
* alloc.c (make_uninit_bool_vector): Always allocate at least one word.
* data.c (bool_vector_binop_driver): Rely on this. Tune.
* lisp.h (struct Lisp_Bool_vector): Document this.
2013-11-18 Eli Zaretskii <>
* insdel.c (invalidate_buffer_caches): New function, consolidated
from part of prepare_to_modify_buffer.
(insert_from_gap, prepare_to_modify_buffer):
* coding.c (code_convert_region, code_convert_string):
Call invalidate_buffer_caches. (Bug#15841)
* lisp.h (invalidate_buffer_caches): Add prototype.
2013-11-17 Eli Zaretskii <>
* w32term.c (x_update_window_end): Don't invalidate the entire
mouse-highlight info, just signal frame_up_to_date_hook that mouse
highlight needs to be redisplayed. (Bug#15913)
2013-11-17 Paul Eggert <>
* lisp.h (DEBUGGER_SEES_C_MACROS): Remove.
2013-11-16 Eli Zaretskii <>
* doc.c (Fsubstitute_command_keys): Inhibit modification hooks
while we are using Vprin1_to_string_buffer.
* keymap.c (describe_map): Don't crash if PT is 1 both before and
after inserting the description string. (Bug#15907)
2013-11-15 Paul Eggert <>
* data.c: Work around bogus GCC diagnostic about shift count.
Reported by Eli Zaretskii in
(pre_value): New function.
(count_trailing_zero_bits): Use it.
2013-11-15 Eli Zaretskii <>
* lisp.h (DEBUGGER_SEES_C_MACROS) [GCC < v3.5]: Pessimistically
assume C macros are not supported even under -g3 in these old GCC
2013-11-15 Leo Liu <>
* minibuf.c (Ftry_completion, Fall_completions)
(Ftest_completion): Use FUNCTIONP. (Bug#15889)
2013-11-15 Paul Eggert <>
Define to empty if DEBUGGER_SEES_C_MACROS is defined.
This avoids placing unnecessary constants into the Emacs code.
2013-11-14 Kazuhiro Ito <> (tiny change)
* keyboard.c (make_ctrl_char) [HAVE_NTGUI]: Now externally visible
for Cygwin w32 build.
* xdisp.c (erase_phys_cursor) [HAVE_NTGUI]: Now externally visible
for Cygwin w32 build. (Bug#15892)
2013-11-14 Paul Eggert <>
Simplify, port and tune bool vector implementation.
* alloc.c (bool_vector_exact_payload_bytes)
(bool_vector_payload_bytes): Remove.
(bool_vector_fill): Return its argument.
* alloc.c (bool_vector_fill):
* lread.c (read1):
* print.c (print_object):
Simplify by using bool_vector_bytes.
* alloc.c (make_uninit_bool_vector):
New function, broken out from Fmake_bool_vector.
(Fmake_bool_vector): Use it. Use tail call.
(make_uninit_bool_vector, vector_nbytes): Simplify size calculations.
* data.c (BITS_PER_ULL): New constant.
(ULLONG_MAX, count_one_bits_ll): Fall back on long counterparts
if long long versions don't exist.
(shift_right_ull): New function.
(count_one_bits_word): New function, replacing popcount_bits_word
macro. Don't assume that bits_word is no wider than long long.
(count_one_bits_word, count_trailing_zero_bits):
Don't assume that bits_word is no wider than long long.
* data.c (bool_vector_binop_driver, bool_vector_not):
* fns.c (Fcopy_sequence):
* lread.c (read1):
Create an uninitialized destination, to avoid needless work.
(internal_equal): Simplify.
(Ffillarray): Prefer tail call.
* data.c (bool_vector_binop_driver): Don't assume bit vectors always
contain at least one word.
(bits_word_to_host_endian): Prefer if to #if. Don't assume
chars are narrower than ints.
* data.c (Fbool_vector_count_matches, Fbool_vector_count_matches_at):
* fns.c (Fcopy_sequence):
Simplify and tune.
* lisp.h (bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD):
Don't try to port to hosts where bits_word values have holes; the
code wouldn't work there anyway. Verify this assumption, though.
(bool_vector_bytes): New function.
(make_uninit_bool_vector): New decl.
(bool_vector_fill): Now returns Lisp_Object.
* xfns.c (xic_create_fontsetname):
* xrdb.c (gethomedir): Prefer tail calls.
2013-11-12 Paul Eggert <>
* xterm.c (syms_of_xterm): staticpro Qmodifier_value, Qalt, Qhyper,
Qmeta, and Qsuper. This is safer, and it's what w32fns.c does.
* buffer.c (Fforce_mode_line_update): Don't fall off end of function
that requires a return value.
(Fset_buffer_modified_p): Take advantage of this change to do
a tail call.
2013-11-11 Stefan Monnier <>
* buffer.c (Frestore_buffer_modified_p): Sync it with
(Fforce_mode_line_update): New function, moved from subr.el.
(Fset_buffer_modified_p): Use them.
(syms_of_buffer): Defsubr Fforce_mode_line_update.
2013-11-11 Paul Eggert <>
* search.c (find_newline): Rewrite to prefer offsets to pointers.
This avoids undefined behavior when subtracting pointers into
different aways. On my platform it also makes the code a tad
smaller and presumably faster.
2013-11-11 Stefan Monnier <>
* keyboard.c (command_loop_1): Use region-extract-function.
* insdel.c (Qregion_extract_function): Not static any more (can we
stop pretending that these vars can benefit from being marked static?).
2013-11-09 Eli Zaretskii <>
* search.c (find_newline): If buffer text is relocated during the
"dumb loop", adjust C pointers into buffer text to follow suit.
2013-11-09 Łukasz Stelmach <> (tiny change)
* gtkutil.c (xg_check_special_colors): Use rgb: instead of rgbi:
for conversion (Bug#15837).
2013-11-09 Eli Zaretskii <>
* fileio.c (Finsert_file_contents): Invalidate the newline cache
for the entire range of inserted characters. (Bug#15841)
2013-11-08 Jan Djärv <>
* xfaces.c (lface_fully_specified_p): Let distant-foreground be
(realize_default_face): Remove assignment to distant-foreground if
unspecified (Bug#15815).
2013-11-08 Eli Zaretskii <>
* xdisp.c (message_dolog): Make sure the *Messages* buffer has its
cache-long-scans disabled, since we don't want to call
prepare_to_modify_buffer (in insert_1_both) for each message we
* buffer.h (bset_cache_long_scans): New INLINE function, moved
from buffer.c. Improve commentary to the buffer field setter
* buffer.c (bset_cache_long_scans): Static function deleted.
Improve commentary to the buffer field setter functions.
(init_buffer_once): Default for cache-long-scans changed to t.
2013-11-08 Paul Eggert <>
* gmalloc.c (special_realloc, calloc, mallochook): Use tail calls.
* chartab.c (make_sub_char_table): Fix size typo (Bug#15825).
This bug was introduced in my 2013-06-21 change, and caused
struct Lisp_Sub_Char_Table objects to be given too many slots,
which broke 'make -C admin/unidata'.
2013-11-07 Jan Djärv <>
Import changes from mac-port 4.5.
* macfont.m (mac_font_copy_default_descriptors_for_language)
(mac_font_copy_default_name_for_charset_and_languages): Declare.
(cf_charset_table): big-5-0 has uniquifier 0x4EDC.
(macfont_language_default_font_names): New.
(macfont_list): Rearrange language/charset code.
(macfont_close): Don't check for macfont_info->cache.
(mac_ctfont_create_preferred_family_for_attributes): New font
selection code, call
(mac_font_copy_default_name_for_charset_and_languages): New functions.
* macfont.h (kCTVersionNumber10_9): Define if not defined.
2013-11-07 Paul Eggert <>
Port to C11 aligned_alloc, and fix some integer overflows.
* alloc.c (USE_ALIGNED_ALLOC): New symbol.
(USE_POSIX_MEMALIGN): Remove. All uses replaced with USE_ALIGNED_ALLOC,
and use of posix_memalign replaced with aligned_alloc.
(aligned_alloc): New function, defined or declared as needed.
Don't undef; now does this.
* gmalloc.c (aligned_alloc) [MSDOS]: New decl.
(calloc, aligned_alloc): Check for integer overflow.
(aligned_alloc): Rename from memalign. All uses changed.
(memalign): New function, an alias for aligned_alloc.
2013-11-06 Stefan Monnier <>
* xdisp.c (redisplay_internal): Fix typo in last change.
2013-11-06 Paul Eggert <>
* regex.c: Fix --enable-gcc-warning glitch with GCC 4.5.2.
2013-11-06 Stefan Monnier <>
* xdisp.c (syms_of_xdisp): New vars redisplay--all-windows-cause and
(redisplay_internal): Keep them uptodate. Remove redundant check of
* *.[chm]: Number every assignment to update_mode_lines so we
can track why it is set.
2013-11-06 Eli Zaretskii <>
* editfns.c (Fformat_time_string): Doc fix. (Bug#15816)
2013-11-06 Stefan Monnier <>
* *.[chm]: Number every assignment to windows_or_buffers_changed so we
can track why it is set.
2013-11-06 Paul Eggert <>
Integer-related fixes for term.c etc.
* dispextern.h (face_tty_specified_color): New function.
* term.c (turn_on_face): Don't rely on undefined behavior when
assigning an out-of-range value to 'long'.
Simplify test for toggling highlight.
(tty_capable_p): Omit last two (unused) args. All callers changed.
* term.c (tty_capable_p, tty_menu_display, tty_menu_add_selection)
(read_menu_input, tty_menu_activate, tty_menu_show):
* xfaces.c (x_supports_face_attributes_p)
Use bool for boolean. All callers changed.
(tty_supports_face_attributes_p): Omit defaults for color indices;
no longer needed. Simplify tail call.
2013-11-05 Stefan Monnier <>
* xdisp.c (prepare_menu_bars): Mark static.
* lisp.h (prepare_menu_bars): Don't declare.
* xselect.c (x_handle_selection_clear):
* callproc.c (call_process): Remove redundant call to prepare_menu_bars.
2013-11-05 Paul Eggert <>
* keyboard.c (Fcommand_error_default_function): Fix pointer signedness
glitch. Eliminate 'sz' prefix; Hungarian notation is not helpful here.
2013-11-05 Stefan Monnier <>
* keyboard.c (Fcommand_error_default_function): Rename from
2013-11-05 Jarek Czekalski <> (tiny change)
* keyboard.c (Fdefault_error_output): New function, extracted from
(syms_of_keyboard): Use it for Vcommand_error_function.
2013-11-05 Stefan Monnier <>
* eval.c (handlerlist_sentinel): New variable (bug#15802).
(init_eval): Use it to ensure handlerlist is non-NULL.
(unwind_to_catch): Make sure we never set handlerlist to NULL.
(Fsignal): Adjust NULLness test of handlerlist.
* lisp.h (PUSH_HANDLER): Assume handlerlist is non-NULL.
2013-11-05 Eli Zaretskii <>
* callproc.c (call_process): Call prepare_to_modify_buffer before
decoding text read from the sub-process, as the decoded stuff will
be inserted into the buffer. This will invalidate the various
caches maintained for the buffer. (Bug#15148)
2013-11-05 Xue Fuqiao <>
* xdisp.c (syms_of_xdisp): Mention the active display table in doc
string of glyphless-char-display.
2013-11-05 Jan Djärv <>
* nsfns.m (ns_get_name_from_ioreg): New function.
(ns_screen_name): Don't use deprecated CGDisplayIOServicePort on
OSX >= 10.9. Use ns_get_name_from_ioreg.
2013-11-05 Paul Eggert <>
Simplify and port recent bool vector changes.
* alloc.c (ROUNDUP): Move here from lisp.h, since it's now used
only in this file. Use a more-efficient implementation if the
second argument is a power of 2.
(ALIGN): Rewrite in terms of ROUNDUP. Make it a function.
Remove no-longer-necessary compile-time checks.
(bool_vector_exact_payload_bytes): New function.
(bool_vector_payload_bytes): Remove 2nd arg; callers that need
exact payload changed to call the new function. Do not assume
that the arg or result fits in ptrdiff_t.
(bool_vector_fill): New function.
(Fmake_bool_vector): Use it. Don't assume bit counts fit
in ptrdiff_t.
(vroundup_ct): Don't assume arg fits in size_t.
* category.c (SET_CATEGORY_SET): Remove. All callers now just
invoke set_category_set.
(set_category_set): 2nd arg is now EMACS_INT and 3rd is now bool.
All callers changed. Use bool_vector_set.
* category.h (XCATEGORY_SET): Remove; no longer needed.
(CATEGORY_MEMBER): Now a function. Rewrite in terms of
* data.c (Faref): Use bool_vector_ref.
(Faset): Use bool_vector_set.
(bits_word_to_host_endian): Don't assume you can shift by CHAR_BIT.
(Fbool_vector_not, Fbool_vector_count_matches)
(Fbool_vector_count_matches_at): Don't assume CHAR_BIT == 8.
* fns.c (concat): Use bool_vector_ref.
(Ffillarray): Use bool_vector_fill.
(mapcar1): Use bool_vector_ref.
(sxhash_bool_vector): Hash words, not bytes.
* lisp.h (BOOL_VECTOR_BITS_PER_CHAR): Now a macro as well as
a constant, since it's now used in #if.
(bits_word, BITS_WORD_MAX, BITS_PER_BITS_WORD): Fall back on
unsigned char on unusual architectures, so that we no longer
assume that the number of bits per bits_word is a power of two or
is a multiple of 8 or of CHAR_BIT.