From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: reading the C source of Emacs Date: 11 Jan 2003 18:43:53 +0100 Organization: T-Online Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1042307547 13333 80.91.224.249 (11 Jan 2003 17:52:27 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 11 Jan 2003 17:52:27 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18XPo2-0003Sv-00 for ; Sat, 11 Jan 2003 18:52:26 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18XPm8-0004qL-08 for gnu-help-gnu-emacs@m.gmane.org; Sat, 11 Jan 2003 12:50:28 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!fr.usenet-edu.net!usenet-edu.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 57 Original-X-Trace: news.t-online.com 1042307034 06 19640 OzwFE8yESXA-mF 030111 17:43:54 Original-X-Complaints-To: abuse@t-online.com X-Sender: 520018396234-0001@t-dialin.net X-Face: 2FEFf>]>q>2iw=B6,xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN;i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Xref: shelby.stanford.edu gnu.emacs.help:108849 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5378 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5378 Oliver Scholz 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