unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
Cc: 35476@debbugs.gnu.org
Subject: bug#35476: font-lock-{append, prepend}-text-property and anonymous faces
Date: Sun, 12 May 2019 15:09:36 -0400	[thread overview]
Message-ID: <87pnonh4lr.fsf@gmail.com> (raw)
In-Reply-To: <87d0knshkm.fsf@gmail.com> ("Kévin Le Gouguec"'s message of "Sun, 12 May 2019 19:34:01 +0200")

Looks basically good, I just have a few nitpicks below.

> Subject: [PATCH 1/2] Stop splicing anonymous faces in
>  font-lock-append-text-property
>
> This is the same fix as f478082, which was only applied to

It's best to avoid using hashes in commit messages, as they're
translated to ChangeLog files which might read from the tarball (i.e.,
without a git repo to hand).  CONTRIBUTE talks about using "action
stamps" but I think date+title is more readable.  Which would be:
2019-04-29 "Refrain from splicing anonymous faces in text properties".

> +(provide 'font-lock-tests)

I don't think there is any reason to `provide' a feature in a test file
(I know some other test files do that, but I don't see why), test files
are generally not loaded via require.

> Subject: [PATCH 2/2] Extract common code for adding text properties

> +      (let ((new-value (if append
> +                           (append (if (listp prev) prev (list prev)) val)
> +                         (append val (if (listp prev) prev (list prev))))))

I would suggest to factor out the (if (listp prev) prev (list prev))
from these expressions.





  reply	other threads:[~2019-05-12 19:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-28 17:11 bug#35476: [PATCH] 27.0.50; font-lock-{append,prepend}-text-property and anonymous faces Kévin Le Gouguec
2019-04-30  6:08 ` bug#35476: Test suite Kévin Le Gouguec
2019-05-07  5:24   ` bug#35476: [BUMP] Some questions before closing Kévin Le Gouguec
2019-05-12 12:28     ` bug#35476: font-lock-{append, prepend}-text-property and anonymous faces Noam Postavsky
2019-05-12 17:34       ` Kévin Le Gouguec
2019-05-12 19:09         ` Noam Postavsky [this message]
2019-05-12 21:51           ` Kévin Le Gouguec
2019-05-14  1:01         ` Noam Postavsky
2019-05-14  6:01           ` Kévin Le Gouguec

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=87pnonh4lr.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=35476@debbugs.gnu.org \
    --cc=kevin.legouguec@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).