[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22596: Acknowledgement (25.1.50; Broken prompt-regexp for sql-postgr
From: |
Lars Ingebrigtsen |
Subject: |
bug#22596: Acknowledgement (25.1.50; Broken prompt-regexp for sql-postgres) |
Date: |
Tue, 23 Feb 2016 15:02:09 +1100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Steve Purcell <steve@sanityinc.com> writes:
> 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 "_".
>
> In the general case, almost any characters are valid in a PostgreSQL
> database name, so we must choose between matching .reasonable. database
> names with a tight regexp, or matching all allowable names with a
> permissive regexp which would likely match all sorts of other buffer
> text. This commit follows the former approach.
[...]
> - :prompt-regexp "^\\w*=[#>] "
> + :prompt-regexp "^[[:alnum:]_]*=[#>] "
> :prompt-length 5
> - :prompt-cont-regexp "^\\w*[-(][#>] "
> + :prompt-cont-regexp "^[[:alnum:]_]*[-(][#>] "
This looks reasonable to me, but I'm not an SQL mode user, so I can't
really test it. Does anybody have an objection to this change?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no