emacs-devel
[Top][All Lists]
Advanced

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

Re: [patch] SQL enhancements


From: Michael Mauger
Subject: Re: [patch] SQL enhancements
Date: Tue, 20 Apr 2010 20:29:26 -0700 (PDT)

On Sun, April 18, 2010, Juri Linkov said: 

> And I forgot to mention one more problem with SQLi mode. 
>
> Maybe the name of the file to read/write the input history
> should be product-specific.  Because the default history file name
> for SQLite is ~/.sqlite_history, for MySQL is ~/.mysql_history, etc.
> It would be better to reuse the existing history files in SQLi mode.

Couldn't you do something like the following:

  (defun my-sqli-setup ()
    "Set the input ring file name based on the product name."
    (setq sql-input-ring-file-name 
          (concat user-emacs-directory "." (symbol-name sql-product) 
"_history")))
  (setq sql-interactive-mode-hook 'my-sqli-setup)

All of the product specific settings are applied before the hook is called; all 
of the 
global settings are set after the hook, so the hook can be used to set the 
globals 
in a product specific manner.

-- Michael





reply via email to

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