]> code.delx.au - gnu-emacs/commitdiff
Allow _ characters in SQL prompts
authorSteve Purcell <steve@sanityinc.com>
Sun, 24 Apr 2016 11:44:37 +0000 (13:44 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sun, 24 Apr 2016 11:44:52 +0000 (13:44 +0200)
* lisp/progmodes/sql.el (sql-product-alist): Allow _
characters in SQL prompts (bug#22596).

Fixes issue 22596, whereby "_" is now not considered a word constituent
character in sql-interactive-mode, so prompts like "foo_dev# " are not
correctly detected. Rather than piggy-back on the symbol table, we
explicitly match against alphanumeric chars or "_".

lisp/progmodes/sql.el

index fd59f4687c6cf7d0205cb849d580e96f4b063f8b..be7c4ddccf25c1f91d5082eacc66079737767076 100644 (file)
@@ -462,9 +462,9 @@ file.  Since that is a plaintext file, this could be dangerous."
      :list-all ("\\d+" . "\\dS+")
      :list-table ("\\d+ %s" . "\\dS+ %s")
      :completion-object sql-postgres-completion-object
-     :prompt-regexp "^\\w*=[#>] "
+     :prompt-regexp "^[[:alnum:]_]*=[#>] "
      :prompt-length 5
-     :prompt-cont-regexp "^\\w*[-(][#>] "
+     :prompt-cont-regexp "^[[:alnum:]_]*[-(][#>] "
      :input-filter sql-remove-tabs-filter
      :terminator ("\\(^\\s-*\\\\g$\\|;\\)" . "\\g"))
 
@@ -514,9 +514,9 @@ file.  Since that is a plaintext file, this could be dangerous."
      :sqli-comint-func sql-comint-vertica
      :list-all ("\\d" . "\\dS")
      :list-table "\\d %s"
-     :prompt-regexp "^\\w*=[#>] "
+     :prompt-regexp "^[[:alnum:]_]*=[#>] "
      :prompt-length 5
-     :prompt-cont-regexp "^\\w*[-(][#>] ")
+     :prompt-cont-regexp "^[[:alnum:]_]*[-(][#>] ")
     )
   "An alist of product specific configuration settings.