comparison src/elisp/urweb-mode.el @ 370:4f75cc2e1373

Fix problem with sig/struct indenting
author Adam Chlipala <adamc@hcoop.net>
date Thu, 16 Oct 2008 14:52:50 -0400
parents 226c977faa9c
children 782ef3ad8c28
comparison
equal deleted inserted replaced
369:226c977faa9c 370:4f75cc2e1373
584 "Return the indentation to use for a symbol in `urweb-starters-syms'. 584 "Return the indentation to use for a symbol in `urweb-starters-syms'.
585 Point should be just before the symbol ORIG-SYM and is not preserved." 585 Point should be just before the symbol ORIG-SYM and is not preserved."
586 (let ((sym (unless (save-excursion (urweb-backward-arg)) 586 (let ((sym (unless (save-excursion (urweb-backward-arg))
587 (urweb-backward-spaces) 587 (urweb-backward-spaces)
588 (urweb-backward-sym)))) 588 (urweb-backward-sym))))
589 (if (and (= sym ">") (save-excursion (backward-char 5) (looking-at "</xml")))
590 (setq sym "</xml>"))
591 (if (member sym '(";" "d=")) (setq sym nil)) 589 (if (member sym '(";" "d=")) (setq sym nil))
592 (if sym (urweb-get-sym-indent sym) 590 (if sym (urweb-get-sym-indent sym)
593 ;; FIXME: this can take a *long* time !! 591 ;; FIXME: this can take a *long* time !!
594 (setq sym (urweb-find-matching-starter urweb-starters-syms)) 592 (setq sym (urweb-find-matching-starter urweb-starters-syms))
595 ;; Don't align with `and' because it might be specially indented. 593 ;; Don't align with `and' because it might be specially indented.