diff options
| author | Glenn Morris | 2014-03-30 17:35:12 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-03-30 17:35:12 -0700 |
| commit | 4f3a895b33178230e27d5ad2fb81d5a3f5aa5d9e (patch) | |
| tree | 8c11797353316b3c89fe6ff18dc9a2fcab0c7af4 | |
| parent | 3c2d477626300da13af953ab6d26ad629bad6e4d (diff) | |
| download | emacs-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/ChangeLog | 8 | ||||
| -rw-r--r-- | 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 @@ | |||
| 1 | 2014-03-31 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * simple.el (cycle-spacing--context, cycle-spacing): Doc tweaks. | ||
| 4 | |||
| 1 | 2014-03-31 Reto Zimmermann <reto@gnu.org> | 5 | 2014-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. |
| 808 | The first time this function is run, it saves N argument, the | 808 | The first time `cycle-spacing' runs, it saves in this variable: |
| 809 | original point position and original spacing around the point in | 809 | its N argument, the original point position, and the original spacing |
| 810 | this variable.") | 810 | around 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. |
| 814 | In interactive use, this function behaves differently in | 814 | In interactive use, this function behaves differently in successive |
| 815 | successive consecutive calls. | 815 | consecutive calls. |
| 816 | 816 | ||
| 817 | The first call in a sequence acts like `just-one-space'. It | 817 | The first call in a sequence acts like `just-one-space'. |
| 818 | deletes all spaces and tabs around point, leaving one space \(or | 818 | It deletes all spaces and tabs around point, leaving one space |
| 819 | N spaces). N is the prefix argument. If N is negative, it | 819 | \(or N spaces). N is the prefix argument. If N is negative, |
| 820 | deletes newlines as well leaving -N spaces. (If PRESERVE-NL-BACK | 820 | it deletes newlines as well, leaving -N spaces. |
| 821 | is 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 | ||
| 823 | The second call in a sequence deletes all spaces. | 823 | The second call in a sequence deletes all spaces. |
| 824 | 824 | ||
| 825 | The third call in a sequence restores the original | 825 | The third call in a sequence restores the original whitespace (and point). |
| 826 | whitespace (and point). | ||
| 827 | 826 | ||
| 828 | If MODE is 'single-shot only the first step is performed. If | 827 | If MODE is `single-shot', it only performs the first step in the sequence. |
| 829 | MODE is 'fast and the first step did not result in any | 828 | If MODE is `fast' and the first step would not result in any change |
| 830 | change (i.e. there was exactly (abs N) spaces around point) | 829 | \(i.e., there are exactly (abs N) spaces around point), |
| 831 | function goes to the second step immediately. | 830 | the function goes straight to the second step. |
| 832 | 831 | ||
| 833 | Running the function with different N arguments initiates a new | 832 | Repeatedly calling the function with different values of N starts a |
| 834 | sequence each time." | 833 | new 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")) |