all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: "Lennart Borgman \(gmail\)" <lennart.borgman@gmail.com>
Cc: rms@gnu.org, Drew Adams <drew.adams@oracle.com>, emacs-devel@gnu.org
Subject: Re: TAB when the region is active
Date: Mon, 17 Sep 2007 16:28:12 -0700	[thread overview]
Message-ID: <200709172328.l8HNSCK9001067@oogie-boogie.ics.uci.edu> (raw)
In-Reply-To: <46EF0242.1080806@gmail.com> (Lennart Borgman's message of "Tue\, 18 Sep 2007 00\:40\:02 +0200")

"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:

  > Richard Stallman wrote:
  > >       > The idea is logical, but we need to ask users if they find the change
  > >       > annoying.
  > >
  > >     Given that we are not close to a release, this would be a good time to
  > >     experiment.  Can you please OK such a change?
  > >
  > > I will ok trying it, if you agree to follow up in a few weeks
  > > by reminding people to try it and say if they don't like it.
  > 
  > 
  > The code below is what I currently use. There are some problems I know
  > about:

Thanks. I don't know much about the code in indent.el, and I don't see
how your code would fit in the existing framework there.  I would
guess that indent-for-tab-command and the functions that it calls
would need changes.

Any help with getting this right would be greatly appreciated.

  > - I do not remember what Drew wanted to add (in another message).
  > 
  > - indent-according-to-mode is not supported everywhere.
  > 
  > BTW, there is another problem with the indentation functions. I
  > believe it would be useful (at least in mumamo.el) if the function
  > that indents a line where split into one that gives the indentation
  > amount and one that does the indentation (for every major mode).
  > 
  > 
  > (defun indent-line-or-region ()
  >   "Indent line or region.
  > Only do this if indentation seems bound to \\t.
  > 
  > Call `indent-region' if region is active, otherwise
  > `indent-according-to-mode'."
  >   (interactive)
  >   ;; Do a wild guess if we should indent or not ...
  >   (let* ((indent-region-mode)
  >          (t-bound (key-binding [?\t])))
  >     (if (not
  >          (save-match-data
  >            (string-match "indent" (symbol-name t-bound))))
  >         (call-interactively t-bound t)
  >       (if (and mark-active ;; there is a visible region selected
  >                transient-mark-mode)
  >           (indent-region (region-beginning) (region-end))
  >         (indent-according-to-mode))))) ;; indent line

  parent reply	other threads:[~2007-09-17 23:28 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 [this message]
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
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=200709172328.l8HNSCK9001067@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=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.