Function: srecode-position-new-field
srecode-position-new-field is a byte-compiled function defined in
getset.el.gz.
Signature
(srecode-position-new-field CLASS INCLASS)
Documentation
Select a position for a new field for CLASS.
If INCLASS is non-nil, then the cursor is already in the class and should not be moved during point selection.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/srecode/getset.el.gz
(defun srecode-position-new-field (class inclass)
"Select a position for a new field for CLASS.
If INCLASS is non-nil, then the cursor is already in the class
and should not be moved during point selection."
;; If we aren't in the class, get the cursor there, pronto!
(when (not inclass)
(error "You must position the cursor where to insert the new field")
(let ((kids (semantic-find-tags-by-class
'variable (semantic-tag-type-members class))))
(cond (kids
(semantic-go-to-tag (car kids) class))
(t
(semantic-go-to-tag class)))
)
(switch-to-buffer (current-buffer))
;; Once the cursor is in our class, ask the user to position
;; the cursor to keep going.
)
(if (or srecode-insert-getset-fully-automatic-flag
(y-or-n-p "Insert new field here? "))
nil
(error "You must position the cursor where to insert the new field first"))
)