2005-06-10 Miles Bader <miles@gnu.org>
+ * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate):
+ Remove "-face" suffix from face names.
+ (flyspell-incorrect-face, flyspell-duplicate-face):
+ New backward-compatibility aliases for renamed faces.
+ (flyspell-mode-on, make-flyspell-overlay)
+ (flyspell-highlight-incorrect-region)
+ (flyspell-highlight-duplicate-region)
+ (flyspell-display-next-corrections)
+ (flyspell-auto-correct-previous-word): Use renamed flyspell faces.
+
* textmodes/texinfo.el (texinfo-heading): Remove "-face" suffix
from face name.
(texinfo-heading-face): New backward-compatibility alias for
"*The maximum distance for finding duplicates of unrecognized words.
This applies to the feature that when a word is not found in the dictionary,
if the same spelling occurs elsewhere in the buffer,
-Flyspell uses a different face (`flyspell-duplicate-face') to highlight it.
+Flyspell uses a different face (`flyspell-duplicate') to highlight it.
This variable specifies how far to search to find such a duplicate.
-1 means no limit (search the whole buffer).
0 means do not search for duplicate unrecognized spellings."
;*---------------------------------------------------------------------*/
;* Highlighting */
;*---------------------------------------------------------------------*/
-(defface flyspell-incorrect-face
+(defface flyspell-incorrect
'((((class color)) (:foreground "OrangeRed" :bold t :underline t))
(t (:bold t)))
"Face used for marking a misspelled word in Flyspell."
:group 'flyspell)
+;; backward-compatibility alias
+(put 'flyspell-incorrect-face 'face-alias 'flyspell-incorrect)
-(defface flyspell-duplicate-face
+(defface flyspell-duplicate
'((((class color)) (:foreground "Gold3" :bold t :underline t))
(t (:bold t)))
"Face used for marking a misspelled word that appears twice in the buffer.
See also `flyspell-duplicate-distance'."
:group 'flyspell)
+;; backward-compatibility alias
+(put 'flyspell-duplicate-face 'face-alias 'flyspell-duplicate)
(defvar flyspell-overlay nil)
;*---------------------------------------------------------------------*/
(defun flyspell-mode-on ()
"Turn Flyspell mode on. Do not use this; use `flyspell-mode' instead."
- (setq ispell-highlight-face 'flyspell-incorrect-face)
+ (setq ispell-highlight-face 'flyspell-incorrect)
;; local dictionaries setup
(or ispell-local-dictionary ispell-dictionary
(if flyspell-default-dictionary
(overlay-put flyspell-overlay
flyspell-overlay-keymap-property-name
flyspell-mouse-map))
- (when (eq face 'flyspell-incorrect-face)
+ (when (eq face 'flyspell-incorrect)
(and (stringp flyspell-before-incorrect-word-string)
(overlay-put flyspell-overlay 'before-string
flyspell-before-incorrect-word-string))
;; now we can use a new overlay
(setq flyspell-overlay
(make-flyspell-overlay
- beg end 'flyspell-incorrect-face 'highlight)))))))
+ beg end 'flyspell-incorrect 'highlight)))))))
;*---------------------------------------------------------------------*/
;* flyspell-highlight-duplicate-region ... */
;; now we can use a new overlay
(setq flyspell-overlay
(make-flyspell-overlay beg end
- 'flyspell-duplicate-face
+ 'flyspell-duplicate
'highlight)))))))
;*---------------------------------------------------------------------*/
(let ((num (car pos)))
(put-text-property num
(+ num (length flyspell-auto-correct-word))
- 'face
- 'flyspell-incorrect-face
+ 'face 'flyspell-incorrect
string))
(setq pos (cdr pos)))
(if (fboundp 'display-message)
;; check if its face has changed
(not (eq (get-char-property
(overlay-start new-overlay) 'face)
- 'flyspell-incorrect-face))))
+ 'flyspell-incorrect))))
(setq new-overlay (car-safe overlay-list))
(setq overlay-list (cdr-safe overlay-list)))