emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r100962: * lisp/emacs-lisp/timer.el (


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r100962: * lisp/emacs-lisp/timer.el (timer-event-handler): Protect against timers
Date: Mon, 02 Aug 2010 11:00:46 +0200
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100962
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2010-08-02 11:00:46 +0200
message:
  * lisp/emacs-lisp/timer.el (timer-event-handler): Protect against timers
  that change current buffer.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/timer.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-08-01 16:48:15 +0000
+++ b/lisp/ChangeLog    2010-08-02 09:00:46 +0000
@@ -1,3 +1,8 @@
+2010-08-02  Stefan Monnier  <address@hidden>
+
+       * emacs-lisp/timer.el (timer-event-handler): Protect against timers
+       that change current buffer.
+
 2010-08-01  YAMAMOTO Mitsuharu  <address@hidden>
 
        * mouse.el (mouse-fixup-help-message): Match "mouse-2" only at the
@@ -9,13 +14,12 @@
 
 2010-08-01  Chong Yidong  <address@hidden>
 
-       * emacs-lisp/package.el (package--list-packages): Fix column
-       alignment.
+       * emacs-lisp/package.el (package--list-packages): Fix column alignment.
        (package--builtins): Tweak descriptions.
-       (package-print-package): Upcase descriptions if necessary.  Show
-       all built-in packages in font-lock-builtin-face.
-       (package-list-packages-internal): Omit "emacs" package.  Show
-       status of built-in packages as "built-in".
+       (package-print-package): Upcase descriptions if necessary.
+       Show all built-in packages in font-lock-builtin-face.
+       (package-list-packages-internal): Omit "emacs" package.
+       Show status of built-in packages as "built-in".
 
 2010-07-31  Chong Yidong  <address@hidden>
 
@@ -24,27 +28,22 @@
 
        * term/x-win.el (x-select-text): Doc fix.
 
-2010-07-31  Alan Mackenzie  <address@hidden>
-       Enhanced Java Mode to handle Java 5.0 (Tiger) and Java 6
-       (Mustang).  Contributed by Nathaniel Flath.  The following
-       functions were modified or created:
+2010-07-31  Nathaniel Flath  <address@hidden>
+
+       Enhance Java Mode to handle Java 5.0 (Tiger) and Java 6 (Mustang).
+       The following functions were modified or created:
 
        * progmodes/cc-vars.el (c-offsets-alist, c-inside-block-syms)
        (objc-font-lock-extra-types):
-
        * progmodes/cc-mode.el (c-basic-common-init):
-
        * progmodes/cc-langs.el (c-make-mode-syntax-table)
        (c++-make-template-syntax-table)
        (c-identifier-syntax-modifications, c-symbol-start, c-operators)
        (c-<-op-cont-regexp, c->-op-cont-regexp, c-class-decl-kwds)
        (c-brace-list-decl-kwds, c-modifier-kwds, c-prefix-spec-kwds-re)
        (c-type-list-kwds, c-decl-prefix-re, c-opt-type-suffix-key):
-
-
        * progmodes/cc-fonts.el (c-make-inverse-face)
        (c-basic-matchers-after):
-
        * progmodes/cc-engine.el (c-forward-keyword-clause)
        (c-forward-<>-arglist, c-forward-<>-arglist-recur)
        (c-forward-name, c-forward-type, c-forward-decl-or-cast-1)
@@ -52,7 +51,7 @@
 
 2010-07-31  Jan Djärv  <address@hidden>
 
-       * faces.el (face-all-attributes): Improved documentation (Bug#6767).
+       * faces.el (face-all-attributes): Improve documentation (Bug#6767).
 
 2010-07-31  Eli Zaretskii  <address@hidden>
 
@@ -71,8 +70,8 @@
        * menu-bar.el (menu-bar-showhide-tool-bar-menu-customize-enable-left)
        (menu-bar-showhide-tool-bar-menu-customize-disable)
        (menu-bar-showhide-tool-bar-menu-customize-enable-right)
-       (menu-bar-showhide-tool-bar-menu-customize-enable-top)
-       (menu-bar-showhide-tool-bar-menu-customize-enable-bottom): New functions
+       (menu-bar-showhide-tool-bar-menu-customize-enable-bottom)
+       (menu-bar-showhide-tool-bar-menu-customize-enable-top): New functions
        (menu-bar-showhide-tool-bar-menu): If tool bar is moveable,
        make a menu for Options => toolbar that can move it.
 
@@ -112,8 +111,7 @@
        * emacs-lisp/package.el (package-archive-base): Var deleted.
        (package-archives): New variable.
        (package-archive-contents): Doc fix.
-       (package-load-descriptor): Do nothing if descriptor file is
-       missing.
+       (package-load-descriptor): Do nothing if descriptor file is missing.
        (package--write-file-no-coding): New function.
        (package-unpack-single): Use it.
        (package-archive-id): New function.
@@ -194,8 +192,7 @@
 2010-07-26  Daiki Ueno  <address@hidden>
 
        * epa-mail.el (epa-mail-mode-map): Add alternative key bindings
-       which consist of control chars only.  Suggested by Richard
-       Stallman.
+       which consist of control chars only.  Suggested by Richard Stallman.
 
 2010-07-25  Daiki Ueno  <address@hidden>
 

=== modified file 'lisp/emacs-lisp/timer.el'
--- a/lisp/emacs-lisp/timer.el  2010-01-13 08:35:10 +0000
+++ b/lisp/emacs-lisp/timer.el  2010-08-02 09:00:46 +0000
@@ -321,7 +321,11 @@
          ;; We do this after rescheduling so that the handler function
          ;; can cancel its own timer successfully with cancel-timer.
          (condition-case nil
-             (apply (timer--function timer) (timer--args timer))
+              ;; Timer functions should not change the current buffer.
+              ;; If they do, all kinds of nasty surprises can happen,
+              ;; and it can be hellish to track down their source.
+              (save-current-buffer
+                (apply (timer--function timer) (timer--args timer)))
            (error nil))
          (if retrigger
              (setf (timer--triggered timer) nil)))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]