diff options
| author | Stefan Monnier | 2010-01-10 00:22:54 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2010-01-10 00:22:54 -0500 |
| commit | 4e5617ee4096a9f036b078f16f508147cf3653a1 (patch) | |
| tree | eb1bfc026f2291aafb64e3ddb2d339adc0ba648f | |
| parent | a069f06729651c5128ea07873924d38518ece677 (diff) | |
| download | emacs-4e5617ee4096a9f036b078f16f508147cf3653a1.tar.gz emacs-4e5617ee4096a9f036b078f16f508147cf3653a1.zip | |
(format-annotate-function): Only set
write-region-post-annotation-function after running to-fn so as not to
affect nested write-region calls (bug#5273).
| -rw-r--r-- | lisp/ChangeLog | 41 | ||||
| -rw-r--r-- | lisp/format.el | 12 |
2 files changed, 32 insertions, 21 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 270f036cd3e..677f1b404ea 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,13 @@ | |||
| 1 | 2010-01-10 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * format.el (format-annotate-function): Only set | ||
| 4 | write-region-post-annotation-function after running to-fn so as not to | ||
| 5 | affect nested write-region calls (bug#5273). | ||
| 6 | |||
| 1 | 2010-01-10 Chong Yidong <cyd@stupidchicken.com> | 7 | 2010-01-10 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 8 | ||
| 3 | * cedet/semantic.el (semantic-new-buffer-setup-functions): Add | 9 | * cedet/semantic.el (semantic-new-buffer-setup-functions): |
| 4 | python parser. | 10 | Add python parser. |
| 5 | 11 | ||
| 6 | * Makefile.in (ELCFILES): Add wisent/python-wy.el and | 12 | * Makefile.in (ELCFILES): Add wisent/python-wy.el and |
| 7 | wisent/python.el. | 13 | wisent/python.el. |
| @@ -33,8 +39,8 @@ | |||
| 33 | 39 | ||
| 34 | 2010-01-08 Kenichi Handa <handa@m17n.org> | 40 | 2010-01-08 Kenichi Handa <handa@m17n.org> |
| 35 | 41 | ||
| 36 | * international/fontset.el (build-default-fontset-data): Exclude | 42 | * international/fontset.el (build-default-fontset-data): |
| 37 | characters in scripts kana, hangul, han, or cjk-misc. | 43 | Exclude characters in scripts kana, hangul, han, or cjk-misc. |
| 38 | 44 | ||
| 39 | 2010-01-07 Juanma Barranquero <lekktu@gmail.com> | 45 | 2010-01-07 Juanma Barranquero <lekktu@gmail.com> |
| 40 | 46 | ||
| @@ -54,8 +60,8 @@ | |||
| 54 | 60 | ||
| 55 | 2010-01-05 Tom Tromey <tromey@redhat.com> | 61 | 2010-01-05 Tom Tromey <tromey@redhat.com> |
| 56 | 62 | ||
| 57 | * progmodes/python.el (python-font-lock-keywords): Handle | 63 | * progmodes/python.el (python-font-lock-keywords): |
| 58 | qualified decorators (Bug#881). | 64 | Handle qualified decorators (Bug#881). |
| 59 | 65 | ||
| 60 | 2010-01-05 Dan Nicolaescu <dann@ics.uci.edu> | 66 | 2010-01-05 Dan Nicolaescu <dann@ics.uci.edu> |
| 61 | 67 | ||
| @@ -64,8 +70,7 @@ | |||
| 64 | 70 | ||
| 65 | 2010-01-05 Kenichi Handa <handa@m17n.org> | 71 | 2010-01-05 Kenichi Handa <handa@m17n.org> |
| 66 | 72 | ||
| 67 | * language/indian.el (malayalam-composable-pattern): Fix ZWNJ and | 73 | * language/indian.el (malayalam-composable-pattern): Fix ZWNJ and ZWJ. |
| 68 | ZWJ. | ||
| 69 | 74 | ||
| 70 | 2010-01-05 Dan Nicolaescu <dann@ics.uci.edu> | 75 | 2010-01-05 Dan Nicolaescu <dann@ics.uci.edu> |
| 71 | 76 | ||
| @@ -90,8 +95,8 @@ | |||
| 90 | 2010-01-02 Daniel Elliott <danelliottster@gmail.com> (tiny change) | 95 | 2010-01-02 Daniel Elliott <danelliottster@gmail.com> (tiny change) |
| 91 | 96 | ||
| 92 | * progmodes/octave-mod.el (octave-end-keywords) | 97 | * progmodes/octave-mod.el (octave-end-keywords) |
| 93 | (octave-block-begin-or-end-regexp, octave-block-match-alist): Add | 98 | (octave-block-begin-or-end-regexp, octave-block-match-alist): |
| 94 | "end" keyword (Bug#3061). | 99 | Add "end" keyword (Bug#3061). |
| 95 | (octave-end-as-array-index-p): New function. | 100 | (octave-end-as-array-index-p): New function. |
| 96 | (calculate-octave-indent): Use it. | 101 | (calculate-octave-indent): Use it. |
| 97 | 102 | ||
| @@ -121,18 +126,18 @@ | |||
| 121 | 126 | ||
| 122 | 2010-01-02 Karl Fogel <kfogel@red-bean.com> | 127 | 2010-01-02 Karl Fogel <kfogel@red-bean.com> |
| 123 | 128 | ||
| 124 | * bookmark.el (bookmark-bmenu-select, bookmark-bmenu-1-window, | 129 | * bookmark.el (bookmark-bmenu-select, bookmark-bmenu-1-window) |
| 125 | (bookmark-bmenu-2-window, bookmark-bmenu-this-window) | 130 | (bookmark-bmenu-2-window, bookmark-bmenu-this-window) |
| 126 | (bookmark-bmenu-other-window, bookmark-bmenu-switch-other-window) | 131 | (bookmark-bmenu-other-window, bookmark-bmenu-switch-other-window) |
| 127 | (bookmark-bmenu-show-annotation, bookmark-bmenu-edit-annotation) | 132 | (bookmark-bmenu-show-annotation, bookmark-bmenu-edit-annotation) |
| 128 | (bookmark-bmenu-rename, bookmark-bmenu-locate) | 133 | (bookmark-bmenu-rename, bookmark-bmenu-locate) |
| 129 | (bookmark-bmenu-relocate, bookmark-bmenu-goto-bookmark): Remove | 134 | (bookmark-bmenu-relocate, bookmark-bmenu-goto-bookmark): |
| 130 | unnecessary calls to `bookmark-bmenu-ensure-position'. | 135 | Remove unnecessary calls to `bookmark-bmenu-ensure-position'. |
| 131 | 136 | ||
| 132 | 2010-01-02 Eli Zaretskii <eliz@gnu.org> | 137 | 2010-01-02 Eli Zaretskii <eliz@gnu.org> |
| 133 | 138 | ||
| 134 | * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Make | 139 | * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): |
| 135 | the lines in the generated doc string shorter. (Bug#4668) | 140 | Make the lines in the generated doc string shorter. (Bug#4668) |
| 136 | 141 | ||
| 137 | 2010-01-02 Ryan Yeske <rcyeske@gmail.com> | 142 | 2010-01-02 Ryan Yeske <rcyeske@gmail.com> |
| 138 | 143 | ||
| @@ -140,10 +145,10 @@ | |||
| 140 | 145 | ||
| 141 | 2010-01-02 Eli Zaretskii <eliz@gnu.org> | 146 | 2010-01-02 Eli Zaretskii <eliz@gnu.org> |
| 142 | 147 | ||
| 143 | * Makefile.in (bzr-update): Renamed from cvs-update. | 148 | * Makefile.in (bzr-update): Rename from cvs-update. |
| 144 | (cvs-update): New target for backward compatibility. | 149 | (cvs-update): New target for backward compatibility. |
| 145 | 150 | ||
| 146 | * makefile.w32-in (bzr-update): Renamed from cvs-update. | 151 | * makefile.w32-in (bzr-update): Rename from cvs-update. |
| 147 | (cvs-update): New target for backward compatibility. | 152 | (cvs-update): New target for backward compatibility. |
| 148 | 153 | ||
| 149 | 2010-01-02 Karl Fogel <kfogel@red-bean.com> | 154 | 2010-01-02 Karl Fogel <kfogel@red-bean.com> |
| @@ -9765,7 +9770,7 @@ See ChangeLog.14 for earlier changes. | |||
| 9765 | ;; coding: utf-8 | 9770 | ;; coding: utf-8 |
| 9766 | ;; End: | 9771 | ;; End: |
| 9767 | 9772 | ||
| 9768 | Copyright (C) 2009 Free Software Foundation, Inc. | 9773 | Copyright (C) 2009, 2010 Free Software Foundation, Inc. |
| 9769 | 9774 | ||
| 9770 | This file is part of GNU Emacs. | 9775 | This file is part of GNU Emacs. |
| 9771 | 9776 | ||
diff --git a/lisp/format.el b/lisp/format.el index 37dd95bd1c4..f19a207180f 100644 --- a/lisp/format.el +++ b/lisp/format.el | |||
| @@ -222,9 +222,6 @@ For most purposes, consider using `format-encode-region' instead." | |||
| 222 | (multibyte enable-multibyte-characters) | 222 | (multibyte enable-multibyte-characters) |
| 223 | (coding-system buffer-file-coding-system)) | 223 | (coding-system buffer-file-coding-system)) |
| 224 | (with-current-buffer copy-buf | 224 | (with-current-buffer copy-buf |
| 225 | (set (make-local-variable | ||
| 226 | 'write-region-post-annotation-function) | ||
| 227 | 'kill-buffer) | ||
| 228 | (setq selective-display sel-disp) | 225 | (setq selective-display sel-disp) |
| 229 | (set-buffer-multibyte multibyte) | 226 | (set-buffer-multibyte multibyte) |
| 230 | (setq buffer-file-coding-system coding-system)) | 227 | (setq buffer-file-coding-system coding-system)) |
| @@ -232,6 +229,15 @@ For most purposes, consider using `format-encode-region' instead." | |||
| 232 | (set-buffer copy-buf) | 229 | (set-buffer copy-buf) |
| 233 | (format-insert-annotations write-region-annotations-so-far from) | 230 | (format-insert-annotations write-region-annotations-so-far from) |
| 234 | (format-encode-run-method to-fn (point-min) (point-max) orig-buf) | 231 | (format-encode-run-method to-fn (point-min) (point-max) orig-buf) |
| 232 | (when (buffer-live-p copy-buf) | ||
| 233 | (with-current-buffer copy-buf | ||
| 234 | ;; Set write-region-post-annotation-function to | ||
| 235 | ;; delete the buffer once the write is done, but do | ||
| 236 | ;; it after running to-fn so it doesn't affect | ||
| 237 | ;; write-region calls in to-fn. | ||
| 238 | (set (make-local-variable | ||
| 239 | 'write-region-post-annotation-function) | ||
| 240 | 'kill-buffer))) | ||
| 235 | nil) | 241 | nil) |
| 236 | ;; Otherwise just call function, it will return annotations. | 242 | ;; Otherwise just call function, it will return annotations. |
| 237 | (funcall to-fn from to orig-buf))))) | 243 | (funcall to-fn from to orig-buf))))) |