From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: 47026@debbugs.gnu.org
Subject: bug#47026: 28.0.50; Allow Gnus summary faces to extend to end of line
Date: Tue, 09 Mar 2021 19:51:10 +0100 [thread overview]
Message-ID: <87czw8p3dt.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 943 bytes --]
Hello,
Some themes add a background to the faces Gnus uses to highlight summary
lines (e.g. gnus-summary-selected, gnus-summary-cancelled); I'd like to
be able to extend that background beyond EOL.
Right now Gnus only applies these faces right up to the char *before*
EOL; if it were to apply them one char further, users could then set (or
unset) the :extend property on these faces.
I'm attaching a patch only for demonstration purposes; I do not know
whether it should be applied as-is. It does Work For Me®, but:
(1) Maybe we want to be as flexible as Org, i.e. let users control this
behaviour with a user option instead of messing with faces.
(Cf. org-fontify-whole-heading-line in org-set-font-lock-defaults)
(2) I haven't looked at the whole beg/end vs. from/to vs. mouse-face
affair in gnus-highlight-selected-summary, so my patch may fail to DTRT
in some circumstances… ?
Thank you for your time.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 925 bytes --]
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index ee74f01393..bf58cf419a 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -12741,7 +12741,7 @@ gnus-highlight-selected-summary
;; so we highlight the entire line instead.
(when (= (+ to 2) from)
(setq from beg)
- (setq to end))
+ (setq to (1+ end)))
(if gnus-newsgroup-selected-overlay
;; Move old overlay.
(move-overlay
@@ -12796,7 +12796,7 @@ gnus-summary-highlight-line
(let ((face (funcall (gnus-summary-highlight-line-0))))
(unless (eq face (gnus-get-text-property-excluding-characters-with-faces beg 'face))
(gnus-put-text-property-excluding-characters-with-faces
- beg (point-at-eol) 'face
+ beg (1+ (point-at-eol)) 'face
(setq face (if (boundp face) (symbol-value face) face)))
(when gnus-summary-highlight-line-function
(funcall gnus-summary-highlight-line-function article face))))))
[-- Attachment #3: Type: text/plain, Size: 848 bytes --]
In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.25, cairo version 1.16.0)
of 2021-03-06 built on my-little-tumbleweed
Repository revision: 6c498786fed219ee8f98092f7921b5a5b1aaca29
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12010000
System Description: openSUSE Tumbleweed
Configured using:
'configure --with-xwidgets --with-cairo'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM
XWIDGETS GTK3 ZLIB
Important settings:
value of $LC_CTYPE: en_US.UTF-8
value of $LC_TIME: en_GB.UTF-8
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=local
locale-coding-system: utf-8-unix
next reply other threads:[~2021-03-09 18:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-09 18:51 Kévin Le Gouguec [this message]
2021-03-10 15:15 ` bug#47026: 28.0.50; Allow Gnus summary faces to extend to end of line Lars Ingebrigtsen
2021-03-12 18:13 ` Kévin Le Gouguec
2021-03-16 0:25 ` Lars Ingebrigtsen
2021-03-16 18:15 ` Kévin Le Gouguec
2021-03-16 23:15 ` Lars Ingebrigtsen
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=87czw8p3dt.fsf@gmail.com \
--to=kevin.legouguec@gmail.com \
--cc=47026@debbugs.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).