[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: replace-regexp, the byte-compiler, docstrings, and suggestions
From: |
Emanuel Berg |
Subject: |
Re: replace-regexp, the byte-compiler, docstrings, and suggestions |
Date: |
Fri, 17 Oct 2014 03:09:08 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Drew Adams <drew.adams@oracle.com> writes:
>> (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.
>
> C-h v indent-tabs-mode
Interesting!
Now I have this to get away with tabs:
(defun untab-all ()
(if (not (member major-mode '(makefile-gmake-mode
makefile-mode) )) ; exceptions
(untabify (point-min) (point-max)) )
nil) ; tell 'did not write buffer to disk'
(setq before-save-hook '(untab-all delete-trailing-whitespace))
Note the Makefile exceptions because what it seems they
don't reason with whitespaces instead of tabs. (Yes, a
bit surprising, like Python, only I don't remember if
that compulsory indentation stretched to include the
indentation-char(s) as well.)
Anyway I just might remove all that stuff since I
myself never include tabs and if the indentation
doesn't either, where should they come from to begin
with?
Only with the Makefile stuff I have to invert the
current situation to instead have the Makefiles
actually keep indent-tabs-mode as t. Ha ha, and to
think some people think programming is difficult!
--
underground experts united
- 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 <=
- 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, 2014/10/16
- 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