changeset 74433:89cf360cc26e

(sql-mode-abbrev-table): Define abbrevs even if abbrev-table is non-nil (saved user abbrevs may have been restored).
author Glenn Morris <rgm@gnu.org>
date Tue, 05 Dec 2006 05:25:36 +0000
parents 07d0c7e67ef3
children 2b464ae7b20e
files lisp/progmodes/sql.el
diffstat 1 files changed, 18 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/sql.el	Tue Dec 05 05:25:17 2006 +0000
+++ b/lisp/progmodes/sql.el	Tue Dec 05 05:25:36 2006 +0000
@@ -847,23 +847,24 @@
 (defvar sql-mode-abbrev-table nil
   "Abbrev table used in `sql-mode' and `sql-interactive-mode'.")
 (unless sql-mode-abbrev-table
-  (define-abbrev-table 'sql-mode-abbrev-table nil)
-  (mapcar
-    ;; In Emacs 21.3+, provide SYSTEM-FLAG to define-abbrev.
-   '(lambda (abbrev)
-      (let ((name (car abbrev))
-	    (expansion (cdr abbrev)))
-	(condition-case nil
-	    (define-abbrev sql-mode-abbrev-table name expansion nil 0 t)
-	  (error
-	   (define-abbrev sql-mode-abbrev-table name expansion)))))
-   '(("ins" "insert")
-    ("upd" "update")
-    ("del" "delete")
-    ("sel" "select")
-    ("proc" "procedure")
-    ("func" "function")
-    ("cr" "create"))))
+  (define-abbrev-table 'sql-mode-abbrev-table nil))
+
+(mapcar
+ ;; In Emacs 21.3+, provide SYSTEM-FLAG to define-abbrev.
+ '(lambda (abbrev)
+    (let ((name (car abbrev))
+          (expansion (cdr abbrev)))
+      (condition-case nil
+          (define-abbrev sql-mode-abbrev-table name expansion nil 0 t)
+        (error
+         (define-abbrev sql-mode-abbrev-table name expansion)))))
+ '(("ins" "insert")
+   ("upd" "update")
+   ("del" "delete")
+   ("sel" "select")
+   ("proc" "procedure")
+   ("func" "function")
+   ("cr" "create")))
 
 ;; Syntax Table