all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: pjb@informatimago.com (Pascal J. Bourguignon)
To: help-gnu-emacs@gnu.org
Subject: Re: Quote Selection Do What I Mean (DWIM)
Date: Fri, 23 Oct 2009 16:19:40 +0200	[thread overview]
Message-ID: <873a5a42gz.fsf@galatea.local> (raw)
In-Reply-To: b341ad75-6615-4b5d-8d54-d72ac3f5d01b@e34g2000vbm.googlegroups.com

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__


  parent reply	other threads:[~2009-10-23 14:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-23 11:51 Quote Selection Do What I Mean (DWIM) Nordlöw
2009-10-23 12:27 ` Benjamin Andresen
2009-10-23 14:19 ` Pascal J. Bourguignon [this message]
2009-10-23 14:55   ` Nordlöw
2009-10-23 16:38     ` Pascal J. Bourguignon

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=873a5a42gz.fsf@galatea.local \
    --to=pjb@informatimago.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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.