GNU bug report logs - #76494
[PATCH] Highlight fill-column-indicator when current line is longer than `fill-column'

Previous Next

Package: emacs;

Reported by: Elijah Gabe Pérez <eg642616 <at> gmail.com>

Date: Sun, 23 Feb 2025 04:22:02 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 76494 <at> debbugs.gnu.org (full text, mbox):

From: Elijah Gabe Pérez <eg642616 <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 76494 <at> debbugs.gnu.org
Subject: Re: bug#76494: [PATCH] Highlight fill-column-indicator when current
 line is longer than `fill-column'
Date: Sun, 23 Feb 2025 19:15:07 -0600
Eli Zaretskii <eliz <at> gnu.org> writes:

> The character is the same for all the screen lines, so if you change
> it, that affects all the lines.

Not if you use setq-local which prevents this problem,
such as this code:

(add-hook 'display-fill-column-indicator-mode-hook
   (lambda ()
       (add-hook
        'post-command-hook
        (lambda ()
          (if (> (save-excursion (end-of-line) (current-column))
                 fill-column)
              (progn
                (setq-local
                 display-fill-column-indicator-character 9475)
                (face-remap-set-base 'fill-column-indicator
                                     (list :inherit 'error :stipple nil
                                           :box nil :strike-through nil
                                           :overline nil :underline nil)))
            (setq-local
             display-fill-column-indicator-character 9474)
            (face-remap-reset-base 'fill-column-indicator)))
        nil t)))

I couldn't find a way to implement it without it looking terrifying,
so I think I'll just settle with the highlight.

-- 
                                                   - E.G via GNU Emacs.




This bug report was last modified 74 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.