unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Rupert Swarbrick <rswarbrick@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: how to deal with comment in a new lang mode
Date: Sat, 01 Nov 2008 18:59:22 +0000	[thread overview]
Message-ID: <gei8u5$952$1@news.albasani.net> (raw)
In-Reply-To: 413a22e1-3685-4b1a-97d7-cda08401b838@v22g2000pro.googlegroups.com

[-- Attachment #1: Type: text/plain, Size: 1810 bytes --]

Xah <xahlee@gmail.com> writes:

> On Nov 1, 6:47 am, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote:
>> Xah wrote:
>> > PS is there a command to compact the ending parens?
>
> Kevin Rodgers wrote:
>> C-M-% ) C-q C-j SPC + ) RET )) RET
>
> Rupert Swarbrick wrote:
>> Well, I tend to go to the last one and C-a C-\ <backspace>
>> repeatedly. Well in fact, it's usually
>>   C-x C-( C-a C-\ <backspace> C-x C-) C-x e e e e e .... e
>
> ugh! I could have counted the parens, delete, then type them faster
> than these methdos.
>
> kinda interesting that almost 3 decades of emacs+elisp its still like
> this.

Hmm, Andreas has a good point. And I consider myself to have got things
wrong if I've managed to get this to happen.

You might be interested to note that paredit not only makes it
reasonably hard to end up with icky trailing parens like this, but also
ignores it when you "backspace through a )". Thus, if you somehow end up
with code looking like yours, you can always just go to the end of the
function and press and hold backspace until you get back to the end of
the meat of the function.

So, there's silly hacks like mine and Kevin's, there's a neat (if
obscure) function that Andreas suggested and, if you're using "the
right" major mode, you don't have to think at all.

Maybe after almost 3 decades of emacs+elisp, the problem's been solved.

Rupert

P.S. Your habit of cross-posting to g.e.help and c.emacs was really
annoying me until I realised that replies tended to arrive on g.e.help,
so I got gnus to put the group higher up in the list. However, you could
always save the rest of the world the trouble by posting to a single
newsgroup.

P.P.S. I don't intend to get into any sort of flaming match, so a reply
about either this or the previous postscript will be ignored categorically.

[-- Attachment #2: Type: application/pgp-signature, Size: 314 bytes --]

  parent reply	other threads:[~2008-11-01 18:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 20:59 how to deal with comment in a new lang mode Xah
2008-10-31  2:46 ` Kevin Rodgers
2008-10-31 14:10 ` rgb
     [not found] ` <mailman.2542.1225421198.25473.help-gnu-emacs@gnu.org>
2008-10-31 20:04   ` Xah
2008-11-01 12:53     ` Rupert Swarbrick
2008-11-01 13:47     ` Kevin Rodgers
     [not found]     ` <mailman.2630.1225547412.25473.help-gnu-emacs@gnu.org>
2008-11-01 14:41       ` Xah
2008-11-01 15:24         ` Andreas Politz
2008-11-01 20:55           ` Xah
2008-11-01 21:23             ` Andreas Politz
2008-11-01 21:48               ` Xah
2008-11-01 18:59         ` Rupert Swarbrick [this message]
2008-11-03 14:08     ` rgb
2008-11-03 14:19     ` rgb
2008-11-03 15:02       ` Seweryn Kokot

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='gei8u5$952$1@news.albasani.net' \
    --to=rswarbrick@gmail.com \
    --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).