|
It's already in my .emacs file, assigned to ^Cr, which
is what I believe it was in PSGML. Thanks!
Bob
Josh Sled writes:
> (defun surround-region-with-tag
(tag-name) > (interactive "stag name: ") >
(save-excursion > (goto-char
(region-beginning)) > (insert (concat "<"
tag-name ">"))) > (goto-char
(region-end)) > (insert (concat "</" tag-name
">")))
This works even in non-interactive and takes the
'tag-name' length in account:
(defun
surround-region-with-tag (tag-name beg end)
(interactive "sTag name: \nr")
(save-excursion (goto-char
beg) (insert "<" tag-name
">") (goto-char (+ end 2
(length tag-name))) (insert
"</" tag-name ">")))
--drkm
YAHOO! GROUPS LINKS
|