GNU bug report logs -
#57459
Customisation before enabling display-fill-column-indicator-mode
Previous Next
Reported by: wilnerthomas <at> tutanota.com
Date: Sun, 28 Aug 2022 13:14:02 UTC
Severity: normal
Tags: notabug
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #14 received at 57459 <at> debbugs.gnu.org (full text, mbox):
> Date: Sun, 28 Aug 2022 16:38:55 +0200 (CEST)
> From: wilnerthomas <at> tutanota.com
> Cc: 57459 <at> debbugs.gnu.org
>
> Aug 28, 2022, 14:14 by eliz <at> gnu.org:
>
> > Please show how you tried doing that, starting from "emacs -Q". There
> > are many possible ways of customizing face attributes, and we need to
> > know which one you found not functioning in this case.
> >
> I made the following function
>
> (defun indicator-attributes ()
>
> (setq display-fill-column-indicator-character ?\u2503)
>
> (set-face-attribute 'fill-column-indicator nil :background "green" :height 1.0))
>
> I have another function to enable global-display-fill-column-indicator-mode
>
> (defun colum-indicator ()
> (interactive) (global-display-fill-column-indicator-mode))
>
> If I call (indicator-attributes) in my init file, then do "M-x colum-indicator" in a buffer, I get the old character.
>
> But if I change colum-indicator to include (indicator-attributes) after setting the global mode, I get
> the correct wider character if I do "M-x colum-indicator" in a buffer.
>
> (defun colum-indicator ()
>
> (interactive) (global-display-fill-column-indicator-mode) (indicator-attributes))
It's the same issue as with fill-column:
display-fill-column-indicator-character is a variable that
automatically becomes buffer-local when set (see its doc string). So
your setq is in effect only for a single buffer: the one in which
Emacs loads and evaluates the init file.
You should use setq-default instead.
This is not a bug.
This bug report was last modified 2 years and 265 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.