From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#62994: [PATCH 1/3] Add face definitions for more underline styles Date: Fri, 21 Apr 2023 18:58:39 +0300 Message-ID: <83zg712pn4.fsf@gnu.org> References: <20230421143448.339022-1-mohkale@kisara.moe> <20230421143448.339022-2-mohkale@kisara.moe> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24748"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 62994@debbugs.gnu.org To: mohkale@kisara.moe Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 21 17:59:12 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pptAG-0006D8-6M for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 21 Apr 2023 17:59:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pptA7-0003vx-NT; Fri, 21 Apr 2023 11:59:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pptA6-0003vo-Qw for bug-gnu-emacs@gnu.org; Fri, 21 Apr 2023 11:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pptA6-0003d5-Ig for bug-gnu-emacs@gnu.org; Fri, 21 Apr 2023 11:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pptA6-0004kl-55 for bug-gnu-emacs@gnu.org; Fri, 21 Apr 2023 11:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Apr 2023 15:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62994 X-GNU-PR-Package: emacs Original-Received: via spool by 62994-submit@debbugs.gnu.org id=B62994.168209271018230 (code B ref 62994); Fri, 21 Apr 2023 15:59:02 +0000 Original-Received: (at 62994) by debbugs.gnu.org; 21 Apr 2023 15:58:30 +0000 Original-Received: from localhost ([127.0.0.1]:41002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppt9a-0004jy-E2 for submit@debbugs.gnu.org; Fri, 21 Apr 2023 11:58:30 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ppt9Z-0004jl-Ga for 62994@debbugs.gnu.org; Fri, 21 Apr 2023 11:58:30 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppt9U-0003Rq-2L; Fri, 21 Apr 2023 11:58:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Sq2q31KX7xys5OQwXaaUutn7X2uwcq3DWHXpnVhEsD4=; b=dOEuwB9o5XPa p5NeFkji0a/+h8IbIRfdsu5Sv20j3F2LbY+HJgcWQvdVsCTvvJiMtXQinQbq3NHOwCGn6QQ0WaKYx b6kmg0v6KQWjWpmbNX1E7K+376Y9U5ag4K02iM2pweoYx/YtCT4YWwpA1jMOK4iJlNGVYFsd3Uqe+ LXUoa0zuvwsHifmw6cfNwXfYm3whjfPmDlS7kf3PJBvxJ8NE5XSGF9+uMc6ykkeCPQXkkTapdAEl0 5ZQMsIi3gbZun+LGN2l99dodw6Eqo9/GxnEy1cjgr1xhSOu7vvfd9gFurdl4CIHX6LoCBec18LlVz TL8Hgbx70R5XzrBZs4iAnw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppt9T-0001iR-5e; Fri, 21 Apr 2023 11:58:23 -0400 In-Reply-To: <20230421143448.339022-2-mohkale@kisara.moe> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:260399 Archived-At: > Cc: Mohsin Kaleem > From: mohkale@kisara.moe > Date: Fri, 21 Apr 2023 15:34:46 +0100 > > From: Mohsin Kaleem > > --- a/src/dispextern.h > +++ b/src/dispextern.h > @@ -1653,9 +1653,13 @@ #define FONT_TOO_HIGH(ft) \ > > enum face_underline_type > { > + // Note: Order matches the order of the Smulx terminfo extension. Please use the C style of comments, /* Like this. */, not the C++ style. > FACE_NO_UNDERLINE = 0, > FACE_UNDER_LINE, > - FACE_UNDER_WAVE > + FACE_DOUBLE_UNDER_LINE, > + FACE_UNDER_WAVE, > + FACE_DOTTED_UNDER_LINE, > + FACE_DASHED_UNDER_LINE, Is it really necessary to change the numerical value of FACE_UNDER_WAVE? Can it be left at its original value? > --- a/src/xfaces.c > +++ b/src/xfaces.c > @@ -3255,7 +3255,11 @@ DEFUN ("internal-set-lisp-face-attribute", Finternal_set_lisp_face_attribute, > } > > else if (EQ (key, QCstyle) > - && !(EQ (val, Qline) || EQ (val, Qwave))) > + && !(EQ (val, Qline) || > + EQ (val, Qdouble) || > + EQ (val, Qwave) || > + EQ (val, Qdotted) || > + EQ (val, Qdashed))) Our style is to put the operators ("||" in this case) at the beginning of the line, not at its end. > + /* Check supported underline styles. */ > + val = attrs[LFACE_UNDERLINE_INDEX]; > + if (!UNSPECIFIEDP (val)) { > + if (EQ (CAR_SAFE (val), QCstyle)) { > + if (!(EQ (CAR_SAFE (CDR_SAFE (val)), Qline) || > + EQ (CAR_SAFE (CDR_SAFE (val)), Qwave))) { > + return false; /* Unsupported underline style */ Likewise here.