[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 dbac8076057 2/2: * lisp/net/tramp.el (tramp-get-buffer-string):
From: |
Michael Albinus |
Subject: |
emacs-29 dbac8076057 2/2: * lisp/net/tramp.el (tramp-get-buffer-string): Stabilize. |
Date: |
Sat, 8 Jul 2023 09:43:59 -0400 (EDT) |
branch: emacs-29
commit dbac807605732426e75f1886c2f340d1194013c9
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>
* lisp/net/tramp.el (tramp-get-buffer-string): Stabilize.
---
lisp/net/tramp.el | 9 ++++-----
1 file 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."