diff options
| author | Carsten Dominik | 2005-02-01 12:39:39 +0000 |
|---|---|---|
| committer | Carsten Dominik | 2005-02-01 12:39:39 +0000 |
| commit | 489632ba4fd4e909e91897dde14d15fca0d0ff74 (patch) | |
| tree | c984eab73aa175a83eeebd96f097b4e9b08cb1be /lisp/textmodes | |
| parent | 2fdf44570f731eb29aa54da6ccb1a7fd884eb33f (diff) | |
| download | emacs-489632ba4fd4e909e91897dde14d15fca0d0ff74.tar.gz emacs-489632ba4fd4e909e91897dde14d15fca0d0ff74.zip | |
(reftex-access-scan-info): Error out in a
buffer not visiting a file.
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/reftex.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el index 318279b1377..49485c24725 100644 --- a/lisp/textmodes/reftex.el +++ b/lisp/textmodes/reftex.el | |||
| @@ -1228,6 +1228,11 @@ This enforces rescanning the buffer on next use." | |||
| 1228 | ;; But, when RESCAN is -1, don't rescan even if docstruct is empty. | 1228 | ;; But, when RESCAN is -1, don't rescan even if docstruct is empty. |
| 1229 | ;; When FILE is non-nil, parse only from that file. | 1229 | ;; When FILE is non-nil, parse only from that file. |
| 1230 | 1230 | ||
| 1231 | ;; Error out in a buffer without a file. | ||
| 1232 | (if (and reftex-mode | ||
| 1233 | (not (buffer-file-name))) | ||
| 1234 | (error "RefTeX works only in buffers visiting a file.")) | ||
| 1235 | |||
| 1231 | ;; Make sure we have the symbols tied | 1236 | ;; Make sure we have the symbols tied |
| 1232 | (if (eq reftex-docstruct-symbol nil) | 1237 | (if (eq reftex-docstruct-symbol nil) |
| 1233 | ;; Symbols are not yet tied: Tie them. | 1238 | ;; Symbols are not yet tied: Tie them. |