Function: python-skeleton-define

python-skeleton-define is a macro defined in python.el.gz.

Signature

(python-skeleton-define NAME DOC &rest SKEL)

Documentation

Define a python-mode skeleton using NAME DOC and SKEL.

The skeleton will be bound to python-skeleton-NAME and will be added to python-mode-skeleton-abbrev-table.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/python.el.gz
(defmacro python-skeleton-define (name doc &rest skel)
  "Define a `python-mode' skeleton using NAME DOC and SKEL.
The skeleton will be bound to python-skeleton-NAME and will
be added to `python-mode-skeleton-abbrev-table'."
  (declare (indent 2))
  (let* ((name (symbol-name name))
         (function-name (intern (concat "python-skeleton-" name))))
    `(progn
       (define-abbrev python-mode-skeleton-abbrev-table
         ,name "" ',function-name :system t)
       (setq python-skeleton-available
             (cons ',function-name python-skeleton-available))
       (define-skeleton ,function-name
         ,(or doc
              (format "Insert %s statement." name))
         ,@skel))))