🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.emacs
Article #8305

Re: How do I abort processing of .emacs?

#8305
From: Dave Biesack
Date: Fri, 13 Jan 1989 19:38
59 lines
2514 bytes
In article <103@garnet.UUCP> randy@garnet.UUCP (Randy Orrison) writes:
> (if (equal (getenv "HOME") "/")
>     ( skip-the-rest-of-.emacs ))
> 
> How do I do the skip?  (Or, is there a better way to do what I want?)

One solution is to put any non-definition expressions of your .emacs
into a function, then your test can call that function under the 
circumstances you wish. For example,

(defun init-emacs ()
  ( rest-of-.emacs ))

Then, at the bottom of your .emacs, you have:

(or (equal (getenv "HOME") "/") (init-emacs))

This has an advantage that the function init-emacs can be byte compiled,
whereas top-level forms not in functions can't (last time i checked.)
So, your .emacs file can be loaded much faster. 

Another option, if your .emacs is very large and you don't want
emacs to spend time loading it when you login as root, is to
put most of it in another file, emacs.el, and have the .emacs
file load emacs.el[c] only under the conditions you specify.

> 
> 	Thanks!!!
> 		-randy
> 
> (P.S.  someday I'm going to read the elisp programming manual and
> write a function that re-formats quoted paragraphs, keeping the '> '
> at the beginning of each line, unless someone else has already done
> this...  hint hint)
> 


try "C-x .":
set-fill-prefix:
Set the fill-prefix to the current line up to point.
Filling expects lines to start with the fill prefix
and reinserts the fill prefix in each resulting line.

If you put the cursor at the '(' on the line beginning "> (P.S"
and execute set-fill-prefix, you can justify the paragraph. Is
this what you mean? For example, with fill-column equal to 78,
I executed fill-paragraph on your P.S. to get:

> (P.S.  someday I'm going to read the elisp programming manual and write a
> function that re-formats quoted paragraphs, keeping the '> ' at the
> beginning of each line, unless someone else has already done this...  hint
> hint)

djb

-- 
David J. Biesack  			Data General
{seismo, ...}!mcnc!rti!dg-rtp!biesack	Research Triangle Park, NC
biesack@dg-rtp.dg.com			(919) 248-5989
Technical Details
Message-ID: <2824@xyzzy.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!lll-winken!ames!xanth!mcnc!rti!xyzzy!biesack
References: <103@garnet.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!lll-winken!ames!xanth!mcnc!rti!xyzzy!biesack
From: biesack@xyzzy.UUCP (Dave Biesack)
Newsgroups: comp.emacs
Subject: Re: How do I abort processing of .emacs?
Message-ID: <2824@xyzzy.UUCP>
Date: 13 Jan 89 19:38:19 GMT
References: <103@garnet.UUCP>
Reply-To: biesack@dg-rtp.UUCP ()
Distribution: na
Organization: Data General Corporation, Research Triangle, NC
Lines: 58