Mercurial > emacs
diff lisp/progmodes/python.el @ 83545:034f67f59091
Merged from emacs@sv.gnu.org.
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-479
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-480
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-481
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-482
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-483
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-484
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-485
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-153
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-154
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-155
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-585
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Sun, 03 Dec 2006 12:25:18 +0000 |
parents | 664e876d97fd |
children | 871131fc9087 7eeafaaa9eab |
line wrap: on
line diff
--- a/lisp/progmodes/python.el Sun Dec 03 12:15:03 2006 +0000 +++ b/lisp/progmodes/python.el Sun Dec 03 12:25:18 2006 +0000 @@ -1969,6 +1969,13 @@ ;;;; Skeletons +(defcustom python-use-skeletons nil + "Non-nil means template skeletons will be automagically inserted. +This happens when pressing \"if<SPACE>\", for example, to prompt for +the if condition." + :type 'boolean + :group 'python) + (defvar python-skeletons nil "Alist of named skeletons for Python mode. Elements are of the form (NAME . EXPANDER-FUNCTION).") @@ -1986,7 +1993,8 @@ (function (intern (concat "python-insert-" name)))) `(progn (add-to-list 'python-skeletons ',(cons name function)) - (define-abbrev python-mode-abbrev-table ,name "" ',function nil t) + (if python-use-skeletons + (define-abbrev python-mode-abbrev-table ,name "" ',function nil t)) (define-skeleton ,function ,(format "Insert Python \"%s\" template." name) ,@elements)))))