help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: clearing all lisp definitions


From: Kevin Rodgers
Subject: Re: clearing all lisp definitions
Date: Wed, 01 Mar 2006 11:39:11 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Thien-Thi Nguyen wrote:
Dieter Wilhelm <address@hidden> 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.

If Dieter's mode properly `provide's its own feature, M-x unload-feature
should do the trick.

--
Kevin Rodgers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]