From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Thien-Thi Nguyen <ttn@gnu.org>,
romain@orebokech.com, emacs-devel@gnu.org
Subject: Re: Patch: Follow convention for reading with the minibuffer.
Date: Fri, 30 Sep 2005 15:52:40 -0400 [thread overview]
Message-ID: <87vf0iibno.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <877jczfrj2.fsf@jurta.org> (Juri Linkov's message of "Thu, 29 Sep 2005 23:57:29 +0300")
> I much prefer using spaces instead of tabs too. But since I noticed that
> preferable indentation in the Emacs source tree is with tabs I put into
> .emacs the following code:
> (defvar indent-tabs-mode-dirs (list (file-name-directory
> (directory-file-name data-directory)))
> "Set indent-tabs-mode in all files under specified subdirectories.")
This is wrong. For some file types indent-tabs-mode should always be
t (e.g. for ChangeLog and Makefile) and for others it should always be nil
(e.g. for LaTeX and TeXinfo).
How 'bout:
(add-hook 'find-file-hook
(lambda ()
(if (and (null indent-tabs-mode)
(local-variable-p 'indent-tabs-mode) ; Trust the major mode.
(save-excursion
(goto-char (point-min))
;; If there are at least 10 lines with a leading TAB, use TABs.
(re-search-forward "^ " (+ (point) 100000) t 10)))
(set (make-local-variable 'indent-tabs-mode) t))))
-- Stefan
next prev parent reply other threads:[~2005-09-30 19:52 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-06 18:01 Patch: Follow convention for reading with the minibuffer Emilio Lopes
2005-09-06 20:01 ` Stefan Monnier
2005-09-08 2:42 ` Richard M. Stallman
2005-09-08 6:54 ` Juri Linkov
2005-09-09 12:50 ` Richard M. Stallman
2005-09-09 16:05 ` Drew Adams
2005-09-09 17:13 ` Thien-Thi Nguyen
2005-09-09 18:20 ` Stefan Monnier
2005-09-11 13:52 ` Emilio Lopes
2005-09-24 13:52 ` Romain Francoise
2005-09-24 22:09 ` Thien-Thi Nguyen
2005-09-25 12:11 ` Juanma Barranquero
2005-09-29 20:57 ` Juri Linkov
2005-09-30 19:52 ` Stefan Monnier [this message]
2005-10-02 20:23 ` Juri Linkov
2005-09-29 20:59 ` Juri Linkov
2005-09-30 5:55 ` Romain Francoise
2005-09-30 17:34 ` Richard M. 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vf0iibno.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=romain@orebokech.com \
--cc=ttn@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).