emacs-devel
[Top][All Lists]
Advanced

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

Re: doc elisp intro cross reference fixes


From: Luc Teirlinck
Subject: Re: doc elisp intro cross reference fixes
Date: Thu, 27 Nov 2003 10:11:43 -0600 (CST)

Per Abrahamsen wrote:

   Evaluate this expression to get a list of variables declared with
   defcustom but not in any group:

   (let (found)
     (mapatoms (lambda (sym) 
                 (let ((group (get sym 'custom-group)))
                   (setq found (append group found)))))
     (mapatoms (lambda (sym)
                 (and (get sym 'custom-type)
                      (not (assq sym found))
                      (insert (format "%S\n" sym))))))

There are two problems with this expression:

1.  (get sym 'custom-type) :

Not only are there defcustom's without a :group, there also sre
defcustom's without a :type :

ELISP> (get 'ada-tight-gvd-integration 'custom-type)
nil

2. A variable defined using a defcustom without a :group _is_ in a
   group, the `nil' group:

ELISP> (get nil 'custom-group)
((ada-tight-gvd-integration custom-variable)
 (nnimap-authinfo-file custom-variable)
 (nnimap-prune-cache custom-variable)
 (nntp-authinfo-file custom-variable))


Sincerely,

Luc.





reply via email to

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