help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: How to avoid SPACE TAB in a file?


From: Drew Adams
Subject: RE: How to avoid SPACE TAB in a file?
Date: Fri, 27 Nov 2009 07:11:23 -0800

> Thanks again for your responses.  Currently I put in my .emacs.el
> 
> (defun no-space-tab ()
>   (interactive)
>   (let
>       ((point (point)))
>     (save-match-data
>       (goto-char (point-min))
>       (cond
>        ((search-forward " \t" nil t)
>       (backward-char 1)
>       (error "SPACE found prior to TAB! Press Backspace"))
>        (t (goto-char point))))))
> 
> (add-hook 'after-save-hook 'no-space-tab)

`C-h f untabify'





reply via email to

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