diff options
| author | Stefan Monnier | 2021-01-03 17:25:06 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2021-01-03 17:25:06 -0500 |
| commit | 20ad0cc03b73f6576ece195bb16878415c313d45 (patch) | |
| tree | 165f3b0ee99677ce7f4557dc5be81e2c4955aaa7 /admin | |
| parent | c2e0f1982f886a9c269fed50a3fc904ca2e1655a (diff) | |
| download | emacs-20ad0cc03b73f6576ece195bb16878415c313d45.tar.gz emacs-20ad0cc03b73f6576ece195bb16878415c313d45.zip | |
* admin/last-chance.el (last-chance): Use `grep`s return value
(compilation-finish-functions): Only set it buffer-locally.
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/last-chance.el | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/admin/last-chance.el b/admin/last-chance.el index fd5b8e9bd7a..e8021129e30 100644 --- a/admin/last-chance.el +++ b/admin/last-chance.el | |||
| @@ -105,18 +105,14 @@ defaulting to the one at point." | |||
| 105 | "Symbol: " obarray | 105 | "Symbol: " obarray |
| 106 | nil nil | 106 | nil nil |
| 107 | one nil one))))) | 107 | one nil one))))) |
| 108 | (let ((default-directory (or (vc-root-dir) | 108 | (with-current-buffer |
| 109 | default-directory))) | 109 | (let ((default-directory (or (vc-root-dir) |
| 110 | (grep (format "%s %s" | 110 | default-directory))) |
| 111 | last-chance-grep-command | 111 | (grep (format "%s %s" |
| 112 | symbol))) | 112 | last-chance-grep-command |
| 113 | (setf (buffer-local-value 'last-chance-symbol | 113 | symbol))) |
| 114 | (process-buffer | 114 | (add-hook 'compilation-finish-functions #'last-chance-cleanup nil t) |
| 115 | (car compilation-in-progress))) | 115 | (setq-local last-chance-symbol symbol))) |
| 116 | symbol)) | ||
| 117 | |||
| 118 | (add-to-list 'compilation-finish-functions | ||
| 119 | 'last-chance-cleanup) | ||
| 120 | 116 | ||
| 121 | (provide 'last-chance) | 117 | (provide 'last-chance) |
| 122 | 118 | ||