aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-03-30 17:35:12 -0700
committerGlenn Morris2014-03-30 17:35:12 -0700
commit4f3a895b33178230e27d5ad2fb81d5a3f5aa5d9e (patch)
tree8c11797353316b3c89fe6ff18dc9a2fcab0c7af4
parent3c2d477626300da13af953ab6d26ad629bad6e4d (diff)
downloademacs-4f3a895b33178230e27d5ad2fb81d5a3f5aa5d9e.tar.gz
emacs-4f3a895b33178230e27d5ad2fb81d5a3f5aa5d9e.zip
* 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.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/simple.el35
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 @@
12014-03-31 Glenn Morris <rgm@gnu.org>
2
3 * simple.el (cycle-spacing--context, cycle-spacing): Doc tweaks.
4
12014-03-31 Reto Zimmermann <reto@gnu.org> 52014-03-31 Reto Zimmermann <reto@gnu.org>
2 6
3 Sync with upstream vhdl mode v3.35.2. 7 Sync with upstream vhdl mode v3.35.2.
@@ -52,11 +56,11 @@
52 56
53 * simple.el (cycle-spacing): Never delete spaces on first run by 57 * simple.el (cycle-spacing): Never delete spaces on first run by
54 default, but do so in a new 'fast mode and if there are already 58 default, but do so in a new 'fast mode and if there are already
55 N spaces (the previous behaviour). 59 N spaces (the previous behavior).
56 Compare N with its value in previous invocation so that changing 60 Compare N with its value in previous invocation so that changing
57 prefix argument restarts `cycle-spacing' sequence. 61 prefix argument restarts `cycle-spacing' sequence.
58 The idea is that with this change, binding M-SPC to 62 The idea is that with this change, binding M-SPC to
59 `cycle-spacing' should not introduce any changes in behaviour of 63 `cycle-spacing' should not introduce any changes in behavior of
60 the binding so long as users do not type M-SPC twice in a raw with 64 the binding so long as users do not type M-SPC twice in a raw with
61 the same prefix argument or lack thereof. 65 the same prefix argument or lack thereof.
62 66
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'."
805 805
806(defvar cycle-spacing--context nil 806(defvar cycle-spacing--context nil
807 "Store context used in consecutive calls to `cycle-spacing' command. 807 "Store context used in consecutive calls to `cycle-spacing' command.
808The first time this function is run, it saves N argument, the 808The first time `cycle-spacing' runs, it saves in this variable:
809original point position and original spacing around the point in 809its N argument, the original point position, and the original spacing
810this variable.") 810around point.")
811 811
812(defun cycle-spacing (&optional n preserve-nl-back mode) 812(defun cycle-spacing (&optional n preserve-nl-back mode)
813 "Manipulate whitespace around point in a smart way. 813 "Manipulate whitespace around point in a smart way.
814In interactive use, this function behaves differently in 814In interactive use, this function behaves differently in successive
815successive consecutive calls. 815consecutive calls.
816 816
817The first call in a sequence acts like `just-one-space'. It 817The first call in a sequence acts like `just-one-space'.
818deletes all spaces and tabs around point, leaving one space \(or 818It deletes all spaces and tabs around point, leaving one space
819N spaces). N is the prefix argument. If N is negative, it 819\(or N spaces). N is the prefix argument. If N is negative,
820deletes newlines as well leaving -N spaces. (If PRESERVE-NL-BACK 820it deletes newlines as well, leaving -N spaces.
821is non-nil, it does not delete newlines before point.) 821\(If PRESERVE-NL-BACK is non-nil, it does not delete newlines before point.)
822 822
823The second call in a sequence deletes all spaces. 823The second call in a sequence deletes all spaces.
824 824
825The third call in a sequence restores the original 825The third call in a sequence restores the original whitespace (and point).
826whitespace (and point).
827 826
828If MODE is 'single-shot only the first step is performed. If 827If MODE is `single-shot', it only performs the first step in the sequence.
829MODE is 'fast and the first step did not result in any 828If MODE is `fast' and the first step would not result in any change
830change (i.e. there was exactly (abs N) spaces around point) 829\(i.e., there are exactly (abs N) spaces around point),
831function goes to the second step immediately. 830the function goes straight to the second step.
832 831
833Running the function with different N arguments initiates a new 832Repeatedly calling the function with different values of N starts a
834sequence each time." 833new sequence each time."
835 (interactive "*p") 834 (interactive "*p")
836 (let ((orig-pos (point)) 835 (let ((orig-pos (point))
837 (skip-characters (if (and n (< n 0)) " \t\n\r" " \t")) 836 (skip-characters (if (and n (< n 0)) " \t\n\r" " \t"))