Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
d4fbc2d5
Commit
d4fbc2d5
authored
Jul 24, 1992
by
Richard M. Stallman
Browse files
*** empty log message ***
parent
eb6e9899
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
9 deletions
+17
-9
lisp/progmodes/c-mode.el
lisp/progmodes/c-mode.el
+17
-9
No files found.
lisp/progmodes/c-mode.el
View file @
d4fbc2d5
...
...
@@ -764,19 +764,27 @@ Otherwise return nil and don't move point."
(
defun
c-beginning-of-statement
(
count
)
"Go to the beginning of the innermost C statement.
With prefix arg, go back N - 1 statements. If already at the beginning of a
statement then go to the beginning of the preceeding one."
statement then go to the beginning of the preceeding one.
If within a string or comment, move by sentences instead of statements."
(
interactive
"p"
)
(
while
(
>
count
0
)
(
c-beginning-of-statement-1
)
(
setq
count
(
1-
count
)))
(
while
(
<
count
0
)
(
c-end-of-statement-1
)
(
setq
count
(
1+
count
))))
(
let
((
here
(
point
))
state
)
(
save-excursion
(
beginning-of-defun
)
(
setq
state
(
parse-partial-sexp
(
point
)
here
nil
nil
)))
(
if
(
or
(
nth
3
state
)
(
nth
4
state
))
(
forward-sentence
(
-
count
))
(
while
(
>
count
0
)
(
c-beginning-of-statement-1
)
(
setq
count
(
1-
count
)))
(
while
(
<
count
0
)
(
c-end-of-statement-1
)
(
setq
count
(
1+
count
))))))
(
defun
c-end-of-statement
(
count
)
"Go to the end of the innermost C statement.
With prefix arg, go forward N - 1 statements. Moves forward to end of the
next statement if already at end."
With prefix arg, go forward N - 1 statements.
Move forward to end of the next statement if already at end.
If within a string or comment, move by sentences instead of statements."
(
interactive
"p"
)
(
c-beginning-of-statement
(
-
count
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment