comparison src/elisp/urweb-mode.el @ 368:b6be16792584

Removed handling of <,> as operators, for now
author Adam Chlipala <adamc@hcoop.net>
date Thu, 16 Oct 2008 14:17:55 -0400
parents 28d3d7210687
children 226c977faa9c
comparison
equal deleted inserted replaced
367:28d3d7210687 368:b6be16792584
498 (decf depth))))))) 498 (decf depth)))))))
499 499
500 (defun urweb-tag-matching-indent () 500 (defun urweb-tag-matching-indent ()
501 "Seek back to a matching opener tag and get its line's indent" 501 "Seek back to a matching opener tag and get its line's indent"
502 (save-excursion 502 (save-excursion
503 (let ((depth 0) 503 (urweb-tag-matcher)
504 (done nil)) 504 (if (looking-at "<xml")
505 (while (and (not done) (search-backward ">" nil t)) 505 (+ (current-indentation) 2)
506 (if (save-excursion (backward-char 1) (looking-at "/")) 506 (current-indentation))))
507 (when (not (search-backward "<" nil t))
508 (setq done t))
509 (if (search-backward "<" nil t)
510 (if (looking-at "</")
511 (incf depth)
512 (if (= depth 0)
513 (setq done t)
514 (decf depth)))
515 (setq done t))))
516 (if (looking-at "<xml")
517 (+ (current-indentation) 2)
518 (current-indentation)))))
519 507
520 (defun urweb-calculate-indentation () 508 (defun urweb-calculate-indentation ()
521 (save-excursion 509 (save-excursion
522 (beginning-of-line) (skip-chars-forward "\t ") 510 (beginning-of-line) (skip-chars-forward "\t ")
523 (urweb-with-ist 511 (urweb-with-ist