2001-11-01 12:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Thu, 1 Nov 2001 17:59:34 +0000 (17:59 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Thu, 1 Nov 2001 17:59:34 +0000 (17:59 +0000)
* dgnushack.el (dgnushack-make-load): A workaround for
custom-add-loads bug in some versions of XEmacs.

lisp/ChangeLog
lisp/dgnushack.el

index ab79e6e..e879eb7 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-01 12:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * dgnushack.el (dgnushack-make-load): A workaround for
+       custom-add-loads bug in some versions of XEmacs.
+
 2001-11-01 10:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * mm-util.el (mm-charset-synonym-alist): Revert (some).
index 212921c..3b1305b 100644 (file)
@@ -357,7 +357,19 @@ Modify to suit your needs."))
 ;;; no-byte-compile: t
 ;;; no-update-autoloads: t
 ;;; End:
-;;; gnus-load.el ends here\n"))
+;;; gnus-load.el ends here
+")
+    ;; Workaround the bug in some version of XEmacs.
+    (when (featurep 'xemacs)
+      (condition-case nil
+         (require 'cus-load)
+       (error nil))
+      (goto-char (point-min))
+      (when (and (fboundp 'custom-add-loads)
+                (not (search-forward "\n(autoload 'custom-add-loads " nil t)))
+       (search-forward "\n;;; Code:" nil t)
+       (forward-line 1)
+       (insert "\n(autoload 'custom-add-loads \"cus-load\")\n"))))
   (message (format "Compiling %s..." dgnushack-gnus-load-file))
   (byte-compile-file dgnushack-gnus-load-file))