Mercurial > emacs
changeset 63230:e64fc04555a1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-394
Remove "-face" suffix from flyspell faces
2005-06-10 Miles Bader <miles@gnu.org>
* lisp/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.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 10 Jun 2005 10:46:38 +0000 |
parents | 72fae6758182 |
children | 05cff8bfc8e3 |
files | lisp/ChangeLog lisp/textmodes/flyspell.el |
diffstat | 2 files changed, 23 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Fri Jun 10 10:46:19 2005 +0000 +++ b/lisp/ChangeLog Fri Jun 10 10:46:38 2005 +0000 @@ -1,5 +1,15 @@ 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
--- a/lisp/textmodes/flyspell.el Fri Jun 10 10:46:19 2005 +0000 +++ b/lisp/textmodes/flyspell.el Fri Jun 10 10:46:38 2005 +0000 @@ -94,7 +94,7 @@ "*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." @@ -444,18 +444,22 @@ ;*---------------------------------------------------------------------*/ ;* 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) @@ -540,7 +544,7 @@ ;*---------------------------------------------------------------------*/ (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 @@ -1570,7 +1574,7 @@ (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)) @@ -1610,7 +1614,7 @@ ;; 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 ... */ @@ -1636,7 +1640,7 @@ ;; now we can use a new overlay (setq flyspell-overlay (make-flyspell-overlay beg end - 'flyspell-duplicate-face + 'flyspell-duplicate 'highlight))))))) ;*---------------------------------------------------------------------*/ @@ -1698,8 +1702,7 @@ (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) @@ -1876,7 +1879,7 @@ ;; 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)))