[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: Follow convention for reading with the minibuffer.

From: Juri Linkov
Subject: Re: Patch: Follow convention for reading with the minibuffer.
Date: Thu, 29 Sep 2005 23:57:29 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

> the elisp (and other) code i maintain never uses tabs for indentation,
> accomplished primarily by setting `indent-tabs-mode' to nil.  when i
> edit code that uses tabs for indentation, i leave the part not relevant
> to the edit alone but take no extra steps to use tabs for the part that
> i'm editing.  i wasn't aware of any convention that contradicts this
> practice and no one has complained about it.  am i missing something?

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.")

(defun indent-tabs-mode ()
  "Set indent-tabs-mode in files under dirs in `indent-tabs-mode-dirs'."
  (if (and indent-tabs-mode-dirs
            (concat "^\\("
                    (mapconcat 'regexp-quote indent-tabs-mode-dirs "\\|")
      (setq indent-tabs-mode t)))

(add-hook 'find-file-hooks 'indent-tabs-mode)

Juri Linkov

reply via email to

[Prev in Thread] Current Thread [Next in Thread]