diff --git a/Makefile.am b/Makefile.am index 0fd1afc0..149d1899 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,17 +1,18 @@ lispdir = $(datadir)/emacs/site-lisp sitestartdir = @SITESTART@ -lisp_DATA = magit.el magit.elc +lisp_DATA = magit.el magit.elc magit-svn.el magit-svn.elc magit-topgit.el magit-topgit.elc sitestart_DATA = 50magit.el info_TEXINFOS = magit.texi -CLEANFILES = magit.elc -EXTRA_DIST = magit.el 50magit.el magit.spec +CLEANFILES = magit-*.elc +EXTRA_DIST = magit.el 50magit.el magit.spec magit-svn.el magit-topgit.el %.elc: %.el @if [ $(builddir) != $(srcdir) ]; then ln $(srcdir)/$*.el .; fi - emacs --batch --eval '(byte-compile-file "$*.el")' + emacs --batch --eval "(add-to-list 'load-path \"$(srcdir)\")" \ + --eval '(byte-compile-file "$*.el")' @if [ $(builddir) != $(srcdir) ]; then rm -f $*.el; fi diff --git a/magit.el b/magit.el index efd9655c..e0217593 100644 --- a/magit.el +++ b/magit.el @@ -359,6 +359,10 @@ Many Magit faces inherit from this one by default." (make-variable-buffer-local 'magit-submode) (put 'magit-submode 'permanent-local t) +(eval-when-compile + (defun magit-dynamic-clauses-helper (clauses context) + `(((magit-dynamic-clauses ,clauses ,context) t)))) + (defun magit-use-region-p () (if (fboundp 'use-region-p) (use-region-p) @@ -1274,9 +1278,6 @@ TITLE is the displayed title of the section." `((magit-prefix-p ',prefix ,context) ,@body)))) -(defun magit-dynamic-clauses-helper (clauses context) - `(((magit-dynamic-clauses ,clauses ,context) t))) - (defun magit-dynamic-clauses (clauses context) (let* ((c (car clauses)) (prefix (reverse (car c)))