all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* how to exit "early" from eg .emacs?
@ 2005-01-15  5:06 David Combs
  2005-01-15 11:11 ` Eli Zaretskii
       [not found] ` <mailman.13285.1105788672.27204.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: David Combs @ 2005-01-15  5:06 UTC (permalink / raw)




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

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

end of thread, other threads:[~2005-01-16 15:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-15  5:06 how to exit "early" from eg .emacs? David Combs
2005-01-15 11:11 ` Eli Zaretskii
     [not found] ` <mailman.13285.1105788672.27204.help-gnu-emacs@gnu.org>
2005-01-15 15:15   ` drkm
2005-01-15 22:46     ` David Combs
2005-01-16  0:19       ` Johan Bockgård
2005-01-16 10:57         ` Romain Francoise
2005-01-16 15:03           ` drkm
2005-01-16  0:49       ` drkm

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.