summaryrefslogtreecommitdiff
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2005-06-10 10:46:38 +0000
committerMiles Bader <miles@gnu.org>2005-06-10 10:46:38 +0000
commitc43aed5aeb6fdd8f44027db021c65113a75df470 (patch)
treeb58a8cf8fb8e2390eded16acb00918dafaa4db8f /lisp/textmodes
parente639491a87bb04b6959b50a254ac450f9bf7b566 (diff)
downloademacs-c43aed5aeb6fdd8f44027db021c65113a75df470.tar.gz
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.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/flyspell.el23
1 files changed, 13 insertions, 10 deletions
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 0326510f75f..118e490112f 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -94,7 +94,7 @@ Non-nil means use highlight, nil means use minibuffer messages."
"*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 @@ property of the major mode name.")
;*---------------------------------------------------------------------*/
;* 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 @@ in your .emacs file.
;*---------------------------------------------------------------------*/
(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 @@ for the overlay."
(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 @@ for the overlay."
;; 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 @@ for the overlay."
;; 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 @@ misspelled words backwards."
(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 @@ But don't look beyond what's visible on the screen."
;; 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)))