Mercurial > emacs
comparison lisp/emacs-lisp/autoload.el @ 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 | 6aba36eda051 |
children | 35c457f8bedf |
comparison
equal
deleted
inserted
replaced
13729:de474a770e98 | 13730:87eb8f956a00 |
---|---|
1 ;;; autoload.el --- maintain autoloads in loaddefs.el. | 1 ;;; autoload.el --- maintain autoloads in loaddefs.el. |
2 | 2 |
3 ;;; Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. | 3 ;;; Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. |
4 ;;; | 4 ;;; |
5 ;; Author: Roland McGrath <roland@gnu.ai.mit.edu> | 5 ;; Author: Roland McGrath <roland@gnu.ai.mit.edu> |
6 ;; Keywords: maint | 6 ;; Keywords: maint |
7 | 7 |
8 ;;; This program is free software; you can redistribute it and/or modify | 8 ;;; This program is free software; you can redistribute it and/or modify |
148 | 148 |
149 (message "Generating autoloads for %s..." file) | 149 (message "Generating autoloads for %s..." file) |
150 (save-excursion | 150 (save-excursion |
151 (unwind-protect | 151 (unwind-protect |
152 (progn | 152 (progn |
153 (set-buffer (find-file-noselect file)) | 153 (if visited |
154 (set-buffer visited) | |
155 ;; It is faster to avoid visiting the file. | |
156 (set-buffer (get-buffer-create " *generate-autoload-file*")) | |
157 (kill-all-local-variables) | |
158 (erase-buffer) | |
159 (insert-file-contents file nil)) | |
154 (save-excursion | 160 (save-excursion |
155 (save-restriction | 161 (save-restriction |
156 (widen) | 162 (widen) |
157 (goto-char (point-min)) | 163 (goto-char (point-min)) |
158 (while (not (eobp)) | 164 (while (not (eobp)) |