all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: replace-regexp, the byte-compiler, docstrings, and suggestions
Date: Fri, 17 Oct 2014 03:09:08 +0200	[thread overview]
Message-ID: <87h9z35wp7.fsf@debian.uxu> (raw)
In-Reply-To: mailman.11343.1413504497.1147.help-gnu-emacs@gnu.org

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


  parent reply	other threads:[~2014-10-17  1:09 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-12 18:28 replace-regexp, the byte-compiler, docstrings, and suggestions Emanuel Berg
2014-10-12 20:32 ` John Mastro
2014-10-13  0:50 ` Robert Thorpe
     [not found] ` <mailman.11050.1413145964.1147.help-gnu-emacs@gnu.org>
2014-10-16 23:55   ` Emanuel Berg
2014-10-17  0:07     ` Drew Adams
     [not found]     ` <mailman.11343.1413504497.1147.help-gnu-emacs@gnu.org>
2014-10-17  1:09       ` Emanuel Berg [this message]
2014-10-17  2:22         ` Drew Adams
2014-10-18 17:57         ` Robert Thorpe
2014-10-17  2:26     ` John Mastro
2014-10-17  3:05       ` Stefan Monnier
     [not found]       ` <mailman.11351.1413515156.1147.help-gnu-emacs@gnu.org>
2014-10-17 23:21         ` Emanuel Berg
     [not found]     ` <mailman.11350.1413512841.1147.help-gnu-emacs@gnu.org>
2014-10-17 19:11       ` Emanuel Berg
2014-10-17 19:20         ` Stefan Monnier
     [not found]         ` <mailman.11400.1413573661.1147.help-gnu-emacs@gnu.org>
2014-10-17 19:38           ` Emanuel Berg
2014-10-17 20:15             ` Stefan Monnier
     [not found]             ` <mailman.11404.1413576982.1147.help-gnu-emacs@gnu.org>
2014-10-17 22:52               ` Emanuel Berg

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=87h9z35wp7.fsf@debian.uxu \
    --to=embe8573@student.uu.se \
    --cc=help-gnu-emacs@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.