From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Weiner Newsgroups: gmane.emacs.devel,gmane.emacs.bugs Subject: Please apply this patched function to package.el in Emacs 25. Date: Mon, 23 May 2016 19:11:07 -0400 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113cd4e2ec75d605338a8fa4 X-Trace: ger.gmane.org 1464045108 20921 80.91.229.3 (23 May 2016 23:11:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 May 2016 23:11:48 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, emacs-devel To: Tom Tromey , Daniel Hackney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 24 01:11:47 2016 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 1b4z0k-0007i3-Fg for ged-emacs-devel@m.gmane.org; Tue, 24 May 2016 01:11:46 +0200 Original-Received: from localhost ([::1]:50796 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4z0j-0005AL-F7 for ged-emacs-devel@m.gmane.org; Mon, 23 May 2016 19:11:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4z0c-0005AE-JK for emacs-devel@gnu.org; Mon, 23 May 2016 19:11:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4z0b-0004S9-Cs for emacs-devel@gnu.org; Mon, 23 May 2016 19:11:38 -0400 Original-Received: from mail-oi0-x22a.google.com ([2607:f8b0:4003:c06::22a]:34862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4z0b-0004S2-7A; Mon, 23 May 2016 19:11:37 -0400 Original-Received: by mail-oi0-x22a.google.com with SMTP id x19so218181oix.2; Mon, 23 May 2016 16:11:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:cc; bh=Jz8AU3g3kebtwRUWq7eNLLdp8WeQUZUojRxCGN4jjFM=; b=0P/kXoXuTPlMfwdM+CrWLRvzoMKqlabCOMlKso9WSvFmdSs4BnZQJE7MFNLpQIJGdh sp4xqpi0XSD+h9zScHhAxz2/14gQUmgUP6sX4DBKN9pNreGZtb5f9zfBk+b2+c4mgStQ DZmCnavQnPDuYcEOQfcSF0ov3CCiBKBmPN36yVDtOFc9Ak9tZytRxbl/tyCSmXIdiGw1 8VtSLCae1xgWJyvqFi/Wbp+uW8BXSbWjutksVLYRIb9ilHUJ96osq1z/aiLSkYLTFBZk t61bTy8PaJvGSsaq3wDM2TLq4jVNaDdMBjvARk2LwTzhe+hZaqWkpE2uUQyiBYeF+oSR 29ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=Jz8AU3g3kebtwRUWq7eNLLdp8WeQUZUojRxCGN4jjFM=; b=UBO/T8c03qTiXWKgl3FWbTSDB3LNswPPkM8WxF5mu85QMk+IPhD/7Yv30FtkDFwdyZ FQTGymJT3VSocSqGPzK6K5MhyYqZZmtoHGFfV+x5hw1qrh85Dj1kOn4dp1Mh8TopxBhm 5wQx/HA4VDpJwwW/7mfm76bs53kSVPbBhjNhZhoGV9ZlDhLeMoj5NwFDaFj4K35hcThP hEfDiBP8DTSd8CT5/cptLbZRT6Rp3pQvbGNkFHBgvHDlwXGqcLQWATXPFexxGu7Ag89H kJPaoCZAjzlSn7N6IxLYwE48in6jvvXU2NpscU60UrdFSGBE2OPeplA6g2izqvEgRyL9 hKMg== X-Gm-Message-State: ALyK8tJa81PG6o/n3G625kbc/QCYCBELzsqxObmNhiVSuJ0IfULLw4EW0C4zbaazlSeIND0iefKkhSHlZAtkwA== X-Received: by 10.157.10.20 with SMTP id 20mr830194otg.13.1464045096693; Mon, 23 May 2016 16:11:36 -0700 (PDT) Original-Received: by 10.202.205.17 with HTTP; Mon, 23 May 2016 16:11:07 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:203971 gmane.emacs.bugs:118602 Archived-At: --001a113cd4e2ec75d605338a8fa4 Content-Type: text/plain; charset=UTF-8 Replacing this function in package.el allows for correct generation of the -autoloads.el file for packages that have .el files in multiple subdirectories. The only thing changed is the line with 'apply' in it. It ignores symlinks to directories in case there are any. It is a simple change. I hope you like it. This is important for larger packages such as my forthcoming Hyperbole package which includes a 2nd directory of code. (defun package-generate-autoloads (name pkg-dir) (let* ((auto-name (format "%s-autoloads.el" name)) ;;(ignore-name (concat name "-pkg.el")) (generated-autoload-file (expand-file-name auto-name pkg-dir)) ;; Silence `autoload-generate-file-autoloads'. (noninteractive inhibit-message) (backup-inhibited t) (version-control 'never)) (package-autoload-ensure-default-file generated-autoload-file) (apply #'update-directory-autoloads pkg-dir (delq nil (mapcar (lambda (f) (and (file-directory-p f) (not (file-symlink-p f)) f)) (directory-files pkg-dir t "[a-zA-Z].*" nil)))) (let ((buf (find-buffer-visiting generated-autoload-file))) (when buf (kill-buffer buf))) auto-name)) --001a113cd4e2ec75d605338a8fa4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Replacing this function in package.el allows for corr= ect generation of the <package>-autoloads.el file for packages that h= ave .el files in multiple subdirectories.=C2=A0 The only thing changed is t= he line with 'apply' in it.=C2=A0 It ignores symlinks to directorie= s in case there are any.=C2=A0 It is a simple change.=C2=A0 I hope you like= it.

This is important for larger packages such as= my forthcoming Hyperbole package which includes a 2nd directory of code.


(defun package-generate-autoloads (n= ame pkg-dir)
=C2=A0 (let* ((auto-name (format "%s-autoloads.= el" name))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;;(ignore-name = (concat name "-pkg.el"))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(generated-autoload-file (expand-file-name auto-name pkg-dir))
<= div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Silence `autoload-generate-file-au= toloads'.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(noninteractive i= nhibit-message)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(backup-inhibit= ed t)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(version-control 'nev= er))
=C2=A0 =C2=A0 (package-autoload-ensure-default-file generate= d-autoload-file)
=C2=A0 =C2=A0 (apply #'update-directory-auto= loads pkg-dir
= =C2=A0 (delq nil (mapcar (lambda (f) (and (file-directory-p f)
<= span class=3D"" style=3D"white-space:pre"> =C2=A0 =C2=A0 =C2=A0= (not (file-symlink-p f)) f))
=C2=A0 =C2=A0 (directory-files pkg-dir t "[a-zA-Z].*= " nil))))
=C2=A0 =C2=A0 (let ((buf (find-buffer-visiting gen= erated-autoload-file)))
=C2=A0 =C2=A0 =C2=A0 (when buf (kill-buff= er buf)))
=C2=A0 =C2=A0 auto-name))
--001a113cd4e2ec75d605338a8fa4--