help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs C source, suggested reading order


From: Eli Zaretskii
Subject: Re: Emacs C source, suggested reading order
Date: Sat, 24 Jan 2004 12:59:41 +0200

> From: joao <joao@nospam.net>
> Newsgroups: gnu.emacs.help
> Date: 24 Jan 2004 00:40:18 +0100
> 
> I wanted to write some emacs lisp code to display the contents of registers,
> where I've saved several window configurations. I was thinking of a list of
> registers identified by a, b, c, ..., with, for each one, the names of the
> buffers/files displayed in each window.
> 
> Unfortunately the Elisp Manual states clearly that
> 
>        Primitives to look inside of window configurations would
>     make sense, but none are implemented.  It is not clear they
>     are useful enough to be worth implementing.
> 
> So I guess it's time to start reading that Emacs C source code, so I can add
> the primitive I need. I've found the window config functions in window.c, but
> obviously there's a lot to understand in this (big) source.

The only built-in function involved in saving the window configuration
to a register is current-window-configuration (defined on window.c),
so I'm guessing that this is the function you are talking about.  What
it does is create a C data structure whose members store various
parameters of the window configuration, then store the data structure
in a Lisp object.  A helper subroutine save_window_save is also of
interest.

To understand the details, you need to look at lisp.h that defines
the macros, such as XSETINT, XVECTOR, XSETWINDOW_CONFIGURATION, etc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]