Subject: Re: bug#21201: 25.0.50; (buffer-modified-p) errors inside cl-letf

From: Nicolas Richard <[email-masked]>
Date: Fri, 07 Aug 2015 00:50:45 +0200

Artur Malabarba <[email-masked]> writes:
> 2015-08-06 21:07 GMT+01:00 Nicolas Richard <[email-masked]>:
>>  (gv-define-setter buffer-modified-p (flag &optional buf)
>> -  `(with-current-buffer ,buf
>> -     (set-buffer-modified-p ,flag)))
>> +  (if buf
>> +      `(with-current-buffer ,buf
>> +         (set-buffer-modified-p ,flag))
>> +    `(set-buffer-modified-p ,flag)))
>
> Don't know if it's possible, but shouldn't it try to ensure that it's
> in the same buffer as before?

I agree with you, but I don't know how to do that.