emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r115184: * progmodes/octave.el (octave-kill-process)


From: Leo Liu
Subject: [Emacs-diffs] trunk r115184: * progmodes/octave.el (octave-kill-process): Don't ask twice
Date: Fri, 22 Nov 2013 09:51:35 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115184
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/10564
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Fri 2013-11-22 17:50:41 +0800
message:
  * progmodes/octave.el (octave-kill-process): Don't ask twice
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/octave.el       
octavemod.el-20091113204419-o5vbwnq5f7feedwu-1028
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-11-22 08:09:40 +0000
+++ b/lisp/ChangeLog    2013-11-22 09:50:41 +0000
@@ -5,6 +5,7 @@
        (octave-help-mode): Adapt to change to help-mode-finish to use
        derived-mode-p on 2013-09-17.
        (inferior-octave-prompt): Also match octave-gui.
+       (octave-kill-process): Don't ask twice.  (Bug#10564)
 
 2013-11-22  Leo Liu  <address@hidden>
 

=== modified file 'lisp/progmodes/octave.el'
--- a/lisp/progmodes/octave.el  2013-11-22 08:09:40 +0000
+++ b/lisp/progmodes/octave.el  2013-11-22 09:50:41 +0000
@@ -1445,12 +1445,14 @@
 (defun octave-kill-process ()
   "Kill inferior Octave process and its buffer."
   (interactive)
-  (or (yes-or-no-p "Kill the inferior Octave process and its buffer? ")
-      (user-error "Aborted"))
-  (when (inferior-octave-process-live-p)
-    (process-send-string inferior-octave-process "quit;\n")
-    (accept-process-output inferior-octave-process))
-  (when inferior-octave-buffer
+  (when (and (buffer-live-p (get-buffer inferior-octave-buffer))
+             (or (yes-or-no-p (format "Kill %S and its buffer? "
+                                      inferior-octave-process))
+                 (user-error "Aborted")))
+    (when (inferior-octave-process-live-p)
+      (set-process-query-on-exit-flag inferior-octave-process nil)
+      (process-send-string inferior-octave-process "quit;\n")
+      (accept-process-output inferior-octave-process))
     (kill-buffer inferior-octave-buffer)))
 
 (defun octave-show-process-buffer ()


reply via email to

[Prev in Thread] Current Thread [Next in Thread]