[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35476: font-lock-{append, prepend}-text-property and anonymous faces
From: |
Kévin Le Gouguec |
Subject: |
bug#35476: font-lock-{append, prepend}-text-property and anonymous faces |
Date: |
Sun, 12 May 2019 23:51:29 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Noam Postavsky <npostavs@gmail.com> writes:
> 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".
Ah, right, didn't think of the children^WChangeLog. I went for
date+title.
Can e.g. git-show(1) understand action stamps? I glanced at
gitrevisions(7) but nothing suggests Git knows anything about this
format. It sure would make a hypothetical vc-revision-at-point command
easier to implement…
(Or, going the opposite route, maybe the git-log-to-ChangeLog machinery
could translate hashes to action stamps?)
>> +(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.
Done.
0001-Stop-splicing-anonymous-faces-in-font-lock-append-te.patch
Description: Text Data
>> 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.
And done.
0002-Extract-common-code-for-adding-text-properties.patch
Description: Text Data
Thank you for the review! Let me know if there are further nits to
pick.