[Top][All Lists]

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

Re: editing html - auto insert end tags

From: Friedrich Laher
Subject: Re: editing html - auto insert end tags
Date: Thu, 18 Aug 2005 13:02:41 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1

just some idea

(setq htmlTagWriting nil)

(defun htmlOpeningTag () (interactive)

 (insert     "<>") (setq htmlStartTagMarkEnd (point-marker))
 (backward-char 1) (setq htmlStartTagMarkBeg (point-marker))

 (setq htmlTagWriting t)
(defun htmlClosingTag () (interactive)

 (when  htmlTagWriting

    (goto-char htmlStartTagMarkEnd)

(insert "</" (buffer-substring htmlStartTagMarkBeg htmlStartTagMarkEnd) )

    (goto-char htmlStartTagMarkEnd)

    (setq htmlTagWriting nil)
(local-set-key "<" 'htmlOpeningTag)
(local-set-key [tab] 'htmlClosingTag)

chris wrote:

Gian Uberto Lauri wrote:

"c" == chris  <address@hidden> writes:

c> Hi, Does anyone know of a html mode that will auto insert the end
c> tags as I type.  If <html> is typed, it'll add </html> straight
c> away?

html-helper-mode does something like this for some tags...

Do you have to turn it on manually? I have html-helper-mode here but it doesn't do it. I had a look for a more recent version, but there are loads of pages out there hosting it all with varying versions.

Help-gnu-emacs mailing list

reply via email to

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