]> git.eshelyaron.com Git - emacs.git/commitdiff
(sql-default-directory): New user option.
authorSam Steingold <sds@gnu.org>
Mon, 8 Sep 2014 12:38:53 +0000 (08:38 -0400)
committerSam Steingold <sds@gnu.org>
Mon, 8 Sep 2014 12:38:53 +0000 (08:38 -0400)
* lisp/progmodes/sql.el (sql-default-directory): New user option.
(sql-product-interactive): Bind `default-directory' to it to
enable remote connections using Tramp.

etc/NEWS
lisp/ChangeLog
lisp/progmodes/sql.el

index 796d093568373baa6e52cd96a7735602ad3c8a2a..75cf583a864c22a3995180339929df0e99de0694 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -146,6 +146,15 @@ protocols as well as for "telnet" and "ftp" are passed to Tramp.
 
 *** New connection method "nc", which allows to access dumb busyboxes.
 
+** SQL mode
+
+*** New user variable `sql-default-directory' enables remote
+connections using Tramp.
+
+*** New command `sql-send-line-and-next' sends the current line to the
+interactive buffer and advances to the next line, skipping whitespace
+and comments.
+
 ** VC and related modes
 
 *** New option `vc-annotate-background-mode' controls whether
@@ -209,7 +218,7 @@ position list returned for such events is now nil.
 * Lisp Changes in Emacs 24.5
 
 *** call-process-shell-command and process-file-shell-command
-don't take "&rest args" an more.
+don't take "&rest args" any more.
 
 ** New function `funcall-interactively', which works like `funcall'
 but makes `called-interactively-p' treat the function as (you guessed it)
index 28f0ef0c520675594f8366cf7bb2088baf4fdbaf..d12138f3eadd845f2d6ff90f24438a859ff25aed 100644 (file)
@@ -4,6 +4,9 @@
        bound to C-c C-n.
        (sql-show-sqli-buffer): Display the buffer instead of its name and
        bind the command to C-c C-z.
+       (sql-default-directory): New user option.
+       (sql-product-interactive): Bind `default-directory' to it to
+       enable remote connections using Tramp.
 
 2014-09-08  Glenn Morris  <rgm@gnu.org>
 
index c63339d98c8908fa80aa77db47b4d42b0549fdf5..486e6b651d29f417590373a80fdcde01a8c6cd02 100644 (file)
@@ -282,6 +282,13 @@ file.  Since that is a plaintext file, this could be dangerous."
   :group 'SQL
   :safe 'numberp)
 
+(defcustom sql-default-directory nil
+  "Default directory for SQL processes."
+  :version "24.5"
+  :type 'string
+  :group 'SQL
+  :safe 'stringp)
+
 ;; Login parameter type
 
 (define-widget 'sql-login-params 'lazy
@@ -4173,7 +4180,9 @@ the call to \\[sql-product-interactive] with
                     (sql-password   (default-value 'sql-password))
                     (sql-server     (default-value 'sql-server))
                     (sql-database   (default-value 'sql-database))
-                    (sql-port       (default-value 'sql-port)))
+                    (sql-port       (default-value 'sql-port))
+                    (default-directory (or sql-default-directory
+                                           default-directory)))
                 (funcall (sql-get-product-feature product :sqli-comint-func)
                          product
                          (sql-get-product-feature product :sqli-options)))