all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "Lennart Borgman \(gmail\)" <lennart.borgman@gmail.com>,
	rms@gnu.org, Drew Adams <drew.adams@oracle.com>,
	emacs-devel@gnu.org
Subject: Re: TAB when the region is active
Date: Wed, 19 Sep 2007 18:54:29 -0700	[thread overview]
Message-ID: <200709200154.l8K1sX2u011202@oogie-boogie.ics.uci.edu> (raw)
In-Reply-To: <jwvhclqai4a.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed\, 19 Sep 2007 09\:45\:01 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> 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? 

  reply	other threads:[~2007-09-20  1:54 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-14 21:59 TAB when the region is active Dan Nicolaescu
2007-09-16  5:35 ` Richard Stallman
2007-09-17  4:09   ` Dan Nicolaescu
2007-09-17 22:24     ` Richard Stallman
2007-09-17 22:40       ` Lennart Borgman (gmail)
2007-09-17 22:47         ` Drew Adams
2007-09-17 23:28         ` Dan Nicolaescu
2007-09-19  3:42           ` Dan Nicolaescu
2007-09-19  5:11             ` Drew Adams
2007-09-19 13:45               ` Stefan Monnier
2007-09-19 14:34                 ` Drew Adams
2007-09-19 13:45             ` Stefan Monnier
2007-09-20  1:54               ` Dan Nicolaescu [this message]
2007-09-20 13:52                 ` Stefan Monnier
2007-09-22  1:00                   ` Dan Nicolaescu
2007-09-24  0:07                     ` Juri Linkov
2007-09-24  1:09                       ` Drew Adams
2007-09-24  1:15                         ` Juri Linkov
2007-09-24  3:50                           ` Stefan Monnier
2007-09-29 23:18                             ` M-q when the region is active (Re: TAB when the region is active) Juri Linkov
2007-09-30 12:54                               ` Richard Stallman
2007-10-06 22:43                                 ` M-$ when the region is active (Re: M-q " Juri Linkov
2007-09-24 18:20                           ` TAB when the region is active Richard Stallman
2007-09-24  2:37                       ` Dan Nicolaescu
2007-09-24 18:20                       ` Richard Stallman
2007-09-17 23:13       ` Dan Nicolaescu
2007-09-16 18:48 ` Lennart Borgman
2007-09-16 19:17   ` Paul Pogonyshev
2007-09-16 20:32   ` Drew Adams
2007-09-17  3:59   ` 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=200709200154.l8K1sX2u011202@oogie-boogie.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=lennart.borgman@gmail.com \
    --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.