[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: on adding a function call to a s-exp
From: |
João Távora |
Subject: |
Re: on adding a function call to a s-exp |
Date: |
Tue, 12 Jun 2018 15:34:21 +0100 |
On Mon, Jun 11, 2018 at 3:35 PM, Robert Girault <rfrancoisgirault@gmail.com>
wrote:
> Michael Heerdegen <michael_heerdegen@web.de> writes:
>
> > Robert Girault <rfrancoisgirault@gmail.com> writes:
> >
> >> (show-paren-mode)
> >> (electric-pair-mode)
> >> (autoload 'enable-paredit-mode "paredit"
> >> "Turn on pseudo-structural editing of Lisp code."
> >> t)
> >> (add-hook 'M-mode-hook 'enable-paredit-mode)
> >
> > I don't know what M-mode is, but in elisp-lisp-mode and with paredit,
> > it's like you want. If you use paredit for Emacs Lisp, you probably
> > also don't need electric-pair-mode.
>
> I confirm this. (Thanks!)
>
> > Without paredit-mode, AFAICT what you get when you hit M-( is
> > `insert-pair' via `insert-parentheses', and that has hardcoded what you
> > see. You would have to change `insert-pair' to get what you want - with
> > an advice probably. Alternatively, as said, paredit should behave as
> > you want without configuration.
>
> I'll choose to use paredit and learn how to use it properly. (There'll
> likely be other good things there that I don't currently know or use.)
>
I suggest you also give (the newer, 24.4+) eletric-pair-mode a try. It
should work consistently in all emacs major modes, not just lisp
modes, and is maintained together with Emacs. By default, in
emacs-lisp-mode you won't notice a difference to paredit for the most
common operations (you *will* notice that it lets you unbalance the
buffer temporarily though, but I consider that a feature).
disclaimer, if you hadn't figured it out: I wrote it :-)
João
Re: on adding a function call to a s-exp, Xavier Maillard, 2018/06/10
Message not available
- Re: on adding a function call to a s-exp, Robert Girault, 2018/06/10
- Message not available
- Re: on adding a function call to a s-exp, Robert Girault, 2018/06/11
- Re: on adding a function call to a s-exp,
João Távora <=
- Re: on adding a function call to a s-exp, Óscar Fuentes, 2018/06/12
- RE: on adding a function call to a s-exp, Drew Adams, 2018/06/12
- Re: on adding a function call to a s-exp, João Távora, 2018/06/12
- Re: on adding a function call to a s-exp, Andreas Röhler, 2018/06/13
- Re: on adding a function call to a s-exp, João Távora, 2018/06/13
- RE: on adding a function call to a s-exp, Drew Adams, 2018/06/13
- Re: on adding a function call to a s-exp, João Távora, 2018/06/13
- RE: on adding a function call to a s-exp, Drew Adams, 2018/06/13
Re: on adding a function call to a s-exp, Andreas Röhler, 2018/06/13
Re: on adding a function call to a s-exp, João Távora, 2018/06/13