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: Ulrich Neumerkel
Subject: Re: How to avoid SPACE TAB in a file?
Date: Thu, 26 Nov 2009 14:46:27 GMT

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)



reply via email to

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