[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: clearing all lisp definitions
From: |
Thien-Thi Nguyen |
Subject: |
Re: clearing all lisp definitions |
Date: |
Sat, 25 Feb 2006 13:10:11 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Dieter Wilhelm <dieter@duenenhof-wilhelm.de> writes:
> Is there any function which clears all unnecessary lisp
> definitions in the interpreter and leaves a running Emacs in a
> state as if just started with -Q?
well, you could try:
(defun those-who-do-not-study-history--- ()
(interactive)
(let ((kill-emacs-hook nil))
(kill-emacs "emacs -Q")))
but that's probably not completely portable, besides being overkill.
> I'm tinkering around with my own mode and I'm concerned that
> some old remaining definitions might interfere when loading a
> modified mode file. So I'd prefer to start with a clean slate
> (without quitting Emacs every time).
you can clear out all the functions and variables whose names
begin w/ a prefix using `mapatoms' with a function that recognizes
those names and makes their definitions void via `fmakunbound' and
`makunbound', respectively.
thi