aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Purcell2016-04-24 13:44:37 +0200
committerLars Magne Ingebrigtsen2016-04-24 13:44:52 +0200
commita28873ce734b3618b0e8f6892e65db24d2f18da8 (patch)
tree5ef1d1acdc2b5c1f1bd371c42b1ab5f7bb679f3e
parent5d1e62e32989399fd2a073cc8efc07f869a1b438 (diff)
downloademacs-a28873ce734b3618b0e8f6892e65db24d2f18da8.tar.gz
emacs-a28873ce734b3618b0e8f6892e65db24d2f18da8.zip
Allow _ characters in SQL prompts
* 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 "_".
-rw-r--r--lisp/progmodes/sql.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index fd59f4687c6..be7c4ddccf2 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -462,9 +462,9 @@ file. Since that is a plaintext file, this could be dangerous."
462 :list-all ("\\d+" . "\\dS+") 462 :list-all ("\\d+" . "\\dS+")
463 :list-table ("\\d+ %s" . "\\dS+ %s") 463 :list-table ("\\d+ %s" . "\\dS+ %s")
464 :completion-object sql-postgres-completion-object 464 :completion-object sql-postgres-completion-object
465 :prompt-regexp "^\\w*=[#>] " 465 :prompt-regexp "^[[:alnum:]_]*=[#>] "
466 :prompt-length 5 466 :prompt-length 5
467 :prompt-cont-regexp "^\\w*[-(][#>] " 467 :prompt-cont-regexp "^[[:alnum:]_]*[-(][#>] "
468 :input-filter sql-remove-tabs-filter 468 :input-filter sql-remove-tabs-filter
469 :terminator ("\\(^\\s-*\\\\g$\\|;\\)" . "\\g")) 469 :terminator ("\\(^\\s-*\\\\g$\\|;\\)" . "\\g"))
470 470
@@ -514,9 +514,9 @@ file. Since that is a plaintext file, this could be dangerous."
514 :sqli-comint-func sql-comint-vertica 514 :sqli-comint-func sql-comint-vertica
515 :list-all ("\\d" . "\\dS") 515 :list-all ("\\d" . "\\dS")
516 :list-table "\\d %s" 516 :list-table "\\d %s"
517 :prompt-regexp "^\\w*=[#>] " 517 :prompt-regexp "^[[:alnum:]_]*=[#>] "
518 :prompt-length 5 518 :prompt-length 5
519 :prompt-cont-regexp "^\\w*[-(][#>] ") 519 :prompt-cont-regexp "^[[:alnum:]_]*[-(][#>] ")
520 ) 520 )
521 "An alist of product specific configuration settings. 521 "An alist of product specific configuration settings.
522 522