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 13:25:50 +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="23907"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "'Help-Gnu-Emacs (help-gnu-emacs@gnu.org)'" To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 02 14:26:41 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 1p163t-00065T-CV for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 02 Dec 2022 14:26:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p163H-0005PQ-Qn; Fri, 02 Dec 2022 08:26:03 -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 1p163G-0005Ob-5V for help-gnu-emacs@gnu.org; Fri, 02 Dec 2022 08:26:02 -0500 Original-Received: from mail-40140.protonmail.ch ([185.70.40.140]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p163E-0003bL-1i for help-gnu-emacs@gnu.org; Fri, 02 Dec 2022 08:26:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1669987557; x=1670246757; bh=bwcc19V84S/uerqSBXxOxLnM4WaD2lun7mWbALXRxy0=; 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=GMusPhR1xuXQPSWu4hgxbIMTXaPWHn9SIIuQV2qcU8GAPoQTMmqP+uZgStuDdWCc+ VvIt7TbpSmWsVkkttiVaNmt4dUk0Z1CnoJwKUXYS4HKBxXlsEvXX+LYvBCU4XgSe+R Nl7p/4VtkiZtnoTEHOcpq5OGYX2F+AImb9YxFh8X2Njt2QQM+INz8GLlAGip+Qlgnq +5z+OWKCSBBdwkFW24XXs/mKsZiZi+MM5EaijiGZ8gUCDvAxnxqxQbM8Ko2cspXrNJ Sy4udBf2u6WoVpRDewJymkZH5GIsmIX68fkrKIx6qL+peSrLSziqRhDvf8uxqbcXfZ yDGlGnmRfGBIA== In-Reply-To: Feedback-ID: 57735886:user:proton Received-SPF: pass client-ip=185.70.40.140; envelope-from=heimeborgia@protonmail.com; helo=mail-40140.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, 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:141296 Archived-At: ------- Original Message ------- On Friday, December 2nd, 2022 at 2:52 AM, Drew Adams wrote: > > 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 >=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. 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 curre= nt buffer. (defvar-local ramona-mode-line nil "Switch for mode-line display.") (defun ramona-mode-line-toggle () "Turns the mode-line display on or off." (interactive) (if ramona-mode-line (setq mode-line-format ramona-mode-line ramona-mode-line nil) (setq ramona-mode-line mode-line-format mode-line-format nil) (force-mode-line-update t))