[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: delete all whitespace (space) in a region
From: |
tpeplt |
Subject: |
Re: delete all whitespace (space) in a region |
Date: |
Thu, 09 Nov 2023 10:58:31 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) |
Uwe Brauer <oub@mat.ucm.es> writes:
>
>> Emacs 28 added the function ‘replace-string-in-region’.
>
>> (defun my-delete-all-whitespace-region (beg end)
>> (interactive "r")
>> (save-excursion
>> (replace-string-in-region " " "" beg end)))
>
> Ah, thanks, I did not know that
If you want to see more of what has been added, see the NEWS file by
typing C-h n. Unfortunately, this file (for Emacs 28) is large (4000
lines) and the new function above is not mentioned until line 3540.
A new feature that was added Emacs 28 is the ‘shortdoc-display-group’.
Type:
M-x shortdoc-display-group <TAB>
to see a list of the groups for which shortdoc help is available. These
are only a subset of the functions that are available in Emacs.
Type:
M-x shortdoc-display-group <RET>
and then type "buffer" (no quotes) in response to the prompt:
Show summary for functions in: buffer
This will then list brief help/descriptions for many buffer-related
functions in a ‘shortdoc’ buffer, including ‘replace-string-in-region’.
--