.emacs-my
changeset 985 ad3c49e55848
parent 984 3dea749e5fe2
child 986 6e74bf91f1df
equal deleted inserted replaced
984:3dea749e5fe2 985:ad3c49e55848
  2354  htmlize-convert-nonascii-to-entities nil)
  2354  htmlize-convert-nonascii-to-entities nil)
  2355 
  2355 
  2356 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2356 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2357 (message "html")
  2357 (message "html")
  2358 
  2358 
  2359 (add-to-list 'auto-mode-alist '("\\.jspf?\\'" . html-mode))
       
  2360 
       
  2361 (defun html-charref-escape-region (start end)
  2359 (defun html-charref-escape-region (start end)
  2362   (interactive "r")
  2360   (interactive "r")
  2363   (save-excursion
  2361   (save-excursion
  2364     (save-restriction
  2362     (save-restriction
  2365       (narrow-to-region start end)
  2363       (narrow-to-region start end)
  2450                (lambda (item) (not (equal (car item) "html")))
  2448                (lambda (item) (not (equal (car item) "html")))
  2451                html-tag-alist)))
  2449                html-tag-alist)))
  2452        (add-to-list 'html-tag-alist '("script" (\n) ("type" "text/javascript") ))
  2450        (add-to-list 'html-tag-alist '("script" (\n) ("type" "text/javascript") ))
  2453        (add-to-list 'html-tag-alist '("style" (\n) ("type" "text/css") ))
  2451        (add-to-list 'html-tag-alist '("style" (\n) ("type" "text/css") ))
  2454        )))
  2452        )))
       
  2453 
       
  2454 
       
  2455 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       
  2456 (message "jsp")
       
  2457 
       
  2458 (define-derived-mode jsp-mode html-mode "JSP"
       
  2459   "JSP editing mode. Redefine HTML comment syntax to JSP."
       
  2460   (setq comment-start "<%--")
       
  2461   (setq comment-end "--%>")
       
  2462   (setq comment-start-skip "<[!%]--[ \t]*")
       
  2463   (setq comment-end-skip "[ \t]*--[% \t\n]*>")
       
  2464   (setq jsp-font-lock-syntactic-keywords
       
  2465         '(("\\(<\\)%--" (1 "< b"))
       
  2466           ("--%\\(>\\)" (1 "> b"))))
       
  2467   (setcdr (assoc 'font-lock-syntactic-keywords font-lock-defaults) 'jsp-font-lock-syntactic-keywords) )
       
  2468 
       
  2469 (add-to-list 'auto-mode-alist '("\\.jspf?\\'" . jsp-mode))
  2455 
  2470 
  2456 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2471 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2457 (message "sh, bash")
  2472 (message "sh, bash")
  2458 
  2473 
  2459 (add-to-list 'auto-mode-alist '("\\.cygport\\'" . shell-script-mode))
  2474 (add-to-list 'auto-mode-alist '("\\.cygport\\'" . shell-script-mode))