emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el
Date: Mon, 08 Apr 2002 17:32:06 -0400

Index: emacs/lisp/textmodes/sgml-mode.el
diff -c emacs/lisp/textmodes/sgml-mode.el:1.78 
emacs/lisp/textmodes/sgml-mode.el:1.79
*** emacs/lisp/textmodes/sgml-mode.el:1.78      Wed Apr  3 16:36:58 2002
--- emacs/lisp/textmodes/sgml-mode.el   Mon Apr  8 17:32:05 2002
***************
*** 373,378 ****
--- 373,385 ----
  
  (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,421 ****
--- 423,430 ----
    (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,891 ****
          (skip-chars-forward "^<" pos)
            (setq state
                  (cond
!                  ((= (point) pos) 
                    ;; We got to the end without seeing a tag.
                    nil)
                   ((looking-at "<!\\[[A-Z]+\\[")
--- 894,900 ----
          (skip-chars-forward "^<" pos)
            (setq state
                  (cond
!                  ((= (point) pos)
                    ;; We got to the end without seeing a tag.
                    nil)
                   ((looking-at "<!\\[[A-Z]+\\[")
***************
*** 988,994 ****
        (setq tag-type 'comment
              tag-start (search-backward "<!--" nil t)))
       ((sgml-looking-back-at "]]")   ; cdata
!       (setq tag-type 'cdata 
              tag-start (re-search-backward "<!\\[[A-Z]+\\[" nil t)))
       (t
        (setq tag-start
--- 997,1003 ----
        (setq tag-type 'comment
              tag-start (search-backward "<!--" nil t)))
       ((sgml-looking-back-at "]]")   ; cdata
!       (setq tag-type 'cdata
              tag-start (re-search-backward "<!\\[[A-Z]+\\[" nil t)))
       (t
        (setq tag-start



reply via email to

[Prev in Thread] Current Thread [Next in Thread]