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

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

Re: whitespace issues


From: Jorge A. Alfaro-Murillo
Subject: Re: whitespace issues
Date: Tue, 30 Jun 2015 11:03:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Rusi writes:

I have two somewhat related questions, both around whitespace: 1. Is it possible to have some sort of save-hook so that all leading (indentation) whitespace is cleaned up to space alone and tabs are removed?

(add-hook 'before-save-hook (lambda () (save-excursion (untabify (point-min) (point-max)))))

2. How to make a dirty crlf file in emacs? By dirty I mean, some lines ending LF (ie Unix) and some ending CRLF (ie DOS) [This is to test that such dirty-files are not add-able into git]

This I don't know.

Best,
--
Jorge.




reply via email to

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