mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
Repair pdbtrack so it follows transition from one remote file to another.
* python.el (python-pdbtrack-set-tracked-buffer).
This commit is contained in:
parent
df6f610725
commit
89898fcd83
2 changed files with 15 additions and 4 deletions
|
|
@ -3635,12 +3635,18 @@ Never set this variable directly, use
|
|||
"Set the buffer for FILE-NAME as the tracked buffer.
|
||||
Internally it uses the `python-pdbtrack-tracked-buffer' variable.
|
||||
Returns the tracked buffer."
|
||||
(let ((file-buffer (get-file-buffer
|
||||
(concat (file-remote-p default-directory)
|
||||
file-name))))
|
||||
(let* ((file-name-prospect (concat (file-remote-p default-directory)
|
||||
file-name))
|
||||
(file-buffer (get-file-buffer file-name-prospect)))
|
||||
(if file-buffer
|
||||
(setq python-pdbtrack-tracked-buffer file-buffer)
|
||||
(setq file-buffer (find-file-noselect file-name))
|
||||
(cond
|
||||
((file-exists-p file-name-prospect)
|
||||
(setq file-buffer (find-file-noselect file-name-prospect)))
|
||||
((and (not (equal file-name file-name-prospect))
|
||||
(file-exists-p file-name))
|
||||
;; Fallback to a locally available copy of the file.
|
||||
(setq file-buffer (find-file-noselect file-name-prospect))))
|
||||
(when (not (member file-buffer python-pdbtrack-buffers-to-kill))
|
||||
(add-to-list 'python-pdbtrack-buffers-to-kill file-buffer)))
|
||||
file-buffer))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue