unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tomas Nordin <tomasn@posteo.net>
To: Jean Louis <bugs@gnu.support>, help-gnu-emacs@gnu.org
Subject: Re: Is there a way to abort loading .el file on condition?
Date: Tue, 30 Apr 2019 18:25:07 +0200	[thread overview]
Message-ID: <87muk7qx3w.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <20190429054908.GC10317@protected.rcdrun.com>

Jean Louis <bugs@gnu.support> writes:

> Hello,
>
> I would like to abort loading the .el file, the
> ~/.emacs file on the condition, in particular, I
> have two versions of GNU Emacs, the standard one
> 25.3.1 which I would not like to read the .emacs
> file and the one which I use for work, which
> should read the ~/.emacs file.
>
> Is there a way that a condition is inserted on top
> of the ~/.emacs file so that based on the version
> information the file loading gets aborted?

There is "non-local exits", but it is supposed to be used in relation to
errors and wouldn't maybe feel right in this case.

What about having your .emacs basically empty with only a conditional
load of a .emacs-work.el or .emacs-gnu.el file based on the version of
Emacs reading the .emacs file?

Best regards
--
Tomas



  reply	other threads:[~2019-04-30 16:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29  5:49 Is there a way to abort loading .el file on condition? Jean Louis
2019-04-30 16:25 ` Tomas Nordin [this message]
2019-04-30 16:51   ` Noam Postavsky
2019-05-03  2:07   ` Emanuel Berg
2019-05-12  4:06   ` Jean Louis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87muk7qx3w.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me \
    --to=tomasn@posteo.net \
    --cc=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).