emacs-devel
[Top][All Lists]
Advanced

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

Re: A way to get a list of available functions / variables?


From: David Kastrup
Subject: Re: A way to get a list of available functions / variables?
Date: Sat, 17 May 2008 00:33:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Davis Herring" <address@hidden> writes:

>> (remove-if-not (lambda (atom)
>>               (or (commandp atom)
>>                   (custom-variable-p atom)))
>>             obarray)
>
> Unless CL is a lot more clever than I think it is, this won't work: the
> obarray is really a hash table with linked buckets, and Lisp can't see the
> links.  (See (elisp)Creating symbols.)

That's what mapatoms is for.

(let (l) (mapatoms (lambda (atom) (when (or (commandp atom)
  (custom-variable-p atom)) (push atom l)))) l)


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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