Sujet : Re: Block Comments Or Rest-Of-Line Comments?
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 21. Mar 2024, 23:50:46
Autres entêtes
Organisation : None to speak of
Message-ID : <871q8319o9.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Lawrence D'Oliveiro <
ldo@nz.invalid> writes:
On Thu, 21 Mar 2024 12:48:53 -0700, Keith Thompson wrote:
It's a Perl script ...
>
Shame. I was hoping for something in, say, Emacs Lisp, that can be invoked
from directly within the editor, operating on a selected region within the
buffer, and bound to a keystroke.
Feel free to write it. (And an Emacs Lisp function doesn't help me in vim.)
Perhaps I should have mentioned that the Perl script I posted reads from
stdin and writes to stdout. It can also read from one or more files
named on its command line.
It slurps all its input into memory. I could have written it to stream
stdin to stdout, which could work better for large inputs, but the
current version works well enough for me.
#if 0
* Meanwhile, Emacs can invoke an external command on a region of text, and
* you can bind that to a keystroke if you like. I used it on this paragraph.
#endif /* 0 */
"shell-command-on-region" is bound to "M-|" (Alt-| or Esc |).
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comWorking, but not speaking, for Medtronicvoid Void(void) { Void(); } /* The recursive call of the void */