From: Michael R. Mauger Date: Sun, 21 Apr 2019 04:19:56 +0000 (-0400) Subject: * lisp/progmodes/sql.el Bug#24483 X-Git-Tag: emacs-27.0.90~3167 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d76fea29d8cdfcd715c8c1da592adf1b615e12f4;p=emacs.git * lisp/progmodes/sql.el Bug#24483 (sql-interactive-remove-continuation-prompt): Properly protect `sql-prompt-cont-regexp'. (sql-interactive-mode): Same. --- diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index fa9354e012e..7d29d0011cb 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -3746,7 +3746,8 @@ to avoid deleting non-prompt output." (or (> (length (or sql-preoutput-hold "")) 0) (> (or sql-output-newline-count 0) 0) (not (or (string-match sql-prompt-regexp oline) - (string-match sql-prompt-cont-regexp oline))))) + (and sql-prompt-cont-regexp + (string-match sql-prompt-cont-regexp oline)))))) (save-match-data (let (prompt-found last-nl) @@ -4394,12 +4395,12 @@ you entered, right above the output it created. ;; Set comint based on user overrides. (setq comint-prompt-regexp (if sql-prompt-cont-regexp - (concat "\\(" sql-prompt-regexp - "\\|" sql-prompt-cont-regexp "\\)") + (concat "\\(?:\\(?:" sql-prompt-regexp "\\)" + "\\|\\(?:" sql-prompt-cont-regexp "\\)\\)") sql-prompt-regexp)) (setq left-margin (or sql-prompt-length 0)) ;; Install input sender - (set (make-local-variable 'comint-input-sender) 'sql-input-sender) + (set (make-local-variable 'comint-input-sender) #'sql-input-sender) ;; People wanting a different history file for each ;; buffer/process/client/whatever can change separator and file-name ;; on the sql-interactive-mode-hook.