[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#14095: 24.3.50; REGRESSION: `repeat' broken by use of `set-temporary
From: |
Stefan Monnier |
Subject: |
bug#14095: 24.3.50; REGRESSION: `repeat' broken by use of `set-temporary-overlay-map' |
Date: |
Fri, 14 Jun 2013 00:14:17 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> Things seem to work pretty much as they should, but if you do
> `C-s C-y C-e C-e' then as soon as you hit the second `C-e' you
> see this error msg: "Stack overflow in equal", which comes from
> `set-temporary-overlay-map'.
Good point, thanks. I've installed a further fix (see below) which
should fix this problem.
Stefan
=== modified file 'lisp/subr.el'
--- lisp/subr.el 2013-06-13 22:24:52 +0000
+++ lisp/subr.el 2013-06-14 04:08:45 +0000
@@ -3794,12 +3794,15 @@
(if (not load-file-name)
;; Not being provided from a file, run func right now.
(funcall func)
- (let ((lfn load-file-name))
- (letrec ((fun (lambda (file)
+ (let ((lfn load-file-name)
+ ;; Don't use letrec, because equal (in
+ ;; add/remove-hook) would get trapped in a cycle.
+ (fun (make-symbol "eval-after-load-helper")))
+ (fset fun (lambda (file)
(when (equal file lfn)
(remove-hook 'after-load-functions fun)
- (funcall func)))))
- (add-hook 'after-load-functions fun))))))))
+ (funcall func))))
+ (add-hook 'after-load-functions fun)))))))
;; Add FORM to the element unless it's already there.
(unless (member delayed-func (cdr elt))
(nconc elt (list delayed-func)))))))
@@ -4282,7 +4285,10 @@
Optional ON-EXIT argument is a function that is called after the
deactivation of MAP."
- (letrec ((clearfun
+ (let ((clearfun (make-symbol "clear-temporary-overlay-map")))
+ ;; Don't use letrec, because equal (in add/remove-hook) would get trapped
+ ;; in a cycle.
+ (fset clearfun
(lambda ()
;; FIXME: Handle the case of multiple temporary-overlay-maps
;; E.g. if isearch and C-u both use temporary-overlay-maps, Then
@@ -4298,7 +4304,7 @@
(t (funcall keep-pred)))
(remove-hook 'pre-command-hook clearfun)
(internal-pop-keymap map 'overriding-terminal-local-map)
- (when on-exit (funcall on-exit))))))
+ (when on-exit (funcall on-exit)))))
(add-hook 'pre-command-hook clearfun)
(internal-push-keymap map 'overriding-terminal-local-map)))