* bug#2238: 23.0.90; [PATCH] Regression in python.el @ 2009-02-08 22:13 ` Ian Eure [not found] ` <handler.2238.B.123413131213357.ack@emacsbugs.donarmstrong.com> 2009-02-13 4:20 ` bug#2238: marked as done " Emacs bug Tracking System 0 siblings, 2 replies; 5+ messages in thread From: Ian Eure @ 2009-02-08 22:13 UTC (permalink / raw) To: emacs-pretest-bug 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <handler.2238.B.123413131213357.ack@emacsbugs.donarmstrong.com>]
* bug#2238: Acknowledgement (23.0.90; [PATCH] Regression in python.el) [not found] ` <handler.2238.B.123413131213357.ack@emacsbugs.donarmstrong.com> @ 2009-02-08 22:44 ` Ian Eure 2009-02-09 0:32 ` Stefan Monnier 0 siblings, 1 reply; 5+ messages in thread From: Ian Eure @ 2009-02-08 22:44 UTC (permalink / raw) To: 2238 [-- Attachment #1: Type: text/plain, Size: 41 bytes --] Forgot to attach the patch, here it is. [-- Attachment #2: python-use-skeletons-CVSHEAD.diff --] [-- Type: application/octet-stream, Size: 1055 bytes --] --- python.el.~1.93.~ 2009-02-02 20:13:17.000000000 -0800 +++ python.el 2009-02-08 14:10:37.000000000 -0800 @@ -2205,6 +2205,13 @@ \f ;;;; 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 @@ -2221,9 +2228,10 @@ `(progn ;; Usual technique for inserting a skeleton, but expand ;; to the original abbrev instead if in a comment or string. - (define-abbrev python-mode-abbrev-table ,name "" - ',function - nil t) ; system abbrev + (if python-use-skeletons + (define-abbrev python-mode-abbrev-table ,name "" + ',function + nil t)) ; system abbrev (define-skeleton ,function ,(format "Insert Python \"%s\" template." name) ,@elements))))) [-- Attachment #3: Type: text/plain, Size: 1 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2238: Acknowledgement (23.0.90; [PATCH] Regression in python.el) 2009-02-08 22:44 ` bug#2238: Acknowledgement (23.0.90; [PATCH] Regression in python.el) Ian Eure @ 2009-02-09 0:32 ` Stefan Monnier 2009-02-09 6:12 ` Ian Eure 0 siblings, 1 reply; 5+ messages in thread From: Stefan Monnier @ 2009-02-09 0:32 UTC (permalink / raw) To: Ian Eure; +Cc: 2238 > 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 @@ \f ;;;; 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2238: Acknowledgement (23.0.90; [PATCH] Regression in python.el) 2009-02-09 0:32 ` Stefan Monnier @ 2009-02-09 6:12 ` Ian Eure 0 siblings, 0 replies; 5+ messages in thread From: Ian Eure @ 2009-02-09 6:12 UTC (permalink / raw) To: Stefan Monnier; +Cc: 2238 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#2238: marked as done (23.0.90; [PATCH] Regression in python.el) 2009-02-08 22:13 ` bug#2238: 23.0.90; [PATCH] Regression in python.el Ian Eure [not found] ` <handler.2238.B.123413131213357.ack@emacsbugs.donarmstrong.com> @ 2009-02-13 4:20 ` Emacs bug Tracking System 1 sibling, 0 replies; 5+ messages in thread From: Emacs bug Tracking System @ 2009-02-13 4:20 UTC (permalink / raw) To: Glenn Morris [-- Attachment #1: Type: text/plain, Size: 882 bytes --] Your message dated Thu, 12 Feb 2009 23:09:23 -0500 with message-id <ii3aej9dvw.fsf@fencepost.gnu.org> and subject line Re: bug#2238: 23.0.90; [PATCH] Regression in python.el has caused the Emacs bug report #2238, regarding 23.0.90; [PATCH] Regression in python.el to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com immediately.) -- 2238: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=2238 Emacs Bug Tracking System Contact owner@emacsbugs.donarmstrong.com with problems [-- Attachment #2: Type: message/rfc822, Size: 5348 bytes --] From: Ian Eure <ian@digg.com> To: emacs-pretest-bug@gnu.org Subject: 23.0.90; [PATCH] Regression in python.el Date: Sun, 8 Feb 2009 14:13:32 -0800 Message-ID: <E26818DB-5AED-450B-83F5-AF8AC8461504@digg.com> 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 [-- Attachment #3: Type: message/rfc822, Size: 1828 bytes --] From: Glenn Morris <rgm@gnu.org> To: 2238-done@emacsbugs.donarmstrong.com Subject: Re: bug#2238: 23.0.90; [PATCH] Regression in python.el Date: Thu, 12 Feb 2009 23:09:23 -0500 Message-ID: <ii3aej9dvw.fsf@fencepost.gnu.org> 2009-02-12 Stefan Monnier <monnier at iro.umontreal.ca> * progmodes/python.el (python-use-skeletons): Re-add. (def-python-skeleton): Use it. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-02-13 4:20 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <ii3aej9dvw.fsf@fencepost.gnu.org> 2009-02-08 22:13 ` bug#2238: 23.0.90; [PATCH] Regression in python.el Ian Eure [not found] ` <handler.2238.B.123413131213357.ack@emacsbugs.donarmstrong.com> 2009-02-08 22:44 ` bug#2238: Acknowledgement (23.0.90; [PATCH] Regression in python.el) Ian Eure 2009-02-09 0:32 ` Stefan Monnier 2009-02-09 6:12 ` Ian Eure 2009-02-13 4:20 ` bug#2238: marked as done " Emacs bug Tracking System
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.