Commit 13c366c9 authored by Michael Albinus's avatar Michael Albinus
Browse files

* net/tramp-cmds.el (top): Don't declare `buffer-name'.

(tramp-append-tramp-buffers): Rewrite buffer local variables part.
parent 32c8eae2
2013-08-16 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-cmds.el (top): Don't declare `buffer-name'.
(tramp-append-tramp-buffers): Rewrite buffer local variables part.
2013-08-16 Martin Rudalics <rudalics@gmx.at> 2013-08-16 Martin Rudalics <rudalics@gmx.at>
* window.el (mouse-autoselect-window-select): Do autoselect when * window.el (mouse-autoselect-window-select): Do autoselect when
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
;; Pacify byte-compiler. ;; Pacify byte-compiler.
(eval-when-compile (eval-when-compile
(defvar buffer-name)
(defvar reporter-eval-buffer) (defvar reporter-eval-buffer)
(defvar reporter-prompt-for-summary-p)) (defvar reporter-prompt-for-summary-p))
...@@ -272,6 +271,7 @@ buffer in your bug report. ...@@ -272,6 +271,7 @@ buffer in your bug report.
(goto-char (point-max)) (goto-char (point-max))
;; Dump buffer local variables. ;; Dump buffer local variables.
(insert "\nlocal variables:\n================")
(dolist (buffer (dolist (buffer
(delq nil (delq nil
(mapcar (mapcar
...@@ -279,21 +279,23 @@ buffer in your bug report. ...@@ -279,21 +279,23 @@ buffer in your bug report.
(when (string-match "\\*tramp/" (buffer-name b)) b)) (when (string-match "\\*tramp/" (buffer-name b)) b))
(buffer-list)))) (buffer-list))))
(let ((reporter-eval-buffer buffer) (let ((reporter-eval-buffer buffer)
(buffer-name (buffer-name buffer))
(elbuf (get-buffer-create " *tmp-reporter-buffer*"))) (elbuf (get-buffer-create " *tmp-reporter-buffer*")))
(with-current-buffer elbuf (with-current-buffer elbuf
(emacs-lisp-mode) (emacs-lisp-mode)
(erase-buffer) (erase-buffer)
(insert "\n(setq\n") (insert (format "\n;; %s\n(setq-local\n" (buffer-name buffer)))
(lisp-indent-line) (lisp-indent-line)
(tramp-compat-funcall (dolist
'reporter-dump-variable 'buffer-name (current-buffer)) (varsym
(dolist (varsym-or-cons-cell (buffer-local-variables buffer)) (sort
(let ((varsym (or (car-safe varsym-or-cons-cell) (append
varsym-or-cons-cell))) (mapcar
(when (string-match "tramp" (symbol-name varsym)) 'intern
(tramp-compat-funcall (all-completions "tramp-" (buffer-local-variables buffer)))
'reporter-dump-variable varsym (current-buffer))))) ;; Non-tramp variables of interest.
'(default-directory))
'string<))
(tramp-compat-funcall 'reporter-dump-variable varsym elbuf))
(lisp-indent-line) (lisp-indent-line)
(insert ")\n")) (insert ")\n"))
(insert-buffer-substring elbuf))) (insert-buffer-substring elbuf)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment