From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: dedent in Python-mode Date: Mon, 25 Jun 2007 23:44:54 +0300 Message-ID: <200706252344.54496.pogonyshev@gmx.net> References: <200706242344.06799.pogonyshev@gmx.net> <200706252118.38137.pogonyshev@gmx.net> <86odj3lrbe.fsf@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1182803473 23784 80.91.229.12 (25 Jun 2007 20:31:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 25 Jun 2007 20:31:13 +0000 (UTC) Cc: Markus Triska To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 25 22:31:12 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1I2vDM-00017j-67 for ged-emacs-devel@m.gmane.org; Mon, 25 Jun 2007 22:31:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I2vDL-0001vm-Nt for ged-emacs-devel@m.gmane.org; Mon, 25 Jun 2007 16:31:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I2vDI-0001tR-I3 for emacs-devel@gnu.org; Mon, 25 Jun 2007 16:31:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I2vDE-0001rz-R4 for emacs-devel@gnu.org; Mon, 25 Jun 2007 16:31:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I2vDE-0001rw-JO for emacs-devel@gnu.org; Mon, 25 Jun 2007 16:31:04 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1I2vDE-0002Kh-3W for emacs-devel@gnu.org; Mon, 25 Jun 2007 16:31:04 -0400 Original-Received: (qmail invoked by alias); 25 Jun 2007 20:31:01 -0000 Original-Received: from unknown (EHLO [80.94.230.31]) [80.94.230.31] by mail.gmx.net (mp043) with SMTP; 25 Jun 2007 22:31:01 +0200 X-Authenticated: #16844820 X-Provags-ID: V01U2FsdGVkX1/70zlQaLX7q/8ptoYFSlOa461SpoVqlse7M1Pwfh vvfHIE7yO7E3U2 User-Agent: KMail/1.7.2 In-Reply-To: <86odj3lrbe.fsf@gmx.at> Content-Disposition: inline X-Y-GMX-Trusted: 0 X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:73853 Archived-At: Markus Triska wrote: > Paul Pogonyshev writes: > > > Yeah. In principle, I could write backtab function in my .emacs as > > well. But don't you agree that if I press Shift+Tab and nothing in > > the buffer changes, not even the point position, it looks like a > > little broken? > > Please try this patch instead of the previous one: Sorry, doesn't work at all here: class Test (): I put point right after (): and evaluate (newline-and-indent): Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) 1-(nil) (setq python-indent-index (1- python-indent-list-length)) (if (and (= dir -1) (= ... ...) (> python-indent-list-length 1)) (progn (setq python-indent-index ...) (python-indent-propose)) (setq python-indent-index (1- python-indent-list-length)) (python-indent-line-1)) (if (and (member this-command cyclic) (member last-command cyclic)) (if (= 1 python-indent-list-length) (message "Sole indentation") (progn ... ...)) (if (and ... ... ...) (progn ... ...) (setq python-indent-index ...) (python-indent-line-1))) (let ((cyclic ...)) (if (and ... ...) (if ... ... ...) (if ... ... ... ...))) python-indent-line-dir(1) python-indent-line() indent-according-to-mode() newline-and-indent() eval((newline-and-indent)) eval-expression((newline-and-indent) nil) call-interactively(eval-expression) Paul