Hi David,
Thanks for the quick patch. Could you check it in? Perhaps I
should update my version of Emacs too. ;)
Thanks
Eric
>>> David Ponce <david.ponce@...> seems to think that:
>Hi Eric,
>
> > I've posted beta1c for our beleaguered cedet release. I'm pretty
> > sure it has the latest XEmacs changes that David put in. I've
> > installed it at work, and it seems to run smoothly. Huzzah!
>
>Great! Thanks!
>
>[...]
> > Lastly, a build problem I encountered that David might want to
> > examine with the autoload generator:
> >
> > cd speedbar
> > rm speedbar-loaddefs.el
> > make
> > # Check how many times the rpm entry is there.
> > make
> > # Notice that rpm shows up twice.
>
>I reproduced the problem only with GNU Emacs 21.3.1, GNU Emacs
>21.3.50 and XEmacs 21.4.14 seems not affected.
>
> From what I have observed GNU Emacs 21.3.1 doesn't work well when it
>updates an empty autoload file (without a trailer at end of file).
>
>The following patch fixed the issue for me (tested with GNU Emacs
>21.3.1, 21.3.50 and XEmacs 21.4.14). Could you give it a try,
>please? If it works for you, I will check it in.
>
>David
>
>2003-11-12 David Ponce <david@...>
>
> * common/cedet-autogen.el:
>
> (cedet-autogen-kill-xemacs-autoloads-feature): Fix regexp.
> (cedet-autogen-ensure-default-file): New function.
> (cedet-update-autoloads): Use it.
>
>
>Index: cedet/common/cedet-autogen.el
>===================================================================
>RCS file: /cvsroot/cedet/cedet/common/cedet-autogen.el,v
>retrieving revision 1.3
>diff -c -r1.3 cedet-autogen.el
>*** cedet/common/cedet-autogen.el 6 Sep 2003 19:40:24 -0000 1.3
>--- cedet/common/cedet-autogen.el 12 Nov 2003 19:59:58 -0000
>***************
>*** 107,113 ****
> "Remove Xemacs autoloads feature from this buffer."
> (save-excursion
> (goto-char (point-min))
>! (while (re-search-forward "cedet-autoloads" nil t)
> (condition-case nil
> (while t (up-list -1))
> (error nil))
>--- 107,113 ----
> "Remove Xemacs autoloads feature from this buffer."
> (save-excursion
> (goto-char (point-min))
>! (while (re-search-forward "(\\(featurep\\|provide\\) '\\sw+-autoloads" nil t)
> (condition-case nil
> (while t (up-list -1))
> (error nil))
>***************
>*** 155,160 ****
>--- 155,186 ----
> (setq dirs (nconc dirs subdirs)))))
> dirs))
>
>+ (defun cedet-autogen-ensure-default-file (file)
>+ "Make sure that the autoload file FILE exists and if not create it."
>+ ;; If file don't exist, and is not automatically created...
>+ (unless (or (file-exists-p file)
>+ (fboundp 'autoload-ensure-default-file))
>+ ;; Create a file buffer.
>+ (find-file file)
>+ ;; Use Unix EOLs, so that the file is portable to all platforms.
>+ (setq buffer-file-coding-system 'raw-text-unix)
>+ (unless (featurep 'xemacs)
>+ ;; Insert a GNU Emacs loaddefs skeleton.
>+ (insert ";;; " (file-name-nondirectory file)
>+ " --- automatically extracted autoloads\n"
>+ ";;\n"
>+ ";;; Code:\n\n"
>+ "\n;; Local Variables:\n"
>+ ";; version-control: never\n"
>+ ";; no-byte-compile: t\n"
>+ ";; no-update-autoloads: t\n"
>+ ";; End:\n"
>+ ";;; " (file-name-nondirectory file)
>+ " ends here\n"))
>+ ;; Insert the header so that the buffer is not empty.
>+ (cedet-autogen-update-header))
>+ file)
>+
> ;;;###autoload
> (defun cedet-update-autoloads (loaddefs &optional directory &rest directories)
> "Update autoloads in file LOADDEFS from sources.
>***************
>*** 174,188 ****
> (write-contents-hooks '(cedet-autogen-update-header))
> (command-line-args-left (cons default-directory extra-dirs))
> )
>! ;; If file don't exist, and is not automatically created...
>! (unless (or (file-exists-p generated-autoload-file)
>! (fboundp 'autoload-ensure-default-file))
>! ;; Create a file buffer.
>! (find-file generated-autoload-file)
>! ;; Use Unix EOLs, so that the file is portable to all platforms.
>! (setq buffer-file-coding-system 'raw-text-unix)
>! ;; Insert the header so that the buffer is not empty.
>! (cedet-autogen-update-header))
> (batch-update-autoloads)))
>
> (defun cedet-batch-update-autoloads ()
>--- 200,206 ----
> (write-contents-hooks '(cedet-autogen-update-header))
> (command-line-args-left (cons default-directory extra-dirs))
> )
>! (cedet-autogen-ensure-default-file generated-autoload-file)
> (batch-update-autoloads)))
>
> (defun cedet-batch-update-autoloads ()
>
>
--
Eric Ludlam: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org
|