[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Improve message when file to include is missing
From: |
Nicolas Goaziou |
Subject: |
Re: [O] [PATCH] Improve message when file to include is missing |
Date: |
Tue, 18 Feb 2014 21:21:54 +0100 |
Hello,
"Sebastien Vauban" <sva-news-D0wtAvR13HarG/address@hidden>
writes:
> This should answer your (fruitful) comments.
Thank you for the update.
It looks good. AFAIC, you can push it.
> + (if (or (not file) (not (file-readable-p file)))
> + (if (not noerror)
> + (error "Cannot read file \"%s\"%s" file info-from-file)
> + (message "Cannot read file \"%s\"%s" file info-from-file))
> + (with-temp-buffer
> + (insert-file-contents file)
> + (buffer-string)))))
Minor stylistic issue: I find the following a bit easier to understand.
(if (and file (file-readable-p file))
(with-temp-buffer
(insert-file-contents file)
(buffer-string))
(funcall (if noerror #'message #'error)
"Cannot read file \"%s\"%s" file info-from-file))
Regards,
--
Nicolas Goaziou