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
60128096
Commit
60128096
authored
Apr 08, 2002
by
Stefan Monnier
Browse files
(sgml-comment-indent-new-line): New fun.
(sgml-mode): Use it for comment-line-break-function.
parent
0d1bf3f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
lisp/textmodes/sgml-mode.el
lisp/textmodes/sgml-mode.el
+11
-2
No files found.
lisp/textmodes/sgml-mode.el
View file @
60128096
...
...
@@ -373,6 +373,13 @@ Otherwise, it is set to be buffer-local when the file has
(
defvar
v2
)
; free for skeleton
(
defun
sgml-comment-indent-new-line
(
&optional
soft
)
(
let
((
comment-start
"-- "
)
(
comment-start-skip
"\\(<!\\)?--[ \t]*"
)
(
comment-end
" --"
)
(
comment-style
'plain
))
(
comment-indent-new-line
soft
)))
(
defun
sgml-mode-facemenu-add-face-function
(
face
end
)
(
if
(
setq
face
(
cdr
(
assq
face
sgml-face-tag-alist
)))
(
progn
...
...
@@ -416,6 +423,8 @@ Do \\[describe-key] on the following bindings to discover what they do.
(set (make-local-variable 'comment-start) "<!-- ")
(set (make-local-variable 'comment-end) " -->")
(set (make-local-variable 'comment-indent-function) 'sgml-comment-indent)
(set (make-local-variable 'comment-line-break-function)
'sgml-comment-indent-new-line)
(set (make-local-variable 'skeleton-further-elements)
'((completion-ignore-case t)))
(set (make-local-variable 'skeleton-end-hook)
...
...
@@ -885,7 +894,7 @@ If non-nil LIMIT is a nearby position before point outside of any tag."
(
skip-chars-forward
"^<"
pos
)
(
setq
state
(
cond
((
=
(
point
)
pos
)
((
=
(
point
)
pos
)
;; We got to the end without seeing a tag.
nil
)
((
looking-at
"<!\\[[A-Z]+\\["
)
...
...
@@ -988,7 +997,7 @@ Leave point at the beginning of the tag."
(
setq
tag-type
'comment
tag-start
(
search-backward
"<!--"
nil
t
)))
((
sgml-looking-back-at
"]]"
)
; cdata
(
setq
tag-type
'cdata
(
setq
tag-type
'cdata
tag-start
(
re-search-backward
"<!\\[[A-Z]+\\["
nil
t
)))
(
t
(
setq
tag-start
...
...
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