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: Sun, 28 Aug 2022 17:33:20 +0300 Message-ID: <83mtboxwsv.fsf@gnu.org> References: <83r110xxt5.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29335"; 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 Sun Aug 28 16:33:37 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 1oSJM0-0007O4-PV for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 28 Aug 2022 16:33:36 +0200 Original-Received: from localhost ([::1]:41984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSJLz-0001s9-Tx for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 28 Aug 2022 10:33:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58496) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSJLT-0001rl-Ft for help-gnu-emacs@gnu.org; Sun, 28 Aug 2022 10:33:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54976) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSJLT-0004Ph-7D for help-gnu-emacs@gnu.org; Sun, 28 Aug 2022 10:33:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ZbKkKqh2sNEYXRVpXntzk5PwZJgm62eGkFkazuoYzVQ=; b=RTc6ZWTlvSqw 1GSc/jTHKNZnrWTJOILpMZsyUuJYlVCOW7t6W5Q4gxYYWazWpBrsIjBjNTo2TBRt0uKIpVq/3wrEQ 7AVmNFRwYryJs4iKn3HD+pRxAcriG9dZhBPzw+X7INlPr0d1q63FLp0y3PxDChCHFF2elNJZBwCwS J03NBBWPwYvGCzbM7WAm9JY0WXk9yuTtsUyGt+czfDTIYUafK5BYBFYkmJiRLMuq/4vUprW4H1sF5 1jAsBWsEYLppgLL/Z0lKXR0jR3+LJv/KFJCpcsMw+/pnqD8m7gWslRaFcIDQ/xgPVrTjHopHmAxJR 8SkO6RO5+2TSGwRoUK0jsw==; Original-Received: from [87.69.77.57] (port=4437 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 1oSJLS-0003eX-MV for help-gnu-emacs@gnu.org; Sun, 28 Aug 2022 10:33:03 -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:139130 Archived-At: > Date: Sun, 28 Aug 2022 16:20:14 +0200 (CEST) > From: wilnerthomas@tutanota.com > Cc: help-gnu-emacs@gnu.org > > > The doc string says: > > > > Automatically becomes buffer-local when set. > > > > So you either need to set it in a mode-hook of each mode where you > > want to change the default value, or you should use setq-default to > > change the default value in all buffers. > > > I know how to add hook to major mode with a function but not using a variable. > > (add-hook 'prog-mode-hook #'display-fill-column-indicator-mode) You need to write a function that will both set fill-column and turn on display-fill-column-indicator-mode.