emacs-devel
[Top][All Lists]
Advanced

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

Re: "make autoloads" fails


From: Waiyian Chong
Subject: Re: "make autoloads" fails
Date: Sun, 30 Jun 2013 23:30:00 +0800
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> Here's the error message:
>
>   $ make autoloads
>   EMACSLOADPATH=/d/gnu/bzr/emacs/trunk/lisp LC_ALL=C 
> /d/gnu/bzr/emacs/trunk/src/emacs -batch --no-site-file --no-site-lisp -l 
> autoload \
>      --eval "(setq generate-autoload-cookie \";;;###cal-autoload\")" \
>      --eval "(setq generated-autoload-file (unmsys--file-name 
> \"/d/gnu/bzr/emacs/trunk/lisp/calendar/cal-loaddefs.el\"))" \
>      --eval "(setq make-backup-files nil)" \
>      -f batch-update-autoloads /d/gnu/bzr/emacs/trunk/lisp/calendar
>   Wrong type argument: number-or-marker-p, nil
...
>   Lisp Backtrace:
>   "select-safe-coding-system" (0x82e494)
>   "write-region" (0x82ed9c)
>   "autoload-ensure-default-file" (0x82ef6c)
>   "autoload-find-generated-file" (0x82f140)
>   "update-directory-autoloads" (0x82f3e0)
>   "apply" (0x82f3dc)
>   "batch-update-autoloads" (0x82f5f0)
>   "command-line-1" (0x82f7c8)
>   "command-line" (0x82f9cc)
>   "normal-top-level" (0x82fb50)

I encountered the same problem, and traced it back to the function
`autoload-ensure-default-file', which seems to call `write-region'
with wrong arguments.  Build succeeded after applying attached patch.


-- 
waiyian

diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 22713c6..d1722d0 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -354,7 +354,7 @@ not be relied upon."
 (defun autoload-ensure-default-file (file)
   "Make sure that the autoload file FILE exists and if not create it."
   (unless (file-exists-p file)
-    (write-region (autoload-rubric file) nil file))
+    (with-temp-file file (insert (autoload-rubric file))))
   file)
 
 (defun autoload-insert-section-header (outbuf autoloads load-name file time)

reply via email to

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