emacs-devel
[Top][All Lists]
Advanced

[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: Sun, 02 Oct 2005 23:23:33 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

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

Good heuristic.

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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