diff options
| author | Leo Liu | 2013-11-22 17:50:41 +0800 |
|---|---|---|
| committer | Leo Liu | 2013-11-22 17:50:41 +0800 |
| commit | 2cc18f93820ae22c59a038c556d3e5d8f89482cc (patch) | |
| tree | fec19dacd186066b97377f7cfb79dc1b054a7c4d | |
| parent | 8c09f64b76ed0be6ad41fe0c58406add0ebf361b (diff) | |
| download | emacs-2cc18f93820ae22c59a038c556d3e5d8f89482cc.tar.gz emacs-2cc18f93820ae22c59a038c556d3e5d8f89482cc.zip | |
* progmodes/octave.el (octave-kill-process): Don't ask twice
Fixes: debbugs:10564
| -rw-r--r-- | lisp/ChangeLog | 1 | ||||
| -rw-r--r-- | lisp/progmodes/octave.el | 14 |
2 files changed, 9 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d865af7cda1..51cd2e898d1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | (octave-help-mode): Adapt to change to help-mode-finish to use | 5 | (octave-help-mode): Adapt to change to help-mode-finish to use |
| 6 | derived-mode-p on 2013-09-17. | 6 | derived-mode-p on 2013-09-17. |
| 7 | (inferior-octave-prompt): Also match octave-gui. | 7 | (inferior-octave-prompt): Also match octave-gui. |
| 8 | (octave-kill-process): Don't ask twice. (Bug#10564) | ||
| 8 | 9 | ||
| 9 | 2013-11-22 Leo Liu <sdl.web@gmail.com> | 10 | 2013-11-22 Leo Liu <sdl.web@gmail.com> |
| 10 | 11 | ||
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 49b5a2970d7..475f4d8d316 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el | |||
| @@ -1445,12 +1445,14 @@ entered without parens)." | |||
| 1445 | (defun octave-kill-process () | 1445 | (defun octave-kill-process () |
| 1446 | "Kill inferior Octave process and its buffer." | 1446 | "Kill inferior Octave process and its buffer." |
| 1447 | (interactive) | 1447 | (interactive) |
| 1448 | (or (yes-or-no-p "Kill the inferior Octave process and its buffer? ") | 1448 | (when (and (buffer-live-p (get-buffer inferior-octave-buffer)) |
| 1449 | (user-error "Aborted")) | 1449 | (or (yes-or-no-p (format "Kill %S and its buffer? " |
| 1450 | (when (inferior-octave-process-live-p) | 1450 | inferior-octave-process)) |
| 1451 | (process-send-string inferior-octave-process "quit;\n") | 1451 | (user-error "Aborted"))) |
| 1452 | (accept-process-output inferior-octave-process)) | 1452 | (when (inferior-octave-process-live-p) |
| 1453 | (when inferior-octave-buffer | 1453 | (set-process-query-on-exit-flag inferior-octave-process nil) |
| 1454 | (process-send-string inferior-octave-process "quit;\n") | ||
| 1455 | (accept-process-output inferior-octave-process)) | ||
| 1454 | (kill-buffer inferior-octave-buffer))) | 1456 | (kill-buffer inferior-octave-buffer))) |
| 1455 | 1457 | ||
| 1456 | (defun octave-show-process-buffer () | 1458 | (defun octave-show-process-buffer () |