diff options
| -rw-r--r-- | lisp/ChangeLog.17 | 5 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 14 |
2 files changed, 15 insertions, 4 deletions
diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17 index a40f8f3d67a..224e2a6da7f 100644 --- a/lisp/ChangeLog.17 +++ b/lisp/ChangeLog.17 | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2015-09-20 Ken Manheimer <ken.manheimer@gmail.com> | ||
| 2 | |||
| 3 | * python.el (python-pdbtrack-set-tracked-buffer): Repair pdbtrack | ||
| 4 | so it follows transition from one remote file to another. | ||
| 5 | |||
| 1 | 2015-04-06 Alan Mackenzie <acm@muc.de> | 6 | 2015-04-06 Alan Mackenzie <acm@muc.de> |
| 2 | 7 | ||
| 3 | Fix miscellaneous glitches in cc-mode.el. (Bug#20245) | 8 | Fix miscellaneous glitches in cc-mode.el. (Bug#20245) |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 9528ffeebbc..243125e310c 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -3635,12 +3635,18 @@ Never set this variable directly, use | |||
| 3635 | "Set the buffer for FILE-NAME as the tracked buffer. | 3635 | "Set the buffer for FILE-NAME as the tracked buffer. |
| 3636 | Internally it uses the `python-pdbtrack-tracked-buffer' variable. | 3636 | Internally it uses the `python-pdbtrack-tracked-buffer' variable. |
| 3637 | Returns the tracked buffer." | 3637 | Returns the tracked buffer." |
| 3638 | (let ((file-buffer (get-file-buffer | 3638 | (let* ((file-name-prospect (concat (file-remote-p default-directory) |
| 3639 | (concat (file-remote-p default-directory) | 3639 | file-name)) |
| 3640 | file-name)))) | 3640 | (file-buffer (get-file-buffer file-name-prospect))) |
| 3641 | (if file-buffer | 3641 | (if file-buffer |
| 3642 | (setq python-pdbtrack-tracked-buffer file-buffer) | 3642 | (setq python-pdbtrack-tracked-buffer file-buffer) |
| 3643 | (setq file-buffer (find-file-noselect file-name)) | 3643 | (cond |
| 3644 | ((file-exists-p file-name-prospect) | ||
| 3645 | (setq file-buffer (find-file-noselect file-name-prospect))) | ||
| 3646 | ((and (not (equal file-name file-name-prospect)) | ||
| 3647 | (file-exists-p file-name)) | ||
| 3648 | ;; Fallback to a locally available copy of the file. | ||
| 3649 | (setq file-buffer (find-file-noselect file-name-prospect)))) | ||
| 3644 | (when (not (member file-buffer python-pdbtrack-buffers-to-kill)) | 3650 | (when (not (member file-buffer python-pdbtrack-buffers-to-kill)) |
| 3645 | (add-to-list 'python-pdbtrack-buffers-to-kill file-buffer))) | 3651 | (add-to-list 'python-pdbtrack-buffers-to-kill file-buffer))) |
| 3646 | file-buffer)) | 3652 | file-buffer)) |