From 659a9010460fe97b52b45cd61c09c015827091d2 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 3 Feb 2013 10:28:47 -0500 Subject: [PATCH] * lisp/subr.el (internal--called-interactively-p--get-frame): Avoid filling current-load-list. Fixes: debbugs:13366 --- lisp/ChangeLog | 5 +++++ lisp/subr.el | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fdf12be0a1c..693d2d769ce 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-02-03 Stefan Monnier + + * subr.el (internal--called-interactively-p--get-frame): Avoid filling + current-load-list (bug#13366). + 2013-02-02 Christopher Schmidt * progmodes/compile.el (compilation-error-regexp-alist-alist): diff --git a/lisp/subr.el b/lisp/subr.el index e1ab5298409..82bbc022646 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3976,12 +3976,14 @@ the number of frames to skip (minus 1).") ;; "static" variables. (let ((sym (make-symbol "base-index"))) `(progn - (defvar ,sym + (defvar ,sym) + (unless (boundp ',sym) (let ((i 1)) + (message "Computing base-index") (while (not (eq (indirect-function (nth 1 (backtrace-frame i)) t) (indirect-function 'called-interactively-p))) (setq i (1+ i))) - i)) + (setq ,sym i))) ;; (unless (eq (nth 1 (backtrace-frame ,sym)) 'called-interactively-p) ;; (error "called-interactively-p: %s is out-of-sync!" ,sym)) (backtrace-frame (+ ,sym ,n))))) -- 2.39.5