unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Leo <sdl.web@gmail.com>
Cc: 13000@debbugs.gnu.org
Subject: bug#13000: 24.2.90; underwave doesn't look as good as other IDEs
Date: Sat, 29 Dec 2012 01:54:28 +0200	[thread overview]
Message-ID: <87vcbl3er7.fsf@mail.jurta.org> (raw)
In-Reply-To: <m238yq5yw4.fsf@gmail.com> (Leo's message of "Fri, 28 Dec 2012 17:06:35 +0800")

> I hope this new feature is done properly before users see it.

For users to take advantage of this new feature we could modify
the faces where it would be most useful like the patch below does.

One problem is how to handle the tty case.  On a tty frame
underwave underlines and doesn't use the color attribute.
So the question is what face condition to use to filter out
displays where underwave is not supported.

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.

Thus the patch uses the condition ((class color) (min-colors 88))
to find the displays that should use the old face definitions
without underwave:

=== modified file 'lisp/progmodes/flymake.el'
--- lisp/progmodes/flymake.el	2012-11-12 08:42:27 +0000
+++ lisp/progmodes/flymake.el	2012-12-28 23:50:57 +0000
@@ -844,12 +844,18 @@ (defun flymake-region-has-flymake-overla
     has-flymake-overlays))
 
 (defface flymake-errline
-  '((t :inherit error))
+  '((((class color) (min-colors 88))
+     :underline (:color "Red1" :style wave))
+    (t
+     :inherit error))
   "Face used for marking error lines."
   :group 'flymake)
 
 (defface flymake-warnline
-  '((t :inherit warning))
+  '((((class color) (min-colors 88))
+     :underline (:color "DarkOrange" :style wave))
+    (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-28 23:53:51 +0000
@@ -445,11 +445,19 @@ (make-variable-buffer-local 'flyspell-da
 ;;*---------------------------------------------------------------------*/
 ;;*    Highlighting                                                     */
 ;;*---------------------------------------------------------------------*/
-(defface flyspell-incorrect '((t :underline t :inherit error))
+(defface flyspell-incorrect
+  '((((class color) (min-colors 88))
+     :underline (:color "Red1" :style wave))
+    (t
+     :underline t :inherit error))
   "Flyspell face for misspelled words."
   :group 'flyspell)
 
-(defface flyspell-duplicate '((t :underline t :inherit warning))
+(defface flyspell-duplicate
+  '((((class color) (min-colors 88))
+     :underline (:color "DarkOrange" :style wave))
+    (t
+     :underline t :inherit warning))
   "Flyspell face for words that appear twice in a row.
 See also `flyspell-duplicate-distance'."
   :group 'flyspell)







  reply	other threads:[~2012-12-28 23:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-26  3:21 bug#13000: 24.2.90; underwave doesn't look as good as other IDEs Leo
2012-12-26  6:31 ` Leo
2012-12-27  8:33   ` Leo
2012-12-27 19:33   ` Juri Linkov
2012-12-28  9:06     ` Leo
2012-12-28 23:54       ` Juri Linkov [this message]
2012-12-29  6:45         ` Leo
2012-12-29  7:19         ` Eli Zaretskii
2012-12-29 21:54           ` Juri Linkov
2013-01-04  1:47             ` Leo Liu
2013-01-08 23:51               ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vcbl3er7.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=13000@debbugs.gnu.org \
    --cc=sdl.web@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).