From: Arnaldo Mandel <am@ime.usp.br>
Subject: Re: yank-and-indent
Date: Wed, 20 Nov 2002 19:43:57 -0200 [thread overview]
Message-ID: <15836.541.18822.678125@gargle.gargle.HOWL> (raw)
In-Reply-To: <m3n0o4c5k7.fsf@localhost.localdomain>
Michael Slass wrote (on Nov 20, 2002):
> "Timur Aydin" <asdfweasdf@diowekfsdf.dersdre> writes:
>
> >Hi,
> >
> >In programming, very often a number of lines are killed, yanked to another
> >location and are reindented according to the new location. Currently, the
> >following sequence has to be done manually:
> >
> >1) Mark the lines to be killed
> >2) Kill the lines
> >3) Yank into new location
> >4) Mark the same lines again.
> >5) Hit C-M-\ to indent the lines according to new location.
> >
> >I would like to reduce the procedure to:
> >
> >1) Mark the lines to be killed
> >2) Kill the lines
> >3) Hit ???? to yank and indent the lines.
> >
> >Any wisdom on how this can be accomplished? I am a beginner in lisp, so
> >hopefully there is a way that doesn't require writing a lisp function...
> >
> >--
> >Timur
> >
> >
>
> Try this:
>
> (defun yank-and-indent ()
> "Yank and indent yanked material according to mode."
To me this seems excessive: one more function and one more binding to
remember.
What Timur should realize is that step (4) is superfluous - the yanked
lines form the region immediately after yanking. So, ???? is simply
C-y M-C-\
am
--
Arnaldo Mandel
Departamento de Ciência da Computação - Computer Science Department
Universidade de São Paulo, Bra[sz]il
am@ime.usp.br
next prev parent reply other threads:[~2002-11-20 21:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-20 20:28 yank-and-indent Timur Aydin
2002-11-20 21:01 ` yank-and-indent Michael Slass
2002-11-20 21:43 ` Arnaldo Mandel [this message]
2002-11-20 21:07 ` yank-and-indent Alan Shutko
2002-11-20 21:29 ` yank-and-indent Michael Slass
2002-11-20 21:39 ` yank-and-indent Timur Aydin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15836.541.18822.678125@gargle.gargle.HOWL \
--to=am@ime.usp.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.