diff options
| author | Stefan Monnier | 2010-08-02 11:00:46 +0200 |
|---|---|---|
| committer | Stefan Monnier | 2010-08-02 11:00:46 +0200 |
| commit | 0798a8d85cbb4c6d5948243869bfb137782eaeeb (patch) | |
| tree | 320b2978be6c40d9598da2ade6de2e2e94a68a54 | |
| parent | 9a747ba6507e64e26f87c5173d25428c99b70adb (diff) | |
| download | emacs-0798a8d85cbb4c6d5948243869bfb137782eaeeb.tar.gz emacs-0798a8d85cbb4c6d5948243869bfb137782eaeeb.zip | |
* lisp/emacs-lisp/timer.el (timer-event-handler): Protect against timers
that change current buffer.
| -rw-r--r-- | lisp/ChangeLog | 41 | ||||
| -rw-r--r-- | lisp/emacs-lisp/timer.el | 6 |
2 files changed, 24 insertions, 23 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 18b21843e87..4837023ba3b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-08-02 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/timer.el (timer-event-handler): Protect against timers | ||
| 4 | that change current buffer. | ||
| 5 | |||
| 1 | 2010-08-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 6 | 2010-08-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 7 | ||
| 3 | * mouse.el (mouse-fixup-help-message): Match "mouse-2" only at the | 8 | * mouse.el (mouse-fixup-help-message): Match "mouse-2" only at the |
| @@ -9,13 +14,12 @@ | |||
| 9 | 14 | ||
| 10 | 2010-08-01 Chong Yidong <cyd@stupidchicken.com> | 15 | 2010-08-01 Chong Yidong <cyd@stupidchicken.com> |
| 11 | 16 | ||
| 12 | * emacs-lisp/package.el (package--list-packages): Fix column | 17 | * emacs-lisp/package.el (package--list-packages): Fix column alignment. |
| 13 | alignment. | ||
| 14 | (package--builtins): Tweak descriptions. | 18 | (package--builtins): Tweak descriptions. |
| 15 | (package-print-package): Upcase descriptions if necessary. Show | 19 | (package-print-package): Upcase descriptions if necessary. |
| 16 | all built-in packages in font-lock-builtin-face. | 20 | Show all built-in packages in font-lock-builtin-face. |
| 17 | (package-list-packages-internal): Omit "emacs" package. Show | 21 | (package-list-packages-internal): Omit "emacs" package. |
| 18 | status of built-in packages as "built-in". | 22 | Show status of built-in packages as "built-in". |
| 19 | 23 | ||
| 20 | 2010-07-31 Chong Yidong <cyd@stupidchicken.com> | 24 | 2010-07-31 Chong Yidong <cyd@stupidchicken.com> |
| 21 | 25 | ||
| @@ -24,27 +28,22 @@ | |||
| 24 | 28 | ||
| 25 | * term/x-win.el (x-select-text): Doc fix. | 29 | * term/x-win.el (x-select-text): Doc fix. |
| 26 | 30 | ||
| 27 | 2010-07-31 Alan Mackenzie <acm@muc.de> | 31 | 2010-07-31 Nathaniel Flath <flat0103@gmail.com> |
| 28 | Enhanced Java Mode to handle Java 5.0 (Tiger) and Java 6 | 32 | |
| 29 | (Mustang). Contributed by Nathaniel Flath. The following | 33 | Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang). |
| 30 | functions were modified or created: | 34 | The following functions were modified or created: |
| 31 | 35 | ||
| 32 | * progmodes/cc-vars.el (c-offsets-alist, c-inside-block-syms) | 36 | * progmodes/cc-vars.el (c-offsets-alist, c-inside-block-syms) |
| 33 | (objc-font-lock-extra-types): | 37 | (objc-font-lock-extra-types): |
| 34 | |||
| 35 | * progmodes/cc-mode.el (c-basic-common-init): | 38 | * progmodes/cc-mode.el (c-basic-common-init): |
| 36 | |||
| 37 | * progmodes/cc-langs.el (c-make-mode-syntax-table) | 39 | * progmodes/cc-langs.el (c-make-mode-syntax-table) |
| 38 | (c++-make-template-syntax-table) | 40 | (c++-make-template-syntax-table) |
| 39 | (c-identifier-syntax-modifications, c-symbol-start, c-operators) | 41 | (c-identifier-syntax-modifications, c-symbol-start, c-operators) |
| 40 | (c-<-op-cont-regexp, c->-op-cont-regexp, c-class-decl-kwds) | 42 | (c-<-op-cont-regexp, c->-op-cont-regexp, c-class-decl-kwds) |
| 41 | (c-brace-list-decl-kwds, c-modifier-kwds, c-prefix-spec-kwds-re) | 43 | (c-brace-list-decl-kwds, c-modifier-kwds, c-prefix-spec-kwds-re) |
| 42 | (c-type-list-kwds, c-decl-prefix-re, c-opt-type-suffix-key): | 44 | (c-type-list-kwds, c-decl-prefix-re, c-opt-type-suffix-key): |
| 43 | |||
| 44 | |||
| 45 | * progmodes/cc-fonts.el (c-make-inverse-face) | 45 | * progmodes/cc-fonts.el (c-make-inverse-face) |
| 46 | (c-basic-matchers-after): | 46 | (c-basic-matchers-after): |
| 47 | |||
| 48 | * progmodes/cc-engine.el (c-forward-keyword-clause) | 47 | * progmodes/cc-engine.el (c-forward-keyword-clause) |
| 49 | (c-forward-<>-arglist, c-forward-<>-arglist-recur) | 48 | (c-forward-<>-arglist, c-forward-<>-arglist-recur) |
| 50 | (c-forward-name, c-forward-type, c-forward-decl-or-cast-1) | 49 | (c-forward-name, c-forward-type, c-forward-decl-or-cast-1) |
| @@ -52,7 +51,7 @@ | |||
| 52 | 51 | ||
| 53 | 2010-07-31 Jan Djärv <jan.h.d@swipnet.se> | 52 | 2010-07-31 Jan Djärv <jan.h.d@swipnet.se> |
| 54 | 53 | ||
| 55 | * faces.el (face-all-attributes): Improved documentation (Bug#6767). | 54 | * faces.el (face-all-attributes): Improve documentation (Bug#6767). |
| 56 | 55 | ||
| 57 | 2010-07-31 Eli Zaretskii <eliz@gnu.org> | 56 | 2010-07-31 Eli Zaretskii <eliz@gnu.org> |
| 58 | 57 | ||
| @@ -71,8 +70,8 @@ | |||
| 71 | * menu-bar.el (menu-bar-showhide-tool-bar-menu-customize-enable-left) | 70 | * menu-bar.el (menu-bar-showhide-tool-bar-menu-customize-enable-left) |
| 72 | (menu-bar-showhide-tool-bar-menu-customize-disable) | 71 | (menu-bar-showhide-tool-bar-menu-customize-disable) |
| 73 | (menu-bar-showhide-tool-bar-menu-customize-enable-right) | 72 | (menu-bar-showhide-tool-bar-menu-customize-enable-right) |
| 74 | (menu-bar-showhide-tool-bar-menu-customize-enable-top) | 73 | (menu-bar-showhide-tool-bar-menu-customize-enable-bottom) |
| 75 | (menu-bar-showhide-tool-bar-menu-customize-enable-bottom): New functions | 74 | (menu-bar-showhide-tool-bar-menu-customize-enable-top): New functions |
| 76 | (menu-bar-showhide-tool-bar-menu): If tool bar is moveable, | 75 | (menu-bar-showhide-tool-bar-menu): If tool bar is moveable, |
| 77 | make a menu for Options => toolbar that can move it. | 76 | make a menu for Options => toolbar that can move it. |
| 78 | 77 | ||
| @@ -112,8 +111,7 @@ | |||
| 112 | * emacs-lisp/package.el (package-archive-base): Var deleted. | 111 | * emacs-lisp/package.el (package-archive-base): Var deleted. |
| 113 | (package-archives): New variable. | 112 | (package-archives): New variable. |
| 114 | (package-archive-contents): Doc fix. | 113 | (package-archive-contents): Doc fix. |
| 115 | (package-load-descriptor): Do nothing if descriptor file is | 114 | (package-load-descriptor): Do nothing if descriptor file is missing. |
| 116 | missing. | ||
| 117 | (package--write-file-no-coding): New function. | 115 | (package--write-file-no-coding): New function. |
| 118 | (package-unpack-single): Use it. | 116 | (package-unpack-single): Use it. |
| 119 | (package-archive-id): New function. | 117 | (package-archive-id): New function. |
| @@ -194,8 +192,7 @@ | |||
| 194 | 2010-07-26 Daiki Ueno <ueno@unixuser.org> | 192 | 2010-07-26 Daiki Ueno <ueno@unixuser.org> |
| 195 | 193 | ||
| 196 | * epa-mail.el (epa-mail-mode-map): Add alternative key bindings | 194 | * epa-mail.el (epa-mail-mode-map): Add alternative key bindings |
| 197 | which consist of control chars only. Suggested by Richard | 195 | which consist of control chars only. Suggested by Richard Stallman. |
| 198 | Stallman. | ||
| 199 | 196 | ||
| 200 | 2010-07-25 Daiki Ueno <ueno@unixuser.org> | 197 | 2010-07-25 Daiki Ueno <ueno@unixuser.org> |
| 201 | 198 | ||
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index f3b8ddcd123..94f39940b66 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el | |||
| @@ -321,7 +321,11 @@ This function is called, by name, directly by the C code." | |||
| 321 | ;; We do this after rescheduling so that the handler function | 321 | ;; We do this after rescheduling so that the handler function |
| 322 | ;; can cancel its own timer successfully with cancel-timer. | 322 | ;; can cancel its own timer successfully with cancel-timer. |
| 323 | (condition-case nil | 323 | (condition-case nil |
| 324 | (apply (timer--function timer) (timer--args timer)) | 324 | ;; Timer functions should not change the current buffer. |
| 325 | ;; If they do, all kinds of nasty surprises can happen, | ||
| 326 | ;; and it can be hellish to track down their source. | ||
| 327 | (save-current-buffer | ||
| 328 | (apply (timer--function timer) (timer--args timer))) | ||
| 325 | (error nil)) | 329 | (error nil)) |
| 326 | (if retrigger | 330 | (if retrigger |
| 327 | (setf (timer--triggered timer) nil))) | 331 | (setf (timer--triggered timer) nil))) |