From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Line height issues with display-line-number-mode
Date: Tue, 07 May 2019 16:30:55 -0400 [thread overview]
Message-ID: <jwva7fyc9gv.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83pnouhwxs.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 07 May 2019 22:43:59 +0300")
>> Rather than try and guess it based on the presence of a display/overlay,
>> maybe we could require a specific text-property like `no-line-number`?
>
> We already have such a text property (display-line-number-disable),
> but it cannot help here,
But it *can* help for the *vc-log* case, tho it's a bit cumbersome, see
patch below. Also the line then runs not just through the text but also
through the line-number-area (I guess that's OK, but that's not the
behavior I was expecting).
Stefan
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index 1ae219eed5..1cf58b994c 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -383,7 +383,8 @@ log-edit-font-lock-keywords
nil lax))
("^\n"
(progn (goto-char (match-end 0)) (1+ (match-end 0))) nil
- (0 '(:height 0.1 :inverse-video t))))
+ (0 '(face (:height 0.1 :inverse-video t)
+ display-line-numbers-disable t rear-nonsticky t))))
(log-edit--match-first-line (0 'log-edit-summary))))
(defvar log-edit-font-lock-gnu-style nil
@@ -487,6 +488,9 @@ log-edit-mode
\\{log-edit-mode-map}"
(set (make-local-variable 'font-lock-defaults)
'(log-edit-font-lock-keywords t))
+ (make-local-variable 'font-lock-extra-managed-props)
+ (cl-pushnew 'rear-nonsticky font-lock-extra-managed-props)
+ (cl-pushnew 'display-line-numbers-disable font-lock-extra-managed-props)
(setq-local jit-lock-contextually t) ;For the "first line is summary".
(make-local-variable 'log-edit-comment-ring-index)
(add-hook 'kill-buffer-hook 'log-edit-remember-comment nil t)
next prev parent reply other threads:[~2019-05-07 20:30 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-07 16:40 Line height issues with display-line-number-mode Clément Pit-Claudel
2019-05-07 17:12 ` Noam Postavsky
2019-05-07 18:36 ` Eli Zaretskii
2019-05-07 19:00 ` Eli Zaretskii
2019-05-07 19:09 ` Stefan Monnier
2019-05-07 19:43 ` Eli Zaretskii
2019-05-07 20:30 ` Stefan Monnier [this message]
2019-05-08 6:43 ` Eli Zaretskii
2019-05-08 13:39 ` Stefan Monnier
2019-05-08 14:05 ` Eli Zaretskii
2019-05-08 14:13 ` Noam Postavsky
2019-05-08 15:04 ` Stefan Monnier
2019-05-08 18:39 ` Noam Postavsky
2019-05-08 18:54 ` Eli Zaretskii
2019-05-10 6:15 ` Kévin Le Gouguec
2019-05-10 7:58 ` Eli Zaretskii
2019-05-10 13:24 ` Stefan Monnier
2019-05-08 14:17 ` Stefan Monnier
2019-05-08 17:30 ` Eli Zaretskii
2019-05-08 17:46 ` Stefan Monnier
2019-05-08 18:02 ` Eli Zaretskii
2019-05-08 18:39 ` Stefan Monnier
2019-05-08 18:48 ` Eli Zaretskii
2019-05-08 19:03 ` Stefan Monnier
2019-05-07 19:49 ` Ergus
2019-05-08 5:51 ` Eli Zaretskii
2019-05-08 13:40 ` Stefan Monnier
2019-05-08 14:07 ` Eli Zaretskii
2019-05-07 18:31 ` Eli Zaretskii
2019-05-07 21:08 ` Clément Pit-Claudel
2019-05-08 7:01 ` Eli Zaretskii
2019-05-08 12:24 ` Clément Pit-Claudel
2019-05-08 14:00 ` Eli Zaretskii
2019-05-08 18:04 ` Clément Pit-Claudel
2019-05-08 18:25 ` Eli Zaretskii
2019-05-08 18:45 ` Stefan Monnier
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=jwva7fyc9gv.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.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).