diff lisp/progmodes/python.el @ 90645:7eeafaaa9eab

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 476-489) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 153-160) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-127
author Miles Bader <miles@gnu.org>
date Mon, 30 Oct 2006 08:54:41 +0000
parents b5c13d1564a9 664e876d97fd
children dbe3f29e61d6
line wrap: on
line diff
--- a/lisp/progmodes/python.el	Mon Oct 30 06:52:47 2006 +0000
+++ b/lisp/progmodes/python.el	Mon Oct 30 08:54:41 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)))))