aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2009-02-04 05:48:16 +0000
committerMiles Bader2009-02-04 05:48:16 +0000
commit61eee794dba0de5906d8b0aef30cc98e634b3b2d (patch)
treeff2b933a1ba902ae1096e394bac3069bc31e8ecd
parentaacd8ba187331ffba520da1b55d0bd2e15f3aba4 (diff)
downloademacs-61eee794dba0de5906d8b0aef30cc98e634b3b2d.tar.gz
emacs-61eee794dba0de5906d8b0aef30cc98e634b3b2d.zip
Add "^" to interactive spec of sexp movement commands
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1534
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/emacs-lisp/lisp.el20
2 files changed, 16 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 11d748f5862..9c806c616b9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12009-02-04 Miles Bader <miles@gnu.org>
2
3 * emacs-lisp/lisp.el (forward-sexp, backward-sexp, forward-list)
4 (backward-list, backward-up-list, beginning-of-defun)
5 (beginning-of-defun-raw, end-of-defun): Add "^" to interactive spec.
6
12009-02-04 Glenn Morris <rgm@gnu.org> 72009-02-04 Glenn Morris <rgm@gnu.org>
2 8
3 * mail/mail-utils.el (mail-fetch-field): Previous doc fix was 9 * mail/mail-utils.el (mail-fetch-field): Previous doc fix was
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 76141c56274..ba1546980ae 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -53,7 +53,7 @@ Should take the same arguments and behave similarly to `forward-sexp'.")
53With ARG, do it that many times. Negative arg -N means 53With ARG, do it that many times. Negative arg -N means
54move backward across N balanced expressions. 54move backward across N balanced expressions.
55This command assumes point is not in a string or comment." 55This command assumes point is not in a string or comment."
56 (interactive "p") 56 (interactive "^p")
57 (or arg (setq arg 1)) 57 (or arg (setq arg 1))
58 (if forward-sexp-function 58 (if forward-sexp-function
59 (funcall forward-sexp-function arg) 59 (funcall forward-sexp-function arg)
@@ -65,7 +65,7 @@ This command assumes point is not in a string or comment."
65With ARG, do it that many times. Negative arg -N means 65With ARG, do it that many times. Negative arg -N means
66move forward across N balanced expressions. 66move forward across N balanced expressions.
67This command assumes point is not in a string or comment." 67This command assumes point is not in a string or comment."
68 (interactive "p") 68 (interactive "^p")
69 (or arg (setq arg 1)) 69 (or arg (setq arg 1))
70 (forward-sexp (- arg))) 70 (forward-sexp (- arg)))
71 71
@@ -100,7 +100,7 @@ This command assumes point is not in a string or comment."
100With ARG, do it that many times. 100With ARG, do it that many times.
101Negative arg -N means move backward across N groups of parentheses. 101Negative arg -N means move backward across N groups of parentheses.
102This command assumes point is not in a string or comment." 102This command assumes point is not in a string or comment."
103 (interactive "p") 103 (interactive "^p")
104 (or arg (setq arg 1)) 104 (or arg (setq arg 1))
105 (goto-char (or (scan-lists (point) arg 0) (buffer-end arg)))) 105 (goto-char (or (scan-lists (point) arg 0) (buffer-end arg))))
106 106
@@ -109,7 +109,7 @@ This command assumes point is not in a string or comment."
109With ARG, do it that many times. 109With ARG, do it that many times.
110Negative arg -N means move forward across N groups of parentheses. 110Negative arg -N means move forward across N groups of parentheses.
111This command assumes point is not in a string or comment." 111This command assumes point is not in a string or comment."
112 (interactive "p") 112 (interactive "^p")
113 (or arg (setq arg 1)) 113 (or arg (setq arg 1))
114 (forward-list (- arg))) 114 (forward-list (- arg)))
115 115
@@ -118,7 +118,7 @@ This command assumes point is not in a string or comment."
118With ARG, do this that many times. 118With ARG, do this that many times.
119A negative argument means move backward but still go down a level. 119A negative argument means move backward but still go down a level.
120This command assumes point is not in a string or comment." 120This command assumes point is not in a string or comment."
121 (interactive "p") 121 (interactive "^p")
122 (or arg (setq arg 1)) 122 (or arg (setq arg 1))
123 (let ((inc (if (> arg 0) 1 -1))) 123 (let ((inc (if (> arg 0) 1 -1)))
124 (while (/= arg 0) 124 (while (/= arg 0)
@@ -130,7 +130,7 @@ This command assumes point is not in a string or comment."
130With ARG, do this that many times. 130With ARG, do this that many times.
131A negative argument means move forward but still to a less deep spot. 131A negative argument means move forward but still to a less deep spot.
132This command assumes point is not in a string or comment." 132This command assumes point is not in a string or comment."
133 (interactive "p") 133 (interactive "^p")
134 (up-list (- (or arg 1)))) 134 (up-list (- (or arg 1))))
135 135
136(defun up-list (&optional arg) 136(defun up-list (&optional arg)
@@ -138,7 +138,7 @@ This command assumes point is not in a string or comment."
138With ARG, do this that many times. 138With ARG, do this that many times.
139A negative argument means move backward but still to a less deep spot. 139A negative argument means move backward but still to a less deep spot.
140This command assumes point is not in a string or comment." 140This command assumes point is not in a string or comment."
141 (interactive "p") 141 (interactive "^p")
142 (or arg (setq arg 1)) 142 (or arg (setq arg 1))
143 (let ((inc (if (> arg 0) 1 -1))) 143 (let ((inc (if (> arg 0) 1 -1)))
144 (while (/= arg 0) 144 (while (/= arg 0)
@@ -213,7 +213,7 @@ defun's beginning.
213Regardless of the values of `defun-prompt-regexp' and 213Regardless of the values of `defun-prompt-regexp' and
214`beginning-of-defun-function', point always moves to the 214`beginning-of-defun-function', point always moves to the
215beginning of the line whenever the search is successful." 215beginning of the line whenever the search is successful."
216 (interactive "p") 216 (interactive "^p")
217 (or (not (eq this-command 'beginning-of-defun)) 217 (or (not (eq this-command 'beginning-of-defun))
218 (eq last-command 'beginning-of-defun) 218 (eq last-command 'beginning-of-defun)
219 (and transient-mark-mode mark-active) 219 (and transient-mark-mode mark-active)
@@ -229,7 +229,7 @@ is non-nil.
229 229
230If variable `beginning-of-defun-function' is non-nil, its value 230If variable `beginning-of-defun-function' is non-nil, its value
231is called as a function to find the defun's beginning." 231is called as a function to find the defun's beginning."
232 (interactive "p") ; change this to "P", maybe, if we ever come to pass ARG 232 (interactive "^p") ; change this to "P", maybe, if we ever come to pass ARG
233 ; to beginning-of-defun-function. 233 ; to beginning-of-defun-function.
234 (unless arg (setq arg 1)) 234 (unless arg (setq arg 1))
235 (cond 235 (cond
@@ -335,7 +335,7 @@ matches the open-parenthesis that starts a defun; see function
335 335
336If variable `end-of-defun-function' is non-nil, its value 336If variable `end-of-defun-function' is non-nil, its value
337is called as a function to find the defun's end." 337is called as a function to find the defun's end."
338 (interactive "p") 338 (interactive "^p")
339 (or (not (eq this-command 'end-of-defun)) 339 (or (not (eq this-command 'end-of-defun))
340 (eq last-command 'end-of-defun) 340 (eq last-command 'end-of-defun)
341 (and transient-mark-mode mark-active) 341 (and transient-mark-mode mark-active)