[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el
From: |
Mike Williams |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el |
Date: |
Mon, 01 Apr 2002 07:08:13 -0500 |
Index: emacs/lisp/textmodes/sgml-mode.el
diff -c emacs/lisp/textmodes/sgml-mode.el:1.70
emacs/lisp/textmodes/sgml-mode.el:1.71
*** emacs/lisp/textmodes/sgml-mode.el:1.70 Fri Mar 29 17:20:15 2002
--- emacs/lisp/textmodes/sgml-mode.el Mon Apr 1 07:08:13 2002
***************
*** 890,896 ****
(sgml-beginning-of-tag t))))))
(defun sgml-value (alist)
! "Interactively insert value taken from attributerule ALIST.
See `sgml-tag-alist' for info about attribute rules."
(setq alist (cdr alist))
(if (stringp (car alist))
--- 890,896 ----
(sgml-beginning-of-tag t))))))
(defun sgml-value (alist)
! "Interactively insert value taken from attribute-rule ALIST.
See `sgml-tag-alist' for info about attribute rules."
(setq alist (cdr alist))
(if (stringp (car alist))
***************
*** 924,932 ****
--- 924,943 ----
(?> . ">"))))))))
+ (defun sgml-empty-tag-p (tag-name)
+ "Return non-nil if TAG-NAME is an implicitly empty tag."
+ (and (not sgml-xml-mode)
+ (member-ignore-case tag-name sgml-empty-tags)))
+
+ (defun sgml-unclosed-tag-p (tag-name)
+ "Return non-nil if TAG-NAME is a tag for which an end-tag is optional."
+ (and (not sgml-xml-mode)
+ (member-ignore-case tag-name sgml-unclosed-tags)))
+
(defun sgml-calculate-indent ()
"Calculate the column to which this line should be indented."
(let ((lcon (sgml-lexical-context)))
+
;; Indent comment-start markers inside <!-- just like comment-end markers.
(if (and (eq (car lcon) 'tag)
(looking-at "--")
***************
*** 934,939 ****
--- 945,951 ----
(setq lcon (cons 'comment (+ (cdr lcon) 2))))
(case (car lcon)
+
(string
;; Go back to previous non-empty line.
(while (and (> (point) (cdr lcon))
***************
*** 970,976 ****
(goto-char (1+ (cdr lcon)))
(+ (current-column) sgml-basic-offset)))
! (t ;; text
(while (looking-at "</")
(forward-sexp 1)
(skip-chars-forward " \t"))
--- 982,988 ----
(goto-char (1+ (cdr lcon)))
(+ (current-column) sgml-basic-offset)))
! (text
(while (looking-at "</")
(forward-sexp 1)
(skip-chars-forward " \t"))
***************
*** 1006,1012 ****
(current-column)
(goto-char there)
(+ (current-column)
! (* sgml-basic-offset (length context)))))))))
(defun sgml-indent-line ()
"Indent the current line as SGML."
--- 1018,1029 ----
(current-column)
(goto-char there)
(+ (current-column)
! (* sgml-basic-offset (length context))))))
!
! (otherwise
! (error "Unrecognised context %s" (car lcon)))
!
! )))
(defun sgml-indent-line ()
"Indent the current line as SGML."
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el,
Mike Williams <=
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/01
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Stefan Monnier, 2002/04/01
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/02
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/02
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/03
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/03
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/03
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Stefan Monnier, 2002/04/08
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/09
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/09