]> code.delx.au - gnu-emacs/commitdiff
* lisp/textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate):
authorJuri Linkov <juri@jurta.org>
Tue, 8 Jan 2013 23:50:40 +0000 (01:50 +0200)
committerJuri Linkov <juri@jurta.org>
Tue, 8 Jan 2013 23:50:40 +0000 (01:50 +0200)
* lisp/progmodes/flymake.el (flymake-errline, flymake-warnline):
Use underline style wave on terminals that support it.

* src/xfaces.c (tty_supports_face_attributes_p): Return 0 for the case
of (supports :underline (:style wave)).

Fixes: debbugs:13000
etc/NEWS
lisp/ChangeLog
lisp/progmodes/flymake.el
lisp/textmodes/flyspell.el
src/ChangeLog
src/xfaces.c

index d826ec37458e07060f3c93a6686fccbea70183bd..29e0d5a9fe5e7885cc6b0017fd60593f9f9bac97 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -205,6 +205,9 @@ property using the supplied face spec.
 *** Face specs set via Custom themes now replace the `defface' spec
 rather than inheriting from it (as do face specs set via Customize).
 
+*** New face characteristic (supports :underline (:style wave))
+specifies whether or not the terminal can display a wavy line.
+
 ** time-to-seconds is not obsolete any more.
 ** New function special-form-p.
 ** Docstrings can be made dynamic by adding a `dynamic-docstring-function'
index 92c071e177678e48d08735fed8e4e3c901d35892..ba5fc47a0b90562b95a2c2bf5d88e644a6560647 100644 (file)
@@ -1,3 +1,9 @@
+2013-01-08  Juri Linkov  <juri@jurta.org>
+
+       * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate):
+       * progmodes/flymake.el (flymake-errline, flymake-warnline):
+       Use underline style wave on terminals that support it.  (Bug#13000)
+
 2013-01-08  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * emacs-lisp/pcase.el (pcase--split-equal): Also take advantage if
index 7ca0ececa7873de415e3e176cd5e5c8f30c987d5..0f92df95a9d5eaeae246cc3f7644796da1058f9a 100644 (file)
@@ -844,13 +844,21 @@ Return t if it has at least one flymake overlay, nil if no overlay."
     has-flymake-overlays))
 
 (defface flymake-errline
-  '((t :inherit error))
+  '((((supports :underline (:style wave)))
+     :underline (:style wave :color "Red1"))
+    (t
+     :inherit error))
   "Face used for marking error lines."
+  :version "24.4"
   :group 'flymake)
 
 (defface flymake-warnline
-  '((t :inherit warning))
+  '((((supports :underline (:style wave)))
+     :underline (:style wave :color "DarkOrange"))
+    (t
+     :inherit warning))
   "Face used for marking warning lines."
+  :version "24.4"
   :group 'flymake)
 
 (defun flymake-highlight-line (line-no line-err-info-list)
index 7e692960dbc7a71196ffdbb2d5a240aabdfa3fa7..fe2f808c594756ada9adf020e36059cc718227d1 100644 (file)
@@ -445,13 +445,23 @@ like <img alt=\"Some thing.\">."
 ;;*---------------------------------------------------------------------*/
 ;;*    Highlighting                                                     */
 ;;*---------------------------------------------------------------------*/
-(defface flyspell-incorrect '((t :underline t :inherit error))
+(defface flyspell-incorrect
+  '((((supports :underline (:style wave)))
+     :underline (:style wave :color "Red1"))
+    (t
+     :underline t :inherit error))
   "Flyspell face for misspelled words."
+  :version "24.4"
   :group 'flyspell)
 
-(defface flyspell-duplicate '((t :underline t :inherit warning))
+(defface flyspell-duplicate
+  '((((supports :underline (:style wave)))
+     :underline (:style wave :color "DarkOrange"))
+    (t
+     :underline t :inherit warning))
   "Flyspell face for words that appear twice in a row.
 See also `flyspell-duplicate-distance'."
+  :version "24.4"
   :group 'flyspell)
 
 (defvar flyspell-overlay nil)
index 9ab201c8be49e158f4f9ff7171223191f16ce81e..c60fa701385c7c59443233acff88a4a44e1c9201 100644 (file)
@@ -1,3 +1,8 @@
+2013-01-08  Juri Linkov  <juri@jurta.org>
+
+       * xfaces.c (tty_supports_face_attributes_p): Return 0 for the case
+       of (supports :underline (:style wave)).  (Bug#13000)
+
 2013-01-08  Aaron S. Hawley  <aaron.s.hawley@gmail.com>
 
        * undo.c (Fprimitive_undo): Move to simple.el.
index ed2895c014cc0c88fb751a9e7df9ce22cd8183c1..43535b9ea0c11fa0db3f5143fec312e6068658ec 100644 (file)
@@ -4877,6 +4877,8 @@ tty_supports_face_attributes_p (struct frame *f,
     {
       if (STRINGP (val))
        return 0;               /* ttys can't use colored underlines */
+      else if (EQ (CAR_SAFE (val), QCstyle) && EQ (CAR_SAFE (CDR_SAFE (val)), Qwave))
+       return 0;               /* ttys can't use wave underlines */
       else if (face_attr_equal_p (val, def_attrs[LFACE_UNDERLINE_INDEX]))
        return 0;               /* same as default */
       else