Function: autoconf-find-last-macro

autoconf-find-last-macro is a byte-compiled function defined in autoconf-edit.el.gz.

Signature

(autoconf-find-last-macro MACRO &optional IGNORE-BOL)

Documentation

Move to the last occurrence of MACRO, and return that point.

The last macro is usually the one in which we would like to insert more items such as CHECK_HEADERS.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/ede/autoconf-edit.el.gz
(defun autoconf-find-last-macro (macro &optional ignore-bol)
  "Move to the last occurrence of MACRO, and return that point.
The last macro is usually the one in which we would like to insert more
items such as CHECK_HEADERS."
  (let ((op (point)) (atbol (if ignore-bol "" "^")))
    (goto-char (point-max))
    (if (re-search-backward (concat atbol (regexp-quote macro) "\\s-*\\((\\|$\\)") nil t)
	(progn
	  (unless ignore-bol (beginning-of-line))
	  (point))
      (goto-char op)
      nil)))