unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#27103: Should show-trailing-whitespace highlight specified spaces?
@ 2017-05-27 16:47 Clément Pit--Claudel
  2017-05-27 18:26 ` Eli Zaretskii
  0 siblings, 1 reply; 16+ messages in thread
From: Clément Pit--Claudel @ 2017-05-27 16:47 UTC (permalink / raw)
  To: 27103


[-- Attachment #1.1: Type: text/plain, Size: 1273 bytes --]

Hi emacs-devel,

I'm trying to display "/// " comment markers as a thin vertical line. At first, I went for something like the following font-lock rule:

  '(face my-vertical-line-face display (space :width 0.5))

This worked fine, until I decided to add a fringe icon, too:

  '(face my-vertical-line-face display [(space :width 0.5) (left-margin left-arrow)])

Now (with show-trailing-whitespace set to t) Emacs highlight lines that just contain "///" in bright red.  Here's a quick way to reproduce this:

  (dotimes (_ 25) (insert (propertize "///" 'display '((space :width 10) (left-fringe left-arrow))) "\n"))

Contrast with this, which doesn't show trailing-whitespace highlights:

  (dotimes (_ 25) (insert (propertize "///" 'display '(space :width 10)) "\n"))

Am I doing something wrong?  Or is this a bug, and if so which behavior is the correct one? Is there a way to disable the trailing whitespace highlighting here?

The best I've managed is to put the left-fringe property on the first "/" character, and the display property on the next two, but this interacts in annoying ways with point motion.  I added cursor-intangible properties to the mix too, but no luck (they interacted badly with insertion/deletion)

Thanks,
Clément.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-05-29 17:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-27 16:47 bug#27103: Should show-trailing-whitespace highlight specified spaces? Clément Pit--Claudel
2017-05-27 18:26 ` Eli Zaretskii
2017-05-27 19:14   ` Clément Pit--Claudel
2017-05-27 19:42     ` Eli Zaretskii
2017-05-27 19:52       ` Clément Pit--Claudel
2017-05-28 16:28         ` Eli Zaretskii
2017-05-28 16:43           ` Clément Pit--Claudel
2017-05-28 17:44             ` Eli Zaretskii
2017-05-28 17:53               ` Clément Pit--Claudel
2017-05-28 18:14                 ` Eli Zaretskii
2017-05-28 19:43                   ` Clément Pit--Claudel
2017-05-28 19:51                     ` Eli Zaretskii
2017-05-28 20:18                       ` Clément Pit--Claudel
2017-05-29  2:30                         ` Eli Zaretskii
2017-05-29  2:33                           ` Clément Pit--Claudel
2017-05-29 17:28                             ` Eli Zaretskii

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).