unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master d82e73f: Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871)
Date: Wed, 02 Jan 2019 09:32:21 +0100	[thread overview]
Message-ID: <5C2C7715.2080902@gmx.at> (raw)
In-Reply-To: <jwv1s5vu1x0.fsf-monnier+emacsdiffs@gnu.org>

 >>      * src/window.c (save_window_save): When setting the marker
 >>      insertion type of saved window points treat a buffer local
 >>      value of 'unbound' for 'window-point-insertion-type' like
 >>      nil (Bug#33871).
 >
 > I think treating it like nil is technically incorrect: instead of nil it
 > should use the global value of the variable (like Fbuffer_local_value would).

The only difference between buffer_local_value and Fbuffer_local_value
I see is that the latter signals an error when the value returned by
buffer_local_value is 'unbound'.  I cannot signal an error here so I
use nil instead.  I don't see anything else I could do here but if you
have any suggestions I will try them.

In general, I am completely lost as to what the canonical way to find
out whether a variable has a buffer local binding is: I suppose it's

Fassoc (variable, BVAR (buf, local_var_alist), Qnil);

from buffer_local_value.  And I suppose in Lisp I would have to check
for membership in 'buffer-local-variables'.  Or how could I check the
following part of the doc-string of 'buffer-local-value' separately:

"If VARIABLE does not have a buffer-local binding in BUFFER,"

martin



  reply	other threads:[~2019-01-02  8:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181230144831.8662.30750@vcs0.savannah.gnu.org>
     [not found] ` <20181230144832.A6B45209D7@vcs0.savannah.gnu.org>
2019-01-02  4:22   ` [Emacs-diffs] master d82e73f: Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871) Stefan Monnier
2019-01-02  8:32     ` martin rudalics [this message]
2019-01-02 15:30       ` Stefan Monnier
2019-01-02 19:36         ` martin rudalics
2019-01-03  4:15           ` Stefan Monnier
2019-01-03  7:42             ` martin rudalics
2019-01-03 15:25               ` Stefan Monnier
2019-01-04 10:00                 ` martin rudalics
2019-01-04 13:08                   ` Eli Zaretskii
2019-01-04 16:40                     ` martin rudalics

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5C2C7715.2080902@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).