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

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

bug#50646: 28.0.50; narrow-to-defun sometimes narrows to wrong defun


From: Arthur Miller
Subject: bug#50646: 28.0.50; narrow-to-defun sometimes narrows to wrong defun
Date: Sun, 19 Sep 2021 22:02:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Phil Sainty <psainty@orcon.net.nz> writes:

> On 2021-09-19 18:36, Arthur Miller wrote:
>> My question is though, why it happens only with 'when'? I haven't
>> found any other form to show same behaviour. There probably are
>> some, I just haven't found them by manually testing.
>
> Now that you've narrowed this down to a code conversion issue, that
> part was simple to debug (by comparing the buffer in its literal and
> non-literal forms), and the reason is that subr.el contains multi-byte
> characters.  This included a documentation bug, as the docstring for
> `setq-local' had this paragraph in the source:
>
>     The second VALUE is not computed until after the first VARIABLE
>     is set, and so on; each VALUE can use the new value of variables
>     set earlier in the ‘setq-local’.  The return value of the
>     ‘setq-local’ form is the value of the last VALUE.
>
> Note the incorrect unicode quote characters.
>
> I've just pushed a fix for that, but there's also a more intentional
> INVERTED EXCLAMATION MARK unicode character in one of the comments,
> though, and I've left this alone.
>
>     ;; ¡Beware! when I tried to edebug this code, Emacs got into a weird state
>     ;; where all the keys were unbound (i.e. it somehow got triggered
>     ;; within read-key, apparently).  I had to kill it.
>
> In short, you don't want to be making assumptions about the encoding
> of elisp files.
>
> Tangentially, the commit message related to those quote characters
> says "expand the doc string by taking some text from `setq'", so I
> believe those fancy unicode quote characters were accidentally copied
> and pasted from a *Help* buffer rendering of the `setq' docstring.
> I think it's a good idea to set `text-quoting-style' to 'grave to
> ensure that can never happen.
>
>
> -Phil
Hi, sorry for the later answers, but it was busy day for me today.

I just answered you in other, so I won't repeat here. Yes, I realized myself
what is going on today; I didn't do any testing and such, I such sent mail, when
I saw myself I used 'literal' version there.

Anyway, thanks, and I see from the responses between you and Eli that it
resulted in some updates to manual and you fixing erronous characters in
subr.el, so my goofy misstake at least brought something good :).

Anyway, thanks for the help and good job!





reply via email to

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