all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nerius Landys <nlandys@gmail.com>
To: PJ Weisberg <pj@irregularexpressions.net>
Cc: help-gnu-emacs <Help-gnu-emacs@gnu.org>
Subject: Re: [emacs] tabs, spaces, and indentation
Date: Fri, 8 Oct 2010 15:12:05 -0700	[thread overview]
Message-ID: <AANLkTikR_H3jB1oM+EOLLhqTOyCnDswFEu39OyLGr7Ti@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimYx2SnjHT=qAiX6ND9cJLrFvO3PeyWMdwZmpHm@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]

>
>
> > Setting indent-line-function and indent-region-function doesn't seem
> > to do a damn thing, but (local-set-key "\t" 'self-insert-command)
> > works for #1 when it's called after you've switched to the major mode
> > you're using.
> >
> > Also, if you configure tab-always-indent to nil Tab will only indent
> > if the cursor is at the start of the line.  You can always insert a
> > literal tab with C-q Tab.
> >
> > Dunno what to do about #2.  The help docs lead me to believe setting
> > indent-line-function and indent-region-function is the answer, but
> > like I said those don't seem to do anything.
>
> I guess there isn't an easier way to do it, because a few hours after
> I wrote this somebody posted a proposal on emacs-devel for making #2
> easier to turn on and off, because right now every major mode does it
> it's own way.  (Personally, I'd also prefer it to be off.  I can press
> TAB when I want the line indented in the standard way.  If I indented
> it differently I don't want it changed because I fixed some
> punctuation.)
>
> Anyway, I've discovered that c-mode binds certain keys (semicolor,
> comma, etc) to functions that indent the line in addition to inserting
> a character.  You can "fix" those by rebinding them to
> 'self-insert-command, just like you can with TAB.
>
>
Wow sounds like Emacs is becoming too intelligent.  Kind of like that old
version of Microsoft Word.

[-- Attachment #2: Type: text/html, Size: 1855 bytes --]

  reply	other threads:[~2010-10-08 22:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-06 20:06 [emacs] tabs, spaces, and indentation Nerius Landys
2010-10-07  4:22 ` PJ Weisberg
2010-10-08 21:44   ` PJ Weisberg
2010-10-08 22:12     ` Nerius Landys [this message]
2010-10-07  6:26 ` Jonathan Groll
     [not found] ` <mailman.5.1286432793.11901.help-gnu-emacs@gnu.org>
2010-10-07  9:30   ` Stefan Monnier
2010-10-09  2:08 ` Steve Revilak
2010-10-11 20:19   ` Nerius Landys
2010-10-11 21:43     ` PJ Weisberg
2010-10-11 22:14       ` Nerius Landys
2010-10-12  1:42     ` Steve Revilak
     [not found]   ` <mailman.3.1286828409.23066.help-gnu-emacs@gnu.org>
2010-10-11 21:58     ` Pascal J. Bourguignon
     [not found] <mailman.5.1286400966.24129.help-gnu-emacs@gnu.org>
2010-10-06 22:05 ` despen

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=AANLkTikR_H3jB1oM+EOLLhqTOyCnDswFEu39OyLGr7Ti@mail.gmail.com \
    --to=nlandys@gmail.com \
    --cc=Help-gnu-emacs@gnu.org \
    --cc=pj@irregularexpressions.net \
    /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.