From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Drew Adams <drew.adams@oracle.com>
Cc: 14095-done@debbugs.gnu.org
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 [thread overview]
Message-ID: <jwvehc5e3ea.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <4cbccd0a-9143-4572-a589-471072bd0aea@default> (Drew Adams's message of "Thu, 13 Jun 2013 20:42:04 -0700 (PDT)")
> 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)))
next prev parent reply other threads:[~2013-06-14 4:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-30 17:13 bug#14095: 24.3.50; REGRESSION: `repeat' broken by use of `set-temporary-overlay-map' Drew Adams
2013-06-13 20:44 ` Stefan Monnier
2013-06-14 3:42 ` Drew Adams
2013-06-14 4:14 ` Stefan Monnier [this message]
2013-06-20 2:24 ` Drew Adams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvehc5e3ea.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=14095-done@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.