summaryrefslogtreecommitdiff
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2006-12-03 12:25:18 +0000
committerKaroly Lorentey <lorentey@elte.hu>2006-12-03 12:25:18 +0000
commitd6e01aa592f7326dffeafa6e97180a1cc39fe7ea (patch)
tree5a22b785cfee1d77d6452607450a12ca82eeecd3 /lisp/progmodes/python.el
parent14bcc1e098410087a837313e2fc822319ff2e8ca (diff)
parent4975e69596a64247e8995d1ff9084b98a9a5ed0d (diff)
downloademacs-d6e01aa592f7326dffeafa6e97180a1cc39fe7ea.tar.gz
emacs-d6e01aa592f7326dffeafa6e97180a1cc39fe7ea.tar.bz2
emacs-d6e01aa592f7326dffeafa6e97180a1cc39fe7ea.zip
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
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 0387c05134e..4d9a49a6b8d 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1969,6 +1969,13 @@ Repeating the command scrolls the completion window."
;;;; 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 @@ The default contents correspond to the elements of `python-skeletons'.")
(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)))))