mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-10 15:56:18 +00:00
Teach sql-mode's imenu about IF NOT EXISTS
This commit is contained in:
commit
b6096e8505
@ -1,7 +1,8 @@
|
|||||||
2012-11-21 Daniel Colascione <dancol@dancol.org>
|
2012-11-21 Daniel Colascione <dancol@dancol.org>
|
||||||
|
|
||||||
* progmodes/sql.el (sql-mode-font-lock-object-name): Support IF NOT EXISTS
|
* progmodes/sql.el (sql-mode-font-lock-object-name): Support IF NOT EXISTS
|
||||||
in SQL declarations.
|
in SQL declarations for font-lock.
|
||||||
|
(sql-imenu-generic-expression): Teach imenu about IF NOT EXISTS.
|
||||||
|
|
||||||
2012-11-21 Glenn Morris <rgm@gnu.org>
|
2012-11-21 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
|
@ -736,15 +736,15 @@ this variable is nil, that buffer is shown using
|
|||||||
|
|
||||||
(defvar sql-imenu-generic-expression
|
(defvar sql-imenu-generic-expression
|
||||||
;; Items are in reverse order because they are rendered in reverse.
|
;; Items are in reverse order because they are rendered in reverse.
|
||||||
'(("Rules/Defaults" "^\\s-*create\\s-+\\(\\w+\\s-+\\)*\\(rule\\|default\\)\\s-+\\(\\w+\\)" 3)
|
'(("Rules/Defaults" "^\\s-*create\\s-+\\(?:\\w+\\s-+\\)*\\(?:rule\\|default\\)\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\s-+\\(\\w+\\)" 1)
|
||||||
("Sequences" "^\\s-*create\\s-+\\(\\w+\\s-+\\)*sequence\\s-+\\(\\w+\\)" 2)
|
("Sequences" "^\\s-*create\\s-+\\(?:\\w+\\s-+\\)*sequence\\s-+\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1)
|
||||||
("Triggers" "^\\s-*create\\s-+\\(\\w+\\s-+\\)*trigger\\s-+\\(\\w+\\)" 2)
|
("Triggers" "^\\s-*create\\s-+\\(?:\\w+\\s-+\\)*trigger\\s-+\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1)
|
||||||
("Functions" "^\\s-*\\(create\\s-+\\(\\w+\\s-+\\)*\\)?function\\s-+\\(\\w+\\)" 3)
|
("Functions" "^\\s-*\\(?:create\\s-+\\(?:\\w+\\s-+\\)*\\)?function\\s-+\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1)
|
||||||
("Procedures" "^\\s-*\\(create\\s-+\\(\\w+\\s-+\\)*\\)?proc\\(edure\\)?\\s-+\\(\\w+\\)" 4)
|
("Procedures" "^\\s-*\\(?:create\\s-+\\(?:\\w+\\s-+\\)*\\)?proc\\(?:edure\\)?\\s-+\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1)
|
||||||
("Packages" "^\\s-*create\\s-+\\(\\w+\\s-+\\)*package\\s-+\\(body\\s-+\\)?\\(\\w+\\)" 3)
|
("Packages" "^\\s-*create\\s-+\\(?:\\w+\\s-+\\)*package\\s-+\\(?:body\\s-+\\)?\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1)
|
||||||
("Types" "^\\s-*create\\s-+\\(\\w+\\s-+\\)*type\\s-+\\(body\\s-+\\)?\\(\\w+\\)" 3)
|
("Types" "^\\s-*create\\s-+\\(?:\\w+\\s-+\\)*type\\s-+\\(?:body\\s-+\\)?\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1)
|
||||||
("Indexes" "^\\s-*create\\s-+\\(\\w+\\s-+\\)*index\\s-+\\(\\w+\\)" 2)
|
("Indexes" "^\\s-*create\\s-+\\(?:\\w+\\s-+\\)*index\\s-+\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1)
|
||||||
("Tables/Views" "^\\s-*create\\s-+\\(\\w+\\s-+\\)*\\(table\\|view\\)\\s-+\\(\\w+\\)" 3))
|
("Tables/Views" "^\\s-*create\\s-+\\(?:\\w+\\s-+\\)*\\(?:table\\|view\\)\\s-+\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1))
|
||||||
"Define interesting points in the SQL buffer for `imenu'.
|
"Define interesting points in the SQL buffer for `imenu'.
|
||||||
|
|
||||||
This is used to set `imenu-generic-expression' when SQL mode is
|
This is used to set `imenu-generic-expression' when SQL mode is
|
||||||
|
Loading…
Reference in New Issue
Block a user