diff options
| author | Michael Albinus | 2023-06-25 14:31:23 +0200 |
|---|---|---|
| committer | Michael Albinus | 2023-06-25 14:31:23 +0200 |
| commit | fc7e7c3fde37d2038b75b2e8c27cfbbd616c85fb (patch) | |
| tree | 521064d932b01c3ce1c02b9499cc003c8b9a7489 | |
| parent | 2aa57fe6cf973c4e7c5134958a17a478a6feb4a9 (diff) | |
| download | emacs-fc7e7c3fde37d2038b75b2e8c27cfbbd616c85fb.tar.gz emacs-fc7e7c3fde37d2038b75b2e8c27cfbbd616c85fb.zip | |
Fix type check in tramp-get-buffer-string
* lisp/net/tramp.el (tramp-get-buffer-string): Check, that BUFFER
is really a bufferp.
| -rw-r--r-- | lisp/net/tramp.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index b46eeb8e374..20678ec8d1a 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1960,8 +1960,11 @@ version, the function does nothing." | |||
| 1960 | "Return contents of BUFFER. | 1960 | "Return contents of BUFFER. |
| 1961 | If BUFFER is not a buffer or a buffer name, return the contents | 1961 | If BUFFER is not a buffer or a buffer name, return the contents |
| 1962 | of `current-buffer'." | 1962 | of `current-buffer'." |
| 1963 | (with-current-buffer (or buffer (current-buffer)) | 1963 | (or (let ((buf (or buffer (current-buffer)))) |
| 1964 | (substring-no-properties (buffer-string)))) | 1964 | (when (bufferp buf) |
| 1965 | (with-current-buffer (or buffer (current-buffer)) | ||
| 1966 | (substring-no-properties (buffer-string))))) | ||
| 1967 | "")) | ||
| 1965 | 1968 | ||
| 1966 | (defun tramp-debug-buffer-name (vec) | 1969 | (defun tramp-debug-buffer-name (vec) |
| 1967 | "A name for the debug buffer for VEC." | 1970 | "A name for the debug buffer for VEC." |