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



_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to