From: Glenn Morris Date: Mon, 16 Apr 2012 19:04:27 +0000 (-0400) Subject: * cookie1.el (cookie-snarf): Explicit error if input file cannot be read. X-Git-Tag: emacs-24.2.90~471^2~352^2~23 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e3ad7552dbc58b73350c543dd4e44d33b22ea26a;p=emacs.git * cookie1.el (cookie-snarf): Explicit error if input file cannot be read. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 68225f1bec8..398d74b124f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-04-16 Glenn Morris + * play/cookie1.el (cookie-snarf): + Give an explicit error if input file cannot be read. + * play/yow.el (yow-file): Use expand-file-name rather than concat. * 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." "Reads in the PHRASE-FILE, returns it as a vector of strings. Emit STARTMSG and ENDMSG before and after. Caches the result; second and subsequent calls on the same file won't go to disk." + (or (file-readable-p phrase-file) + (error "Cannot read file `%s'" phrase-file)) (let ((sym (intern-soft phrase-file cookie-cache))) (and sym (not (equal (symbol-function sym) (nth 5 (file-attributes phrase-file))))