unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Some obsolete/unused/garbage things around window code?
@ 2012-01-10  6:29 Dmitry Antipov
  2012-01-10  8:40 ` Eli Zaretskii
  2012-01-10 10:20 ` martin rudalics
  0 siblings, 2 replies; 5+ messages in thread
From: Dmitry Antipov @ 2012-01-10  6:29 UTC (permalink / raw)
  To: emacs-devel

1) last_mark_x and last_mark_y fields of 'struct window' aren't used anywhere
    except initialization in make_window - is it reasonable to drop them at all?

2) What's an idea behind sequence_number of window objects? It's initialized
    within make_window and make_parent_window, but used only in printing code.

Dmitry



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

* Re: Some obsolete/unused/garbage things around window code?
  2012-01-10  6:29 Some obsolete/unused/garbage things around window code? Dmitry Antipov
@ 2012-01-10  8:40 ` Eli Zaretskii
  2012-01-10 10:20 ` martin rudalics
  1 sibling, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2012-01-10  8:40 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: emacs-devel

> Date: Tue, 10 Jan 2012 10:29:44 +0400
> From: Dmitry Antipov <dmantipov@yandex.ru>
> 
> 1) last_mark_x and last_mark_y fields of 'struct window' aren't used anywhere
>     except initialization in make_window - is it reasonable to drop them at all?

Maybe I'm blind, but I don't see it used even in Emacs 18.59.  Looks
like it never was used.  Maybe Richard will remember something about
it (or we could ask Jim Blandy ;-).

If I'm right, it should have been deleted many moons ago.



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

* Re: Some obsolete/unused/garbage things around window code?
  2012-01-10  6:29 Some obsolete/unused/garbage things around window code? Dmitry Antipov
  2012-01-10  8:40 ` Eli Zaretskii
@ 2012-01-10 10:20 ` martin rudalics
  2012-01-10 11:00   ` Dmitry Antipov
  1 sibling, 1 reply; 5+ messages in thread
From: martin rudalics @ 2012-01-10 10:20 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: emacs-devel

 > 1) last_mark_x and last_mark_y fields of 'struct window' aren't used
 > anywhere
 >    except initialization in make_window - is it reasonable to drop them
 > at all?

Yes.

 > 2) What's an idea behind sequence_number of window objects? It's
 > initialized
 >    within make_window and make_parent_window, but used only in printing
 > code.

How else would we identify windows in printed notation?  BTW I plan to
make sequence numbers available in Elisp for 24.2.

martin



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

* Re: Some obsolete/unused/garbage things around window code?
  2012-01-10 10:20 ` martin rudalics
@ 2012-01-10 11:00   ` Dmitry Antipov
  2012-01-10 12:14     ` martin rudalics
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Antipov @ 2012-01-10 11:00 UTC (permalink / raw)
  To: emacs-devel

On 01/10/2012 02:20 PM, martin rudalics wrote:

>  > 2) What's an idea behind sequence_number of window objects? It's
>  > initialized
>  > within make_window and make_parent_window, but used only in printing
>  > code.
>
> How else would we identify windows in printed notation? BTW I plan to
> make sequence numbers available in Elisp for 24.2.

For frames, C pointer value of 'struct frame' is used, i.e.:
...
sprintf (buf, " %p", XFRAME (obj));
...
Why it should be done in a different way for windows?

Dmitry



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

* Re: Some obsolete/unused/garbage things around window code?
  2012-01-10 11:00   ` Dmitry Antipov
@ 2012-01-10 12:14     ` martin rudalics
  0 siblings, 0 replies; 5+ messages in thread
From: martin rudalics @ 2012-01-10 12:14 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: emacs-devel

 > For frames, C pointer value of 'struct frame' is used, i.e.:
 > ...
 > sprintf (buf, " %p", XFRAME (obj));

Which is awkward and usually complemented by the buffer shown in the
frame's selected window which hardly improves anything.

 > Why it should be done in a different way for windows?

Comparing two sequence numbers, you can always tell which window is
older.  And you usually can identify all windows coming from one and the
same session.  So you can use number when saving window states to disk.

Finally, using sequence numbers we can replay a sequence of window
creation/deletion functions in different sessions and compare the
outcome.  This will be useful when we finally get around writing a
testsuite for the window handling code.

That said, I think that sequence numbers for frames would be useful too.

martin



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

end of thread, other threads:[~2012-01-10 12:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10  6:29 Some obsolete/unused/garbage things around window code? Dmitry Antipov
2012-01-10  8:40 ` Eli Zaretskii
2012-01-10 10:20 ` martin rudalics
2012-01-10 11:00   ` Dmitry Antipov
2012-01-10 12:14     ` 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).