[Top][All Lists]

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

Re: About `char' in momentary-string-display

From: Xue Fuqiao
Subject: Re: About `char' in momentary-string-display
Date: Fri, 18 Oct 2013 15:44:17 +0800

On Thu, Oct 17, 2013 at 9:17 PM, Kevin Rodgers
<address@hidden> wrote:
> On 10/17/13 7:06 AM, Xue Fuqiao wrote:
>> In (info "(elisp) Temporary Displays"):
>>   -- Function: momentary-string-display string position&optional char
>>            message
>> [...]
>>       Thus, typing CHAR will simply remove the string from the display,
>>       while typing (say) `C-f' will remove the string from the display
>>       and later (presumably) move point forward.  The argument CHAR is a
>>       space by default.
>> I tried evaluating ‘(momentary-string-display "foo" 1)’ in the *scratch*
>> buffer and typed ‘C-f’, but the point didn't move forward.  Instead, a
>> ‘[6]’ is echoed in the *Messages* buffer.  I don't know what the ‘[6]’
>> stands for, but the codepoint for ^F is #x6 (ACK).  So I think there may
>> be a link between them.
>> But anyway, why didn't the point move forward (the point wasn't at eob)?
>> Can anyone point me in the right direction?
> CHAR defaults to SPC, but you typed C-f.  What happens if you type SPC?

Thanks for your attention.  If I type SPC, Emacs (as expected) ignores
it.  But what I'm asking is about the case when CHAR ≠ the-character-i-press.

> What happens if you specify C-f as CHAR:
> (momentary-string-display "foo" 1 ?\C-f)

It doesn't make sense, I think.  Emacs will simply remove "foo" from the
display, and ignore the "C-f".  It is the same as pressing SPC with
‘(momentary-string-display "foo" 1)’.

Best regards, Xue Fuqiao.

reply via email to

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