[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: M-x elp-instrument-package RET RET makes emacs unusable
From: |
Eli Zaretskii |
Subject: |
Re: M-x elp-instrument-package RET RET makes emacs unusable |
Date: |
Sat, 12 May 2001 09:16:33 +0300 |
> From: Simon Josefsson <simon@josefsson.org>
> Date: 11 May 2001 21:59:06 +0200
>
> I wanted to instrument a package for profiling, and typed M-x
> elp-instrument-packe RET and accidently hit one RET extra, thus
> presumably trying to instrument all elisp functions. After this emacs
> is completely unusable, I can't even kill the window:
>
> Lisp nesting exceeds max-lisp-eval-depth
>
> I'm not sure if it's possible to prevent this properly, but it's quite
> annoying if you had lots of work in progress.
>
> (Happens in both 20.7 and 21.0 pretest)
Does the change below look okay?
(It's possible that a better way would be to count the number of
instrumented functions and bail out if it's too large, but I don't
know how to define ``too large''.)
Index: lisp/emacs-lisp/elp.el
===================================================================
RCS file: /cvs/emacs/lisp/emacs-lisp/elp.el,v
retrieving revision 1.20
diff -u -r1.20 elp.el
--- lisp/emacs-lisp/elp.el 2000/11/01 19:14:57 1.20
+++ lisp/emacs-lisp/elp.el 2001/05/12 06:12:09
@@ -323,6 +323,8 @@
\\[elp-instrument-package] RET elp- RET"
(interactive "sPrefix of package to instrument: ")
+ (if (zerop (length prefix))
+ (error "Instrumenting all Emacs functions would render Emacs unusable."))
(elp-instrument-list
(mapcar
'intern
Re: M-x elp-instrument-package RET RET makes emacs unusable, Richard Stallman, 2001/05/12