Function: tempo-expand-if-complete
tempo-expand-if-complete is an interactive and byte-compiled function
defined in tempo.el.gz.
Signature
(tempo-expand-if-complete)
Documentation
Expand the tag before point if it is complete.
Returns non-nil if an expansion was made and nil otherwise.
This could as an example be used in a command that is bound to the space bar, and looks something like this:
(defun tempo-space ()
(interactive "*")
(or (tempo-expand-if-complete)
(insert " ")))
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/tempo.el.gz
;;;
;;; tempo-expand-if-complete
(defun tempo-expand-if-complete ()
"Expand the tag before point if it is complete.
Returns non-nil if an expansion was made and nil otherwise.
This could as an example be used in a command that is bound to the
space bar, and looks something like this:
\(defun tempo-space ()
(interactive \"*\")
(or (tempo-expand-if-complete)
(insert \" \")))"
(interactive "*")
(let* ((collection (tempo-build-collection))
(match-info (tempo-find-match-string tempo-match-finder))
(match-string (car match-info))
(match-start (cdr match-info))
(exact (assoc match-string collection)))
(if exact
(progn
(delete-region match-start (point))
(tempo-insert-template (cdr exact) nil)
t)
nil)))