unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Tomas Nordin <tomasn@posteo.net>
Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>,
	Jean Louis <bugs@gnu.support>
Subject: Re: Is there a way to abort loading .el file on condition?
Date: Tue, 30 Apr 2019 12:51:08 -0400	[thread overview]
Message-ID: <CAM-tV-8us2WOzVq8+i_miCFn3Nf_XamvcGNcGnvHs11seYVMOA@mail.gmail.com> (raw)
In-Reply-To: <87muk7qx3w.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me>

On Tue, 30 Apr 2019 at 12:28, Tomas Nordin <tomasn@posteo.net> wrote:
>
> Jean Louis <bugs@gnu.support> writes:

> > I would like to abort loading the .el file, the
> > ~/.emacs file on the condition

> > 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.

I call keyboard-quit for this of thing (I abort when the server is
already running, which usually indicates I forgot the '-Q' when trying
to run 'emacs -Q'), which signals `quit' (which is not a subtype of
error, so it doesn't trigger the "An error occurred while loading..."
thing).



  reply	other threads:[~2019-04-30 16:51 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
2019-04-30 16:51   ` Noam Postavsky [this message]
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=CAM-tV-8us2WOzVq8+i_miCFn3Nf_XamvcGNcGnvHs11seYVMOA@mail.gmail.com \
    --to=npostavs@gmail.com \
    --cc=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=tomasn@posteo.net \
    /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).