comparison src/elisp/urweb-mode.el @ 366:3004f8843e36

Proper indenting of normal ML-y code after </xml>
author Adam Chlipala <adamc@hcoop.net>
date Thu, 16 Oct 2008 13:17:09 -0400
parents dda8f3c6ae7c
children 28d3d7210687
comparison
equal deleted inserted replaced
365:dda8f3c6ae7c 366:3004f8843e36
571 "Return the indentation to use for a symbol in `urweb-starters-syms'. 571 "Return the indentation to use for a symbol in `urweb-starters-syms'.
572 Point should be just before the symbol ORIG-SYM and is not preserved." 572 Point should be just before the symbol ORIG-SYM and is not preserved."
573 (let ((sym (unless (save-excursion (urweb-backward-arg)) 573 (let ((sym (unless (save-excursion (urweb-backward-arg))
574 (urweb-backward-spaces) 574 (urweb-backward-spaces)
575 (urweb-backward-sym)))) 575 (urweb-backward-sym))))
576 (if (and (= sym ">") (save-excursion (backward-char 5) (looking-at "</xml")))
577 (setq sym "</xml>"))
576 (if (member sym '(";" "d=")) (setq sym nil)) 578 (if (member sym '(";" "d=")) (setq sym nil))
577 (if sym (urweb-get-sym-indent sym) 579 (if sym (urweb-get-sym-indent sym)
578 ;; FIXME: this can take a *long* time !! 580 ;; FIXME: this can take a *long* time !!
579 (setq sym (urweb-find-matching-starter urweb-starters-syms)) 581 (setq sym (urweb-find-matching-starter urweb-starters-syms))
580 ;; Don't align with `and' because it might be specially indented. 582 ;; Don't align with `and' because it might be specially indented.