GNU bug report logs -
#2238
23.0.90; [PATCH] Regression in python.el
Previous Next
Reported by: Ian Eure <ian <at> digg.com>
Date: Sun, 8 Feb 2009 22:25:04 UTC
Severity: normal
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Forgot to attach the patch, here it is.
How 'bout this patch instead? The main advantage is that it will
correctly react to changes to python-use-skeletons without having to
reload the mode. The main disadvantage is that it will control all
abbrev expansions, not just the skeleton ones.
Stefan
--- python.el.~1.93.~ 2009-02-07 11:23:02.000000000 -0500
+++ python.el 2009-02-08 19:30:38.000000000 -0500
@@ -2205,13 +2205,21 @@
;;;; 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)
+
(define-abbrev-table 'python-mode-abbrev-table ()
"Abbrev table for Python mode."
:case-fixed t
;; Allow / inside abbrevs.
:regexp "\\(?:^\\|[^/]\\)\\<\\([[:word:]/]+\\)\\W*"
;; Only expand in code.
- :enable-function (lambda () (not (python-in-string/comment))))
+ :enable-function (lambda () (and python-use-skeletons
+ (not (python-in-string/comment)))))
(eval-when-compile
;; Define a user-level skeleton and add it to the abbrev table.
This bug report was last modified 16 years and 157 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.