2016-04-18 12:27:58 -04:00
|
|
|
|
;;; ispell.el --- interface to International Ispell Versions 3.1 and 3.2 -*- lexical-binding:t -*-
|
1995-10-30 17:35:01 +00:00
|
|
|
|
|
2016-01-01 01:16:19 -08:00
|
|
|
|
;; Copyright (C) 1994-1995, 1997-2016 Free Software Foundation, Inc.
|
1995-10-30 17:35:01 +00:00
|
|
|
|
|
2001-07-16 12:23:00 +00:00
|
|
|
|
;; Author: Ken Stevens <k.stevens@ieee.org>
|
2000-01-10 12:06:33 +00:00
|
|
|
|
;; Status : Release with 3.1.12+ and 3.2.0+ ispell.
|
2000-05-25 18:14:12 +00:00
|
|
|
|
;; Keywords: unix wp
|
1995-10-30 17:35:01 +00:00
|
|
|
|
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
2008-05-06 04:34:22 +00:00
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 04:34:22 +00:00
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
1996-01-14 07:34:30 +00:00
|
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2008-05-06 04:34:22 +00:00
|
|
|
|
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
1996-01-14 07:34:30 +00:00
|
|
|
|
|
|
|
|
|
;; Note: version numbers and time stamp are not updated
|
2008-04-24 15:36:54 +00:00
|
|
|
|
;; when this file is edited for release with GNU Emacs.
|
1995-10-30 17:35:01 +00:00
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;; INSTRUCTIONS
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
1999-05-09 06:34:35 +00:00
|
|
|
|
;; This code contains a section of user-settable variables that you
|
|
|
|
|
;; should inspect prior to installation. Look past the end of the history
|
|
|
|
|
;; list. Set them up for your locale and the preferences of the majority
|
|
|
|
|
;; of the users. Otherwise the users may need to set a number of variables
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;; themselves.
|
1999-05-09 06:34:35 +00:00
|
|
|
|
;; You particularly may want to change the default dictionary for your
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;; country and language.
|
1999-05-09 06:34:35 +00:00
|
|
|
|
;; Most dictionary changes should be made in this file so all users can
|
|
|
|
|
;; enjoy them. Local or modified dictionaries are supported in your .emacs
|
2005-01-31 11:54:36 +00:00
|
|
|
|
;; file. Use the variable `ispell-local-dictionary-alist' to specify
|
|
|
|
|
;; your own dictionaries.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;; Depending on the mail system you use, you may want to include these:
|
2016-04-18 12:27:58 -04:00
|
|
|
|
;; (add-hook 'news-inews-hook #'ispell-message)
|
|
|
|
|
;; (add-hook 'mail-send-hook #'ispell-message)
|
|
|
|
|
;; (add-hook 'mh-before-send-letter-hook #'ispell-message)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
1999-05-09 06:34:35 +00:00
|
|
|
|
;; Ispell has a TeX parser and a nroff parser (the default).
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;; The parsing is controlled by the variable ispell-parser. Currently
|
|
|
|
|
;; it is just a "toggle" between TeX and nroff, but if more parsers are
|
|
|
|
|
;; added it will be updated. See the variable description for more info.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
|
|
|
|
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;; TABLE OF CONTENTS
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;; ispell-word
|
|
|
|
|
;; ispell-region
|
|
|
|
|
;; ispell-buffer
|
|
|
|
|
;; ispell-message
|
1997-12-03 17:20:13 +00:00
|
|
|
|
;; ispell-comments-and-strings
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;; ispell-continue
|
|
|
|
|
;; ispell-complete-word
|
|
|
|
|
;; ispell-complete-word-interior-frag
|
|
|
|
|
;; ispell-change-dictionary
|
|
|
|
|
;; ispell-kill-ispell
|
|
|
|
|
;; ispell-pdict-save
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; ispell-skip-region-alist
|
|
|
|
|
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;; Commands in ispell-region:
|
|
|
|
|
;; Character replacement: Replace word with choice. May query-replace.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; ` ': Accept word this time.
|
|
|
|
|
;; `i': Accept word and insert into private dictionary.
|
|
|
|
|
;; `a': Accept word for this session.
|
|
|
|
|
;; `A': Accept word and place in buffer-local dictionary.
|
|
|
|
|
;; `r': Replace word with typed-in value. Rechecked.
|
|
|
|
|
;; `R': Replace word with typed-in value. Query-replaced in buffer. Rechecked.
|
|
|
|
|
;; `?': Show these commands
|
|
|
|
|
;; `x': Exit spelling buffer. Move cursor to original point.
|
|
|
|
|
;; `X': Exit spelling buffer. Leaves cursor at the current point, and permits
|
|
|
|
|
;; the check to be completed later.
|
|
|
|
|
;; `q': Quit spelling session (Kills ispell process).
|
|
|
|
|
;; `l': Look up typed-in replacement in alternate dictionary. Wildcards okay.
|
|
|
|
|
;; `u': Like `i', but the word is lower-cased first.
|
|
|
|
|
;; `m': Place entered value in personal dictionary, then recheck current word.
|
|
|
|
|
;; `C-l': redraws screen
|
|
|
|
|
;; `C-r': recursive edit
|
2008-04-24 15:36:54 +00:00
|
|
|
|
;; `C-z': suspend Emacs or iconify frame
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;; Buffer-Local features:
|
|
|
|
|
;; There are a number of buffer-local features that can be used to customize
|
|
|
|
|
;; ispell for the current buffer. This includes language dictionaries,
|
|
|
|
|
;; personal dictionaries, parsing, and local word spellings. Each of these
|
|
|
|
|
;; local customizations are done either through local variables, or by
|
|
|
|
|
;; including the keyword and argument(s) at the end of the buffer (usually
|
|
|
|
|
;; prefixed by the comment characters). See the end of this file for
|
|
|
|
|
;; examples. The local keywords and variables are:
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;; ispell-dictionary-keyword language-dictionary
|
|
|
|
|
;; uses local variable ispell-local-dictionary
|
|
|
|
|
;; ispell-pdict-keyword personal-dictionary
|
|
|
|
|
;; uses local variable ispell-local-pdict
|
|
|
|
|
;; ispell-parsing-keyword mode-arg extended-char-arg
|
|
|
|
|
;; ispell-words-keyword any number of local word spellings
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
|
|
|
|
;; Region skipping:
|
|
|
|
|
;; Place new regular expression definitions of regions you prefer not to
|
|
|
|
|
;; spell check in `ispell-skip-region-alist'. Mode-dependent features can
|
|
|
|
|
;; be added to latex by modifying `ispell-tex-skip-alists'.
|
|
|
|
|
;; `ispell-message' contains some custom skipping code for e-mail messages.
|
|
|
|
|
|
1996-01-14 07:34:30 +00:00
|
|
|
|
;; BUGS:
|
2000-01-10 12:06:33 +00:00
|
|
|
|
;; Need a way to select between different character mappings without separate
|
|
|
|
|
;; dictionary entries.
|
|
|
|
|
;; Multi-byte characters if not defined by current dictionary may result in the
|
2008-04-24 15:36:54 +00:00
|
|
|
|
;; evil "misalignment error" in some versions of MULE Emacs.
|
|
|
|
|
;; On some versions of Emacs, growing the minibuffer fails.
|
1999-05-09 06:34:35 +00:00
|
|
|
|
;; see `ispell-help-in-bufferp'.
|
2000-01-10 12:06:33 +00:00
|
|
|
|
;; Recursive edits (?C-r or ?R) inside a keyboard text replacement check (?r)
|
|
|
|
|
;; can cause misalignment errors.
|
1999-05-09 06:34:35 +00:00
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
;;; Code:
|
|
|
|
|
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(eval-when-compile (require 'cl-lib))
|
|
|
|
|
|
2005-08-31 10:26:26 +00:00
|
|
|
|
(defvar mail-yank-prefix)
|
|
|
|
|
|
2002-11-17 22:34:13 +00:00
|
|
|
|
(defgroup ispell nil
|
2006-11-06 02:23:12 +00:00
|
|
|
|
"User variables for Emacs ispell interface."
|
2002-11-17 22:34:13 +00:00
|
|
|
|
:group 'applications)
|
1997-04-11 01:37:50 +00:00
|
|
|
|
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(defalias 'check-ispell-version 'ispell-check-version)
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;;; **********************************************************************
|
|
|
|
|
;;; The following variables should be set according to personal preference
|
|
|
|
|
;;; and location of binaries:
|
|
|
|
|
;;; **********************************************************************
|
|
|
|
|
|
|
|
|
|
|
1999-05-09 06:34:35 +00:00
|
|
|
|
;;; ******* THIS FILE IS WRITTEN FOR ISPELL VERSION 3.1+
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
|
|
|
|
(defcustom ispell-highlight-p 'block
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Highlight spelling errors when non-nil.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
When set to `block', assumes a block cursor with TTY displays."
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
:type '(choice (const block) (const :tag "off" nil) (const :tag "on" t))
|
1997-04-11 01:37:50 +00:00
|
|
|
|
:group 'ispell)
|
|
|
|
|
|
2005-03-18 10:01:12 +00:00
|
|
|
|
(defcustom ispell-lazy-highlight (boundp 'lazy-highlight-cleanup)
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Controls the lazy-highlighting of spelling errors.
|
2005-03-18 10:01:12 +00:00
|
|
|
|
When non-nil, all text in the buffer matching the current spelling
|
|
|
|
|
error is highlighted lazily using isearch lazy highlighting (see
|
|
|
|
|
`lazy-highlight-initial-delay' and `lazy-highlight-interval')."
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'lazy-highlight
|
|
|
|
|
:group 'ispell
|
|
|
|
|
:version "22.1")
|
|
|
|
|
|
|
|
|
|
(defcustom ispell-highlight-face (if ispell-lazy-highlight 'isearch 'highlight)
|
2012-06-02 18:56:09 +08:00
|
|
|
|
"Face used for Ispell highlighting.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
This variable can be set by the user to whatever face they desire.
|
|
|
|
|
It's most convenient if the cursor color and highlight color are
|
1997-04-11 01:37:50 +00:00
|
|
|
|
slightly different."
|
|
|
|
|
:type 'face
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1997-04-11 01:37:50 +00:00
|
|
|
|
(defcustom ispell-check-comments t
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Spelling of comments checked when non-nil.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
When set to `exclusive', ONLY comments are checked. (For code comments).
|
|
|
|
|
Warning! Not checking comments, when a comment start is embedded in strings,
|
|
|
|
|
may produce undesired results."
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
:type '(choice (const exclusive) (const :tag "off" nil) (const :tag "on" t))
|
1997-04-11 01:37:50 +00:00
|
|
|
|
:group 'ispell)
|
2010-09-04 20:47:29 +02:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(put 'ispell-check-comments 'safe-local-variable
|
|
|
|
|
(lambda (a) (memq a '(nil t exclusive))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1997-04-11 01:37:50 +00:00
|
|
|
|
(defcustom ispell-query-replace-choices nil
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Corrections made throughout region when non-nil.
|
1997-04-11 01:37:50 +00:00
|
|
|
|
Uses `query-replace' (\\[query-replace]) for corrections."
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1997-04-11 01:37:50 +00:00
|
|
|
|
(defcustom ispell-skip-tib nil
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Does not spell check `tib' bibliography references when non-nil.
|
1994-05-21 07:38:10 +00:00
|
|
|
|
Skips any text between strings matching regular expressions
|
1994-05-21 08:04:20 +00:00
|
|
|
|
`ispell-tib-ref-beginning' and `ispell-tib-ref-end'.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
TeX users beware: Any text between [. and .] will be skipped -- even if
|
|
|
|
|
that's your whole buffer -- unless you set `ispell-skip-tib' to nil.
|
|
|
|
|
That includes the [.5mm] type of number..."
|
1997-04-11 01:37:50 +00:00
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
(defvar ispell-tib-ref-beginning "[[<]\\."
|
|
|
|
|
"Regexp matching the beginning of a Tib reference.")
|
|
|
|
|
|
|
|
|
|
(defvar ispell-tib-ref-end "\\.[]>]"
|
|
|
|
|
"Regexp matching the end of a Tib reference.")
|
|
|
|
|
|
1997-04-11 01:37:50 +00:00
|
|
|
|
(defcustom ispell-keep-choices-win t
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"If non-nil, keep the `*Choices*' window for the entire spelling session.
|
1997-04-11 01:37:50 +00:00
|
|
|
|
This minimizes redisplay thrashing."
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2000-10-20 12:23:37 +00:00
|
|
|
|
(defcustom ispell-choices-win-default-height 2
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"The default size of the `*Choices*' window, including the mode line.
|
2000-10-20 12:23:37 +00:00
|
|
|
|
Must be greater than 1."
|
1997-04-11 01:37:50 +00:00
|
|
|
|
:type 'integer
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2005-05-07 16:06:07 +00:00
|
|
|
|
(defcustom ispell-program-name
|
2012-05-18 15:04:07 -04:00
|
|
|
|
(or (executable-find "aspell")
|
|
|
|
|
(executable-find "ispell")
|
|
|
|
|
(executable-find "hunspell")
|
2005-05-07 16:06:07 +00:00
|
|
|
|
"ispell")
|
1997-04-11 01:37:50 +00:00
|
|
|
|
"Program invoked by \\[ispell-word] and \\[ispell-region] commands."
|
|
|
|
|
:type 'string
|
2012-11-05 17:32:35 +01:00
|
|
|
|
:set (lambda (symbol value)
|
|
|
|
|
(set-default symbol value)
|
|
|
|
|
(if (featurep 'ispell)
|
|
|
|
|
(ispell-set-spellchecker-params)))
|
1997-04-11 01:37:50 +00:00
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1997-04-11 01:37:50 +00:00
|
|
|
|
(defcustom ispell-alternate-dictionary
|
2010-07-07 12:30:57 +02:00
|
|
|
|
(cond ((file-readable-p "/usr/dict/web2") "/usr/dict/web2")
|
|
|
|
|
((file-readable-p "/usr/share/dict/web2") "/usr/share/dict/web2")
|
|
|
|
|
((file-readable-p "/usr/dict/words") "/usr/dict/words")
|
|
|
|
|
((file-readable-p "/usr/lib/dict/words") "/usr/lib/dict/words")
|
|
|
|
|
((file-readable-p "/usr/share/dict/words") "/usr/share/dict/words")
|
|
|
|
|
((file-readable-p "/usr/share/lib/dict/words")
|
2001-08-01 15:29:35 +00:00
|
|
|
|
"/usr/share/lib/dict/words")
|
2010-07-07 12:30:57 +02:00
|
|
|
|
((file-readable-p "/sys/dict") "/sys/dict"))
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Alternate plain word-list dictionary for spelling help."
|
1999-05-31 14:47:33 +00:00
|
|
|
|
:type '(choice file (const :tag "None" nil))
|
1997-04-11 01:37:50 +00:00
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2010-07-07 12:30:57 +02:00
|
|
|
|
(defcustom ispell-complete-word-dict nil
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Plain word-list dictionary used for word completion if
|
2010-07-07 12:30:57 +02:00
|
|
|
|
different from `ispell-alternate-dictionary'."
|
1999-05-31 14:47:33 +00:00
|
|
|
|
:type '(choice file (const :tag "None" nil))
|
1997-04-11 01:37:50 +00:00
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(defcustom ispell-message-dictionary-alist nil
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"List used by `ispell-message' to select a new dictionary.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
It consists of pairs (REGEXP . DICTIONARY). If REGEXP is found
|
|
|
|
|
in the message headers, `ispell-local-dictionary' will be set to
|
|
|
|
|
DICTIONARY if `ispell-local-dictionary' is not buffer-local.
|
|
|
|
|
E.g. you may use the following value:
|
2015-09-03 15:31:12 -07:00
|
|
|
|
((\"^Newsgroups:[ \\t]*de\\\\.\" . \"deutsch8\")
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(\"^To:[^\\n,]+\\\\.de[ \\t\\n,>]\" . \"deutsch8\"))"
|
|
|
|
|
:type '(repeat (cons regexp string))
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(defcustom ispell-message-fcc-skip 50000
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Query before saving Fcc message copy if attachment larger than this value.
|
2003-05-22 21:34:00 +00:00
|
|
|
|
Always stores Fcc copy of message when nil."
|
|
|
|
|
:type '(choice integer (const :tag "off" nil))
|
|
|
|
|
:group 'ispell)
|
|
|
|
|
|
|
|
|
|
|
2007-12-29 12:41:44 +00:00
|
|
|
|
(defcustom ispell-grep-command
|
2016-05-07 18:40:10 -07:00
|
|
|
|
"grep"
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
"Name of the grep command for search processes."
|
|
|
|
|
:type 'string
|
|
|
|
|
:group 'ispell)
|
|
|
|
|
|
2007-12-29 12:41:44 +00:00
|
|
|
|
(defcustom ispell-grep-options
|
2016-05-07 18:40:10 -07:00
|
|
|
|
"-Ei"
|
1994-05-21 08:04:20 +00:00
|
|
|
|
"String of options to use when running the program in `ispell-grep-command'.
|
2016-05-07 18:40:10 -07:00
|
|
|
|
Should probably be \"-Ei\"."
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
:type 'string
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(defcustom ispell-look-command
|
|
|
|
|
(cond ((file-exists-p "/bin/look") "/bin/look")
|
|
|
|
|
((file-exists-p "/usr/local/bin/look") "/usr/local/bin/look")
|
|
|
|
|
((file-exists-p "/usr/bin/look") "/usr/bin/look")
|
|
|
|
|
(t "look"))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
"Name of the look command for search processes.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
This must be an absolute file name."
|
|
|
|
|
:type 'file
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1997-04-11 01:37:50 +00:00
|
|
|
|
(defcustom ispell-look-p (file-exists-p ispell-look-command)
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Non-nil means use `look' rather than `grep'.
|
1997-04-11 01:37:50 +00:00
|
|
|
|
Default is based on whether `look' seems to be available."
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1997-04-11 01:37:50 +00:00
|
|
|
|
(defcustom ispell-have-new-look nil
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Non-nil means use the `-r' option (regexp) when running `look'."
|
1997-04-11 01:37:50 +00:00
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(defcustom ispell-look-options (if ispell-have-new-look "-dfr" "-df")
|
|
|
|
|
"String of command options for `ispell-look-command'."
|
|
|
|
|
:type 'string
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(defcustom ispell-use-ptys-p nil
|
1994-05-21 08:04:20 +00:00
|
|
|
|
"When non-nil, Emacs uses ptys to communicate with Ispell.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
When nil, Emacs uses pipes."
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1997-04-11 01:37:50 +00:00
|
|
|
|
(defcustom ispell-following-word nil
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Non-nil means `ispell-word' checks the word around or after point.
|
1997-04-11 01:37:50 +00:00
|
|
|
|
Otherwise `ispell-word' checks the preceding word."
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1997-04-11 01:37:50 +00:00
|
|
|
|
(defcustom ispell-help-in-bufferp nil
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Non-nil means display interactive keymap help in a buffer.
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
The following values are supported:
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
nil Expand the minibuffer and display a short help message
|
|
|
|
|
there for a couple of seconds.
|
|
|
|
|
t Pop up a new buffer and display a short help message there
|
|
|
|
|
for a couple of seconds.
|
2000-08-17 20:54:01 +00:00
|
|
|
|
electric Pop up a new buffer and display a long help message there.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
User can browse and then exit the help mode."
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
:type '(choice (const electric) (const :tag "off" nil) (const :tag "on" t))
|
1997-04-11 01:37:50 +00:00
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1997-04-11 01:37:50 +00:00
|
|
|
|
(defcustom ispell-quietly nil
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Non-nil means suppress messages in `ispell-word'."
|
1997-04-11 01:37:50 +00:00
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2006-05-21 20:25:43 +00:00
|
|
|
|
(defcustom ispell-format-word-function (function upcase)
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Formatting function for displaying word being spell checked.
|
1997-04-11 01:37:50 +00:00
|
|
|
|
The function must take one string argument and return a string."
|
|
|
|
|
:type 'function
|
|
|
|
|
:group 'ispell)
|
2006-05-21 20:25:43 +00:00
|
|
|
|
(defvaralias 'ispell-format-word 'ispell-format-word-function)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(defcustom ispell-use-framepop-p nil
|
|
|
|
|
"When non-nil ispell uses framepop to display choices in a dedicated frame.
|
|
|
|
|
You can set this variable to dynamically use framepop if you are in a
|
|
|
|
|
window system by evaluating the following on startup to set this variable:
|
2015-09-03 15:31:12 -07:00
|
|
|
|
(and window-system (condition-case () (require \\='framepop) (error nil)))"
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'ispell)
|
|
|
|
|
|
1995-06-16 16:25:07 +00:00
|
|
|
|
;;;###autoload
|
1997-04-11 01:37:50 +00:00
|
|
|
|
(defcustom ispell-personal-dictionary nil
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"File name of your personal spelling dictionary, or nil.
|
2016-12-04 13:55:31 +00:00
|
|
|
|
If nil, the default personal dictionary for your spelling checker is used."
|
1997-09-09 02:56:16 +00:00
|
|
|
|
:type '(choice file
|
|
|
|
|
(const :tag "default" nil))
|
1997-04-11 01:37:50 +00:00
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1997-04-11 01:37:50 +00:00
|
|
|
|
(defcustom ispell-silently-savep nil
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"When non-nil, save personal dictionary without asking for confirmation."
|
1997-04-11 01:37:50 +00:00
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'ispell)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2005-01-31 11:54:36 +00:00
|
|
|
|
(defvar ispell-local-dictionary-overridden nil
|
|
|
|
|
"Non-nil means the user has explicitly set this buffer's Ispell dictionary.")
|
2005-10-23 18:22:06 +00:00
|
|
|
|
(make-variable-buffer-local 'ispell-local-dictionary-overridden)
|
2005-01-31 11:54:36 +00:00
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(defcustom ispell-local-dictionary nil
|
2005-01-31 11:54:36 +00:00
|
|
|
|
"If non-nil, the dictionary to be used for Ispell commands in this buffer.
|
|
|
|
|
The value must be a string dictionary name,
|
|
|
|
|
or nil, which means use the global setting in `ispell-dictionary'.
|
|
|
|
|
Dictionary names are defined in `ispell-local-dictionary-alist'
|
2009-06-23 07:38:25 +00:00
|
|
|
|
and `ispell-dictionary-alist'.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
Setting `ispell-local-dictionary' to a value has the same effect as
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
calling \\[ispell-change-dictionary] with that value. This variable
|
|
|
|
|
is automatically set when defined in the file with either
|
2005-01-31 11:54:36 +00:00
|
|
|
|
`ispell-dictionary-keyword' or the Local Variable syntax."
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
:type '(choice string
|
|
|
|
|
(const :tag "default" nil))
|
|
|
|
|
:group 'ispell)
|
2010-09-04 20:47:29 +02:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(put 'ispell-local-dictionary 'safe-local-variable 'string-or-null-p)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
|
|
|
|
(make-variable-buffer-local 'ispell-local-dictionary)
|
|
|
|
|
|
2009-06-09 13:21:34 +00:00
|
|
|
|
(defcustom ispell-dictionary nil
|
|
|
|
|
"Default dictionary to use if `ispell-local-dictionary' is nil."
|
|
|
|
|
:type '(choice string
|
|
|
|
|
(const :tag "default" nil))
|
|
|
|
|
:group 'ispell)
|
|
|
|
|
|
1997-04-11 01:37:50 +00:00
|
|
|
|
(defcustom ispell-extra-args nil
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"If non-nil, a list of extra switches to pass to the Ispell program.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
For example, (\"-W\" \"3\") to cause it to accept all 1-3 character
|
1994-05-21 07:38:10 +00:00
|
|
|
|
words as correct. See also `ispell-dictionary-alist', which may be used
|
1997-04-11 01:37:50 +00:00
|
|
|
|
for language-specific arguments."
|
|
|
|
|
:type '(repeat string)
|
|
|
|
|
:group 'ispell)
|
1994-05-21 07:38:10 +00:00
|
|
|
|
|
1999-05-09 06:34:35 +00:00
|
|
|
|
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
|
2000-08-17 20:54:01 +00:00
|
|
|
|
(defcustom ispell-skip-html 'use-mode-name
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Indicates whether ispell should skip spell checking of SGML markup.
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
If t, always skip SGML markup; if nil, never skip; if non-t and non-nil,
|
|
|
|
|
guess whether SGML markup should be skipped according to the name of the
|
|
|
|
|
buffer's major mode."
|
|
|
|
|
:type '(choice (const :tag "always" t) (const :tag "never" nil)
|
|
|
|
|
(const :tag "use-mode-name" use-mode-name))
|
|
|
|
|
:group 'ispell)
|
|
|
|
|
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(make-variable-buffer-local 'ispell-skip-html)
|
|
|
|
|
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
|
1999-05-09 06:34:35 +00:00
|
|
|
|
(defcustom ispell-local-dictionary-alist nil
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"List of local or customized dictionary definitions.
|
2005-01-31 11:54:36 +00:00
|
|
|
|
These can override the values in `ispell-dictionary-alist'.
|
2003-05-22 21:34:00 +00:00
|
|
|
|
|
2005-01-31 11:54:36 +00:00
|
|
|
|
To make permanent changes to your dictionary definitions, you
|
|
|
|
|
will need to make your changes in this variable, save, and then
|
2006-11-06 02:23:12 +00:00
|
|
|
|
re-start Emacs."
|
1999-05-09 06:34:35 +00:00
|
|
|
|
:type '(repeat (list (choice :tag "Dictionary"
|
|
|
|
|
(string :tag "Dictionary name")
|
|
|
|
|
(const :tag "default" nil))
|
|
|
|
|
(regexp :tag "Case characters")
|
|
|
|
|
(regexp :tag "Non case characters")
|
|
|
|
|
(regexp :tag "Other characters")
|
|
|
|
|
(boolean :tag "Many other characters")
|
|
|
|
|
(repeat :tag "Ispell command line args"
|
|
|
|
|
(string :tag "Arg"))
|
|
|
|
|
(choice :tag "Extended character mode"
|
|
|
|
|
(const "~tex") (const "~plaintex")
|
|
|
|
|
(const "~nroff") (const "~list")
|
2000-08-17 20:54:01 +00:00
|
|
|
|
(const "~latin1") (const "~latin3")
|
1999-05-09 06:34:35 +00:00
|
|
|
|
(const :tag "default" nil))
|
2006-02-17 11:13:26 +00:00
|
|
|
|
(coding-system :tag "Coding System")))
|
1999-05-09 06:34:35 +00:00
|
|
|
|
:group 'ispell)
|
|
|
|
|
|
|
|
|
|
|
2008-04-24 15:36:54 +00:00
|
|
|
|
(defvar ispell-dictionary-base-alist
|
2012-04-16 19:32:02 +02:00
|
|
|
|
'((nil ; default
|
2008-11-18 21:42:17 +00:00
|
|
|
|
;; The default dictionary. It may be English.aff, or any other
|
|
|
|
|
;; dictionary depending on locale and such things. We should probably
|
|
|
|
|
;; ask ispell what dictionary it's using, but until we do that, let's
|
2012-04-16 19:32:02 +02:00
|
|
|
|
;; just use a minimal regexp. [:alpha:] will later be set if possible.
|
|
|
|
|
"[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)
|
2008-04-24 15:36:54 +00:00
|
|
|
|
("american" ; Yankee English
|
|
|
|
|
"[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)
|
|
|
|
|
("brasileiro" ; Brazilian mode
|
|
|
|
|
"[A-Z\301\311\315\323\332\300\310\314\322\331\303\325\307\334\302\312\324a-z\341\351\355\363\372\340\350\354\362\371\343\365\347\374\342\352\364]"
|
|
|
|
|
"[^A-Z\301\311\315\323\332\300\310\314\322\331\303\325\307\334\302\312\324a-z\341\351\355\363\372\340\350\354\362\371\343\365\347\374\342\352\364]"
|
|
|
|
|
"[']" nil nil nil iso-8859-1)
|
|
|
|
|
("british" ; British version
|
|
|
|
|
"[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)
|
|
|
|
|
("castellano" ; Spanish mode
|
|
|
|
|
"[A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]"
|
|
|
|
|
"[^A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]"
|
|
|
|
|
"[-]" nil ("-B") "~tex" iso-8859-1)
|
|
|
|
|
("castellano8" ; 8 bit Spanish mode
|
|
|
|
|
"[A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]"
|
|
|
|
|
"[^A-Z\301\311\315\321\323\332\334a-z\341\351\355\361\363\372\374]"
|
|
|
|
|
"[-]" nil ("-B" "-d" "castellano") "~latin1" iso-8859-1)
|
|
|
|
|
("czech"
|
|
|
|
|
"[A-Za-z\301\311\314\315\323\332\331\335\256\251\310\330\317\253\322\341\351\354\355\363\372\371\375\276\271\350\370\357\273\362]"
|
|
|
|
|
"[^A-Za-z\301\311\314\315\323\332\331\335\256\251\310\330\317\253\322\341\351\354\355\363\372\371\375\276\271\350\370\357\273\362]"
|
|
|
|
|
"" nil ("-B") nil iso-8859-2)
|
|
|
|
|
("dansk" ; Dansk.aff
|
|
|
|
|
"[A-Z\306\330\305a-z\346\370\345]" "[^A-Z\306\330\305a-z\346\370\345]"
|
|
|
|
|
"[']" nil ("-C") nil iso-8859-1)
|
|
|
|
|
("deutsch" ; Deutsch.aff
|
|
|
|
|
"[a-zA-Z\"]" "[^a-zA-Z\"]" "[']" t ("-C") "~tex" iso-8859-1)
|
|
|
|
|
("deutsch8"
|
|
|
|
|
"[a-zA-Z\304\326\334\344\366\337\374]"
|
|
|
|
|
"[^a-zA-Z\304\326\334\344\366\337\374]"
|
|
|
|
|
"[']" t ("-C" "-d" "deutsch") "~latin1" iso-8859-1)
|
|
|
|
|
("english" ; make English explicitly selectable
|
|
|
|
|
"[A-Za-z]" "[^A-Za-z]" "[']" nil ("-B") nil iso-8859-1)
|
|
|
|
|
("esperanto"
|
|
|
|
|
"[A-Za-z\246\254\266\274\306\330\335\336\346\370\375\376]"
|
|
|
|
|
"[^A-Za-z\246\254\266\274\306\330\335\336\346\370\375\376]"
|
|
|
|
|
"[-']" t ("-C") "~latin3" iso-8859-3)
|
|
|
|
|
("esperanto-tex"
|
|
|
|
|
"[A-Za-z^\\]" "[^A-Za-z^\\]"
|
|
|
|
|
"[-'`\"]" t ("-C" "-d" "esperanto") "~tex" iso-8859-3)
|
2009-10-23 16:01:19 +00:00
|
|
|
|
("finnish"
|
|
|
|
|
"[A-Za-z\345\344\366\305\304\326]"
|
|
|
|
|
"[^A-Za-z\345\344\366\305\304\326]"
|
|
|
|
|
"[:]" nil ("-C") "~list" iso-8859-1)
|
2008-04-24 15:36:54 +00:00
|
|
|
|
("francais7"
|
|
|
|
|
"[A-Za-z]" "[^A-Za-z]" "[`'^-]" t nil nil iso-8859-1)
|
|
|
|
|
("francais" ; Francais.aff
|
|
|
|
|
"[A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374]"
|
|
|
|
|
"[^A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374]"
|
|
|
|
|
"[-'.@]" t nil "~list" iso-8859-1)
|
|
|
|
|
("francais-tex" ; Francais.aff
|
|
|
|
|
"[A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374\\]"
|
|
|
|
|
"[^A-Za-z\300\302\306\307\310\311\312\313\316\317\324\331\333\334\340\342\347\350\351\352\353\356\357\364\371\373\374\\]"
|
|
|
|
|
"[-'^`\".@]" t nil "~tex" iso-8859-1)
|
|
|
|
|
("german" ; german.aff
|
|
|
|
|
"[a-zA-Z\"]" "[^a-zA-Z\"]" "[']" t ("-C") "~tex" iso-8859-1)
|
|
|
|
|
("german8" ; german.aff
|
|
|
|
|
"[a-zA-Z\304\326\334\344\366\337\374]"
|
|
|
|
|
"[^a-zA-Z\304\326\334\344\366\337\374]"
|
|
|
|
|
"[']" t ("-C" "-d" "german") "~latin1" iso-8859-1)
|
|
|
|
|
("italiano" ; Italian.aff
|
|
|
|
|
"[A-Z\300\301\310\311\314\315\322\323\331\332a-z\340\341\350\351\354\355\363\371\372]"
|
|
|
|
|
"[^A-Z\300\301\310\311\314\315\322\323\331\332a-z\340\341\350\351\354\355\363\371\372]"
|
|
|
|
|
"[-.]" nil ("-B" "-d" "italian") "~tex" iso-8859-1)
|
|
|
|
|
("nederlands" ; Nederlands.aff
|
|
|
|
|
"[A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]"
|
|
|
|
|
"[^A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]"
|
|
|
|
|
"[']" t ("-C") nil iso-8859-1)
|
|
|
|
|
("nederlands8" ; Dutch8.aff
|
|
|
|
|
"[A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]"
|
|
|
|
|
"[^A-Za-z\300\301\302\303\304\305\307\310\311\312\313\314\315\316\317\322\323\324\325\326\331\332\333\334\340\341\342\343\344\345\347\350\351\352\353\354\355\356\357\361\362\363\364\365\366\371\372\373\374]"
|
|
|
|
|
"[']" t ("-C") nil iso-8859-1)
|
|
|
|
|
("norsk" ; 8 bit Norwegian mode
|
|
|
|
|
"[A-Za-z\305\306\307\310\311\322\324\330\345\346\347\350\351\362\364\370]"
|
|
|
|
|
"[^A-Za-z\305\306\307\310\311\322\324\330\345\346\347\350\351\362\364\370]"
|
|
|
|
|
"[\"]" nil nil "~list" iso-8859-1)
|
|
|
|
|
("norsk7-tex" ; 7 bit Norwegian TeX mode
|
|
|
|
|
"[A-Za-z{}\\'^`]" "[^A-Za-z{}\\'^`]"
|
|
|
|
|
"[\"]" nil ("-d" "norsk") "~plaintex" iso-8859-1)
|
|
|
|
|
("polish" ; Polish mode
|
|
|
|
|
"[A-Za-z\241\243\246\254\257\261\263\266\274\277\306\312\321\323\346\352\361\363]"
|
|
|
|
|
"[^A-Za-z\241\243\246\254\257\261\263\266\274\277\306\312\321\323\346\352\361\363]"
|
|
|
|
|
"[.]" nil nil nil iso-8859-2)
|
|
|
|
|
("portugues" ; Portuguese mode
|
2010-06-16 15:42:59 +02:00
|
|
|
|
"[a-zA-Z\301\302\307\311\323\340\341\342\351\352\355\363\343\347\372]"
|
|
|
|
|
"[^a-zA-Z\301\302\307\311\323\340\341\342\351\352\355\363\343\347\372]"
|
2008-04-24 15:36:54 +00:00
|
|
|
|
"[']" t ("-C") "~latin1" iso-8859-1)
|
|
|
|
|
("russian" ; Russian.aff (KOI8-R charset)
|
|
|
|
|
"[\341\342\367\347\344\345\263\366\372\351\352\353\354\355\356\357\360\362\363\364\365\346\350\343\376\373\375\370\371\377\374\340\361\301\302\327\307\304\305\243\326\332\311\312\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\330\331\337\334\300\321]"
|
|
|
|
|
"[^\341\342\367\347\344\345\263\366\372\351\352\353\354\355\356\357\360\362\363\364\365\346\350\343\376\373\375\370\371\377\374\340\361\301\302\327\307\304\305\243\326\332\311\312\313\314\315\316\317\320\322\323\324\325\306\310\303\336\333\335\330\331\337\334\300\321]"
|
|
|
|
|
"" nil nil nil koi8-r)
|
|
|
|
|
("russianw" ; russianw.aff (CP1251 charset)
|
|
|
|
|
"[\300\301\302\303\304\305\250\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\334\333\332\335\336\337\340\341\342\343\344\345\270\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\374\373\372\375\376\377]"
|
|
|
|
|
"[^\300\301\302\303\304\305\250\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\334\333\332\335\336\337\340\341\342\343\344\345\270\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\374\373\372\375\376\377]"
|
|
|
|
|
"" nil nil nil windows-1251)
|
|
|
|
|
("slovak" ; Slovakian
|
|
|
|
|
"[A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]"
|
|
|
|
|
"[^A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]"
|
|
|
|
|
"" nil ("-B") nil iso-8859-2)
|
|
|
|
|
("slovenian" ; Slovenian
|
|
|
|
|
"[A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]"
|
|
|
|
|
"[^A-Za-z\301\304\311\315\323\332\324\300\305\245\335\256\251\310\317\253\322\341\344\351\355\363\372\364\340\345\265\375\276\271\350\357\273\362]"
|
|
|
|
|
"" nil ("-B" "-d" "slovenian") nil iso-8859-2)
|
|
|
|
|
("svenska" ; Swedish mode
|
|
|
|
|
"[A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]"
|
|
|
|
|
"[^A-Za-z\345\344\366\351\340\374\350\346\370\347\305\304\326\311\300\334\310\306\330\307]"
|
2012-04-08 20:13:15 +03:00
|
|
|
|
"[']" nil ("-C") "~list" iso-8859-1)
|
|
|
|
|
("hebrew" "[\340\341\342\343\344\345\346\347\350\351\353\352\354\356\355\360\357\361\362\364\363\367\366\365\370\371\372]" "[^\340\341\342\343\344\345\346\347\350\351\353\352\354\356\355\360\357\361\362\364\363\367\366\365\370\371\372]" "" nil ("-B") nil cp1255))
|
2008-04-24 15:36:54 +00:00
|
|
|
|
"Base value for `ispell-dictionary-alist'.")
|
|
|
|
|
|
|
|
|
|
(defvar ispell-dictionary-alist nil
|
1994-03-02 04:56:25 +00:00
|
|
|
|
"An alist of dictionaries and their associated parameters.
|
|
|
|
|
|
|
|
|
|
Each element of this list is also a list:
|
|
|
|
|
|
2015-09-17 16:08:20 -07:00
|
|
|
|
(DICTIONARY-NAME CASECHARS NOT-CASECHARS OTHERCHARS MANY-OTHERCHARS-P
|
|
|
|
|
ISPELL-ARGS EXTENDED-CHARACTER-MODE CHARACTER-SET)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
DICTIONARY-NAME is a possible string value of variable `ispell-dictionary',
|
|
|
|
|
nil means the default dictionary.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2007-02-14 12:42:01 +00:00
|
|
|
|
CASECHARS is a regular expression of valid characters that comprise a word.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
NOT-CASECHARS is the opposite regexp of CASECHARS.
|
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
OTHERCHARS is a regexp of characters in the NOT-CASECHARS set but which can be
|
|
|
|
|
used to construct words in some special way. If OTHERCHARS characters follow
|
|
|
|
|
and precede characters from CASECHARS, they are parsed as part of a word,
|
1997-08-06 04:29:14 +00:00
|
|
|
|
otherwise they become word-breaks. As an example in English, assume the
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
regular expression \"[']\" for OTHERCHARS. Then \"they're\" and
|
1997-08-06 04:29:14 +00:00
|
|
|
|
\"Steven's\" are parsed as single words including the \"'\" character, but
|
|
|
|
|
\"Stevens'\" does not include the quote character as part of the word.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
If you want OTHERCHARS to be empty, use the empty string.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
Hint: regexp syntax requires the hyphen to be declared first here.
|
|
|
|
|
|
2007-02-14 12:46:43 +00:00
|
|
|
|
CASECHARS, NOT-CASECHARS, and OTHERCHARS must be unibyte strings
|
2005-02-21 02:15:31 +00:00
|
|
|
|
containing bytes of CHARACTER-SET. In addition, if they contain
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
non-ASCII bytes, the regular expression must be a single
|
2005-02-21 02:15:31 +00:00
|
|
|
|
`character set' construct that doesn't specify a character range
|
|
|
|
|
for non-ASCII bytes.
|
|
|
|
|
|
1997-08-06 04:29:14 +00:00
|
|
|
|
MANY-OTHERCHARS-P is non-nil when multiple OTHERCHARS are allowed in a word.
|
|
|
|
|
Otherwise only a single OTHERCHARS character is allowed to be part of any
|
|
|
|
|
single word.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
ISPELL-ARGS is a list of additional arguments passed to the ispell
|
|
|
|
|
subprocess.
|
|
|
|
|
|
|
|
|
|
EXTENDED-CHARACTER-MODE should be used when dictionaries are used which
|
1994-12-10 02:01:31 +00:00
|
|
|
|
have been configured in an Ispell affix file. (For example, umlauts
|
1994-03-02 04:56:25 +00:00
|
|
|
|
can be encoded as \\\"a, a\\\", \"a, ...) Defaults are ~tex and ~nroff
|
1994-05-21 08:04:20 +00:00
|
|
|
|
in English. This has the same effect as the command-line `-T' option.
|
|
|
|
|
The buffer Major Mode controls Ispell's parsing in tex or nroff mode,
|
1994-03-02 04:56:25 +00:00
|
|
|
|
but the dictionary can control the extended character mode.
|
2010-01-14 19:59:31 +01:00
|
|
|
|
Both defaults can be overruled in a buffer-local fashion. See
|
1994-05-21 08:04:20 +00:00
|
|
|
|
`ispell-parsing-keyword' for details on this.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
CHARACTER-SET used to encode text sent to the ispell subprocess
|
|
|
|
|
when the language uses non-ASCII characters.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
Note that with \"ispell\" as the speller, the CASECHARS and
|
|
|
|
|
OTHERCHARS slots of the alist should contain the same character
|
|
|
|
|
set as casechars and otherchars in the LANGUAGE.aff file \(e.g.,
|
2015-09-17 16:08:20 -07:00
|
|
|
|
english.aff). Aspell and Hunspell don't have this limitation.")
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
|
2013-03-01 12:46:57 -05:00
|
|
|
|
(defvar ispell-really-aspell nil
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"Non-nil if we can use Aspell extensions.")
|
2013-03-01 12:46:57 -05:00
|
|
|
|
(defvar ispell-really-hunspell nil
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"Non-nil if we can use Hunspell extensions.")
|
2009-01-08 18:46:23 +00:00
|
|
|
|
(defvar ispell-encoding8-command nil
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
"Command line option prefix to select encoding if supported, nil otherwise.
|
|
|
|
|
If setting the encoding is supported by spellchecker and is selectable from
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
the command line, this variable will contain \"--encoding=\" for Aspell
|
|
|
|
|
and \"-i \" for Hunspell, so the appropriate mime charset can be selected.
|
|
|
|
|
That will be set in `ispell-check-version' for Hunspell >= 1.1.6 and
|
|
|
|
|
Aspell >= 0.60.
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
For Aspell, non-nil also means to try to automatically find its dictionaries.
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
Earlier Aspell versions do not consistently support charset encoding. Handling
|
2005-09-17 11:35:13 +00:00
|
|
|
|
this would require some extra guessing in `ispell-aspell-find-dictionary'.")
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
|
2009-01-08 18:46:23 +00:00
|
|
|
|
(defvar ispell-aspell-supports-utf8 nil
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"Non-nil if Aspell has consistent command line UTF-8 support. Obsolete.
|
2009-01-08 18:46:23 +00:00
|
|
|
|
ispell.el and flyspell.el will use for this purpose the more generic
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
variable `ispell-encoding8-command' for both Aspell and Hunspell. Is left
|
2009-01-08 18:46:23 +00:00
|
|
|
|
here just for backwards compatibility.")
|
|
|
|
|
|
|
|
|
|
(make-obsolete-variable 'ispell-aspell-supports-utf8
|
|
|
|
|
'ispell-encoding8-command "23.1")
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
|
2015-02-24 19:36:30 +01:00
|
|
|
|
(defvar ispell-dicts-name2locale-equivs-alist
|
2013-01-21 17:05:30 +01:00
|
|
|
|
'(("american" "en_US")
|
|
|
|
|
("brasileiro" "pt_BR")
|
|
|
|
|
("british" "en_GB")
|
|
|
|
|
("castellano" "es_ES")
|
|
|
|
|
("castellano8" "es_ES")
|
|
|
|
|
("czech" "cs_CZ")
|
|
|
|
|
("dansk" "da_DK")
|
|
|
|
|
("deutsch" "de_DE")
|
|
|
|
|
("deutsch8" "de_DE")
|
|
|
|
|
("english" "en_US")
|
|
|
|
|
("esperanto" "eo")
|
|
|
|
|
("esperanto-tex" "eo")
|
|
|
|
|
("finnish" "fi_FI")
|
|
|
|
|
("francais7" "fr_FR")
|
|
|
|
|
("francais" "fr_FR")
|
|
|
|
|
("francais-tex" "fr_FR")
|
|
|
|
|
("german" "de_DE")
|
|
|
|
|
("german8" "de_DE")
|
|
|
|
|
("italiano" "it_IT")
|
|
|
|
|
("nederlands" "nl_NL")
|
|
|
|
|
("nederlands8" "nl_NL")
|
|
|
|
|
("norsk" "nn_NO")
|
|
|
|
|
("norsk7-tex" "nn_NO")
|
|
|
|
|
("polish" "pl_PL")
|
|
|
|
|
("portugues" "pt_PT")
|
|
|
|
|
("russian" "ru_RU")
|
|
|
|
|
("russianw" "ru_RU")
|
|
|
|
|
("slovak" "sk_SK")
|
|
|
|
|
("slovenian" "sl_SI")
|
|
|
|
|
("svenska" "sv_SE")
|
|
|
|
|
("hebrew" "he_IL"))
|
2015-02-24 19:36:30 +01:00
|
|
|
|
"Alist with known matching locales for standard dict names in
|
2013-01-21 17:05:30 +01:00
|
|
|
|
`ispell-dictionary-base-alist'.")
|
|
|
|
|
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
|
|
|
|
|
;;; **********************************************************************
|
|
|
|
|
;;; The following are used by ispell, and should not be changed.
|
|
|
|
|
;;; **********************************************************************
|
|
|
|
|
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(defun ispell-check-version (&optional interactivep)
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
"Ensure that `ispell-program-name' is valid and has the correct version.
|
2000-01-10 12:06:33 +00:00
|
|
|
|
Returns version number if called interactively.
|
2002-05-30 17:09:58 +00:00
|
|
|
|
Otherwise returns the library directory name, if that is defined."
|
2000-01-10 12:06:33 +00:00
|
|
|
|
;; This is a little wasteful as we actually launch ispell twice: once
|
|
|
|
|
;; to make sure it's the right version, and once for real. But people
|
|
|
|
|
;; get confused by version mismatches *all* the time (and I've got the
|
|
|
|
|
;; email to prove it) so I think this is worthwhile. And the -v[ersion]
|
|
|
|
|
;; option is the only way I can think of to do this that works with
|
|
|
|
|
;; all versions, since versions earlier than 3.0.09 didn't identify
|
|
|
|
|
;; themselves on startup.
|
|
|
|
|
(interactive "p")
|
2009-08-28 16:29:25 +00:00
|
|
|
|
(let ((default-directory (or (and (boundp 'temporary-file-directory)
|
2003-05-22 21:34:00 +00:00
|
|
|
|
temporary-file-directory)
|
|
|
|
|
default-directory))
|
2016-10-08 15:15:22 +03:00
|
|
|
|
(get-config-var
|
|
|
|
|
(lambda (var)
|
|
|
|
|
(when (re-search-forward
|
|
|
|
|
(concat var " = \\\"\\(.+?\\)\\\"") nil t)
|
|
|
|
|
(match-string 1))))
|
|
|
|
|
result libvar status ispell-program-version)
|
2009-01-05 17:45:53 +00:00
|
|
|
|
|
|
|
|
|
(with-temp-buffer
|
2007-03-20 16:23:09 +00:00
|
|
|
|
(setq status (ispell-call-process
|
2000-12-16 15:13:31 +00:00
|
|
|
|
ispell-program-name nil t nil
|
|
|
|
|
;; aspell doesn't accept the -vv switch.
|
|
|
|
|
(let ((case-fold-search
|
|
|
|
|
(memq system-type '(ms-dos windows-nt)))
|
|
|
|
|
(speller
|
|
|
|
|
(file-name-nondirectory ispell-program-name)))
|
|
|
|
|
;; Assume anything that isn't `aspell' is Ispell.
|
|
|
|
|
(if (string-match "\\`aspell" speller) "-v" "-vv"))))
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(if interactivep
|
2016-12-04 21:58:00 +00:00
|
|
|
|
;; Report version information of ispell
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(progn
|
|
|
|
|
(end-of-line)
|
2016-12-04 21:58:00 +00:00
|
|
|
|
(setq result (buffer-substring-no-properties (point-min)
|
|
|
|
|
(point)))
|
2005-09-18 12:28:30 +00:00
|
|
|
|
(message "%s" result))
|
2016-10-08 15:15:22 +03:00
|
|
|
|
;; return LIBDIR or LIBRARYVAR (overrides LIBDIR) env.
|
|
|
|
|
(progn
|
|
|
|
|
(setq result (funcall get-config-var "LIBDIR")
|
|
|
|
|
libvar (funcall get-config-var "LIBRARYVAR"))
|
|
|
|
|
(when libvar
|
|
|
|
|
(setq libvar (getenv libvar))
|
|
|
|
|
(unless (member libvar '(nil "")) (setq result libvar)))))
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(if (not (memq status '(0 nil)))
|
|
|
|
|
(error "%s exited with %s %s" ispell-program-name
|
|
|
|
|
(if (stringp status) "signal" "code") status))
|
2008-12-20 18:34:41 +00:00
|
|
|
|
|
|
|
|
|
;; Get relevant version strings. Only xx.yy.... format works well
|
|
|
|
|
(let (case-fold-search)
|
|
|
|
|
(setq ispell-program-version
|
|
|
|
|
(and (search-forward-regexp "\\([0-9]+\\.[0-9\\.]+\\)" nil t)
|
|
|
|
|
(match-string 1)))
|
|
|
|
|
|
|
|
|
|
;; Make sure these variables are (re-)initialized to the default value
|
|
|
|
|
(setq ispell-really-aspell nil
|
|
|
|
|
ispell-aspell-supports-utf8 nil
|
2009-01-08 18:46:23 +00:00
|
|
|
|
ispell-really-hunspell nil
|
|
|
|
|
ispell-encoding8-command nil)
|
2008-12-20 18:34:41 +00:00
|
|
|
|
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(or (setq ispell-really-aspell
|
|
|
|
|
(and (search-forward-regexp
|
2009-05-24 23:26:33 +00:00
|
|
|
|
"(but really Aspell \\([0-9]+\\.[0-9\\.-]+\\)?)" nil t)
|
2008-12-20 18:34:41 +00:00
|
|
|
|
(match-string 1)))
|
|
|
|
|
(setq ispell-really-hunspell
|
|
|
|
|
(and (search-forward-regexp
|
2009-08-28 16:29:25 +00:00
|
|
|
|
"(but really Hunspell \\([0-9]+\\.[0-9\\.-]+\\)?)"
|
|
|
|
|
nil t)
|
2008-12-20 18:34:41 +00:00
|
|
|
|
(match-string 1)))))
|
|
|
|
|
|
|
|
|
|
(let ((aspell-minver "0.50")
|
|
|
|
|
(aspell8-minver "0.60")
|
|
|
|
|
(ispell-minver "3.1.12")
|
|
|
|
|
(hunspell8-minver "1.1.6"))
|
|
|
|
|
|
2016-12-04 21:50:18 +00:00
|
|
|
|
(unless (version<= ispell-minver ispell-program-version)
|
2008-12-20 18:34:41 +00:00
|
|
|
|
(error "%s release %s or greater is required"
|
|
|
|
|
ispell-program-name
|
|
|
|
|
ispell-minver))
|
|
|
|
|
|
|
|
|
|
(cond
|
|
|
|
|
(ispell-really-aspell
|
2016-12-04 00:54:04 +00:00
|
|
|
|
(if (version<= aspell-minver ispell-really-aspell)
|
|
|
|
|
(if (version<= aspell8-minver ispell-really-aspell)
|
2009-01-08 18:46:23 +00:00
|
|
|
|
(progn
|
|
|
|
|
(setq ispell-aspell-supports-utf8 t)
|
|
|
|
|
(setq ispell-encoding8-command "--encoding=")))
|
2008-12-20 18:34:41 +00:00
|
|
|
|
(setq ispell-really-aspell nil)))
|
|
|
|
|
(ispell-really-hunspell
|
2016-12-04 00:54:04 +00:00
|
|
|
|
(if (version<= hunspell8-minver ispell-really-hunspell)
|
2012-04-08 20:09:03 +03:00
|
|
|
|
(setq ispell-encoding8-command "-i")
|
2009-01-08 18:46:23 +00:00
|
|
|
|
(setq ispell-really-hunspell nil))))))
|
2000-01-10 12:06:33 +00:00
|
|
|
|
result))
|
|
|
|
|
|
2007-03-20 16:23:09 +00:00
|
|
|
|
(defun ispell-call-process (&rest args)
|
|
|
|
|
"Like `call-process' but defend against bad `default-directory'."
|
|
|
|
|
(let ((default-directory default-directory))
|
2014-05-09 00:02:00 -07:00
|
|
|
|
(unless (file-accessible-directory-p default-directory)
|
2007-03-20 16:23:09 +00:00
|
|
|
|
(setq default-directory (expand-file-name "~/")))
|
|
|
|
|
(apply 'call-process args)))
|
|
|
|
|
|
|
|
|
|
(defun ispell-call-process-region (&rest args)
|
|
|
|
|
"Like `call-process-region' but defend against bad `default-directory'."
|
|
|
|
|
(let ((default-directory default-directory))
|
2014-05-09 00:02:00 -07:00
|
|
|
|
(unless (file-accessible-directory-p default-directory)
|
2007-03-20 16:23:09 +00:00
|
|
|
|
(setq default-directory (expand-file-name "~/")))
|
|
|
|
|
(apply 'call-process-region args)))
|
|
|
|
|
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(defvar ispell-debug-buffer)
|
|
|
|
|
|
2012-11-06 17:22:09 +01:00
|
|
|
|
(defun ispell-create-debug-buffer (&optional append)
|
|
|
|
|
"Create an ispell debug buffer for debugging output.
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
If APPEND is non-nil, append the info to previous buffer if exists,
|
2012-11-06 17:22:09 +01:00
|
|
|
|
otherwise is reset. Returns name of ispell debug buffer.
|
|
|
|
|
See `ispell-buffer-with-debug' for an example of use."
|
|
|
|
|
(let ((ispell-debug-buffer (get-buffer-create "*ispell-debug*")))
|
|
|
|
|
(with-current-buffer ispell-debug-buffer
|
|
|
|
|
(if append
|
|
|
|
|
(insert
|
|
|
|
|
(format "-----------------------------------------------\n"))
|
|
|
|
|
(erase-buffer)))
|
|
|
|
|
ispell-debug-buffer))
|
|
|
|
|
|
2013-03-01 12:46:57 -05:00
|
|
|
|
(defsubst ispell-print-if-debug (format &rest args)
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"Print message using FORMAT and ARGS to `ispell-debug-buffer' buffer if enabled."
|
2012-11-06 17:22:09 +01:00
|
|
|
|
(if (boundp 'ispell-debug-buffer)
|
|
|
|
|
(with-current-buffer ispell-debug-buffer
|
2013-03-01 12:46:57 -05:00
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(insert (apply #'format format args)))))
|
2000-01-10 12:06:33 +00:00
|
|
|
|
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
|
2009-08-28 16:29:25 +00:00
|
|
|
|
;; The preparation of the menu bar menu must be autoloaded
|
|
|
|
|
;; because otherwise this file gets autoloaded every time Emacs starts
|
|
|
|
|
;; so that it can set up the menus and determine keyboard equivalents.
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
|
1995-06-16 16:25:07 +00:00
|
|
|
|
;;;###autoload
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
(defvar ispell-menu-map nil "Key map for ispell menu.")
|
2012-05-18 15:04:07 -04:00
|
|
|
|
;; Redo menu when loading ispell to get dictionary modifications
|
1998-12-10 03:11:59 +00:00
|
|
|
|
(setq ispell-menu-map nil)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;;; Set up dictionary
|
1995-06-16 16:25:07 +00:00
|
|
|
|
;;;###autoload
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(defvar ispell-menu-map-needed
|
2016-12-04 14:19:26 +00:00
|
|
|
|
(unless ispell-menu-map 'reload))
|
2000-01-10 12:06:33 +00:00
|
|
|
|
|
2002-05-30 17:09:58 +00:00
|
|
|
|
(defvar ispell-library-directory (condition-case ()
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(ispell-check-version)
|
2002-05-30 17:09:58 +00:00
|
|
|
|
(error nil))
|
|
|
|
|
"Directory where ispell dictionaries reside.")
|
2000-01-10 12:06:33 +00:00
|
|
|
|
|
2000-08-17 20:54:01 +00:00
|
|
|
|
(defvar ispell-process nil
|
|
|
|
|
"The process object for Ispell.")
|
|
|
|
|
|
2006-06-09 13:04:13 +00:00
|
|
|
|
(defvar ispell-async-processp (and (fboundp 'delete-process)
|
2000-08-17 20:54:01 +00:00
|
|
|
|
(fboundp 'process-send-string)
|
2016-12-04 14:15:50 +00:00
|
|
|
|
(fboundp 'accept-process-output))
|
2000-08-17 20:54:01 +00:00
|
|
|
|
"Non-nil means that the OS supports asynchronous processes.")
|
1994-12-10 02:01:31 +00:00
|
|
|
|
|
2005-08-09 14:12:44 +00:00
|
|
|
|
;; Make ispell.el work better with aspell.
|
|
|
|
|
|
2008-04-23 20:39:10 +00:00
|
|
|
|
(defvar ispell-aspell-dictionary-alist nil
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"An alist of parsed Aspell dicts and associated parameters.
|
2008-04-23 20:39:10 +00:00
|
|
|
|
Internal use.")
|
2005-09-24 10:46:03 +00:00
|
|
|
|
|
2005-08-09 14:12:44 +00:00
|
|
|
|
(defun ispell-find-aspell-dictionaries ()
|
2016-12-13 00:30:51 +00:00
|
|
|
|
"Find Aspell's dictionaries, and record in `ispell-aspell-dictionary-alist'."
|
2009-01-16 14:04:35 +00:00
|
|
|
|
(unless (and ispell-really-aspell ispell-encoding8-command)
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
(error "This function only works with Aspell >= 0.60"))
|
2005-10-23 18:22:06 +00:00
|
|
|
|
(let* ((dictionaries
|
|
|
|
|
(split-string
|
|
|
|
|
(with-temp-buffer
|
2007-03-20 16:23:09 +00:00
|
|
|
|
(ispell-call-process ispell-program-name nil t nil "dicts")
|
2005-10-23 18:22:06 +00:00
|
|
|
|
(buffer-string))))
|
|
|
|
|
;; Search for the named dictionaries.
|
|
|
|
|
(found
|
2006-11-06 02:23:12 +00:00
|
|
|
|
(delq nil
|
2005-10-23 18:22:06 +00:00
|
|
|
|
(mapcar #'ispell-aspell-find-dictionary dictionaries))))
|
2006-03-11 15:36:15 +00:00
|
|
|
|
;; Ensure aspell's alias dictionary will override standard
|
|
|
|
|
;; definitions.
|
|
|
|
|
(setq found (ispell-aspell-add-aliases found))
|
2012-05-28 16:36:27 +02:00
|
|
|
|
;; Merge into FOUND any elements from the standard ispell-dictionary-base-alist
|
2006-11-06 02:23:12 +00:00
|
|
|
|
;; which have no element in FOUND at all.
|
2012-05-28 16:36:27 +02:00
|
|
|
|
(dolist (dict ispell-dictionary-base-alist)
|
2005-10-23 18:22:06 +00:00
|
|
|
|
(unless (assoc (car dict) found)
|
|
|
|
|
(setq found (nconc found (list dict)))))
|
2008-04-23 20:39:10 +00:00
|
|
|
|
(setq ispell-aspell-dictionary-alist found)
|
2005-08-09 14:12:44 +00:00
|
|
|
|
;; Add a default entry
|
2010-09-04 20:47:29 +02:00
|
|
|
|
(let ((default-dict
|
|
|
|
|
'(nil "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-B") nil utf-8)))
|
2008-04-23 20:39:10 +00:00
|
|
|
|
(push default-dict ispell-aspell-dictionary-alist))))
|
2005-08-09 14:12:44 +00:00
|
|
|
|
|
|
|
|
|
(defvar ispell-aspell-data-dir nil
|
|
|
|
|
"Data directory of Aspell.")
|
|
|
|
|
|
|
|
|
|
(defvar ispell-aspell-dict-dir nil
|
|
|
|
|
"Dictionary directory of Aspell.")
|
|
|
|
|
|
|
|
|
|
(defun ispell-get-aspell-config-value (key)
|
|
|
|
|
"Return value of Aspell configuration option KEY.
|
|
|
|
|
Assumes that value contains no whitespace."
|
|
|
|
|
(with-temp-buffer
|
2007-03-20 16:23:09 +00:00
|
|
|
|
(ispell-call-process ispell-program-name nil t nil "config" key)
|
2005-08-09 14:12:44 +00:00
|
|
|
|
(car (split-string (buffer-string)))))
|
|
|
|
|
|
|
|
|
|
(defun ispell-aspell-find-dictionary (dict-name)
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"For Aspell dictionary DICT-NAME, return a list of parameters if an
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
associated data file is found or nil otherwise. List format is that
|
|
|
|
|
of `ispell-dictionary-base-alist' elements."
|
2015-03-03 13:12:38 +01:00
|
|
|
|
|
|
|
|
|
;; Make sure `ispell-aspell-dict-dir' is defined
|
|
|
|
|
(or ispell-aspell-dict-dir
|
|
|
|
|
(setq ispell-aspell-dict-dir
|
|
|
|
|
(ispell-get-aspell-config-value "dict-dir")))
|
|
|
|
|
|
2010-10-18 18:01:43 +02:00
|
|
|
|
;; Make sure `ispell-aspell-data-dir' is defined
|
|
|
|
|
(or ispell-aspell-data-dir
|
|
|
|
|
(setq ispell-aspell-data-dir
|
|
|
|
|
(ispell-get-aspell-config-value "data-dir")))
|
2015-03-03 13:12:38 +01:00
|
|
|
|
|
|
|
|
|
;; Try finding associated datafile. aspell will look for master .dat
|
|
|
|
|
;; file in `dict-dir' and `data-dir'. Associated .dat files must be
|
|
|
|
|
;; in the same directory as master file.
|
|
|
|
|
(let ((data-file
|
|
|
|
|
(catch 'datafile
|
|
|
|
|
(dolist ( tmp-path (list ispell-aspell-dict-dir
|
|
|
|
|
ispell-aspell-data-dir ))
|
|
|
|
|
;; Try xx.dat first, strip out variant, country code, etc,
|
2015-05-16 12:41:02 +03:00
|
|
|
|
;; then try xx_YY.dat (without stripping country code),
|
2015-05-17 08:18:29 -07:00
|
|
|
|
;; then try xx-alt.dat, for de-alt etc.
|
2015-03-03 13:12:38 +01:00
|
|
|
|
(dolist (tmp-regexp (list "^[[:alpha:]]+"
|
2015-05-15 17:24:06 +03:00
|
|
|
|
"^[[:alpha:]_]+"
|
|
|
|
|
"^[[:alpha:]]+-\\(alt\\|old\\)"))
|
2015-03-03 13:12:38 +01:00
|
|
|
|
(let ((fullpath
|
|
|
|
|
(concat tmp-path "/"
|
|
|
|
|
(and (string-match tmp-regexp dict-name)
|
|
|
|
|
(match-string 0 dict-name)) ".dat")))
|
|
|
|
|
(if (file-readable-p fullpath)
|
|
|
|
|
(throw 'datafile fullpath)))))))
|
|
|
|
|
otherchars)
|
2010-10-18 18:01:43 +02:00
|
|
|
|
|
|
|
|
|
(if data-file
|
2005-10-23 18:22:06 +00:00
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(insert-file-contents data-file)
|
|
|
|
|
;; There is zero or one line with special characters declarations.
|
|
|
|
|
(when (search-forward-regexp "^special" nil t)
|
|
|
|
|
(let ((specials (split-string
|
|
|
|
|
(buffer-substring (point)
|
|
|
|
|
(progn (end-of-line) (point))))))
|
|
|
|
|
;; The line looks like: special ' -** - -** . -** : -*-
|
|
|
|
|
;; -** means that this character
|
|
|
|
|
;; - doesn't appear at word start
|
|
|
|
|
;; * may appear in the middle of a word
|
|
|
|
|
;; * may appear at word end
|
|
|
|
|
;; `otherchars' is about the middle case.
|
|
|
|
|
(while specials
|
|
|
|
|
(when (eq (aref (cadr specials) 1) ?*)
|
|
|
|
|
(push (car specials) otherchars))
|
|
|
|
|
(setq specials (cddr specials)))))
|
|
|
|
|
(list dict-name
|
|
|
|
|
"[[:alpha:]]"
|
|
|
|
|
"[^[:alpha:]]"
|
|
|
|
|
(regexp-opt otherchars)
|
|
|
|
|
t ; We can't tell, so set this to t
|
2007-12-02 18:17:08 +00:00
|
|
|
|
(list "-d" dict-name)
|
2005-10-23 18:22:06 +00:00
|
|
|
|
nil ; aspell doesn't support this
|
|
|
|
|
;; Here we specify the encoding to use while communicating with
|
|
|
|
|
;; aspell. This doesn't apply to command line arguments, so
|
|
|
|
|
;; just don't pass words to spellcheck as arguments...
|
2010-10-18 18:01:43 +02:00
|
|
|
|
'utf-8)))))
|
2005-08-09 14:12:44 +00:00
|
|
|
|
|
2006-03-11 15:36:15 +00:00
|
|
|
|
(defun ispell-aspell-add-aliases (alist)
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"Find Aspell's dictionary aliases and add them to dictionary ALIST.
|
2006-03-11 15:36:15 +00:00
|
|
|
|
Return the new dictionary alist."
|
2010-09-04 20:47:29 +02:00
|
|
|
|
(let ((aliases
|
|
|
|
|
(file-expand-wildcards
|
2005-08-09 14:12:44 +00:00
|
|
|
|
(concat (or ispell-aspell-dict-dir
|
|
|
|
|
(setq ispell-aspell-dict-dir
|
|
|
|
|
(ispell-get-aspell-config-value "dict-dir")))
|
|
|
|
|
"/*.alias"))))
|
|
|
|
|
(dolist (alias-file aliases)
|
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(insert-file-contents alias-file)
|
|
|
|
|
;; Look for a line "add FOO.multi", extract FOO
|
|
|
|
|
(when (search-forward-regexp "^add \\([^.]+\\)\\.multi" nil t)
|
* lisp/files.el (file-name-base): New convenience function.
* lisp/autoinsert.el, lisp/cus-dep.el, lisp/doc-view.el, lisp/image-dired.el,
* lisp/woman.el, lisp/eshell/esh-cmd.el, lisp/progmodes/ada-xref.el,
* lisp/progmodes/cc-defs.el, lisp/progmodes/cperl-mode.el,
* lisp/progmodes/flymake.el, lisp/progmodes/gud.el, lisp/progmodes/idlwave.el,
* lisp/textmodes/ispell.el, lisp/textmodes/reftex-ref.el,
* lisp/textmodes/tex-mode.el: Use it.
Did not touch cedet and org because they are maintained elsewhere.
2012-06-26 12:23:01 -04:00
|
|
|
|
(let* ((aliasname (file-name-base alias-file))
|
2006-03-11 15:36:15 +00:00
|
|
|
|
(already-exists-p (assoc aliasname alist))
|
2005-08-09 14:12:44 +00:00
|
|
|
|
(realname (match-string 1))
|
2006-03-11 15:36:15 +00:00
|
|
|
|
(realdict (assoc realname alist)))
|
2005-08-09 14:12:44 +00:00
|
|
|
|
(when (and realdict (not already-exists-p))
|
2006-03-11 15:36:15 +00:00
|
|
|
|
(push (cons aliasname (cdr realdict)) alist))))))
|
2015-02-24 19:36:30 +01:00
|
|
|
|
;; Add entries for standard dict-names with found locale-matching entry
|
|
|
|
|
(dolist (dict-map-entry ispell-dicts-name2locale-equivs-alist)
|
|
|
|
|
(let ((name (car dict-map-entry))
|
|
|
|
|
(locale (cadr dict-map-entry)))
|
|
|
|
|
(unless (assoc name alist) ;; skip if already present
|
|
|
|
|
(if (assoc locale alist)
|
|
|
|
|
(push (cons name (cdr (assoc locale alist))) alist)))))
|
2006-03-11 15:36:15 +00:00
|
|
|
|
alist))
|
2005-08-09 14:12:44 +00:00
|
|
|
|
|
2013-02-28 20:01:34 +01:00
|
|
|
|
;; Make ispell.el work better with hunspell.
|
|
|
|
|
|
|
|
|
|
(defvar ispell-hunspell-dict-paths-alist nil
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"Alist of parsed Hunspell dicts and associated affix files.
|
2013-02-28 20:01:34 +01:00
|
|
|
|
Will be used to parse corresponding .aff file and create associated
|
|
|
|
|
parameters to be inserted into `ispell-hunspell-dictionary-alist'.
|
|
|
|
|
Internal use.")
|
|
|
|
|
|
|
|
|
|
(defvar ispell-hunspell-dictionary-alist nil
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"Alist of parsed Hunspell dicts and associated parameters.
|
2013-02-28 20:01:34 +01:00
|
|
|
|
This alist will initially contain names of found dicts. Associated
|
|
|
|
|
parameters will be added when dict is used for the first time.
|
|
|
|
|
Internal use.")
|
|
|
|
|
|
|
|
|
|
(defun ispell-hunspell-fill-dictionary-entry (dict)
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"Fill uninitialized entries in `ispell-dictionary-alist' for DICT and aliases.
|
|
|
|
|
Value of those entries will be extracted from Hunspell affix file and used for
|
2013-02-28 20:01:34 +01:00
|
|
|
|
all uninitialized dicts using that affix file."
|
|
|
|
|
(if (cadr (assoc dict ispell-dictionary-alist))
|
|
|
|
|
(message "ispell-hfde: Non void entry for %s. Skipping.\n" dict)
|
2013-03-01 12:46:57 -05:00
|
|
|
|
(let ((dict-alias
|
2015-02-24 19:36:30 +01:00
|
|
|
|
(cadr (assoc dict ispell-dicts-name2locale-equivs-alist)))
|
2013-02-28 20:01:34 +01:00
|
|
|
|
(use-for-dicts (list dict))
|
|
|
|
|
(dict-args-cdr (cdr (ispell-parse-hunspell-affix-file dict)))
|
|
|
|
|
newlist)
|
2013-03-02 22:40:21 -08:00
|
|
|
|
;; Get a list of uninitialized dicts using the same affix file.
|
2015-02-24 19:36:30 +01:00
|
|
|
|
(dolist (dict-equiv-alist-entry ispell-dicts-name2locale-equivs-alist)
|
2013-02-28 20:01:34 +01:00
|
|
|
|
(let ((dict-equiv-key (car dict-equiv-alist-entry))
|
|
|
|
|
(dict-equiv-value (cadr dict-equiv-alist-entry)))
|
|
|
|
|
(if (or (member dict dict-equiv-alist-entry)
|
|
|
|
|
(member dict-alias dict-equiv-alist-entry))
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
(dolist (tmp-dict (list dict-equiv-key dict-equiv-value))
|
2013-02-28 20:01:34 +01:00
|
|
|
|
(if (cadr (assoc tmp-dict ispell-dictionary-alist))
|
2013-03-01 12:46:57 -05:00
|
|
|
|
(ispell-print-if-debug
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"ispell-hfde: %s already expanded; skipping.\n" tmp-dict)
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(cl-pushnew tmp-dict use-for-dicts :test #'equal))))))
|
2013-03-01 12:46:57 -05:00
|
|
|
|
(ispell-print-if-debug
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"ispell-hfde: Filling %s entry. Use for %s.\n" dict use-for-dicts)
|
2013-03-01 12:46:57 -05:00
|
|
|
|
;; The final loop.
|
2013-02-28 20:01:34 +01:00
|
|
|
|
(dolist (entry ispell-dictionary-alist)
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(cl-pushnew (if (member (car entry) use-for-dicts)
|
|
|
|
|
(cons (car entry) dict-args-cdr)
|
|
|
|
|
entry)
|
|
|
|
|
newlist :test #'equal))
|
2013-02-28 20:01:34 +01:00
|
|
|
|
(setq ispell-dictionary-alist newlist))))
|
|
|
|
|
|
|
|
|
|
(defun ispell-parse-hunspell-affix-file (dict-key)
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"Parse Hunspell affix file to extract parameters for DICT-KEY.
|
2015-08-22 17:16:58 +03:00
|
|
|
|
Return a list in `ispell-dictionary-alist' format.
|
|
|
|
|
|
|
|
|
|
DICT_KEY can be in the \"DICT1,DICT2,DICT3\" format, to invoke Hunspell
|
|
|
|
|
with a list of dictionaries. The first dictionary in the list must have
|
|
|
|
|
a corresponding .aff affix file; the rest are allowed to have no affix
|
|
|
|
|
files, and will then use the affix file of the preceding dictionary that
|
|
|
|
|
did."
|
|
|
|
|
(let ((dict-list (split-string dict-key "," t))
|
|
|
|
|
(first-p t)
|
|
|
|
|
(dict-arg "")
|
|
|
|
|
otherchars-list)
|
|
|
|
|
(dolist (dict-key dict-list)
|
|
|
|
|
(let ((affix-file
|
|
|
|
|
(cadr (assoc dict-key ispell-hunspell-dict-paths-alist))))
|
|
|
|
|
(unless affix-file
|
|
|
|
|
(error "ispell-phaf: No matching entry for %s in `ispell-hunspell-dict-paths-alist'.\n" dict-key))
|
|
|
|
|
(if (and first-p (not (file-exists-p affix-file)))
|
|
|
|
|
(error "ispell-phaf: File \"%s\" not found.\n" affix-file))
|
|
|
|
|
(and first-p (setq first-p nil))
|
|
|
|
|
(let ((dict-name (file-name-sans-extension
|
|
|
|
|
(file-name-nondirectory affix-file)))
|
|
|
|
|
otherchars-string)
|
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(insert-file-contents affix-file)
|
|
|
|
|
(setq otherchars-string
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(if (search-forward-regexp "^WORDCHARS +" nil t )
|
|
|
|
|
(buffer-substring (point)
|
|
|
|
|
(progn (end-of-line) (point))))))
|
|
|
|
|
;; Remove trailing whitespace and extra stuff. Make list
|
|
|
|
|
;; if non-nil.
|
|
|
|
|
(if otherchars-string
|
|
|
|
|
(let* ((otherchars-string
|
|
|
|
|
;; Remove trailing junk.
|
|
|
|
|
(substring otherchars-string
|
|
|
|
|
0 (string-match " +" otherchars-string)))
|
|
|
|
|
(chars-list (append otherchars-string nil)))
|
|
|
|
|
(setq chars-list (delq ?\ chars-list))
|
|
|
|
|
(dolist (ch chars-list)
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(cl-pushnew ch otherchars-list :test #'equal)))))
|
2015-08-22 17:16:58 +03:00
|
|
|
|
;; Cons the argument for the -d switch.
|
|
|
|
|
(setq dict-arg (concat dict-arg
|
|
|
|
|
(if (> (length dict-arg) 0) ",")
|
|
|
|
|
dict-name)))))
|
|
|
|
|
|
|
|
|
|
;; Fill dict entry
|
|
|
|
|
(list dict-key
|
|
|
|
|
"[[:alpha:]]"
|
|
|
|
|
"[^[:alpha:]]"
|
|
|
|
|
(if otherchars-list
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(regexp-opt (mapcar #'char-to-string otherchars-list))
|
2015-08-22 17:16:58 +03:00
|
|
|
|
"")
|
|
|
|
|
t ; many-otherchars-p: We can't tell, set to t.
|
|
|
|
|
(list "-d" dict-arg)
|
|
|
|
|
nil ; extended-char-mode: not supported by hunspell!
|
|
|
|
|
'utf-8)))
|
|
|
|
|
|
|
|
|
|
(defun ispell-hunspell-add-multi-dic (dict)
|
|
|
|
|
"Add DICT of the form \"DICT1,DICT2,...\" to `ispell-dictionary-alist'.
|
|
|
|
|
|
|
|
|
|
Invoke this command before you want to start Hunspell for the first time
|
|
|
|
|
with a particular combination of dictionaries. The first dictionary
|
|
|
|
|
in the list must have an affix file where Hunspell affix files are kept."
|
|
|
|
|
(interactive "sMulti-dictionary combination: ")
|
|
|
|
|
;; Make sure the first dictionary in the list is known to us.
|
|
|
|
|
(let ((first-dict (car (split-string dict "," t))))
|
|
|
|
|
(unless ispell-hunspell-dictionary-alist
|
|
|
|
|
(ispell-find-hunspell-dictionaries)
|
|
|
|
|
(setq ispell-dictionary-alist ispell-hunspell-dictionary-alist))
|
|
|
|
|
(or (assoc first-dict ispell-local-dictionary-alist)
|
|
|
|
|
(assoc first-dict ispell-dictionary-alist)
|
|
|
|
|
(error "Unknown dictionary: %s" first-dict)))
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(cl-pushnew (list dict '()) ispell-dictionary-alist :test #'equal)
|
2015-08-22 17:16:58 +03:00
|
|
|
|
(ispell-hunspell-fill-dictionary-entry dict))
|
2013-02-28 20:01:34 +01:00
|
|
|
|
|
|
|
|
|
(defun ispell-find-hunspell-dictionaries ()
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"Look for installed Hunspell dictionaries.
|
2013-02-28 20:01:34 +01:00
|
|
|
|
Will initialize `ispell-hunspell-dictionary-alist' and
|
|
|
|
|
`ispell-hunspell-dictionary-alist' after values found
|
2015-02-24 19:36:30 +01:00
|
|
|
|
and remove `ispell-dicts-name2locale-equivs-alist'
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
entries if a specific dictionary was found."
|
2013-02-28 20:01:34 +01:00
|
|
|
|
(let ((hunspell-found-dicts
|
|
|
|
|
(split-string
|
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(ispell-call-process ispell-program-name
|
|
|
|
|
null-device
|
|
|
|
|
t
|
|
|
|
|
nil
|
|
|
|
|
"-D")
|
|
|
|
|
(buffer-string))
|
|
|
|
|
"[\n\r]+"
|
|
|
|
|
t))
|
|
|
|
|
hunspell-default-dict
|
|
|
|
|
hunspell-default-dict-entry)
|
|
|
|
|
(dolist (dict hunspell-found-dicts)
|
|
|
|
|
(let* ((full-name (file-name-nondirectory dict))
|
|
|
|
|
(basename (file-name-sans-extension full-name))
|
|
|
|
|
(affix-file (concat dict ".aff")))
|
|
|
|
|
(if (string-match "\\.aff$" dict)
|
|
|
|
|
;; Found default dictionary
|
|
|
|
|
(if hunspell-default-dict
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
(error "ispell-fhd: Default dict already defined as %s. Not using %s.\n"
|
2013-02-28 20:01:34 +01:00
|
|
|
|
hunspell-default-dict dict)
|
|
|
|
|
(setq affix-file dict)
|
|
|
|
|
(setq hunspell-default-dict (list basename affix-file)))
|
|
|
|
|
(if (and (not (assoc basename ispell-hunspell-dict-paths-alist))
|
|
|
|
|
(file-exists-p affix-file))
|
|
|
|
|
;; Entry has an associated .aff file and no previous value.
|
2013-03-01 18:13:04 +01:00
|
|
|
|
(let ((affix-file (expand-file-name affix-file)))
|
2013-02-28 20:01:34 +01:00
|
|
|
|
(ispell-print-if-debug
|
2013-03-01 12:46:57 -05:00
|
|
|
|
"++ ispell-fhd: dict-entry:%s name:%s basename:%s affix-file:%s\n"
|
|
|
|
|
dict full-name basename affix-file)
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(cl-pushnew (list basename affix-file)
|
|
|
|
|
ispell-hunspell-dict-paths-alist :test #'equal))
|
2013-02-28 20:01:34 +01:00
|
|
|
|
(ispell-print-if-debug
|
2013-03-01 12:46:57 -05:00
|
|
|
|
"-- ispell-fhd: Skipping entry: %s\n" dict)))))
|
2013-02-28 20:01:34 +01:00
|
|
|
|
;; Remove entry from aliases alist if explicit dict was found.
|
|
|
|
|
(let (newlist)
|
2015-02-24 19:36:30 +01:00
|
|
|
|
(dolist (dict ispell-dicts-name2locale-equivs-alist)
|
2013-02-28 20:01:34 +01:00
|
|
|
|
(if (assoc (car dict) ispell-hunspell-dict-paths-alist)
|
|
|
|
|
(ispell-print-if-debug
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"-- ispell-fhd: Excluding %s alias. Standalone dict found.\n"
|
2013-03-01 12:46:57 -05:00
|
|
|
|
(car dict))
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(cl-pushnew dict newlist :test #'equal)))
|
2015-02-24 19:36:30 +01:00
|
|
|
|
(setq ispell-dicts-name2locale-equivs-alist newlist))
|
2013-02-28 20:01:34 +01:00
|
|
|
|
;; Add known hunspell aliases
|
2015-02-24 19:36:30 +01:00
|
|
|
|
(dolist (dict-equiv ispell-dicts-name2locale-equivs-alist)
|
2013-02-28 20:01:34 +01:00
|
|
|
|
(let ((dict-equiv-key (car dict-equiv))
|
|
|
|
|
(dict-equiv-value (cadr dict-equiv))
|
|
|
|
|
(exclude-aliases (list ;; Exclude TeX aliases
|
|
|
|
|
"esperanto-tex"
|
|
|
|
|
"francais7"
|
|
|
|
|
"francais-tex"
|
|
|
|
|
"norsk7-tex")))
|
|
|
|
|
(if (and (assoc dict-equiv-value ispell-hunspell-dict-paths-alist)
|
|
|
|
|
(not (assoc dict-equiv-key ispell-hunspell-dict-paths-alist))
|
|
|
|
|
(not (member dict-equiv-key exclude-aliases)))
|
2013-03-01 12:46:57 -05:00
|
|
|
|
(let ((affix-file (cadr (assoc dict-equiv-value
|
|
|
|
|
ispell-hunspell-dict-paths-alist))))
|
|
|
|
|
(ispell-print-if-debug "++ ispell-fhd: Adding alias %s -> %s.\n"
|
|
|
|
|
dict-equiv-key affix-file)
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(cl-pushnew (list dict-equiv-key affix-file)
|
|
|
|
|
ispell-hunspell-dict-paths-alist :test #'equal)))))
|
2013-02-28 20:01:34 +01:00
|
|
|
|
;; Parse and set values for default dictionary.
|
|
|
|
|
(setq hunspell-default-dict (car hunspell-default-dict))
|
|
|
|
|
(setq hunspell-default-dict-entry
|
|
|
|
|
(ispell-parse-hunspell-affix-file hunspell-default-dict))
|
|
|
|
|
;; Create an alist of found dicts with only names, except for default dict.
|
|
|
|
|
(setq ispell-hunspell-dictionary-alist
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(list (cons nil (cdr hunspell-default-dict-entry))))
|
|
|
|
|
(dolist (dict (mapcar #'car ispell-hunspell-dict-paths-alist))
|
|
|
|
|
(cl-pushnew (if (string= dict hunspell-default-dict)
|
|
|
|
|
hunspell-default-dict-entry
|
|
|
|
|
(list dict))
|
|
|
|
|
ispell-hunspell-dictionary-alist :test #'equal))))
|
2013-02-28 20:01:34 +01:00
|
|
|
|
|
2008-04-23 20:39:10 +00:00
|
|
|
|
;; Set params according to the selected spellchecker
|
|
|
|
|
|
|
|
|
|
(defvar ispell-last-program-name nil
|
2010-01-14 19:59:31 +01:00
|
|
|
|
"Last value of `ispell-program-name'. Internal use.")
|
2008-04-23 20:39:10 +00:00
|
|
|
|
|
|
|
|
|
(defvar ispell-initialize-spellchecker-hook nil
|
2008-04-24 15:36:54 +00:00
|
|
|
|
"Normal hook run on spellchecker initialization.
|
|
|
|
|
This hook is run when a spellchecker is used for the first
|
|
|
|
|
time, before `ispell-dictionary-alist' is set. It is intended for
|
|
|
|
|
sysadmins to override entries in `ispell-dictionary-base-alist'
|
|
|
|
|
by putting those overrides in `ispell-base-dicts-override-alist', which is
|
|
|
|
|
a dynamically scoped var with same format as `ispell-dictionary-alist'.
|
|
|
|
|
This alist will not override the auto-detected values (e.g. if a recent
|
|
|
|
|
aspell is used along with Emacs).")
|
2008-04-23 20:39:10 +00:00
|
|
|
|
|
|
|
|
|
(defun ispell-set-spellchecker-params ()
|
|
|
|
|
"Initialize some spellchecker parameters when changed or first used."
|
|
|
|
|
(unless (eq ispell-last-program-name ispell-program-name)
|
|
|
|
|
(setq ispell-last-program-name ispell-program-name)
|
|
|
|
|
(ispell-kill-ispell t)
|
|
|
|
|
(if (and (condition-case ()
|
|
|
|
|
(progn
|
|
|
|
|
(setq ispell-library-directory (ispell-check-version))
|
|
|
|
|
t)
|
|
|
|
|
(error nil))
|
2016-12-04 14:02:48 +00:00
|
|
|
|
ispell-encoding8-command)
|
2013-02-28 20:01:34 +01:00
|
|
|
|
;; auto-detection will only be used if spellchecker is not
|
2016-12-04 14:02:48 +00:00
|
|
|
|
;; ispell and supports a way to set communication to UTF-8.
|
2013-02-28 20:01:34 +01:00
|
|
|
|
(if ispell-really-aspell
|
|
|
|
|
(or ispell-aspell-dictionary-alist
|
|
|
|
|
(ispell-find-aspell-dictionaries))
|
|
|
|
|
(if ispell-really-hunspell
|
|
|
|
|
(or ispell-hunspell-dictionary-alist
|
|
|
|
|
(ispell-find-hunspell-dictionaries)))))
|
|
|
|
|
|
|
|
|
|
;; Substitute ispell-dictionary-alist with the list of
|
|
|
|
|
;; dictionaries corresponding to the given spellchecker.
|
|
|
|
|
;; If a recent aspell or hunspell, use the list of really
|
|
|
|
|
;; installed dictionaries and add to it elements of the original
|
|
|
|
|
;; list that are not present there. Allow distro info.
|
2008-04-24 15:36:54 +00:00
|
|
|
|
(let ((found-dicts-alist
|
2016-12-04 14:02:48 +00:00
|
|
|
|
(if ispell-encoding8-command
|
|
|
|
|
(if ispell-really-aspell
|
2013-02-28 20:01:34 +01:00
|
|
|
|
ispell-aspell-dictionary-alist
|
|
|
|
|
(if ispell-really-hunspell
|
|
|
|
|
ispell-hunspell-dictionary-alist))
|
2008-04-23 20:39:10 +00:00
|
|
|
|
nil))
|
2013-01-21 17:05:30 +01:00
|
|
|
|
(ispell-dictionary-base-alist ispell-dictionary-base-alist)
|
2008-04-23 20:39:10 +00:00
|
|
|
|
ispell-base-dicts-override-alist ; Override only base-dicts-alist
|
|
|
|
|
all-dicts-alist)
|
|
|
|
|
|
2013-01-21 17:05:30 +01:00
|
|
|
|
;; While ispell and aspell (through aliases) use the traditional
|
|
|
|
|
;; dict naming originally expected by ispell.el, hunspell
|
|
|
|
|
;; uses locale based names with no alias. We need to map
|
|
|
|
|
;; standard names to locale based names to make default dict
|
|
|
|
|
;; definitions available for hunspell.
|
|
|
|
|
(if ispell-really-hunspell
|
|
|
|
|
(let (tmp-dicts-alist)
|
|
|
|
|
(dolist (adict ispell-dictionary-base-alist)
|
|
|
|
|
(let* ((dict-name (nth 0 adict))
|
|
|
|
|
(dict-equiv
|
|
|
|
|
(cadr (assoc dict-name
|
2015-02-24 19:36:30 +01:00
|
|
|
|
ispell-dicts-name2locale-equivs-alist)))
|
2013-01-21 17:05:30 +01:00
|
|
|
|
(ispell-args (nth 5 adict))
|
|
|
|
|
(ispell-args-has-d (member "-d" ispell-args))
|
|
|
|
|
skip-dict)
|
|
|
|
|
;; Remove "-d" option from `ispell-args' if present
|
|
|
|
|
(if ispell-args-has-d
|
|
|
|
|
(let ((ispell-args-after-d
|
|
|
|
|
(cdr (cdr ispell-args-has-d)))
|
|
|
|
|
(ispell-args-before-d
|
|
|
|
|
(butlast ispell-args (length ispell-args-has-d))))
|
|
|
|
|
(setq ispell-args
|
|
|
|
|
(nconc ispell-args-before-d
|
|
|
|
|
ispell-args-after-d))))
|
|
|
|
|
;; Unless default dict, re-add "-d" option with the mapped value
|
|
|
|
|
(if dict-name
|
|
|
|
|
(if dict-equiv
|
2013-04-05 17:43:07 +02:00
|
|
|
|
(setq ispell-args
|
|
|
|
|
(nconc ispell-args (list "-d" dict-equiv)))
|
2013-01-21 17:05:30 +01:00
|
|
|
|
(message
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"ispell-set-spellchecker-params: Missing Hunspell equiv for \"%s\". Skipping."
|
2013-01-21 17:05:30 +01:00
|
|
|
|
dict-name)
|
|
|
|
|
(setq skip-dict t)))
|
|
|
|
|
|
|
|
|
|
(unless skip-dict
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(cl-pushnew (list
|
|
|
|
|
dict-name ; dict name
|
|
|
|
|
(nth 1 adict) ; casechars
|
|
|
|
|
(nth 2 adict) ; not-casechars
|
|
|
|
|
(nth 3 adict) ; otherchars
|
|
|
|
|
(nth 4 adict) ; many-otherchars-p
|
|
|
|
|
ispell-args ; ispell-args
|
|
|
|
|
(nth 6 adict) ; extended-character-mode
|
|
|
|
|
(nth 7 adict) ; dict encoding
|
|
|
|
|
)
|
|
|
|
|
tmp-dicts-alist :test #'equal)))
|
2013-01-21 17:05:30 +01:00
|
|
|
|
(setq ispell-dictionary-base-alist tmp-dicts-alist))))
|
|
|
|
|
|
2008-04-23 20:39:10 +00:00
|
|
|
|
(run-hooks 'ispell-initialize-spellchecker-hook)
|
|
|
|
|
|
2016-12-13 00:30:51 +00:00
|
|
|
|
;; Add dicts to `ispell-dictionary-alist' unless already present.
|
2008-04-23 20:39:10 +00:00
|
|
|
|
(dolist (dict (append found-dicts-alist
|
|
|
|
|
ispell-base-dicts-override-alist
|
2008-04-24 15:36:54 +00:00
|
|
|
|
ispell-dictionary-base-alist))
|
2008-04-23 20:39:10 +00:00
|
|
|
|
(unless (assoc (car dict) all-dicts-alist)
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(push dict all-dicts-alist)))
|
2012-04-16 11:49:51 +02:00
|
|
|
|
(setq ispell-dictionary-alist all-dicts-alist))
|
|
|
|
|
|
2016-12-04 14:02:48 +00:00
|
|
|
|
;; If spellchecker supports UTF-8 via command-line option, use it
|
2012-09-17 13:41:04 +08:00
|
|
|
|
;; in communication. This does not affect definitions in your
|
|
|
|
|
;; init file.
|
2016-12-04 14:02:48 +00:00
|
|
|
|
(let (tmp-dicts-alist)
|
|
|
|
|
(dolist (adict ispell-dictionary-alist)
|
|
|
|
|
(cl-pushnew (if (cadr adict) ;; Do not touch hunspell uninitialized entries
|
|
|
|
|
(list
|
|
|
|
|
(nth 0 adict) ; dict name
|
|
|
|
|
"[[:alpha:]]" ; casechars
|
|
|
|
|
"[^[:alpha:]]" ; not-casechars
|
|
|
|
|
(nth 3 adict) ; otherchars
|
|
|
|
|
(nth 4 adict) ; many-otherchars-p
|
|
|
|
|
(nth 5 adict) ; ispell-args
|
|
|
|
|
(nth 6 adict) ; extended-character-mode
|
|
|
|
|
(if ispell-encoding8-command
|
|
|
|
|
'utf-8
|
|
|
|
|
(nth 7 adict)))
|
|
|
|
|
adict)
|
|
|
|
|
tmp-dicts-alist :test #'equal))
|
|
|
|
|
(setq ispell-dictionary-alist tmp-dicts-alist))))
|
2008-04-23 20:39:10 +00:00
|
|
|
|
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(defun ispell-valid-dictionary-list ()
|
2010-09-20 13:53:42 +02:00
|
|
|
|
"Return a list of valid dictionaries.
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
The variable `ispell-library-directory' defines their location."
|
2008-04-23 20:39:10 +00:00
|
|
|
|
;; Initialize variables and dictionaries alists for desired spellchecker.
|
2016-12-04 14:39:42 +00:00
|
|
|
|
;; Make sure ispell.el is loaded to avoid some autoload loops.
|
2008-04-23 20:39:10 +00:00
|
|
|
|
(if (featurep 'ispell)
|
|
|
|
|
(ispell-set-spellchecker-params))
|
|
|
|
|
|
2005-01-31 11:54:36 +00:00
|
|
|
|
(let ((dicts (append ispell-local-dictionary-alist ispell-dictionary-alist))
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(dict-list (cons "default" nil))
|
2016-10-08 15:15:22 +03:00
|
|
|
|
(dict-locate
|
|
|
|
|
(lambda (dict &optional dir)
|
|
|
|
|
(locate-file (file-name-nondirectory dict)
|
|
|
|
|
`(,(or dir (file-name-directory dict)))
|
|
|
|
|
(unless (file-name-extension dict) '(".hash" ".has")))))
|
|
|
|
|
name dict-explt dict-bname)
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(dolist (dict dicts)
|
|
|
|
|
(setq name (car dict)
|
2016-10-08 15:15:22 +03:00
|
|
|
|
;; Explicitly (via ispell-args) specified dictionary.
|
|
|
|
|
dict-explt (car (cdr (member "-d" (nth 5 dict))))
|
|
|
|
|
dict-bname (or dict-explt name))
|
|
|
|
|
(if (and name
|
|
|
|
|
(or
|
|
|
|
|
;; Include all for Aspell (we already know existing dicts)
|
|
|
|
|
ispell-really-aspell
|
|
|
|
|
;; Include all if `ispell-library-directory' is nil (Hunspell)
|
|
|
|
|
(not ispell-library-directory)
|
|
|
|
|
;; If explicit (-d with an absolute path) and existing dict.
|
|
|
|
|
(and dict-explt
|
|
|
|
|
(file-name-absolute-p dict-explt)
|
|
|
|
|
(funcall dict-locate dict-explt))
|
|
|
|
|
;; If dict located in `ispell-library-directory'.
|
|
|
|
|
(funcall dict-locate dict-bname ispell-library-directory)))
|
2010-09-08 16:54:00 +02:00
|
|
|
|
(push name dict-list)))
|
2003-05-22 21:34:00 +00:00
|
|
|
|
dict-list))
|
|
|
|
|
|
2012-05-18 15:04:07 -04:00
|
|
|
|
;; Define commands in menu in opposite order you want them to appear.
|
1995-06-16 16:25:07 +00:00
|
|
|
|
;;;###autoload
|
2002-05-30 17:09:58 +00:00
|
|
|
|
(if ispell-menu-map-needed
|
1994-06-14 20:54:44 +00:00
|
|
|
|
(progn
|
2005-08-09 14:12:44 +00:00
|
|
|
|
(setq ispell-menu-map (make-sparse-keymap "Spell"))
|
1994-06-14 20:54:44 +00:00
|
|
|
|
(define-key ispell-menu-map [ispell-change-dictionary]
|
2009-10-23 05:15:26 +00:00
|
|
|
|
`(menu-item ,(purecopy "Change Dictionary...") ispell-change-dictionary
|
|
|
|
|
:help ,(purecopy "Supply explicit dictionary file name")))
|
1994-06-14 20:54:44 +00:00
|
|
|
|
(define-key ispell-menu-map [ispell-kill-ispell]
|
2012-04-23 12:33:25 +02:00
|
|
|
|
`(menu-item ,(purecopy "Kill Process")
|
|
|
|
|
(lambda () (interactive) (ispell-kill-ispell nil 'clear))
|
2000-08-18 18:46:25 +00:00
|
|
|
|
:enable (and (boundp 'ispell-process) ispell-process
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(eq (ispell-process-status) 'run))
|
2009-10-23 05:15:26 +00:00
|
|
|
|
:help ,(purecopy "Terminate Ispell subprocess")))
|
1994-06-14 20:54:44 +00:00
|
|
|
|
(define-key ispell-menu-map [ispell-pdict-save]
|
2009-10-23 05:15:26 +00:00
|
|
|
|
`(menu-item ,(purecopy "Save Dictionary")
|
2000-08-17 20:54:01 +00:00
|
|
|
|
(lambda () (interactive) (ispell-pdict-save t t))
|
2009-10-23 05:15:26 +00:00
|
|
|
|
:help ,(purecopy "Save personal dictionary")))
|
2002-02-17 12:15:17 +00:00
|
|
|
|
(define-key ispell-menu-map [ispell-customize]
|
2009-10-23 05:15:26 +00:00
|
|
|
|
`(menu-item ,(purecopy "Customize...")
|
2002-02-17 12:15:17 +00:00
|
|
|
|
(lambda () (interactive) (customize-group 'ispell))
|
2009-10-23 05:15:26 +00:00
|
|
|
|
:help ,(purecopy "Customize spell checking options")))
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(define-key ispell-menu-map [ispell-help]
|
|
|
|
|
;; use (x-popup-menu last-nonmenu-event(list "" ispell-help-list)) ?
|
2009-10-23 05:15:26 +00:00
|
|
|
|
`(menu-item ,(purecopy "Help")
|
2000-08-17 20:54:01 +00:00
|
|
|
|
(lambda () (interactive) (describe-function 'ispell-help))
|
2009-10-23 05:15:26 +00:00
|
|
|
|
:help ,(purecopy "Show standard Ispell keybindings and commands")))
|
2002-02-17 12:15:17 +00:00
|
|
|
|
(define-key ispell-menu-map [flyspell-mode]
|
2009-10-23 05:15:26 +00:00
|
|
|
|
`(menu-item ,(purecopy "Automatic spell checking (Flyspell)")
|
2002-02-17 12:15:17 +00:00
|
|
|
|
flyspell-mode
|
2009-10-23 05:15:26 +00:00
|
|
|
|
:help ,(purecopy "Check spelling while you edit the text")
|
2005-06-09 12:14:26 +00:00
|
|
|
|
:button (:toggle . (bound-and-true-p flyspell-mode))))
|
1994-06-14 20:54:44 +00:00
|
|
|
|
(define-key ispell-menu-map [ispell-complete-word]
|
2009-10-23 05:15:26 +00:00
|
|
|
|
`(menu-item ,(purecopy "Complete Word") ispell-complete-word
|
|
|
|
|
:help ,(purecopy "Complete word at cursor using dictionary")))
|
1994-06-14 20:54:44 +00:00
|
|
|
|
(define-key ispell-menu-map [ispell-complete-word-interior-frag]
|
2010-09-04 20:47:29 +02:00
|
|
|
|
`(menu-item ,(purecopy "Complete Word Fragment")
|
|
|
|
|
ispell-complete-word-interior-frag
|
2009-10-23 05:15:26 +00:00
|
|
|
|
:help ,(purecopy "Complete word fragment at cursor")))))
|
1994-06-14 20:54:44 +00:00
|
|
|
|
|
1995-06-16 16:25:07 +00:00
|
|
|
|
;;;###autoload
|
2002-05-30 17:09:58 +00:00
|
|
|
|
(if ispell-menu-map-needed
|
1994-06-14 20:54:44 +00:00
|
|
|
|
(progn
|
|
|
|
|
(define-key ispell-menu-map [ispell-continue]
|
2009-10-23 05:15:26 +00:00
|
|
|
|
`(menu-item ,(purecopy "Continue Spell-Checking") ispell-continue
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
:enable (and (boundp 'ispell-region-end)
|
|
|
|
|
(marker-position ispell-region-end)
|
|
|
|
|
(equal (marker-buffer ispell-region-end)
|
2000-08-17 20:54:01 +00:00
|
|
|
|
(current-buffer)))
|
2009-10-23 05:15:26 +00:00
|
|
|
|
:help ,(purecopy "Continue spell checking last region")))
|
1994-06-14 20:54:44 +00:00
|
|
|
|
(define-key ispell-menu-map [ispell-word]
|
2009-10-23 05:15:26 +00:00
|
|
|
|
`(menu-item ,(purecopy "Spell-Check Word") ispell-word
|
|
|
|
|
:help ,(purecopy "Spell-check word at cursor")))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(define-key ispell-menu-map [ispell-comments-and-strings]
|
2010-09-04 20:47:29 +02:00
|
|
|
|
`(menu-item ,(purecopy "Spell-Check Comments")
|
|
|
|
|
ispell-comments-and-strings
|
2009-10-23 05:15:26 +00:00
|
|
|
|
:help ,(purecopy "Spell-check only comments and strings")))))
|
1994-09-11 05:43:50 +00:00
|
|
|
|
|
1995-06-16 16:25:07 +00:00
|
|
|
|
;;;###autoload
|
2002-05-30 17:09:58 +00:00
|
|
|
|
(if ispell-menu-map-needed
|
1994-09-11 05:43:50 +00:00
|
|
|
|
(progn
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(define-key ispell-menu-map [ispell-region]
|
2009-10-23 05:15:26 +00:00
|
|
|
|
`(menu-item ,(purecopy "Spell-Check Region") ispell-region
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
:enable mark-active
|
2009-10-23 05:15:26 +00:00
|
|
|
|
:help ,(purecopy "Spell-check text in marked region")))
|
1994-06-14 20:54:44 +00:00
|
|
|
|
(define-key ispell-menu-map [ispell-message]
|
2009-10-23 05:15:26 +00:00
|
|
|
|
`(menu-item ,(purecopy "Spell-Check Message") ispell-message
|
2006-03-11 15:29:52 +00:00
|
|
|
|
:visible (eq major-mode 'mail-mode)
|
2009-10-23 05:15:26 +00:00
|
|
|
|
:help ,(purecopy "Skip headers and included message text")))
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(define-key ispell-menu-map [ispell-buffer]
|
2009-10-23 05:15:26 +00:00
|
|
|
|
`(menu-item ,(purecopy "Spell-Check Buffer") ispell-buffer
|
|
|
|
|
:help ,(purecopy "Check spelling of selected buffer")))
|
1994-12-10 02:01:31 +00:00
|
|
|
|
(fset 'ispell-menu-map (symbol-value 'ispell-menu-map))))
|
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
;;; **********************************************************************
|
|
|
|
|
|
2005-01-31 11:54:36 +00:00
|
|
|
|
(defvar ispell-current-dictionary nil
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
"The name of the current dictionary, or nil for the default.
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
This is passed to the Ispell process using the `-d' switch and is
|
2005-01-31 11:54:36 +00:00
|
|
|
|
used as key in `ispell-local-dictionary-alist' and `ispell-dictionary-alist'.")
|
|
|
|
|
|
2005-12-16 02:00:02 +00:00
|
|
|
|
(defvar ispell-current-personal-dictionary nil
|
|
|
|
|
"The name of the current personal dictionary, or nil for the default.
|
2015-08-25 00:42:17 -07:00
|
|
|
|
This is passed to the Ispell process using the `-p' switch.")
|
2005-12-16 02:00:02 +00:00
|
|
|
|
|
1997-09-01 07:17:07 +00:00
|
|
|
|
(defun ispell-decode-string (str)
|
2016-12-04 14:35:42 +00:00
|
|
|
|
"Decodes multibyte character strings."
|
|
|
|
|
(decode-coding-string str (ispell-get-coding-system)))
|
1997-09-01 07:17:07 +00:00
|
|
|
|
|
2005-01-17 12:07:56 +00:00
|
|
|
|
;; Return a string decoded from Nth element of the current dictionary.
|
2005-01-13 04:33:05 +00:00
|
|
|
|
(defun ispell-get-decoded-string (n)
|
2010-09-20 13:53:42 +02:00
|
|
|
|
"Get the decoded string in slot N of the descriptor of the current dict."
|
2005-01-31 11:54:36 +00:00
|
|
|
|
(let* ((slot (or
|
|
|
|
|
(assoc ispell-current-dictionary ispell-local-dictionary-alist)
|
2009-10-17 03:09:25 +00:00
|
|
|
|
(assoc ispell-current-dictionary ispell-dictionary-alist)
|
2012-03-17 11:13:19 +02:00
|
|
|
|
(error "No data for dictionary \"%s\", neither in `ispell-local-dictionary-alist' nor in `ispell-dictionary-alist'"
|
|
|
|
|
ispell-current-dictionary)))
|
2005-01-13 04:33:05 +00:00
|
|
|
|
(str (nth n slot)))
|
|
|
|
|
(when (and (> (length str) 0)
|
|
|
|
|
(not (multibyte-string-p str)))
|
|
|
|
|
(setq str (ispell-decode-string str))
|
2005-01-17 12:07:56 +00:00
|
|
|
|
(or (multibyte-string-p str)
|
2008-05-05 10:42:39 +00:00
|
|
|
|
(setq str (string-to-multibyte str))))
|
2005-01-13 04:33:05 +00:00
|
|
|
|
str))
|
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defun ispell-get-casechars ()
|
2005-01-13 04:33:05 +00:00
|
|
|
|
(ispell-get-decoded-string 1))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defun ispell-get-not-casechars ()
|
2005-01-13 04:33:05 +00:00
|
|
|
|
(ispell-get-decoded-string 2))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defun ispell-get-otherchars ()
|
2005-01-13 04:33:05 +00:00
|
|
|
|
(ispell-get-decoded-string 3))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defun ispell-get-many-otherchars-p ()
|
2005-01-31 11:54:36 +00:00
|
|
|
|
(nth 4 (or (assoc ispell-current-dictionary ispell-local-dictionary-alist)
|
|
|
|
|
(assoc ispell-current-dictionary ispell-dictionary-alist))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defun ispell-get-ispell-args ()
|
2005-01-31 11:54:36 +00:00
|
|
|
|
(nth 5 (or (assoc ispell-current-dictionary ispell-local-dictionary-alist)
|
|
|
|
|
(assoc ispell-current-dictionary ispell-dictionary-alist))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defun ispell-get-extended-character-mode ()
|
2012-03-30 11:45:11 +02:00
|
|
|
|
(if ispell-really-hunspell ;; hunspell treats ~word as ordinary words
|
|
|
|
|
nil ;; in pipe mode. Disable extended-char-mode
|
|
|
|
|
(nth 6 (or (assoc ispell-current-dictionary ispell-local-dictionary-alist)
|
|
|
|
|
(assoc ispell-current-dictionary ispell-dictionary-alist)))))
|
1997-09-01 07:17:07 +00:00
|
|
|
|
(defun ispell-get-coding-system ()
|
2005-01-31 11:54:36 +00:00
|
|
|
|
(nth 7 (or (assoc ispell-current-dictionary ispell-local-dictionary-alist)
|
|
|
|
|
(assoc ispell-current-dictionary ispell-dictionary-alist))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defvar ispell-pdict-modified-p nil
|
1994-05-21 08:04:20 +00:00
|
|
|
|
"Non-nil means personal dictionary has modifications to be saved.")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2012-05-18 15:04:07 -04:00
|
|
|
|
;; If you want to save the dictionary when quitting, must do so explicitly.
|
|
|
|
|
;; When non-nil, the spell session is terminated.
|
|
|
|
|
;; When numeric, contains cursor location in buffer, and cursor remains there.
|
1994-05-21 08:04:20 +00:00
|
|
|
|
(defvar ispell-quit nil)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(defvar ispell-process-directory nil
|
|
|
|
|
"The directory where `ispell-process' was started.")
|
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defvar ispell-filter nil
|
1994-05-21 08:04:20 +00:00
|
|
|
|
"Output filter from piped calls to Ispell.")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
(defvar ispell-filter-continue nil
|
1994-05-21 08:04:20 +00:00
|
|
|
|
"Control variable for Ispell filter function.")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(defvar ispell-output-buffer nil
|
|
|
|
|
"Buffer used for reading output of a synchronous Ispell subprocess.")
|
|
|
|
|
|
|
|
|
|
(defvar ispell-session-buffer nil
|
|
|
|
|
"Buffer used for passing input to a synchronous Ispell subprocess.")
|
|
|
|
|
|
|
|
|
|
(defvar ispell-cmd-args nil
|
|
|
|
|
"Command-line arguments to pass to a synchronous Ispell subprocess.")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
(defvar ispell-query-replace-marker (make-marker)
|
1994-05-21 08:04:20 +00:00
|
|
|
|
"Marker for `query-replace' processing.")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(defvar ispell-recursive-edit-marker (make-marker)
|
|
|
|
|
"Marker for return point from recursive edit.")
|
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defvar ispell-checking-message nil
|
2003-05-22 21:34:00 +00:00
|
|
|
|
"Non-nil when we're checking a mail message.
|
|
|
|
|
Set to the MIME boundary locations when checking messages.")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
(defconst ispell-choices-buffer "*Choices*")
|
|
|
|
|
|
1994-05-21 08:04:20 +00:00
|
|
|
|
(defvar ispell-overlay nil "Overlay variable for Ispell highlighting.")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
;;; *** Buffer Local Definitions ***
|
|
|
|
|
|
2003-02-04 13:30:45 +00:00
|
|
|
|
(defconst ispell-words-keyword "LocalWords: "
|
1994-03-02 04:56:25 +00:00
|
|
|
|
"The keyword for local oddly-spelled words to accept.
|
|
|
|
|
The keyword will be followed by any number of local word spellings.
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
There can be multiple instances of this keyword in the file.")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
(defconst ispell-dictionary-keyword "Local IspellDict: "
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
"The keyword for a local dictionary to use.
|
2005-01-31 11:54:36 +00:00
|
|
|
|
The keyword must be followed by a valid dictionary name, defined in
|
|
|
|
|
`ispell-local-dictionary-alist' or `ispell-dictionary-alist'.
|
|
|
|
|
When multiple occurrences exist, the last keyword
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
definition is used.")
|
|
|
|
|
|
|
|
|
|
(defconst ispell-pdict-keyword "Local IspellPersDict: "
|
|
|
|
|
"The keyword for defining buffer local dictionaries.
|
|
|
|
|
Keyword must be followed by the filename of a personal dictionary.
|
|
|
|
|
The last occurring definition in the buffer will be used.")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
(defconst ispell-parsing-keyword "Local IspellParsing: "
|
1994-05-21 08:04:20 +00:00
|
|
|
|
"The keyword for overriding default Ispell parsing.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
The above keyword string should be followed by `latex-mode' or
|
|
|
|
|
`nroff-mode' to put the current buffer into the desired parsing mode.
|
|
|
|
|
|
|
|
|
|
Extended character mode can be changed for this buffer by placing
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
a `~' followed by an extended-character mode -- such as `~.tex'.
|
|
|
|
|
The last occurring definition in the buffer will be used.")
|
|
|
|
|
|
2015-12-14 17:17:31 +00:00
|
|
|
|
(defun ispell--\\w-filter (char)
|
|
|
|
|
"Return CHAR in a string when CHAR doesn't have \"word\" syntax,
|
|
|
|
|
nil otherwise. CHAR must be a character."
|
|
|
|
|
(let ((str (string char)))
|
|
|
|
|
(and
|
|
|
|
|
(not (string-match "\\w" str))
|
|
|
|
|
str)))
|
|
|
|
|
|
|
|
|
|
(defun ispell--make-\\w-expression (chars)
|
|
|
|
|
"Make a regular expression like \"\\(\\w\\|[-_]\\)\".
|
|
|
|
|
This (parenthesized) expression matches either a character of
|
|
|
|
|
\"word\" syntax or one in CHARS.
|
|
|
|
|
|
|
|
|
|
CHARS is a string of characters. A member of CHARS is omitted
|
|
|
|
|
from the expression if it already has word syntax. (Be careful
|
|
|
|
|
about special characters such as ?\\, ?^, ?], and ?- in CHARS.)
|
|
|
|
|
If after this filtering there are no chars left, or only one, a
|
|
|
|
|
special form of the expression is generated."
|
|
|
|
|
(let ((filtered
|
|
|
|
|
(mapconcat #'ispell--\\w-filter chars "")))
|
|
|
|
|
(concat
|
|
|
|
|
"\\(\\w"
|
|
|
|
|
(cond
|
|
|
|
|
((equal filtered "")
|
|
|
|
|
"\\)")
|
|
|
|
|
((eq (length filtered) 1)
|
|
|
|
|
(concat "\\|" filtered "\\)"))
|
|
|
|
|
(t
|
|
|
|
|
(concat "\\|[" filtered "]\\)"))))))
|
|
|
|
|
|
|
|
|
|
(defun ispell--make-filename-or-URL-re ()
|
|
|
|
|
"Construct a regexp to match some file names or URLs or email addresses.
|
|
|
|
|
The expression is crafted to match as great a variety of these
|
|
|
|
|
objects as practicable, without too many false matches happening."
|
|
|
|
|
(concat ;"\\(--+\\|_+\\|"
|
|
|
|
|
"\\(/\\w\\|\\("
|
|
|
|
|
(ispell--make-\\w-expression "-_")
|
|
|
|
|
"+[.:@]\\)\\)"
|
|
|
|
|
(ispell--make-\\w-expression "-_")
|
|
|
|
|
"*\\([.:/@]+"
|
|
|
|
|
(ispell--make-\\w-expression "-_~=?&")
|
|
|
|
|
"+\\)+"
|
|
|
|
|
;"\\)"
|
|
|
|
|
))
|
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defvar ispell-skip-region-alist
|
2009-10-30 02:00:11 +00:00
|
|
|
|
`((ispell-words-keyword forward-line)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(ispell-dictionary-keyword forward-line)
|
|
|
|
|
(ispell-pdict-keyword forward-line)
|
|
|
|
|
(ispell-parsing-keyword forward-line)
|
2010-09-04 20:47:29 +02:00
|
|
|
|
(,(purecopy "^---*BEGIN PGP [A-Z ]*--*")
|
|
|
|
|
. ,(purecopy "^---*END PGP [A-Z ]*--*"))
|
2003-05-22 21:34:00 +00:00
|
|
|
|
;; assume multiline uuencoded file? "\nM.*$"?
|
2009-10-30 02:00:11 +00:00
|
|
|
|
(,(purecopy "^begin [0-9][0-9][0-9] [^ \t]+$") . ,(purecopy "\nend\n"))
|
|
|
|
|
(,(purecopy "^%!PS-Adobe-[123].0") . ,(purecopy "\n%%EOF\n"))
|
|
|
|
|
(,(purecopy "^---* \\(Start of \\)?[Ff]orwarded [Mm]essage")
|
|
|
|
|
. ,(purecopy "^---* End of [Ff]orwarded [Mm]essage"))
|
2006-03-18 14:11:55 +00:00
|
|
|
|
;; Matches e-mail addresses, file names, http addresses, etc. The
|
|
|
|
|
;; `-+' `_+' patterns are necessary for performance reasons when
|
|
|
|
|
;; `-' or `_' part of word syntax.
|
2015-12-14 17:17:31 +00:00
|
|
|
|
; (,(purecopy "\\(--+\\|_+\\|\\(/\\w\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)"))
|
2003-05-22 21:34:00 +00:00
|
|
|
|
;; above checks /.\w sequences
|
|
|
|
|
;;("\\(--+\\|\\(/\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)")
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; This is a pretty complex regexp. It can be simplified to the following:
|
2000-08-17 20:54:01 +00:00
|
|
|
|
;; "\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_]\\|~\\)+\\)+"
|
1999-05-09 06:34:35 +00:00
|
|
|
|
;; but some valid text will be skipped, e.g. "his/her". This could be
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; fixed up (at the expense of a moderately more complex regexp)
|
|
|
|
|
;; by not allowing "/" to be the character which triggers the
|
|
|
|
|
;; identification of the computer name, e.g.:
|
2000-08-17 20:54:01 +00:00
|
|
|
|
;; "\\(\\w\\|[-_]\\)+[.:@]\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_]\\|~\\)+\\)+"
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
)
|
1998-06-20 22:06:30 +00:00
|
|
|
|
"Alist expressing beginning and end of regions not to spell check.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
The alist key must be a regular expression.
|
|
|
|
|
Valid forms include:
|
|
|
|
|
(KEY) - just skip the key.
|
1998-06-20 22:06:30 +00:00
|
|
|
|
(KEY . REGEXP) - skip to the end of REGEXP. REGEXP may be string or symbol.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(KEY REGEXP) - skip to end of REGEXP. REGEXP must be a string.
|
1998-06-20 22:06:30 +00:00
|
|
|
|
(KEY FUNCTION ARGS) - FUNCTION called with ARGS returns end of region.")
|
2005-12-16 02:00:02 +00:00
|
|
|
|
(put 'ispell-skip-region-alist 'risky-local-variable t)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defvar ispell-tex-skip-alists
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
(purecopy
|
1999-05-09 06:34:35 +00:00
|
|
|
|
'((;;("%\\[" . "%\\]") ; AMStex block comment...
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; All the standard LaTeX keywords from L. Lamport's guide:
|
|
|
|
|
;; \cite, \hspace, \hspace*, \hyphenation, \include, \includeonly, \input,
|
|
|
|
|
;; \label, \nocite, \rule (in ispell - rest included here)
|
|
|
|
|
("\\\\addcontentsline" ispell-tex-arg-end 2)
|
|
|
|
|
("\\\\add\\(tocontents\\|vspace\\)" ispell-tex-arg-end)
|
|
|
|
|
("\\\\\\([aA]lph\\|arabic\\)" ispell-tex-arg-end)
|
1999-05-09 06:34:35 +00:00
|
|
|
|
;;("\\\\author" ispell-tex-arg-end)
|
2016-04-16 12:22:03 +03:00
|
|
|
|
("\\\\cref" ispell-tex-arg-end)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
("\\\\bibliographystyle" ispell-tex-arg-end)
|
|
|
|
|
("\\\\makebox" ispell-tex-arg-end 0)
|
2000-08-17 20:54:01 +00:00
|
|
|
|
("\\\\e?psfig" ispell-tex-arg-end)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
("\\\\document\\(class\\|style\\)" .
|
|
|
|
|
"\\\\begin[ \t\n]*{[ \t\n]*document[ \t\n]*}"))
|
|
|
|
|
(;; delimited with \begin. In ispell: displaymath, eqnarray, eqnarray*,
|
|
|
|
|
;; equation, minipage, picture, tabular, tabular* (ispell)
|
2000-08-17 20:54:01 +00:00
|
|
|
|
("\\(figure\\|table\\)\\*?" ispell-tex-arg-end 0)
|
|
|
|
|
("list" ispell-tex-arg-end 2)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
("program" . "\\\\end[ \t\n]*{[ \t\n]*program[ \t\n]*}")
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
("verbatim\\*?" . "\\\\end[ \t\n]*{[ \t\n]*verbatim\\*?[ \t\n]*}"))))
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Lists of regions to be skipped in TeX mode.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
First list is used raw.
|
|
|
|
|
Second list has key placed inside \\begin{}.
|
|
|
|
|
|
|
|
|
|
Delete or add any regions you want to be automatically selected
|
|
|
|
|
for skipping in latex mode.")
|
2005-12-16 02:00:02 +00:00
|
|
|
|
(put 'ispell-tex-skip-alist 'risky-local-variable t)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
|
|
|
|
|
2003-05-22 21:34:00 +00:00
|
|
|
|
;;;###autoload
|
* textmodes/tex-mode.el (tex-alt-dvi-print-command)
(tex-dvi-print-command, tex-bibtex-command, tex-start-commands)
(tex-start-options, slitex-run-command, latex-run-command)
(tex-run-command, tex-directory):
* textmodes/ispell.el (ispell-html-skip-alists)
(ispell-tex-skip-alists, ispell-tex-skip-alists):
* textmodes/fill.el (adaptive-fill-first-line-regexp):
(adaptive-fill-regexp):
* textmodes/dns-mode.el (auto-mode-alist):
* progmodes/python.el (interpreter-mode-alist):
* progmodes/etags.el (tags-compression-info-list):
* progmodes/etags.el (tags-file-name):
* net/browse-url.el (browse-url-galeon-program)
(browse-url-firefox-program):
* mail/sendmail.el (mail-signature-file)
(mail-citation-prefix-regexp):
* international/mule-conf.el (eight-bit):
* international/latexenc.el (latex-inputenc-coding-alist):
* international/fontset.el (x-pixel-size-width-font-regexp):
* emacs-lisp/warnings.el (warning-type-format):
* emacs-lisp/trace.el (trace-buffer):
* emacs-lisp/lisp-mode.el (lisp-interaction-mode-map)
(emacs-lisp-mode-map):
* calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(hebrew-holidays-4, hebrew-holidays-3, hebrew-holidays-2)
(hebrew-holidays-1, holiday-oriental-holidays)
(holiday-general-holidays):
* x-dnd.el (x-dnd-known-types):
* tool-bar.el (tool-bar):
* startup.el (site-run-file):
* shell.el (shell-dumb-shell-regexp):
* rfn-eshadow.el (file-name-shadow-tty-properties)
(file-name-shadow-properties):
* paths.el (remote-shell-program, news-directory):
* mouse.el ([C-down-mouse-3]):
* menu-bar.el (menu-bar-tools-menu):
* jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions, jka-compr-compression-info-list)
(jka-compr-compression-info-list):
* isearch.el (search-whitespace-regexp):
* image-file.el (image-file-name-extensions):
* find-dired.el (find-ls-option):
* files.el (directory-listing-before-filename-regexp)
(directory-free-space-args, insert-directory-program)
(list-directory-brief-switches, magic-fallback-mode-alist)
(magic-fallback-mode-alist, auto-mode-interpreter-regexp)
(automount-dir-prefix):
* faces.el (face-x-resources, x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, face-x-resources)
(face-font-registry-alternatives, face-font-registry-alternatives)
(face-font-family-alternatives):
* facemenu.el (facemenu-add-new-face, facemenu-background-menu)
(facemenu-foreground-menu, facemenu-face-menu):
* epa-hook.el (epa-file-name-regexp):
* dnd.el (dnd-protocol-alist):
* textmodes/rst.el (auto-mode-alist):
* button.el (default-button): Purecopy strings.
2009-11-06 05:16:23 +00:00
|
|
|
|
(defconst ispell-html-skip-alists
|
2003-05-22 21:34:00 +00:00
|
|
|
|
'(("<[cC][oO][dD][eE]\\>[^>]*>" "</[cC][oO][dD][eE]*>")
|
|
|
|
|
("<[sS][cC][rR][iI][pP][tT]\\>[^>]*>" "</[sS][cC][rR][iI][pP][tT]>")
|
|
|
|
|
("<[aA][pP][pP][lL][eE][tT]\\>[^>]*>" "</[aA][pP][pP][lL][eE][tT]>")
|
|
|
|
|
("<[vV][eE][rR][bB]\\>[^>]*>" "<[vV][eE][rR][bB]\\>[^>]*>")
|
|
|
|
|
;;("<[tT][tT]\\>[^>]*>" "<[tT][tT]\\>[^>]*>")
|
|
|
|
|
("<[tT][tT]/" "/")
|
|
|
|
|
("<[^ \t\n>]" ">")
|
|
|
|
|
("&[^ \t\n;]" "[; \t\n]"))
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Lists of start and end keys to skip in HTML buffers.
|
2009-01-09 02:59:52 +00:00
|
|
|
|
Same format as `ispell-skip-region-alist'.
|
2003-05-22 21:34:00 +00:00
|
|
|
|
Note - substrings of other matches must come last
|
2004-09-02 09:42:13 +00:00
|
|
|
|
(e.g. \"<[tT][tT]/\" and \"<[^ \\t\\n>]\").")
|
2005-12-16 02:00:02 +00:00
|
|
|
|
(put 'ispell-html-skip-alists 'risky-local-variable t)
|
2003-05-22 21:34:00 +00:00
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defvar ispell-local-pdict ispell-personal-dictionary
|
1994-05-21 07:38:10 +00:00
|
|
|
|
"A buffer local variable containing the current personal dictionary.
|
1994-05-21 08:04:20 +00:00
|
|
|
|
If non-nil, the value must be a string, which is a file name.
|
1994-05-21 07:38:10 +00:00
|
|
|
|
|
1994-05-21 08:04:20 +00:00
|
|
|
|
If you specify a personal dictionary for the current buffer which is
|
|
|
|
|
different from the current personal dictionary, the effect is similar
|
|
|
|
|
to calling \\[ispell-change-dictionary]. This variable is automatically
|
|
|
|
|
set when defined in the file with either `ispell-pdict-keyword' or the
|
|
|
|
|
local variable syntax.")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
(make-variable-buffer-local 'ispell-local-pdict)
|
2008-01-03 06:41:49 +00:00
|
|
|
|
;;;###autoload(put 'ispell-local-pdict 'safe-local-variable 'stringp)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
(defvar ispell-buffer-local-name nil
|
|
|
|
|
"Contains the buffer name if local word definitions were used.
|
|
|
|
|
Ispell is then restarted because the local words could conflict.")
|
|
|
|
|
|
2012-04-23 12:33:25 +02:00
|
|
|
|
(defvar ispell-buffer-session-localwords nil
|
|
|
|
|
"List of words accepted for session in this buffer.")
|
|
|
|
|
|
|
|
|
|
(make-variable-buffer-local 'ispell-buffer-session-localwords)
|
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defvar ispell-parser 'use-mode-name
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Indicates whether ispell should parse the current buffer as TeX Code.
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
Special value `use-mode-name' tries to guess using the name of `major-mode'.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
Default parser is `nroff'.
|
|
|
|
|
Currently the only other valid parser is `tex'.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
You can set this variable in hooks in your init file -- eg:
|
|
|
|
|
|
Prefer directed to neutral quotes
Prefer directed to neutral quotes in docstings and diagnostics.
In docstrings, escape apostrophes that would otherwise be translated
to curved quotes using the newer, simpler rules.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-lang.el (math-read-giac-subscr)
(math-read-math-subscr):
* lisp/calc/calc-misc.el (report-calc-bug):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/dabbrev.el (dabbrev-expand):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
* lisp/emacs-lisp/elint.el (elint-get-top-forms):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emulation/viper-cmd.el (viper-toggle-search-style):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-arg.el (eshell-parse-arguments):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/files-x.el (modify-file-local-variable):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer)
(filesets-update-pre010505):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/gnus/auth-source.el (auth-source-netrc-parse-entries):
* lisp/gnus/gnus-agent.el (gnus-agent-check-overview-buffer)
(gnus-agent-fetch-headers):
* lisp/gnus/gnus-int.el (gnus-start-news-server):
* lisp/gnus/gnus-registry.el:
(gnus-registry--split-fancy-with-parent-internal):
* lisp/gnus/gnus-score.el (gnus-summary-increase-score):
* lisp/gnus/gnus-start.el (gnus-convert-old-newsrc):
* lisp/gnus/gnus-topic.el (gnus-topic-rename):
* lisp/gnus/legacy-gnus-agent.el (gnus-agent-unlist-expire-days):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/gnus/spam.el (spam-check-blackholes):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/tramp-cache.el:
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-bibtex.el (org-bibtex-fields):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/play/dunnet.el (dun-score, dun-help, dun-endgame-question)
(dun-rooms, dun-endgame-questions):
* lisp/progmodes/ada-mode.el (ada-goto-matching-start):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/antlr-mode.el (antlr-options-alists):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/server.el (server-get-auth-key):
* lisp/subr.el (version-to-list):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/vc/ediff-diff.el (ediff-same-contents):
* lisp/vc/vc-cvs.el (vc-cvs-mode-line-string):
* test/automated/tramp-tests.el (tramp-test33-asynchronous-requests):
Use directed rather than neutral quotes in diagnostics.
2015-08-24 23:39:33 -07:00
|
|
|
|
\(add-hook \\='tex-mode-hook (lambda () (setq ispell-parser \\='tex)))")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
(defvar ispell-region-end (make-marker)
|
|
|
|
|
"Marker that allows spelling continuations.")
|
|
|
|
|
|
1994-09-16 23:10:44 +00:00
|
|
|
|
(defvar ispell-check-only nil
|
|
|
|
|
"If non-nil, `ispell-word' does not try to correct the word.")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1994-12-10 02:01:31 +00:00
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
;;; **********************************************************************
|
|
|
|
|
;;; **********************************************************************
|
|
|
|
|
|
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
2003-08-02 22:06:12 +00:00
|
|
|
|
;;;###autoload (define-key esc-map "$" 'ispell-word)
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
|
1994-05-21 07:38:10 +00:00
|
|
|
|
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(defun ispell-accept-output (&optional timeout-secs timeout-msecs)
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"Wait for output from Ispell process, or TIMEOUT-SECS and TIMEOUT-MSECS.
|
Disambiguate function and variable references in docstrings.
* lisp/comint.el (comint-history-isearch-message): Fix ambiguous doc
string cross-reference(s).
* lisp/ffap.el (ffap-string-at-point-region, ffap-next)
(ffap-string-at-point, ffap-string-around)
(ffap-copy-string-as-kill, ffap-highlight-overlay)
(ffap-literally): Fix ambiguous doc string cross-reference(s).
* lisp/font-lock.el (font-lock-keywords-alist)
(font-lock-removed-keywords-alist): Fix ambiguous doc string
cross-reference(s).
* lisp/help-mode.el (help-xref-symbol-regexp): Add "call" as a hint for
a cross-reference to a function.
* lisp/info.el (Info-find-emacs-command-nodes): Fix ambiguous doc
string cross-reference(s).
* lisp/isearch.el (isearch-message-function, isearch-fail-pos): Fix
ambiguous doc string cross-reference(s).
* lisp/misearch.el (multi-isearch-next-buffer-function): Fix ambiguous
doc string cross-reference(s).
* lisp/newcomment.el (comment-box): Fix ambiguous doc string
cross-reference(s).
* lisp/printing.el (pr-txt-printer-alist, pr-ps-printer-alist)
(pr-setting-database): Fix ambiguous doc string
cross-reference(s).
* lisp/ps-print.el (ps-even-or-odd-pages, ps-spool-buffer-with-faces)
(ps-n-up-filling-database): Fix ambiguous doc string
cross-reference(s).
* lisp/server.el (server-buffer, server-log): Fix ambiguous doc string
cross-reference(s).
* lisp/simple.el (newline, delete-backward-char, delete-forward-char)
(minibuffer-history-isearch-message, kill-line, track-eol)
(temporary-goal-column): Fix ambiguous doc string
cross-reference(s).
* lisp/whitespace.el (whitespace-point)
(whitespace-font-lock-refontify, whitespace-bob-marker)
(whitespace-eob-marker): Fix ambiguous doc string
cross-reference(s).
* lisp/calc/calc.el (calc-highlight-selections-with-faces)
(calc-dispatch): Fix ambiguous doc string cross-reference(s).
* lisp/emacs-lisp/edebug.el (edebug-read, edebug-eval-defun): Fix
ambiguous doc string cross-reference(s).
* lisp/gnus/gnus-start.el (gnus-check-new-newsgroups): Fix ambiguous doc string
cross-reference(s).
* lisp/gnus/gnus-sum.el (gnus-summary-newsgroup-prefix): Fix ambiguous doc string
cross-reference(s).
* lisp/international/mule.el (add-to-coding-system-list): Fix ambiguous
doc string cross-reference(s).
* lisp/progmodes/cc-fonts.el (c-font-lock-keywords-3)
(c++-font-lock-keywords-3, objc-font-lock-keywords-3)
(java-font-lock-keywords-3, idl-font-lock-keywords-3)
(pike-font-lock-keywords-3): Fix ambiguous doc string
cross-reference(s).
* lisp/progmodes/compile.el (compile): Fix ambiguous doc string
cross-reference(s).
* lisp/progmodes/etags.el (tags-table-files)
(tags-table-files-function, tags-included-tables-function): Fix
ambiguous doc string cross-reference(s).
* lisp/progmodes/gdb-mi.el (gdb, gdb-setup-windows)
(gdb-restore-windows): Fix ambiguous doc string
cross-reference(s).
* lisp/textmodes/flyspell.el (flyspell-mark-duplications-flag)
(flyspell-default-deplacement-commands): Fix ambiguous doc string
cross-reference(s).
* lisp/textmodes/ispell.el (ispell-accept-output): Fix ambiguous doc
string cross-reference(s).
* lisp/textmodes/sgml-mode.el (html-tag-help): Fix ambiguous doc string
cross-reference(s).
* lisp/vc/compare-w.el (compare-ignore-whitespace)
(compare-ignore-case, compare-windows-dehighlight): Fix ambiguous
doc string cross-reference(s).
* lisp/vc/diff.el (diff): Fix ambiguous doc string cross-reference(s).
* src/insdel.c (Fcombine_after_change_execute, syms_of_insdel): Fix
ambiguous doc string cross-reference(s).
* src/keyboard.c (Fcommand_execute, syms_of_keyboard): Fix ambiguous
doc string cross-reference(s).
* src/window.c (Fwindow_point, syms_of_window): Fix ambiguous doc
string cross-reference(s).
Fixes: debbugs:12686
2013-01-11 18:08:55 -05:00
|
|
|
|
If asynchronous subprocesses are not supported, call function `ispell-filter'
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
and pass it the output of the last Ispell invocation."
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(if ispell-async-processp
|
|
|
|
|
(accept-process-output ispell-process timeout-secs timeout-msecs)
|
|
|
|
|
(if (null ispell-process)
|
|
|
|
|
(error "No Ispell process to read output from!")
|
|
|
|
|
(let ((buf ispell-output-buffer)
|
|
|
|
|
ispell-output)
|
|
|
|
|
(if (not (bufferp buf))
|
|
|
|
|
(setq ispell-filter nil)
|
2009-08-29 14:48:10 +00:00
|
|
|
|
(with-current-buffer buf
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(setq ispell-output (buffer-substring-no-properties
|
|
|
|
|
(point-min) (point-max))))
|
|
|
|
|
(ispell-filter t ispell-output)
|
2009-08-29 14:48:10 +00:00
|
|
|
|
(with-current-buffer buf
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(erase-buffer)))))))
|
|
|
|
|
|
2004-09-04 13:46:13 +00:00
|
|
|
|
(defun ispell-send-replacement (misspelled replacement)
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"Notify Aspell that MISSPELLED should be spelled REPLACEMENT.
|
2016-01-24 20:30:39 +00:00
|
|
|
|
This allows improving the suggestion list based on actual misspellings."
|
2004-09-04 13:46:13 +00:00
|
|
|
|
(and ispell-really-aspell
|
|
|
|
|
(ispell-send-string (concat "$$ra " misspelled "," replacement "\n"))))
|
|
|
|
|
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
|
|
|
|
|
(defun ispell-send-string (string)
|
|
|
|
|
"Send the string STRING to the Ispell process."
|
|
|
|
|
(if ispell-async-processp
|
|
|
|
|
(process-send-string ispell-process string)
|
|
|
|
|
;; Asynchronous subprocesses aren't supported on this losing system.
|
|
|
|
|
;; We keep all the directives passed to Ispell during the entire
|
|
|
|
|
;; session in a buffer, and pass them anew each time we invoke
|
|
|
|
|
;; Ispell to process another chunk of text. (Yes, I know this is a
|
|
|
|
|
;; terrible kludge, and it's a bit slow, but it does get the work done.)
|
|
|
|
|
(let ((cmd (aref string 0))
|
|
|
|
|
;; The following commands are not passed to Ispell until
|
2003-01-06 20:46:57 +00:00
|
|
|
|
;; we have a *real* reason to invoke it.
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(cmds-to-defer '(?* ?@ ?~ ?+ ?- ?! ?%))
|
|
|
|
|
(session-buf ispell-session-buffer)
|
|
|
|
|
(output-buf ispell-output-buffer)
|
|
|
|
|
(ispell-args ispell-cmd-args)
|
|
|
|
|
(defdir ispell-process-directory)
|
|
|
|
|
prev-pos)
|
2009-08-28 16:29:25 +00:00
|
|
|
|
(with-current-buffer session-buf
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(setq prev-pos (point))
|
|
|
|
|
(setq default-directory defdir)
|
|
|
|
|
(insert string)
|
|
|
|
|
(if (not (memq cmd cmds-to-defer))
|
|
|
|
|
(let (coding-system-for-read coding-system-for-write status)
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(if (and (boundp 'enable-multibyte-characters)
|
|
|
|
|
enable-multibyte-characters)
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(setq coding-system-for-read (ispell-get-coding-system)
|
|
|
|
|
coding-system-for-write (ispell-get-coding-system)))
|
|
|
|
|
(set-buffer output-buf)
|
|
|
|
|
(erase-buffer)
|
|
|
|
|
(set-buffer session-buf)
|
|
|
|
|
(setq status
|
2007-03-20 16:23:09 +00:00
|
|
|
|
(apply 'ispell-call-process-region
|
|
|
|
|
(point-min) (point-max)
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
ispell-program-name nil
|
|
|
|
|
output-buf nil
|
2008-12-18 18:44:31 +00:00
|
|
|
|
"-a"
|
|
|
|
|
;; hunspell -m option means something different
|
|
|
|
|
(if ispell-really-hunspell "" "-m")
|
|
|
|
|
ispell-args))
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(set-buffer output-buf)
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(save-match-data
|
|
|
|
|
(if (not (looking-at "@(#) "))
|
|
|
|
|
(error "Ispell error: %s"
|
|
|
|
|
(buffer-substring-no-properties
|
|
|
|
|
(point) (progn (end-of-line) (point)))))
|
|
|
|
|
;; If STRING is "^Z\n", we just started Ispell and need
|
|
|
|
|
;; to retain its version ID line in the output buffer.
|
|
|
|
|
;; Otherwise, remove the ID line, as it will confuse
|
|
|
|
|
;; `ispell-filter'.
|
|
|
|
|
(or (string= string "\032\n")
|
|
|
|
|
(progn
|
|
|
|
|
(forward-line)
|
|
|
|
|
(delete-region (point-min) (point))))
|
|
|
|
|
;; If STRING begins with ^ or any normal character, we need
|
|
|
|
|
;; to remove the last line from the session buffer, since it
|
|
|
|
|
;; was just spell-checked, and we don't want to check it again.
|
|
|
|
|
;; The same goes for the # command, since Ispell already saved
|
|
|
|
|
;; the personal dictionary.
|
|
|
|
|
(set-buffer session-buf)
|
|
|
|
|
(delete-region prev-pos (point))
|
|
|
|
|
;; Ispell run synchronously saves the personal dictionary
|
|
|
|
|
;; after each successful command. So we can remove any
|
|
|
|
|
;; lines in the session buffer that insert words into the
|
|
|
|
|
;; dictionary.
|
|
|
|
|
(if (memq status '(0 nil))
|
|
|
|
|
(let ((more-lines t))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while more-lines
|
|
|
|
|
(if (looking-at "^\\*")
|
|
|
|
|
(let ((start (point)))
|
|
|
|
|
(forward-line)
|
|
|
|
|
(delete-region start (point)))
|
|
|
|
|
(setq more-lines (= 0 (forward-line))))))))))))))
|
|
|
|
|
|
2008-04-26 20:14:30 +00:00
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
;;;###autoload
|
2007-10-18 00:07:48 +00:00
|
|
|
|
(defun ispell-word (&optional following quietly continue region)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
"Check spelling of word under or before the cursor.
|
1994-05-21 08:04:20 +00:00
|
|
|
|
If the word is not found in dictionary, display possible corrections
|
1994-12-10 02:01:31 +00:00
|
|
|
|
in a window allowing you to choose one.
|
1994-05-21 08:04:20 +00:00
|
|
|
|
|
1994-05-21 07:38:10 +00:00
|
|
|
|
If optional argument FOLLOWING is non-nil or if `ispell-following-word'
|
1994-03-02 04:56:25 +00:00
|
|
|
|
is non-nil when called interactively, then the following word
|
2015-09-17 16:08:20 -07:00
|
|
|
|
\(rather than preceding) is checked when the cursor is not over a word.
|
1994-05-21 07:38:10 +00:00
|
|
|
|
When the optional argument QUIETLY is non-nil or `ispell-quietly' is non-nil
|
1994-03-02 04:56:25 +00:00
|
|
|
|
when called interactively, non-corrective messages are suppressed.
|
|
|
|
|
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
With a prefix argument (or if CONTINUE is non-nil),
|
|
|
|
|
resume interrupted spell-checking of a buffer or region.
|
|
|
|
|
|
2007-10-18 00:07:48 +00:00
|
|
|
|
Interactively, in Transient Mark mode when the mark is active, call
|
|
|
|
|
`ispell-region' to check the active region for spelling errors.
|
|
|
|
|
|
2005-01-31 11:54:36 +00:00
|
|
|
|
Word syntax is controlled by the definition of the chosen dictionary,
|
|
|
|
|
which is in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
This will check or reload the dictionary. Use \\[ispell-change-dictionary]
|
2000-01-10 12:06:33 +00:00
|
|
|
|
or \\[ispell-region] to update the Ispell process.
|
|
|
|
|
|
2007-02-14 12:42:01 +00:00
|
|
|
|
Return values:
|
2003-05-22 21:34:00 +00:00
|
|
|
|
nil word is correct or spelling is accepted.
|
2000-01-10 12:06:33 +00:00
|
|
|
|
0 word is inserted into buffer-local definitions.
|
|
|
|
|
\"word\" word corrected from word list.
|
2015-09-17 16:08:20 -07:00
|
|
|
|
\(\"word\" arg) word is hand entered.
|
2000-01-10 12:06:33 +00:00
|
|
|
|
quit spell session exited."
|
2007-10-18 00:07:48 +00:00
|
|
|
|
(interactive (list ispell-following-word ispell-quietly current-prefix-arg t))
|
2007-10-14 20:40:53 +00:00
|
|
|
|
(cond
|
2012-05-28 18:11:15 +02:00
|
|
|
|
((and region
|
|
|
|
|
(if (featurep 'emacs)
|
|
|
|
|
(use-region-p)
|
|
|
|
|
(and (boundp 'transient-mark-mode) transient-mark-mode
|
|
|
|
|
(boundp 'mark-active) mark-active
|
|
|
|
|
(not (eq (region-beginning) (region-end))))))
|
2007-10-14 20:40:53 +00:00
|
|
|
|
(ispell-region (region-beginning) (region-end)))
|
|
|
|
|
(continue (ispell-continue))
|
|
|
|
|
(t
|
2008-04-23 20:39:10 +00:00
|
|
|
|
(ispell-set-spellchecker-params) ; Initialize variables and dicts alists
|
1994-12-10 02:01:31 +00:00
|
|
|
|
(ispell-accept-buffer-local-defs) ; use the correct dictionary
|
1994-05-20 08:12:52 +00:00
|
|
|
|
(let ((cursor-location (point)) ; retain cursor location
|
|
|
|
|
(word (ispell-get-word following))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
start end poss new-word replace)
|
|
|
|
|
;; De-structure return word info list.
|
|
|
|
|
(setq start (car (cdr word))
|
|
|
|
|
end (car (cdr (cdr word)))
|
|
|
|
|
word (car word))
|
|
|
|
|
|
2005-06-28 18:58:30 +00:00
|
|
|
|
;; At this point it used to ignore 2-letter words.
|
|
|
|
|
;; But that is silly; if the user asks for it, we should do it. - rms.
|
|
|
|
|
(or quietly
|
|
|
|
|
(message "Checking spelling of %s..."
|
2006-05-21 20:25:43 +00:00
|
|
|
|
(funcall ispell-format-word-function word)))
|
2005-06-28 18:58:30 +00:00
|
|
|
|
(ispell-send-string "%\n") ; put in verbose mode
|
|
|
|
|
(ispell-send-string (concat "^" word "\n"))
|
|
|
|
|
;; wait until ispell has processed word
|
|
|
|
|
(while (progn
|
|
|
|
|
(ispell-accept-output)
|
|
|
|
|
(not (string= "" (car ispell-filter)))))
|
|
|
|
|
;;(ispell-send-string "!\n") ;back to terse mode.
|
|
|
|
|
(setq ispell-filter (cdr ispell-filter)) ; remove extra \n
|
|
|
|
|
(if (and ispell-filter (listp ispell-filter))
|
|
|
|
|
(if (> (length ispell-filter) 1)
|
|
|
|
|
(error "Ispell and its process have different character maps")
|
|
|
|
|
(setq poss (ispell-parse-output (car ispell-filter)))))
|
|
|
|
|
(cond ((eq poss t)
|
|
|
|
|
(or quietly
|
|
|
|
|
(message "%s is correct"
|
2016-12-04 14:19:26 +00:00
|
|
|
|
(funcall ispell-format-word-function word))))
|
2005-06-28 18:58:30 +00:00
|
|
|
|
((stringp poss)
|
|
|
|
|
(or quietly
|
|
|
|
|
(message "%s is correct because of root %s"
|
2006-05-21 20:25:43 +00:00
|
|
|
|
(funcall ispell-format-word-function word)
|
2016-12-04 14:19:26 +00:00
|
|
|
|
(funcall ispell-format-word-function poss))))
|
2011-09-17 15:07:50 +03:00
|
|
|
|
((null poss)
|
|
|
|
|
(message "Error checking word %s using %s with %s dictionary"
|
|
|
|
|
(funcall ispell-format-word-function word)
|
|
|
|
|
(file-name-nondirectory ispell-program-name)
|
|
|
|
|
(or ispell-current-dictionary "default")))
|
2005-06-28 18:58:30 +00:00
|
|
|
|
(ispell-check-only ; called from ispell minor mode.
|
2016-12-04 14:19:26 +00:00
|
|
|
|
(progn
|
|
|
|
|
(beep)
|
2006-05-21 20:25:43 +00:00
|
|
|
|
(message "%s is incorrect"
|
|
|
|
|
(funcall ispell-format-word-function word))))
|
2005-06-28 18:58:30 +00:00
|
|
|
|
(t ; prompt for correct word.
|
|
|
|
|
(save-window-excursion
|
|
|
|
|
(setq replace (ispell-command-loop
|
|
|
|
|
(car (cdr (cdr poss)))
|
|
|
|
|
(car (cdr (cdr (cdr poss))))
|
|
|
|
|
(car poss) start end)))
|
|
|
|
|
(cond ((equal 0 replace)
|
|
|
|
|
(ispell-add-per-file-word-list (car poss)))
|
|
|
|
|
(replace
|
|
|
|
|
(setq new-word (if (atom replace) replace (car replace))
|
|
|
|
|
cursor-location (+ (- (length word) (- end start))
|
|
|
|
|
cursor-location))
|
|
|
|
|
(if (not (equal new-word (car poss)))
|
|
|
|
|
(progn
|
2006-07-26 17:11:07 +00:00
|
|
|
|
(goto-char start)
|
|
|
|
|
;; Insert first and then delete,
|
|
|
|
|
;; to avoid collapsing markers before and after
|
|
|
|
|
;; into a single place.
|
2012-04-23 12:03:33 +02:00
|
|
|
|
(insert new-word)
|
2007-05-18 22:32:08 +00:00
|
|
|
|
(delete-region (point) end)
|
2006-07-26 17:11:07 +00:00
|
|
|
|
;; It is meaningless to preserve the cursor position
|
|
|
|
|
;; inside a word that has changed.
|
|
|
|
|
(setq cursor-location (point))
|
2005-06-28 18:58:30 +00:00
|
|
|
|
(setq end (point))))
|
|
|
|
|
(if (not (atom replace)) ;recheck spelling of replacement
|
|
|
|
|
(progn
|
|
|
|
|
(if (car (cdr replace)) ; query replace requested
|
|
|
|
|
(save-window-excursion
|
|
|
|
|
(query-replace word new-word t)))
|
|
|
|
|
(goto-char start)
|
|
|
|
|
;; single word could be split into multiple words
|
|
|
|
|
(setq ispell-quit (not (ispell-region start end)))
|
|
|
|
|
))))
|
|
|
|
|
;; keep if rechecking word and we keep choices win.
|
|
|
|
|
(if (get-buffer ispell-choices-buffer)
|
|
|
|
|
(kill-buffer ispell-choices-buffer))))
|
|
|
|
|
(ispell-pdict-save ispell-silently-savep)
|
|
|
|
|
;; NB: Cancels ispell-quit incorrectly if called from ispell-region
|
2005-06-28 22:02:13 +00:00
|
|
|
|
(if ispell-quit (setq ispell-quit nil replace 'quit))
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(goto-char cursor-location) ; return to original location
|
2007-10-14 20:40:53 +00:00
|
|
|
|
replace))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun ispell-get-word (following &optional extra-otherchars)
|
|
|
|
|
"Return the word for spell-checking according to ispell syntax.
|
1994-05-20 21:45:19 +00:00
|
|
|
|
If optional argument FOLLOWING is non-nil or if `ispell-following-word'
|
1994-03-02 04:56:25 +00:00
|
|
|
|
is non-nil when called interactively, then the following word
|
2015-09-17 16:08:20 -07:00
|
|
|
|
\(rather than preceding) is checked when the cursor is not over a word.
|
1994-05-21 07:38:10 +00:00
|
|
|
|
Optional second argument contains otherchars that can be included in word
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
many times (see the doc string of `ispell-dictionary-alist' for details
|
|
|
|
|
about otherchars).
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2005-01-31 11:54:36 +00:00
|
|
|
|
Word syntax is controlled by the definition of the chosen dictionary,
|
|
|
|
|
which is in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'."
|
2009-03-13 16:19:00 +00:00
|
|
|
|
(ispell-set-spellchecker-params) ; Initialize variables and dicts alists
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(let* ((ispell-casechars (ispell-get-casechars))
|
|
|
|
|
(ispell-not-casechars (ispell-get-not-casechars))
|
|
|
|
|
(ispell-otherchars (ispell-get-otherchars))
|
|
|
|
|
(ispell-many-otherchars-p (ispell-get-many-otherchars-p))
|
|
|
|
|
(word-regexp (concat ispell-casechars
|
|
|
|
|
"+\\("
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(if (not (string= "" ispell-otherchars))
|
|
|
|
|
(concat ispell-otherchars "?"))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(if extra-otherchars
|
|
|
|
|
(concat extra-otherchars "?"))
|
|
|
|
|
ispell-casechars
|
|
|
|
|
"+\\)"
|
|
|
|
|
(if (or ispell-many-otherchars-p
|
|
|
|
|
extra-otherchars)
|
|
|
|
|
"*" "?")))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
did-it-once prevpt
|
1994-03-02 04:56:25 +00:00
|
|
|
|
start end word)
|
|
|
|
|
;; find the word
|
|
|
|
|
(if (not (looking-at ispell-casechars))
|
|
|
|
|
(if following
|
|
|
|
|
(re-search-forward ispell-casechars (point-max) t)
|
|
|
|
|
(re-search-backward ispell-casechars (point-min) t)))
|
|
|
|
|
;; move to front of word
|
|
|
|
|
(re-search-backward ispell-not-casechars (point-min) 'start)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(while (and (or (and (not (string= "" ispell-otherchars))
|
|
|
|
|
(looking-at ispell-otherchars))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(and extra-otherchars (looking-at extra-otherchars)))
|
|
|
|
|
(not (bobp))
|
|
|
|
|
(or (not did-it-once)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
ispell-many-otherchars-p)
|
|
|
|
|
(not (eq prevpt (point))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(if (and extra-otherchars (looking-at extra-otherchars))
|
|
|
|
|
(progn
|
|
|
|
|
(backward-char 1)
|
|
|
|
|
(if (looking-at ispell-casechars)
|
|
|
|
|
(re-search-backward ispell-not-casechars (point-min) 'move)))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(setq did-it-once t
|
|
|
|
|
prevpt (point))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(backward-char 1)
|
|
|
|
|
(if (looking-at ispell-casechars)
|
|
|
|
|
(re-search-backward ispell-not-casechars (point-min) 'move)
|
|
|
|
|
(backward-char -1))))
|
|
|
|
|
;; Now mark the word and save to string.
|
1998-04-17 03:37:10 +00:00
|
|
|
|
(if (not (re-search-forward word-regexp (point-max) t))
|
|
|
|
|
(if ispell-check-only
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; return dummy word when just flagging misspellings
|
1998-04-17 03:37:10 +00:00
|
|
|
|
(list "" (point) (point))
|
|
|
|
|
(error "No word found to check!"))
|
2007-05-18 22:32:08 +00:00
|
|
|
|
(setq start (copy-marker (match-beginning 0))
|
|
|
|
|
end (point-marker)
|
1998-04-17 03:37:10 +00:00
|
|
|
|
word (buffer-substring-no-properties start end))
|
|
|
|
|
(list word start end))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
|
2012-05-18 15:04:07 -04:00
|
|
|
|
;; Global ispell-pdict-modified-p is set by ispell-command-loop and
|
|
|
|
|
;; tracks changes in the dictionary. The global may either be
|
|
|
|
|
;; a value or a list, whose value is the state of whether the
|
|
|
|
|
;; dictionary needs to be saved.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2001-04-23 11:50:36 +00:00
|
|
|
|
;;;###autoload
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defun ispell-pdict-save (&optional no-query force-save)
|
|
|
|
|
"Check to see if the personal dictionary has been modified.
|
1994-05-20 21:45:19 +00:00
|
|
|
|
If so, ask if it needs to be saved."
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(interactive (list ispell-silently-savep t))
|
|
|
|
|
(if (and ispell-pdict-modified-p (listp ispell-pdict-modified-p))
|
|
|
|
|
(setq ispell-pdict-modified-p (car ispell-pdict-modified-p)))
|
2012-10-13 17:51:59 +08:00
|
|
|
|
(when (and (or ispell-pdict-modified-p force-save)
|
|
|
|
|
(or no-query
|
|
|
|
|
(y-or-n-p "Personal dictionary modified. Save? ")))
|
|
|
|
|
(ispell-send-string "#\n") ; save dictionary
|
|
|
|
|
(message "Personal dictionary saved.")
|
|
|
|
|
(when flyspell-mode
|
|
|
|
|
(flyspell-mode 0)
|
|
|
|
|
(flyspell-mode 1)))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
;; unassert variable, even if not saved to avoid questioning.
|
|
|
|
|
(setq ispell-pdict-modified-p nil))
|
|
|
|
|
|
|
|
|
|
|
2015-12-07 15:12:15 +00:00
|
|
|
|
(defvar ispell-update-post-hook nil
|
|
|
|
|
"A normal hook invoked from the ispell command loop.
|
|
|
|
|
It is called once per iteration, before displaying a prompt to
|
|
|
|
|
the user.")
|
|
|
|
|
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(defun ispell-command-loop (miss guess word start end)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
"Display possible corrections from list MISS.
|
|
|
|
|
GUESS lists possibly valid affix construction of WORD.
|
|
|
|
|
Returns nil to keep word.
|
1994-05-21 07:38:10 +00:00
|
|
|
|
Returns 0 to insert locally into buffer-local dictionary.
|
|
|
|
|
Returns string for new chosen word.
|
|
|
|
|
Returns list for new replacement word (will be rechecked).
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
Query-replace when list length is 2.
|
|
|
|
|
Automatic query-replace when second element is `query-replace'.
|
1994-10-10 01:01:20 +00:00
|
|
|
|
Highlights the word, which is assumed to run from START to END.
|
1994-05-20 21:45:19 +00:00
|
|
|
|
Global `ispell-pdict-modified-p' becomes a list where the only value
|
2009-01-09 02:59:52 +00:00
|
|
|
|
indicates whether the dictionary has been modified when option `a'
|
|
|
|
|
or `i' is used.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
Global `ispell-quit' set to start location to continue spell session."
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(let ((count ?0)
|
1994-12-10 02:01:31 +00:00
|
|
|
|
(choices miss)
|
|
|
|
|
(window-min-height (min window-min-height
|
2000-12-15 01:09:50 +00:00
|
|
|
|
ispell-choices-win-default-height))
|
1994-12-10 02:01:31 +00:00
|
|
|
|
(command-characters '( ? ?i ?a ?A ?r ?R ?? ?x ?X ?q ?l ?u ?m ))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(skipped 0)
|
2014-12-18 18:53:48 +01:00
|
|
|
|
char num result textwin)
|
1994-12-10 02:01:31 +00:00
|
|
|
|
|
|
|
|
|
;; setup the *Choices* buffer with valid data.
|
2009-08-29 14:48:10 +00:00
|
|
|
|
(with-current-buffer (get-buffer-create ispell-choices-buffer)
|
2005-07-09 20:49:10 +00:00
|
|
|
|
(setq mode-line-format
|
2010-09-04 20:47:29 +02:00
|
|
|
|
(concat
|
|
|
|
|
"-- %b -- word: " word
|
|
|
|
|
" -- dict: " (or ispell-current-dictionary "default")
|
|
|
|
|
" -- prog: " (file-name-nondirectory ispell-program-name)))
|
2016-12-04 14:37:37 +00:00
|
|
|
|
;; No need for horizontal scrollbar in choices window
|
2016-12-04 22:01:56 +00:00
|
|
|
|
(with-no-warnings
|
2016-12-04 14:37:37 +00:00
|
|
|
|
(setq horizontal-scroll-bar nil))
|
1994-12-10 02:01:31 +00:00
|
|
|
|
(erase-buffer)
|
|
|
|
|
(if guess
|
|
|
|
|
(progn
|
|
|
|
|
(insert "Affix rules generate and capitalize "
|
|
|
|
|
"this word as shown below:\n\t")
|
|
|
|
|
(while guess
|
2014-12-18 18:53:48 +01:00
|
|
|
|
(when (> (+ 4 (current-column) (length (car guess)))
|
|
|
|
|
(window-width))
|
|
|
|
|
(insert "\n\t"))
|
1994-12-10 02:01:31 +00:00
|
|
|
|
(insert (car guess) " ")
|
|
|
|
|
(setq guess (cdr guess)))
|
2015-08-30 22:53:21 -07:00
|
|
|
|
(insert (substitute-command-keys
|
|
|
|
|
"\nUse option `i' to accept this spelling and put it in your private dictionary.\n"))))
|
2014-12-18 18:53:48 +01:00
|
|
|
|
(while choices
|
|
|
|
|
(when (> (+ 7 (current-column)
|
|
|
|
|
(length (car choices))
|
|
|
|
|
(if (> count ?~) 3 0))
|
|
|
|
|
(window-width))
|
|
|
|
|
(insert "\n"))
|
1994-12-10 02:01:31 +00:00
|
|
|
|
;; not so good if there are over 20 or 30 options, but then, if
|
|
|
|
|
;; there are that many you don't want to scan them all anyway...
|
|
|
|
|
(while (memq count command-characters) ; skip command characters.
|
2016-12-04 13:59:59 +00:00
|
|
|
|
(setq count (1+ count)
|
1994-12-10 02:01:31 +00:00
|
|
|
|
skipped (1+ skipped)))
|
|
|
|
|
(insert "(" count ") " (car choices) " ")
|
|
|
|
|
(setq choices (cdr choices)
|
2016-12-04 13:59:59 +00:00
|
|
|
|
count (1+ count)))
|
|
|
|
|
(setq count (- count ?0 skipped)))
|
1994-12-10 02:01:31 +00:00
|
|
|
|
|
2015-12-07 15:12:15 +00:00
|
|
|
|
(run-hooks 'ispell-update-post-hook)
|
|
|
|
|
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
;; ensure word is visible
|
Replace GROUP argument in six window primitives by new functions.
* doc/lispref/windows.texi (Window Start and End, Textual Scrolling)
* doc/lispref/positions.texi (Screen Lines): Remove optional GROUP argument
from description of six window functions. Add in description of new functions
window-group-start, window-group-end, set-window-group-start,
pos-visible-in-window-group-p, recenter-group and move-to-window-group-line,
together with the six variables indirecting to the pertinent group
functions.
* src/window.c
* src/keyboard.c: Revert the commit from 2015-11-11 12:02:48, in so far as it
applies to these two files, which added the GROUP argument to six window
primitives.
* lisp/follow.el (follow-mode): Use updated variable names for the indirected
functions.
* lisp/isearch.el (isearch-update, isearch-done, isearch-string-out-of-window)
(isearch-back-into-window, isearch-lazy-highlight-new-loop)
(isearch-lazy-highlight-search, isearch-lazy-highlight-update): Replace calls
to window primitives (e.g. window-start) with a GROUP argument by calls to
new functions (e.g. window-group-start).
* lisp/ispell.el (ispell-command-loop): Replace call to
pos-visible-in-window-p with pos-visible-in-window-group-p.
* lisp/window.el (window-group-start, window-group-end)
(set-window-group-start, recenter-group, pos-visible-in-window-group-p)
(selected-window-group, move-to-window-group-line): New functions.
(window-group-start-function, window-group-end-function)
(set-window-group-start-function, recenter-group-function)
(pos-visible-in-window-group-p-function, selected-window-group-function)
(move-to-window-group-line-function): New variables.
2015-12-14 16:38:07 +00:00
|
|
|
|
(if (not (pos-visible-in-window-group-p end))
|
1994-12-10 02:01:31 +00:00
|
|
|
|
(sit-for 0))
|
2000-08-17 20:54:01 +00:00
|
|
|
|
|
1994-12-10 02:01:31 +00:00
|
|
|
|
;; Display choices for misspelled word.
|
2014-12-19 18:59:54 +01:00
|
|
|
|
(setq textwin (selected-window))
|
2014-12-18 18:53:48 +01:00
|
|
|
|
(ispell-show-choices)
|
2014-12-19 18:59:54 +01:00
|
|
|
|
(select-window textwin)
|
1994-12-10 02:01:31 +00:00
|
|
|
|
|
|
|
|
|
;; highlight word, protecting current buffer status
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(unwind-protect
|
1994-12-10 02:01:31 +00:00
|
|
|
|
(progn
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(and ispell-highlight-p
|
|
|
|
|
(ispell-highlight-spelling-error start end t))
|
1994-12-10 02:01:31 +00:00
|
|
|
|
;; Loop until a valid choice is made.
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(while
|
|
|
|
|
(eq
|
|
|
|
|
t
|
|
|
|
|
(setq
|
|
|
|
|
result
|
|
|
|
|
(progn
|
|
|
|
|
(undo-boundary)
|
1997-03-11 22:27:36 +00:00
|
|
|
|
(let (message-log-max)
|
|
|
|
|
(message (concat "C-h or ? for more options; SPC to leave "
|
|
|
|
|
"unchanged, Character to replace word")))
|
2008-09-06 20:07:49 +00:00
|
|
|
|
(let ((inhibit-quit t)
|
|
|
|
|
(input-valid t))
|
|
|
|
|
(setq char nil skipped 0)
|
|
|
|
|
;; If the user types C-g, or generates some other
|
|
|
|
|
;; non-character event (such as a frame switch
|
|
|
|
|
;; event), stop ispell. As a special exception,
|
2010-01-14 19:59:31 +01:00
|
|
|
|
;; ignore mouse events occurring in the same frame.
|
2008-09-06 20:07:49 +00:00
|
|
|
|
(while (and input-valid (not (characterp char)))
|
2009-09-13 22:28:57 +00:00
|
|
|
|
(setq char (read-key))
|
2008-09-06 20:07:49 +00:00
|
|
|
|
(setq input-valid
|
|
|
|
|
(or (characterp char)
|
|
|
|
|
(and (mouse-event-p char)
|
|
|
|
|
(eq (selected-frame)
|
|
|
|
|
(window-frame
|
|
|
|
|
(posn-window (event-start char))))))))
|
|
|
|
|
(when (or quit-flag (not input-valid) (= char ?\C-g))
|
|
|
|
|
(setq char ?X quit-flag nil)))
|
1994-10-10 01:01:20 +00:00
|
|
|
|
;; Adjust num to array offset skipping command characters.
|
|
|
|
|
(let ((com-chars command-characters))
|
|
|
|
|
(while com-chars
|
|
|
|
|
(if (and (> (car com-chars) ?0) (< (car com-chars) char))
|
|
|
|
|
(setq skipped (1+ skipped)))
|
|
|
|
|
(setq com-chars (cdr com-chars)))
|
|
|
|
|
(setq num (- char ?0 skipped)))
|
|
|
|
|
|
|
|
|
|
(cond
|
1994-12-10 02:01:31 +00:00
|
|
|
|
((= char ? ) nil) ; accept word this time only
|
1994-10-10 01:01:20 +00:00
|
|
|
|
((= char ?i) ; accept and insert word into pers dict
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(ispell-send-string (concat "*" word "\n"))
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(setq ispell-pdict-modified-p '(t)) ; dictionary modified!
|
2016-12-04 13:52:04 +00:00
|
|
|
|
(when (fboundp 'flyspell-unhighlight-at)
|
|
|
|
|
(flyspell-unhighlight-at start))
|
1994-10-10 01:01:20 +00:00
|
|
|
|
nil)
|
|
|
|
|
((or (= char ?a) (= char ?A)) ; accept word without insert
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(ispell-send-string (concat "@" word "\n"))
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(cl-pushnew word ispell-buffer-session-localwords
|
|
|
|
|
:test #'equal)
|
2016-12-04 13:52:04 +00:00
|
|
|
|
(when (fboundp 'flyspell-unhighlight-at)
|
|
|
|
|
(flyspell-unhighlight-at start))
|
2012-04-23 12:33:25 +02:00
|
|
|
|
(or ispell-buffer-local-name ; session localwords might conflict
|
|
|
|
|
(setq ispell-buffer-local-name (buffer-name)))
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(if (null ispell-pdict-modified-p)
|
|
|
|
|
(setq ispell-pdict-modified-p
|
|
|
|
|
(list ispell-pdict-modified-p)))
|
|
|
|
|
(if (= char ?A) 0)) ; return 0 for ispell-add buffer-local
|
|
|
|
|
((or (= char ?r) (= char ?R)) ; type in replacement
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(and (eq 'block ispell-highlight-p) ; refresh tty's
|
|
|
|
|
(ispell-highlight-spelling-error start end nil t))
|
|
|
|
|
(let ((result
|
|
|
|
|
(if (or (= char ?R) ispell-query-replace-choices)
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(list (read-string
|
|
|
|
|
(format "Query-replacement for %s: "word)
|
|
|
|
|
word)
|
|
|
|
|
t)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(cons (read-string "Replacement for: " word)
|
|
|
|
|
nil))))
|
|
|
|
|
(and (eq 'block ispell-highlight-p)
|
|
|
|
|
(ispell-highlight-spelling-error start end nil
|
|
|
|
|
'block))
|
|
|
|
|
result))
|
1994-10-10 01:01:20 +00:00
|
|
|
|
((or (= char ??) (= char help-char) (= char ?\C-h))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(and (eq 'block ispell-highlight-p)
|
|
|
|
|
(ispell-highlight-spelling-error start end nil t))
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(ispell-help)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(and (eq 'block ispell-highlight-p)
|
|
|
|
|
(ispell-highlight-spelling-error start end nil
|
|
|
|
|
'block))
|
1994-10-10 01:01:20 +00:00
|
|
|
|
t)
|
|
|
|
|
;; Quit and move point back.
|
|
|
|
|
((= char ?x)
|
|
|
|
|
(ispell-pdict-save ispell-silently-savep)
|
|
|
|
|
(message "Exited spell-checking")
|
|
|
|
|
(setq ispell-quit t)
|
|
|
|
|
nil)
|
|
|
|
|
;; Quit and preserve point.
|
|
|
|
|
((= char ?X)
|
|
|
|
|
(ispell-pdict-save ispell-silently-savep)
|
1996-01-27 02:36:05 +00:00
|
|
|
|
(message "%s"
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(substitute-command-keys
|
|
|
|
|
(concat "Spell-checking suspended;"
|
|
|
|
|
" use C-u \\[ispell-word] to resume")))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(setq ispell-quit start)
|
1994-10-10 01:01:20 +00:00
|
|
|
|
nil)
|
|
|
|
|
((= char ?q)
|
|
|
|
|
(if (y-or-n-p "Really kill Ispell process? ")
|
|
|
|
|
(progn
|
|
|
|
|
(ispell-kill-ispell t) ; terminate process.
|
|
|
|
|
(setq ispell-quit (or (not ispell-checking-message)
|
|
|
|
|
(point))
|
|
|
|
|
ispell-pdict-modified-p nil))
|
1994-12-10 02:01:31 +00:00
|
|
|
|
t)) ; continue if they don't quit.
|
1994-10-10 01:01:20 +00:00
|
|
|
|
((= char ?l)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(and (eq 'block ispell-highlight-p) ; refresh tty displays
|
|
|
|
|
(ispell-highlight-spelling-error start end nil t))
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(let ((new-word (read-string
|
|
|
|
|
"Lookup string (`*' is wildcard): "
|
2000-01-10 12:06:33 +00:00
|
|
|
|
word)))
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(if new-word
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(progn
|
2009-08-29 14:48:10 +00:00
|
|
|
|
(with-current-buffer (get-buffer-create
|
|
|
|
|
ispell-choices-buffer)
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(erase-buffer)
|
|
|
|
|
(setq count ?0
|
|
|
|
|
skipped 0
|
2010-07-07 12:30:57 +02:00
|
|
|
|
mode-line-format ;; setup the *Choices* buffer with valid data.
|
2005-07-09 20:49:10 +00:00
|
|
|
|
(concat "-- %b -- word: " new-word
|
2010-07-07 12:30:57 +02:00
|
|
|
|
" -- word-list: "
|
|
|
|
|
(or ispell-complete-word-dict
|
|
|
|
|
ispell-alternate-dictionary))
|
2013-09-28 10:54:27 +08:00
|
|
|
|
miss (ispell-lookup-words new-word)
|
2014-12-18 18:53:48 +01:00
|
|
|
|
choices miss)
|
|
|
|
|
(while choices
|
|
|
|
|
(when (> (+ 7 (current-column)
|
|
|
|
|
(length (car choices))
|
|
|
|
|
(if (> count ?~) 3 0))
|
|
|
|
|
(window-width))
|
|
|
|
|
(insert "\n"))
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(while (memq count command-characters)
|
2016-12-04 13:59:59 +00:00
|
|
|
|
(setq count (1+ count)
|
1994-10-10 01:01:20 +00:00
|
|
|
|
skipped (1+ skipped)))
|
|
|
|
|
(insert "(" count ") " (car choices) " ")
|
|
|
|
|
(setq choices (cdr choices)
|
2016-12-04 13:59:59 +00:00
|
|
|
|
count (1+ count)))
|
|
|
|
|
(setq count (- count ?0 skipped)))
|
2014-12-19 18:59:54 +01:00
|
|
|
|
(setq textwin (selected-window))
|
2014-12-18 18:53:48 +01:00
|
|
|
|
(ispell-show-choices)
|
2014-12-19 18:59:54 +01:00
|
|
|
|
(select-window textwin))))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(and (eq 'block ispell-highlight-p)
|
|
|
|
|
(ispell-highlight-spelling-error start end nil
|
|
|
|
|
'block))
|
1994-10-10 01:01:20 +00:00
|
|
|
|
t) ; reselect from new choices
|
1999-05-09 06:34:35 +00:00
|
|
|
|
((= char ?u) ; insert lowercase into dictionary
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(ispell-send-string (concat "*" (downcase word) "\n"))
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(setq ispell-pdict-modified-p '(t)) ; dictionary modified!
|
|
|
|
|
nil)
|
|
|
|
|
((= char ?m) ; type in what to insert
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(ispell-send-string
|
|
|
|
|
(concat "*" (read-string "Insert: " word) "\n"))
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(setq ispell-pdict-modified-p '(t))
|
|
|
|
|
(cons word nil))
|
|
|
|
|
((and (>= num 0) (< num count))
|
|
|
|
|
(if ispell-query-replace-choices ; Query replace flag
|
|
|
|
|
(list (nth num miss) 'query-replace)
|
|
|
|
|
(nth num miss)))
|
|
|
|
|
((= char ?\C-l)
|
|
|
|
|
(redraw-display) t)
|
|
|
|
|
((= char ?\C-r)
|
2000-01-10 12:06:33 +00:00
|
|
|
|
;; This may have alignment errors if current line is edited
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(if (marker-position ispell-recursive-edit-marker)
|
|
|
|
|
(progn
|
|
|
|
|
(message "Only one recursive edit session supported")
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(beep)
|
|
|
|
|
(sit-for 2))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(set-marker ispell-recursive-edit-marker start)
|
|
|
|
|
;;(set-marker ispell-region-end reg-end)
|
|
|
|
|
(and ispell-highlight-p ; unhighlight
|
|
|
|
|
(ispell-highlight-spelling-error start end))
|
|
|
|
|
(unwind-protect
|
|
|
|
|
(progn
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(message
|
|
|
|
|
"%s"
|
|
|
|
|
(substitute-command-keys
|
|
|
|
|
(concat "Exit recursive edit with"
|
|
|
|
|
" \\[exit-recursive-edit]")))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(save-window-excursion (save-excursion
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(recursive-edit))))
|
|
|
|
|
;; protected
|
|
|
|
|
(goto-char ispell-recursive-edit-marker)
|
|
|
|
|
(if (not (equal (marker-buffer
|
|
|
|
|
ispell-recursive-edit-marker)
|
|
|
|
|
(current-buffer)))
|
|
|
|
|
(progn
|
|
|
|
|
(set-marker ispell-recursive-edit-marker nil)
|
|
|
|
|
(error
|
|
|
|
|
"Cannot continue ispell from this buffer.")))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(set-marker ispell-recursive-edit-marker nil)))
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(list word nil)) ; recheck starting at this word.
|
1994-10-10 01:01:20 +00:00
|
|
|
|
((= char ?\C-z)
|
|
|
|
|
(funcall (key-binding "\C-z"))
|
|
|
|
|
t)
|
|
|
|
|
(t (ding) t))))))
|
|
|
|
|
result)
|
1994-12-10 02:01:31 +00:00
|
|
|
|
;; protected
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(and ispell-highlight-p ; unhighlight
|
|
|
|
|
(save-window-excursion
|
|
|
|
|
(select-window textwin)
|
2014-12-18 18:53:48 +01:00
|
|
|
|
(ispell-highlight-spelling-error start end))))))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-18 18:53:48 +01:00
|
|
|
|
(defun ispell-show-choices ()
|
2009-01-09 02:59:52 +00:00
|
|
|
|
"Show the choices in another buffer or frame."
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(if (and ispell-use-framepop-p (fboundp 'framepop-display-buffer))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(progn
|
|
|
|
|
(framepop-display-buffer (get-buffer ispell-choices-buffer))
|
2010-09-20 13:53:42 +02:00
|
|
|
|
;; (get-buffer-window ispell-choices-buffer t)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(select-window (previous-window))) ; *Choices* window
|
2014-12-18 18:53:48 +01:00
|
|
|
|
;; Display choices above selected window.
|
|
|
|
|
(ispell-display-buffer (get-buffer-create ispell-choices-buffer))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
|
1994-03-10 07:37:04 +00:00
|
|
|
|
;;;###autoload
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defun ispell-help ()
|
1994-05-20 21:45:19 +00:00
|
|
|
|
"Display a list of the options available when a misspelling is encountered.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
Selections are:
|
|
|
|
|
|
|
|
|
|
DIGIT: Replace the word with a digit offered in the *Choices* buffer.
|
1994-05-21 08:04:20 +00:00
|
|
|
|
SPC: Accept word this time.
|
|
|
|
|
`i': Accept word and insert into private dictionary.
|
|
|
|
|
`a': Accept word for this session.
|
|
|
|
|
`A': Accept word and place in `buffer-local dictionary'.
|
|
|
|
|
`r': Replace word with typed-in value. Rechecked.
|
2010-01-14 19:59:31 +01:00
|
|
|
|
`R': Replace word with typed-in value. Query-replaced in buffer. Rechecked.
|
1994-05-21 08:04:20 +00:00
|
|
|
|
`?': Show these commands.
|
|
|
|
|
`x': Exit spelling buffer. Move cursor to original point.
|
|
|
|
|
`X': Exit spelling buffer. Leaves cursor at the current point, and permits
|
1994-03-02 04:56:25 +00:00
|
|
|
|
the aborted check to be completed later.
|
1994-05-21 08:04:20 +00:00
|
|
|
|
`q': Quit spelling session (Kills ispell process).
|
|
|
|
|
`l': Look up typed-in replacement in alternate dictionary. Wildcards okay.
|
|
|
|
|
`u': Like `i', but the word is lower-cased first.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
`m': Place typed-in value in personal dictionary, then recheck current word.
|
2007-02-14 12:42:01 +00:00
|
|
|
|
`C-l': Redraw screen.
|
|
|
|
|
`C-r': Recursive edit.
|
|
|
|
|
`C-z': Suspend Emacs or iconify frame."
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(if (equal ispell-help-in-bufferp 'electric)
|
|
|
|
|
(progn
|
|
|
|
|
(require 'ehelp)
|
2000-08-17 20:54:01 +00:00
|
|
|
|
(with-electric-help
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(function (lambda ()
|
|
|
|
|
;;This shouldn't be necessary: with-electric-help needs
|
|
|
|
|
;; an optional argument telling it about the smallest
|
|
|
|
|
;; acceptable window-height of the help buffer.
|
2003-05-22 21:34:00 +00:00
|
|
|
|
;;(if (< (window-height) 15)
|
|
|
|
|
;; (enlarge-window
|
|
|
|
|
;; (- 15 (ispell-adjusted-window-height))))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(princ "Selections are:
|
|
|
|
|
|
|
|
|
|
DIGIT: Replace the word with a digit offered in the *Choices* buffer.
|
|
|
|
|
SPC: Accept word this time.
|
|
|
|
|
`i': Accept word and insert into private dictionary.
|
|
|
|
|
`a': Accept word for this session.
|
|
|
|
|
`A': Accept word and place in `buffer-local dictionary'.
|
|
|
|
|
`r': Replace word with typed-in value. Rechecked.
|
2010-01-14 19:59:31 +01:00
|
|
|
|
`R': Replace word with typed-in value. Query-replaced in buffer. Rechecked.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
`?': Show these commands.
|
|
|
|
|
`x': Exit spelling buffer. Move cursor to original point.
|
|
|
|
|
`X': Exit spelling buffer. Leaves cursor at the current point, and permits
|
|
|
|
|
the aborted check to be completed later.
|
|
|
|
|
`q': Quit spelling session (Kills ispell process).
|
|
|
|
|
`l': Look up typed-in replacement in alternate dictionary. Wildcards okay.
|
|
|
|
|
`u': Like `i', but the word is lower-cased first.
|
|
|
|
|
`m': Place typed-in value in personal dictionary, then recheck current word.
|
2007-02-14 12:42:01 +00:00
|
|
|
|
`C-l': Redraw screen.
|
|
|
|
|
`C-r': Recursive edit.
|
|
|
|
|
`C-z': Suspend Emacs or iconify frame.")
|
|
|
|
|
nil))))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(let ((help-1 (concat "[r/R]eplace word; [a/A]ccept for this session; "
|
|
|
|
|
"[i]nsert into private dictionary"))
|
|
|
|
|
(help-2 (concat "[l]ook a word up in alternate dictionary; "
|
|
|
|
|
"e[x/X]it; [q]uit session"))
|
|
|
|
|
(help-3 (concat "[u]ncapitalized insert into dict. "
|
2004-03-22 07:48:39 +00:00
|
|
|
|
"Type 'x C-h f ispell-help' for more help")))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(save-window-excursion
|
|
|
|
|
(if ispell-help-in-bufferp
|
2014-12-18 18:53:48 +01:00
|
|
|
|
(let ((buffer (get-buffer-create "*Ispell Help*")))
|
|
|
|
|
(with-current-buffer buffer
|
|
|
|
|
(insert (concat help-1 "\n" help-2 "\n" help-3)))
|
|
|
|
|
(ispell-display-buffer buffer)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(sit-for 5)
|
|
|
|
|
(kill-buffer "*Ispell Help*"))
|
2002-01-22 01:09:23 +00:00
|
|
|
|
(unwind-protect
|
2004-12-22 00:23:53 +00:00
|
|
|
|
(let ((resize-mini-windows 'grow-only))
|
2002-01-22 01:09:23 +00:00
|
|
|
|
(select-window (minibuffer-window))
|
|
|
|
|
(erase-buffer)
|
|
|
|
|
(message nil)
|
|
|
|
|
;;(set-minibuffer-window (selected-window))
|
|
|
|
|
(enlarge-window 2)
|
|
|
|
|
(insert (concat help-1 "\n" help-2 "\n" help-3))
|
|
|
|
|
(sit-for 5))
|
|
|
|
|
(erase-buffer)))))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2013-09-28 10:54:27 +08:00
|
|
|
|
(define-obsolete-function-alias 'lookup-words 'ispell-lookup-words "24.4")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2013-09-28 10:54:27 +08:00
|
|
|
|
(defun ispell-lookup-words (word &optional lookup-dict)
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
"Look up WORD in optional word-list dictionary LOOKUP-DICT.
|
1994-05-21 07:38:10 +00:00
|
|
|
|
A `*' serves as a wild card. If no wild cards, `look' is used if it exists.
|
2016-05-07 18:40:10 -07:00
|
|
|
|
Otherwise the variable `ispell-grep-command' contains the command
|
|
|
|
|
\(usually \"grep\") used to search for the words.
|
1994-05-21 07:38:10 +00:00
|
|
|
|
|
1994-05-20 21:45:19 +00:00
|
|
|
|
Optional second argument contains the dictionary to use; the default is
|
2011-11-14 22:00:24 +01:00
|
|
|
|
`ispell-alternate-dictionary', overridden by `ispell-complete-word-dict'
|
2010-07-07 12:30:57 +02:00
|
|
|
|
if defined."
|
1994-03-02 04:56:25 +00:00
|
|
|
|
;; We don't use the filter for this function, rather the result is written
|
|
|
|
|
;; into a buffer. Hence there is no need to save the filter values.
|
|
|
|
|
(if (null lookup-dict)
|
2010-07-07 12:30:57 +02:00
|
|
|
|
(setq lookup-dict (or ispell-complete-word-dict
|
|
|
|
|
ispell-alternate-dictionary)))
|
|
|
|
|
|
|
|
|
|
(if lookup-dict
|
|
|
|
|
(unless (file-readable-p lookup-dict)
|
|
|
|
|
(error "lookup-words error: Unreadable or missing plain word-list %s."
|
|
|
|
|
lookup-dict))
|
2010-09-04 20:47:29 +02:00
|
|
|
|
(error (concat "lookup-words error: No plain word-list found at system"
|
|
|
|
|
"default locations. "
|
|
|
|
|
"Customize `ispell-alternate-dictionary' to set yours.")))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
(let* ((process-connection-type ispell-use-ptys-p)
|
|
|
|
|
(wild-p (string-match "\\*" word))
|
|
|
|
|
(look-p (and ispell-look-p ; Only use look for an exact match.
|
|
|
|
|
(or ispell-have-new-look (not wild-p))))
|
|
|
|
|
(prog (if look-p ispell-look-command ispell-grep-command))
|
|
|
|
|
(args (if look-p ispell-look-options ispell-grep-options))
|
|
|
|
|
status results loc)
|
2011-05-02 22:48:32 -03:00
|
|
|
|
(with-temp-buffer
|
|
|
|
|
(message "Starting \"%s\" process..." (file-name-nondirectory prog))
|
|
|
|
|
(if look-p
|
|
|
|
|
nil
|
2013-11-09 03:12:25 +02:00
|
|
|
|
(insert "^" word)
|
|
|
|
|
;; When there are no wildcards, append one, for consistency
|
|
|
|
|
;; with `look' behavior.
|
|
|
|
|
(unless wild-p (insert "*"))
|
|
|
|
|
(insert "$")
|
2011-05-02 22:48:32 -03:00
|
|
|
|
;; Convert * to .*
|
|
|
|
|
(while (search-backward "*" nil t) (insert "."))
|
|
|
|
|
(setq word (buffer-string))
|
|
|
|
|
(erase-buffer))
|
|
|
|
|
(setq status (apply 'ispell-call-process prog nil t nil
|
|
|
|
|
(nconc (if (and args (> (length args) 0))
|
|
|
|
|
(list args)
|
|
|
|
|
(if look-p nil
|
|
|
|
|
(list "-e")))
|
|
|
|
|
(list word)
|
|
|
|
|
(if lookup-dict (list lookup-dict)))))
|
|
|
|
|
;; `grep' returns status 1 and no output when word not found, which
|
|
|
|
|
;; is a perfectly normal thing.
|
|
|
|
|
(if (stringp status)
|
|
|
|
|
(error "error: %s exited with signal %s"
|
|
|
|
|
(file-name-nondirectory prog) status)
|
|
|
|
|
;; Else collect words into `results' in FIFO order.
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
;; Assure we've ended with \n.
|
|
|
|
|
(or (bobp) (= (preceding-char) ?\n) (insert ?\n))
|
|
|
|
|
(while (not (bobp))
|
|
|
|
|
(setq loc (point))
|
|
|
|
|
(forward-line -1)
|
|
|
|
|
(push (buffer-substring-no-properties (point)
|
|
|
|
|
(1- loc))
|
|
|
|
|
results))))
|
|
|
|
|
(if (and results (string-match ".+: " (car results)))
|
|
|
|
|
(error "%s error: %s" ispell-grep-command (car results)))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
results))
|
|
|
|
|
|
|
|
|
|
|
2010-09-04 20:47:29 +02:00
|
|
|
|
;; "ispell-filter" is a list of output lines from the generating function.
|
|
|
|
|
;; Each full line (ending with \n) is a separate item on the list.
|
|
|
|
|
;; "output" can contain multiple lines, part of a line, or both.
|
|
|
|
|
;; "start" and "end" are used to keep bounds on lines when "output" contains
|
|
|
|
|
;; multiple lines.
|
|
|
|
|
;; "ispell-filter-continue" is true when we have received only part of a
|
|
|
|
|
;; line as output from a generating function ("output" did not end with \n)
|
|
|
|
|
;; THIS FUNCTION WILL FAIL IF THE PROCESS OUTPUT DOESN'T END WITH \n!
|
|
|
|
|
;; This is the case when a process dies or fails. The default behavior
|
|
|
|
|
;; in this case treats the next input received as fresh input.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(defun ispell-filter (_process output)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
"Output filter function for ispell, grep, and look."
|
|
|
|
|
(let ((start 0)
|
|
|
|
|
(continue t)
|
|
|
|
|
end)
|
|
|
|
|
(while continue
|
|
|
|
|
(setq end (string-match "\n" output start)) ; get text up to the newline.
|
|
|
|
|
;; If we get out of sync and ispell-filter-continue is asserted when we
|
|
|
|
|
;; are not continuing, treat the next item as a separate list. When
|
|
|
|
|
;; ispell-filter-continue is asserted, ispell-filter *should* always be a
|
|
|
|
|
;; list!
|
|
|
|
|
|
|
|
|
|
;; Continue with same line (item)?
|
|
|
|
|
(if (and ispell-filter-continue ispell-filter (listp ispell-filter))
|
|
|
|
|
;; Yes. Add it to the prev item
|
|
|
|
|
(setcar ispell-filter
|
|
|
|
|
(concat (car ispell-filter) (substring output start end)))
|
|
|
|
|
;; No. This is a new line and item.
|
|
|
|
|
(setq ispell-filter
|
|
|
|
|
(cons (substring output start end) ispell-filter)))
|
|
|
|
|
(if (null end)
|
|
|
|
|
;; We've completed reading the output, but didn't finish the line.
|
|
|
|
|
(setq ispell-filter-continue t continue nil)
|
|
|
|
|
;; skip over newline, this line complete.
|
|
|
|
|
(setq ispell-filter-continue nil end (1+ end))
|
|
|
|
|
(if (= end (length output)) ; No more lines in output
|
|
|
|
|
(setq continue nil) ; so we can exit the filter.
|
|
|
|
|
(setq start end)))))) ; else move start to next line of input
|
|
|
|
|
|
|
|
|
|
|
2012-05-18 15:04:07 -04:00
|
|
|
|
;; This function destroys the mark location if it is in the word being
|
|
|
|
|
;; highlighted.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(defun ispell-highlight-spelling-error-generic (start end &optional highlight
|
|
|
|
|
refresh)
|
1994-05-20 21:45:19 +00:00
|
|
|
|
"Highlight the word from START to END with a kludge using `inverse-video'.
|
|
|
|
|
When the optional third arg HIGHLIGHT is set, the word is highlighted;
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
otherwise it is displayed normally.
|
1998-06-13 04:06:46 +00:00
|
|
|
|
Uses block cursor to highlight one character.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
Optional REFRESH will unhighlighted then highlight, using block cursor
|
|
|
|
|
highlighting when REFRESH is equal to `block'."
|
|
|
|
|
(and (eq 'block ispell-highlight-p)
|
|
|
|
|
(or (eq 'block refresh)
|
|
|
|
|
(setq start (1+ start)))) ; On block non-refresh, inc start.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(let ((modified (buffer-modified-p)) ; don't allow this fn to modify buffer
|
|
|
|
|
(buffer-read-only nil) ; Allow highlighting read-only buffers.
|
2011-11-26 20:43:11 -08:00
|
|
|
|
(text (buffer-substring-no-properties start end))
|
|
|
|
|
; Save highlight region.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(inhibit-quit t) ; inhibit interrupt processing here.
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(buffer-undo-list t)) ; don't clutter the undo list.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(goto-char end)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(delete-region start end)
|
1996-01-05 22:21:28 +00:00
|
|
|
|
(insert-char ? (- end start)) ; minimize amount of redisplay
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(sit-for 0) ; update display
|
|
|
|
|
(if highlight (setq inverse-video (not inverse-video))) ; toggle video
|
|
|
|
|
(delete-region start end) ; delete whitespace
|
|
|
|
|
(insert text) ; insert text in inverse video.
|
|
|
|
|
(sit-for 0) ; update display showing inverse video.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(if (not highlight)
|
|
|
|
|
(goto-char end)
|
|
|
|
|
(setq inverse-video (not inverse-video)) ; toggle video
|
|
|
|
|
(and (eq 'block ispell-highlight-p)
|
|
|
|
|
(goto-char (1- start)))) ; use block cursor to "highlight" char
|
|
|
|
|
(set-buffer-modified-p modified) ; don't modify if flag not set.
|
|
|
|
|
(and refresh ; re-highlight
|
|
|
|
|
(ispell-highlight-spelling-error-generic
|
|
|
|
|
(if (eq 'block refresh) start (- start 2)) end t))))
|
|
|
|
|
|
|
|
|
|
|
1994-05-21 07:38:10 +00:00
|
|
|
|
(defun ispell-highlight-spelling-error-overlay (start end &optional highlight)
|
1994-05-20 21:45:19 +00:00
|
|
|
|
"Highlight the word from START to END using overlays.
|
|
|
|
|
When the optional third arg HIGHLIGHT is set, the word is highlighted
|
|
|
|
|
otherwise it is displayed normally.
|
1994-05-21 07:38:10 +00:00
|
|
|
|
|
1994-05-21 08:04:20 +00:00
|
|
|
|
The variable `ispell-highlight-face' selects the face to use for highlighting."
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(if highlight
|
2005-12-09 09:47:30 +00:00
|
|
|
|
(if ispell-overlay
|
|
|
|
|
(move-overlay ispell-overlay start end (current-buffer))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(setq ispell-overlay (make-overlay start end))
|
2005-12-09 09:47:30 +00:00
|
|
|
|
(overlay-put ispell-overlay 'priority 1001) ;higher than lazy overlays
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(overlay-put ispell-overlay 'face ispell-highlight-face))
|
2005-12-09 09:47:30 +00:00
|
|
|
|
(if ispell-overlay
|
|
|
|
|
(delete-overlay ispell-overlay)))
|
2005-03-18 10:01:12 +00:00
|
|
|
|
(if (and ispell-lazy-highlight (boundp 'lazy-highlight-cleanup))
|
|
|
|
|
(if highlight
|
|
|
|
|
(let ((isearch-string
|
|
|
|
|
(concat
|
|
|
|
|
"\\b"
|
|
|
|
|
(regexp-quote (buffer-substring-no-properties start end))
|
|
|
|
|
"\\b"))
|
|
|
|
|
(isearch-regexp t)
|
2015-12-06 02:20:12 +02:00
|
|
|
|
(isearch-regexp-function nil)
|
2013-02-21 19:45:12 +02:00
|
|
|
|
(isearch-case-fold-search nil)
|
|
|
|
|
(isearch-forward t)
|
|
|
|
|
(isearch-other-end start)
|
|
|
|
|
(isearch-error nil))
|
2005-03-18 10:01:12 +00:00
|
|
|
|
(isearch-lazy-highlight-new-loop
|
|
|
|
|
(if (boundp 'reg-start) reg-start)
|
|
|
|
|
(if (boundp 'reg-end) reg-end)))
|
|
|
|
|
(lazy-highlight-cleanup lazy-highlight-cleanup)
|
|
|
|
|
(setq isearch-lazy-highlight-last-string nil))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(defun ispell-highlight-spelling-error (start end &optional highlight refresh)
|
2016-12-04 14:05:07 +00:00
|
|
|
|
(if (display-color-p)
|
|
|
|
|
(ispell-highlight-spelling-error-overlay start end highlight)
|
|
|
|
|
(ispell-highlight-spelling-error-generic start end highlight refresh)))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2014-12-18 18:53:48 +01:00
|
|
|
|
(defun ispell-display-buffer (buffer)
|
|
|
|
|
"Show BUFFER in new window above selected one.
|
|
|
|
|
Also position fit window to BUFFER and select it."
|
|
|
|
|
(let* ((unsplittable
|
|
|
|
|
(cdr (assq 'unsplittable (frame-parameters (selected-frame)))))
|
|
|
|
|
(window
|
|
|
|
|
(or (get-buffer-window buffer)
|
|
|
|
|
(and unsplittable
|
|
|
|
|
;; If frame is unsplittable, temporarily disable that...
|
|
|
|
|
(let ((frame (selected-frame)))
|
|
|
|
|
(modify-frame-parameters frame '((unsplittable . nil)))
|
|
|
|
|
(prog1
|
|
|
|
|
(condition-case nil
|
|
|
|
|
(split-window
|
2015-12-07 15:12:15 +00:00
|
|
|
|
;; Chose the last of a window group, since
|
|
|
|
|
;; otherwise, the lowering of another window's
|
|
|
|
|
;; TL corner would cause the logical order of
|
|
|
|
|
;; the windows to be changed.
|
|
|
|
|
(car (last (selected-window-group)))
|
|
|
|
|
(- ispell-choices-win-default-height) 'above)
|
2014-12-18 18:53:48 +01:00
|
|
|
|
(error nil))
|
|
|
|
|
(modify-frame-parameters frame '((unsplittable . t))))))
|
|
|
|
|
(and (not unsplittable)
|
|
|
|
|
(condition-case nil
|
|
|
|
|
(split-window
|
2015-12-07 15:12:15 +00:00
|
|
|
|
;; See comment above.
|
|
|
|
|
(car (last (selected-window-group)))
|
|
|
|
|
(- ispell-choices-win-default-height) 'above)
|
2014-12-18 18:53:48 +01:00
|
|
|
|
(error nil)))
|
|
|
|
|
(display-buffer buffer))))
|
|
|
|
|
(if (not window)
|
|
|
|
|
(error "Couldn't make window for *Choices*")
|
|
|
|
|
(select-window window)
|
|
|
|
|
(set-window-buffer window buffer)
|
|
|
|
|
(set-window-point window (point-min))
|
|
|
|
|
(fit-window-to-buffer window nil nil nil nil t))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2012-05-18 15:04:07 -04:00
|
|
|
|
;; Should we add a compound word match return value?
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(defun ispell-parse-output (output &optional accept-list shift)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
"Parse the OUTPUT string from Ispell process and return:
|
1994-05-21 08:04:20 +00:00
|
|
|
|
1: t for an exact match.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
2: A string containing the root word matched via suffix removal.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
3: A list of possible correct spellings of the format:
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(\"ORIGINAL-WORD\" OFFSET MISS-LIST GUESS-LIST)
|
1994-05-20 21:45:19 +00:00
|
|
|
|
ORIGINAL-WORD is a string of the possibly misspelled word.
|
|
|
|
|
OFFSET is an integer giving the line offset of the word.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
MISS-LIST and GUESS-LIST are possibly null lists of guesses and misses.
|
2001-12-20 19:01:00 +00:00
|
|
|
|
4: nil when an error has occurred.
|
2000-01-10 12:06:33 +00:00
|
|
|
|
|
2001-03-26 15:41:37 +00:00
|
|
|
|
Optional second arg ACCEPT-LIST is list of words already accepted.
|
2000-01-10 12:06:33 +00:00
|
|
|
|
Optional third arg SHIFT is an offset to apply based on previous corrections."
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(cond
|
|
|
|
|
((string= output "") t) ; for startup with pipes...
|
|
|
|
|
((string= output "*") t) ; exact match
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
((string= output "-") t) ; compound word match
|
2003-05-14 01:54:28 +00:00
|
|
|
|
((eq (aref output 0) ?+) ; found because of root word
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(substring output 2)) ; return root word
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
((equal 0 (string-match "[\ra-zA-Z]" output))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(ding) ; error message from ispell!
|
2005-09-18 12:28:30 +00:00
|
|
|
|
(message "Ispell error: %s" output)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(sit-for 5)
|
|
|
|
|
nil)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(t ; need to process &, ?, and #'s
|
2003-05-14 01:54:28 +00:00
|
|
|
|
(let ((type (aref output 0)) ; &, ?, or #
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(original-word (substring output 2 (string-match " " output 2)))
|
|
|
|
|
(cur-count 0) ; contains number of misses + guesses
|
|
|
|
|
count miss-list guess-list offset)
|
|
|
|
|
(setq output (substring output (match-end 0))) ; skip over misspelling
|
2003-05-14 01:54:28 +00:00
|
|
|
|
(if (eq type ?#)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(setq count 0) ; no misses for type #
|
2005-05-16 11:34:49 +00:00
|
|
|
|
(setq count (string-to-number output) ; get number of misses.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
output (substring output (1+ (string-match " " output 1)))))
|
2005-05-16 11:34:49 +00:00
|
|
|
|
(setq offset (string-to-number output))
|
2010-09-20 13:53:42 +02:00
|
|
|
|
(setq output (if (eq type ?#) ; No miss or guess list.
|
|
|
|
|
nil
|
|
|
|
|
(substring output (1+ (string-match " " output 1)))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(while output
|
|
|
|
|
(let ((end (string-match ", \\|\\($\\)" output))) ; end of miss/guess.
|
|
|
|
|
(setq cur-count (1+ cur-count))
|
|
|
|
|
(if (> cur-count count)
|
2010-09-20 13:53:42 +02:00
|
|
|
|
(push (substring output 0 end) guess-list)
|
|
|
|
|
(push (substring output 0 end) miss-list))
|
|
|
|
|
(setq output (if (match-end 1) ; True only when at end of line.
|
|
|
|
|
nil ; No more misses or guesses.
|
|
|
|
|
(substring output (+ end 2))))))
|
2000-01-10 12:06:33 +00:00
|
|
|
|
;; return results. Accept word if it was already accepted.
|
|
|
|
|
;; adjust offset.
|
|
|
|
|
(if (member original-word accept-list)
|
|
|
|
|
t
|
|
|
|
|
(list original-word
|
|
|
|
|
(if (numberp shift) (+ shift offset) offset)
|
|
|
|
|
(nreverse miss-list) (nreverse guess-list)))))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(defun ispell-process-status ()
|
|
|
|
|
"Return the status of the Ispell process.
|
|
|
|
|
When asynchronous processes are not supported, `run' is always returned."
|
|
|
|
|
(if ispell-async-processp
|
|
|
|
|
(process-status ispell-process)
|
|
|
|
|
(and ispell-process 'run)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun ispell-start-process ()
|
2012-05-18 15:04:07 -04:00
|
|
|
|
"Start the Ispell process, with support for no asynchronous processes.
|
|
|
|
|
Keeps argument list for future Ispell invocations for no async support."
|
2012-12-03 18:15:32 +01:00
|
|
|
|
;; `ispell-current-dictionary' and `ispell-current-personal-dictionary'
|
|
|
|
|
;; are properly set in `ispell-internal-change-dictionary'.
|
2013-02-28 20:01:34 +01:00
|
|
|
|
|
|
|
|
|
;; Parse hunspell affix file if using hunspell and entry is uninitialized.
|
|
|
|
|
(if ispell-really-hunspell
|
|
|
|
|
(or (cadr (assoc ispell-current-dictionary ispell-dictionary-alist))
|
|
|
|
|
(ispell-hunspell-fill-dictionary-entry ispell-current-dictionary)))
|
|
|
|
|
|
2010-09-04 20:47:29 +02:00
|
|
|
|
(let* ((default-directory
|
2014-05-09 00:02:00 -07:00
|
|
|
|
(if (file-accessible-directory-p default-directory)
|
2010-09-04 20:47:29 +02:00
|
|
|
|
default-directory
|
|
|
|
|
;; Defend against bad `default-directory'.
|
|
|
|
|
(expand-file-name "~/")))
|
2010-09-07 20:01:23 +02:00
|
|
|
|
(orig-args (ispell-get-ispell-args))
|
2010-09-04 20:47:29 +02:00
|
|
|
|
(args
|
|
|
|
|
(append
|
2010-09-07 20:01:23 +02:00
|
|
|
|
(if (and ispell-current-dictionary ; Not for default dict (nil)
|
|
|
|
|
(not (member "-d" orig-args))) ; Only define if not overridden.
|
2010-09-04 20:47:29 +02:00
|
|
|
|
(list "-d" ispell-current-dictionary))
|
2010-09-07 20:01:23 +02:00
|
|
|
|
orig-args
|
2010-09-04 20:47:29 +02:00
|
|
|
|
(if ispell-current-personal-dictionary ; Use specified pers dict.
|
2012-12-03 18:15:32 +01:00
|
|
|
|
(list "-p" ispell-current-personal-dictionary))
|
2010-09-04 20:47:29 +02:00
|
|
|
|
;; If we are using recent aspell or hunspell, make sure we use the
|
|
|
|
|
;; right encoding for communication. ispell or older aspell/hunspell
|
|
|
|
|
;; does not support this.
|
|
|
|
|
(if ispell-encoding8-command
|
2012-04-08 20:09:03 +03:00
|
|
|
|
(if ispell-really-hunspell
|
|
|
|
|
(list ispell-encoding8-command
|
|
|
|
|
(upcase (symbol-name (ispell-get-coding-system))))
|
|
|
|
|
(list
|
|
|
|
|
(concat ispell-encoding8-command
|
|
|
|
|
(symbol-name (ispell-get-coding-system))))))
|
2010-09-04 20:47:29 +02:00
|
|
|
|
ispell-extra-args)))
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
|
2005-12-16 02:00:02 +00:00
|
|
|
|
;; Initially we don't know any buffer's local words.
|
|
|
|
|
(setq ispell-buffer-local-name nil)
|
|
|
|
|
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(if ispell-async-processp
|
|
|
|
|
(let ((process-connection-type ispell-use-ptys-p))
|
|
|
|
|
(apply 'start-process
|
|
|
|
|
"ispell" nil ispell-program-name
|
2010-09-04 20:47:29 +02:00
|
|
|
|
"-a" ; Accept single input lines.
|
|
|
|
|
;; Make root/affix combos not in dict.
|
|
|
|
|
;; hunspell -m option means different.
|
|
|
|
|
(if ispell-really-hunspell "" "-m")
|
|
|
|
|
args))
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(setq ispell-cmd-args args
|
|
|
|
|
ispell-output-buffer (generate-new-buffer " *ispell-output*")
|
|
|
|
|
ispell-session-buffer (generate-new-buffer " *ispell-session*"))
|
|
|
|
|
(ispell-send-string "\032\n") ; so Ispell prints version and exits
|
|
|
|
|
t)))
|
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defun ispell-init-process ()
|
1994-05-20 21:45:19 +00:00
|
|
|
|
"Check status of Ispell process and start if necessary."
|
2010-09-02 14:37:29 +02:00
|
|
|
|
(let* (;; Basename of dictionary used by the spell-checker
|
|
|
|
|
(dict-bname (or (car (cdr (member "-d" (ispell-get-ispell-args))))
|
|
|
|
|
ispell-current-dictionary))
|
2012-12-03 17:08:23 +01:00
|
|
|
|
;; The default directory for the process.
|
2010-09-02 14:37:29 +02:00
|
|
|
|
;; Use "~/" as default-directory unless using Ispell with per-dir
|
2016-12-04 14:38:51 +00:00
|
|
|
|
;; personal dictionaries
|
2010-09-02 14:37:29 +02:00
|
|
|
|
(default-directory
|
|
|
|
|
(if (or ispell-really-aspell
|
|
|
|
|
ispell-really-hunspell
|
|
|
|
|
;; Protect against bad default-directory
|
2014-05-09 00:02:00 -07:00
|
|
|
|
(not (file-accessible-directory-p default-directory))
|
2010-09-02 14:37:29 +02:00
|
|
|
|
;; Ispell and per-dir personal dicts available
|
|
|
|
|
(not (or (file-readable-p (concat default-directory
|
|
|
|
|
".ispell_words"))
|
|
|
|
|
(file-readable-p (concat default-directory
|
|
|
|
|
".ispell_"
|
|
|
|
|
(or dict-bname
|
|
|
|
|
"default")))))
|
2016-12-04 14:38:51 +00:00
|
|
|
|
;; Ispell, in a minibuffer
|
|
|
|
|
(window-minibuffer-p))
|
2010-09-02 14:37:29 +02:00
|
|
|
|
(expand-file-name "~/")
|
|
|
|
|
(expand-file-name default-directory))))
|
|
|
|
|
;; Check if process needs restart
|
|
|
|
|
(if (and ispell-process
|
|
|
|
|
(eq (ispell-process-status) 'run)
|
2010-09-04 20:47:29 +02:00
|
|
|
|
;; Unless we are using an explicit personal dictionary, ensure
|
|
|
|
|
;; we're in the same default directory! Restart check for
|
|
|
|
|
;; personal dictionary is done in
|
|
|
|
|
;; `ispell-internal-change-dictionary', called from
|
|
|
|
|
;; `ispell-buffer-local-dict'
|
2010-09-02 14:37:29 +02:00
|
|
|
|
(or (or ispell-local-pdict ispell-personal-dictionary)
|
|
|
|
|
(equal ispell-process-directory default-directory)))
|
|
|
|
|
(setq ispell-filter nil ispell-filter-continue nil)
|
|
|
|
|
;; may need to restart to select new personal dictionary.
|
|
|
|
|
(ispell-kill-ispell t)
|
2014-01-31 11:41:54 +02:00
|
|
|
|
(message "Starting new Ispell process %s with %s dictionary..."
|
2012-05-28 16:36:27 +02:00
|
|
|
|
ispell-program-name
|
2010-09-02 14:37:29 +02:00
|
|
|
|
(or ispell-local-dictionary ispell-dictionary "default"))
|
|
|
|
|
(sit-for 0)
|
|
|
|
|
(setq ispell-library-directory (ispell-check-version)
|
2015-04-28 18:36:25 +03:00
|
|
|
|
;; Assign a non-nil value to ispell-process-directory
|
|
|
|
|
;; before calling ispell-start-process, since that
|
|
|
|
|
;; function needs it to set default-directory when
|
|
|
|
|
;; ispell-async-processp is nil.
|
|
|
|
|
ispell-process-directory default-directory
|
2010-09-02 14:37:29 +02:00
|
|
|
|
ispell-process (ispell-start-process)
|
|
|
|
|
ispell-filter nil
|
2015-04-28 18:36:25 +03:00
|
|
|
|
ispell-filter-continue nil)
|
2010-09-04 20:47:29 +02:00
|
|
|
|
|
|
|
|
|
(unless (equal ispell-process-directory (expand-file-name "~/"))
|
2010-09-10 13:20:51 +02:00
|
|
|
|
;; At this point, `ispell-process-directory' will be "~/" unless using
|
2016-12-04 14:38:51 +00:00
|
|
|
|
;; Ispell with directory-specific dicts.
|
2010-09-10 13:20:51 +02:00
|
|
|
|
;; If not, kill ispell process when killing buffer. It may be in a
|
|
|
|
|
;; removable device that would otherwise become un-mountable.
|
|
|
|
|
(with-current-buffer
|
2016-12-04 14:38:51 +00:00
|
|
|
|
(if (window-minibuffer-p) ;; In minibuffer
|
2010-09-10 13:20:51 +02:00
|
|
|
|
;; In this case kill ispell only when parent buffer is killed
|
|
|
|
|
;; to avoid over and over ispell kill.
|
2010-09-02 14:37:29 +02:00
|
|
|
|
(window-buffer (minibuffer-selected-window))
|
2010-09-10 13:20:51 +02:00
|
|
|
|
(current-buffer))
|
2016-12-04 14:19:26 +00:00
|
|
|
|
(add-hook 'kill-buffer-hook
|
2010-09-10 13:20:51 +02:00
|
|
|
|
(lambda () (ispell-kill-ispell t)) nil 'local)))
|
2010-09-02 14:37:29 +02:00
|
|
|
|
|
|
|
|
|
(if ispell-async-processp
|
|
|
|
|
(set-process-filter ispell-process 'ispell-filter))
|
2016-12-04 14:35:42 +00:00
|
|
|
|
(if (and enable-multibyte-characters
|
2015-04-28 18:36:25 +03:00
|
|
|
|
;; Evidently, some people use the synchronous mode even
|
|
|
|
|
;; when async subprocesses are supported, in which case
|
|
|
|
|
;; set-process-coding-system is bound, but
|
|
|
|
|
;; ispell-process is not a process object.
|
|
|
|
|
ispell-async-processp)
|
2010-09-02 14:37:29 +02:00
|
|
|
|
(set-process-coding-system ispell-process (ispell-get-coding-system)
|
|
|
|
|
(ispell-get-coding-system)))
|
|
|
|
|
;; Get version ID line
|
|
|
|
|
(ispell-accept-output 3)
|
|
|
|
|
;; get more output if filter empty?
|
|
|
|
|
(if (null ispell-filter) (ispell-accept-output 3))
|
|
|
|
|
(cond ((null ispell-filter)
|
|
|
|
|
(error "%s did not output version line" ispell-program-name))
|
|
|
|
|
((and
|
|
|
|
|
(stringp (car ispell-filter))
|
|
|
|
|
(if (string-match "warning: " (car ispell-filter))
|
|
|
|
|
(progn
|
|
|
|
|
(ispell-accept-output 3) ; was warn msg.
|
|
|
|
|
(stringp (car ispell-filter)))
|
|
|
|
|
(null (cdr ispell-filter)))
|
|
|
|
|
(string-match "^@(#) " (car ispell-filter)))
|
|
|
|
|
;; got the version line as expected (we already know it's the right
|
|
|
|
|
;; version, so don't bother checking again.)
|
|
|
|
|
nil)
|
|
|
|
|
(t
|
|
|
|
|
;; Otherwise, it must be an error message. Show the user.
|
|
|
|
|
;; But first wait to see if some more output is going to arrive.
|
|
|
|
|
;; Otherwise we get cool errors like "Can't open ".
|
|
|
|
|
(sleep-for 1)
|
|
|
|
|
(ispell-accept-output 3)
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(error "%s" (mapconcat #'identity ispell-filter "\n"))))
|
2010-09-02 14:37:29 +02:00
|
|
|
|
(setq ispell-filter nil) ; Discard version ID line
|
|
|
|
|
(let ((extended-char-mode (ispell-get-extended-character-mode)))
|
|
|
|
|
(if extended-char-mode ; ~ extended character mode
|
|
|
|
|
(ispell-send-string (concat extended-char-mode "\n"))))
|
2016-12-04 14:19:26 +00:00
|
|
|
|
(when ispell-async-processp
|
|
|
|
|
(set-process-query-on-exit-flag ispell-process nil)))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1994-03-10 07:37:04 +00:00
|
|
|
|
;;;###autoload
|
2012-04-23 12:33:25 +02:00
|
|
|
|
(defun ispell-kill-ispell (&optional no-error clear)
|
1994-05-21 08:04:20 +00:00
|
|
|
|
"Kill current Ispell process (so that you may start a fresh one).
|
2012-04-23 12:33:25 +02:00
|
|
|
|
With NO-ERROR, just return non-nil if there was no Ispell running.
|
|
|
|
|
With CLEAR, buffer session localwords are cleaned."
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(interactive)
|
2006-01-15 05:42:35 +00:00
|
|
|
|
;; This hook is typically used by flyspell to flush some variables used
|
|
|
|
|
;; to optimize the common cases.
|
|
|
|
|
(run-hooks 'ispell-kill-ispell-hook)
|
2012-05-30 18:14:37 +02:00
|
|
|
|
(if (or clear
|
2016-12-04 14:19:26 +00:00
|
|
|
|
(called-interactively-p 'interactive))
|
2012-04-23 12:33:25 +02:00
|
|
|
|
(setq ispell-buffer-session-localwords nil))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(if (not (and ispell-process
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(eq (ispell-process-status) 'run)))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(or no-error
|
2012-05-18 15:04:07 -04:00
|
|
|
|
(error "There is no Ispell process running!"))
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(if ispell-async-processp
|
2006-06-09 13:04:13 +00:00
|
|
|
|
(delete-process ispell-process)
|
2012-05-18 15:04:07 -04:00
|
|
|
|
;; Synchronous processes.
|
|
|
|
|
(ispell-send-string "\n") ; Make sure side effects occurred.
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(kill-buffer ispell-output-buffer)
|
|
|
|
|
(kill-buffer ispell-session-buffer)
|
|
|
|
|
(setq ispell-output-buffer nil
|
|
|
|
|
ispell-session-buffer nil))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(setq ispell-process nil)
|
1994-05-20 21:45:19 +00:00
|
|
|
|
(message "Ispell process killed")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
nil))
|
|
|
|
|
|
2012-05-18 15:04:07 -04:00
|
|
|
|
;; ispell-change-dictionary is set in some people's hooks. Maybe this should
|
|
|
|
|
;; call ispell-init-process rather than wait for a spell checking command?
|
1995-02-08 06:09:08 +00:00
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ispell-change-dictionary (dict &optional arg)
|
2005-01-31 11:54:36 +00:00
|
|
|
|
"Change to dictionary DICT for Ispell.
|
2005-02-27 10:37:13 +00:00
|
|
|
|
With a prefix arg, set it \"globally\", for all buffers.
|
|
|
|
|
Without a prefix arg, set it \"locally\", just for this buffer.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2005-02-27 10:37:13 +00:00
|
|
|
|
By just answering RET you can find out what the current dictionary is."
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(interactive
|
|
|
|
|
(list (completing-read
|
|
|
|
|
"Use new dictionary (RET for current, SPC to complete): "
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(and (fboundp 'ispell-valid-dictionary-list)
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(mapcar #'list (ispell-valid-dictionary-list)))
|
2003-05-22 21:34:00 +00:00
|
|
|
|
nil t)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
current-prefix-arg))
|
2011-11-12 23:48:23 -08:00
|
|
|
|
(ispell-set-spellchecker-params) ; Initialize variables and dicts alists
|
2006-05-05 12:34:51 +00:00
|
|
|
|
(unless arg (ispell-buffer-local-dict 'no-reload))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(if (equal dict "default") (setq dict nil))
|
|
|
|
|
;; This relies on completing-read's bug of returning "" for no match
|
|
|
|
|
(cond ((equal dict "")
|
2006-05-05 12:34:51 +00:00
|
|
|
|
(ispell-internal-change-dictionary)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(message "Using %s dictionary"
|
2006-09-23 19:05:03 +00:00
|
|
|
|
(or (and (not arg) ispell-local-dictionary)
|
|
|
|
|
ispell-dictionary "default")))
|
|
|
|
|
((equal dict (or (and (not arg) ispell-local-dictionary)
|
2005-01-31 11:54:36 +00:00
|
|
|
|
ispell-dictionary "default"))
|
2006-05-05 12:34:51 +00:00
|
|
|
|
;; Specified dictionary is the default already. Could reload
|
|
|
|
|
;; the dictionaries if needed.
|
|
|
|
|
(ispell-internal-change-dictionary)
|
2016-12-04 14:19:26 +00:00
|
|
|
|
(when (called-interactively-p 'interactive)
|
2005-01-31 11:54:36 +00:00
|
|
|
|
(message "No change, using %s dictionary" dict)))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(t ; reset dictionary!
|
2005-01-31 11:54:36 +00:00
|
|
|
|
(if (or (assoc dict ispell-local-dictionary-alist)
|
|
|
|
|
(assoc dict ispell-dictionary-alist))
|
|
|
|
|
(if arg
|
|
|
|
|
;; set default dictionary
|
|
|
|
|
(setq ispell-dictionary dict)
|
|
|
|
|
;; set local dictionary
|
|
|
|
|
(setq ispell-local-dictionary dict)
|
|
|
|
|
(setq ispell-local-dictionary-overridden t))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(error "Undefined dictionary: %s" dict))
|
2006-01-13 10:46:09 +00:00
|
|
|
|
(ispell-internal-change-dictionary)
|
2012-04-23 12:33:25 +02:00
|
|
|
|
(setq ispell-buffer-session-localwords nil)
|
2005-01-31 11:54:36 +00:00
|
|
|
|
(message "%s Ispell dictionary set to %s"
|
|
|
|
|
(if arg "Global" "Local")
|
|
|
|
|
dict))))
|
|
|
|
|
|
|
|
|
|
(defun ispell-internal-change-dictionary ()
|
2006-05-05 12:34:51 +00:00
|
|
|
|
"Update the dictionary and the personal dictionary used by Ispell.
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
This may kill the Ispell process; if so, a new one will be started
|
|
|
|
|
when needed."
|
2012-12-03 18:15:32 +01:00
|
|
|
|
(let* ((dict (or ispell-local-dictionary ispell-dictionary))
|
|
|
|
|
(pdict (or ispell-local-pdict ispell-personal-dictionary))
|
|
|
|
|
(expanded-pdict (if pdict (expand-file-name pdict))))
|
2006-05-05 12:34:51 +00:00
|
|
|
|
(unless (and (equal ispell-current-dictionary dict)
|
2012-12-03 18:15:32 +01:00
|
|
|
|
(equal ispell-current-personal-dictionary
|
|
|
|
|
expanded-pdict))
|
2005-12-16 02:00:02 +00:00
|
|
|
|
(ispell-kill-ispell t)
|
2006-05-05 12:34:51 +00:00
|
|
|
|
(setq ispell-current-dictionary dict
|
2012-12-03 18:15:32 +01:00
|
|
|
|
ispell-current-personal-dictionary expanded-pdict))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2010-09-20 16:15:27 +02:00
|
|
|
|
;; Avoid error messages when compiling for these dynamic variables.
|
|
|
|
|
(defvar ispell-start)
|
|
|
|
|
(defvar ispell-end)
|
|
|
|
|
|
|
|
|
|
;; Spelling of comments are checked when ispell-check-comments is non-nil.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(defun ispell-region (reg-start reg-end &optional recheckp shift)
|
1998-06-13 04:06:46 +00:00
|
|
|
|
"Interactively check a region for spelling errors.
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
Return nil if spell session was terminated, otherwise returns shift offset
|
|
|
|
|
amount for last line processed."
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(interactive "r") ; Don't flag errors on read-only bufs.
|
2008-04-23 20:39:10 +00:00
|
|
|
|
(ispell-set-spellchecker-params) ; Initialize variables and dicts alists
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(if (not recheckp)
|
|
|
|
|
(ispell-accept-buffer-local-defs)) ; set up dictionary, local words, etc.
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(let ((skip-region-start (make-marker))
|
2012-11-06 17:22:09 +01:00
|
|
|
|
(rstart (make-marker))
|
|
|
|
|
(region-type (if (and (= reg-start (point-min)) (= reg-end (point-max)))
|
|
|
|
|
(buffer-name) "region"))
|
|
|
|
|
(program-basename (file-name-nondirectory ispell-program-name))
|
|
|
|
|
(dictionary (or ispell-current-dictionary "default")))
|
2012-11-06 17:04:42 +01:00
|
|
|
|
(unwind-protect
|
|
|
|
|
(save-excursion
|
|
|
|
|
(message "Spell-checking %s using %s with %s dictionary..."
|
2012-11-06 17:22:09 +01:00
|
|
|
|
region-type program-basename dictionary)
|
2012-11-06 17:04:42 +01:00
|
|
|
|
;; Returns cursor to original location.
|
|
|
|
|
(save-window-excursion
|
|
|
|
|
(goto-char reg-start)
|
|
|
|
|
(let ((transient-mark-mode)
|
|
|
|
|
(case-fold-search case-fold-search)
|
|
|
|
|
(query-fcc t)
|
|
|
|
|
in-comment key)
|
2012-11-06 17:22:09 +01:00
|
|
|
|
(ispell-print-if-debug
|
2013-03-01 12:46:57 -05:00
|
|
|
|
"ispell-region: (ispell-skip-region-list):\n%s
|
|
|
|
|
ispell-region: (ispell-begin-skip-region-regexp):\n%s
|
|
|
|
|
ispell-region: Search for first region to skip after (ispell-begin-skip-region-regexp)\n"
|
|
|
|
|
(ispell-skip-region-list)
|
|
|
|
|
(ispell-begin-skip-region-regexp))
|
2012-11-06 17:04:42 +01:00
|
|
|
|
(if (re-search-forward (ispell-begin-skip-region-regexp) reg-end t)
|
|
|
|
|
(progn
|
|
|
|
|
(setq key (match-string-no-properties 0))
|
|
|
|
|
(set-marker skip-region-start (- (point) (length key)))
|
2012-11-06 17:22:09 +01:00
|
|
|
|
(goto-char reg-start)
|
|
|
|
|
(ispell-print-if-debug
|
2013-03-01 12:46:57 -05:00
|
|
|
|
"ispell-region: First skip: %s at (pos,line,column): (%s,%s,%s).\n"
|
|
|
|
|
key
|
|
|
|
|
(save-excursion (goto-char skip-region-start) (point))
|
|
|
|
|
(line-number-at-pos skip-region-start)
|
|
|
|
|
(save-excursion (goto-char skip-region-start) (current-column)))))
|
2012-11-06 17:22:09 +01:00
|
|
|
|
(ispell-print-if-debug
|
2013-03-01 12:46:57 -05:00
|
|
|
|
"ispell-region: Continue spell-checking with %s and %s dictionary...\n"
|
|
|
|
|
program-basename dictionary)
|
2012-11-06 17:04:42 +01:00
|
|
|
|
(set-marker rstart reg-start)
|
|
|
|
|
(set-marker ispell-region-end reg-end)
|
|
|
|
|
(while (and (not ispell-quit)
|
|
|
|
|
(< (point) ispell-region-end))
|
|
|
|
|
;; spell-check region with skipping
|
|
|
|
|
(if (and (marker-position skip-region-start)
|
|
|
|
|
(<= skip-region-start (point)))
|
|
|
|
|
(progn
|
|
|
|
|
;; If region inside line comment, must keep comment start.
|
|
|
|
|
(setq in-comment (point)
|
|
|
|
|
in-comment
|
|
|
|
|
(and comment-start
|
|
|
|
|
(or (null comment-end) (string= "" comment-end))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(re-search-forward comment-start in-comment t))
|
|
|
|
|
comment-start))
|
|
|
|
|
;; Can change skip-regexps (in ispell-message)
|
|
|
|
|
(ispell-skip-region key) ; moves pt past region.
|
|
|
|
|
(set-marker rstart (point))
|
|
|
|
|
;; check for saving large attachments...
|
|
|
|
|
(setq query-fcc (and query-fcc
|
|
|
|
|
(ispell-ignore-fcc skip-region-start
|
|
|
|
|
rstart)))
|
|
|
|
|
(if (and (< rstart ispell-region-end)
|
|
|
|
|
(re-search-forward
|
|
|
|
|
(ispell-begin-skip-region-regexp)
|
|
|
|
|
ispell-region-end t))
|
|
|
|
|
(progn
|
|
|
|
|
(setq key (match-string-no-properties 0))
|
|
|
|
|
(set-marker skip-region-start
|
|
|
|
|
(- (point) (length key)))
|
2012-11-06 17:22:09 +01:00
|
|
|
|
(goto-char rstart)
|
|
|
|
|
(ispell-print-if-debug
|
2013-03-01 12:46:57 -05:00
|
|
|
|
"ispell-region: Next skip: %s at (pos,line,column): (%s,%s,%s).\n"
|
|
|
|
|
key
|
|
|
|
|
(save-excursion (goto-char skip-region-start) (point))
|
|
|
|
|
(line-number-at-pos skip-region-start)
|
|
|
|
|
(save-excursion (goto-char skip-region-start) (current-column))))
|
2012-11-06 17:04:42 +01:00
|
|
|
|
(set-marker skip-region-start nil))))
|
|
|
|
|
(setq reg-end (max (point)
|
|
|
|
|
(if (marker-position skip-region-start)
|
|
|
|
|
(min skip-region-start ispell-region-end)
|
|
|
|
|
(marker-position ispell-region-end))))
|
|
|
|
|
(let* ((ispell-start (point))
|
|
|
|
|
(ispell-end (min (point-at-eol) reg-end))
|
2012-11-06 17:33:56 +01:00
|
|
|
|
;; See if line must be prefixed 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).
|
|
|
|
|
(add-comment (and in-comment
|
|
|
|
|
(not (string= in-comment "dnl "))
|
|
|
|
|
in-comment))
|
2012-11-06 17:04:42 +01:00
|
|
|
|
(string (ispell-get-line
|
2012-11-06 17:33:56 +01:00
|
|
|
|
ispell-start ispell-end add-comment)))
|
2012-11-06 17:22:09 +01:00
|
|
|
|
(ispell-print-if-debug
|
2013-03-01 12:46:57 -05:00
|
|
|
|
"ispell-region: string pos (%s->%s), eol: %s, [in-comment]: [%s], [add-comment]: [%s], [string]: [%s]\n"
|
|
|
|
|
ispell-start ispell-end (point-at-eol) in-comment add-comment string)
|
2012-11-06 17:33:56 +01:00
|
|
|
|
(if add-comment ; account for comment chars added
|
|
|
|
|
(setq ispell-start (- ispell-start (length add-comment))
|
2014-01-14 11:50:28 +01:00
|
|
|
|
;; Reset `in-comment' (and indirectly `add-comment') for new line
|
|
|
|
|
in-comment nil))
|
2012-11-06 17:04:42 +01:00
|
|
|
|
(setq ispell-end (point)) ; "end" tracks region retrieved.
|
|
|
|
|
(if string ; there is something to spell check!
|
|
|
|
|
;; (special start end)
|
|
|
|
|
(setq shift (ispell-process-line string
|
|
|
|
|
(and recheckp shift))))
|
|
|
|
|
(goto-char ispell-end)))))
|
|
|
|
|
(if ispell-quit
|
|
|
|
|
nil
|
|
|
|
|
(or shift 0)))
|
|
|
|
|
;; protected
|
|
|
|
|
(if (and (not (and recheckp ispell-keep-choices-win))
|
|
|
|
|
(get-buffer ispell-choices-buffer))
|
|
|
|
|
(kill-buffer ispell-choices-buffer))
|
|
|
|
|
(set-marker skip-region-start nil)
|
|
|
|
|
(set-marker rstart nil)
|
|
|
|
|
(if ispell-quit
|
|
|
|
|
(progn
|
|
|
|
|
;; preserve or clear the region for ispell-continue.
|
|
|
|
|
(if (not (numberp ispell-quit))
|
|
|
|
|
(set-marker ispell-region-end nil)
|
|
|
|
|
;; Ispell-continue enabled - ispell-region-end is set.
|
|
|
|
|
(goto-char ispell-quit))
|
|
|
|
|
;; Check for aborting
|
|
|
|
|
(if (and ispell-checking-message (numberp ispell-quit))
|
|
|
|
|
(progn
|
|
|
|
|
(setq ispell-quit nil)
|
|
|
|
|
(error "Message send aborted")))
|
|
|
|
|
(if (not recheckp) (setq ispell-quit nil)))
|
|
|
|
|
(if (not recheckp) (set-marker ispell-region-end nil))
|
|
|
|
|
;; Only save if successful exit.
|
|
|
|
|
(ispell-pdict-save ispell-silently-savep)
|
|
|
|
|
(message "Spell-checking %s using %s with %s dictionary...done"
|
2012-11-06 17:22:09 +01:00
|
|
|
|
region-type program-basename dictionary)))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(defun ispell-begin-skip-region-regexp ()
|
2009-01-09 02:59:52 +00:00
|
|
|
|
"Return a regexp of the search keys for region skipping.
|
2003-05-22 21:34:00 +00:00
|
|
|
|
Includes `ispell-skip-region-alist' plus tex, tib, html, and comment keys.
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
Must be called after `ispell-buffer-local-parsing' due to dependence on mode."
|
2010-09-20 13:53:42 +02:00
|
|
|
|
(mapconcat
|
2016-04-18 12:27:58 -04:00
|
|
|
|
#'identity
|
2010-09-20 13:53:42 +02:00
|
|
|
|
(delq nil
|
|
|
|
|
(list
|
|
|
|
|
;; messages
|
|
|
|
|
(if (and ispell-checking-message
|
|
|
|
|
(not (eq t ispell-checking-message)))
|
|
|
|
|
(mapconcat #'car ispell-checking-message "\\|"))
|
|
|
|
|
;; tex
|
|
|
|
|
(if (eq ispell-parser 'tex)
|
|
|
|
|
(ispell-begin-tex-skip-regexp))
|
|
|
|
|
;; html stuff
|
|
|
|
|
(if ispell-skip-html
|
|
|
|
|
(ispell-begin-skip-region ispell-html-skip-alists))
|
|
|
|
|
;; tib
|
|
|
|
|
(if ispell-skip-tib ispell-tib-ref-beginning)
|
|
|
|
|
;; Comments
|
|
|
|
|
(if (and (eq 'exclusive ispell-check-comments) comment-start)
|
|
|
|
|
;; search from end of current comment to start of next comment.
|
|
|
|
|
(if (string= "" comment-end) "^" (regexp-quote comment-end)))
|
|
|
|
|
(if (and (null ispell-check-comments) comment-start)
|
|
|
|
|
(regexp-quote comment-start))
|
2015-12-14 17:17:31 +00:00
|
|
|
|
(ispell-begin-skip-region ispell-skip-region-alist)
|
|
|
|
|
(ispell--make-filename-or-URL-re)))
|
2010-09-20 13:53:42 +02:00
|
|
|
|
"\\|"))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
|
|
|
|
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(defun ispell-begin-skip-region (skip-alist)
|
|
|
|
|
"Regular expression for start of regions to skip generated from SKIP-ALIST.
|
|
|
|
|
Each selection should be a key of SKIP-ALIST;
|
|
|
|
|
otherwise, the current line is skipped."
|
|
|
|
|
(mapconcat (lambda (lst) (if (stringp (car lst)) (car lst) (eval (car lst))))
|
|
|
|
|
skip-alist
|
|
|
|
|
"\\|"))
|
|
|
|
|
|
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(defun ispell-begin-tex-skip-regexp ()
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
"Regular expression of tex commands to skip.
|
|
|
|
|
Generated from `ispell-tex-skip-alists'."
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(concat
|
2003-05-22 21:34:00 +00:00
|
|
|
|
;; raw tex keys
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(mapconcat (function (lambda (lst) (car lst)))
|
|
|
|
|
(car ispell-tex-skip-alists)
|
|
|
|
|
"\\|")
|
|
|
|
|
"\\|"
|
2003-05-22 21:34:00 +00:00
|
|
|
|
;; keys wrapped in begin{}
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(mapconcat (function (lambda (lst)
|
|
|
|
|
(concat "\\\\begin[ \t\n]*{[ \t\n]*"
|
|
|
|
|
(car lst)
|
|
|
|
|
"[ \t\n]*}")))
|
|
|
|
|
(car (cdr ispell-tex-skip-alists))
|
|
|
|
|
"\\|")))
|
|
|
|
|
|
|
|
|
|
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(defun ispell-skip-region-list ()
|
2009-01-09 02:59:52 +00:00
|
|
|
|
"Return a list describing key and body regions to skip for this buffer.
|
2003-05-22 21:34:00 +00:00
|
|
|
|
Includes regions defined by `ispell-skip-region-alist', tex mode,
|
|
|
|
|
`ispell-html-skip-alists', and `ispell-checking-message'.
|
|
|
|
|
Manual checking must include comments and tib references.
|
|
|
|
|
The list is of the form described by variable `ispell-skip-region-alist'.
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
Must be called after `ispell-buffer-local-parsing' due to dependence on mode."
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(let ((skip-alist ispell-skip-region-alist))
|
2015-12-14 17:17:31 +00:00
|
|
|
|
(setq skip-alist (append (list (list (ispell--make-filename-or-URL-re)))
|
|
|
|
|
skip-alist))
|
2003-05-22 21:34:00 +00:00
|
|
|
|
;; only additional explicit region definition is tex.
|
|
|
|
|
(if (eq ispell-parser 'tex)
|
|
|
|
|
(setq case-fold-search nil
|
|
|
|
|
skip-alist (append (car ispell-tex-skip-alists)
|
|
|
|
|
(car (cdr ispell-tex-skip-alists))
|
|
|
|
|
skip-alist)))
|
|
|
|
|
(if ispell-skip-html
|
|
|
|
|
(setq skip-alist (append ispell-html-skip-alists skip-alist)))
|
|
|
|
|
(if (and ispell-checking-message
|
|
|
|
|
(not (eq t ispell-checking-message)))
|
|
|
|
|
(setq skip-alist (append ispell-checking-message skip-alist)))
|
|
|
|
|
skip-alist))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun ispell-tex-arg-end (&optional arg)
|
2003-05-22 21:34:00 +00:00
|
|
|
|
"Skip across ARG number of braces."
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(condition-case nil
|
|
|
|
|
(progn
|
|
|
|
|
(while (looking-at "[ \t\n]*\\[") (forward-sexp))
|
|
|
|
|
(forward-sexp (or arg 1)))
|
|
|
|
|
(error
|
2011-09-17 15:07:50 +03:00
|
|
|
|
(message "Error skipping s-expressions at point %d." (point))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(beep)
|
|
|
|
|
(sit-for 2))))
|
|
|
|
|
|
|
|
|
|
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(defun ispell-ignore-fcc (start end)
|
2009-01-09 02:59:52 +00:00
|
|
|
|
"Delete the Fcc: message header when large attachments are included.
|
2015-05-21 10:04:45 -07:00
|
|
|
|
Return value nil if file with large attachments is saved.
|
2003-05-22 21:34:00 +00:00
|
|
|
|
This can be used to avoid multiple questions for multiple large attachments.
|
|
|
|
|
Returns point to starting location afterwards."
|
|
|
|
|
(let ((result t))
|
|
|
|
|
(if (and ispell-checking-message ispell-message-fcc-skip)
|
|
|
|
|
(if (< ispell-message-fcc-skip (- end start))
|
|
|
|
|
(let (case-fold-search head-end)
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(setq head-end
|
|
|
|
|
(or (re-search-forward
|
|
|
|
|
(concat "^" (regexp-quote mail-header-separator) "$")
|
|
|
|
|
nil t)
|
|
|
|
|
(re-search-forward "^$" nil t)
|
|
|
|
|
(point-min)))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(if (re-search-forward "^Fcc:" head-end t)
|
|
|
|
|
(if (y-or-n-p
|
|
|
|
|
"Save copy of this message with large attachments? ")
|
|
|
|
|
(setq result nil)
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(kill-line 1)))
|
|
|
|
|
(goto-char end))))
|
|
|
|
|
result))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun ispell-skip-region (key)
|
2009-01-09 02:59:52 +00:00
|
|
|
|
"Skip across KEY and then to end of region.
|
2003-05-22 21:34:00 +00:00
|
|
|
|
Key lookup determines region to skip.
|
|
|
|
|
Point is placed at end of skipped region."
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; move over key to begin checking.
|
|
|
|
|
(forward-char (length key))
|
|
|
|
|
(let ((start (point))
|
2003-05-22 21:34:00 +00:00
|
|
|
|
;; Regenerate each call... This function can change region definition.
|
|
|
|
|
(alist (ispell-skip-region-list))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
alist-key null-skip)
|
|
|
|
|
(cond
|
|
|
|
|
;; what about quoted comment, or comment inside strings?
|
|
|
|
|
((and (null ispell-check-comments) comment-start
|
|
|
|
|
(string= key comment-start))
|
|
|
|
|
(if (string= "" comment-end)
|
|
|
|
|
(forward-line)
|
|
|
|
|
(search-forward comment-end ispell-region-end t)))
|
|
|
|
|
((and (eq 'exclusive ispell-check-comments) comment-start
|
|
|
|
|
(string= key comment-end))
|
1998-06-20 21:37:14 +00:00
|
|
|
|
(search-forward comment-start ispell-region-end :end))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
((and ispell-skip-tib (string-match ispell-tib-ref-beginning key))
|
|
|
|
|
(re-search-forward ispell-tib-ref-end ispell-region-end t))
|
|
|
|
|
;; markings from alist
|
|
|
|
|
(t
|
|
|
|
|
(while alist
|
|
|
|
|
(setq alist-key (eval (car (car alist))))
|
|
|
|
|
(if (string-match alist-key key)
|
|
|
|
|
(progn
|
|
|
|
|
(setq alist (cdr (car alist)))
|
|
|
|
|
(cond
|
|
|
|
|
((null alist) (setq null-skip t)) ; done! Just skip key.
|
|
|
|
|
((not (consp alist))
|
|
|
|
|
;; Search past end of spell region to find this region end.
|
|
|
|
|
(re-search-forward (eval alist) (point-max) t))
|
2003-05-22 21:34:00 +00:00
|
|
|
|
((and (= 1 (length alist))
|
|
|
|
|
(stringp (car alist)))
|
|
|
|
|
(re-search-forward (car alist) (point-max) t))
|
|
|
|
|
(t
|
|
|
|
|
(setq null-skip t) ; error handling in functions!
|
|
|
|
|
(if (consp (cdr alist))
|
|
|
|
|
(apply (car alist) (cdr alist))
|
|
|
|
|
(funcall (car alist)))))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(setq alist nil))
|
|
|
|
|
(setq alist (cdr alist))))))
|
|
|
|
|
(if (and (= start (point)) (null null-skip))
|
|
|
|
|
(progn
|
|
|
|
|
(message "Matching region end for `%s' point %d not found"
|
|
|
|
|
key (point))
|
|
|
|
|
(beep)
|
|
|
|
|
(sit-for 2)))))
|
|
|
|
|
|
|
|
|
|
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(defun ispell-get-line (start end in-comment)
|
2010-09-04 20:47:29 +02:00
|
|
|
|
"Grab the next line of data.
|
|
|
|
|
Returns a string with the line data."
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(let ((ispell-casechars (ispell-get-casechars))
|
|
|
|
|
string)
|
|
|
|
|
(cond ; LOOK AT THIS LINE AND SKIP OR PROCESS
|
|
|
|
|
((eolp) ; END OF LINE, just go to next line.
|
|
|
|
|
(forward-line))
|
2000-08-17 20:54:01 +00:00
|
|
|
|
;;((looking-at "[-#@*+!%~^]") ; SKIP SPECIAL ISPELL CHARACTERS
|
1999-05-09 06:34:35 +00:00
|
|
|
|
;; (forward-char 1)) ; not needed as quoted below.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
((or (re-search-forward ispell-casechars end t) ; TEXT EXISTS
|
|
|
|
|
(re-search-forward "[][()${}]" end t)) ; or MATH COMMANDS
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(setq string (concat "^" in-comment
|
|
|
|
|
(buffer-substring-no-properties start end)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
"\n"))
|
|
|
|
|
(goto-char end))
|
|
|
|
|
(t (goto-char end))) ; EMPTY LINE, skip it.
|
|
|
|
|
string))
|
|
|
|
|
|
|
|
|
|
|
2005-01-18 23:20:18 +00:00
|
|
|
|
(defun ispell-looking-at (string)
|
|
|
|
|
(let ((coding (ispell-get-coding-system))
|
|
|
|
|
(len (length string)))
|
|
|
|
|
(and (<= (+ (point) len) (point-max))
|
|
|
|
|
(equal (encode-coding-string string coding)
|
|
|
|
|
(encode-coding-string (buffer-substring-no-properties
|
|
|
|
|
(point) (+ (point) len))
|
|
|
|
|
coding)))))
|
|
|
|
|
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(defun ispell-process-line (string shift)
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
"Send STRING, a line of text, to ispell and process the result.
|
2000-01-10 12:06:33 +00:00
|
|
|
|
This will modify the buffer for spelling errors.
|
2010-09-20 16:15:27 +02:00
|
|
|
|
Requires variables ISPELL-START and ISPELL-END to be defined in its
|
|
|
|
|
dynamic scope.
|
2007-02-14 12:42:01 +00:00
|
|
|
|
Returns the sum SHIFT due to changes in word replacements."
|
2010-09-20 16:15:27 +02:00
|
|
|
|
;;(declare special ispell-start ispell-end)
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(let (poss accept-list)
|
|
|
|
|
(if (not (numberp shift))
|
|
|
|
|
(setq shift 0))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; send string to spell process and get input.
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(ispell-send-string string)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(while (progn
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(ispell-accept-output)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; Last item of output contains a blank line.
|
|
|
|
|
(not (string= "" (car ispell-filter)))))
|
|
|
|
|
;; parse all inputs from the stream one word at a time.
|
|
|
|
|
;; Place in FIFO order and remove the blank item.
|
|
|
|
|
(setq ispell-filter (nreverse (cdr ispell-filter)))
|
|
|
|
|
(while (and (not ispell-quit) ispell-filter)
|
2000-01-10 12:06:33 +00:00
|
|
|
|
;; get next word, accounting for accepted words and start shifts
|
|
|
|
|
(setq poss (ispell-parse-output (car ispell-filter)
|
|
|
|
|
accept-list shift))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(if (and poss (listp poss)) ; spelling error occurred.
|
|
|
|
|
;; Whenever we have misspellings, we can change
|
|
|
|
|
;; the buffer. Keep boundaries as markers.
|
|
|
|
|
;; Markers can move with highlighting! This destroys
|
|
|
|
|
;; end of region markers line-end and ispell-region-end
|
|
|
|
|
(let ((word-start
|
2016-12-04 21:50:18 +00:00
|
|
|
|
(copy-marker (+ ispell-start (car (cdr poss)))))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(word-len (length (car poss)))
|
2010-09-20 16:15:27 +02:00
|
|
|
|
(line-end (copy-marker ispell-end))
|
|
|
|
|
(line-start (copy-marker ispell-start))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
recheck-region replace)
|
|
|
|
|
(goto-char word-start)
|
|
|
|
|
;; Adjust the horizontal scroll & point
|
|
|
|
|
(ispell-horiz-scroll)
|
|
|
|
|
(goto-char (+ word-len word-start))
|
|
|
|
|
(ispell-horiz-scroll)
|
|
|
|
|
(goto-char word-start)
|
|
|
|
|
(ispell-horiz-scroll)
|
2000-01-10 12:06:33 +00:00
|
|
|
|
|
|
|
|
|
;; Alignment cannot be tracked and this error will occur when
|
|
|
|
|
;; `query-replace' makes multiple corrections on the starting line.
|
2005-01-18 23:20:18 +00:00
|
|
|
|
(or (ispell-looking-at (car poss))
|
2012-11-06 17:22:09 +01:00
|
|
|
|
;; This error occurs due to filter pipe problems
|
|
|
|
|
(let* ((ispell-pipe-word (car poss))
|
|
|
|
|
(actual-point (marker-position word-start))
|
|
|
|
|
(actual-line (line-number-at-pos actual-point))
|
2013-03-01 12:46:57 -05:00
|
|
|
|
(actual-column (save-excursion (goto-char actual-point)
|
|
|
|
|
(current-column))))
|
2012-11-06 17:22:09 +01:00
|
|
|
|
(ispell-print-if-debug
|
2013-03-01 12:46:57 -05:00
|
|
|
|
"ispell-process-line: Ispell misalignment error:
|
|
|
|
|
[Word from ispell pipe]: [%s], actual (point,line,column): (%s,%s,%s)\n"
|
|
|
|
|
ispell-pipe-word actual-point actual-line actual-column)
|
|
|
|
|
(error (concat "Ispell misalignment: word "
|
|
|
|
|
"`%s' point %d; probably incompatible versions")
|
|
|
|
|
ispell-pipe-word actual-point)))
|
|
|
|
|
;; ispell-cmd-loop can go recursive & change buffer
|
|
|
|
|
(if ispell-keep-choices-win
|
|
|
|
|
(setq replace (ispell-command-loop
|
|
|
|
|
(car (cdr (cdr poss)))
|
|
|
|
|
(car (cdr (cdr (cdr poss))))
|
|
|
|
|
(car poss) (marker-position word-start)
|
|
|
|
|
(+ word-len (marker-position word-start))))
|
|
|
|
|
(save-window-excursion
|
|
|
|
|
(setq replace (ispell-command-loop
|
|
|
|
|
(car (cdr (cdr poss)))
|
|
|
|
|
(car (cdr (cdr (cdr poss))))
|
|
|
|
|
(car poss) (marker-position word-start)
|
|
|
|
|
(+ word-len (marker-position word-start))))))
|
|
|
|
|
|
|
|
|
|
(goto-char word-start)
|
|
|
|
|
;; Recheck when query replace edit changes misspelled word.
|
|
|
|
|
;; Error in tex mode when a potential math mode change exists.
|
|
|
|
|
(if (and replace (listp replace) (= 2 (length replace)))
|
|
|
|
|
(if (and (eq ispell-parser 'tex)
|
|
|
|
|
(string-match "[\\\\][]()[]\\|\\\\begin\\|\\$"
|
|
|
|
|
(regexp-quote string)))
|
|
|
|
|
(error
|
|
|
|
|
"Don't start query replace on a line with math characters"
|
|
|
|
|
)
|
|
|
|
|
(set-marker line-end (point))
|
|
|
|
|
(setq ispell-filter nil
|
|
|
|
|
recheck-region t)))
|
|
|
|
|
|
|
|
|
|
;; Insert correction if needed.
|
|
|
|
|
(cond
|
|
|
|
|
((or (null replace)
|
|
|
|
|
(equal 0 replace)) ; ACCEPT/INSERT
|
|
|
|
|
(if (equal 0 replace) ; BUFFER-LOCAL DICT ADD
|
|
|
|
|
(ispell-add-per-file-word-list (car poss)))
|
|
|
|
|
;; Do not recheck accepted word on this line.
|
|
|
|
|
(setq accept-list (cons (car poss) accept-list)))
|
|
|
|
|
(t ; Replacement word selected or entered.
|
|
|
|
|
(delete-region (point) (+ word-len (point)))
|
|
|
|
|
(if (not (listp replace))
|
|
|
|
|
(progn
|
|
|
|
|
(insert replace) ; Insert dictionary word.
|
|
|
|
|
(ispell-send-replacement (car poss) replace)
|
|
|
|
|
(setq accept-list (cons replace accept-list)))
|
|
|
|
|
(let ((replace-word (car replace)))
|
|
|
|
|
;; Recheck hand entered replacement word.
|
|
|
|
|
(insert replace-word)
|
|
|
|
|
(ispell-send-replacement (car poss) replace-word)
|
|
|
|
|
(if (car (cdr replace))
|
|
|
|
|
(save-window-excursion
|
|
|
|
|
(delete-other-windows) ; to correctly show help.
|
|
|
|
|
;; Assume case-replace &
|
|
|
|
|
;; case-fold-search correct?
|
|
|
|
|
(query-replace (car poss) (car replace) t)))
|
|
|
|
|
(goto-char word-start)
|
|
|
|
|
;; Do not recheck if already accepted.
|
|
|
|
|
(if (member replace-word accept-list)
|
|
|
|
|
(setq accept-list (cons replace-word accept-list)
|
|
|
|
|
replace replace-word)
|
|
|
|
|
(let ((region-end (copy-marker ispell-region-end)))
|
|
|
|
|
(setq recheck-region ispell-filter
|
|
|
|
|
ispell-filter nil ; Save filter.
|
|
|
|
|
shift 0 ; Already accounted.
|
|
|
|
|
shift (ispell-region
|
|
|
|
|
word-start
|
|
|
|
|
(+ word-start (length replace-word))
|
|
|
|
|
t shift))
|
|
|
|
|
(if (null shift) ; Quitting check.
|
|
|
|
|
(setq shift 0))
|
|
|
|
|
(set-marker ispell-region-end region-end)
|
|
|
|
|
(set-marker region-end nil)
|
|
|
|
|
(setq ispell-filter recheck-region
|
|
|
|
|
recheck-region nil
|
|
|
|
|
replace replace-word)))))
|
|
|
|
|
|
|
|
|
|
(setq shift (+ shift (- (length replace) word-len)))
|
|
|
|
|
|
|
|
|
|
;; Move line-start across word...
|
|
|
|
|
;; new shift function does this now...
|
|
|
|
|
;;(set-marker line-start (+ line-start
|
|
|
|
|
;; (- (length replace)
|
|
|
|
|
;; (length (car poss)))))
|
|
|
|
|
))
|
|
|
|
|
(if (not ispell-quit)
|
2010-09-04 20:47:29 +02:00
|
|
|
|
;; FIXME: remove redundancy with identical code above.
|
2013-03-01 12:46:57 -05:00
|
|
|
|
(let (message-log-max)
|
|
|
|
|
(message
|
2010-09-04 20:47:29 +02:00
|
|
|
|
"Continuing spelling check using %s with %s dictionary..."
|
|
|
|
|
(file-name-nondirectory ispell-program-name)
|
|
|
|
|
(or ispell-current-dictionary "default"))))
|
2013-03-01 12:46:57 -05:00
|
|
|
|
(sit-for 0)
|
|
|
|
|
(setq ispell-start (marker-position line-start)
|
|
|
|
|
ispell-end (marker-position line-end))
|
|
|
|
|
;; Adjust markers when end of region lost from highlighting.
|
|
|
|
|
(if (and (not recheck-region)
|
2010-09-20 16:15:27 +02:00
|
|
|
|
(< ispell-end (+ word-start word-len)))
|
2013-03-01 12:46:57 -05:00
|
|
|
|
(setq ispell-end (+ word-start word-len)))
|
|
|
|
|
(if (= word-start ispell-region-end)
|
|
|
|
|
(set-marker ispell-region-end (+ word-start word-len)))
|
|
|
|
|
;; Going out of scope - unneeded.
|
|
|
|
|
(set-marker line-start nil)
|
|
|
|
|
(set-marker word-start nil)
|
|
|
|
|
(set-marker line-end nil)))
|
|
|
|
|
;; Finished with misspelling!
|
2000-01-10 12:06:33 +00:00
|
|
|
|
(setq ispell-filter (cdr ispell-filter)))
|
|
|
|
|
shift))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
|
|
|
|
|
1997-12-03 17:20:13 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ispell-comments-and-strings ()
|
|
|
|
|
"Check comments and strings in the current buffer for spelling errors."
|
|
|
|
|
(interactive)
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(let (state done)
|
|
|
|
|
(while (not done)
|
|
|
|
|
(setq done t)
|
|
|
|
|
(setq state (parse-partial-sexp (point) (point-max)
|
|
|
|
|
nil nil state 'syntax-table))
|
1999-05-09 06:34:35 +00:00
|
|
|
|
(if (or (nth 3 state) (nth 4 state))
|
|
|
|
|
(let ((start (point)))
|
|
|
|
|
(setq state (parse-partial-sexp start (point-max)
|
|
|
|
|
nil nil state 'syntax-table))
|
|
|
|
|
(if (or (nth 3 state) (nth 4 state))
|
|
|
|
|
(error "Unterminated string or comment"))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(setq done (not (ispell-region start (point))))))))))
|
1997-12-03 17:20:13 +00:00
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
1994-05-21 07:38:10 +00:00
|
|
|
|
(defun ispell-buffer ()
|
1994-03-02 04:56:25 +00:00
|
|
|
|
"Check the current buffer for spelling errors interactively."
|
|
|
|
|
(interactive)
|
|
|
|
|
(ispell-region (point-min) (point-max)))
|
|
|
|
|
|
2012-11-06 17:22:09 +01:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ispell-buffer-with-debug (&optional append)
|
|
|
|
|
"`ispell-buffer' with some output sent to `ispell-debug-buffer' buffer.
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
If APPEND is non-n il, append the info to previous buffer if exists."
|
2012-11-06 17:22:09 +01:00
|
|
|
|
(interactive)
|
|
|
|
|
(let ((ispell-debug-buffer (ispell-create-debug-buffer append)))
|
|
|
|
|
(ispell-buffer)))
|
1994-05-21 07:38:10 +00:00
|
|
|
|
|
1994-03-10 07:37:04 +00:00
|
|
|
|
;;;###autoload
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(defun ispell-continue ()
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
"Continue a halted spelling session beginning with the current word."
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
(interactive)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(if (not (marker-position ispell-region-end))
|
|
|
|
|
(message "No session to continue. Use 'X' command when checking!")
|
|
|
|
|
(if (not (equal (marker-buffer ispell-region-end) (current-buffer)))
|
|
|
|
|
(message "Must continue ispell from buffer %s"
|
|
|
|
|
(buffer-name (marker-buffer ispell-region-end)))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(ispell-region
|
|
|
|
|
;; find beginning of current word:
|
|
|
|
|
(car (cdr (ispell-get-word t)))
|
|
|
|
|
(marker-position ispell-region-end)))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Horizontal scrolling
|
1994-05-21 07:38:10 +00:00
|
|
|
|
(defun ispell-horiz-scroll ()
|
2009-01-09 02:59:52 +00:00
|
|
|
|
"Place point within the horizontal visibility of its window area."
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(if truncate-lines ; display truncating lines?
|
|
|
|
|
;; See if display needs to be scrolled.
|
|
|
|
|
(let ((column (- (current-column) (max (window-hscroll) 1))))
|
|
|
|
|
(if (and (< column 0) (> (window-hscroll) 0))
|
|
|
|
|
(scroll-right (max (- column) 10))
|
|
|
|
|
(if (>= column (- (window-width) 2))
|
|
|
|
|
(scroll-left (max (- column (window-width) -3) 10)))))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Interactive word completion.
|
2010-09-04 20:47:29 +02:00
|
|
|
|
;; Forces "previous-word" processing. Do we want to make this selectable?
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ispell-complete-word (&optional interior-frag)
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
"Try to complete the word before or at point.
|
|
|
|
|
If optional INTERIOR-FRAG is non-nil, then the word may be a character
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
sequence inside of a word.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
Standard ispell choices are then available."
|
2012-05-18 15:04:07 -04:00
|
|
|
|
;; FIXME: completion-at-point-function.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(interactive "P")
|
|
|
|
|
(let ((cursor-location (point))
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
(case-fold-search-val case-fold-search)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(word (ispell-get-word nil "\\*")) ; force "previous-word" processing.
|
|
|
|
|
start end possibilities replacement)
|
|
|
|
|
(setq start (car (cdr word))
|
|
|
|
|
end (car (cdr (cdr word)))
|
|
|
|
|
word (car word)
|
|
|
|
|
possibilities
|
|
|
|
|
(or (string= word "") ; Will give you every word
|
2013-09-28 10:54:27 +08:00
|
|
|
|
(ispell-lookup-words
|
|
|
|
|
(concat (and interior-frag "*") word
|
2013-11-09 03:12:25 +02:00
|
|
|
|
(and interior-frag "*"))
|
2013-09-28 10:54:27 +08:00
|
|
|
|
(or ispell-complete-word-dict
|
|
|
|
|
ispell-alternate-dictionary))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(cond ((eq possibilities t)
|
|
|
|
|
(message "No word to complete"))
|
|
|
|
|
((null possibilities)
|
|
|
|
|
(message "No match for \"%s\"" word))
|
|
|
|
|
(t ; There is a modification...
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
(setq case-fold-search nil) ; Try and respect case of word.
|
|
|
|
|
(cond
|
|
|
|
|
((string-equal (upcase word) word)
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(setq possibilities (mapcar #'upcase possibilities)))
|
2003-05-14 01:54:28 +00:00
|
|
|
|
((eq (upcase (aref word 0)) (aref word 0))
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
(setq possibilities (mapcar (function
|
|
|
|
|
(lambda (pos)
|
2003-05-14 01:54:28 +00:00
|
|
|
|
(if (eq (aref word 0) (aref pos 0))
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
pos
|
|
|
|
|
(capitalize pos))))
|
|
|
|
|
possibilities))))
|
|
|
|
|
(setq case-fold-search case-fold-search-val)
|
1994-10-10 01:01:20 +00:00
|
|
|
|
(save-window-excursion
|
|
|
|
|
(setq replacement
|
|
|
|
|
(ispell-command-loop possibilities nil word start end)))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(cond
|
|
|
|
|
((equal 0 replacement) ; BUFFER-LOCAL ADDITION
|
|
|
|
|
(ispell-add-per-file-word-list word))
|
|
|
|
|
(replacement ; REPLACEMENT WORD
|
|
|
|
|
(delete-region start end)
|
|
|
|
|
(setq word (if (atom replacement) replacement (car replacement))
|
|
|
|
|
cursor-location (+ (- (length word) (- end start))
|
|
|
|
|
cursor-location))
|
2012-04-23 12:03:33 +02:00
|
|
|
|
(insert word)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(if (not (atom replacement)) ; recheck spelling of replacement.
|
|
|
|
|
(progn
|
|
|
|
|
(goto-char cursor-location)
|
|
|
|
|
(ispell-word nil t)))))
|
|
|
|
|
(if (get-buffer ispell-choices-buffer)
|
|
|
|
|
(kill-buffer ispell-choices-buffer))))
|
|
|
|
|
(ispell-pdict-save ispell-silently-savep)
|
|
|
|
|
(goto-char cursor-location)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ispell-complete-word-interior-frag ()
|
1994-05-21 07:38:10 +00:00
|
|
|
|
"Completes word matching character sequence inside a word."
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(interactive)
|
|
|
|
|
(ispell-complete-word t))
|
|
|
|
|
|
1994-12-10 02:01:31 +00:00
|
|
|
|
|
2000-08-02 20:21:53 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ispell ()
|
|
|
|
|
"Interactively check a region or buffer for spelling errors.
|
2000-08-17 20:54:01 +00:00
|
|
|
|
If `transient-mark-mode' is on, and a region is active, spell-check
|
2000-12-08 10:49:20 +00:00
|
|
|
|
that region. Otherwise spell-check the buffer.
|
|
|
|
|
|
|
|
|
|
Ispell dictionaries are not distributed with Emacs. If you are
|
|
|
|
|
looking for a dictionary, please see the distribution of the GNU ispell
|
|
|
|
|
program, or do an Internet search; there are various dictionaries
|
|
|
|
|
available on the net."
|
2000-08-02 20:21:53 +00:00
|
|
|
|
(interactive)
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(if (and (boundp 'transient-mark-mode) transient-mark-mode
|
|
|
|
|
(boundp 'mark-active) mark-active)
|
2000-08-02 20:21:53 +00:00
|
|
|
|
(ispell-region (region-beginning) (region-end))
|
|
|
|
|
(ispell-buffer)))
|
|
|
|
|
|
|
|
|
|
|
1994-09-16 23:10:44 +00:00
|
|
|
|
;;; **********************************************************************
|
|
|
|
|
;;; Ispell Minor Mode
|
|
|
|
|
;;; **********************************************************************
|
|
|
|
|
|
|
|
|
|
(defvar ispell-minor-keymap
|
|
|
|
|
(let ((map (make-sparse-keymap)))
|
|
|
|
|
(define-key map " " 'ispell-minor-check)
|
|
|
|
|
(define-key map "\r" 'ispell-minor-check)
|
|
|
|
|
map)
|
|
|
|
|
"Keymap used for Ispell minor mode.")
|
|
|
|
|
|
|
|
|
|
;;;###autoload
|
2010-09-20 13:53:42 +02:00
|
|
|
|
(define-minor-mode ispell-minor-mode
|
2011-10-19 20:26:14 -04:00
|
|
|
|
"Toggle last-word spell checking (Ispell minor mode).
|
|
|
|
|
With a prefix argument ARG, enable Ispell minor mode if ARG is
|
|
|
|
|
positive, and disable it otherwise. If called from Lisp, enable
|
|
|
|
|
the mode if ARG is omitted or nil.
|
2000-08-17 20:54:01 +00:00
|
|
|
|
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
Ispell minor mode is a buffer-local minor mode. When enabled,
|
2011-10-19 20:26:14 -04:00
|
|
|
|
typing SPC or RET warns you if the previous word is incorrectly
|
|
|
|
|
spelled.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
2011-10-19 20:26:14 -04:00
|
|
|
|
All the buffer-local variables and dictionaries are ignored. To
|
Minor formatting changes in ispell.el
* lisp/textmodes/ispell.el (ispell-create-debug-buffer)
(ispell-print-if-debug, ispell-aspell-find-dictionary)
(ispell-aspell-add-aliases, ispell-hunspell-dict-paths-alist)
(ispell-hunspell-dictionary-alist)
(ispell-hunspell-fill-dictionary-entry)
(ispell-find-hunspell-dictionaries, ispell-send-replacement)
(ispell-buffer-with-debug, ispell-complete-word)
(ispell-current-dictionary, ispell-current-personal-dictionary)
(ispell-accept-output, ispell-minor-mode)
(ispell-personal-dictionary, ispell-dictionary-alist)
(ispell-really-aspell, ispell-really-hunspell)
(ispell-encoding8-command, ispell-aspell-supports-utf8)
(ispell-aspell-dictionary-alist, ispell-set-spellchecker-params):
Fix whitespace, inconsistent capitalization, and arguments in doc
strings.
2015-08-22 13:38:51 +03:00
|
|
|
|
read them into the running Ispell process, type \\[ispell-word]
|
2011-10-19 20:26:14 -04:00
|
|
|
|
SPC.
|
|
|
|
|
|
|
|
|
|
For spell-checking \"on the fly\", not just after typing SPC or
|
|
|
|
|
RET, use `flyspell-mode'."
|
2010-09-20 13:53:42 +02:00
|
|
|
|
nil " Spell" ispell-minor-keymap)
|
2000-08-17 20:54:01 +00:00
|
|
|
|
|
1994-09-16 23:10:44 +00:00
|
|
|
|
(defun ispell-minor-check ()
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
"Check previous word, then continue with the normal binding of this key.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
Don't check previous word when character before point is a space or newline.
|
|
|
|
|
Don't read buffer-local settings or word lists."
|
1994-09-16 23:10:44 +00:00
|
|
|
|
(interactive "*")
|
|
|
|
|
(let ((ispell-minor-mode nil)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(ispell-check-only t)
|
|
|
|
|
(last-char (char-after (1- (point)))))
|
1999-05-09 06:34:35 +00:00
|
|
|
|
(command-execute (key-binding (this-command-keys)))
|
|
|
|
|
(if (not (or (eq last-char ?\ ) (eq last-char ?\n)
|
2000-08-17 20:54:01 +00:00
|
|
|
|
(and ispell-skip-html (eq last-char ?>))
|
|
|
|
|
(and ispell-skip-html (eq last-char ?\;))))
|
1999-05-09 06:34:35 +00:00
|
|
|
|
(ispell-word nil t))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1994-12-10 02:01:31 +00:00
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
;;; **********************************************************************
|
|
|
|
|
;;; Ispell Message
|
|
|
|
|
;;; **********************************************************************
|
1994-03-02 04:57:23 +00:00
|
|
|
|
|
|
|
|
|
(defvar ispell-message-text-end
|
|
|
|
|
(mapconcat (function identity)
|
|
|
|
|
'(
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; Don't spell check signatures
|
|
|
|
|
"^-- $"
|
2011-11-16 18:47:25 +01:00
|
|
|
|
;; Matches PostScript files.
|
2003-05-22 21:34:00 +00:00
|
|
|
|
;;"^%!PS-Adobe-[123].0"
|
1994-03-02 04:57:23 +00:00
|
|
|
|
;; Matches uuencoded text
|
2003-05-22 21:34:00 +00:00
|
|
|
|
;;"^begin [0-9][0-9][0-9] .*\nM.*\nM.*\nM"
|
1999-05-09 06:34:35 +00:00
|
|
|
|
;; Matches shell files (especially auto-decoding)
|
1994-12-10 02:01:31 +00:00
|
|
|
|
"^#! /bin/[ck]?sh"
|
1994-07-30 21:11:00 +00:00
|
|
|
|
;; Matches context difference listing
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
"\\(\\(^cd .*\n\\)?diff -c .*\\)?\n\\*\\*\\* .*\n--- .*\n\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*"
|
|
|
|
|
;; Matches unidiff difference listing
|
2010-02-03 00:33:52 +02:00
|
|
|
|
"\\(diff -u .*\\)?\n--- .*\n\\+\\+\\+ .*\n@@ [-+][0-9]+,[0-9]+ [-+][0-9]+,[0-9]+ @@"
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; Matches reporter.el bug report
|
|
|
|
|
"^current state:\n==============\n"
|
|
|
|
|
;; Matches commonly used "cut" boundaries
|
|
|
|
|
"^\\(- \\)?[-=_]+\\s ?\\(cut here\\|Environment Follows\\)")
|
1994-03-02 04:57:23 +00:00
|
|
|
|
"\\|")
|
2012-04-09 21:05:48 +08:00
|
|
|
|
"Text beyond which `ispell-message' will not spell-check.
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
If it is a string, limit is the first occurrence of that regular expression.
|
1994-03-02 04:57:23 +00:00
|
|
|
|
Otherwise, it must be a function which is called to get the limit.")
|
2006-05-21 20:25:43 +00:00
|
|
|
|
(put 'ispell-message-text-end 'risky-local-variable t)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1994-05-21 07:38:10 +00:00
|
|
|
|
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(defun ispell-mime-multipartp (&optional limit)
|
|
|
|
|
"Return multipart message start boundary or nil if none."
|
2015-05-21 10:04:45 -07:00
|
|
|
|
;; caller must ensure `case-fold-search' is set to t
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(and
|
|
|
|
|
(re-search-forward
|
|
|
|
|
"Content-Type: *multipart/\\([^ \t\n]*;[ \t]*[\n]?[ \t]*\\)+boundary="
|
|
|
|
|
limit t)
|
|
|
|
|
(let (boundary)
|
|
|
|
|
(if (looking-at "\"")
|
|
|
|
|
(let (start)
|
|
|
|
|
(forward-char)
|
|
|
|
|
(setq start (point))
|
|
|
|
|
(while (not (looking-at "\""))
|
|
|
|
|
(forward-char 1))
|
|
|
|
|
(setq boundary (buffer-substring-no-properties start (point))))
|
|
|
|
|
(let ((start (point)))
|
|
|
|
|
(while (looking-at "[-0-9a-zA-Z'()+_,./:=?]")
|
|
|
|
|
(forward-char))
|
|
|
|
|
(setq boundary (buffer-substring-no-properties start (point)))))
|
|
|
|
|
(if (< (length boundary) 1)
|
|
|
|
|
(setq boundary nil)
|
|
|
|
|
(concat "--" boundary)))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun ispell-mime-skip-part (boundary)
|
2009-01-09 02:59:52 +00:00
|
|
|
|
"Move point across header, or entire MIME part if message is encoded.
|
2003-05-22 21:34:00 +00:00
|
|
|
|
All specified types except `7bit' `8bit' and `quoted-printable' are considered
|
|
|
|
|
encoded and therefore skipped. See rfc 1521, 2183, ...
|
|
|
|
|
If no boundary is given, then entire message is skipped.
|
|
|
|
|
|
|
|
|
|
This starts one line ABOVE the MIME content messages, on the boundary marker,
|
|
|
|
|
for operation with the generic region-skipping code.
|
|
|
|
|
This places new MIME boundaries into variable `ispell-checking-message'."
|
|
|
|
|
(forward-line) ; skip over boundary to headers
|
|
|
|
|
(let ((save-case-fold-search case-fold-search)
|
|
|
|
|
(continuep t)
|
|
|
|
|
textp)
|
|
|
|
|
(setq case-fold-search t
|
|
|
|
|
ispell-skip-html nil)
|
|
|
|
|
(while continuep
|
|
|
|
|
(setq continuep nil)
|
|
|
|
|
(if (looking-at "Content-Type: *text/")
|
|
|
|
|
(progn
|
|
|
|
|
(goto-char (match-end 0))
|
|
|
|
|
(if (looking-at "html")
|
|
|
|
|
(setq ispell-skip-html t))
|
|
|
|
|
(setq textp t
|
|
|
|
|
continuep t)
|
|
|
|
|
(re-search-forward "\\(.*;[ \t]*[\n]\\)*.*$" nil t)
|
|
|
|
|
(forward-line)))
|
|
|
|
|
(if (looking-at "Content-Transfer-Encoding: *\\([^ \t\n]*\\)")
|
|
|
|
|
(let ((match (buffer-substring (match-beginning 1) (match-end 1))))
|
|
|
|
|
(setq textp (member (upcase match)
|
|
|
|
|
;; only spell check the following encodings:
|
|
|
|
|
'("7BIT" "8BIT" "QUOTED-PRINTABLE" "BINARY"))
|
|
|
|
|
continuep t)
|
|
|
|
|
(goto-char (match-end 0))
|
|
|
|
|
(re-search-forward "\\(.*;[ \t]*[\n]\\)*.*$" nil t)
|
|
|
|
|
(forward-line)))
|
|
|
|
|
;; hierarchical boundary definition
|
|
|
|
|
(if (looking-at "Content-Type: *multipart/")
|
|
|
|
|
(let ((new-boundary (ispell-mime-multipartp)))
|
|
|
|
|
(if (string-match new-boundary boundary)
|
|
|
|
|
(setq continuep t)
|
|
|
|
|
;; first pass redefine skip function to include new boundary
|
|
|
|
|
;;(re-search-backward boundary nil t)
|
|
|
|
|
(forward-line)
|
|
|
|
|
(setq ispell-checking-message
|
|
|
|
|
(cons
|
|
|
|
|
(list new-boundary 'ispell-mime-skip-part new-boundary)
|
|
|
|
|
(if (eq t ispell-checking-message) nil
|
|
|
|
|
ispell-checking-message))
|
|
|
|
|
textp t
|
|
|
|
|
continuep t)))
|
|
|
|
|
;; Skip all MIME headers that don't affect spelling
|
|
|
|
|
(if (looking-at "Content-[^ \t]*: *\\(.*;[ \t]*[\n]\\)*.*$")
|
|
|
|
|
(progn
|
|
|
|
|
(setq continuep t)
|
|
|
|
|
(goto-char (match-end 0))
|
|
|
|
|
(forward-line)))))
|
|
|
|
|
|
|
|
|
|
(setq case-fold-search save-case-fold-search)
|
|
|
|
|
(if textp
|
|
|
|
|
(point)
|
|
|
|
|
;; encoded message. Skip to boundary, or entire message.
|
|
|
|
|
(if (not boundary)
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(re-search-forward boundary nil t)
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(point)))))
|
|
|
|
|
|
1995-06-16 05:13:01 +00:00
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun ispell-message ()
|
|
|
|
|
"Check the spelling of a mail message or news post.
|
|
|
|
|
Don't check spelling of message headers except the Subject field.
|
|
|
|
|
Don't check included messages.
|
|
|
|
|
|
1996-06-28 08:55:00 +00:00
|
|
|
|
To abort spell checking of a message region and send the message anyway,
|
|
|
|
|
use the `x' command. (Any subsequent regions will be checked.)
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
The `X' command aborts sending the message so that you can edit the buffer.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
To spell-check whenever a message is sent, include the appropriate lines
|
2012-09-17 13:41:04 +08:00
|
|
|
|
in your init file:
|
2016-04-18 12:27:58 -04:00
|
|
|
|
(add-hook \\='message-send-hook #\\='ispell-message) ;; GNUS 5
|
|
|
|
|
(add-hook \\='news-inews-hook #\\='ispell-message) ;; GNUS 4
|
|
|
|
|
(add-hook \\='mail-send-hook #\\='ispell-message)
|
|
|
|
|
(add-hook \\='mh-before-send-letter-hook #\\='ispell-message)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
1994-12-10 02:01:31 +00:00
|
|
|
|
You can bind this to the key C-c i in GNUS or mail by adding to
|
1994-05-21 08:04:20 +00:00
|
|
|
|
`news-reply-mode-hook' or `mail-mode-hook' the following lambda expression:
|
Prefer directed to neutral quotes
Prefer directed to neutral quotes in docstings and diagnostics.
In docstrings, escape apostrophes that would otherwise be translated
to curved quotes using the newer, simpler rules.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-lang.el (math-read-giac-subscr)
(math-read-math-subscr):
* lisp/calc/calc-misc.el (report-calc-bug):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/dabbrev.el (dabbrev-expand):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine):
* lisp/emacs-lisp/elint.el (elint-get-top-forms):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emulation/viper-cmd.el (viper-toggle-search-style):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-arg.el (eshell-parse-arguments):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/files-x.el (modify-file-local-variable):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer)
(filesets-update-pre010505):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/gnus/auth-source.el (auth-source-netrc-parse-entries):
* lisp/gnus/gnus-agent.el (gnus-agent-check-overview-buffer)
(gnus-agent-fetch-headers):
* lisp/gnus/gnus-int.el (gnus-start-news-server):
* lisp/gnus/gnus-registry.el:
(gnus-registry--split-fancy-with-parent-internal):
* lisp/gnus/gnus-score.el (gnus-summary-increase-score):
* lisp/gnus/gnus-start.el (gnus-convert-old-newsrc):
* lisp/gnus/gnus-topic.el (gnus-topic-rename):
* lisp/gnus/legacy-gnus-agent.el (gnus-agent-unlist-expire-days):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/gnus/spam.el (spam-check-blackholes):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/tramp-cache.el:
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-bibtex.el (org-bibtex-fields):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/play/dunnet.el (dun-score, dun-help, dun-endgame-question)
(dun-rooms, dun-endgame-questions):
* lisp/progmodes/ada-mode.el (ada-goto-matching-start):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/antlr-mode.el (antlr-options-alists):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/server.el (server-get-auth-key):
* lisp/subr.el (version-to-list):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/vc/ediff-diff.el (ediff-same-contents):
* lisp/vc/vc-cvs.el (vc-cvs-mode-line-string):
* test/automated/tramp-tests.el (tramp-test33-asynchronous-requests):
Use directed rather than neutral quotes in diagnostics.
2015-08-24 23:39:33 -07:00
|
|
|
|
(function (lambda () (local-set-key \"\\C-ci\" \\='ispell-message)))"
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(interactive)
|
1994-03-02 04:57:23 +00:00
|
|
|
|
(save-excursion
|
1994-05-21 07:38:10 +00:00
|
|
|
|
(goto-char (point-min))
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(let* (boundary mimep
|
|
|
|
|
(ispell-skip-region-alist-save ispell-skip-region-alist)
|
2008-04-24 15:36:54 +00:00
|
|
|
|
;; Nil when message came from outside (eg calling Emacs as editor)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; Non-nil marker of end of headers.
|
|
|
|
|
(internal-messagep
|
|
|
|
|
(re-search-forward
|
|
|
|
|
(concat "^" (regexp-quote mail-header-separator) "$") nil t))
|
|
|
|
|
(end-of-headers ; Start of body.
|
|
|
|
|
(copy-marker
|
|
|
|
|
(or internal-messagep
|
|
|
|
|
(re-search-forward "^$" nil t)
|
|
|
|
|
(point-min))))
|
|
|
|
|
(limit (copy-marker ; End of region we will spell check.
|
1994-05-21 07:38:10 +00:00
|
|
|
|
(cond
|
|
|
|
|
((not ispell-message-text-end) (point-max))
|
|
|
|
|
((char-or-string-p ispell-message-text-end)
|
|
|
|
|
(if (re-search-forward ispell-message-text-end nil t)
|
|
|
|
|
(match-beginning 0)
|
|
|
|
|
(point-max)))
|
|
|
|
|
(t (min (point-max) (funcall ispell-message-text-end))))))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(default-prefix ; Vanilla cite prefix (just used for cite-regexp)
|
2016-12-04 21:55:19 +00:00
|
|
|
|
(if (ispell-non-empty-string mail-yank-prefix)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
" \\|\t"))
|
|
|
|
|
(cite-regexp ;Prefix of quoted text
|
1994-03-02 04:57:23 +00:00
|
|
|
|
(cond
|
2016-12-04 19:20:19 +00:00
|
|
|
|
((functionp 'sc-cite-regexp) ; supercite >= 3.0
|
2016-12-04 22:01:56 +00:00
|
|
|
|
(with-no-warnings
|
2012-05-30 18:14:37 +02:00
|
|
|
|
(concat "\\(" (sc-cite-regexp) "\\)" "\\|"
|
|
|
|
|
(ispell-non-empty-string sc-reference-tag-string))))
|
2016-12-04 19:20:19 +00:00
|
|
|
|
((equal major-mode 'message-mode) ; GNUS >= 5
|
1994-03-02 04:57:23 +00:00
|
|
|
|
(concat "In article <" "\\|"
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
"[^,;&+=\n]+ <[^,;&+=]+> writes:" "\\|"
|
2016-12-04 22:01:56 +00:00
|
|
|
|
(with-no-warnings message-cite-prefix-regexp)
|
2004-10-16 15:07:09 +00:00
|
|
|
|
"\\|"
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
default-prefix))
|
1994-03-02 04:57:23 +00:00
|
|
|
|
((equal major-mode 'mh-letter-mode) ; mh mail message
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
(concat "[^,;&+=\n]+ writes:" "\\|"
|
2016-12-04 22:01:56 +00:00
|
|
|
|
(with-no-warnings
|
2004-10-16 15:07:09 +00:00
|
|
|
|
(ispell-non-empty-string mh-ins-buf-prefix))))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
((not internal-messagep) ; Assume nn sent us this message.
|
1994-03-02 04:57:23 +00:00
|
|
|
|
(concat "In [a-zA-Z.]+ you write:" "\\|"
|
|
|
|
|
"In <[^,;&+=]+> [^,;&+=]+ writes:" "\\|"
|
|
|
|
|
" *> *"))
|
|
|
|
|
((boundp 'vm-included-text-prefix) ; VM mail message
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
(concat "[^,;&+=\n]+ writes:" "\\|"
|
1994-03-02 04:57:23 +00:00
|
|
|
|
(ispell-non-empty-string vm-included-text-prefix)))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(t default-prefix)))
|
|
|
|
|
(ispell-skip-region-alist
|
2015-12-14 17:17:31 +00:00
|
|
|
|
(cons (list (ispell--make-filename-or-URL-re))
|
|
|
|
|
(cons (list (concat "^\\(" cite-regexp "\\)")
|
|
|
|
|
(function forward-line))
|
|
|
|
|
ispell-skip-region-alist)))
|
1994-05-21 07:38:10 +00:00
|
|
|
|
(old-case-fold-search case-fold-search)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(dictionary-alist ispell-message-dictionary-alist)
|
1994-05-21 07:38:10 +00:00
|
|
|
|
(ispell-checking-message t))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
|
|
|
|
;; Select dictionary for message
|
|
|
|
|
(or (local-variable-p 'ispell-local-dictionary (current-buffer))
|
|
|
|
|
(while dictionary-alist
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(if (re-search-forward (car (car dictionary-alist))
|
|
|
|
|
end-of-headers t)
|
|
|
|
|
(setq ispell-local-dictionary (cdr (car dictionary-alist))
|
|
|
|
|
dictionary-alist nil)
|
|
|
|
|
(setq dictionary-alist (cdr dictionary-alist)))))
|
|
|
|
|
|
|
|
|
|
(unwind-protect
|
|
|
|
|
(progn
|
|
|
|
|
;; Spell check any original Subject:
|
|
|
|
|
(goto-char (point-min))
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(setq case-fold-search t
|
|
|
|
|
mimep (re-search-forward "MIME-Version:" end-of-headers t))
|
|
|
|
|
(goto-char (point-min))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(if (re-search-forward "^Subject: *" end-of-headers t)
|
|
|
|
|
(progn
|
|
|
|
|
(goto-char (match-end 0))
|
|
|
|
|
(if (and (not (looking-at ".*Re\\>"))
|
|
|
|
|
(not (looking-at "\\[")))
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
(progn
|
|
|
|
|
(setq case-fold-search old-case-fold-search)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(ispell-region (point)
|
|
|
|
|
(progn ;Tab-initiated continuation lns.
|
|
|
|
|
(end-of-line)
|
|
|
|
|
(while (looking-at "\n[ \t]")
|
|
|
|
|
(end-of-line 2))
|
|
|
|
|
(point)))))))
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(if mimep
|
|
|
|
|
(progn
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(setq boundary (ispell-mime-multipartp end-of-headers))))
|
|
|
|
|
;; Adjust message limit to MIME message if necessary.
|
|
|
|
|
(and boundary
|
|
|
|
|
(re-search-forward (concat boundary "--") nil t)
|
|
|
|
|
(re-search-backward boundary nil t)
|
|
|
|
|
(< (point) (marker-position limit))
|
|
|
|
|
(set-marker limit (point)))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
;; Select type or skip checking if this is a non-multipart message
|
|
|
|
|
;; Point moved to end of buffer if region is encoded.
|
2010-09-20 13:53:42 +02:00
|
|
|
|
(when (and mimep (not boundary))
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(re-search-forward "Content-[^ \t]*:" end-of-headers t)
|
|
|
|
|
(forward-line -1) ; following fn starts one line above
|
|
|
|
|
(ispell-mime-skip-part nil)
|
|
|
|
|
;; if message-text-end region, limit may be less than point.
|
|
|
|
|
(if (> (point) limit)
|
2010-09-20 13:53:42 +02:00
|
|
|
|
(set-marker limit (point))))
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(goto-char (max end-of-headers (point)))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(forward-line 1)
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(setq case-fold-search old-case-fold-search)
|
|
|
|
|
;; Define MIME regions to skip.
|
|
|
|
|
(if boundary
|
|
|
|
|
(setq ispell-checking-message
|
|
|
|
|
(list (list boundary 'ispell-mime-skip-part boundary))))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(ispell-region (point) limit))
|
|
|
|
|
(set-marker end-of-headers nil)
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(set-marker limit nil)
|
|
|
|
|
(setq ispell-skip-region-alist ispell-skip-region-alist-save
|
|
|
|
|
ispell-skip-html nil
|
|
|
|
|
case-fold-search old-case-fold-search)))))
|
1994-05-21 07:38:10 +00:00
|
|
|
|
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
(defun ispell-non-empty-string (string)
|
|
|
|
|
(if (or (not string) (string-equal string ""))
|
|
|
|
|
"\\'\\`" ; An unmatchable string if string is null.
|
|
|
|
|
(regexp-quote string)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; **********************************************************************
|
|
|
|
|
;;; Buffer Local Functions
|
|
|
|
|
;;; **********************************************************************
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun ispell-accept-buffer-local-defs ()
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
"Load all buffer-local information, restarting Ispell when necessary."
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(ispell-buffer-local-dict) ; May kill ispell-process.
|
|
|
|
|
(ispell-buffer-local-words) ; Will initialize ispell-process.
|
|
|
|
|
(ispell-buffer-local-parsing))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun ispell-buffer-local-parsing ()
|
1994-05-21 08:04:20 +00:00
|
|
|
|
"Place Ispell into parsing mode for this buffer.
|
1994-05-21 07:38:10 +00:00
|
|
|
|
Overrides the default parsing mode.
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
Includes LaTeX/Nroff modes and extended character mode."
|
1994-03-02 04:56:25 +00:00
|
|
|
|
;; (ispell-init-process) must already be called.
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(ispell-send-string "!\n") ; Put process in terse mode.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
;; We assume all major modes with "tex-mode" in them should use latex parsing
|
1999-05-09 06:34:35 +00:00
|
|
|
|
;; When exclusively checking comments, set to raw text mode (nroff).
|
|
|
|
|
(if (and (not (eq 'exclusive ispell-check-comments))
|
|
|
|
|
(or (and (eq ispell-parser 'use-mode-name)
|
|
|
|
|
(string-match "[Tt][Ee][Xx]-mode"
|
|
|
|
|
(symbol-name major-mode)))
|
|
|
|
|
(eq ispell-parser 'tex)))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(progn
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(ispell-send-string "+\n") ; set ispell mode to tex
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(if (not (eq ispell-parser 'tex))
|
|
|
|
|
(set (make-local-variable 'ispell-parser) 'tex)))
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(ispell-send-string "-\n")) ; set mode to normal (nroff)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; If needed, test for SGML & HTML modes and set a buffer local nil/t value.
|
2000-08-17 20:54:01 +00:00
|
|
|
|
(if (and ispell-skip-html (not (eq ispell-skip-html t)))
|
2003-05-22 21:34:00 +00:00
|
|
|
|
(setq ispell-skip-html
|
|
|
|
|
(not (null (string-match "sgml\\|html\\|xml"
|
|
|
|
|
(downcase (symbol-name major-mode)))))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
;; Set default extended character mode for given buffer, if any.
|
|
|
|
|
(let ((extended-char-mode (ispell-get-extended-character-mode)))
|
|
|
|
|
(if extended-char-mode
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(ispell-send-string (concat extended-char-mode "\n"))))
|
1994-12-10 02:01:31 +00:00
|
|
|
|
;; Set buffer-local parsing mode and extended character mode, if specified.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(save-excursion
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
;; Uses last occurrence of ispell-parsing-keyword
|
|
|
|
|
(if (search-backward ispell-parsing-keyword nil t)
|
Replace end-of-line, save-excursion etc with point-at-eol, point-at-bol.
* lisp/mh-e/mh-seq.el (mh-read-msg-list): Use point-at-eol.
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-show-infos)
(gnus-bookmark-kill-line): Use point-at-eol.
* lisp/cedet/ede/proj-elisp.el (ede-proj-flush-autoconf): Use point-at-bol.
* lisp/emacs-lisp/chart.el (chart-zap-chars):
* lisp/play/decipher.el (decipher-set-map):
* lisp/progmodes/ada-mode.el (ada-get-current-indent)
(ada-search-ignore-string-comment, ada-tab-hard, ada-untab-hard):
* lisp/progmodes/ada-prj.el (ada-prj-load-from-file, ada-prj-display-help):
* lisp/progmodes/ada-xref.el (ada-initialize-runtime-library)
(ada-get-all-references):
* lisp/progmodes/cperl-mode.el (cperl-electric-paren)
(cperl-electric-rparen, cperl-electric-keyword, cperl-electric-else)
(cperl-linefeed, cperl-sniff-for-indent, cperl-to-comment-or-eol)
(cperl-find-pods-heres, cperl-indent-exp, cperl-fix-line-spacing)
(cperl-word-at-point-hard):
* lisp/progmodes/idlw-shell.el (idlwave-shell-move-or-history)
(idlwave-shell-filename-string, idlwave-shell-batch-command)
(idlwave-shell-display-line):
* lisp/progmodes/idlwave.el (idlwave-show-begin, idlwave-fill-paragraph)
(idlwave-calc-hanging-indent, idlwave-auto-fill, idlwave-template):
* lisp/progmodes/js.el (js--re-search-forward-inner)
(js--re-search-backward-inner):
* lisp/progmodes/vhdl-mode.el (vhdl-align-region-1, vhdl-align-region-2)
(vhdl-fix-clause, vhdl-compose-configuration-architecture):
* lisp/progmodes/ruby-mode.el (ruby-parse-partial, eval-when-compile):
* lisp/textmodes/flyspell.el (flyspell-process-localwords):
* lisp/textmodes/ispell.el (ispell-buffer-local-parsing)
(ispell-buffer-local-dict, ispell-buffer-local-words):
Use point-at-bol and point-at-eol.
2010-11-06 18:36:33 -07:00
|
|
|
|
(let ((end (point-at-eol))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
string)
|
|
|
|
|
(search-forward ispell-parsing-keyword)
|
|
|
|
|
(while (re-search-forward " *\\([^ \"]+\\)" end t)
|
|
|
|
|
;; space separated definitions.
|
2005-06-08 15:45:34 +00:00
|
|
|
|
(setq string (downcase (match-string-no-properties 1)))
|
1999-05-09 06:34:35 +00:00
|
|
|
|
(cond ((and (string-match "latex-mode" string)
|
|
|
|
|
(not (eq 'exclusive ispell-check-comments)))
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(ispell-send-string "+\n~tex\n"))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
((string-match "nroff-mode" string)
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(ispell-send-string "-\n~nroff\n"))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
((string-match "~" string) ; Set extended character mode.
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(ispell-send-string (concat string "\n")))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(t (message "Invalid Ispell Parsing argument!")
|
|
|
|
|
(sit-for 2))))))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
|
2010-09-20 13:53:42 +02:00
|
|
|
|
;; Can kill the current ispell process
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2006-05-05 12:34:51 +00:00
|
|
|
|
(defun ispell-buffer-local-dict (&optional no-reload)
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
"Initializes local dictionary and local personal dictionary.
|
Fix doc strings in ispell.el/.
lisp/textmodes/ispell.el (ispell-skip-tib, ispell-keep-choices-win)
(ispell-choices-win-default-height, ispell-silently-savep)
(ispell-dictionary-alist, ispell-encoding8-command)
(ispell-check-version, ispell-aspell-find-dictionary)
(ispell-valid-dictionary-list, ispell-words-keyword)
(ispell-get-word, ispell-internal-change-dictionary)
(ispell-region, ispell-skip-region-list)
(ispell-begin-skip-region-regexp, ispell-ignore-fcc)
(ispell-process-line, ispell-minor-mode, ispell-minor-check)
(ispell-message-text-end, ispell-message)
(ispell-buffer-local-parsing): Doc fix.
2012-03-17 21:46:52 +02:00
|
|
|
|
If optional NO-RELOAD is non-nil, do not reload any dictionary.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
When a dictionary is defined in the buffer (see variable
|
1994-05-21 08:04:20 +00:00
|
|
|
|
`ispell-dictionary-keyword'), it will override the local setting
|
1994-03-02 04:56:25 +00:00
|
|
|
|
from \\[ispell-change-dictionary].
|
|
|
|
|
Both should not be used to define a buffer-local dictionary."
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(let (end)
|
|
|
|
|
;; Override the local variable definition.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; Uses last occurrence of ispell-dictionary-keyword.
|
|
|
|
|
(goto-char (point-max))
|
2005-01-31 11:54:36 +00:00
|
|
|
|
(unless ispell-local-dictionary-overridden
|
|
|
|
|
(if (search-backward ispell-dictionary-keyword nil t)
|
|
|
|
|
(progn
|
|
|
|
|
(search-forward ispell-dictionary-keyword)
|
Replace end-of-line, save-excursion etc with point-at-eol, point-at-bol.
* lisp/mh-e/mh-seq.el (mh-read-msg-list): Use point-at-eol.
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-show-infos)
(gnus-bookmark-kill-line): Use point-at-eol.
* lisp/cedet/ede/proj-elisp.el (ede-proj-flush-autoconf): Use point-at-bol.
* lisp/emacs-lisp/chart.el (chart-zap-chars):
* lisp/play/decipher.el (decipher-set-map):
* lisp/progmodes/ada-mode.el (ada-get-current-indent)
(ada-search-ignore-string-comment, ada-tab-hard, ada-untab-hard):
* lisp/progmodes/ada-prj.el (ada-prj-load-from-file, ada-prj-display-help):
* lisp/progmodes/ada-xref.el (ada-initialize-runtime-library)
(ada-get-all-references):
* lisp/progmodes/cperl-mode.el (cperl-electric-paren)
(cperl-electric-rparen, cperl-electric-keyword, cperl-electric-else)
(cperl-linefeed, cperl-sniff-for-indent, cperl-to-comment-or-eol)
(cperl-find-pods-heres, cperl-indent-exp, cperl-fix-line-spacing)
(cperl-word-at-point-hard):
* lisp/progmodes/idlw-shell.el (idlwave-shell-move-or-history)
(idlwave-shell-filename-string, idlwave-shell-batch-command)
(idlwave-shell-display-line):
* lisp/progmodes/idlwave.el (idlwave-show-begin, idlwave-fill-paragraph)
(idlwave-calc-hanging-indent, idlwave-auto-fill, idlwave-template):
* lisp/progmodes/js.el (js--re-search-forward-inner)
(js--re-search-backward-inner):
* lisp/progmodes/vhdl-mode.el (vhdl-align-region-1, vhdl-align-region-2)
(vhdl-fix-clause, vhdl-compose-configuration-architecture):
* lisp/progmodes/ruby-mode.el (ruby-parse-partial, eval-when-compile):
* lisp/textmodes/flyspell.el (flyspell-process-localwords):
* lisp/textmodes/ispell.el (ispell-buffer-local-parsing)
(ispell-buffer-local-dict, ispell-buffer-local-words):
Use point-at-bol and point-at-eol.
2010-11-06 18:36:33 -07:00
|
|
|
|
(setq end (point-at-eol))
|
2005-01-31 11:54:36 +00:00
|
|
|
|
(if (re-search-forward " *\\([^ \"]+\\)" end t)
|
|
|
|
|
(setq ispell-local-dictionary
|
2005-06-08 15:45:34 +00:00
|
|
|
|
(match-string-no-properties 1))))))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(if (search-backward ispell-pdict-keyword nil t)
|
|
|
|
|
(progn
|
|
|
|
|
(search-forward ispell-pdict-keyword)
|
Replace end-of-line, save-excursion etc with point-at-eol, point-at-bol.
* lisp/mh-e/mh-seq.el (mh-read-msg-list): Use point-at-eol.
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-show-infos)
(gnus-bookmark-kill-line): Use point-at-eol.
* lisp/cedet/ede/proj-elisp.el (ede-proj-flush-autoconf): Use point-at-bol.
* lisp/emacs-lisp/chart.el (chart-zap-chars):
* lisp/play/decipher.el (decipher-set-map):
* lisp/progmodes/ada-mode.el (ada-get-current-indent)
(ada-search-ignore-string-comment, ada-tab-hard, ada-untab-hard):
* lisp/progmodes/ada-prj.el (ada-prj-load-from-file, ada-prj-display-help):
* lisp/progmodes/ada-xref.el (ada-initialize-runtime-library)
(ada-get-all-references):
* lisp/progmodes/cperl-mode.el (cperl-electric-paren)
(cperl-electric-rparen, cperl-electric-keyword, cperl-electric-else)
(cperl-linefeed, cperl-sniff-for-indent, cperl-to-comment-or-eol)
(cperl-find-pods-heres, cperl-indent-exp, cperl-fix-line-spacing)
(cperl-word-at-point-hard):
* lisp/progmodes/idlw-shell.el (idlwave-shell-move-or-history)
(idlwave-shell-filename-string, idlwave-shell-batch-command)
(idlwave-shell-display-line):
* lisp/progmodes/idlwave.el (idlwave-show-begin, idlwave-fill-paragraph)
(idlwave-calc-hanging-indent, idlwave-auto-fill, idlwave-template):
* lisp/progmodes/js.el (js--re-search-forward-inner)
(js--re-search-backward-inner):
* lisp/progmodes/vhdl-mode.el (vhdl-align-region-1, vhdl-align-region-2)
(vhdl-fix-clause, vhdl-compose-configuration-architecture):
* lisp/progmodes/ruby-mode.el (ruby-parse-partial, eval-when-compile):
* lisp/textmodes/flyspell.el (flyspell-process-localwords):
* lisp/textmodes/ispell.el (ispell-buffer-local-parsing)
(ispell-buffer-local-dict, ispell-buffer-local-words):
Use point-at-bol and point-at-eol.
2010-11-06 18:36:33 -07:00
|
|
|
|
(setq end (point-at-eol))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(if (re-search-forward " *\\([^ \"]+\\)" end t)
|
|
|
|
|
(setq ispell-local-pdict
|
2005-06-08 15:45:34 +00:00
|
|
|
|
(match-string-no-properties 1)))))))
|
2006-05-05 12:34:51 +00:00
|
|
|
|
(unless no-reload
|
|
|
|
|
;; Reload if new dictionary (maybe the personal one) defined.
|
|
|
|
|
(ispell-internal-change-dictionary)))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defun ispell-buffer-local-words ()
|
2009-01-09 02:59:52 +00:00
|
|
|
|
"Load the buffer-local dictionary in the current buffer."
|
2005-12-16 02:00:02 +00:00
|
|
|
|
;; If there's an existing ispell process that's wrong for this use,
|
|
|
|
|
;; kill it.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(if (and ispell-buffer-local-name
|
|
|
|
|
(not (equal ispell-buffer-local-name (buffer-name))))
|
2005-12-16 02:00:02 +00:00
|
|
|
|
(ispell-kill-ispell t))
|
|
|
|
|
;; Actually start a new ispell process, because we need
|
|
|
|
|
;; to send commands now to specify the local words to it.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(ispell-init-process)
|
2012-04-23 12:33:25 +02:00
|
|
|
|
(dolist (session-localword ispell-buffer-session-localwords)
|
|
|
|
|
(ispell-send-string (concat "@" session-localword "\n")))
|
|
|
|
|
(or ispell-buffer-local-name
|
|
|
|
|
(if ispell-buffer-session-localwords
|
|
|
|
|
(setq ispell-buffer-local-name (buffer-name))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (search-forward ispell-words-keyword nil t)
|
|
|
|
|
(or ispell-buffer-local-name
|
|
|
|
|
(setq ispell-buffer-local-name (buffer-name)))
|
Replace end-of-line, save-excursion etc with point-at-eol, point-at-bol.
* lisp/mh-e/mh-seq.el (mh-read-msg-list): Use point-at-eol.
* lisp/gnus/gnus-bookmark.el (gnus-bookmark-bmenu-show-infos)
(gnus-bookmark-kill-line): Use point-at-eol.
* lisp/cedet/ede/proj-elisp.el (ede-proj-flush-autoconf): Use point-at-bol.
* lisp/emacs-lisp/chart.el (chart-zap-chars):
* lisp/play/decipher.el (decipher-set-map):
* lisp/progmodes/ada-mode.el (ada-get-current-indent)
(ada-search-ignore-string-comment, ada-tab-hard, ada-untab-hard):
* lisp/progmodes/ada-prj.el (ada-prj-load-from-file, ada-prj-display-help):
* lisp/progmodes/ada-xref.el (ada-initialize-runtime-library)
(ada-get-all-references):
* lisp/progmodes/cperl-mode.el (cperl-electric-paren)
(cperl-electric-rparen, cperl-electric-keyword, cperl-electric-else)
(cperl-linefeed, cperl-sniff-for-indent, cperl-to-comment-or-eol)
(cperl-find-pods-heres, cperl-indent-exp, cperl-fix-line-spacing)
(cperl-word-at-point-hard):
* lisp/progmodes/idlw-shell.el (idlwave-shell-move-or-history)
(idlwave-shell-filename-string, idlwave-shell-batch-command)
(idlwave-shell-display-line):
* lisp/progmodes/idlwave.el (idlwave-show-begin, idlwave-fill-paragraph)
(idlwave-calc-hanging-indent, idlwave-auto-fill, idlwave-template):
* lisp/progmodes/js.el (js--re-search-forward-inner)
(js--re-search-backward-inner):
* lisp/progmodes/vhdl-mode.el (vhdl-align-region-1, vhdl-align-region-2)
(vhdl-fix-clause, vhdl-compose-configuration-architecture):
* lisp/progmodes/ruby-mode.el (ruby-parse-partial, eval-when-compile):
* lisp/textmodes/flyspell.el (flyspell-process-localwords):
* lisp/textmodes/ispell.el (ispell-buffer-local-parsing)
(ispell-buffer-local-dict, ispell-buffer-local-words):
Use point-at-bol and point-at-eol.
2010-11-06 18:36:33 -07:00
|
|
|
|
(let ((end (point-at-eol))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(ispell-casechars (ispell-get-casechars))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
string)
|
1994-12-10 02:01:31 +00:00
|
|
|
|
;; buffer-local words separated by a space, and can contain
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
;; any character other than a space. Not rigorous enough.
|
1994-08-24 19:53:17 +00:00
|
|
|
|
(while (re-search-forward " *\\([^ ]+\\)" end t)
|
2005-06-08 15:45:34 +00:00
|
|
|
|
(setq string (match-string-no-properties 1))
|
2008-02-05 12:25:49 +00:00
|
|
|
|
;; This can fail when string contains a word with invalid chars.
|
2008-04-24 15:36:54 +00:00
|
|
|
|
;; Error handling needs to be added between ispell and Emacs.
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(if (and (< 1 (length string))
|
|
|
|
|
(equal 0 (string-match ispell-casechars string)))
|
(ispell-menu-map): Menu items rearranged and
converted to the new menu-item format, names silightly changed,
help strings added.
Support for spelling without async subprocesses:
(ispell-cmd-args, ispell-output-buffer)
(ispell-session-buffer): New variables.
(ispell-start-process, ispell-process-status,
ispell-accept-output, ispell-send-string): New functions, for
Ispell invocation when async subprocesses aren't supported.
(ispell-word, ispell-pdict-save, ispell-command-loop,
ispell-process-line, ispell-buffer-local-parsing): Replace calls
to process-send-string with calls to ispell-send-string, and
accept-process-output with ispell-accept-output.
(ispell-init-process): Call ispell-process-status instead of
process-status with.
(ispell-init-process): Call ispell-start-process. Call
ispell-accept-output and ispell-send-string. Don't call
process-kill-without-query and kill-process if they are unbound.
(ispell-async-processp): New function.
2000-04-13 14:02:23 +00:00
|
|
|
|
(ispell-send-string (concat "@" string "\n"))))))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
|
2012-05-18 15:04:07 -04:00
|
|
|
|
;; Returns optionally adjusted region-end-point.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2016-12-04 13:52:04 +00:00
|
|
|
|
;; If comment-normalize-vars is defined, newcomment must be loaded.
|
|
|
|
|
(declare-function comment-normalize-vars "newcomment" (&optional noerror))
|
2010-10-31 22:55:40 -07:00
|
|
|
|
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(defun ispell-add-per-file-word-list (word)
|
Improved and fixed customize for variables:
ispell-highlight-p, ispell-check-comments, ispell-help-in-bufferp,
ispell-dictionary-alist, ispell-skip-sgml.
Improved and fixed comments in variables and messages for
functions: ispell-help-in-bufferp, ispell-local-dictionary,
ispell-menu-map, ispell-checking-message, ispell-parser,
ispell-word, lookup-words, ispell-change-dictionary, ispell-region,
ispell-begin-tex-skip-regexp, ispell-begin-skip-region,
ispell-comments-and-strings, ispell-continue, ispell-complete-word,
ispell-message-text-end, ispell-add-per-file-word-list.
(ispell-dictionary-alist-1): (ispell-dictionary-alist2): A coding
system is now required for all languages. Casechars improved for
castellano, castellano8, and norsk dictionaries. Dictionary
norsk7-tex removed. Dictionary polish added.
(ispell-dictionary-alist): Redefined at load-time to support
dictionary changes.
(ispell-menu-map): Redefined at load-time to support menu changes.
(ispell-check-version): New alias for `check-ispell-version'.
(ispell-parse-output): Fixed matching for ispell error messages.
Correctly returns spelling suggestions in order generated by ispell process.
(check-ispell-version): Ensure `case-fold-search' doesn't get redefined.
(ispell-complete-word): Ensure `case-fold-search' doesn't get
redefined. Fix bug that didn't respect case of word being completed.
(ispell-init-process): Set process coding system to be compatible
with emacs processes and the ispell process.
(ispell-kill-ispell): Ensures ispell process has terminated before
starting new process. This can otherwise confuse process filters
and hang the ispell process.
(ispell-begin-skip-region-regexp): (ispell-skip-region): Improved
skipping support for sgml.
(ispell-minor-check): Support sgml labels. Fix mapping ^M to \r
which could cause `ispell-complete-word' to hang.
(ispell-message): Improved message reference matching. Ensure
`case-fold-search' doesn't get redefined.
(ispell-buffer-local-parsing): Ensure `case-fold-search' doesn't
get redefined. Fixed bug in returning to nroff mode from tex mode.
(ispell-add-per-file-word-list): Ensure `case-fold-search' doesn't
get redefined.
1998-12-01 07:23:27 +00:00
|
|
|
|
"Add WORD to the per-file word list."
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(or ispell-buffer-local-name
|
|
|
|
|
(setq ispell-buffer-local-name (buffer-name)))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(goto-char (point-min))
|
2010-09-20 13:53:42 +02:00
|
|
|
|
(let (line-okay search done found)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(while (not done)
|
2010-09-20 13:53:42 +02:00
|
|
|
|
(let ((case-fold-search nil))
|
|
|
|
|
(setq search (search-forward ispell-words-keyword nil 'move)
|
2000-08-17 20:54:01 +00:00
|
|
|
|
found (or found search)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
line-okay (< (+ (length word) 1 ; 1 for space after word..
|
|
|
|
|
(progn (end-of-line) (current-column)))
|
2010-09-20 13:53:42 +02:00
|
|
|
|
fill-column)))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(if (or (and search line-okay)
|
|
|
|
|
(null search))
|
|
|
|
|
(progn
|
|
|
|
|
(setq done t)
|
|
|
|
|
(if (null search)
|
|
|
|
|
(progn
|
|
|
|
|
(open-line 1)
|
2000-08-17 20:54:01 +00:00
|
|
|
|
(unless found (newline))
|
2011-05-03 13:08:15 +02:00
|
|
|
|
(insert (if comment-start
|
2011-05-03 16:11:39 +02:00
|
|
|
|
(concat
|
2016-12-04 13:52:04 +00:00
|
|
|
|
(progn
|
|
|
|
|
;; Try and use the proper comment marker,
|
|
|
|
|
;; e.g. ";;" rather than ";".
|
|
|
|
|
(comment-normalize-vars)
|
|
|
|
|
(comment-padright comment-start
|
|
|
|
|
(comment-add nil))
|
2011-05-03 13:08:15 +02:00
|
|
|
|
comment-start)
|
|
|
|
|
" ")
|
|
|
|
|
"")
|
|
|
|
|
ispell-words-keyword)
|
|
|
|
|
(if (and comment-end (> (length comment-end) 0))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(save-excursion
|
2000-08-17 20:54:01 +00:00
|
|
|
|
(newline)
|
1994-03-02 04:56:25 +00:00
|
|
|
|
(insert comment-end)))))
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
(insert (concat " " word))))))))
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2016-04-18 12:27:58 -04:00
|
|
|
|
;;FIXME: Use `user-error' instead!
|
2000-05-22 17:41:53 +00:00
|
|
|
|
(add-to-list 'debug-ignored-errors "^No word found to check!$")
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
(provide 'ispell)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; LOCAL VARIABLES AND BUFFER-LOCAL VALUE EXAMPLES.
|
|
|
|
|
|
2008-04-24 15:36:54 +00:00
|
|
|
|
;; Local Variable options:
|
|
|
|
|
;; mode: name(-mode)
|
|
|
|
|
;; eval: expression
|
|
|
|
|
;; local-variable: value
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2008-04-24 15:36:54 +00:00
|
|
|
|
;; The following sets the buffer local dictionary to `american' English
|
|
|
|
|
;; and spell checks only comments.
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
2008-04-24 15:36:54 +00:00
|
|
|
|
;; Local Variables:
|
|
|
|
|
;; mode: emacs-lisp
|
|
|
|
|
;; comment-column: 40
|
|
|
|
|
;; ispell-check-comments: exclusive
|
|
|
|
|
;; ispell-local-dictionary: "american"
|
|
|
|
|
;; End:
|
1994-03-02 04:56:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; MORE EXAMPLES OF ISPELL BUFFER-LOCAL VALUES
|
|
|
|
|
|
2008-04-24 15:36:54 +00:00
|
|
|
|
;; The following places this file in nroff parsing and extended char modes.
|
|
|
|
|
;; Local IspellParsing: nroff-mode ~nroff
|
|
|
|
|
;; Change IspellPersDict to IspellPersDict: to enable the following line.
|
|
|
|
|
;; Local IspellPersDict ~/.ispell_lisp
|
|
|
|
|
;; The following were automatically generated by ispell using the 'A' command:
|
1999-05-09 06:34:35 +00:00
|
|
|
|
; LocalWords: settable alist inews mh frag pdict Wildcards iconify arg tex kss
|
|
|
|
|
; LocalWords: alists minibuffer bufferp autoload loaddefs aff Dansk KOI SPC op
|
|
|
|
|
; LocalWords: Francais Nederlands charset autoloaded popup nonmenu regexp num
|
|
|
|
|
; LocalWords: AMStex hspace includeonly nocite epsfig displaymath eqnarray reg
|
2012-06-02 18:56:09 +08:00
|
|
|
|
; LocalWords: minipage pers dict unhighlight buf grep sync prev inc
|
2011-11-26 20:43:11 -08:00
|
|
|
|
; LocalWords: fn oldot NB AIX msg init read's bufs pt cmd Quinlan eg
|
2011-12-04 00:02:42 -08:00
|
|
|
|
; LocalWords: uuencoded unidiff sc nn VM SGML eval IspellPersDict
|
2016-12-04 14:39:42 +00:00
|
|
|
|
; LocalWords: lns HTML casechars Multibyte
|
Generalized region skipping added.
Checks comments only in code.
Added backward compatible support for customize.
(ispell-query-replace-choices, ispell-message-dictionary-alist)
(ispell-grep-command, ispell-grep-options, ispell-look-command)
(ispell-look-options, ispell-use-ptys-p, ispell-local-dictionary)
(ispell-dictionary-alist): Now customizable.
Fixed type of custom variables: ispell-help-in-bufferp.
(ispell-use-framepop-p): New variable.
(ispell-dictionary-alist): Added dictionaries: castellano, castellano8
czech, esperanto, esperanto-tex, norsk, russian.
Capitalize XEmacs correctly, and change lucid to xemacs in code:
(ispell-menu-lucid): Renamed to ispell-menu-xemacs.
Changed string compares for version number to be correct for XEmacs.
Fixed to work with string properties.
(ispell-recursive-edit-marker): new marker saving return point.
(ispell-skip-region-alist): New variable defining regions.
(ispell-tex-skip-alists): New variable for LaTeX regions.
(ispell-skip-sgml): Now buffer-mode aware.
(ispell-highlight-p): Support block cursors.
(ispell-message-text-end): Don't check signatures.
(ispell-comments-and-strings): New command, added to menu.
(ispell-int-char): New function for character incrementing.
(ispell-word): Produces message on error when called from
ispell-minor-mode. Potential infinite loop removed.
(ispell-command-loop): prevent XEmacs modeline hiding.
Allow temporary split of dedicated windows. Improve recursive
edit support. Support block cursors.
(ispell-show-choices): New function cleaning up command loop.
(ispell-highlight-spelling-error-generic): Block cursor support added.
(ispell-highlight-spelling-error-xemacs): Block cursor, name change.
(ispell-overlay-window): dedicated window splitting, XEmacs changes.
(ispell-parse-output): Displays ispell process error messages.
(check-ispell-version): Interactive mode that shows ispell versions.
(ispell-begin-skip-region-regexp): New region skipping function.
(ispell-begin-tex-skip-regexp): New tex mode region skipping function.
(ispell-begin-skip-region): New region skipping function.
(ispell-tex-arg-end): New tex mode region skipping function.
(ispell-skip-region): New region skipping function.
(ispell-get-line): New function to clean up command loop.
(ispell-process-line): New function cleaning up command loop.
(ispell-continue): Improve recursive editor support.
(ispell-complete-word): Interior fragment support improved.
(ispell-message): Region skipping vastly improved.
1998-04-30 06:43:48 +00:00
|
|
|
|
|
|
|
|
|
;;; ispell.el ends here
|