all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* clearing all lisp definitions
@ 2006-02-23 21:41 Dieter Wilhelm
  0 siblings, 0 replies; 4+ messages in thread
From: Dieter Wilhelm @ 2006-02-23 21:41 UTC (permalink / raw)


Hi friends of Emacs

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?

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).

Thanks

-- 
Best wishes

     Dieter Wilhelm

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: clearing all lisp definitions
       [not found] <mailman.50.1140863024.5016.help-gnu-emacs@gnu.org>
@ 2006-02-25 12:10 ` Thien-Thi Nguyen
  2006-03-01 18:39   ` Kevin Rodgers
  2006-02-25 12:41 ` John Paul Wallington
  1 sibling, 1 reply; 4+ messages in thread
From: Thien-Thi Nguyen @ 2006-02-25 12:10 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: clearing all lisp definitions
       [not found] <mailman.50.1140863024.5016.help-gnu-emacs@gnu.org>
  2006-02-25 12:10 ` clearing all lisp definitions Thien-Thi Nguyen
@ 2006-02-25 12:41 ` John Paul Wallington
  1 sibling, 0 replies; 4+ messages in thread
From: John Paul Wallington @ 2006-02-25 12:41 UTC (permalink / raw)
  Cc: help-gnu-emacs

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?
>
> 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).

How about M-x unload-feature ?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: clearing all lisp definitions
  2006-02-25 12:10 ` clearing all lisp definitions Thien-Thi Nguyen
@ 2006-03-01 18:39   ` Kevin Rodgers
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2006-03-01 18:39 UTC (permalink / raw)


Thien-Thi Nguyen wrote:
> 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.

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

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-03-01 18:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.50.1140863024.5016.help-gnu-emacs@gnu.org>
2006-02-25 12:10 ` clearing all lisp definitions Thien-Thi Nguyen
2006-03-01 18:39   ` Kevin Rodgers
2006-02-25 12:41 ` John Paul Wallington
2006-02-23 21:41 Dieter Wilhelm

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.