diff options
Diffstat (limited to 'lisp/net/tramp.el')
-rw-r--r-- | lisp/net/tramp.el | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 20678ec8d1a..29361f8a113 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1960,11 +1960,10 @@ version, the function does nothing." "Return contents of BUFFER. If BUFFER is not a buffer or a buffer name, return the contents of `current-buffer'." - (or (let ((buf (or buffer (current-buffer)))) - (when (bufferp buf) - (with-current-buffer (or buffer (current-buffer)) - (substring-no-properties (buffer-string))))) - "")) + (with-current-buffer + (if (or (bufferp buffer) (and (stringp buffer) (get-buffer buffer))) + buffer (current-buffer)) + (substring-no-properties (buffer-string)))) (defun tramp-debug-buffer-name (vec) "A name for the debug buffer for VEC." |