Avoid GC crashes.
authorRichard M. Stallman <rms@gnu.org>
Fri, 21 Mar 2014 23:16:26 +0000 (19:16 -0400)
committerRichard M. Stallman <rms@gnu.org>
Fri, 21 Mar 2014 23:16:26 +0000 (19:16 -0400)
* lisp/subr.el (set-transient-map): Clear out function and value
of the temporary symbol when we're done with it.

lisp/ChangeLog
lisp/subr.el

index 7e26346..cdb9c35 100644 (file)
@@ -1,5 +1,8 @@
 2014-03-21  Richard Stallman  <rms@gnu.org>
 
+       * subr.el (set-transient-map): Clear out function and value
+       of the temporary symbol when we're done with it.
+
        * mail/rmailsum.el (rmail-summary-delete-forward):
        Optimize case of reaching end and handling count.
        (rmail-summary-mark-deleted): Optimize when N is current msg.
index e4350bf..1246efe 100644 (file)
@@ -4312,7 +4312,10 @@ lookup sequence then continues."
                        (t (funcall keep-pred)))
                 (internal-pop-keymap map 'overriding-terminal-local-map)
                 (remove-hook 'pre-command-hook clearfun)
-                (when on-exit (funcall on-exit))))))
+               (when on-exit (funcall on-exit))
+;; Comment out the fset if you want to debug the GC bug.
+               (fset clearfun nil)
+                (set clearfun nil)))))
     (add-hook 'pre-command-hook clearfun)
     (internal-push-keymap map 'overriding-terminal-local-map)))