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

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

bug#56682: feature/improved-locked-narrowing 9dee6df39c: Reworked locked


From: Juri Linkov
Subject: bug#56682: feature/improved-locked-narrowing 9dee6df39c: Reworked locked narrowing.
Date: Thu, 09 Feb 2023 19:44:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>> >> (save-restriction (widen) (buffer-narrowed-p))
>> >
>> > We should add it and document it, but I'm surprised that there's no
>> > easier way.  One problem with the above is that it could cause a more
>> > thorough redisplay because it fiddles with buffer restrictions.
>>
>> If necessary, a specific function which does not widen could be added to
>> do that, using narrowing_lock_peek_tag:
>>
>> DEFUN ("...", ...) (void)
>> {
>>    if (NILP (narrowing_lock_peek_tag (Fcurrent_buffer ())))
>>      return Qnil;
>>    else
>>      return Qt;
>> }
>
> I don't see how we can get away without doing something like that.
> And I think it should return the tag itself, not just a boolean flag.

'buffer-narrowed-p' could return different symbols(tags) for narrowing lock.





reply via email to

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