Function: sql-add-product-keywords
sql-add-product-keywords is an autoloaded and byte-compiled function
defined in sql.el.gz.
Signature
(sql-add-product-keywords PRODUCT KEYWORDS &optional APPEND)
Documentation
Add highlighting KEYWORDS for SQL PRODUCT.
PRODUCT should be a symbol, the name of a SQL product, such as
oracle. KEYWORDS should be a list; see the variable
font-lock-keywords. By default they are added at the beginning
of the current highlighting list. If optional argument APPEND is
set, they are used to replace the current highlighting list.
If APPEND is any other non-nil value, they are added at the end
of the current highlighting list.
For example:
(sql-add-product-keywords 'ms
'(("\\\\b\\\\w+_t\\\\b" . font-lock-type-face)))
adds a fontification pattern to fontify identifiers ending in
_t as data types.
Probably introduced at or before Emacs version 22.1.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/sql.el.gz
;;;###autoload
(defun sql-add-product-keywords (product keywords &optional append)
"Add highlighting KEYWORDS for SQL PRODUCT.
PRODUCT should be a symbol, the name of a SQL product, such as
`oracle'. KEYWORDS should be a list; see the variable
`font-lock-keywords'. By default they are added at the beginning
of the current highlighting list. If optional argument APPEND is
`set', they are used to replace the current highlighting list.
If APPEND is any other non-nil value, they are added at the end
of the current highlighting list.
For example:
(sql-add-product-keywords \\='ms
\\='((\"\\\\b\\\\w+_t\\\\b\" . font-lock-type-face)))
adds a fontification pattern to fontify identifiers ending in
`_t' as data types."
(let* ((sql-indirect-features nil)
(font-lock-var (sql-get-product-feature product :font-lock))
(old-val))
(setq old-val (symbol-value font-lock-var))
(set font-lock-var
(if (eq append 'set)
keywords
(if append
(append old-val keywords)
(append keywords old-val))))))