[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TAB when the region is active
From: |
Dan Nicolaescu |
Subject: |
Re: TAB when the region is active |
Date: |
Wed, 19 Sep 2007 18:54:29 -0700 |
Stefan Monnier <address@hidden> writes:
> > Here's my first try at doing this.
>
> The change should not be in indent-according-to-mode, but in
> indent-for-tab-command.
If I do it like this:
*** indent.el 26 Jul 2007 10:17:33 -0700 1.68
--- indent.el 19 Sep 2007 18:29:56 -0700
***************
*** 98,104 ****
((memq indent-line-function '(indent-relative indent-relative-maybe))
(funcall indent-line-function))
(t ;; The normal case.
! (indent-according-to-mode))))
(defun insert-tab (&optional arg)
(let ((count (prefix-numeric-value arg)))
--- 101,110 ----
((memq indent-line-function '(indent-relative indent-relative-maybe))
(funcall indent-line-function))
(t ;; The normal case.
! (if (and transient-mark-mode mark-active
! (not (eq (region-beginning) (region-end))))
! (indent-region (region-beginning) (region-end))
! (indent-according-to-mode)))))
(defun insert-tab (&optional arg)
(let ((count (prefix-numeric-value arg)))
then indenting the region by pressing TAB does not work in c-mode
anymore (it did work in my first try).
Should c-mode also not bind TAB?
- Re: TAB when the region is active, (continued)
- Re: TAB when the region is active, Dan Nicolaescu, 2007/09/17
- Re: TAB when the region is active, Richard Stallman, 2007/09/17
- Re: TAB when the region is active, Lennart Borgman (gmail), 2007/09/17
- RE: TAB when the region is active, Drew Adams, 2007/09/17
- Re: TAB when the region is active, Dan Nicolaescu, 2007/09/17
- Re: TAB when the region is active, Dan Nicolaescu, 2007/09/18
- RE: TAB when the region is active, Drew Adams, 2007/09/19
- Re: TAB when the region is active, Stefan Monnier, 2007/09/19
- RE: TAB when the region is active, Drew Adams, 2007/09/19
- Re: TAB when the region is active, Stefan Monnier, 2007/09/19
- Re: TAB when the region is active,
Dan Nicolaescu <=
- Re: TAB when the region is active, Stefan Monnier, 2007/09/20
- Re: TAB when the region is active, Dan Nicolaescu, 2007/09/21
- Re: TAB when the region is active, Juri Linkov, 2007/09/23
- RE: TAB when the region is active, Drew Adams, 2007/09/23
- Re: TAB when the region is active, Juri Linkov, 2007/09/23
- Re: TAB when the region is active, Stefan Monnier, 2007/09/23
- Re: M-q when the region is active (Re: TAB when the region is active), Juri Linkov, 2007/09/29
- Re: M-q when the region is active (Re: TAB when the region is active), Richard Stallman, 2007/09/30
- Re: TAB when the region is active, Richard Stallman, 2007/09/24
- Re: TAB when the region is active, Dan Nicolaescu, 2007/09/23