From owner-ntemacs-users@cs.washington.edu Mon Jun 15 06:38:23 1998 X-VM-v5-Data: ([nil nil nil nil nil nil t nil nil] [nil "Mon" "15" "June" "1998" "08:50:55" "-0400" "Mike Reiss" "103311.463@compuserve.com" nil "383" "cold fusion mode" "^From:" nil nil "6" nil nil nil nil] nil) Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.7+CS/7.2ju) with SMTP id GAA04945 for ; Mon, 15 Jun 1998 06:38:22 -0700 Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id GAA44845 for ; Mon, 15 Jun 1998 06:38:23 -0700 Received: (majordom@localhost) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) id FAA29773 for ntemacs-users-outgoing; Mon, 15 Jun 1998 05:52:55 -0700 (PDT) Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id FAA29769 for ; Mon, 15 Jun 1998 05:52:52 -0700 (PDT) Received: from hil-img-2.compuserve.com (hil-img-2.compuserve.com [149.174.177.132]) by june.cs.washington.edu (8.8.7+CS/7.2ju) with ESMTP id FAA02375 for ; Mon, 15 Jun 1998 05:52:51 -0700 Received: (from root@localhost) by hil-img-2.compuserve.com (8.8.6/8.8.6/2.12) id IAA21590 for ntemacs-users@cs.washington.edu; Mon, 15 Jun 1998 08:52:49 -0400 (EDT) Message-ID: <199806150852_MC2-403C-9463@compuserve.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk X-FAQ: http://www.cs.washington.edu/homes/voelker/ntemacs.html From: Mike Reiss <103311.463@compuserve.com> Sender: owner-ntemacs-users@cs.washington.edu To: z-ntemacs Subject: cold fusion mode Date: Mon, 15 Jun 1998 08:50:55 -0400 > Galen asked me if I knew of a Cold Fusion mode, which I don't. does > anyone else, or has anyone found an existing mode works well with it? > -geoff I took html-helper-mode and added some commands in for Cold Fusion. It does what I want it too but I make no other claims for it. I also added in Cold Fusion comments. Here is what I use. If you like it let me know. If not, I hope it gives you a starting point. I added in some menus when I started this but I never use them so I make no promises ... There are a couple of files, at least as I use them. Good luck. ================================== ;; Cold Fusion elements and attributes ;; An html-helper-mode module ;; Mike Reiss <103311.463@compuserve.com> ;; version 1.0 ;; based on the table additions done by ;; Joe Hildebrand - 23 May 1995 ;; This code is distributed under the same terms as html-helper-mode ;; itself. html-helper-mode for Emacs is written and maintained by ;; Nelson Minar , and is available from ;; . Nelson takes no ;; responsibility for what I have done with his software! ;; The extensions to HTML supported by this module are documented ;; and copyrighted by ;; Allaire Corporation, One Alewife Center, Cambridge, MA 02140 ;; http://www.allaire.com ;; This code must be called *after* html-helper-mode loads. It can be ;; run nicely from the html-helper-load-hook. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; (html-helper-add-tag ;; '(cf "t" "" "table, no border" ;; ("
" (r "Table: ") "\n
"))) ;; (html-helper-add-tag ;; '(cf "b" "" "table, w/border" ;; ("
" (r "Table: ") "\n
"))) ;; (html-helper-add-tag ;; '(cf "d" "" "table data" ("" (r "Table Data: ") ""))) ;; (html-helper-add-tag ;; '(cf "h" "" "table heading" ("" (r "Table Heading: ") ""))) ;; (html-helper-add-tag ;; '(cf "r" "" "table row" ("" (r "Table Row: ") "\n"))) ;; (html-helper-add-tag ;; '(cf "c" "" "table caption" ;; ("" (r "Table Caption: ") "\n"))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (html-helper-add-type-to-alist '(cf . (cf-html-map "\C-c\C-c" cf-html-menu "Insert Cold Fusion Elements"))) (html-helper-install-type 'cf) (html-helper-add-tag '(cf "u" "" "cf update" ("\n"))) (html-helper-add-tag '(cf "t" "" "cf table" ("" (p "Table definition: ") "\n\n"))) (html-helper-add-tag '(cf "s" "" "cf set" ("\n"))) (html-helper-add-tag '(cf "r" "" "cf report" ("" (p "Body: ") "\n\n"))) (html-helper-add-tag '(cf "q" "" "cf query" ("" (p "Body: ") "\n\n"))) (html-helper-add-tag '(cf "p" "" "cf param" ("\n"))) (html-helper-add-tag '(cf "o" "" "cf output" ("" (p "Text: ") "\n\n"))) (html-helper-add-tag '(cf "m" "" "cf mail" ("" (p "Body: ") "\n\n"))) (html-helper-add-tag '(cf "Q" "" "cf loop, query" ("" (p "Body: ") "\n\n"))) (html-helper-add-tag '(cf "L" "" "cf loop, list" ("" (p "Body: ") "\n\n"))) (html-helper-add-tag '(cf "I" "" "cf loop, index" ("" (p "Body: ") "\n\n"))) (html-helper-add-tag '(cf "C" "" "cf loop, conditional" ("" (p "Body: ") "\n\n"))) (html-helper-add-tag '(cf "w" "" "cf location" ("\n"))) (html-helper-add-tag '(cf "d" "" "cf insert" ("\n"))) (html-helper-add-tag '(cf "n" "" "cf include" ("\n"))) (html-helper-add-tag '(cf "i" "" "cf if" ("" (p "Body: ") "\n\n"))) (html-helper-add-tag '(cf "h" "" "cf header" ("\n"))) (html-helper-add-tag '(cf "f" "" "cf file" ("\n"))) (html-helper-add-tag '(cf "e" "" "cf error" ("\n"))) (html-helper-add-tag '(cf "k" "" "cf cookie" ("\n"))) (html-helper-add-tag '(cf "k" "" "cf content" ("\n"))) (html-helper-add-tag '(cf "c" "" "cf col" ("\n"))) (html-helper-add-tag '(cf "a" "" "cf abort" ("\n"))) (html-helper-add-tag '(cf "t" "" "cf application" ("\n"))) (html-helper-add-tag '(cf "a" "" "cf abort" ("\n"))) (html-helper-rebuild-menu) (provide 'hhm-cf) ============================================ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; SETUP FOR USE OF HTML-HELPER-MODE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Variables to control html-helper ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (setq html-helper-do-write-file-hooks t html-helper-build-new-buffer t html-helper-use-expert-menu t html-helper-timestamp-start "" html-helper-basic-offset 4 comment-start "" html-helper-any-list-item-start "
  • \\|
    \\|
    \\|" html-helper-any-list-item-end "
  • \\|\\|\\|" html-helper-any-list-start "
    \\|
      \\|
        \\|\\|\\|\\|\\|<cfinse rt>\\|<table\\|<tr>\\|<td\\|<input\\|<cfoutput\\|<option\\|<h1>\\|<h2>\\|<h 3>\\|<h4>\\|<h5>\\|<h6>\\|<center>\\|<frameset\\|<cfquery\\|<cfif\\|<cfloop \\|<cftransaction>" html-helper-any-list-end "</dl>\\|</ul>\\|</ol>\\|</menu>\\|</dir>\\|</select>\\|</head>\\|\ \|\\|\\|\\|\\|\\|\\|\\|\\| \\|\\|\\|\\|\\|\\ |" html-helper-new-buffer-template '("\n" " \n" "\n" p "\n" "\n\n" "\n" "

        \n" p "

        \n\n" p "\n\n
        \n" html-helper-address-string "\n" html-helper-timestamp-start html-helper-timestamp-end "\n\n" "\n") html-helper-address-string "Your Name <mail address>
        ") (defun mouse-html-helper-menu (e) (interactive "e") (set-buffer (window-buffer (posn-window (event-start e)))) (let ((map (lookup-key html-helper-mode-map [menu-bar HTML])) key command func) (setq key (popup-menu e map) key (apply 'vector key) command (lookup-key map key) func (and (symbolp command) (symbol-function command))) (cond ((null func) (setq this-command last-command)) ((symbolp func) (setq this-command func) (call-interactively this-command)) (t (call-interactively command))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Electric indentation routines ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun html-helper-electric-newline () (interactive) (indent-according-to-mode) (newline-and-indent)) (defun html-helper-electric-insert (arg) (interactive "P") (self-insert-command (prefix-numeric-value arg)) (html-helper-indent-command)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Key definitions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (eval-after-load "html-helper-mode" '(progn (define-key html-helper-mode-map [M-right] 'tempo-forward-mark) (define-key html-helper-mode-map [M-left] 'tempo-backward-mark) (define-key html-helper-mode-map [C-down-mouse-2] 'mouse-html-helper-menu) (define-key html-helper-mode-map [s-down-mouse-1] 'mouse-html-helper-menu) (define-key html-helper-mode-map [return] 'html-helper-electric-newline) ; (define-key html-helper-mode-map ">" ; 'html-helper-electric-insert) )) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; html-helper-load used to add tables and Cold Fusion to menu ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (add-hook 'html-helper-load-hook '(lambda() (load "html-tab") (load "html-cf"))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; html-helper-mode used to change comments for Cold Fusion ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (add-hook 'html-helper-mode-hook '(lambda() (setq comment-start "" comment-start-skip "//[ \t]*" comment-column 0) (local-set-key "\C-I" 'tab-to-tab-stop) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;}}} ;;{{{ patterns for hilit19 (PART OF THE html-helper-mode-hook) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Define some useful highlighting patterns for the hilit19 package. ;; These will activate only if hilit19 has already been loaded. ;; Thanks to for some pattern suggestions (if (featurep 'hilit19) (hilit-set-mode-patterns 'html-helper-mode '(("" comment) ("/\\*" "*/" comment) ("//" "\n" comment) ("[^<>]*\\(<[^>]*>[^<>]*\\)*>" nil comment) ; ; ("" "" error-face) ; ("" "" tag-face) ;only colour inside tag ("" define) ("" nil define) ("" include) ("" include) ;; First highlighting just handles unnested tags, then do nesting ("[^<]*" nil italic) ("" "" bold) ("" "" italic) ("" "" underline) ("&[^;\n]*;" nil string) ("<\\w+" nil keyword) ("" nil keyword) ("\"[^\n\"]*\"" nil string) ("#[^#\n]*#" nil define) ) nil 'case-insensitive) nil) ;;}}} )) ======================================================== ;; Netscape elements and attributes ;; An html-helper-mode module ;; Joe Hildebrand - 23 May 1995 ;; version: 1.2 ;; This code is distributed under the same terms as html-helper-mode ;; itself. html-helper-mode for Emacs is written and maintained by ;; Nelson Minar , and is available from ;; . Nelson takes no ;; responsibility for what I have done with his software! ;; The extensions to HTML supported by this module are documented at ;; . ;; This code must be called *after* html-helper-mode loads. It can be ;; run nicely from the html-helper-load-hook. (html-helper-add-type-to-alist '(table . (table-html-map "\C-c\C-t" table-html-menu "Insert Table Elements"))) (html-helper-install-type 'table) (html-helper-add-tag '(table "d" "" "table data, right" ("" (r "Table Data: ") "\n\n"))) (html-helper-add-tag '(table "d" "" "table data" ("" (r "Table Data: ") "\n\n"))) (html-helper-add-tag '(table "r" "" "table row" ("" (r "Table Row: ") "\n\n"))) (html-helper-add-tag '(table "c" "" "table caption" ("" (r "Table Caption: ") "\n\n"))) (html-helper-add-tag '(table "h" "" "table heading" ("" (r "Table Heading: ") "\n"))) (html-helper-add-tag '(table "t" "" "table, no spacing" ("
        " (r "Table: ") "\n
        \n"))) (html-helper-add-tag '(table "t" "" "table, no border" ("
        " (r "Table: ") "\n
        \n"))) (html-helper-add-tag '(table "b" "" "table, w/border" ("
        " (r "Table: ") "\n
        \n"))) (html-helper-rebuild-menu) (provide 'hhm-table)