[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing value for fill-column

From: wilnerthomas
Subject: Re: Changing value for fill-column
Date: Mon, 29 Aug 2022 10:39:50 +0200 (CEST)

Aug 28, 2022, 15:32 by

>> Date: Sun, 28 Aug 2022 17:14:25 +0200 (CEST)
>> From:
>> Cc:
>> Aug 28, 2022, 15:07 by
>> >> But I want to change the value even if buffer has its own value for 
>> >> fill-column
>> >>
>> > If you do that in your init file, no buffer will have a local value
>> > yet.
>> >
>> How do these local values get set when users do not perform setq-default in 
>> their init file?
>> Some modes set them up if there is no mode-hook for it already?
> Modes don't set these variables; users do.
> setq-default sets the default value, and that default value will be in
> effect in every new buffer, unless someone -- you -- changes the value
> in that buffer.  Since you want the same different value in all
> buffers, you will probably not set the value in individual buffers,
> and thus the default which you changed with setq-default will stay in
> effect.
And once a user uses  setq-default  for a variable that variable cannot be 
changed again.

If users do not change fill-column, how does ruler-mode set the value?

For the hook you mentioned, I have done as follows

     (defun column-property ()  (setq fill-column 72))

     (add-hook 'prog-mode-hook #'column-property)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]