From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Patch: Follow convention for reading with the minibuffer. Date: Sun, 02 Oct 2005 23:23:33 +0300 Organization: JURTA Message-ID: <87r7b4anbr.fsf@jurta.org> References: <87psqy1sk1.fsf@pacem.orebokech.com> <877jczfrj2.fsf@jurta.org> <87vf0iibno.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1128292610 14054 80.91.229.2 (2 Oct 2005 22:36:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 2 Oct 2005 22:36:50 +0000 (UTC) Cc: ttn@gnu.org, romain@orebokech.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 03 00:36:47 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EMCQa-0001Me-C3 for ged-emacs-devel@m.gmane.org; Mon, 03 Oct 2005 00:35:28 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EMCQZ-00019x-KD for ged-emacs-devel@m.gmane.org; Sun, 02 Oct 2005 18:35:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EMCPA-0000dt-Li for emacs-devel@gnu.org; Sun, 02 Oct 2005 18:34:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EMCP6-0000bg-2a for emacs-devel@gnu.org; Sun, 02 Oct 2005 18:33:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EMCP5-0000Z3-MN for emacs-devel@gnu.org; Sun, 02 Oct 2005 18:33:55 -0400 Original-Received: from [194.126.101.111] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EMCG4-0004e4-6c; Sun, 02 Oct 2005 18:24:36 -0400 Original-Received: from mail.neti.ee (80-235-42-225-dsl.mus.estpak.ee [80.235.42.225]) by Relayhost1.neti.ee (Postfix) with ESMTP id 19E521812; Mon, 3 Oct 2005 01:24:31 +0300 (EEST) Original-To: Stefan Monnier In-Reply-To: <87vf0iibno.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 30 Sep 2005 15:52:40 -0400") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:43476 Archived-At: > 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/