diff options
| author | Richard M. Stallman | 1998-02-02 01:12:18 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1998-02-02 01:12:18 +0000 |
| commit | 0b33ec466a843e68cbee19dd56a568bcdaf8637c (patch) | |
| tree | 999a3228560e5176a6c2dcbda390addf28b73086 | |
| parent | 7f45de2dfc7bbfc68fd850f5ed55273f151a501d (diff) | |
| download | emacs-0b33ec466a843e68cbee19dd56a568bcdaf8637c.tar.gz emacs-0b33ec466a843e68cbee19dd56a568bcdaf8637c.zip | |
(update-file-autoloads): Give clean errors
if autoloads file is empty or can't be written.
| -rw-r--r-- | lisp/emacs-lisp/autoload.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 9ae7188120a..1a85cd7c688 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el | |||
| @@ -314,6 +314,10 @@ are used." | |||
| 314 | (expand-file-name generated-autoload-file | 314 | (expand-file-name generated-autoload-file |
| 315 | (expand-file-name "lisp" | 315 | (expand-file-name "lisp" |
| 316 | source-directory))))) | 316 | source-directory))))) |
| 317 | (or (> (buffer-size) 0) | ||
| 318 | (error "Autoloads file %s does not exist" buffer-file-name)) | ||
| 319 | (or (file-writable-p buffer-file-name) | ||
| 320 | (error "Autoloads file %s is not writable" buffer-file-name)) | ||
| 317 | (save-excursion | 321 | (save-excursion |
| 318 | (save-restriction | 322 | (save-restriction |
| 319 | (widen) | 323 | (widen) |