emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] scratch/backports-25.2 30376cc 22/46: Allow _ characters i


From: Noam Postavsky
Subject: [Emacs-diffs] scratch/backports-25.2 30376cc 22/46: Allow _ characters in SQL prompts
Date: Sun, 2 Oct 2016 14:04:49 +0000 (UTC)

branch: scratch/backports-25.2
commit 30376cc59fdf72bf0f2a25aaae792494b6fbbcdd
Author: Steve Purcell <address@hidden>
Commit: Noam Postavsky <address@hidden>

    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 "_".
    
    (cherry picked from commit a28873ce734b3618b0e8f6892e65db24d2f18da8)
---
 lisp/progmodes/sql.el |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index fd59f46..be7c4dd 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."
      :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.
 



reply via email to

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