[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
more issues with setq-local
From: |
Emanuel Berg |
Subject: |
more issues with setq-local |
Date: |
Tue, 20 Apr 2021 17:10:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
So, how do you do set `fill-column' to 62 everywhere in Emacs?
`setq' sets it buffer-locally.
And `setq-default' sets it where it isn't set!
But do I set it where it is set? I am to hunt down these
buffers manually?
Observe the below [last] Elisp. We see/understand that
fill-column isn't of the "buffer instance metadata" use case.
It is just normal data. If one wants that different in
different parts of Emacs, why don't you do as `message-mode'
and get your own variable?
So yeah, what do you do if you just want to set it to
something, everywhere?
(require 'message)
(let ((fill-col 62))
(setq fill-column fill-col) ; only sets it in this buffer since
"Automatically becomes buffer-local when set."
(setq-default fill-column fill-col) ; sets it where it isn't set
(setq message-fill-column fill-col) ; no problem since not auto buffer-local
)
--
underground experts united
https://dataswamp.org/~incal
- more issues with setq-local,
Emanuel Berg <=