auctex-devel
[Top][All Lists]
Advanced

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

[AUCTeX-devel] Re: New tex-symb.el


From: David Kastrup
Subject: [AUCTeX-devel] Re: New tex-symb.el
Date: Thu, 08 Feb 2007 13:46:56 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Ralf Angeli <address@hidden> writes:

> And let me mention again the idea of a central "database" of TeX
> macros containg all sorts of information, like syntax or
> documentation.  Part of that database could and should be
> math-related macros as well.  I'm not sure yet how to do this in
> Emacs Lisp because I'd like to have named fields, i.e. something
> like ("title" :syntax "{}" :descr "Specify the document title.")  in
> order to avoid having to write many nil values for empty fields.

You could use a hash table to map macros to property lists which can
then be searched using plist-get.

Or you can use an obarray of its own and store symbols in there, then
use the symbol's property lists.

obarrays are a bit weird as a data structure: they are fixed-size
arrays (use a prime size larger than the number of elements) with hash
buckets, but you can reasonably only use them with the given accessor
functions.  On the other hand, having a separate symbol space can be
convenient for programming: you can use the value, print name,
function cell and property list of those symbols like you do with
properly interned symbols known to the Lisp reader.

(info "(elisp) Creating Symbols")

-- 
David Kastrup





reply via email to

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