From 3b7d8dd3b3ee2b28ea5aa86e84f5a355698b29a8 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 26 Jun 2022 10:57:00 +0200 Subject: [PATCH] Fix narrowing problem in tramp-debug-buffer-command-completion-p * lisp/net/tramp.el (tramp-debug-buffer-command-completion-p): Respect narrowing. (Bug#56225) --- lisp/net/tramp.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index c6665c27924..9d5a02456ec 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1955,7 +1955,8 @@ The outline level is equal to the verbosity of the Tramp message." "A predicate for Tramp interactive commands. They are completed by \"M-x TAB\" only in Tramp debug buffers." (with-current-buffer buffer - (string-equal (buffer-substring 1 (min 10 (point-max))) ";; Emacs:"))) + (string-equal + (buffer-substring (point-min) (min 10 (point-max))) ";; Emacs:"))) (put #'tramp-debug-buffer-command-completion-p 'tramp-suppress-trace t) -- 2.39.5