From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Changing value for fill-column Date: Mon, 29 Aug 2022 14:32:00 +0300 Message-ID: <8335dfxp3j.fsf@gnu.org> References: <83r110xxt5.fsf@gnu.org> <83mtboxwsv.fsf@gnu.org> <83ilmcxv8i.fsf@gnu.org> <83h71wxu1k.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1942"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 29 13:33:07 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oSd0t-0000JQ-7s for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 29 Aug 2022 13:33:07 +0200 Original-Received: from localhost ([::1]:47754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSd0s-0003y8-7g for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 29 Aug 2022 07:33:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSczV-0003wQ-6P for help-gnu-emacs@gnu.org; Mon, 29 Aug 2022 07:31:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:41918) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSczU-0002kC-U6 for help-gnu-emacs@gnu.org; Mon, 29 Aug 2022 07:31:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=MK6bQciF28F1muys5y/WRNzuvKthclAKqia/oDJvfMU=; b=HxjWNi2nVT6Z3B+7+Dgg z0ckDQj9COIef2viYxq8dlL6A7VwYQPPaNWULctMKktuDLkKpZSDumZFMpAImhJ95d9yVuuWG6wtg pmAMQkyq5OQWQDA+KMJcm9LM+ZlYbq8LHrnvUujzs0Nin+Nxk6C8WIKwrjETIwI9jJoY2rKab1Ldd firqys5zY7DvXv2ejo7O1TmynDifCBOPItLFyh5aZF2WLjQK8qeQ4zIhpARwCZere2D8W2n+cpGNc vZLOVwTi0rTEnFrvNIaAxlqVcZIYnjvAnuwD3lRpY0qlLtbTF72aAIvIxV2RUA4UuX/tr5zRC78KQ u+IaN1JH0BSIQQ==; Original-Received: from [87.69.77.57] (port=1693 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSczT-0008BA-Vc for help-gnu-emacs@gnu.org; Mon, 29 Aug 2022 07:31:40 -0400 In-Reply-To: (wilnerthomas@tutanota.com) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:139147 Archived-At: > 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?