Re: [PATCH] emacs: Compute build dependencies to fix byte compile issues

Subject: Re: [PATCH] emacs: Compute build dependencies to fix byte compile issues

Date: Sun, 19 May 2013 08:14:40 -0400

To: David Bremner

Cc: notmuch@notmuchmail.org

From: Austin Clements


Quoth David Bremner on May 19 at  8:15 am:
> Austin Clements <amdragon@MIT.EDU> writes:
> >
> > This patch addresses these problems by computing make dependency rules
> > from the (require 'x) forms in the Elisp source files, which we inject
> > into make's dependency database.
> 
> this seems to work as advertised.
> 
> > +;;
> > +;; Copyright © Austin Clements
> 
> I guess you need a copyright year?

Strangely, none of the Elisp files have copyright years.  But maybe
they should?

> > +	    ;; Is it a (require 'x) form?
> > +	    (when (and (listp form) (= (length form) 2)
> > +		       (eq (car form) 'require)
> > +		       (listp (cadr form)) (= (length (cadr form)) 2)
> > +		       (eq (car (cadr form)) 'quote)
> > +		       (symbolp (cadr (cadr form))))
> 
> This might be a corner case, but formally can't the argument to require
> be a variable or even a function call? Maybe this never happens in
> practice.

That is technically true (really, it can be an arbitrary expression),
but I don't have an environment in which to evaluate that expression,
so I opted for only supporting the obvious static case, which also
happens to be the only case that matters for the notmuch code.

Thread: