From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ming Newsgroups: gmane.emacs.help Subject: About untabify in latest pre-test 24.0.95.1 Date: Mon, 16 Apr 2012 14:24:07 -0700 (PDT) Organization: http://groups.google.com Message-ID: <16959090.798.1334611447645.JavaMail.geo-discussion-forums@ynmf4> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1334611815 24795 80.91.229.3 (16 Apr 2012 21:30:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Apr 2012 21:30:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 16 23:30:14 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SJtV0-0004WK-4s for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Apr 2012 23:30:14 +0200 Original-Received: from localhost ([::1]:38286 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SJtUz-0007gQ-Ct for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Apr 2012 17:30:13 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 19 Original-NNTP-Posting-Host: 199.106.103.55 Original-X-Trace: posting.google.com 1334611540 7121 127.0.0.1 (16 Apr 2012 21:25:40 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 16 Apr 2012 21:25:40 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=199.106.103.55; posting-account=CA_o7QoAAACgjBfs5irbIfzdmw0ZBGGg User-Agent: G2/1.0 Original-Xref: usenet.stanford.edu gnu.emacs.help:192067 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:84484 Archived-At: Hello, I am using the following codes to untabify code in c mode. ;; Untabify when saving (defun ska-untabify () (save-excursion (goto-char (point-min)) (when (search-forward "\t" nil t) (untabify (1- (point)) (point-max))) nil)) (defun saving-untabify () (add-hook 'write-contents-functions 'ska-untabify nil t)) (add-hook 'c-mode-common-hook 'saving-untabify) Right now when I try this, it looks like it will remove all tabs in makefile. My understanding is this func only works on cc-mode. Is that correct? Thanks a lot.