bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20545: New minor mode Electric Punct


From: Paul Eggert
Subject: bug#20545: New minor mode Electric Punct
Date: Sun, 10 May 2015 16:55:42 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Attached are two proposed patches. The first creates a new minor mode Electric Punct that does a variant of "smart quoting" designed for the Emacs tradition of using ` and ' as aliases for left and right single quotation marks. This new minor mode is inactive by default, but the user can enable it in certain contexts. The second patch modifies .dir-locals.el to enable the minor mode in contexts where it should be useful when editing Emacs itself.

These patches are related to Bug#20385 in that they make it much easier to edit doc strings formatted ‘like this’, which is the point of Bug#20385. (All that one needs to do is to type the string "`like this'".) However, the main idea of this patch is independent of the Emacs doc string issue, as Emacs should make it easy to quote ‘like this’ when the user prefers this form.

I named this mode "Electric Punct" because I anticipate that there may be a similar need to enter em and en dashes, and a few other non-ASCII punctuation marks commonly used in text. Quotes are a good place to start, so that's where I started.

Attachment: 0001-New-minor-mode-Electric-Punct.patch
Description: Text Data

Attachment: 0002-Use-Electric-Punct-when-editing-Emacs-source.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]