Commit e5a4bf48 authored by Glenn Morris's avatar Glenn Morris

(sql-mode-abbrev-table): Define abbrevs even if abbrev-table is

non-nil (saved user abbrevs may have been restored).
parent a48edb29
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment