Function: sh-font-lock-keywords-1

sh-font-lock-keywords-1 is a byte-compiled function defined in sh-script.el.gz.

Signature

(sh-font-lock-keywords-1 &optional BUILTINS)

Documentation

Function to get better fontification including keywords.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/sh-script.el.gz
(defun sh-font-lock-keywords-1 (&optional builtins)
  "Function to get better fontification including keywords."
  (let ((keywords (concat "\\([;(){}`|&]\\|^\\)[ \t]*\\(\\("
			  (regexp-opt (sh-feature sh-leading-keywords) t)
			  "[ \t]+\\)?"
			  (regexp-opt (append (sh-feature sh-leading-keywords)
					      (sh-feature sh-other-keywords))
				      t))))
    (sh-font-lock-keywords
     `(,@(if builtins
	     `((,(concat keywords "[ \t]+\\)?"
			 (regexp-opt (sh-feature sh-builtins) t)
			 "\\>")
		(2 font-lock-keyword-face nil t)
		(6 font-lock-builtin-face))
	       ,@(sh-feature sh-font-lock-keywords-var-2)))
	 (,(concat keywords "\\)\\>")
	  2 font-lock-keyword-face)
	 ,@(sh-feature sh-font-lock-keywords-var-1)))))