Subject: Re: bug#76494: [PATCH] Highlight fill-column-indicator when current line is longer than `fill-column'

From: Elijah Gabe Pérez <[email-masked]>
Date: Sun, 23 Feb 2025 19:15:07 -0600

Eli Zaretskii <[email-masked]> 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.