unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master d82e73f: Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871)
       [not found] ` <20181230144832.A6B45209D7@vcs0.savannah.gnu.org>
@ 2019-01-02  4:22   ` Stefan Monnier
  2019-01-02  8:32     ` martin rudalics
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2019-01-02  4:22 UTC (permalink / raw)
  To: emacs-devel; +Cc: Martin Rudalics

>     * 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).


        Stefan



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Emacs-diffs] master d82e73f: Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871)
  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
  2019-01-02 15:30       ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: martin rudalics @ 2019-01-02  8:32 UTC (permalink / raw)
  To: Stefan Monnier, emacs-devel

 >>      * 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



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Emacs-diffs] master d82e73f: Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871)
  2019-01-02  8:32     ` martin rudalics
@ 2019-01-02 15:30       ` Stefan Monnier
  2019-01-02 19:36         ` martin rudalics
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2019-01-02 15:30 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

> 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.

I don't understand why this var would be unbound unless someone call
`makunbound` on it.  Any idea?


        Stefan



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Emacs-diffs] master d82e73f: Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871)
  2019-01-02 15:30       ` Stefan Monnier
@ 2019-01-02 19:36         ` martin rudalics
  2019-01-03  4:15           ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: martin rudalics @ 2019-01-02 19:36 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

 > I don't understand why this var would be unbound unless someone call
 > `makunbound` on it.  Any idea?

I think so, meanwhile.  Have a look at the definition of
Qwindow_point_insertion_type.

martin



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Emacs-diffs] master d82e73f: Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871)
  2019-01-02 19:36         ` martin rudalics
@ 2019-01-03  4:15           ` Stefan Monnier
  2019-01-03  7:42             ` martin rudalics
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2019-01-03  4:15 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

>> I don't understand why this var would be unbound unless someone call
>> `makunbound` on it.  Any idea?
> I think so, meanwhile.  Have a look at the definition of
> Qwindow_point_insertion_type.

Hmm... I can't find the source of the problem...
Please tell us,


        Stefan



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Emacs-diffs] master d82e73f: Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871)
  2019-01-03  4:15           ` Stefan Monnier
@ 2019-01-03  7:42             ` martin rudalics
  2019-01-03 15:25               ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: martin rudalics @ 2019-01-03  7:42 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

 >> Have a look at the definition of
 >> Qwindow_point_insertion_type.

 > Hmm... I can't find the source of the problem...
 > Please tell us,

   DEFSYM (Qwindow_point_insertion_type, "window_point_insertion_type");
                                                ^     ^         ^
martin



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Emacs-diffs] master d82e73f: Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871)
  2019-01-03  7:42             ` martin rudalics
@ 2019-01-03 15:25               ` Stefan Monnier
  2019-01-04 10:00                 ` martin rudalics
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2019-01-03 15:25 UTC (permalink / raw)
  To: martin rudalics; +Cc: emacs-devel

>>> Have a look at the definition of
>>> Qwindow_point_insertion_type.
>> Hmm... I can't find the source of the problem...
>> Please tell us,
>   DEFSYM (Qwindow_point_insertion_type, "window_point_insertion_type");
>                                                ^     ^         ^

Duh!


        Stefan



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Emacs-diffs] master d82e73f: Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871)
  2019-01-03 15:25               ` Stefan Monnier
@ 2019-01-04 10:00                 ` martin rudalics
  2019-01-04 13:08                   ` Eli Zaretskii
  0 siblings, 1 reply; 10+ messages in thread
From: martin rudalics @ 2019-01-04 10:00 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: eliz@gnu.org, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 87 bytes --]

 > Duh!

Eli - anything against installing the attached on the release branch?

martin

[-- Attachment #2: window-point-insertion-type.diff --]
[-- Type: text/plain, Size: 557 bytes --]

--- a/src/window.c
+++ b/src/window.c
@@ -7646,7 +7646,7 @@ Value is a list of the form (WIDTH COLUMNS VERTICAL-TYPE HEIGHT LINES
   DEFVAR_LISP ("window-point-insertion-type", Vwindow_point_insertion_type,
 	       doc: /* Type of marker to use for `window-point'.  */);
   Vwindow_point_insertion_type = Qnil;
-  DEFSYM (Qwindow_point_insertion_type, "window_point_insertion_type");
+  DEFSYM (Qwindow_point_insertion_type, "window-point-insertion-type");
 
   DEFVAR_LISP ("window-configuration-change-hook",
 	       Vwindow_configuration_change_hook,


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Emacs-diffs] master d82e73f: Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871)
  2019-01-04 10:00                 ` martin rudalics
@ 2019-01-04 13:08                   ` Eli Zaretskii
  2019-01-04 16:40                     ` martin rudalics
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2019-01-04 13:08 UTC (permalink / raw)
  To: martin rudalics; +Cc: monnier, emacs-devel

> Date: Fri, 04 Jan 2019 11:00:15 +0100
> From: martin rudalics <rudalics@gmx.at>
> CC: emacs-devel@gnu.org, "eliz@gnu.org" <eliz@gnu.org>
> 
> Eli - anything against installing the attached on the release branch?

No, of course not.

Thanks for catching this blunder.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [Emacs-diffs] master d82e73f: Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871)
  2019-01-04 13:08                   ` Eli Zaretskii
@ 2019-01-04 16:40                     ` martin rudalics
  0 siblings, 0 replies; 10+ messages in thread
From: martin rudalics @ 2019-01-04 16:40 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: monnier, emacs-devel

>> Eli - anything against installing the attached on the release branch?
>
> No, of course not.
>
> Thanks for catching this blunder.

Installed.

Thanks, martin





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-01-04 16:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [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
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

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).