Eli Zaretskii [Mon, 2 Feb 2015 16:15:13 +0000 (18:15 +0200)]
Fix redrawing of mode lines when exposed (Bug#19721)
src/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.
src/xdisp.c (redisplay_window): Don't avoid redisplay of a window
whose update_mode_line flag is set.
Tassilo Horn [Thu, 29 Jan 2015 14:51:40 +0000 (15:51 +0100)]
Restore XEmacs compatibility
* textmodes/reftex-vars.el (featurep): Conditionalize value of
reftex-label-regexps in order to stay compatible with XEmacs 25
which has no explicitly numbered groups in regexps (bug#19714).
Eli Zaretskii [Wed, 28 Jan 2015 17:42:28 +0000 (19:42 +0200)]
Improve the fix for bug #19701
src/dired.c (directory_files_internal, file_name_completion)
[WINDOWSNT]: Signal an error when errno is set non-zero by
'readdir', regardless of its value.
src/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.
Tassilo Horn [Wed, 28 Jan 2015 09:32:50 +0000 (10:32 +0100)]
Fix issues with BibTeX entries containing ")".
* textmodes/reftex.el (reftex-syntax-table-for-bib): Give ( and )
punctuation syntax since to allow bibtex fields with values such
as {Test 1) and 2)} (bug#19205, bug#19707).
(reftex--prepare-syntax-tables): New function.
(reftex-mode): Use it.
Eli Zaretskii [Tue, 27 Jan 2015 19:02:13 +0000 (21:02 +0200)]
Signal a file-error from directory-files on MS-Windows (Bug#19701)
src/dired.c (directory_files_internal) [WINDOWSNT]: If readdir
returns NULL and errno is ENOTDIR, behave as if opendir failed to
open the directory.
src/w32.c (sys_readdir): If FindFirstFile fails because the
directory doesn't exist, set errno to ENOTDIR.
python.el: New non-global state dependent indentation engine.
Fixes: debbugs:18319 Fixes: debbugs:19595
* lisp/progmodes/python.el (python-syntax-comment-or-string-p): Accept
PPSS as argument.
(python-syntax-closing-paren-p): New function.
(python-indent-current-level)
(python-indent-levels): Mark obsolete.
(python-indent-context): Return more context cases.
(python-indent--calculate-indentation)
(python-indent--calculate-levels): New functions.
(python-indent-calculate-levels): Use them.
(python-indent-calculate-indentation, python-indent-line):
(python-indent-line-function): Rewritten to use new API.
(python-indent-dedent-line): Simplify logic.
(python-indent-dedent-line-backspace): Use `unless`.
(python-indent-toggle-levels): Delete function.
Daniel Koning [Wed, 21 Jan 2015 08:01:30 +0000 (09:01 +0100)]
Prevent artist-mode from creating runaway timers (Bug#6130).
* subr.el (posnp): Correct docstring of `posnp'.
(posn-col-row): Make it work with all mouse position objects.
* textmodes/artist.el (artist-mouse-draw-continously): Cancel
timers if an error occurs during continuous drawing. (Bug#6130)
* commands.texi (Drag Events, Motion Events, Event Examples)
(Accessing Mouse): Describe actual range of values that mouse
position objects can have.
configure.ac (HAVE_W32): Abort with error message if
--without-toolkit-scroll-bars was specified. See
http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00525.html
for the details.
Eli Zaretskii [Wed, 14 Jan 2015 18:14:02 +0000 (20:14 +0200)]
Fix support of non-ASCII frame titles on MS-Windows (Bug#19590)
src/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.
Juri Linkov [Mon, 29 Dec 2014 00:52:38 +0000 (02:52 +0200)]
More fixes to support multi-line search in comint
* lisp/comint.el (comint-history-isearch-message): Use field-beginning
instead of comint-line-beginning-position - that's more fixes for
http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00305.html
(comint-history-isearch-message): Fix args of isearch-message-prefix.
Juri Linkov [Fri, 5 Dec 2014 23:55:20 +0000 (01:55 +0200)]
Better support for multi-line shell input.
* lisp/comint.el (comint-history-isearch-search)
(comint-history-isearch-wrap): Use field-beginning instead of
comint-line-beginning-position.
(comint-send-input): Go to the end of the field instead of the end
of the line to accept whole multi-line input.
http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg00305.html
Eli Zaretskii [Thu, 8 Jan 2015 14:04:46 +0000 (16:04 +0200)]
Fix line-move-visual's following of column in R2L lines (backport from trunk).
src/simple.el (line-move-visual): When converting X pixel coordinate
to temporary-goal-column, adjust the value for right-to-left
screen lines. This fixes vertical-motion, next/prev-line, etc.
src/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.)
Eli Zaretskii [Mon, 5 Jan 2015 15:42:55 +0000 (17:42 +0200)]
Fix assertion violations in try_window_id (Bug#19511)
src/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.
Eli Zaretskii [Sun, 4 Jan 2015 18:30:16 +0000 (20:30 +0200)]
More doc fixes for bug#19502 -- make documentation less X-specific.
doc/lispref/frames.texi (Display Feature Testing): Make the description of
x-server-version and x-server-vendor less X-specific.
Make doc strings on X and w32 identical.
src/w32fns.c (Fx_server_version, Fx_server_vendor): Doc fix.
src/xfns.c (Fx_server_version, Fx_server_vendor): Doc fix.
Michael Albinus [Tue, 30 Dec 2014 11:45:48 +0000 (12:45 +0100)]
* automated/tramp-tests.el (tramp--test-smb-or-windows-nt-p):
New defun.
(tramp-test30-special-characters): Use it.
(tramp--test-check-files): Filter nil file names out.
Paul Eggert [Sun, 28 Dec 2014 07:44:25 +0000 (23:44 -0800)]
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:
http://lists.gnu.org/archive/html/emacs-devel/2014-12/msg02056.html
* src/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.
Eli Zaretskii [Sat, 27 Dec 2014 12:07:06 +0000 (14:07 +0200)]
Fix composition of characters from Syriac and Arabis scripts.
lisp/language/misc-lang.el (composition-function-table): Add Syriac
characters and also ZWJ/ZWNJ. See
http://lists.gnu.org/archive/html/help-gnu-emacs/2014-12/msg00248.html
for the details.
Eli Zaretskii [Thu, 25 Dec 2014 15:38:15 +0000 (17:38 +0200)]
Fix rendering of composed caharacters on the mode line. (Bug#19435)
src/xdisp.c (set_iterator_to_next) <GET_FROM_STRING>: Limit search in
composition_compute_stop_pos to the number of characters in the
string.
<GET_FROM_BUFFER, GET_FROM_STRING>: Simplify code.
src/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.
src/dispextern.h (struct it) <end_charpos>: Improve commentary.