hhm.dot.emacs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ;;; html-helper-mode
  2. ;; Initialization
  3. (autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)
  4. (setq auto-mode-alist (append
  5. '(
  6. ("\\.html" . html-helper-mode)
  7. ("\\.shtml" . html-helper-mode))
  8. auto-mode-alist))
  9. ;; Set this to be whatever signature
  10. ;; you want on the bottom of your pages.
  11. ;(setq html-helper-address-string "who@hoge.ne.jp")
  12. ;; If not nil, then use the full HTML menu.
  13. ;(setq html-helper-use-expert-menu nil) ;; Default
  14. ;; If not nil,
  15. ;; then modify `local-write-file-hooks' to do timestamps.
  16. ;(setq html-helper-do-write-file-hooks t) ;; Default
  17. ;;If not nil,
  18. ;; then insert `html-helper-new-buffer-strings' for new buffers.
  19. ;(setq html-helper-build-new-buffer t) ;; Default
  20. ;; Version of HTML DTD you're using.
  21. ;(setq html-helper-htmldtd-version
  22. ; "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n") ;; Default
  23. ;; Extra items to put in the HTML expert menu.
  24. ;; The value of this symbol is appended to the beginning of the expert
  25. ;; menu that is handed off to easymenu for definition.
  26. ;; It should be a list of vectors or lists
  27. ;; which themselves are vectors (for submenus).
  28. ;(setq html-helper-user-menu nil) ;; Default
  29. ;; Basic indentation size used for list indentation
  30. ;(setq html-helper-basic-offset 2) ;; Default
  31. ;; Indentation of lines that follow a <li> item.
  32. ;; Default is 4, the length of things like \"<li>\" and \"<dd>\".
  33. ;(setq html-helper-item-continue-indent 4) ;; Default
  34. ;; If not nil,
  35. ;; the indentation code for html-helper is turned off.
  36. ;(setq html-helper-never-indent nil) ;; Default
  37. ;; Template for new buffers.
  38. ;; Inserted by `html-helper-insert-new-buffer-strings'
  39. ;; if `html-helper-build-new-buffer' is set to t
  40. ;(setq html-helper-new-buffer-template
  41. ; '(html-helper-htmldtd-version
  42. ; "<html> <head>\n"
  43. ; "<title>" p "</title>\n</head>\n\n"
  44. ; "<body>\n"
  45. ; "<h1>" p "</h1>\n\n"
  46. ; p
  47. ; "\n\n<hr>\n"
  48. ; "<address>" html-helper-address-string "</address>\n"
  49. ; html-helper-timestamp-start
  50. ; html-helper-timestamp-end
  51. ; "\n</body> </html>\n")) ;; Default
  52. ;; Start delimiter for timestamps.
  53. ;; Everything between `html-helper-timestamp-start' and
  54. ;; `html-helper-timestamp-end' will be deleted and
  55. ;; replaced with the output of the functions `html-helper-timestamp-hook'
  56. ;; if `html-helper-do-write-file-hooks' is t
  57. ;(setq html-helper-timestamp-start "<!-- hhmts start -->\n") ;; Default
  58. ;; End delimiter for timestamps.
  59. ;; Everything between `html-helper-timestamp-start' and
  60. ;; `html-helper-timestamp-end' will be deleted and
  61. ;; replaced with the output of the function `html-helper-insert-timestamp'
  62. ;; if `html-helper-do-write-file-hooks' is t
  63. ;(setq html-helper-timestamp-end "<!-- hhmts end -->") ;; Default
  64. ;; Change format and {start,end} delimiter for timestamps.
  65. ;; if you will be use this,
  66. ;; you should change `html-helper-new-buffer-template'.
  67. ;(setq html-helper-timestamp-start "<META name=\"date\" content=\""
  68. ; html-helper-timestamp-end "\">")
  69. ;(defun TT:html-helper-insert-timestamp ()
  70. ; (let ((tz (car (current-time-zone)))
  71. ; (tzh) (tzm))
  72. ; (setq tzh (/ tz 3600)
  73. ; tz (- tz (* tzh 3600)))
  74. ; (setq tzm (/ tz 60)
  75. ; tz (- tz (* tzm 60)))
  76. ; (insert
  77. ; (concat
  78. ; (format-time-string "%Y-%m-%dT%H:%M:%S" (current-time))
  79. ; (format "%s%02d:%02d" (if (> tzh 0) "+" "-") tzh tzm)))))
  80. ;(setq html-helper-timestamp-hook 'TT:html-helper-insert-timestamp)