- (copy-to-buffer copy-buf from to)
- (set-buffer copy-buf)
- (format-insert-annotations write-region-annotations-so-far from)
- (format-encode-run-method to-fn (point-min) (point-max) orig-buf)
+ (let ((inhibit-read-only t)) ; bug#14887
+ (copy-to-buffer copy-buf from to)
+ (set-buffer copy-buf)
+ (format-insert-annotations write-region-annotations-so-far from)
+ (format-encode-run-method to-fn (point-min) (point-max)
+ orig-buf))