Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
e6a24f43
Commit
e6a24f43
authored
Jan 02, 2007
by
Alan Mackenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(c-mask-paragraph): In a block comment, check that the "*/" is present
before trying to manipulate the "*/".
parent
10ad749b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
lisp/progmodes/cc-cmds.el
lisp/progmodes/cc-cmds.el
+8
-7
No files found.
lisp/progmodes/cc-cmds.el
View file @
e6a24f43
...
...
@@ -3750,7 +3750,7 @@ command to conveniently insert and align the necessary backslashes."
;; Note that this function does not do any hidden buffer changes.
(
let
(
fill
;; beg and end limit
s
the region to narrow. end is a marker.
;; beg and end limit the region to narrow. end is a marker.
beg
end
;; tmp-pre and tmp-post mark strings that are temporarily
;; inserted at the start and end of the region. tmp-pre is a
...
...
@@ -3836,12 +3836,13 @@ command to conveniently insert and align the necessary backslashes."
(
setq
apply-outside-literal
t
))
((
eq
c-lit-type
'c
)
; Block comment.
(
when
(
>=
end
(
cdr
c-lit-limits
))
;; The region includes the comment ender. If it's on its own
;; line, it stays on its own line. If it's got company on the
;; line, it keeps (at least one word of) it. "=====*/" counts
;; as a comment ender here, but "===== */" doesn't and "foo*/"
;; doesn't.
(
when
(
and
(
>=
end
(
cdr
c-lit-limits
))
(
>
(
point-max
)
(
cdr
c-lit-limits
)))
;; There is a comment ender, and the region includes it. If
;; it's on its own line, it stays on its own line. If it's got
;; company on the line, it keeps (at least one word of) it.
;; "=====*/" counts as a comment ender here, but "===== */"
;; doesn't and "foo*/" doesn't.
(
unless
(
save-excursion
(
goto-char
(
cdr
c-lit-limits
))
...
...
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