[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Quote Selection Do What I Mean (DWIM)
From: |
Pascal J. Bourguignon |
Subject: |
Re: Quote Selection Do What I Mean (DWIM) |
Date: |
Fri, 23 Oct 2009 16:19:40 +0200 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin) |
Nordlöw <per.nordlow@gmail.com> writes:
> If transient-mark-mode is activate it would be nice to have some
> clever major-mode-sensitive auto-insertion of single quotes and
> backquotes.
>
> in emacs-lisp-mode we want the following mappings
> - ' => `symbol' in comment-syntax
> - ' => 'symbol in code-syntax (no change
> - " => "string" everywhere
>
> Does emacs have a suitable before/after/replace hook related to self-
> insert-command that can be used to realize this behaviour?
>
> Suitable function name could be quote-dwim().
>
> Has anybody already done this? Reflections...
In paredit, " behaves differently in code-syntax than in comment-syntax.
' behave the same everywhere.
You could easily propose a patch to paredit to add the wanted behavior for '.
--
__Pascal Bourguignon__