From: Glenn Morris Date: Tue, 5 Dec 2006 05:25:36 +0000 (+0000) Subject: (sql-mode-abbrev-table): Define abbrevs even if abbrev-table is X-Git-Tag: emacs-pretest-22.0.92~290 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e5a4bf48526ec975e61adbc0a61750c36ba22fdf;p=emacs.git (sql-mode-abbrev-table): Define abbrevs even if abbrev-table is non-nil (saved user abbrevs may have been restored). --- diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index ff5493de364..4b5a8bb51f1 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -847,23 +847,24 @@ Based on `comint-mode-map'.") (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