From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: C-u prefix behavior of TAB broken Date: Sat, 22 Dec 2007 10:28:47 +0100 Message-ID: <476CD8CF.4060108@gmx.at> References: <874peijnu4.fsf@catnip.gol.com> <47667010.40209@gmx.at> <87tzmhs8g8.fsf@catnip.gol.com> <4766C7F7.5060504@gmx.at> <87fxxvbnbv.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000002010406050904030503" X-Trace: ger.gmane.org 1198315749 23205 80.91.229.12 (22 Dec 2007 09:29:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Dec 2007 09:29:09 +0000 (UTC) Cc: emacs-devel@gnu.org, Stefan Monnier , rms@gnu.org To: Miles Bader Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 22 10:29:21 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 1J60fZ-00047w-Et for ged-emacs-devel@m.gmane.org; Sat, 22 Dec 2007 10:29:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J60fD-0001xv-BZ for ged-emacs-devel@m.gmane.org; Sat, 22 Dec 2007 04:29:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J60f1-0001tk-NH for emacs-devel@gnu.org; Sat, 22 Dec 2007 04:28:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J60ez-0001sD-U4 for emacs-devel@gnu.org; Sat, 22 Dec 2007 04:28:46 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J60ex-0001rj-Nt for emacs-devel@gnu.org; Sat, 22 Dec 2007 04:28:44 -0500 Original-Received: from mail.gmx.net ([213.165.64.20]) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1J60ex-0006tE-45 for emacs-devel@gnu.org; Sat, 22 Dec 2007 04:28:43 -0500 Original-Received: (qmail invoked by alias); 22 Dec 2007 09:28:41 -0000 Original-Received: from N826P017.adsl.highway.telekom.at (EHLO [62.47.47.49]) [62.47.47.49] by mail.gmx.net (mp019) with SMTP; 22 Dec 2007 10:28:41 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX19SbLx9/AlScAKKFYC3Kbsg8gFaic1paZDwsrRAFe exnlmyaXdauPD7 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en In-Reply-To: <87fxxvbnbv.fsf@catnip.gol.com> X-Y-GMX-Trusted: 0 X-detected-kernel: by monty-python.gnu.org: 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:85366 Archived-At: This is a multi-part message in MIME format. --------------000002010406050904030503 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit >> This said, IMNSHO the feature we're talking about shouldn't be implement >> in lisp-mode and c-mode but directly generically in >> indent-for-tab-command. >> >>If that works, by all means do it. FWIW all indent-line-functions with the exception of `lisp-indent-line' either don't have arguments or, like `c-indent-line', `f90-indent-line', and `(c)perl-indent-line' expect completely different arguments here. Hence a generic solution seems hardly practicable. For the case a prefix argument is given and the region is not active, we could try to set the region around the smallest containing form and call `indent-region' on that. But that would be a different feature. > I'd certainly be grateful! > > [I didn't realize I used it so much (on the face of it, it seems like a > rather obscure bit of functionality), but I find my fingers keep trying > to invoke it, and I keep being surprised when it doesn't work... ] For `lisp-indent-line' I can offer the attached patch. --------------000002010406050904030503 Content-Type: text/plain; name="lisp-mode.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lisp-mode.patch" *** lisp-mode.el.~1.209.~ Tue Oct 9 11:52:54 2007 --- lisp-mode.el Sat Dec 22 09:55:52 2007 *************** *** 821,827 **** (if (> (- (point-max) pos) (point)) (goto-char (- (point-max) pos))) ;; If desired, shift remaining lines of expression the same amount. ! (and whole-exp (not (zerop shift-amt)) (save-excursion (goto-char beg) (forward-sexp 1) --- 821,831 ---- (if (> (- (point-max) pos) (point)) (goto-char (- (point-max) pos))) ;; If desired, shift remaining lines of expression the same amount. ! (and (or whole-exp ! (and current-prefix-arg ! (or (not transient-mark-mode) ! (not mark-active)))) ! (not (zerop shift-amt)) (save-excursion (goto-char beg) (forward-sexp 1) --------------000002010406050904030503 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --------------000002010406050904030503--