aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-07-26 20:29:42 -0400
committerGlenn Morris2013-07-26 20:29:42 -0400
commitf26afdb0c543d2fe5299aa7c45a321d63534d687 (patch)
treeafcc0fadf50b6801f33dacf537a8a25cc3ac20b5
parentff62aabc622fdf35aaa878fd284f446de85fc5fd (diff)
downloademacs-f26afdb0c543d2fe5299aa7c45a321d63534d687.tar.gz
emacs-f26afdb0c543d2fe5299aa7c45a321d63534d687.zip
* lisp/format.el (format-annotate-function): Handle read-only text properties
in the source. Fixes: debbugs:14887
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/format.el10
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 @@
12013-07-27 Glenn Morris <rgm@gnu.org>
2
3 * format.el (format-annotate-function):
4 Handle read-only text properties in the source. (Bug#14887)
5
12013-07-24 Glenn Morris <rgm@gnu.org> 62013-07-24 Glenn Morris <rgm@gnu.org>
2 7
3 * dired-x.el (dired-mark-extension): Convert comment to doc string. 8 * 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."
225 (setq selective-display sel-disp) 225 (setq selective-display sel-disp)
226 (set-buffer-multibyte multibyte) 226 (set-buffer-multibyte multibyte)
227 (setq buffer-file-coding-system coding-system)) 227 (setq buffer-file-coding-system coding-system))
228 (copy-to-buffer copy-buf from to) 228 (let ((inhibit-read-only t)) ; bug#14887
229 (set-buffer copy-buf) 229 (copy-to-buffer copy-buf from to)
230 (format-insert-annotations write-region-annotations-so-far from) 230 (set-buffer copy-buf)
231 (format-encode-run-method to-fn (point-min) (point-max) orig-buf) 231 (format-insert-annotations write-region-annotations-so-far from)
232 (format-encode-run-method to-fn (point-min) (point-max)
233 orig-buf))
232 (when (buffer-live-p copy-buf) 234 (when (buffer-live-p copy-buf)
233 (with-current-buffer copy-buf 235 (with-current-buffer copy-buf
234 ;; Set write-region-post-annotation-function to 236 ;; Set write-region-post-annotation-function to