[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Looking for some examples
From: |
Emanuel Berg |
Subject: |
Re: Looking for some examples |
Date: |
Wed, 06 Oct 2021 22:10:53 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Emanuel Berg via Users list for the GNU Emacs text editor wrote:
> Patrick Mahan wrote:
>
>> I am converting these all to inline functions and already
>> have some emacs lisp code written to handle converting
>> everything but the backslashes. I would like to remove the
>> backslashes, but I do not want to leave all that empty
>> whitespace behind. Is there a way to do this using
>> query-replace-regexp that also removes the whitespace?
>
> ;; (setq before-save-hook nil)
> (defun before-save-hook-f ()
> (untab-all)
> (delete-trailing-whitespace) )
> (add-hook 'before-save-hook #'before-save-hook-f)
Also see `whitespace-cleanup'.
As for your question ... can't you just add [[:space:]]* to
the regexp that matches the backslash and have all of
it removed?
Maybe better to just save the buffer still ...
--
underground experts united
https://dataswamp.org/~incal