emacs-devel
[Top][All Lists]
Advanced

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

Re: master 4ab7c30: delete-trailing-whitespace: handle read-only text in


From: Noam Postavsky
Subject: Re: master 4ab7c30: delete-trailing-whitespace: handle read-only text in buffer
Date: Thu, 8 Dec 2016 08:49:12 -0500

On Thu, Dec 8, 2016 at 5:15 AM, Leo Liu <address@hidden> wrote:
> On 2016-12-07 20:06 +0000, Sam Steingold wrote:
>> branch: master
>> +(defun region-modifiable-p (start end)
>> +  "Return non-nil if the region contain no non-read-only text."
>> +  (and (not (get-text-property start 'read-only))
>> +       (eq end (next-single-property-change start 'read-only nil end))))
>
> Do you mean "no read-only text"?
>

Or even "if the region contains some writable text." (less double-negative-ish).



reply via email to

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