diff options
| author | Juri Linkov | 2019-01-28 22:27:22 +0200 |
|---|---|---|
| committer | Juri Linkov | 2019-01-28 22:27:22 +0200 |
| commit | 0f94d422f16cc989f49ea5c7fc87c947c5f42ced (patch) | |
| tree | 45c87d6c9b748a8b9e4f65a46e5c5c170625f55f | |
| parent | 599eee3ebefa4e1c7c6610e5629090ad7ad5159b (diff) | |
| download | emacs-0f94d422f16cc989f49ea5c7fc87c947c5f42ced.tar.gz emacs-0f94d422f16cc989f49ea5c7fc87c947c5f42ced.zip | |
More checks for live buffers.
* lisp/dired-x.el (dired-jump): Check if archive/tar superior buffer
was killed by the user.
* lisp/progmodes/ruby-mode.el (ruby-flymake--helper): Check if source buffer
was killed by the user immediately after visiting and before process finishes.
| -rw-r--r-- | lisp/dired-x.el | 6 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 44e73759fa7..defc541ddc9 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el | |||
| @@ -463,9 +463,11 @@ Interactively with prefix argument, read FILE-NAME." | |||
| 463 | (list nil (and current-prefix-arg | 463 | (list nil (and current-prefix-arg |
| 464 | (read-file-name "Jump to Dired file: ")))) | 464 | (read-file-name "Jump to Dired file: ")))) |
| 465 | (cond | 465 | (cond |
| 466 | ((bound-and-true-p archive-subfile-mode) | 466 | ((and (bound-and-true-p archive-subfile-mode) |
| 467 | (buffer-live-p archive-superior-buffer)) | ||
| 467 | (switch-to-buffer archive-superior-buffer)) | 468 | (switch-to-buffer archive-superior-buffer)) |
| 468 | ((bound-and-true-p tar-subfile-mode) | 469 | ((and (bound-and-true-p tar-subfile-mode) |
| 470 | (buffer-live-p tar-superior-buffer)) | ||
| 469 | (switch-to-buffer tar-superior-buffer)) | 471 | (switch-to-buffer tar-superior-buffer)) |
| 470 | (t | 472 | (t |
| 471 | ;; Expand file-name before `dired-goto-file' call: | 473 | ;; Expand file-name before `dired-goto-file' call: |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 8aa583eb319..e83778af946 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -2288,7 +2288,7 @@ It will be properly highlighted even when the call omits parens.") | |||
| 2288 | :command command | 2288 | :command command |
| 2289 | :sentinel | 2289 | :sentinel |
| 2290 | (lambda (proc _event) | 2290 | (lambda (proc _event) |
| 2291 | (when (eq 'exit (process-status proc)) | 2291 | (when (and (eq 'exit (process-status proc)) (buffer-live-p source)) |
| 2292 | (unwind-protect | 2292 | (unwind-protect |
| 2293 | (if (with-current-buffer source (eq proc ruby--flymake-proc)) | 2293 | (if (with-current-buffer source (eq proc ruby--flymake-proc)) |
| 2294 | (with-current-buffer (process-buffer proc) | 2294 | (with-current-buffer (process-buffer proc) |