Function: python-define-auxiliary-skeleton
python-define-auxiliary-skeleton is a macro defined in python.el.gz.
Signature
(python-define-auxiliary-skeleton NAME &optional DOC &rest SKEL)
Documentation
Define a python-mode auxiliary skeleton using NAME DOC and SKEL.
The skeleton will be bound to python-skeleton-NAME.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defmacro python-define-auxiliary-skeleton (name &optional doc &rest skel)
"Define a `python-mode' auxiliary skeleton using NAME DOC and SKEL.
The skeleton will be bound to python-skeleton-NAME."
(declare (indent 2))
(let* ((name (symbol-name name))
(function-name (intern (concat "python-skeleton--" name)))
(msg (funcall (if (fboundp 'format-message) #'format-message #'format)
"Add `%s' clause? " name)))
(when (not skel)
(setq skel
`(< ,(format "%s:" name) \n \n
> _ \n)))
`(progn
(function-put ',function-name 'completion-predicate #'ignore)
(define-skeleton ,function-name
,(or doc
(format "Auxiliary skeleton for %s statement." name))
nil
(unless (y-or-n-p ,msg)
(signal 'quit t))
,@skel))))