From a6f81047a47737b3450081e324c33ef00e681d36 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Wed, 5 Feb 2014 16:15:55 +0100 Subject: [PATCH] org.el (org-file-contents): Return an empty string instead of the message * org.el (org-file-contents): Return an empty string instead of the message. --- lisp/org.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 12d3581d0..a28589c87 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5153,11 +5153,11 @@ Support for group tags is controlled by the option (defun org-file-contents (file &optional noerror) "Return the contents of FILE, as a string." - (if (or (not file) - (not (file-readable-p file))) - (if noerror - (message "Cannot read file \"%s\"" file) - (error "Cannot read file \"%s\"" file)) + (if (or (not file) (not (file-readable-p file))) + (if (not noerror) + (error "Cannot read file \"%s\"" file) + (message "Cannot read file \"%s\"" file) + "") (with-temp-buffer (insert-file-contents file) (buffer-string)))) -- 2.11.4.GIT