[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: |
Juri Linkov |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el |
Date: |
Tue, 08 Mar 2005 16:45:01 -0500 |
Index: emacs/lisp/textmodes/sgml-mode.el
diff -c emacs/lisp/textmodes/sgml-mode.el:1.103
emacs/lisp/textmodes/sgml-mode.el:1.104
*** emacs/lisp/textmodes/sgml-mode.el:1.103 Wed Feb 9 15:50:36 2005
--- emacs/lisp/textmodes/sgml-mode.el Tue Mar 8 21:45:00 2005
***************
*** 350,356 ****
"*When non-nil, tag insertion functions will be XML-compliant.
If this variable is customized, the custom value is used always.
Otherwise, it is set to be buffer-local when the file has
! a DOCTYPE or an XML declaration."
:type 'boolean
:version "22.1"
:group 'sgml)
--- 350,356 ----
"*When non-nil, tag insertion functions will be XML-compliant.
If this variable is customized, the custom value is used always.
Otherwise, it is set to be buffer-local when the file has
! a DOCTYPE or an XML declaration."
:type 'boolean
:version "22.1"
:group 'sgml)
***************
*** 629,635 ****
(backward-char)
'(("") " [ " _ " ]]"))
((and (eq v2 t) sgml-xml-mode (member ,str sgml-empty-tags))
! '(("") -1 "/>"))
((or (and (eq v2 t) (not sgml-xml-mode)) (string-match "^[/!?]" ,str))
nil)
((symbolp v2)
--- 629,635 ----
(backward-char)
'(("") " [ " _ " ]]"))
((and (eq v2 t) sgml-xml-mode (member ,str sgml-empty-tags))
! '(("") -1 " />"))
((or (and (eq v2 t) (not sgml-xml-mode)) (string-match "^[/!?]" ,str))
nil)
((symbolp v2)
***************
*** 818,824 ****
(goto-char close)
(kill-sexp 1))
(setq open (point))
! (when (sgml-skip-tag-forward 1)
(kill-sexp -1)))
;; Delete any resulting empty line. If we didn't kill-sexp,
;; this *should* do nothing, because we're right after the tag.
--- 818,825 ----
(goto-char close)
(kill-sexp 1))
(setq open (point))
! (when (and (sgml-skip-tag-forward 1)
! (not (looking-back "/>")))
(kill-sexp -1)))
;; Delete any resulting empty line. If we didn't kill-sexp,
;; this *should* do nothing, because we're right after the tag.
***************
*** 1572,1578 ****
("dir" ,@list)
("font" nil "size" ("-1") ("+1") ("-2") ("+2") ,@1-7)
("form" (\n _ \n "<input type=\"submit\" value=\"\""
! (if sgml-xml-mode "/>" ">"))
("action" ,@(cdr href)) ("method" ("get") ("post")))
("h1" ,@align)
("h2" ,@align)
--- 1573,1579 ----
("dir" ,@list)
("font" nil "size" ("-1") ("+1") ("-2") ("+2") ,@1-7)
("form" (\n _ \n "<input type=\"submit\" value=\"\""
! (if sgml-xml-mode " />" ">"))
("action" ,@(cdr href)) ("method" ("get") ("post")))
("h1" ,@align)
("h2" ,@align)
***************
*** 1891,1903 ****
(define-skeleton html-href-anchor
"HTML anchor tag with href attribute."
"URL: "
! '(setq input "http:")
"<a href=\"" str "\">" _ "</a>")
(define-skeleton html-name-anchor
"HTML anchor tag with name attribute."
"Name: "
! "<a name=\"" str "\">" _ "</a>")
(define-skeleton html-headline-1
"HTML level 1 headline tags."
--- 1892,1906 ----
(define-skeleton html-href-anchor
"HTML anchor tag with href attribute."
"URL: "
! ;; '(setq input "http:")
"<a href=\"" str "\">" _ "</a>")
(define-skeleton html-name-anchor
"HTML anchor tag with name attribute."
"Name: "
! "<a name=\"" str "\""
! (if sgml-xml-mode (concat " id=\"" str "\""))
! ">" _ "</a>")
(define-skeleton html-headline-1
"HTML level 1 headline tags."
***************
*** 1932,1949 ****
(define-skeleton html-horizontal-rule
"HTML horizontal rule tag."
nil
! (if sgml-xml-mode "<hr/>" "<hr>") \n)
(define-skeleton html-image
"HTML image tag."
! nil
! "<img src=\"" _ "\""
! (if sgml-xml-mode "/>" ">"))
(define-skeleton html-line
"HTML line break tag."
nil
! (if sgml-xml-mode "<br/>" "<br>") \n)
(define-skeleton html-ordered-list
"HTML ordered list tags."
--- 1935,1952 ----
(define-skeleton html-horizontal-rule
"HTML horizontal rule tag."
nil
! (if sgml-xml-mode "<hr />" "<hr>") \n)
(define-skeleton html-image
"HTML image tag."
! "Image URL: "
! "<img src=\"" str "\" alt=\"" _ "\""
! (if sgml-xml-mode " />" ">"))
(define-skeleton html-line
"HTML line break tag."
nil
! (if sgml-xml-mode "<br />" "<br>") \n)
(define-skeleton html-ordered-list
"HTML ordered list tags."
***************
*** 1969,1975 ****
"HTML paragraph tag."
nil
(if (bolp) nil ?\n)
! \n "<p>" _ (if sgml-xml-mode "</p>"))
(define-skeleton html-checkboxes
"Group of connected checkbox inputs."
--- 1972,1978 ----
"HTML paragraph tag."
nil
(if (bolp) nil ?\n)
! "<p>" _ (if sgml-xml-mode "</p>"))
(define-skeleton html-checkboxes
"Group of connected checkbox inputs."
***************
*** 1981,1992 ****
"\" name=\"" (or v1 (setq v1 (skeleton-read "Name: ")))
"\" value=\"" str ?\"
(when (y-or-n-p "Set \"checked\" attribute? ")
! (funcall skeleton-transformation " checked"))
! (if sgml-xml-mode "/>" ">")
(skeleton-read "Text: " (capitalize str))
(or v2 (setq v2 (if (y-or-n-p "Newline after text? ")
(funcall skeleton-transformation
! (if sgml-xml-mode "<br/>" "<br>"))
"")))
\n))
--- 1984,1996 ----
"\" name=\"" (or v1 (setq v1 (skeleton-read "Name: ")))
"\" value=\"" str ?\"
(when (y-or-n-p "Set \"checked\" attribute? ")
! (funcall skeleton-transformation
! (if sgml-xml-mode " checked=\"checked\"" " checked")))
! (if sgml-xml-mode " />" ">")
(skeleton-read "Text: " (capitalize str))
(or v2 (setq v2 (if (y-or-n-p "Newline after text? ")
(funcall skeleton-transformation
! (if sgml-xml-mode "<br />" "<br>"))
"")))
\n))
***************
*** 2000,2011 ****
"\" name=\"" (or (car v2) (setcar v2 (skeleton-read "Name: ")))
"\" value=\"" str ?\"
(when (and (not v1) (setq v1 (y-or-n-p "Set \"checked\" attribute? ")))
! (funcall skeleton-transformation " checked"))
! (if sgml-xml-mode "/>" ">")
(skeleton-read "Text: " (capitalize str))
(or (cdr v2) (setcdr v2 (if (y-or-n-p "Newline after text? ")
(funcall skeleton-transformation
! (if sgml-xml-mode "<br/>" "<br>"))
"")))
\n))
--- 2004,2016 ----
"\" name=\"" (or (car v2) (setcar v2 (skeleton-read "Name: ")))
"\" value=\"" str ?\"
(when (and (not v1) (setq v1 (y-or-n-p "Set \"checked\" attribute? ")))
! (funcall skeleton-transformation
! (if sgml-xml-mode " checked=\"checked\"" " checked")))
! (if sgml-xml-mode " />" ">")
(skeleton-read "Text: " (capitalize str))
(or (cdr v2) (setcdr v2 (if (y-or-n-p "Newline after text? ")
(funcall skeleton-transformation
! (if sgml-xml-mode "<br />" "<br>"))
"")))
\n))
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el,
Juri Linkov <=