Function: tramp-get-debug-buffer

tramp-get-debug-buffer is a byte-compiled function defined in tramp.el.gz.

Signature

(tramp-get-debug-buffer VEC)

Documentation

Get the debug buffer for VEC.

Source Code

;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defun tramp-get-debug-buffer (vec)
  "Get the debug buffer for VEC."
  (with-current-buffer (get-buffer-create (tramp-debug-buffer-name vec))
    (when (bobp)
      (set-buffer-file-coding-system 'utf-8)
      (setq buffer-undo-list t)
      ;; Activate `outline-mode'.  This runs `text-mode-hook' and
      ;; `outline-mode-hook'.  We must prevent that local processes
      ;; die.  Yes: I've seen `flyspell-mode', which starts "ispell".
      ;; `(custom-declare-variable outline-minor-mode-prefix ...)'
      ;; raises on error in `(outline-mode)', we don't want to see it
      ;; in the traces.
      (let ((default-directory tramp-compat-temporary-file-directory))
	(outline-mode))
      (setq-local outline-level 'tramp-debug-outline-level)
      (setq-local font-lock-keywords
                  ;; FIXME: This `(t FOO . BAR)' representation in
                  ;; `font-lock-keywords' is supposed to be an
                  ;; internal implementation "detail".  Don't abuse it here!
                  `(t (eval ,tramp-debug-font-lock-keywords t)
                      ,(eval tramp-debug-font-lock-keywords t)))
      ;; Do not edit the debug buffer.
      (use-local-map special-mode-map))
    (current-buffer)))