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

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

Re: loading specific .emacs file on command line?


From: Edward O'Connor
Subject: Re: loading specific .emacs file on command line?
Date: 13 Feb 2003 13:36:28 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

> My problem is I have large sections of my .emacs file that I
> want to use sometimes and not other times. Can I have large
> sections of the .emacs file load only for some files and not
> others?

You could do something like this: say you want to be able to run
emase with a --foo switch, and you want certain things to happen
only when --foo is given on the command line. Something like this
in your .emacs file would do:

(when (member "--foo" command-line-args)
  ;; do
  ;; stuff
  ;; here
  (setq command-line-args (delete "--foo") command-line-args))


Ted

-- 
Edward O'Connor
oconnor@soe.ucsd.edu


reply via email to

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