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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 2238 in the body.
You can then email your comments to 2238 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#2238
; Package
emacs
.
(Sun, 08 Feb 2009 22:25:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ian Eure <ian <at> digg.com>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sun, 08 Feb 2009 22:25:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
In Emacs 22, python-mode had an option, python-use-skeletons, which
controlled whether you would get a skeleton when you entered "def", or
the plain text.
This option is missing from Emacs 23 CVS, and I want the behavior
back, as I find the skeletons to be obnoxious and undesirable.
Patch is against current CVS HEAD.
In GNU Emacs 23.0.90.1 (i386-apple-darwin9.6.0, NS
apple-appkit-949.43)
of 2009-02-03 on 64-71-7-199.static.wiline.com
Windowing system distributor `Apple', version 10.3.949
configured using `configure '--with-ns''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
value of $XMODIFIERS: nil
locale-coding-system: nil
default-enable-multibyte-characters: t
Major mode: Diff
Minor modes in effect:
diff-auto-refine-mode: t
twit-mode: t
yas/minor-mode: t
which-function-mode: t
ime-bindings: t
shell-dirtrack-mode: t
show-paren-mode: t
recentf-mode: t
iswitchb-mode: t
cua-mode: t
auto-insert-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
size-indication-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
abbrev-mode: t
Recent input:
M-/ C-M-h C-M-\ C-_ C-x C-s C-x b s h e l C-g C-c !
<return> l s <return> d i f f SPC - u SPC P <backspace>
p y <tab> SPC p y <tab> <tab> . <tab> <return> M-p
SPC <backspace> > SPC ~ / u s e - M-b p y h o n <backspace>
<backspace> <backspace> t h i n <backspace> <backspace>
o n C-e C-b C-b C-b C-b - C-e s k e l e t o n s . d
i f f <return> m v SPC ~ / p y <tab> ~ D <backspace>
/ D e <tab> <return> <help-echo> <down-mouse-1> <mouse-1>
C-x C-f ~ / P r <tab> e m <tab> <return> C-x C-d <return>
- n a m e SPC p y t h o n . e l <return> <return> C-s
; ; SPC s k e l e t C-e C-x 4 b p y <return> C-n C-p
C-n C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-SPC C-n C-n C-n C-n
C-n C-e M-w C-x o <return> <return> C-y C-n C-v C-n
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n
C-n C-n C-n C-n C-n C-p C-p C-p C-p M-m M-1 M-( o r
<backspace> <backspace> i f SPC p y M-/ M-/ <M-backspace>
<M-backspace> <M-backspace> u s M-/ SPC C-o C-n <tab>
C-n C-p C-p M-m C-SPC C-n C-n C-e C-n C-M-\ C-x C-s
C-x v = C-x C-w ~ / p y t h o n - u s e - s k e l e
t o n s . C-b - C V S H E A D C-e d i f f <return>
<menu-bar> <help-menu> <send-emacs-bug-report>
Recent messages:
Completed [2 times]
find-dired *Find* finished.
Loading vc-cvs...done
Mark saved where search started
Mark set [3 times]
Saving file /Users/ieure/Projects/emacs/lisp/progmodes/python.el...
Mark set
Wrote /Users/ieure/Projects/emacs/lisp/progmodes/python.el
Finding changes in
/Users/ieure/Projects/emacs/lisp/progmodes/python.el...done
Wrote /Users/ieure/python-use-skeletons-CVSHEAD.diff
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#2238
; Package
emacs
.
(Sun, 08 Feb 2009 22:50:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ian Eure <ian <at> digg.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Sun, 08 Feb 2009 22:50:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 2238 <at> emacsbugs.donarmstrong.com (full text, mbox):
[Message part 1 (text/plain, inline)]
Forgot to attach the patch, here it is.
[python-use-skeletons-CVSHEAD.diff (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#2238
; Package
emacs
.
(Mon, 09 Feb 2009 00:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Mon, 09 Feb 2009 00:50:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 2238 <at> emacsbugs.donarmstrong.com (full text, mbox):
> 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.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#2238
; Package
emacs
.
(Mon, 09 Feb 2009 06:20:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ian Eure <ian <at> digg.com>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Mon, 09 Feb 2009 06:20:03 GMT)
Full text and
rfc822 format available.
Message #20 received at 2238 <at> emacsbugs.donarmstrong.com (full text, mbox):
On Feb 8, 2009, at 4:32 PM, Stefan Monnier wrote:
>> 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.
>
I like using abbrevs when coding Python, just not the invasive default
ones. It also doesn't seem too friendly to kill people's python
abbrevs when they upgrade from Emacs 22 to 23.
I'd prefer the behavior in Emacs 22.
bug reassigned from package `emacs' to `emacs,python'.
Request was from
Juanma Barranquero <lekktu <at> gmail.com>
to
control <at> emacsbugs.donarmstrong.com
.
(Mon, 09 Feb 2009 21:15:04 GMT)
Full text and
rfc822 format available.
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Fri, 13 Feb 2009 04:20:05 GMT)
Full text and
rfc822 format available.
Notification sent
to
Ian Eure <ian <at> digg.com>
:
bug acknowledged by developer.
(Fri, 13 Feb 2009 04:20:06 GMT)
Full text and
rfc822 format available.
Message #27 received at 2238-done <at> emacsbugs.donarmstrong.com (full text, mbox):
2009-02-12 Stefan Monnier <monnier at iro.umontreal.ca>
* progmodes/python.el (python-use-skeletons): Re-add.
(def-python-skeleton): Use it.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Fri, 13 Mar 2009 14:24:05 GMT)
Full text and
rfc822 format available.
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.