   `erlang-font-lock-keywords-1' - Function headers and reserved keywords.
   `erlang-font-lock-keywords-2' - Bifs, guards and `single quotes'.
   `erlang-font-lock-keywords-3' - Variables, macros and records.
-  `erlang-font-lock-keywords-4' - Function names, Funs, LCs (not Atoms)
+  `erlang-font-lock-keywords-4' - Exported functions, Function names,
+                                  Funs, LCs (not Atoms).
 
 To use a specific level, please set the variable
 `font-lock-maximum-decoration' to the appropriate level.  Note that the


(defvar erlang-font-lock-keywords-4
  (append erlang-font-lock-keywords-3
          erlang-font-lock-keywords-int-function-calls
	  erlang-font-lock-keywords-ext-function-calls
	  erlang-font-lock-keywords-fun-n

	  str)
      (store-match-data md))))

(defun erlang-match-next-exported-function (max)
  "Returns non-nil if there is an exported function in the current
buffer between point and MAX."
  (block nil
    (while (and (not erlang-inhibit-exported-function-name-face)
                (erlang-match-next-function max))
      (when (erlang-last-match-exported-p)
        (return (match-data))))))

(defun erlang-match-next-function (max)
  "Searches forward in current buffer for the next erlang function,
bounded by position MAX."
  (re-search-forward erlang-defun-prompt-regexp max 'move-point))

(defun erlang-last-match-exported-p ()
  "Returns non-nil if match-data describes the name and arity of an
exported function."
  (save-excursion
    (save-match-data
      (goto-char (match-beginning 1))
      (erlang-function-exported-p
       (erlang-remove-quotes (erlang-get-function-name))
       (erlang-get-function-arity)))))

(defun erlang-function-exported-p (name arity)
  "Returns non-nil if function of name and arity is exported in current buffer."
  (save-excursion
    (let* ((old-match-data (match-data))
           (exports        (erlang-get-export)))
      (store-match-data old-match-data)
      (member (cons name arity) exports))))


;;; Check module name
