diff options
| author | Michael R. Mauger | 2014-11-01 18:14:01 -0400 |
|---|---|---|
| committer | Michael R. Mauger | 2014-11-01 18:14:01 -0400 |
| commit | fcc5b488b91b8b809ed270d31d172ec18ba7fd89 (patch) | |
| tree | eaab4f4e3c6c6dbef0b9f708580ed7c26e470b53 | |
| parent | bf7ded963c672f858c3b4c14d2cd8278b0d781c4 (diff) | |
| download | emacs-fcc5b488b91b8b809ed270d31d172ec18ba7fd89.tar.gz emacs-fcc5b488b91b8b809ed270d31d172ec18ba7fd89.zip | |
* sql.el (sql-interactive-mode, sql-stop): Correct fix for
Bug#16814 with let-bind of comint-input-ring variables around read
and save functions.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/progmodes/sql.el | 23 |
2 files changed, 19 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fc7e7392551..1195eb12757 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2014-11-01 Michael R. Mauger <michael@mauger.com> | ||
| 2 | |||
| 3 | * sql.el (sql-interactive-mode, sql-stop): Correct fix for | ||
| 4 | Bug#16814 with let-bind of comint-input-ring variables around read | ||
| 5 | and save functions. | ||
| 6 | |||
| 1 | 2014-11-01 Michael Albinus <michael.albinus@gmx.de> | 7 | 2014-11-01 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 8 | ||
| 3 | * net/tramp-cache.el (tramp-get-file-property) | 9 | * net/tramp-cache.el (tramp-get-file-property) |
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index af7cb0dc2f5..04dc22ffdac 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -3959,11 +3959,10 @@ you entered, right above the output it created. | |||
| 3959 | ;; People wanting a different history file for each | 3959 | ;; People wanting a different history file for each |
| 3960 | ;; buffer/process/client/whatever can change separator and file-name | 3960 | ;; buffer/process/client/whatever can change separator and file-name |
| 3961 | ;; on the sql-interactive-mode-hook. | 3961 | ;; on the sql-interactive-mode-hook. |
| 3962 | (setq-local comint-input-ring-separator sql-input-ring-separator) | 3962 | (let |
| 3963 | (setq comint-input-ring-file-name sql-input-ring-file-name) | 3963 | ((comint-input-ring-separator sql-input-ring-separator) |
| 3964 | ;; Calling the hook before calling comint-read-input-ring allows users | 3964 | (comint-input-ring-file-name sql-input-ring-file-name)) |
| 3965 | ;; to set comint-input-ring-file-name in sql-interactive-mode-hook. | 3965 | (comint-read-input-ring t))) |
| 3966 | (comint-read-input-ring t)) | ||
| 3967 | 3966 | ||
| 3968 | (defun sql-stop (process event) | 3967 | (defun sql-stop (process event) |
| 3969 | "Called when the SQL process is stopped. | 3968 | "Called when the SQL process is stopped. |
| @@ -3973,11 +3972,15 @@ Writes the input history to a history file using | |||
| 3973 | 3972 | ||
| 3974 | This function is a sentinel watching the SQL interpreter process. | 3973 | This function is a sentinel watching the SQL interpreter process. |
| 3975 | Sentinels will always get the two parameters PROCESS and EVENT." | 3974 | Sentinels will always get the two parameters PROCESS and EVENT." |
| 3976 | (comint-write-input-ring) | 3975 | (with-current-buffer (process-buffer process) |
| 3977 | (if (and (eq (current-buffer) sql-buffer) | 3976 | (let |
| 3978 | (not buffer-read-only)) | 3977 | ((comint-input-ring-separator sql-input-ring-separator) |
| 3979 | (insert (format "\nProcess %s %s\n" process event)) | 3978 | (comint-input-ring-file-name sql-input-ring-file-name)) |
| 3980 | (message "Process %s %s" process event))) | 3979 | (comint-write-input-ring)) |
| 3980 | |||
| 3981 | (if (not buffer-read-only) | ||
| 3982 | (insert (format "\nProcess %s %s\n" process event)) | ||
| 3983 | (message "Process %s %s" process event)))) | ||
| 3981 | 3984 | ||
| 3982 | 3985 | ||
| 3983 | 3986 | ||