unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Lars Ingebrigtsen <larsi@gnus.org>,
	29405@debbugs.gnu.org, yamaoka@jpl.org
Subject: bug#29405: 27.0.50; message-faces: Doc fixes and syntax touch-ups
Date: Wed, 13 Dec 2017 01:04:06 +0000	[thread overview]
Message-ID: <87h8svzbeh.fsf@gmail.com> (raw)
In-Reply-To: <83h8t91obt.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 2 Dec 2017 11:17:10 +0200")

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-Update-message.el-obsolete-face-aliases.patch --]
[-- Type: text/x-diff, Size: 5066 bytes --]

From eaf40bc5d1d24ba156b9ec8d11b482470396df74 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Wed, 22 Nov 2017 20:08:09 +0000
Subject: [PATCH 1/2] Update message.el obsolete face aliases

* lisp/gnus/message.el: (message-header-to, message-header-cc)
(message-header-subject, message-header-newsgroups)
(message-header-other, message-header-name, message-header-xheader)
(message-separator, message-cited-text, message-mml):
Use define-obsolete-face-alias.
---
 lisp/gnus/message.el | 50 ++++++++++++++++++++------------------------------
 1 file changed, 20 insertions(+), 30 deletions(-)

diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 0f99cb697d..c3aafd7c62 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -1435,9 +1435,8 @@ message-header-to
      (:bold t :italic t)))
   "Face used for displaying To headers."
   :group 'message-faces)
-;; backward-compatibility alias
-(put 'message-header-to-face 'face-alias 'message-header-to)
-(put 'message-header-to-face 'obsolete-face "22.1")
+(define-obsolete-face-alias 'message-header-to-face
+  'message-header-to "22.1")
 
 (defface message-header-cc
   '((((class color)
@@ -1450,9 +1449,8 @@ message-header-cc
      (:bold t)))
   "Face used for displaying Cc headers."
   :group 'message-faces)
-;; backward-compatibility alias
-(put 'message-header-cc-face 'face-alias 'message-header-cc)
-(put 'message-header-cc-face 'obsolete-face "22.1")
+(define-obsolete-face-alias 'message-header-cc-face
+  'message-header-cc "22.1")
 
 (defface message-header-subject
   '((((class color)
@@ -1465,9 +1463,8 @@ message-header-subject
      (:bold t)))
   "Face used for displaying Subject headers."
   :group 'message-faces)
-;; backward-compatibility alias
-(put 'message-header-subject-face 'face-alias 'message-header-subject)
-(put 'message-header-subject-face 'obsolete-face "22.1")
+(define-obsolete-face-alias 'message-header-subject-face
+  'message-header-subject "22.1")
 
 (defface message-header-newsgroups
   '((((class color)
@@ -1480,9 +1477,8 @@ message-header-newsgroups
      (:bold t :italic t)))
   "Face used for displaying Newsgroups headers."
   :group 'message-faces)
-;; backward-compatibility alias
-(put 'message-header-newsgroups-face 'face-alias 'message-header-newsgroups)
-(put 'message-header-newsgroups-face 'obsolete-face "22.1")
+(define-obsolete-face-alias 'message-header-newsgroups-face
+  'message-header-newsgroups "22.1")
 
 (defface message-header-other
   '((((class color)
@@ -1495,9 +1491,8 @@ message-header-other
      (:bold t :italic t)))
   "Face used for displaying other headers."
   :group 'message-faces)
-;; backward-compatibility alias
-(put 'message-header-other-face 'face-alias 'message-header-other)
-(put 'message-header-other-face 'obsolete-face "22.1")
+(define-obsolete-face-alias 'message-header-other-face
+  'message-header-other "22.1")
 
 (defface message-header-name
   '((((class color)
@@ -1510,9 +1505,8 @@ message-header-name
      (:bold t)))
   "Face used for displaying header names."
   :group 'message-faces)
-;; backward-compatibility alias
-(put 'message-header-name-face 'face-alias 'message-header-name)
-(put 'message-header-name-face 'obsolete-face "22.1")
+(define-obsolete-face-alias 'message-header-name-face
+  'message-header-name "22.1")
 
 (defface message-header-xheader
   '((((class color)
@@ -1525,9 +1519,8 @@ message-header-xheader
      (:bold t)))
   "Face used for displaying X-Header headers."
   :group 'message-faces)
-;; backward-compatibility alias
-(put 'message-header-xheader-face 'face-alias 'message-header-xheader)
-(put 'message-header-xheader-face 'obsolete-face "22.1")
+(define-obsolete-face-alias 'message-header-xheader-face
+  'message-header-xheader "22.1")
 
 (defface message-separator
   '((((class color)
@@ -1540,9 +1533,8 @@ message-separator
      (:bold t)))
   "Face used for displaying the separator."
   :group 'message-faces)
-;; backward-compatibility alias
-(put 'message-separator-face 'face-alias 'message-separator)
-(put 'message-separator-face 'obsolete-face "22.1")
+(define-obsolete-face-alias 'message-separator-face
+  'message-separator "22.1")
 
 (defface message-cited-text
   '((((class color)
@@ -1555,9 +1547,8 @@ message-cited-text
      (:bold t)))
   "Face used for displaying cited text names."
   :group 'message-faces)
-;; backward-compatibility alias
-(put 'message-cited-text-face 'face-alias 'message-cited-text)
-(put 'message-cited-text-face 'obsolete-face "22.1")
+(define-obsolete-face-alias 'message-cited-text-face
+  'message-cited-text "22.1")
 
 (defface message-mml
   '((((class color)
@@ -1570,9 +1561,8 @@ message-mml
      (:bold t)))
   "Face used for displaying MML."
   :group 'message-faces)
-;; backward-compatibility alias
-(put 'message-mml-face 'face-alias 'message-mml)
-(put 'message-mml-face 'obsolete-face "22.1")
+(define-obsolete-face-alias 'message-mml-face
+  'message-mml "22.1")
 
 (defun message-font-lock-make-header-matcher (regexp)
   (let ((form
-- 
2.15.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-Modernise-message.el-face-spec-syntax.patch --]
[-- Type: text/x-diff, Size: 5586 bytes --]

From cdb6a0455bcb780a99bcf6fc3cd53ae84a216b07 Mon Sep 17 00:00:00 2001
From: "Basil L. Contovounesios" <contovob@tcd.ie>
Date: Wed, 22 Nov 2017 20:10:20 +0000
Subject: [PATCH 2/2] Modernise message.el face spec syntax

* lisp/gnus/message.el (message-cited-text, message-mml):
Use (DISPLAY . PLIST) face spec syntax recommended in
`(elisp) Defining Faces'.
---
 lisp/gnus/message.el | 60 ++++++++++++++++++++++++++--------------------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index c3aafd7c62..6053d33223 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -1427,12 +1427,12 @@ message-mode-syntax-table
 (defface message-header-to
   '((((class color)
       (background dark))
-     (:foreground "DarkOliveGreen1" :bold t))
+     :foreground "DarkOliveGreen1" :bold t)
     (((class color)
       (background light))
-     (:foreground "MidnightBlue" :bold t))
+     :foreground "MidnightBlue" :bold t)
     (t
-     (:bold t :italic t)))
+     :bold t :italic t))
   "Face used for displaying To headers."
   :group 'message-faces)
 (define-obsolete-face-alias 'message-header-to-face
@@ -1441,12 +1441,12 @@ 'message-header-to-face
 (defface message-header-cc
   '((((class color)
       (background dark))
-     (:foreground "chartreuse1" :bold t))
+     :foreground "chartreuse1" :bold t)
     (((class color)
       (background light))
-     (:foreground "MidnightBlue"))
+     :foreground "MidnightBlue")
     (t
-     (:bold t)))
+     :bold t))
   "Face used for displaying Cc headers."
   :group 'message-faces)
 (define-obsolete-face-alias 'message-header-cc-face
@@ -1455,12 +1455,12 @@ 'message-header-cc-face
 (defface message-header-subject
   '((((class color)
       (background dark))
-     (:foreground "OliveDrab1"))
+     :foreground "OliveDrab1")
     (((class color)
       (background light))
-     (:foreground "navy blue" :bold t))
+     :foreground "navy blue" :bold t)
     (t
-     (:bold t)))
+     :bold t))
   "Face used for displaying Subject headers."
   :group 'message-faces)
 (define-obsolete-face-alias 'message-header-subject-face
@@ -1469,12 +1469,12 @@ 'message-header-subject-face
 (defface message-header-newsgroups
   '((((class color)
       (background dark))
-     (:foreground "yellow" :bold t :italic t))
+     :foreground "yellow" :bold t :italic t)
     (((class color)
       (background light))
-     (:foreground "blue4" :bold t :italic t))
+     :foreground "blue4" :bold t :italic t)
     (t
-     (:bold t :italic t)))
+     :bold t :italic t))
   "Face used for displaying Newsgroups headers."
   :group 'message-faces)
 (define-obsolete-face-alias 'message-header-newsgroups-face
@@ -1483,12 +1483,12 @@ 'message-header-newsgroups-face
 (defface message-header-other
   '((((class color)
       (background dark))
-     (:foreground "VioletRed1"))
+     :foreground "VioletRed1")
     (((class color)
       (background light))
-     (:foreground "steel blue"))
+     :foreground "steel blue")
     (t
-     (:bold t :italic t)))
+     :bold t :italic t))
   "Face used for displaying other headers."
   :group 'message-faces)
 (define-obsolete-face-alias 'message-header-other-face
@@ -1497,12 +1497,12 @@ 'message-header-other-face
 (defface message-header-name
   '((((class color)
       (background dark))
-     (:foreground "green"))
+     :foreground "green")
     (((class color)
       (background light))
-     (:foreground "cornflower blue"))
+     :foreground "cornflower blue")
     (t
-     (:bold t)))
+     :bold t))
   "Face used for displaying header names."
   :group 'message-faces)
 (define-obsolete-face-alias 'message-header-name-face
@@ -1511,12 +1511,12 @@ 'message-header-name-face
 (defface message-header-xheader
   '((((class color)
       (background dark))
-     (:foreground "DeepSkyBlue1"))
+     :foreground "DeepSkyBlue1")
     (((class color)
       (background light))
-     (:foreground "blue"))
+     :foreground "blue")
     (t
-     (:bold t)))
+     :bold t))
   "Face used for displaying X-Header headers."
   :group 'message-faces)
 (define-obsolete-face-alias 'message-header-xheader-face
@@ -1525,12 +1525,12 @@ 'message-header-xheader-face
 (defface message-separator
   '((((class color)
       (background dark))
-     (:foreground "LightSkyBlue1"))
+     :foreground "LightSkyBlue1")
     (((class color)
       (background light))
-     (:foreground "brown"))
+     :foreground "brown")
     (t
-     (:bold t)))
+     :bold t))
   "Face used for displaying the separator."
   :group 'message-faces)
 (define-obsolete-face-alias 'message-separator-face
@@ -1539,12 +1539,12 @@ 'message-separator-face
 (defface message-cited-text
   '((((class color)
       (background dark))
-     (:foreground "LightPink1"))
+     :foreground "LightPink1")
     (((class color)
       (background light))
-     (:foreground "red"))
+     :foreground "red")
     (t
-     (:bold t)))
+     :bold t))
   "Face used for displaying cited text names."
   :group 'message-faces)
 (define-obsolete-face-alias 'message-cited-text-face
@@ -1553,12 +1553,12 @@ 'message-cited-text-face
 (defface message-mml
   '((((class color)
       (background dark))
-     (:foreground "MediumSpringGreen"))
+     :foreground "MediumSpringGreen")
     (((class color)
       (background light))
-     (:foreground "ForestGreen"))
+     :foreground "ForestGreen")
     (t
-     (:bold t)))
+     :bold t))
   "Face used for displaying MML."
   :group 'message-faces)
 (define-obsolete-face-alias 'message-mml-face
-- 
2.15.1


[-- Attachment #3: Type: text/plain, Size: 806 bytes --]


Eli Zaretskii <eliz@gnu.org> writes:

> Basil, could you please send log messages for the 2nd and the 3rd
> patches formatted as ChangeLog entries?  What is missing is the names
> of functions/variables in which you make the changes, like this:
>
>   * lisp/gnus/message.el (message-header-to, message-header-cc): Use
>   define-obsolete-face-alias.

I don't know what got over me thinking I could get away with being lazy.

> etc., I'm sure you get the idea.  You can look at the other log
> messages in Git, to see more examples.

How do the two attached patches look?  I feel as if my taste in
ChangeLog authoring has a lot of room for refinement.

> After you send the updated log messages, I will push these changes.

Sorry about the delay on this and thank you everyone for the feedback.

-- 
Basil

  reply	other threads:[~2017-12-13  1:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22 20:48 bug#29405: 27.0.50; message-faces: Doc fixes and syntax touch-ups Basil L. Contovounesios
     [not found] ` <handler.29405.B.15113837311413.ack@debbugs.gnu.org>
2017-11-22 20:56   ` Basil L. Contovounesios
2017-12-01  8:51 ` Eli Zaretskii
2017-12-01  9:56   ` Katsumi Yamaoka
2017-12-01 11:07   ` Lars Ingebrigtsen
2017-12-02  9:17     ` Eli Zaretskii
2017-12-13  1:04       ` Basil L. Contovounesios [this message]
2017-12-13  1:19         ` Basil L. Contovounesios
2017-12-15 10:22           ` Eli Zaretskii
2017-12-15 10:22         ` Eli Zaretskii

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=87h8svzbeh.fsf@gmail.com \
    --to=contovob@tcd.ie \
    --cc=29405@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.org \
    --cc=yamaoka@jpl.org \
    /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).