From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Waiyian Chong Newsgroups: gmane.emacs.devel Subject: Re: "make autoloads" fails Date: Sun, 30 Jun 2013 23:30:00 +0800 Message-ID: <87k3lbobuv.fsf@gmail.com> References: <83vc4wda2i.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1372606814 3728 80.91.229.3 (30 Jun 2013 15:40:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 30 Jun 2013 15:40:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 30 17:40:14 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UtJjZ-0005em-Gq for ged-emacs-devel@m.gmane.org; Sun, 30 Jun 2013 17:40:13 +0200 Original-Received: from localhost ([::1]:46164 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtJjZ-0000T3-3K for ged-emacs-devel@m.gmane.org; Sun, 30 Jun 2013 11:40:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36666) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtJjT-0000Lc-99 for emacs-devel@gnu.org; Sun, 30 Jun 2013 11:40:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UtJjQ-0001IU-VG for emacs-devel@gnu.org; Sun, 30 Jun 2013 11:40:07 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:38343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtJjQ-0001F3-N8 for emacs-devel@gnu.org; Sun, 30 Jun 2013 11:40:04 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UtJjP-0005Xf-Mt for emacs-devel@gnu.org; Sun, 30 Jun 2013 17:40:03 +0200 Original-Received: from 175.144.26.231 ([175.144.26.231]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 30 Jun 2013 17:40:03 +0200 Original-Received: from waiyian.chong by 175.144.26.231 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 30 Jun 2013 17:40:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 56 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 175.144.26.231 User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:Go65QsBzXHIvGykwb7Bbmgdbhvk= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:161357 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=patch Content-Description: patch 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) --=-=-=--