From: Stefan Monnier Date: Mon, 8 Apr 2002 21:32:05 +0000 (+0000) Subject: (sgml-comment-indent-new-line): New fun. X-Git-Tag: ttn-vms-21-2-B4~15744 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=601280966a2944ce5d6bff52cafa7d4b4af46511;p=emacs.git (sgml-comment-indent-new-line): New fun. (sgml-mode): Use it for comment-line-break-function. --- diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index cb070457a03..334a1645aeb 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -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 "\\(") (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 "