[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [External] : Getting the operational value of a buffer variable
From: |
Heime |
Subject: |
RE: [External] : Getting the operational value of a buffer variable |
Date: |
Fri, 02 Dec 2022 13:25:50 +0000 |
------- Original Message -------
On Friday, December 2nd, 2022 at 2:52 AM, Drew Adams <drew.adams@oracle.com>
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
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^
>
> > default-value.
>
>
> 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.
>
> 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.
Currently, I have the following function, but this only works for the current
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))