Mercurial > emacs
changeset 13730:87eb8f956a00
(generate-file-autoloads): If no buffer visiting FILE exists, read it into
a temp buffer for processing without visiting it.
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Thu, 14 Dec 1995 05:08:02 +0000 |
parents | de474a770e98 |
children | f9bffca29486 |
files | lisp/emacs-lisp/autoload.el |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/emacs-lisp/autoload.el Wed Dec 13 21:43:08 1995 +0000 +++ b/lisp/emacs-lisp/autoload.el Thu Dec 14 05:08:02 1995 +0000 @@ -1,6 +1,6 @@ ;;; autoload.el --- maintain autoloads in loaddefs.el. -;;; Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. +;;; Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. ;;; ;; Author: Roland McGrath <roland@gnu.ai.mit.edu> ;; Keywords: maint @@ -150,7 +150,13 @@ (save-excursion (unwind-protect (progn - (set-buffer (find-file-noselect file)) + (if visited + (set-buffer visited) + ;; It is faster to avoid visiting the file. + (set-buffer (get-buffer-create " *generate-autoload-file*")) + (kill-all-local-variables) + (erase-buffer) + (insert-file-contents file nil)) (save-excursion (save-restriction (widen)