all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emilio C. Lopes <eclig@gmx.net>
To: 16814@debbugs.gnu.org
Subject: bug#16814: `sql-interactive-mode' overwrites `comint' variables
Date: Wed, 19 Feb 2014 21:05:45 +0100	[thread overview]
Message-ID: <87lhx6amw6.fsf@gmx.net> (raw)

`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





             reply	other threads:[~2014-02-19 20:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19 20:05 Emilio C. Lopes [this message]
2014-02-28  1:56 ` bug#16814: `sql-interactive-mode' overwrites `comint' variables Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lhx6amw6.fsf@gmx.net \
    --to=eclig@gmx.net \
    --cc=16814@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.