]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/timer.el (timer-event-handler): Protect against timers
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 2 Aug 2010 09:00:46 +0000 (11:00 +0200)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 2 Aug 2010 09:00:46 +0000 (11:00 +0200)
that change current buffer.

lisp/ChangeLog
lisp/emacs-lisp/timer.el

index 18b21843e877427dd50a3c96ba01ca8453463913..4837023ba3b948e21be63cb8dc221fc435494589 100644 (file)
@@ -1,3 +1,8 @@
+2010-08-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/timer.el (timer-event-handler): Protect against timers
+       that change current buffer.
+
 2010-08-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
 
        * mouse.el (mouse-fixup-help-message): Match "mouse-2" only at the
 
 2010-08-01  Chong Yidong  <cyd@stupidchicken.com>
 
-       * 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  <cyd@stupidchicken.com>
 
 
        * term/x-win.el (x-select-text): Doc fix.
 
-2010-07-31  Alan Mackenzie  <acm@muc.de>
-       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  <flat0103@gmail.com>
+
+       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  <jan.h.d@swipnet.se>
 
-       * faces.el (face-all-attributes): Improved documentation (Bug#6767).
+       * faces.el (face-all-attributes): Improve documentation (Bug#6767).
 
 2010-07-31  Eli Zaretskii  <eliz@gnu.org>
 
@@ -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.
 
        * 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.
 2010-07-26  Daiki Ueno  <ueno@unixuser.org>
 
        * 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  <ueno@unixuser.org>
 
index f3b8ddcd123b919795b89468a2aae402c8f3ce18..94f39940b6602d1a06244edfc5083b3cfa5d2ce9 100644 (file)
@@ -321,7 +321,11 @@ This function is called, by name, directly by the C code."
          ;; 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)))