all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: Dan Nicolaescu <dann@ics.uci.edu>, 4446@emacsbugs.donarmstrong.com
Subject: bug#4446: remove ###autoload from ediff-hook.el
Date: Sat, 26 Sep 2009 15:18:25 -0400	[thread overview]
Message-ID: <av8wg1pla6.fsf@fencepost.gnu.org> (raw)
In-Reply-To: jwv1vluk932.fsf-monnier+emacsbugreports@gnu.org

Stefan Monnier wrote:

> Then you want the list that's in src/Makefile.in, since it includes the
> distinction between those files that are preloaded on all systems vs
> those that are system-dependent.

That's a good suggestion, thanks.

I found that setting preloaded-file-list in bootstrap-emacs does not
work anyway. At that stage files are being loaded uncompiled, so extra
files (eg cl) end up being added to preloaded-file-list due to
eval-when-compile.

Anyway, here's an attempt at your suggestion. The final version
probably should not print the "skipped" message.


Index: Makefile.in
===================================================================
RCS file: /sources/emacs/emacs/lisp/Makefile.in,v
retrieving revision 1.193
diff -c -c -w -r1.193 Makefile.in
*** Makefile.in	16 Sep 2009 03:10:17 -0000	1.193
--- Makefile.in	26 Sep 2009 19:16:12 -0000
***************
*** 131,143 ****
  
  # The chmod +w is to handle env var CVSREAD=1.  Files named
  # are identified by being the value of `generated-autoload-file'.
! autoloads: $(LOADDEFS) doit
  	chmod +w $(lisp)/ps-print.el $(lisp)/emulation/tpu-edt.el \
  	  $(lisp)/emacs-lisp/cl-loaddefs.el $(lisp)/mail/rmail.el \
  	  $(lisp)/dired.el $(lisp)/ibuffer.el
  	wd=$(lisp); $(setwins_almost); \
  	echo Directories: $$wins; \
! 	$(emacs) -l autoload --eval '(setq generated-autoload-file "$(lisp)/loaddefs.el")' -f batch-update-autoloads $$wins
  
  # This is required by the bootstrap-emacs target in ../src/Makefile, so
  # we know that if we have an emacs executable, we also have a subdirs.el.
--- 131,146 ----
  
  # The chmod +w is to handle env var CVSREAD=1.  Files named
  # are identified by being the value of `generated-autoload-file'.
! # The Makefile dependency is to make any missing-file error more explicit.
! autoloads: $(LOADDEFS) ../src/Makefile doit
  	chmod +w $(lisp)/ps-print.el $(lisp)/emulation/tpu-edt.el \
  	  $(lisp)/emacs-lisp/cl-loaddefs.el $(lisp)/mail/rmail.el \
  	  $(lisp)/dired.el $(lisp)/ibuffer.el
  	wd=$(lisp); $(setwins_almost); \
  	echo Directories: $$wins; \
! 	preload=`sed -n -e '/^lisp=/ s/$${lispsource}//g p' ../src/Makefile | \
! 	  sed 's/^lisp= //'`; \
! 	$(emacs) -l autoload --eval "(setq generated-autoload-file \"$(lisp)/loaddefs.el\" autoload-excludes \"$${preload}\")" -f batch-update-autoloads $$wins
  
  # This is required by the bootstrap-emacs target in ../src/Makefile, so
  # we know that if we have an emacs executable, we also have a subdirs.el.
Index: autoload.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/autoload.el,v
retrieving revision 1.143
diff -c -c -w -r1.143 autoload.el
*** autoload.el	5 Jan 2009 03:20:44 -0000	1.143
--- autoload.el	26 Sep 2009 19:16:22 -0000
***************
*** 58,63 ****
--- 58,66 ----
  read and an autoload made for it.  If there is further text on the line,
  that text will be copied verbatim to `generated-autoload-file'.")
  
+ (defvar autoload-excludes nil
+   "If non-nil, list of absolute file names not to scan for autoloads.")
+ 
  (defconst generate-autoload-section-header "\f\n;;;### "
    "String that marks the form at the start of a new file's autoload section.")
  
***************
*** 347,353 ****
            relfile
            ;; nil until we found a cookie.
            output-start)
! 
        (with-current-buffer (or visited
                                 ;; It is faster to avoid visiting the file.
                                 (autoload-find-file file))
--- 350,357 ----
            relfile
            ;; nil until we found a cookie.
            output-start)
!       (if (member absfile autoload-excludes)
!       	  (message "Generating autoloads for %s...skipped" file)
        (with-current-buffer (or visited
                                 ;; It is faster to avoid visiting the file.
                                 (autoload-find-file file))
***************
*** 452,458 ****
            (message "Generating autoloads for %s...done" file))
          (or visited
              ;; We created this buffer, so we should kill it.
!             (kill-buffer (current-buffer))))
        ;; If the entries were added to some other buffer, then the file
        ;; doesn't add entries to OUTFILE.
        (or (not output-start) otherbuf))))
--- 456,462 ----
            (message "Generating autoloads for %s...done" file))
          (or visited
              ;; We created this buffer, so we should kill it.
!             (kill-buffer (current-buffer)))))
        ;; If the entries were added to some other buffer, then the file
        ;; doesn't add entries to OUTFILE.
        (or (not output-start) otherbuf))))
***************
*** 649,654 ****
--- 653,670 ----
  (defun batch-update-autoloads ()
    "Update loaddefs.el autoloads in batch mode.
  Calls `update-directory-autoloads' on the command line arguments."
+   ;; For use during the Emacs build process only.  We do the file-name
+   ;; expansion here rather than in lisp/Makefile in order to keep the
+   ;; shell command line short.  (Long lines are an issue on some systems.)
+   (if (stringp autoload-excludes)
+       (setq autoload-excludes
+ 	    (mapcar
+ 	     (lambda (file)
+ 	       (concat
+ 		(expand-file-name (file-name-sans-extension file)
+ 				  (file-name-directory generated-autoload-file))
+ 		".el"))
+ 	     (split-string autoload-excludes))))
    (let ((args command-line-args-left))
      (setq command-line-args-left nil)
      (apply 'update-directory-autoloads args)))





  reply	other threads:[~2009-09-26 19:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <w7iqetxlhe.fsf@fencepost.gnu.org>
2009-09-16 11:18 ` bug#4446: remove ###autoload from ediff-hook.el Dan Nicolaescu
2009-09-16 11:32   ` Leo
2009-09-16 13:22   ` Stefan Monnier
2009-09-16 18:17     ` Dan Nicolaescu
2009-09-17  7:14   ` Glenn Morris
2009-09-17 18:11     ` Dan Nicolaescu
2009-09-17 21:01       ` Stefan Monnier
2009-09-24  3:28         ` Glenn Morris
2009-09-24 15:18           ` Stefan Monnier
2009-09-24 20:27             ` Glenn Morris
2009-09-24 22:12               ` Stefan Monnier
2009-09-25 18:16                 ` Dan Nicolaescu
2009-09-25 21:29                   ` Stefan Monnier
2009-09-26 19:18                     ` Glenn Morris [this message]
2009-09-29  3:09                       ` Stefan Monnier
2009-09-29  3:56                         ` Dan Nicolaescu
2009-09-29 21:19                           ` Stefan Monnier
2009-09-30  4:34                             ` Dan Nicolaescu
2009-10-06  3:20   ` bug#4446: marked as done (remove ###autoload from ediff-hook.el) Emacs bug Tracking System

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=av8wg1pla6.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=4446@emacsbugs.donarmstrong.com \
    --cc=dann@ics.uci.edu \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.