From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: Colourising fill-column-indicator Date: Wed, 04 Dec 2024 10:49:17 +0000 Message-ID: <1C1u6MWb1qfh0NfL3EM0fiGNiKV7cH9u0YmIlc3S-VAX0lGYjkTYzEjQYJj-aQIB0EPcp6Tw4rc-ipY8so7lwQY_hJZRnPmuiEQPqqWwgIU=@protonmail.com> References: <87wmggowut.fsf@web.de> Reply-To: Heime Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21819"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Heime via Users list for the GNU Emacs text editor To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 04 11:49:53 2024 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 1tImx7-0005XH-P3 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 Dec 2024 11:49:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tImwh-0003tA-4P; Wed, 04 Dec 2024 05:49:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tImwf-0003sm-HZ for help-gnu-emacs@gnu.org; Wed, 04 Dec 2024 05:49:25 -0500 Original-Received: from mail-43167.protonmail.ch ([185.70.43.167]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tImwd-0005ZX-I1 for help-gnu-emacs@gnu.org; Wed, 04 Dec 2024 05:49:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1733309360; x=1733568560; bh=OVq/8mdEpUzEE4qy8fnL6pAwrQXHBMlD6ypc5j/x4d0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=UKUzeOhGHbh49le42q2am2X0nUT4lJSPL5rEC7dTpcIXRTpY7Rw2PR/+6BsIBHSX+ Z8zsOxpt1h2OQ41KUEHJJ7kLNvgJ55t7rRweFzzTg2+j0BGNZbqYOaOYoZoSrj9h4W c7WdfBF/tGsz21NdIASpAg3bzblvJKFMsyg5ZFPN/TLDGdp4YqWy/oVEN0W7eOApqY Os9oHjP7L+8l97jVGeT+o4ViI0Pv2JjsMQDG2pJPZ80A6dPqCwsd+rXKqc2lZ0tunR QBliBCn3TE9atf81GYI6qyjbDRwQFkGp/KJjc6LuwrrXnPpmhju9YEr+ib3MKT6GqS Ph4iUMAUHHLgw== In-Reply-To: <87wmggowut.fsf@web.de> Feedback-ID: 57735886:user:proton X-Pm-Message-ID: d74254c9b8c812c9231951e6f7da9d30b0675804 Received-SPF: pass client-ip=185.70.43.167; envelope-from=heimeborgia@protonmail.com; helo=mail-43167.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148592 Archived-At: Sent with Proton Mail secure email. On Wednesday, December 4th, 2024 at 5:11 PM, Michael Heerdegen wrote: > Heime via Users list for the GNU Emacs text editor > help-gnu-emacs@gnu.org writes: >=20 > > Where should the following commands be called? > >=20 > > (setq-default display-fill-column-indicator-character ?\u2503) > >=20 > > (set-face-attribute > > 'fill-column-indicator nil :background "green" :height 1.0) > >=20 > > Are they to be called before display-fill-column-indicator-mode? >=20 >=20 > In a buffer with display-fill-column-indicator-mode enabled the > `setq-default' will of course have no effect on the binding of the local = variable` display-fill-column-indicator-character'. >=20 > I'm totally guessing what you are asking for since you seldom tell what > you are doing, what you are seeing, and what you want to achieve. >=20 > Michael. Because setq-default have no effect on the binding of the local variable, how does one set the local value? With a mode hook? I want to have the same character indicator whenever one enables the mode. Consider the following function (defun linwrap (actm) "Toggle display of fill-column indicator." (interactive (list (let ( (cseq '("local" "toggle" "global" "disable")) ) (completing-read "Context: " cseq nil t "toggle")))) (setq-default display-fill-column-indicator-character ?\u2503) (set-face-attribute 'fill-column-indicator nil :background "green" :height 1.0) (cond ((equal actm "local") (display-fill-column-indicator-mode)) ((equal actm "global") (global-display-fill-column-indicator-mode)) ((equal actm "mode-hook") (add-hook 'prog-mode-hook #'display-fill-column-indicator-mode)) ((equal actm "toggle") (display-fill-column-indicator-mode 'toggle)) (t ;; Use mode variable to test whether mode was activated (if global-display-fill-column-indicator-mode (global-display-fill-column-indicator-mode -1) (display-fill-column-indicator-mode -1))) ))