[Top][All Lists]

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

Re: [PATCH 2/3] lisp/progmodes/etags.el don't (forward-char) as it's ove

From: Konstantin Kharlamov
Subject: Re: [PATCH 2/3] lisp/progmodes/etags.el don't (forward-char) as it's overriden next line
Date: Sun, 17 Mar 2019 00:12:36 +0300

В Сб, мар 16, 2019 at 7:26 ПП (PM), Eli Zaretskii <address@hidden> написал:
 Date: Sat, 16 Mar 2019 18:42:44 +0300
 From: Konstantin Kharlamov <address@hidden>
 Cc: address@hidden

 >>  -    (and (eq selective-display t)
 >>  -     (looking-at "\^m")
 >>  -     (forward-char 1))
 >>       (beginning-of-line)))
 > Did you actually try this change with selective-display in effect?
 > Because I'm not sure it is correct in that case.
 > Thanks.

 Hmm… I will try a bit later, but the code seems really
        1. if current character is ^M, then step forward
        2. step to the beginnig of the line

 The 2 undoes 1.

^M has special meaning in selective-display mode.

Thanks, so, I just tried playing with the mode, and I haven't even found ^M anywhere. I wonder if the ^M being added by the mode is in the past, that just no longer happening.

Specifically, I did:

1. wrote in scratch buffer
2. evaluated (set-selective-display 1) which transformed the look of the text to
3.α Tried searching for ^M by pressing C-s C-q C-m. It's failing to find anything. 3.β Put the caret before the triple dot, as in "test|...", and evaluated (char-after (point)) and (char-after (+ 1 (point))). The first returns "C-j" character, i.e. a newline; the second returns "space character". They're both the exact characters that actually are in text, as if I didn't enable selective-display.

So, even disregarding my patches (because I haven't managed to test this possible corner-case), the need for ^M workarounds is just no longer needed.

reply via email to

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