Function: autoconf-position-for-macro
autoconf-position-for-macro is a byte-compiled function defined in
autoconf-edit.el.gz.
Signature
(autoconf-position-for-macro MACRO)
Documentation
Position the cursor where a new MACRO could be inserted.
This will appear at the BEGINNING of the macro MACRO should appear AFTER.
This is to make it compatible with autoconf-find-last-macro.
Assume that MACRO doesn't appear in the buffer yet, so search
the ordering list autoconf-preferred-macro-order.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/ede/autoconf-edit.el.gz
(defun autoconf-position-for-macro (macro)
"Position the cursor where a new MACRO could be inserted.
This will appear at the BEGINNING of the macro MACRO should appear AFTER.
This is to make it compatible with `autoconf-find-last-macro'.
Assume that MACRO doesn't appear in the buffer yet, so search
the ordering list `autoconf-preferred-macro-order'."
;; Search this list backwards.. heh heh heh
;; This lets us do a reverse search easily.
(let ((ml (member macro (reverse autoconf-preferred-macro-order))))
(if (not ml) (error "Don't know how to position for %s yet" macro))
(setq ml (cdr ml))
(goto-char (point-max))
(while (and ml (not (autoconf-find-last-macro (car ml))))
(setq ml (cdr ml)))
(if (not ml) (error "Could not find context for positioning %s" macro))))