annotate emacs/xml-hack.el @ 0:509549c55989

from elsewhere
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Tue, 25 May 2021 13:57:42 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
1 (defun sgml-tag-again ()
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
2 "Insert another of the tag we're in as sibling"
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
3 (interactive )
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
4 (let ((elt (sgml-find-element-of (point))))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
5 (sgml-up-element)
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
6 (sgml-insert-element elt)))
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
7
509549c55989 from elsewhere
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
diff changeset
8 (define-key sgml-mode-map "\C-cn" 'sgml-tag-again)