From: Michal Nazarewicz <mina86@mina86.com>
To: 23787@debbugs.gnu.org
Cc: "David Kastrup" <dak@gnu.org>, "Richard Stallman" <rms@gnu.org>,
"Johan Bockgård" <bojohan@gnu.org>, "Tassilo Horn" <tsdh@gnu.org>,
"Alan Mackenzie" <acm@muc.de>, "Teemu Likonen" <tlikonen@iki.fi>
Subject: bug#23787: [PATCH] * lisp/bindings.el: create binding for ‘cycle-spacing’
Date: Fri, 17 Jun 2016 22:12:16 +0200 [thread overview]
Message-ID: <1466194336-23967-1-git-send-email-mina86@mina86.com> (raw)
‘cycle-spacing’ behaves like ‘just-one-space’ when invoked once so
binding it to M-SPC should not be (very) destructive to users.
When this change has been propesed back in 2014¹, the main concern
was that back then the function behaved a bit differently from the
old one in certain situations. This has since been changed by a
[687e0e1: “Make ‘cycle-spacing’ behave more like ‘just-one-space’
if colled once.”] commit.
¹ https://lists.gnu.org/archive/html/emacs-devel/2014-01/msg02183.html
---
etc/NEWS | 6 ++++++
lisp/bindings.el | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
Unless there are objections, I’ll submit this in a week. I’ve CC’d
everyone who was involved in the original thread.
diff --git a/etc/NEWS b/etc/NEWS
index d8583cf..1041239 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -187,6 +187,12 @@ questions, with a handy way to display help texts.
'undo', undo the last replacement; bound to 'u'.
'undo-all', undo all replacements; bound to 'U'.
+** M-SPC is now bound to 'cycle-spacing'.
+When called once, 'cycle-spacing' behaves the same way
+'just-one-space' does so this change should not disturb any old
+habits. When pressed multiple times it manipulate whitespace around
+point in a smart way giving user more editing powers.
+
\f
* Changes in Specialized Modes and Packages in Emacs 25.2
diff --git a/lisp/bindings.el b/lisp/bindings.el
index c13f4b1..cf9aaf3 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -807,7 +807,7 @@ esc-map
(define-key esc-map "\\" 'delete-horizontal-space)
(define-key esc-map "m" 'back-to-indentation)
(define-key ctl-x-map "\C-o" 'delete-blank-lines)
-(define-key esc-map " " 'just-one-space)
+(define-key esc-map " " 'cycle-spacing)
(define-key esc-map "z" 'zap-to-char)
(define-key esc-map "=" 'count-words-region)
(define-key ctl-x-map "=" 'what-cursor-position)
--
2.8.0.rc3.226.g39d4020
next reply other threads:[~2016-06-17 20:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 20:12 Michal Nazarewicz [this message]
2016-06-17 20:22 ` bug#23787: [PATCH] * lisp/bindings.el: create binding for ‘cycle-spacing’ Eli Zaretskii
2016-06-17 21:13 ` Michal Nazarewicz
2016-06-17 22:06 ` Glenn Morris
2016-06-17 22:16 ` David Kastrup
2016-06-20 13:30 ` Michal Nazarewicz
2016-06-24 22:14 ` Michal Nazarewicz
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=1466194336-23967-1-git-send-email-mina86@mina86.com \
--to=mina86@mina86.com \
--cc=23787@debbugs.gnu.org \
--cc=acm@muc.de \
--cc=bojohan@gnu.org \
--cc=dak@gnu.org \
--cc=rms@gnu.org \
--cc=tlikonen@iki.fi \
--cc=tsdh@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).