XEmacs 21.4.11 and Emacs 21.2.1 handle the autoload declarations for
defcustom forms differently. This was causing a problem in a recent
version of Oort Gnus (though that change has been backed out to
support XEmacs).
When generating an autoload for a defcustom form with the Emacs 21.2.1
that is installed on my box, I get a defvar form that contains the
variable, its value, and its doc-string. XEmacs 21.4.11 uses the
entire defcustom form as the autoload.
For example, the source
;;;###autoload
(defcustom message-signature-insert-empty-line t
"*If non-nil, insert an empty line before the signature separator."
:type 'boolean
:group 'message-insertion)
Will become this in an Emacs 21.2.1 autoload:
(defvar message-signature-insert-empty-line t "\
*If non-nil, insert an empty line before the signature separator.")
and this in XEmacs 21.4.11:
(defcustom message-signature-insert-empty-line t "*If non-nil, insert an empty line before the signature separator." :type 'boolean :group 'message-insertion)
The problem I experienced with Oort Gnus involved a complex defcustom
form (see below) where the :type attribute was a backquote'd sexp
which contained variables---to be expanded by ,@---that were not
autoload'ed. The autoload was generated just fine, but when it was
evaluated I'd get an error about a void variable.
Is there some rule about defcustom forms that Oort is breaking?
Should XEmacs consider moving to the Emacs way of handling the
autoload declaration of defcustom forms?
Does anyone have suggestions on better ways to handle this?
The message I posted to the ding(a)gnus.org mailing list on this topic
had Message-ID <wf1hece2mii.fsf(a)grubzen.com>. I'd include a link but
I don't see my article on the archives yet.
Thanks,
-Mark
;;;###autoload
(defcustom mail-sources nil
"*Where the mail backends will look for incoming mail.
This variable is a list of mail source specifiers.
See Info node `(gnus)Mail Source Specifiers'."
:group 'mail-source
:link '(custom-manual "(gnus)Mail Source Specifiers")
:type `(repeat
(choice :format "%[Value Menu%] %v"
:value (file)
(cons :tag "Spool file"
(const :format "" file)
(checklist :tag "Options" :greedy t
(group :inline t
(const :format "" :value :path)
file)))
(cons :tag "Several files in a directory"
(const :format "" directory)
(checklist :tag "Options" :greedy t
(group :inline t
(const :format "" :value :path)
(directory :tag "Path"))
(group :inline t
(const :format "" :value :suffix)
(string :tag "Suffix"))
(group :inline t
(const :format "" :value :predicate)
(function :tag "Predicate"))
(group :inline t
(const :format "" :value :prescript)
(choice :tag "Prescript"
:value nil
(string :format "%v")
(function :format "%v")))
(group :inline t
(const :format "" :value :postscript)
(choice :tag "Postscript"
:value nil
(string :format "%v")
(function :format "%v")))
(group :inline t
(const :format "" :value :plugged)
(boolean :tag "Plugged"))))
(cons :tag "POP3 server"
(const :format "" pop)
(checklist :tag "Options" :greedy t
(group :inline t
(const :format "" :value :server)
(string :tag "Server"))
(group :inline t
(const :format "" :value :port)
(choice :tag "Port"
:value "pop3"
(number :format "%v")
(string :format "%v")))
(group :inline t
(const :format "" :value :user)
(string :tag "User"))
(group :inline t
(const :format "" :value :password)
(string :tag "Password"))
(group :inline t
(const :format "" :value :program)
(string :tag "Program"))
(group :inline t
(const :format "" :value :prescript)
(choice :tag "Prescript"
:value nil
(string :format "%v")
(function :format "%v")))
(group :inline t
(const :format "" :value :postscript)
(choice :tag "Postscript"
:value nil
(string :format "%v")
(function :format "%v")))
(group :inline t
(const :format "" :value :function)
(function :tag "Function"))
(group :inline t
(const :format ""
:value :authentication)
(choice :tag "Authentication"
:value apop
(const password)
(const apop)))
(group :inline t
(const :format "" :value :plugged)
(boolean :tag "Plugged"))))
(cons :tag "Maildir (qmail, postfix...)"
(const :format "" maildir)
(checklist :tag "Options" :greedy t
(group :inline t
(const :format "" :value :path)
(directory :tag "Path"))
(group :inline t
(const :format "" :value :plugged)
(boolean :tag "Plugged"))))
(cons :tag "IMAP server"
(const :format "" imap)
(checklist :tag "Options" :greedy t
(group :inline t
(const :format "" :value :server)
(string :tag "Server"))
(group :inline t
(const :format "" :value :port)
(choice :tag "Port"
:value 143
number string))
(group :inline t
(const :format "" :value :user)
(string :tag "User"))
(group :inline t
(const :format "" :value :password)
(string :tag "Password"))
(group :inline t
(const :format "" :value :stream)
(choice :tag "Stream"
:value network
,@mail-source-imap-streams))
(group :inline t
(const :format "" :value :program)
(string :tag "Program"))
(group :inline t
(const :format ""
:value :authenticator)
(choice :tag "Authenticator"
:value login
,@mail-source-imap-authenticators))
(group :inline t
(const :format "" :value :mailbox)
(string :tag "Mailbox"
:value "INBOX"))
(group :inline t
(const :format "" :value :predicate)
(string :tag "Predicate"
:value "UNSEEN UNDELETED"))
(group :inline t
(const :format "" :value :fetchflag)
(string :tag "Fetchflag"
:value "\\Deleted"))
(group :inline t
(const :format ""
:value :dontexpunge)
(boolean :tag "Dontexpunge"))
(group :inline t
(const :format "" :value :plugged)
(boolean :tag "Plugged"))))
(cons :tag "Webmail server"
(const :format "" webmail)
(checklist :tag "Options" :greedy t
(group :inline t
(const :format "" :value :subtype)
;; Should be generated from
;; `webmail-type-definition', but we
;; can't require webmail without W3.
(choice :tag "Subtype"
:value hotmail
(const hotmail)
(const yahoo)
(const netaddress)
(const netscape)
(const my-deja)))
(group :inline t
(const :format "" :value :user)
(string :tag "User"))
(group :inline t
(const :format "" :value :password)
(string :tag "Password"))
(group :inline t
(const :format ""
:value :dontexpunge)
(boolean :tag "Dontexpunge"))
(group :inline t
(const :format "" :value :plugged)
(boolean :tag "Plugged")))))))
**** SHADOWS
/var/tmp/lib/xemacs/site-packages/lisp/gnus/sha1-el hides /var/tmp/lib/xemacs/xemacs-packages/lisp/ecrypto/sha1-el
/var/tmp/lib/xemacs/site-packages/lisp/gnus/hex-util hides /var/tmp/lib/xemacs/xemacs-packages/lisp/ecrypto/hex-util
/home/mthomas/elisp/make-regexp hides /var/tmp/lib/xemacs/xemacs-packages/lisp/ess/make-regexp
/var/tmp/lib/xemacs/site-packages/lisp/gnus/starttls hides /var/tmp/lib/xemacs/xemacs-packages/lisp/mail-lib/starttls
/var/tmp/lib/xemacs/site-packages/lisp/gnus/rfc2104 hides /var/tmp/lib/xemacs/xemacs-packages/lisp/mail-lib/rfc2104
/var/tmp/lib/xemacs/site-packages/lisp/gnus/pop3 hides /var/tmp/lib/xemacs/xemacs-packages/lisp/mail-lib/pop3
/var/tmp/lib/xemacs/site-packages/lisp/gnus/netrc hides /var/tmp/lib/xemacs/xemacs-packages/lisp/mail-lib/netrc
/var/tmp/lib/xemacs/site-packages/lisp/gnus/pgg hides /var/tmp/lib/xemacs/xemacs-packages/lisp/pgg/pgg
/var/tmp/lib/xemacs/site-packages/lisp/gnus/pgg-pgp5 hides /var/tmp/lib/xemacs/xemacs-packages/lisp/pgg/pgg-pgp5
/var/tmp/lib/xemacs/site-packages/lisp/gnus/pgg-pgp hides /var/tmp/lib/xemacs/xemacs-packages/lisp/pgg/pgg-pgp
/var/tmp/lib/xemacs/site-packages/lisp/gnus/pgg-parse hides /var/tmp/lib/xemacs/xemacs-packages/lisp/pgg/pgg-parse
/var/tmp/lib/xemacs/site-packages/lisp/gnus/pgg-gpg hides /var/tmp/lib/xemacs/xemacs-packages/lisp/pgg/pgg-gpg
/var/tmp/lib/xemacs/site-packages/lisp/gnus/pgg-def hides /var/tmp/lib/xemacs/xemacs-packages/lisp/pgg/pgg-def
/var/tmp/lib/xemacs/xemacs-packages/lisp/mail-lib/base64 hides /var/tmp/lib/xemacs/xemacs-packages/lisp/w3/base64
/var/tmp/lib/xemacs/xemacs-packages/lisp/build/build-report hides /var/tmp/lib/xemacs-21.4.11/lisp/build-report
**** INSTALLATION
uname -a: Linux svelte.home 2.2.20 #1 Thu Jan 24 12:11:57 EST 2002 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux
../xemacscvs/xemacs/configure '--prefix=/var/tmp' '--with-pop' '--with-mule' '--srcdir=/usr/local/src/xemacs-21.4/xemacscvs/xemacs' '--with-msw=no' '--with-toolbars=no' '--with-dialogs=no' '--with-widgets=athena' '--with-athena=xaw' '--with-dragndrop=no' '--with-clash-detection=yes'
XEmacs 21.4.11 "Native Windows TTY Support" configured for `i686-pc-linux'.
Compilation / Installation:
Source code location: /usr/local/src/xemacs-21.4/xemacscvs/xemacs
Installation prefix: /var/tmp
Operating system description file: `s/linux.h'
Machine description file: `m/intel386.h'
Compiler: gcc -g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes -Wsign-compare -Wshadow
Relocating allocator for buffers: no
GNU version of malloc: yes
- Using Doug Lea's new malloc from the GNU C Library.
Window System:
Compiling in support for the X window system:
- X Windows headers location: /usr/X11R6/include
- X Windows libraries location: /usr/X11R6/lib
- Handling WM_COMMAND properly.
Compiling in support for the Athena widget set:
- Athena headers location: X11/Xaw
- Athena library to link: Xaw
Using Lucid menubars.
Using Lucid scrollbars.
Using Athena native widgets.
TTY:
Compiling in support for ncurses.
Images:
Compiling in support for GIF images (builtin).
Compiling in support for XPM images.
Compiling in support for PNG images.
Compiling in support for JPEG images.
Compiling in support for TIFF images.
Compiling in support for X-Face message headers.
Sound:
Compiling in support for sound (native).
Databases:
Compiling in support for Berkeley database.
Internationalization:
Compiling in support for Mule (multi-lingual Emacs).
Compiling in support for XIM (X11R5+ I18N input method).
- Using raw Xlib to provide XIM support.
Mail:
Compiling in support for POP mail retrieval.
Compiling in support for "dot-locking" mail spool file locking method.
Other Features:
Inhibiting IPv6 canonicalization at startup.
Compiling in support for dynamic shared object modules.
Using the new portable dumper.