From 4f3a895b33178230e27d5ad2fb81d5a3f5aa5d9e Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 30 Mar 2014 17:35:12 -0700 Subject: [PATCH] * lisp/simple.el (cycle-spacing--context, cycle-spacing): Doc tweaks. Include restoring manual line-breaks to state before 2014-03-28T16:26:15Z!mina86@mina86.com. --- lisp/ChangeLog | 8 ++++++-- lisp/simple.el | 35 +++++++++++++++++------------------ 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 15dc7cec5a4..fe2361c6895 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-03-31 Glenn Morris + + * simple.el (cycle-spacing--context, cycle-spacing): Doc tweaks. + 2014-03-31 Reto Zimmermann Sync with upstream vhdl mode v3.35.2. @@ -52,11 +56,11 @@ * simple.el (cycle-spacing): Never delete spaces on first run by default, but do so in a new 'fast mode and if there are already - N spaces (the previous behaviour). + N spaces (the previous behavior). Compare N with its value in previous invocation so that changing prefix argument restarts `cycle-spacing' sequence. The idea is that with this change, binding M-SPC to - `cycle-spacing' should not introduce any changes in behaviour of + `cycle-spacing' should not introduce any changes in behavior of the binding so long as users do not type M-SPC twice in a raw with the same prefix argument or lack thereof. diff --git a/lisp/simple.el b/lisp/simple.el index eee9c9b9689..bc92a9ab24b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -805,33 +805,32 @@ See also `cycle-spacing'." (defvar cycle-spacing--context nil "Store context used in consecutive calls to `cycle-spacing' command. -The first time this function is run, it saves N argument, the -original point position and original spacing around the point in -this variable.") +The first time `cycle-spacing' runs, it saves in this variable: +its N argument, the original point position, and the original spacing +around point.") (defun cycle-spacing (&optional n preserve-nl-back mode) "Manipulate whitespace around point in a smart way. -In interactive use, this function behaves differently in -successive consecutive calls. +In interactive use, this function behaves differently in successive +consecutive calls. -The first call in a sequence acts like `just-one-space'. It -deletes all spaces and tabs around point, leaving one space \(or -N spaces). N is the prefix argument. If N is negative, it -deletes newlines as well leaving -N spaces. (If PRESERVE-NL-BACK -is non-nil, it does not delete newlines before point.) +The first call in a sequence acts like `just-one-space'. +It deletes all spaces and tabs around point, leaving one space +\(or N spaces). N is the prefix argument. If N is negative, +it deletes newlines as well, leaving -N spaces. +\(If PRESERVE-NL-BACK is non-nil, it does not delete newlines before point.) The second call in a sequence deletes all spaces. -The third call in a sequence restores the original -whitespace (and point). +The third call in a sequence restores the original whitespace (and point). -If MODE is 'single-shot only the first step is performed. If -MODE is 'fast and the first step did not result in any -change (i.e. there was exactly (abs N) spaces around point) -function goes to the second step immediately. +If MODE is `single-shot', it only performs the first step in the sequence. +If MODE is `fast' and the first step would not result in any change +\(i.e., there are exactly (abs N) spaces around point), +the function goes straight to the second step. -Running the function with different N arguments initiates a new -sequence each time." +Repeatedly calling the function with different values of N starts a +new sequence each time." (interactive "*p") (let ((orig-pos (point)) (skip-characters (if (and n (< n 0)) " \t\n\r" " \t")) -- 2.39.2