all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16814: `sql-interactive-mode' overwrites `comint' variables
@ 2014-02-19 20:05 Emilio C. Lopes
  2014-02-28  1:56 ` Glenn Morris
  0 siblings, 1 reply; 2+ messages in thread
From: Emilio C. Lopes @ 2014-02-19 20:05 UTC (permalink / raw)
  To: 16814

`sql-interactive-mode' sets the variables `comint-input-ring-separator'
and `comint-input-ring-file-name' without making them buffer-local.

When I use `sql-interactive-mode' and afterwards run
`(comint-read-input-ring)' in `shell-mode' I get an empty
`comint-input-ring'.

Here is a patch:

2012-10-09  Emilio C. Lopes  <eclig@gmx.net>

    * progmodes/sql.el (sql-interactive-mode): make variables `comint-input-ring-separator' and
          `comint-input-ring-file-name' buffer-local before setting.


diff --unified lisp/progmodes/sql.el.\~1\~ lisp/progmodes/sql.el
--- lisp/progmodes/sql.el.~1~    2014-02-19 14:31:34.000000000 +0100
+++ lisp/progmodes/sql.el    2014-02-19 14:45:36.000000000 +0100
@@ -3928,8 +3928,8 @@
   ;; People wanting a different history file for each
   ;; buffer/process/client/whatever can change separator and file-name
   ;; on the sql-interactive-mode-hook.
-  (setq comint-input-ring-separator sql-input-ring-separator
-    comint-input-ring-file-name sql-input-ring-file-name)
+  (setq-local comint-input-ring-separator sql-input-ring-separator)
+  (setq-local comint-input-ring-file-name sql-input-ring-file-name)
   ;; Calling the hook before calling comint-read-input-ring allows users
   ;; to set comint-input-ring-file-name in sql-interactive-mode-hook.
   (comint-read-input-ring t))

Diff finished.  Wed Feb 19 14:45:41 2014





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#16814: `sql-interactive-mode' overwrites `comint' variables
  2014-02-19 20:05 bug#16814: `sql-interactive-mode' overwrites `comint' variables Emilio C. Lopes
@ 2014-02-28  1:56 ` Glenn Morris
  0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2014-02-28  1:56 UTC (permalink / raw)
  To: 16814-done

Version: 24.4

Emilio C. Lopes wrote:

> `sql-interactive-mode' sets the variables `comint-input-ring-separator'
> and `comint-input-ring-file-name' without making them buffer-local.

You're right about comint-input-ring-separator, but sql-interactive-mode
first calls comint-mode, which makes comint-input-ring-file-name
buffer-local.

> Here is a patch:

Partially applied, thanks.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-28  1:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-19 20:05 bug#16814: `sql-interactive-mode' overwrites `comint' variables Emilio C. Lopes
2014-02-28  1:56 ` Glenn Morris

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.