diff options
author | Glenn Morris <rgm@gnu.org> | 2013-07-26 20:29:42 -0400 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-07-26 20:29:42 -0400 |
commit | f26afdb0c543d2fe5299aa7c45a321d63534d687 (patch) | |
tree | afcc0fadf50b6801f33dacf537a8a25cc3ac20b5 | |
parent | ff62aabc622fdf35aaa878fd284f446de85fc5fd (diff) | |
download | emacs-f26afdb0c543d2fe5299aa7c45a321d63534d687.tar.gz emacs-f26afdb0c543d2fe5299aa7c45a321d63534d687.tar.bz2 emacs-f26afdb0c543d2fe5299aa7c45a321d63534d687.zip |
* lisp/format.el (format-annotate-function): Handle read-only text properties
in the source.
Fixes: debbugs:14887
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/format.el | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0c5b857d374..14af1cfbda9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-07-27 Glenn Morris <rgm@gnu.org> + + * format.el (format-annotate-function): + Handle read-only text properties in the source. (Bug#14887) + 2013-07-24 Glenn Morris <rgm@gnu.org> * dired-x.el (dired-mark-extension): Convert comment to doc string. diff --git a/lisp/format.el b/lisp/format.el index 221eaadcdd8..fc8dcb97b01 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -225,10 +225,12 @@ For most purposes, consider using `format-encode-region' instead." (setq selective-display sel-disp) (set-buffer-multibyte multibyte) (setq buffer-file-coding-system coding-system)) - (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)) (when (buffer-live-p copy-buf) (with-current-buffer copy-buf ;; Set write-region-post-annotation-function to |