(ispell-print-if-debug): Build `format' in. Avoid end-of-buffer.
(ispell-parse-hunspell-affix-file): Avoid beginning-of-buffer.
Use dict-key rather than dict-name for the error message.
* textmodes/ispell.el (ispell-find-hunspell-dictionaries):
Always expand affix-file before storing to protect against changed
`default-directory'.
(ispell-print-if-debug): Make sure message is printed at the end
of the debug buffer.
* textmodes/ispell.el (ispell-find-hunspell-dictionaries):
Ask hunspell about available and default dictionaries.
(ispell-parse-hunspell-affix-file): Extract relevant info from
hunspell affix file.
(ispell-hunspell-fill-dictionary-entry): Fill non-initialized
`ispell-dictionary-alist' entry for given dictionary after info
provided by `ispell-parse-hunspell-affix-file'.
(ispell-hunspell-dict-paths-alist): New defvar to contain an alist
of parsed hunspell dicts and associated affix files.
(ispell-hunspell-dictionary-alist): New defvar to contain an alist
of parsed hunspell dicts and associated parameters.
(ispell-set-spellchecker-params):
Call `ispell-find-hunspell-dictionaries' if hunspell and not
previously done.
(ispell-start-process):
Call `ispell-hunspell-fill-dictionary-entry' for current
dictionary if it is not initialized.
Some additional details about the implementation:
(ispell-hunspell-dict-paths-alist): Alist that contains a list of
parsed hunspell dicts and associated affix files.
(ispell-hunspell-dictionary-alist): Alist of parsed hunspell dicts and
associated parameters. It is initially just a list of found
dictionaries except for the default dictionary where is filled with
proper parameters.
When spellchecker is initialized by (ispell-set-spellchecker-params)
if the conditions: is hunspell, communication can be set to UTF-8 and
Emacs flavor supports [:alpha:] are matched installed hunspell
dictionaries are parsed and info passed to
`ispell-hunspell-dictionary-alist', either full for default dictionary
or just name for other dictionaries. These entries are used for
`ispell-dictionary-alist' if not overriden.
Before starting hunspell process in (ispell-start-process), if
`ispell-dictionary-alist' entry is not yet initialized
(ispell-hunspell-fill-dictionary-entry) is called to fill that entry
(and all pending entries using the same affix file) after info
extracted by (ispell-parse-hunspell-affix-file) from the associated
affix file.
hunspell process will then be started as usual. This delayed procedure
is used to avoid that in systems containing many hunspell dictionaries
all affix files are parsed (if there are many, time may be noticeable)
for just one used dictionary.
Set `isearch-lazy-highlight-start' and `isearch-lazy-highlight-end'
to `isearch-other-end' if it is not nil.
* lisp/replace.el (replace-highlight): Let-bind `isearch-other-end'
to `match-beg'.
* lisp/textmodes/ispell.el (ispell-highlight-spelling-error-overlay):
Let-bind `isearch-other-end' to `start', `isearch-forward' to t
and `isearch-error' to nil.
Fixes: debbugs:13402
(ispell-hunspell-dictionary-equivs-alist):
New variable to map standard dict names to hunspell ones.
(ispell-set-spellchecker-params):
Make sure specific dict names are used for standard dicts with hunspell.
If a mapping is missing, skip that dictionary.
Fixes: debbugs:13460
* lisp/progmodes/flymake.el (flymake-errline, flymake-warnline):
Use underline style wave on terminals that support it.
* src/xfaces.c (tty_supports_face_attributes_p): Return 0 for the case
of (supports :underline (:style wave)).
Fixes: debbugs:13000
(ispell-internal-change-dictionary):
Improve ispell process restart checks by using expanded values for ispell
personal dictionary and for related restart check.
(ispell-start-process):
* Remove apparently redundant code that seems better handled from
(ispell-internal-change-dictionary)
* No longer need to expand ispell personal dictionary, it is already
expanded.
Fixes: debbugs:13019
textmodes/ispell.el (ispell-init-process, ispell-start-process):
Make sure ispell personal dictionary name is expanded after initial
`default-directory' value (Bug#13019).
* textmodes/css-mode.el (css-current-defun-name): New function.
(css-mode): Use it.
* textmodes/sgml-mode.el (html-current-defun-name): New function.
(html-mode): Use it.
Suggested by Jari Aalto.
* lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): New.
(lisp-mode-variables): Use it.
* lisp/progmodes/cc-mode.el (c-common-init):
* lisp/progmodes/cperl-mode.el (cperl-mode): Set a value for
add-log-current-defun-function.
* lisp/progmodes/m4-mode.el (m4-current-defun-name): New function.
(m4-mode): Use it.
* lisp/progmodes/perl-mode.el (perl-current-defun-name): New.
(perl-mode): Use it.
* lisp/progmodes/scheme.el (scheme-mode-variables, dsssl-mode): Use
lisp-current-defun-name.
* lisp/textmodes/tex-mode.el (tex-current-defun-name): New.
(tex-common-initialization): Use it.
* lisp/textmodes/texinfo.el (texinfo-current-defun-name): New.
(texinfo-mode): Use it.
* lisp/vc/add-log.el (add-log-current-defun-function): Doc fix.
(add-log-current-defun): Move mode-specific code to other files.
(add-log-lisp-like-modes, add-log-c-like-modes)
(add-log-tex-like-modes): Variables deleted.
Fixes: debbugs:2224
* textmodes/reftex.el (reftex-section-pre-regexp, reftex-section-post-regexp, reftex-section-info-function): New variable. (reftex-compile-variables): Use variables reftex-section-pre-regexp, reftex-section-post-regexp, and reftex-section-info-function in order to be compatible with Texinfo integration.
* textmodes/reftex-toc.el (reftex-toc-promote-action): use reftex-section-pre-regexp variable in order to be compatible with Texinfo integration.
* lisp/faces.el (set-face-inverse-video, set-face-bold, set-face-italic):
Remove -p suffix from names, for consistency with other set-face-*.
(set-face-inverse-video): Fix interactive spec.
* lisp/play/gamegrid.el (gamegrid-make-mono-tty-face):
* lisp/textmodes/table.el (table--update-cell-face):
Use set-face-inverse-video rather than now obsolete alias.
* doc/lispref/display.texi (Attribute Functions):
Update for set-face-* name changes.
This commit changes some of the `in-comment' ocurrences to more specific
`add-comment', set only if comment prefix is to be added.
When in comment, old code prefixed string by comment string to let ispell
know this is part of a comment string.
This is only supported in some modes. In particular, this is not supported in
autoconf mode where adding the comment string messes everything up because
ispell tries to spellcheck the `dnl' string header causing misalignments in
some cases (debbugs.gnu.org: #12768).
* (ispell-create-debug-buffer): Create a `ispell-debug-buffer' debug
buffer for ispell.
* (ispell-print-if-debug): New function to print stuff to
`ispell-debug-buffer' if debugging is enabled.
* (ispell-region, ispell-process-line): Use `ispell-print-if-debug' to
show some debugging info.
* (ispell-buffer-with-debug): New function that creates a debugging
buffer and calls `ispell-buffer' with debugging enabled. This is also
en example of a possible way to use this system.