comparison src/elisp/urweb-mode.el @ 396:040edfade639

Fix XML indenting to ignore comparison operators
author Adam Chlipala <adamc@hcoop.net>
date Tue, 21 Oct 2008 11:39:13 -0400
parents bc5a56ed0cd6
children 86c063fedc4d
comparison
equal deleted inserted replaced
395:9f67aac13cf7 396:040edfade639
501 (urweb-seek-back) 501 (urweb-seek-back)
502 (urweb-skip-matching-braces) 502 (urweb-skip-matching-braces)
503 (urweb-seek-back) 503 (urweb-seek-back)
504 (beginning-of-line) 504 (beginning-of-line)
505 (while (and (not done) (search-forward "<" start-pos t)) 505 (while (and (not done) (search-forward "<" start-pos t))
506 (if (looking-at "/") 506 (cond
507 (if (search-forward ">" start-pos t) 507 ((or (looking-at " ") (looking-at "="))
508 nil)
509 ((looking-at "/")
510 (if (re-search-forward "[^\\sw]>" start-pos t)
508 (when (> depth 0) (decf depth)) 511 (when (> depth 0) (decf depth))
509 (setq done t)) 512 (setq done t)))
510 (if (search-forward ">" start-pos t) 513 (t
514 (if (re-search-forward "[^\\sw]>" start-pos t)
511 (if (not (save-excursion (backward-char 2) (looking-at "/"))) 515 (if (not (save-excursion (backward-char 2) (looking-at "/")))
512 (incf depth)) 516 (incf depth))
513 (setq done t)))) 517 (setq done t)))))
514 (and (not done) (> depth 0))))) 518 (and (not done) (> depth 0)))))
515 519
516 (defun urweb-tag-matching-indent () 520 (defun urweb-tag-matching-indent ()
517 "Seek back to a matching opener tag and get its line's indent" 521 "Seek back to a matching opener tag and get its line's indent"
518 (save-excursion 522 (save-excursion