Mercurial > hgrepos > hgweb.cgi > yatex
comparison yahtml.el @ 77:1b172d26b55e
Fix auto-fill movement on Emacs21.
Fix YaTeX:ref.
Support jump/change on AMS-LaTeX's parentheses.
author | yuuji |
---|---|
date | Thu, 01 May 2003 13:38:27 +0000 |
parents | f41b01fef5d6 |
children | 0734be649cb8 |
comparison
equal
deleted
inserted
replaced
76:c16a10460ce5 | 77:1b172d26b55e |
---|---|
1 ;;; -*- Emacs-Lisp -*- | 1 ;;; -*- Emacs-Lisp -*- |
2 ;;; (c ) 1994-2002 by HIROSE Yuuji [yuuji@yatex.org] | 2 ;;; (c ) 1994-2002 by HIROSE Yuuji [yuuji@yatex.org] |
3 ;;; Last modified Wed May 22 13:55:01 2002 on firestorm | 3 ;;; Last modified Thu Nov 21 17:55:40 2002 on firestorm |
4 ;;; $Id$ | 4 ;;; $Id$ |
5 | 5 |
6 (defconst yahtml-revision-number "1.70" | 6 (defconst yahtml-revision-number "1.70" |
7 "Revision number of running yahtml.el") | 7 "Revision number of running yahtml.el") |
8 | 8 |
34 ;;; ;お気に入りのブラウザを書いて下さい。netscapeが便利です。 | 34 ;;; ;お気に入りのブラウザを書いて下さい。netscapeが便利です。 |
35 ;;; (setq yahtml-path-url-alist | 35 ;;; (setq yahtml-path-url-alist |
36 ;;; '(("/home/yuuji/public_html" . "http://www.mynet/~yuuji") | 36 ;;; '(("/home/yuuji/public_html" . "http://www.mynet/~yuuji") |
37 ;;; ("/home/staff/yuuji/html" . "http://www.othernet/~yuuji"))) | 37 ;;; ("/home/staff/yuuji/html" . "http://www.othernet/~yuuji"))) |
38 ;;; ;UNIXの絶対パスと対応するURLのリストを書いて下さい。 | 38 ;;; ;UNIXの絶対パスと対応するURLのリストを書いて下さい。 |
39 ;;; | |
40 ;;; HTMLファイル漢字コードが正しく判別されるようにホームディレクトリに | |
41 ;;; .htaccess ファイルを作り以下のどれか1行を選んで書いて下さい。 | |
42 ;;; | |
43 ;;; AddType "text/html; charset=Shift_JIS" .html (SJISの場合) | |
44 ;;; AddType "text/html; charset=iso2022-jp" .html (JISの場合) | |
45 ;;; AddType "text/html; charset=EUC-JP" .html (EUCの場合) | |
46 ;;; | |
47 ;;; .htaccess が作れない場合は | |
48 ;;; (setq yahtml-kanji-code 2) | |
49 ;;; ;HTMLファイルの漢字コードを変更する場合は 1=SJIS、2=JIS、3=EUC | |
50 ;;; ;で設定して下さい。デフォルトは 2 です。 | |
51 ;;; | |
52 ;;; を適切に書き換えて ~/.emacs に足して下さい。 | |
39 ;;; | 53 ;;; |
40 ;;;[Commentary] | 54 ;;;[Commentary] |
41 ;;; | 55 ;;; |
42 ;;; It is assumed you are already familiar with YaTeX. The following | 56 ;;; It is assumed you are already familiar with YaTeX. The following |
43 ;;; completing featureas are available: ([prefix] means `C-c' by default) | 57 ;;; completing featureas are available: ([prefix] means `C-c' by default) |
505 | 519 |
506 (defun yahtml-dir-default-charset () | 520 (defun yahtml-dir-default-charset () |
507 (let*((fn (file-name-nondirectory (or buffer-file-name ""))) | 521 (let*((fn (file-name-nondirectory (or buffer-file-name ""))) |
508 (ext (substring fn (or (string-match "\\.[a-z0-9]+$" fn) 0))) | 522 (ext (substring fn (or (string-match "\\.[a-z0-9]+$" fn) 0))) |
509 (ptn (format "^\\s *AddType.*charset=\\(.*\\)\\%s$" ext)) | 523 (ptn (format "^\\s *AddType.*charset=\\(.*\\)\\%s$" ext)) |
524 (case-fold-search t) | |
510 line | 525 line |
511 charset) | 526 charset) |
512 (if (setq line (yahtml-get-user-httpconf-entry ptn)) | 527 (if (setq line (yahtml-get-user-httpconf-entry ptn)) |
513 (progn | 528 (progn |
514 (string-match ptn line) | 529 (string-match ptn line) |
1504 (insert (format "<%s>" cmd))) | 1519 (insert (format "<%s>" cmd))) |
1505 | 1520 |
1506 (defun yahtml-insert-p (&optional arg) | 1521 (defun yahtml-insert-p (&optional arg) |
1507 "Convenient function to insert <p></p>" | 1522 "Convenient function to insert <p></p>" |
1508 (interactive "P") | 1523 (interactive "P") |
1509 (if arg (yahtml-insert-tag nil "p") | 1524 (if arg (yahtml-insert-tag arg "p") |
1510 (save-excursion ;insert "/p" first to memorize "p" | 1525 (save-excursion ;insert "/p" first to memorize "p" |
1511 (yahtml-insert-single "/p")) ;in the last-completion variable | 1526 (yahtml-insert-single "/p")) ;in the last-completion variable |
1512 (yahtml-insert-single "p"))) | 1527 (yahtml-insert-single "p"))) |
1513 | 1528 |
1514 (defun yahtml-insert-amps (arg) | 1529 (defun yahtml-insert-amps (arg) |