[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: replace-regexp, the byte-compiler, docstrings, and suggestions
From: |
John Mastro |
Subject: |
Re: replace-regexp, the byte-compiler, docstrings, and suggestions |
Date: |
Thu, 16 Oct 2014 19:26:54 -0700 |
Emanuel Berg <embe8573@student.uu.se> wrote:
> Yeah, indent-rigidly is close only this
>
> (indent-rigidly (region-beginning) (region-end) 4)
>
> seems to sometimes insert tabs (one tab and one space
> in text-mode, but four spaces in message-mode what I
> can see). If you can have it not do that (insert tabs,
> ever) I'm happy. (I have tabs removed on save but I
> still don't like to insert them for the same reason I
> have them removed.)
You can keep tabs from being inserted by setting `indent-tabs-mode' to
nil. It's a buffer-local variable, so what I do is `setq-default' it to
nil and then override that in hooks for modes where I really do want
tabs (e.g. `makefile-mode').
> Question is (which I didn't mention in my OP), should
> the region be refilled after it gets the new margin,
> and, if so, what should the fill-column be?
So far I deal with that on a case-by-case basis. If I'm quoting code, I
probably don't want it to be filled, but if it's text I probably do.
Off-hand I can't think of a reason to use a different `fill-column' than
whatever is already set for the buffer.
>> To indent by four spaces you would do something like
>> C-4 C-x <tab>
>
> Yeah, you mean `C-u 4 C-x TAB'? (`C-x TAB' is
> `indent-rigidly'.)
`C-N foo' and `C-u N foo' both give `foo' a numeric argument `N' (for
any N 0-9). I often find the former a bit nicer since, for example, I
can do something like press control with my right hand and (without
releasing control) press 4 and then x with my left hand. You can also
use `M-N' in exactly the same way. Of course, which is more convenient
varies a lot by the specific key sequence and, even more so, by taste.
--
john
- replace-regexp, the byte-compiler, docstrings, and suggestions, Emanuel Berg, 2014/10/12
- Re: replace-regexp, the byte-compiler, docstrings, and suggestions, John Mastro, 2014/10/12
- Re: replace-regexp, the byte-compiler, docstrings, and suggestions, Robert Thorpe, 2014/10/12
- Message not available
- Re: replace-regexp, the byte-compiler, docstrings, and suggestions, Emanuel Berg, 2014/10/16
- RE: replace-regexp, the byte-compiler, docstrings, and suggestions, Drew Adams, 2014/10/16
- Message not available
- Re: replace-regexp, the byte-compiler, docstrings, and suggestions, Emanuel Berg, 2014/10/16
- RE: replace-regexp, the byte-compiler, docstrings, and suggestions, Drew Adams, 2014/10/16
- Re: replace-regexp, the byte-compiler, docstrings, and suggestions, Robert Thorpe, 2014/10/18
- Re: replace-regexp, the byte-compiler, docstrings, and suggestions,
John Mastro <=
- Re: replace-regexp, the byte-compiler, docstrings, and suggestions, Stefan Monnier, 2014/10/16
- Message not available
- Re: replace-regexp, the byte-compiler, docstrings, and suggestions, Emanuel Berg, 2014/10/17
- Message not available
- Re: replace-regexp, the byte-compiler, docstrings, and suggestions, Emanuel Berg, 2014/10/17
- Re: replace-regexp, the byte-compiler, docstrings, and suggestions, Stefan Monnier, 2014/10/17
- Message not available
- Re: replace-regexp, the byte-compiler, docstrings, and suggestions, Emanuel Berg, 2014/10/17
- Re: replace-regexp, the byte-compiler, docstrings, and suggestions, Stefan Monnier, 2014/10/17
- Message not available
- Re: replace-regexp, the byte-compiler, docstrings, and suggestions, Emanuel Berg, 2014/10/17
- Prev by Date:
RE: replace-regexp, the byte-compiler, docstrings, and suggestions
- Next by Date:
Re: replace-regexp, the byte-compiler, docstrings, and suggestions
- Previous by thread:
Re: replace-regexp, the byte-compiler, docstrings, and suggestions
- Next by thread:
Re: replace-regexp, the byte-compiler, docstrings, and suggestions
- Index(es):