diff options
| author | Glenn Morris | 2012-04-16 15:04:27 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-04-16 15:04:27 -0400 |
| commit | e3ad7552dbc58b73350c543dd4e44d33b22ea26a (patch) | |
| tree | 505e509cf27965e5ee31cab4409de94f1870d566 | |
| parent | 68892d275b8dff830ba48e271d8dc71ba84b2b14 (diff) | |
| download | emacs-e3ad7552dbc58b73350c543dd4e44d33b22ea26a.tar.gz emacs-e3ad7552dbc58b73350c543dd4e44d33b22ea26a.zip | |
* cookie1.el (cookie-snarf): Explicit error if input file cannot be read.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/play/cookie1.el | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 68225f1bec8..398d74b124f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-04-16 Glenn Morris <rgm@gnu.org> | 1 | 2012-04-16 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * play/cookie1.el (cookie-snarf): | ||
| 4 | Give an explicit error if input file cannot be read. | ||
| 5 | |||
| 3 | * play/yow.el (yow-file): Use expand-file-name rather than concat. | 6 | * play/yow.el (yow-file): Use expand-file-name rather than concat. |
| 4 | 7 | ||
| 5 | * progmodes/perl-mode.el (c-macro-expand): | 8 | * progmodes/perl-mode.el (c-macro-expand): |
diff --git a/lisp/play/cookie1.el b/lisp/play/cookie1.el index 06bd962d925..cbf29a26a71 100644 --- a/lisp/play/cookie1.el +++ b/lisp/play/cookie1.el | |||
| @@ -96,6 +96,8 @@ of load, ENDMSG at the end." | |||
| 96 | "Reads in the PHRASE-FILE, returns it as a vector of strings. | 96 | "Reads in the PHRASE-FILE, returns it as a vector of strings. |
| 97 | Emit STARTMSG and ENDMSG before and after. Caches the result; second | 97 | Emit STARTMSG and ENDMSG before and after. Caches the result; second |
| 98 | and subsequent calls on the same file won't go to disk." | 98 | and subsequent calls on the same file won't go to disk." |
| 99 | (or (file-readable-p phrase-file) | ||
| 100 | (error "Cannot read file `%s'" phrase-file)) | ||
| 99 | (let ((sym (intern-soft phrase-file cookie-cache))) | 101 | (let ((sym (intern-soft phrase-file cookie-cache))) |
| 100 | (and sym (not (equal (symbol-function sym) | 102 | (and sym (not (equal (symbol-function sym) |
| 101 | (nth 5 (file-attributes phrase-file)))) | 103 | (nth 5 (file-attributes phrase-file)))) |