diff options
author | Glenn Morris <rgm@gnu.org> | 2014-11-04 21:08:12 -0800 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2014-11-04 21:08:12 -0800 |
commit | ddce73d32fa3e62e022842e3bbdc0aa83bb358cc (patch) | |
tree | 21dbcb8d40ff634b6f821de95af2b8e3deb0a8e3 /lisp/emacs-lisp/autoload.el | |
parent | 6a278b64f7356613c4a7709ed699655fa7415260 (diff) | |
download | emacs-ddce73d32fa3e62e022842e3bbdc0aa83bb358cc.tar.gz emacs-ddce73d32fa3e62e022842e3bbdc0aa83bb358cc.tar.bz2 emacs-ddce73d32fa3e62e022842e3bbdc0aa83bb358cc.zip |
Revert previous accidental commit
Diffstat (limited to 'lisp/emacs-lisp/autoload.el')
-rw-r--r-- | lisp/emacs-lisp/autoload.el | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index c3aaa905afd..38956df66de 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -812,40 +812,14 @@ write its autoloads into the specified file instead." (setq files (delete file files))))) ;; Elements remaining in FILES have no existing autoload sections yet. (dolist (file files) - (unless (member (expand-file-name file) autoload-excludes) - ;; Passing nil as second argument forces - ;; autoload-generate-file-autoloads to look for the right - ;; spot where to insert each autoloads section. - (let ((obuf - (autoload-generate-file-autoloads file nil buffer-file-name)) - ofile ofound oform opoint) - (when obuf - (push file no-autoloads) - ;; Did processing file update some other ofile? - (when (bufferp obuf) - (with-current-buffer obuf - (setq ofile (file-relative-name buffer-file-name))) - ;; Did we already scan ofile? - (and (member ofile done) - (not (member ofile no-autoloads)) - (save-excursion - (goto-char (point-min)) - (while - (and - (not ofound) - (search-forward - generate-autoload-section-header nil t)) - (setq opoint (point) - oform (autoload-read-section-header)) - (when (setq ofound - (string= ofile (nth 3 oform))) - (delete-region opoint (point)) - (autoload-insert-section-header - (current-buffer) - (nth 1 oform) - (nth 2 oform) - (nth 3 oform) - (nth 5 (file-attributes ofile)))))))))))) + (cond + ((member (expand-file-name file) autoload-excludes) nil) + ;; Passing nil as second argument forces + ;; autoload-generate-file-autoloads to look for the right + ;; spot where to insert each autoloads section. + ((autoload-generate-file-autoloads file nil buffer-file-name) + (push file no-autoloads)))) + (when no-autoloads ;; Sort them for better readability. (setq no-autoloads (sort no-autoloads 'string<)) |