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

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

Re: [External] : Re: Regexp for matching control character, say, FORM FE


From: tomas
Subject: Re: [External] : Re: Regexp for matching control character, say, FORM FEED. (Was: Re: The `^L' appeared in built-in help.)
Date: Thu, 22 Jul 2021 17:01:24 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Jul 22, 2021 at 10:53:53PM +0800, Hongyi Zhao wrote:
> On Thu, Jul 22, 2021 at 10:38 PM <tomas@tuxteam.de> wrote:
> >
> > On Thu, Jul 22, 2021 at 09:56:09PM +0800, Hongyi Zhao wrote:
> >
> > [...]
> >
> > > Suppose I've the following content in scratch buffer:
> > >
> > > (re-search-forward "\f")
> > > ^L
> > >
> > > I put the point at the end of sexp line, and hit `C-j' to evaluate it.
> > > I find that each time after the sexp has been evaluated successfully,
> > > the `^L' line will be moved to the next line. See the screenshot in
> > > the attachment, where I've evaluated the sexp 4 times.
> > >
> > > Any hints for this behavior?
> >
> > That depends on what C-j is bound to. What does say "describe-key",
> > aka C-h C-k?
> 
> `C-h k C-j RET':
> ;;;
> C-j runs the command eval-print-last-sexp (found in
> lisp-interaction-mode-map), which is an interactive compiled Lisp
> function in ‘elisp-mode.el’.

Ah. You seem to be in a "lisp interaction" buffer. Then it's clear:
it's the `print' part of `eval-print-last-sexp' what is inserting
stuff in your buffer: the value of (re-search-forward "\f").

Before it does a newline (that is what moves the ^L forward), then the
searching and moving of point happens, then (you should see that, too,
the expression's value (point's position, an integer) is inserted: you
should get a number after the ^L, too.

Cheers
 - t

Attachment: signature.asc
Description: Digital signature


reply via email to

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