textmodes/ispell.el: Look for aspell .dat files also under dict-dir, as aspell does.
Originally reported as http://bugs.debian.org/765349.
Noticed when aspell has different data-dir and dict-dir.
* textmodes/ispell.el (ispell-aspell-find-dictionary): Make sure
.dat files for aspell dicts are also searched for in location
described by `ispell-aspell-dict-dir', matching aspell's dict-dir
variable.
ispell.el: Extend to aspell current hunspell handling of aliases names for standard dicts.
Extend `ispell-hunspell-dictionary-equivs-alist' use to aspell, once
renamed to a more general `ispell-dicts-name2locale-equivs-alist' name.
Originally reported as http://bugs.debian.org/745613
* textmodes/ispell.el (ispell-dicts-name2locale-equivs-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries)
(ispell-set-spellchecker-params): New generic name for
`ispell-hunspell-dictionary-equivs-alist'.
(ispell-aspell-add-aliases): Also use
`ispell-dicts-name2locale-equivs-alist' to get aspell aliases for
standard dict names.
Eli Zaretskii [Sat, 28 Feb 2015 10:33:32 +0000 (12:33 +0200)]
Avoid assertion violations in Rmail due to newline cache
src/search.c (find_newline): Avoid assertion violations in
CHAR_TO_BYTE when a portion of the buffer was deleted and we look
for newlines near the end of the buffer. This happens in Rmail
hen JIT font-lock fontifies a newly displayed portion of the
buffer.
Juri Linkov [Thu, 19 Feb 2015 19:28:41 +0000 (21:28 +0200)]
* lisp/comint.el (comint-line-beginning-position): Revert searching for
the prompt when comint-use-prompt-regexp is non-nil because it
doesn't distinguish input from output. Check the field property
`output' for the case when comint-use-prompt-regexp is nil.
Improve string search in `flyspell-word-search-*`. (Bug#16800)
* flyspell.el (flyspell-duplicate-distance): Limit default search
distance for duplicated words to 40000.
(flyspell-word-search-backward, flyspell-word-search-forward):
Search as full word with defined casechars, not as substring.
Eli Zaretskii [Tue, 10 Feb 2015 16:26:23 +0000 (18:26 +0200)]
Fix invocation of commands whose file name includes extension (Bug#19817)
nt/cmdproxy.c (get_next_token): Don't make backslashes disappear
without a trace when they are not followed by a quote.
(search_dir): Support searching programs whose file name already
has an arbitrary extension.
(main): When passing a command line to the shell, use cmd.exe
rules for quoting command-line tail.
Juri Linkov [Tue, 10 Feb 2015 00:38:09 +0000 (02:38 +0200)]
Better support for the case of typing RET on the prompt in comint.
* lisp/comint.el (comint-get-old-input-default): Go to the field end
when comint-use-prompt-regexp is nil.
(comint-line-beginning-position): Check if point is already
on the prompt before searching for the prompt when
comint-use-prompt-regexp is non-nil.
Eli Zaretskii [Sun, 8 Feb 2015 16:17:40 +0000 (18:17 +0200)]
Fix handling of frame color parameters in TTY sessions (Bug#19802)
src/xfaces.c (map_tty_color): Use assoc_no_quit instead of
assq_no_quit to fetch color definition by its string name.
lisp/frame.el (frame-notice-user-settings): Refresh the value of
frame parameters after calling tty-handle-reverse-video. Call
face-set-after-frame-default with the actual parameters, to avoid
resetting colors back to unspecified.
(set-background-color, set-foreground-color): Pass the selected
color to face-set-after-frame-default.
Eli Zaretskii [Thu, 5 Feb 2015 17:07:15 +0000 (19:07 +0200)]
Fix vertical-motion and posn-at-point when word-wrap is on (Bug#19769)
src/xdisp.c (move_it_in_display_line_to): Handle the case where the
last character of a screen line is whitespace, and we are under
word-wrap with overflow-newline-into-fringe turned on.
Juri Linkov [Thu, 5 Feb 2015 00:52:41 +0000 (02:52 +0200)]
Better multi-line input support in comint.el
Revert the change of comint-line-beginning-position callers,
and modify comint-line-beginning-position instead.
* lisp/comint.el (comint-history-isearch-search)
(comint-history-isearch-message, comint-history-isearch-wrap):
Use comint-line-beginning-position instead of field-beginning.
(comint-send-input): Use either end-of-line or field-end
depending on comint-use-prompt-regexp.
(comint-line-beginning-position): Search backward
for comint-prompt-regexp if comint-use-prompt-regexp is non-nil.
Use field-beginning instead of line-beginning-position
if comint-use-prompt-regexp is nil.
Eli Zaretskii [Tue, 3 Feb 2015 18:52:18 +0000 (20:52 +0200)]
A more thorough fix for bug#19307
src/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
here.
(next_overlay_string): Set ignore_overlay_strings_at_pos_p here,
after we've exhausted all the overlay strings at the current
position.
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.