]> git.eshelyaron.com Git - emacs.git/commitdiff
Use generated-autoload-load-name for cus-load.el.
authorKevin Ryde <user42@zip.com.au>
Sat, 11 May 2013 23:52:27 +0000 (16:52 -0700)
committerGlenn Morris <rgm@gnu.org>
Sat, 11 May 2013 23:52:27 +0000 (16:52 -0700)
* lisp/cus-dep.el (custom-make-dependencies):
Use generated-autoload-load-name for the sake of files such
such cedet/semantic/bovine/c.el, where the base file name
is not in load-path.

Fixes: debbugs:5277
lisp/ChangeLog
lisp/cus-dep.el

index aa2e0f2a05594a3158839a4ad5b885e717f951da..3947bdcdf122dac1efc26dae0a3a1ed23b2b99fa 100644 (file)
@@ -1,3 +1,10 @@
+2013-05-11  Kevin Ryde  <user42@zip.com.au>
+
+       * cus-dep.el (custom-make-dependencies):
+       Use generated-autoload-load-name for the sake of files such
+       such cedet/semantic/bovine/c.el, where the base file name
+       is not in load-path.  (Bug#5277)
+
 2013-05-11  Glenn Morris  <rgm@gnu.org>
 
        * dos-vars.el, emacs-lisp/cl-indent.el, emulation/tpu-extras.el:
index 60b427344ea05df279513435f7b7de7688e63fb1..099998bf9892e7fd8fe3a6524207e834986ccd61 100644 (file)
@@ -36,7 +36,7 @@
 ldefs-boot\\|cus-load\\|finder-inf\\|esh-groups\\|subdirs\\)\\.el$\\)"
   "Regexp matching file names not to scan for `custom-make-dependencies'.")
 
-(autoload 'autoload-rubric "autoload")
+(require 'autoload)
 
 (defun custom-make-dependencies ()
   "Batch function to extract custom dependencies from .el files.
@@ -60,10 +60,13 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
                         (string-match preloaded file)
                         (not (file-exists-p file)))
               (erase-buffer)
+              (kill-all-local-variables)
               (insert-file-contents file)
+              (hack-local-variables)
               (goto-char (point-min))
               (string-match "\\`\\(.*\\)\\.el\\'" file)
-              (let ((name (file-name-nondirectory (match-string 1 file)))
+              (let ((name (or generated-autoload-load-name ; see bug#5277
+                              (file-name-nondirectory (match-string 1 file))))
                     (load-file-name file))
                 (if (save-excursion
                       (re-search-forward