diff options
| author | Daniel Colascione | 2012-11-21 13:47:10 -0800 |
|---|---|---|
| committer | Daniel Colascione | 2012-11-21 13:47:10 -0800 |
| commit | b6096e850526fa1c2202dfc27f580bae94a22d9f (patch) | |
| tree | 25498d18ca5ea80abccec930fa4798676bbee794 | |
| parent | 21fa24820007018632b3719ac6855eef6b688852 (diff) | |
| parent | faeafc0133e90bdd6e1df134e507201d6e3c7a38 (diff) | |
| download | emacs-b6096e850526fa1c2202dfc27f580bae94a22d9f.tar.gz emacs-b6096e850526fa1c2202dfc27f580bae94a22d9f.zip | |
Teach sql-mode's imenu about IF NOT EXISTS
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/progmodes/sql.el | 18 |
2 files changed, 11 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a0c6a8671f2..6b6a64b9899 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | 2012-11-21 Daniel Colascione <dancol@dancol.org> | 1 | 2012-11-21 Daniel Colascione <dancol@dancol.org> |
| 2 | 2 | ||
| 3 | * progmodes/sql.el (sql-mode-font-lock-object-name): Support IF NOT EXISTS | 3 | * progmodes/sql.el (sql-mode-font-lock-object-name): Support IF NOT EXISTS |
| 4 | in SQL declarations. | 4 | in SQL declarations for font-lock. |
| 5 | (sql-imenu-generic-expression): Teach imenu about IF NOT EXISTS. | ||
| 5 | 6 | ||
| 6 | 2012-11-21 Glenn Morris <rgm@gnu.org> | 7 | 2012-11-21 Glenn Morris <rgm@gnu.org> |
| 7 | 8 | ||
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 8a5b9f107ae..d84d57cad22 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el | |||
| @@ -736,15 +736,15 @@ this variable is nil, that buffer is shown using | |||
| 736 | 736 | ||
| 737 | (defvar sql-imenu-generic-expression | 737 | (defvar sql-imenu-generic-expression |
| 738 | ;; Items are in reverse order because they are rendered in reverse. | 738 | ;; Items are in reverse order because they are rendered in reverse. |
| 739 | '(("Rules/Defaults" "^\\s-*create\\s-+\\(\\w+\\s-+\\)*\\(rule\\|default\\)\\s-+\\(\\w+\\)" 3) | 739 | '(("Rules/Defaults" "^\\s-*create\\s-+\\(?:\\w+\\s-+\\)*\\(?:rule\\|default\\)\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\s-+\\(\\w+\\)" 1) |
| 740 | ("Sequences" "^\\s-*create\\s-+\\(\\w+\\s-+\\)*sequence\\s-+\\(\\w+\\)" 2) | 740 | ("Sequences" "^\\s-*create\\s-+\\(?:\\w+\\s-+\\)*sequence\\s-+\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1) |
| 741 | ("Triggers" "^\\s-*create\\s-+\\(\\w+\\s-+\\)*trigger\\s-+\\(\\w+\\)" 2) | 741 | ("Triggers" "^\\s-*create\\s-+\\(?:\\w+\\s-+\\)*trigger\\s-+\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1) |
| 742 | ("Functions" "^\\s-*\\(create\\s-+\\(\\w+\\s-+\\)*\\)?function\\s-+\\(\\w+\\)" 3) | 742 | ("Functions" "^\\s-*\\(?:create\\s-+\\(?:\\w+\\s-+\\)*\\)?function\\s-+\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1) |
| 743 | ("Procedures" "^\\s-*\\(create\\s-+\\(\\w+\\s-+\\)*\\)?proc\\(edure\\)?\\s-+\\(\\w+\\)" 4) | 743 | ("Procedures" "^\\s-*\\(?:create\\s-+\\(?:\\w+\\s-+\\)*\\)?proc\\(?:edure\\)?\\s-+\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1) |
| 744 | ("Packages" "^\\s-*create\\s-+\\(\\w+\\s-+\\)*package\\s-+\\(body\\s-+\\)?\\(\\w+\\)" 3) | 744 | ("Packages" "^\\s-*create\\s-+\\(?:\\w+\\s-+\\)*package\\s-+\\(?:body\\s-+\\)?\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1) |
| 745 | ("Types" "^\\s-*create\\s-+\\(\\w+\\s-+\\)*type\\s-+\\(body\\s-+\\)?\\(\\w+\\)" 3) | 745 | ("Types" "^\\s-*create\\s-+\\(?:\\w+\\s-+\\)*type\\s-+\\(?:body\\s-+\\)?\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1) |
| 746 | ("Indexes" "^\\s-*create\\s-+\\(\\w+\\s-+\\)*index\\s-+\\(\\w+\\)" 2) | 746 | ("Indexes" "^\\s-*create\\s-+\\(?:\\w+\\s-+\\)*index\\s-+\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1) |
| 747 | ("Tables/Views" "^\\s-*create\\s-+\\(\\w+\\s-+\\)*\\(table\\|view\\)\\s-+\\(\\w+\\)" 3)) | 747 | ("Tables/Views" "^\\s-*create\\s-+\\(?:\\w+\\s-+\\)*\\(?:table\\|view\\)\\s-+\\(?:if\\s-+not\\s-+exists\\s-+\\)?\\(\\w+\\)" 1)) |
| 748 | "Define interesting points in the SQL buffer for `imenu'. | 748 | "Define interesting points in the SQL buffer for `imenu'. |
| 749 | 749 | ||
| 750 | This is used to set `imenu-generic-expression' when SQL mode is | 750 | This is used to set `imenu-generic-expression' when SQL mode is |