* lisp/net/tramp.el (tramp-get-buffer-string): Stabilize.

This commit is contained in:
Michael Albinus 2023-07-08 15:43:41 +02:00
parent a82486e5a4
commit dbac807605

View file

@ -1960,11 +1960,10 @@ version, the function does nothing."
"Return contents of BUFFER. "Return contents of BUFFER.
If BUFFER is not a buffer or a buffer name, return the contents If BUFFER is not a buffer or a buffer name, return the contents
of `current-buffer'." of `current-buffer'."
(or (let ((buf (or buffer (current-buffer)))) (with-current-buffer
(when (bufferp buf) (if (or (bufferp buffer) (and (stringp buffer) (get-buffer buffer)))
(with-current-buffer (or buffer (current-buffer)) buffer (current-buffer))
(substring-no-properties (buffer-string))))) (substring-no-properties (buffer-string))))
""))
(defun tramp-debug-buffer-name (vec) (defun tramp-debug-buffer-name (vec)
"A name for the debug buffer for VEC." "A name for the debug buffer for VEC."