[Top][All Lists]

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

About untabify in latest pre-test

From: Ming
Subject: About untabify in latest pre-test
Date: Mon, 16 Apr 2012 14:24:07 -0700 (PDT)
User-agent: G2/1.0


I am using the following codes to untabify code in c mode.

;; Untabify when saving
(defun ska-untabify ()
    (goto-char (point-min))
    (when (search-forward "\t" nil t)
      (untabify (1- (point)) (point-max)))

(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.

reply via email to

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