--- dtml-mode-0.1/dtml-mode.el Sat May 8 19:38:48 1999 +++ dtml-mode-0.1.newtags+emacs/dtml-mode.el Mon Jan 24 19:36:27 2000 @@ -29,11 +29,11 @@ (defconst dt-version "0.1" "`dtml-mode' version number.") -(defcustom dtml-comment-start "" +(defcustom dtml-comment-start "" "*String used by \\[comment-region] to comment out a block of code." :type 'string :group 'dtml) -(defcustom dtml-comment-end "" +(defcustom dtml-comment-end "" "*String used by \\[comment-region] to comment out a block of code." :type 'string :group 'dtml) @@ -43,8 +43,8 @@ :group 'dtml) (defvar dtml-font-lock-keywords - '(("" 0 font-lock-comment-face t)) + '(("" 0 font-lock-comment-face t)) "*Keywords to highlight in DTML code.") (defvar dtml-keywords @@ -55,13 +55,21 @@ "unless" )) + +(defun point-at-bol () + (save-excursion + (beginning-of-line) + (point))) + + + (defun dtml-keyword-template (s) (list (format "\\(#[/]?[ ]*%s\\)[ -]" s ) 1 font-lock-keyword-face t)) (defvar dtml-font-lock-keywords-1 - (append '(("" 1 font-lock-string-face nil) - ("-->" 0 font-lock-comment-face t)) + (append '(("" 1 font-lock-string-face nil) + (">" 0 font-lock-comment-face t)) (mapcar '(lambda (s) (dtml-keyword-template s)) dtml-keywords))) @@ -90,59 +98,59 @@ (define-skeleton dtml-var "DTML var tag" - "args: " "" _ nil) + "args: " "" _ nil) (define-skeleton dtml-if "Insert a DTML if statement." "condition: " - "" \n + "" \n _ \n - ( "other condition, %s: " "" \n + ( "other condition, %s: " "" \n _ \n ) - "" \n + "" \n _ \n resume: - "") + "") (define-skeleton dtml-in "Insert a DTML in tag." - "args: " "" \n _ \n "" + "args: " "" \n _ \n "" ) (define-skeleton dtml-with "Insert a DTML #with tag." - "args: " "" \n _ \n "" + "args: " "" \n _ \n "" ) (define-skeleton dtml-sendmail "Insert a DTML #sendmail tag." - "args: " "" \n _ \n "" + "args: " "" \n _ \n "" ) (define-skeleton dtml-unless "Insert a DTML #unless tag." - "args: " ""\n _ \n "" + "args: " ""\n _ \n "" ) (define-skeleton dtml-tree "Insert a DTML #tree tag." - "args: " "" \n _ \n "" + "args: " "" \n _ \n "" ) (define-skeleton dtml-call "Insert a DTML #call tag." - "args: " "" nil + "args: " "" nil ) (define-skeleton dtml-raise "Insert a DTML #call tag." - "type: " "" \n _ \n "" nil + "type: " "" \n _ \n "" nil ) ;(define-skeleton dtml-set-local ; "Insert a DTML #call tag." -; "varname:" "" nil +; "varname:" "" nil ;) (defun dtml-mode () @@ -191,13 +199,13 @@ (defun dtml-line-for-indent-p () "Is this a line we consider for indentation purposes?" - ;; looking-at -;; (looking-at "") - ;;(looking-at "