Function: srecode-self-insert-complete-end-macro
srecode-self-insert-complete-end-macro is an interactive and
byte-compiled function defined in srt-mode.el.gz.
Signature
(srecode-self-insert-complete-end-macro)
Documentation
Self insert the current key, then autocomplete the end macro.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/srecode/srt-mode.el.gz
;;; Template Commands
;;
(defun srecode-self-insert-complete-end-macro ()
"Self insert the current key, then autocomplete the end macro."
(interactive)
(call-interactively 'self-insert-command)
(when (and (semantic-current-tag)
(semantic-tag-of-class-p (semantic-current-tag) 'function)
)
(let* ((es (srecode-template-get-escape-start))
(ee (srecode-template-get-escape-end))
(name (save-excursion
(forward-char (- (length es)))
(forward-char -1)
(if (looking-at (regexp-quote es))
(srecode-up-context-get-name (point) t))))
)
(when name
(insert name)
(insert ee))))
)