comparison src/elisp/urweb-mode.el @ 1565:9c7b79214cae

Minor tweak to speed up Emacs mode.
author Vladimir Shabanov <vshabanoff@gmail.com>
date Mon, 26 Sep 2011 02:54:52 +0400
parents a479947efbcd
children 7328dfeb7c0f
comparison
equal deleted inserted replaced
1564:da11f7b18067 1565:9c7b79214cae
183 (decf depth) 183 (decf depth)
184 (progn 184 (progn
185 (setq answer t) 185 (setq answer t)
186 (setq finished t)))) 186 (setq finished t))))
187 ((looking-at "</xml>") 187 ((looking-at "</xml>")
188 (incf depth)))) 188 (incf depth))
189
190 ((and (= depth 0)
191 (not (looking-at "<xml")) ;; ignore <xml/>
192 (eq font-lock-tag-face
193 (get-text-property (point) 'face)))
194 ;; previous code was highlighted as tag, seems we are in xml
195 (progn
196 (setq answer t)
197 (setq finished t)))
198
199 ((= depth 0)
200 ;; previous thing was a tag like, but not tag
201 ;; seems we are in usual code or comment
202 (setq finished t))
203 ))
189 answer))) 204 answer)))
190 205
191 (defun amAttribute (face) 206 (defun amAttribute (face)
192 (if (ignore-errors (save-excursion (backward-word 2) (backward-char 1) (looking-at "<"))) 207 (if (ignore-errors (save-excursion (backward-word 2) (backward-char 1) (looking-at "<")))
193 nil 208 nil