Function: makefile-match-function-end

makefile-match-function-end is a byte-compiled function defined in make-mode.el.gz.

Signature

(makefile-match-function-end END)

Documentation

To be called as an anchored matcher by font-lock.

The anchor must have matched the opening parens in the first group.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/make-mode.el.gz
;;; ------------------------------------------------------------
;;; Utility functions
;;; ------------------------------------------------------------

(defun makefile-match-function-end (_end)
  "To be called as an anchored matcher by font-lock.
The anchor must have matched the opening parens in the first group."
  (let ((s (match-string-no-properties 1)))
    ;; FIXME forward-sexp or somesuch would be better?
    (if (setq s (cond ((string= s "(") ")")
		      ((string= s "{") "}")
		      ((string= s "[") "]")
		      ((string= s "((") "))")
		      ((string= s "{{") "}}")
		      ((string= s "[[") "]]")))
	(re-search-forward (concat "\\(.*\\)[ \t]*" s) (line-end-position) t))))