aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2005-06-10 10:46:38 +0000
committerMiles Bader2005-06-10 10:46:38 +0000
commitc43aed5aeb6fdd8f44027db021c65113a75df470 (patch)
treeb58a8cf8fb8e2390eded16acb00918dafaa4db8f
parente639491a87bb04b6959b50a254ac450f9bf7b566 (diff)
downloademacs-c43aed5aeb6fdd8f44027db021c65113a75df470.tar.gz
emacs-c43aed5aeb6fdd8f44027db021c65113a75df470.zip
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.
-rw-r--r--lisp/ChangeLog10
-rw-r--r--lisp/textmodes/flyspell.el23
2 files changed, 23 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9845f5a13d8..e64df8797c4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,15 @@
12005-06-10 Miles Bader <miles@gnu.org> 12005-06-10 Miles Bader <miles@gnu.org>
2 2
3 * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate):
4 Remove "-face" suffix from face names.
5 (flyspell-incorrect-face, flyspell-duplicate-face):
6 New backward-compatibility aliases for renamed faces.
7 (flyspell-mode-on, make-flyspell-overlay)
8 (flyspell-highlight-incorrect-region)
9 (flyspell-highlight-duplicate-region)
10 (flyspell-display-next-corrections)
11 (flyspell-auto-correct-previous-word): Use renamed flyspell faces.
12
3 * textmodes/texinfo.el (texinfo-heading): Remove "-face" suffix 13 * textmodes/texinfo.el (texinfo-heading): Remove "-face" suffix
4 from face name. 14 from face name.
5 (texinfo-heading-face): New backward-compatibility alias for 15 (texinfo-heading-face): New backward-compatibility alias for
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."
94 "*The maximum distance for finding duplicates of unrecognized words. 94 "*The maximum distance for finding duplicates of unrecognized words.
95This applies to the feature that when a word is not found in the dictionary, 95This applies to the feature that when a word is not found in the dictionary,
96if the same spelling occurs elsewhere in the buffer, 96if the same spelling occurs elsewhere in the buffer,
97Flyspell uses a different face (`flyspell-duplicate-face') to highlight it. 97Flyspell uses a different face (`flyspell-duplicate') to highlight it.
98This variable specifies how far to search to find such a duplicate. 98This variable specifies how far to search to find such a duplicate.
99-1 means no limit (search the whole buffer). 99-1 means no limit (search the whole buffer).
1000 means do not search for duplicate unrecognized spellings." 1000 means do not search for duplicate unrecognized spellings."
@@ -444,18 +444,22 @@ property of the major mode name.")
444;*---------------------------------------------------------------------*/ 444;*---------------------------------------------------------------------*/
445;* Highlighting */ 445;* Highlighting */
446;*---------------------------------------------------------------------*/ 446;*---------------------------------------------------------------------*/
447(defface flyspell-incorrect-face 447(defface flyspell-incorrect
448 '((((class color)) (:foreground "OrangeRed" :bold t :underline t)) 448 '((((class color)) (:foreground "OrangeRed" :bold t :underline t))
449 (t (:bold t))) 449 (t (:bold t)))
450 "Face used for marking a misspelled word in Flyspell." 450 "Face used for marking a misspelled word in Flyspell."
451 :group 'flyspell) 451 :group 'flyspell)
452;; backward-compatibility alias
453(put 'flyspell-incorrect-face 'face-alias 'flyspell-incorrect)
452 454
453(defface flyspell-duplicate-face 455(defface flyspell-duplicate
454 '((((class color)) (:foreground "Gold3" :bold t :underline t)) 456 '((((class color)) (:foreground "Gold3" :bold t :underline t))
455 (t (:bold t))) 457 (t (:bold t)))
456 "Face used for marking a misspelled word that appears twice in the buffer. 458 "Face used for marking a misspelled word that appears twice in the buffer.
457See also `flyspell-duplicate-distance'." 459See also `flyspell-duplicate-distance'."
458 :group 'flyspell) 460 :group 'flyspell)
461;; backward-compatibility alias
462(put 'flyspell-duplicate-face 'face-alias 'flyspell-duplicate)
459 463
460(defvar flyspell-overlay nil) 464(defvar flyspell-overlay nil)
461 465
@@ -540,7 +544,7 @@ in your .emacs file.
540;*---------------------------------------------------------------------*/ 544;*---------------------------------------------------------------------*/
541(defun flyspell-mode-on () 545(defun flyspell-mode-on ()
542 "Turn Flyspell mode on. Do not use this; use `flyspell-mode' instead." 546 "Turn Flyspell mode on. Do not use this; use `flyspell-mode' instead."
543 (setq ispell-highlight-face 'flyspell-incorrect-face) 547 (setq ispell-highlight-face 'flyspell-incorrect)
544 ;; local dictionaries setup 548 ;; local dictionaries setup
545 (or ispell-local-dictionary ispell-dictionary 549 (or ispell-local-dictionary ispell-dictionary
546 (if flyspell-default-dictionary 550 (if flyspell-default-dictionary
@@ -1570,7 +1574,7 @@ for the overlay."
1570 (overlay-put flyspell-overlay 1574 (overlay-put flyspell-overlay
1571 flyspell-overlay-keymap-property-name 1575 flyspell-overlay-keymap-property-name
1572 flyspell-mouse-map)) 1576 flyspell-mouse-map))
1573 (when (eq face 'flyspell-incorrect-face) 1577 (when (eq face 'flyspell-incorrect)
1574 (and (stringp flyspell-before-incorrect-word-string) 1578 (and (stringp flyspell-before-incorrect-word-string)
1575 (overlay-put flyspell-overlay 'before-string 1579 (overlay-put flyspell-overlay 'before-string
1576 flyspell-before-incorrect-word-string)) 1580 flyspell-before-incorrect-word-string))
@@ -1610,7 +1614,7 @@ for the overlay."
1610 ;; now we can use a new overlay 1614 ;; now we can use a new overlay
1611 (setq flyspell-overlay 1615 (setq flyspell-overlay
1612 (make-flyspell-overlay 1616 (make-flyspell-overlay
1613 beg end 'flyspell-incorrect-face 'highlight))))))) 1617 beg end 'flyspell-incorrect 'highlight)))))))
1614 1618
1615;*---------------------------------------------------------------------*/ 1619;*---------------------------------------------------------------------*/
1616;* flyspell-highlight-duplicate-region ... */ 1620;* flyspell-highlight-duplicate-region ... */
@@ -1636,7 +1640,7 @@ for the overlay."
1636 ;; now we can use a new overlay 1640 ;; now we can use a new overlay
1637 (setq flyspell-overlay 1641 (setq flyspell-overlay
1638 (make-flyspell-overlay beg end 1642 (make-flyspell-overlay beg end
1639 'flyspell-duplicate-face 1643 'flyspell-duplicate
1640 'highlight))))))) 1644 'highlight)))))))
1641 1645
1642;*---------------------------------------------------------------------*/ 1646;*---------------------------------------------------------------------*/
@@ -1698,8 +1702,7 @@ misspelled words backwards."
1698 (let ((num (car pos))) 1702 (let ((num (car pos)))
1699 (put-text-property num 1703 (put-text-property num
1700 (+ num (length flyspell-auto-correct-word)) 1704 (+ num (length flyspell-auto-correct-word))
1701 'face 1705 'face 'flyspell-incorrect
1702 'flyspell-incorrect-face
1703 string)) 1706 string))
1704 (setq pos (cdr pos))) 1707 (setq pos (cdr pos)))
1705 (if (fboundp 'display-message) 1708 (if (fboundp 'display-message)
@@ -1876,7 +1879,7 @@ But don't look beyond what's visible on the screen."
1876 ;; check if its face has changed 1879 ;; check if its face has changed
1877 (not (eq (get-char-property 1880 (not (eq (get-char-property
1878 (overlay-start new-overlay) 'face) 1881 (overlay-start new-overlay) 'face)
1879 'flyspell-incorrect-face)))) 1882 'flyspell-incorrect))))
1880 (setq new-overlay (car-safe overlay-list)) 1883 (setq new-overlay (car-safe overlay-list))
1881 (setq overlay-list (cdr-safe overlay-list))) 1884 (setq overlay-list (cdr-safe overlay-list)))
1882 1885