[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13000: 24.2.90; underwave doesn't look as good as other IDEs
From: |
Juri Linkov |
Subject: |
bug#13000: 24.2.90; underwave doesn't look as good as other IDEs |
Date: |
Sat, 29 Dec 2012 23:54:30 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) |
>> The already supported condition ((supports :underline t))
>> doesn't take into account the underwave attribute,
>> and a similar condition ((supports :underline wave))
>> is not implemented.
>
> Implementing the missing condition should be easy.
Yes, pretty easy:
=== modified file 'src/xfaces.c'
--- src/xfaces.c 2012-11-16 17:20:23 +0000
+++ src/xfaces.c 2012-12-29 21:50:36 +0000
@@ -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
Then its support could checked with ((supports :underline (:style wave)))
=== modified file 'lisp/progmodes/flymake.el'
--- lisp/progmodes/flymake.el 2012-11-12 08:42:27 +0000
+++ lisp/progmodes/flymake.el 2012-12-29 21:54:08 +0000
@@ -844,12 +844,18 @@ (defun flymake-region-has-flymake-overla
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."
: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."
:group 'flymake)
=== modified file 'lisp/textmodes/flyspell.el'
--- lisp/textmodes/flyspell.el 2012-09-17 05:41:04 +0000
+++ lisp/textmodes/flyspell.el 2012-12-29 21:54:14 +0000
@@ -445,11 +445,19 @@ (make-variable-buffer-local 'flyspell-da
;;*---------------------------------------------------------------------*/
;;* 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."
: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'."
:group 'flyspell)