source: projects/specs/trunk/h/html-helper-mode/hhm.dot.emacs @ 756

Revision 756, 3.4 KB checked in by iwaim, 14 years ago (diff)

add html-helper-mode 2.19.1.1-5 files

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