all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Changing value for fill-column
Date: Mon, 29 Aug 2022 14:32:00 +0300	[thread overview]
Message-ID: <8335dfxp3j.fsf@gnu.org> (raw)
In-Reply-To: <NAbLEQ0--3-2@tutanota.com> (wilnerthomas@tutanota.com)

> Date: Mon, 29 Aug 2022 10:39:50 +0200 (CEST)
> From: wilnerthomas@tutanota.com
> Cc: help-gnu-emacs@gnu.org
> 
> Aug 28, 2022, 15:32 by eliz@gnu.org:
> 
> >> 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.

Of course, they can: by another setq-default or by setq (the latter
possibly locally for the buffer that is the current one when the
command is invoked).

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

It doesn't.  It _uses_ the value set for the buffer.

> For the hook you mentioned, I have done as follows
> 
>      (defun column-property ()  (setq fill-column 72))
> 
>      (add-hook 'prog-mode-hook #'column-property)

OK.  Is there any problem with this?



      reply	other threads:[~2022-08-29 11:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-28 12:17 Changing value for fill-column wilnerthomas--- via Users list for the GNU Emacs text editor
2022-08-28 14:11 ` Eli Zaretskii
2022-08-28 14:20   ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-08-28 14:33     ` Eli Zaretskii
2022-08-28 14:51       ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-08-28 15:07         ` Eli Zaretskii
2022-08-28 15:14           ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-08-28 15:32             ` Eli Zaretskii
2022-08-29  8:39               ` wilnerthomas--- via Users list for the GNU Emacs text editor
2022-08-29 11:32                 ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8335dfxp3j.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.