From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: [patch] add "underwave" face attribute Date: Thu, 02 Feb 2012 01:11:31 +0200 Organization: JURTA Message-ID: <87obtii1y4.fsf@mail.jurta.org> References: <037B3467A9FE4EC9B681DF3B1171A539@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1328138306 30971 80.91.229.3 (1 Feb 2012 23:18:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Feb 2012 23:18:26 +0000 (UTC) Cc: Stefan Monnier , Drew Adams , emacs-devel@gnu.org To: =?iso-8859-1?Q?Aur=E9lien?= Aptel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 02 00:18:25 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RsjRW-00012j-AX for ged-emacs-devel@m.gmane.org; Thu, 02 Feb 2012 00:18:22 +0100 Original-Received: from localhost ([::1]:58457 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsjRV-0003SC-Fb for ged-emacs-devel@m.gmane.org; Wed, 01 Feb 2012 18:18:21 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:52749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsjRS-0003Rs-G3 for emacs-devel@gnu.org; Wed, 01 Feb 2012 18:18:19 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsjRR-0005hP-EY for emacs-devel@gnu.org; Wed, 01 Feb 2012 18:18:18 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:33065 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsjRR-0005h7-AU for emacs-devel@gnu.org; Wed, 01 Feb 2012 18:18:17 -0500 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id AE87D451C81A; Wed, 1 Feb 2012 15:17:02 -0800 (PST) In-Reply-To: (=?iso-8859-1?Q?=22Aur=E9lien?= Aptel"'s message of "Wed, 1 Feb 2012 00:38:40 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 69.163.218.105 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:148104 Archived-At: > (:underline > (choice :tag "Underline" > :help-echo "Control text underlining." > (const :tag "Off" nil) > (list :tag "On" > (const :format "" :value :color) > (choice :tag "Color" (const :tag "Foreground Color" foreground-color) color) > (const :format "" :value :style) > (choice :tag "Style" > (const :tag "Line" line) > (const :tag "Wave" wave))))) Very nice, we could use it for `flyspell', `flymake', `next-error' to highlight errors, etc. But what to do with platforms where it's not yet supported? There should be a way to detect its availability and to fall back to other face attributes. Currently `:underline' can test its support with `(supports :underline t)'. Maybe `underwave' should do this with something like: (defface underwave '((((supports :underline wave)) :underline (:style wave :color "red")) (t :underline (:style line :color "red"))) "Basic underwave face." :group 'basic-faces)