aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2018-04-18 01:22:49 +0200
committerLars Ingebrigtsen2018-04-18 01:22:49 +0200
commit2457d10ebfedbd24040e30e70cca90c6e523afe0 (patch)
tree54e77e8a5eb2ee8dfb26eb1374c638e42087cf4e
parent2e54ffebb8555d23f72c7b450b481f0335562b0d (diff)
downloademacs-2457d10ebfedbd24040e30e70cca90c6e523afe0.tar.gz
emacs-2457d10ebfedbd24040e30e70cca90c6e523afe0.zip
(sql-stop): Don't bug out if the SQL buffer is killed
* lisp/progmodes/sql.el (sql-stop): Don't bug out if the SQL buffer is killed (bug#30244).
-rw-r--r--lisp/progmodes/sql.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index f907a01d8cf..ebbef8d89ee 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -4031,15 +4031,16 @@ Writes the input history to a history file using
4031 4031
4032This function is a sentinel watching the SQL interpreter process. 4032This function is a sentinel watching the SQL interpreter process.
4033Sentinels will always get the two parameters PROCESS and EVENT." 4033Sentinels will always get the two parameters PROCESS and EVENT."
4034 (with-current-buffer (process-buffer process) 4034 (when (buffer-live-p (process-buffer process))
4035 (let 4035 (with-current-buffer (process-buffer process)
4036 ((comint-input-ring-separator sql-input-ring-separator) 4036 (let
4037 (comint-input-ring-file-name sql-input-ring-file-name)) 4037 ((comint-input-ring-separator sql-input-ring-separator)
4038 (comint-write-input-ring)) 4038 (comint-input-ring-file-name sql-input-ring-file-name))
4039 4039 (comint-write-input-ring))
4040 (if (not buffer-read-only) 4040
4041 (insert (format "\nProcess %s %s\n" process event)) 4041 (if (not buffer-read-only)
4042 (message "Process %s %s" process event)))) 4042 (insert (format "\nProcess %s %s\n" process event))
4043 (message "Process %s %s" process event)))))
4043 4044
4044 4045
4045 4046