unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Marcin Borkowski <mbork@wmi.amu.edu.pl>,
	Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: RE: How to quit?
Date: Wed, 25 Feb 2015 15:21:56 -0800 (PST)	[thread overview]
Message-ID: <d54efce9-35aa-46db-9df0-5a6ca46bf27e@default> (raw)
In-Reply-To: <87y4nm3svs.fsf@wmi.amu.edu.pl>

> OK, so I have a problem, and it doesn't show up when I do emacs -Q.  So
> I take a deep breath and bisect my 900-line init.el...
> 
> In LaTeX, however, when I have some weird problem, I can put \endinput
> in a file, and everything past that is ignored.  Is there anything like
> that in Elisp?
>
> It just occured to me that (debug) /might/ work, and so might
> (keyboard-quit).  Is this a good idea?  Are there any others?

Just put `(top-level)' in your init file where you want it to stop.
Command `top-level' returns to, well, Emacs top-level. ;-)

But really you will find, I think, that commenting-out blocks of the
file is the handiest.  I bind `C-x C-;' to `comment-region', which
comments or (with `C-u') uncomments the region, and which nests and
unnests such commented blocks (unlike `comment-dwim').

Actually, I bind `C-x C-;' to this command, from `misc-cmds.el'
(http://www.emacswiki.org/emacs/download/misc-cmds.el).

(defun comment-region-lines (beg end &optional arg)
  "Like `comment-region' (which see), but comment/uncomment whole lines."
  (interactive "*r\nP")
  (if (> beg end) (let (mid) (setq mid beg beg end end mid)))
  (let ((bol  (save-excursion (goto-char beg) (line-beginning-position)))
        (eol  (save-excursion (goto-char end)
                              (if (bolp) (point) (line-end-position)))))
    (comment-region bol eol arg)))



  parent reply	other threads:[~2015-02-25 23:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25 15:36 How to quit? Marcin Borkowski
2015-02-25 16:07 ` Doug Lewan
2015-02-25 16:24   ` Marcin Borkowski
2015-02-25 16:19 ` Thien-Thi Nguyen
     [not found] ` <mailman.810.1424880439.31049.help-gnu-emacs@gnu.org>
2015-02-25 17:11   ` Emanuel Berg
2015-02-25 17:57     ` J. David Boyd
2015-02-25 18:55       ` Marcin Borkowski
2015-02-25 18:54 ` Bob Proulx
2015-02-25 23:21 ` Drew Adams [this message]
2015-02-26  1:29 ` Robert Thorpe
     [not found] ` <mailman.849.1424906531.31049.help-gnu-emacs@gnu.org>
2015-02-27  0:53   ` Emanuel Berg
2015-02-27  3:33     ` Drew Adams
     [not found]     ` <mailman.909.1425008047.31049.help-gnu-emacs@gnu.org>
2015-02-27 19:09       ` Emanuel Berg
     [not found] <mailman.808.1424878616.31049.help-gnu-emacs@gnu.org>
2015-02-25 23:08 ` unfrostedpoptart
     [not found] <mailman.854.1424914176.31049.help-gnu-emacs@gnu.org>
2015-02-27  0:56 ` Emanuel Berg
2015-02-27  2:57   ` Robert Thorpe

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=d54efce9-35aa-46db-9df0-5a6ca46bf27e@default \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=mbork@wmi.amu.edu.pl \
    /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).