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

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

how to exit "early" from eg .emacs?


From: David Combs
Subject: how to exit "early" from eg .emacs?
Date: 15 Jan 2005 00:06:13 -0500


Suppose I'm having a problem with eg narrow-to-region,
but the problem occurs (if and) only if .emacs has been
read in.

I'd like to instrument my .emacs such that every so often
it asks "abort reading .emacs now?", and if I answer yes,
it does -- and leaves me in emacs, where I can try narrowing,
and see if it works or not.

... and eventually discover just where in .emacs my problem-code is.

(for efficiency, choosing where to say "no" a-la-bisection.)

   <some elisp code>

        (if (y-or-n-p "STOP processing this .emacs file -- NOW?")
            (progn
                (WHAT-DO-I-PUT-HERE?)))

   <some more elisp code>

        (if (y-or-n-p "STOP processing this .emacs file -- NOW?")
            (progn
                (WHAT-DO-I-PUT-HERE?)))

   <yet more elisp code>


        (if (y-or-n-p "STOP processing this .emacs file -- NOW?")
            (progn
                (WHAT-DO-I-PUT-HERE?)))

So, what *do* I put here   ^^^^^^  ?

(Again, I don;'t want to exit emacs; I merely want to
  make emacs think it's come to the eof of .emacs.)

-------

I suppose one thing I can do is wrap the whole insides of .emacs
 (after the final defun -- aren't they required to be top-level?)
 and use some kind of elisp "return from defun", or something?

(But I'd *much* rather simply fool emacs into thinking it's seen the eof.)



Thanks,

David



reply via email to

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