From: Michael Albinus Date: Fri, 7 Nov 2014 14:42:51 +0000 (+0100) Subject: * files.el (file-name-non-special): Wrap the call of X-Git-Tag: emacs-24.4.90~258 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fd161081309462a90cc7f00dab40057a2f7aa481;p=emacs.git * files.el (file-name-non-special): Wrap the call of `insert-file-contents' by `unwind-protect', in order to set the buffer's file name anyway. Fixes: debbugs:18891 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c134e589c30..7c7683a5f82 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-11-07 Michael Albinus + + * files.el (file-name-non-special): Wrap the call of + `insert-file-contents' by `unwind-protect', in order to set the + buffer's file name anyway. (Bug#18891) + 2014-11-07 Daiki Ueno * epg.el (epg--list-keys-1): Ignore fields after the 15th field diff --git a/lisp/files.el b/lisp/files.el index 5ed5f8a6e1e..edcb459e26d 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6664,7 +6664,7 @@ only these files will be asked to be saved." (`add (concat "/:" (apply operation arguments))) (`insert-file-contents (let ((visit (nth 1 arguments))) - (prog1 + (unwind-protect (apply operation arguments) (when (and visit buffer-file-name) (setq buffer-file-name (concat "/:" buffer-file-name))))))