From: martin rudalics <rudalics@gmx.at>
To: Miles Bader <miles@gnu.org>
Cc: emacs-devel@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>,
rms@gnu.org
Subject: Re: C-u prefix behavior of TAB broken
Date: Sat, 22 Dec 2007 10:28:47 +0100 [thread overview]
Message-ID: <476CD8CF.4060108@gmx.at> (raw)
In-Reply-To: <87fxxvbnbv.fsf@catnip.gol.com>
[-- Attachment #1: Type: text/plain, Size: 1002 bytes --]
>> 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.
[-- Attachment #2: lisp-mode.patch --]
[-- Type: text/plain, Size: 803 bytes --]
*** 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)
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
next prev parent reply other threads:[~2007-12-22 9:28 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-16 22:07 C-u prefix behavior of TAB broken Miles Bader
2007-12-17 12:48 ` martin rudalics
2007-12-17 14:27 ` Miles Bader
2007-12-17 19:03 ` martin rudalics
2007-12-21 0:20 ` Stefan Monnier
2007-12-21 19:49 ` Richard Stallman
2007-12-22 0:11 ` Miles Bader
2007-12-22 9:28 ` martin rudalics [this message]
2007-12-22 13:48 ` Miles Bader
2007-12-22 17:41 ` martin rudalics
2007-12-22 19:52 ` Miles Bader
2007-12-22 22:35 ` martin rudalics
2007-12-22 22:59 ` Miles Bader
2008-02-24 19:05 ` Juri Linkov
2008-02-24 19:26 ` Miles Bader
2008-02-24 19:40 ` Juri Linkov
2008-02-25 2:56 ` Miles Bader
2007-12-23 0:55 ` Stefan Monnier
2007-12-23 1:39 ` Miles Bader
2007-12-23 21:49 ` Stefan Monnier
2007-12-22 21:08 ` Richard Stallman
2007-12-22 22:08 ` martin rudalics
2007-12-23 21:11 ` Richard Stallman
2007-12-23 21:44 ` martin rudalics
2007-12-24 21:55 ` Richard Stallman
2007-12-24 22:33 ` martin rudalics
2007-12-26 5:29 ` Richard Stallman
2007-12-26 13:49 ` Vinicius Jose Latorre
2007-12-26 21:26 ` Richard Stallman
2007-12-27 20:19 ` Juri Linkov
2007-12-28 13:55 ` Richard Stallman
2007-12-28 13:55 ` Richard Stallman
2008-01-03 21:52 ` Juri Linkov
2008-01-03 23:50 ` Miles Bader
2007-12-23 0:51 ` Stefan Monnier
2007-12-23 9:13 ` martin rudalics
2007-12-26 3:00 ` Miles Bader
2007-12-18 2:24 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=476CD8CF.4060108@gmx.at \
--to=rudalics@gmx.at \
--cc=emacs-devel@gnu.org \
--cc=miles@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.