From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime Newsgroups: gmane.emacs.help Subject: RE: [External] : Getting the operational value of a buffer variable Date: Fri, 02 Dec 2022 22:00:56 +0000 Message-ID: References: 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="39739"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Drew Adams , "'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'" To: Heime Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 02 23:01:50 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 1p1E6M-000A48-NM for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 02 Dec 2022 23:01:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1E5w-0006ui-WB; Fri, 02 Dec 2022 17:01:21 -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 1p1E5p-0006s7-A8 for help-gnu-emacs@gnu.org; Fri, 02 Dec 2022 17:01:14 -0500 Original-Received: from mail-4324.protonmail.ch ([185.70.43.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p1E5m-0005cQ-6U for help-gnu-emacs@gnu.org; Fri, 02 Dec 2022 17:01:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1670018465; x=1670277665; bh=goLOq0BNZndIoXQrC8kl3zd+z2T6StzROlAMpXbJkS0=; 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; b=DvAQIUNMZ3T90+vfOMKmmWWfZOF/M8prjEPbfIrC9GrPec4QJLNr7TV5g03eenL3q s4LJxL6Nwhyaudcm1eiK44gHyInBtI6ar/jm2EOW7+8BeINeDqnqo9qXBlVCSB5Ix0 WYvdOTsKqraDVJ2M+mYE4CaQMXYuTg+V2VnRiDHCSxqVuZPUriKS860O7W5aCB19+V /mykoknxxkoWAsG+oufvnwdVbIOjuKHQOFjm95FwzOzb/LDRbwh6J8KIDEKa/6NXrB thy2D3pUjkqEbbIx+x/l5n4+QF6pwYBZ1WZbalWbeEa/1FX0yNTB/UIfpShIY7J3vt SZwhmW645TtKQ== In-Reply-To: Feedback-ID: 57735886:user:proton Received-SPF: pass client-ip=185.70.43.24; envelope-from=heimeborgia@protonmail.com; helo=mail-4324.protonmail.ch X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, TO_EQ_FM_DIRECT_MX=1 autolearn=no 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:141298 Archived-At: ------- Original Message ------- On Friday, December 2nd, 2022 at 1:25 PM, Heime wrote: > ------- Original Message ------- > On Friday, December 2nd, 2022 at 2:52 AM, Drew Adams drew.adams@oracle.co= m wrote: >=20 >=20 >=20 > > > I want to get the operational value of a buffer > > > variable. If the buffer has a local value, one > > > cannot use the default-value implementation. > > > And if the local value in nil, I have to get the > >=20 > > ^^^^^^^^^^^^^^^^^^^^^^^^^ > >=20 > > > default-value. > >=20 > > You said this in your previous mail, and I meant to > > correct it. It's not at all about the buffer-local > > value being `nil'.` nil' is a legitimate value. > >=20 > > It's about whether the variable has a buffer-local > > value. If it has a buffer-local value of `nil' then > > it has a buffer-local value. Is there a need to store the local value in order to redisplay the original= mode-line again? I would like to be able to remove the mode-line and display it again. Not = just for the current buffer, but for all visible buffers when the frame is split into mu= ltiple windows. =20 > Thank you for pointing things out. I want to remove the mode-line > on all visible buffers, then toggle them back and forth. >=20 > Currently, I have the following function, but this only works for the cur= rent buffer. >=20 > (defvar-local ramona-mode-line nil > "Switch for mode-line display.") >=20 > (defun ramona-mode-line-toggle () > "Turns the mode-line display on or off." >=20 > (interactive) >=20 > (if ramona-mode-line >=20 > (setq mode-line-format ramona-mode-line > ramona-mode-line nil) >=20 > (setq ramona-mode-line mode-line-format > mode-line-format nil) >=20 > (force-mode-line-update t))