From: David Kastrup <dak@gnu.org>
Subject: Re: reading the C source of Emacs
Date: 11 Jan 2003 18:43:53 +0100 [thread overview]
Message-ID: <x5n0m7d1k6.fsf@lola.goethe.zz> (raw)
In-Reply-To: uznq74o1c.fsf@ID-87814.user.dfncis.de
Oliver Scholz <alkibiades@gmx.de> writes:
> I have just taught myself the very first baby steps of C. I want to
> read and understand the C sources of Emacs.
I have just taught myself the first 2 verb forms of ancient Greek (of
which there are basically {singular,dual,plural} x {1st,2nd,3rd person} x
{indicative,optative,conjunctive,participle,infinitive,imperative} x
{present,past,perfect,past perfect,aorist,future,past future} x
{active,medium,passive} (probably forgot a few here, and of course
you still have to decline your participles). I want to read and
understand Thukydides.
> Not surprisingly I am pretty lost.
Same here. You have to be aware that Emacs is basically a _Lisp_
machine with Lisp data structures. The C code is vary much different
from ordinary C code because it constantly has to access and modify
non-C structures.
> What is a good starting point to read those sources? Is there any
> recommended order of reading?
grep for the Elisp function that you suspect to be the source of your
favorite annoyance/bug. Fiddle around. Anyhow: if you are not yet
comfortable with Elisp, start there. It is not really possible to
understand much of what is going on inside of Emacs without knowing
the Lisp. There is a short Elisp introduction available in the CVS
version of Emacs.
> Does anyone have any other recommendations on how to proceed? Can
> anyone -- for example -- recommend a shorter and simpler program
> whose sources are well documented and that I could study as a
> training before I try to read the Emacs sources? I am not interested
> in C programming in general, I just want to understand Emacs, if
> this is possible for me at all.
It is pretty difficult. Emacs is rather complex, and you are
basically are asking for how to learn to play Back partitas on the
violin, and you don't want to learn playing the violin in general. It
is possible, but it would annoy any prospective teachers and require
access to a basement where you are out of ear reach from your loved
ones.
The Emacs Lisp manual has a section "Emacs Lisp internals". Required
reading, of course.
I believe that XEmacs might have more extensive internals
documentation, but it could well be that most of it does not apply to
Emacs: XEmacs developers would probably be more thorough documenting
the differences than the similarities between the two. This is just
un aneducated guess of mine, however, and understanding XEmacs is
certainly a better help to understanding Emacs than, say,
understanding gcc would be.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
next prev parent reply other threads:[~2003-01-11 17:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-11 17:03 reading the C source of Emacs Oliver Scholz
2003-01-11 17:43 ` David Kastrup [this message]
2003-01-12 16:31 ` Oliver Scholz
2003-01-11 21:26 ` Kai Großjohann
2003-01-12 16:37 ` Oliver Scholz
2003-01-12 19:56 ` Kai Großjohann
2003-01-12 21:45 ` Oliver Scholz
2003-01-12 22:16 ` David Kastrup
2003-01-12 20:59 ` Stefan Monnier <foo@acm.com>
2003-01-17 4:55 ` Oliver Scholz
2003-01-17 11:41 ` David Kastrup
2003-01-17 17:09 ` Kai Großjohann
2003-01-13 5:52 ` Janusz S. Bień
[not found] ` <mailman.202.1042437305.21513.help-gnu-emacs@gnu.org>
2003-01-13 6:17 ` Miles Bader
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=x5n0m7d1k6.fsf@lola.goethe.zz \
--to=dak@gnu.org \
/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.
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).