changeset 68:0eb6997bee16

More adjustment for Emacs20 and XEmacs [prefix] g for <applet> <!--#include> <!--#exec>
author yuuji
date Mon, 26 Oct 1998 12:05:32 +0000
parents ced6eb72f63b
children 807c1e7e68b7
files docs/htmlqa docs/yatexe.tex docs/yatexj.tex help/YATEXHLP.eng help/YATEXHLP.jp yahtml.el yatex.el yatex.new yatex19.el yatexadd.el yatexenv.el yatexhie.el yatexhlp.el yatexlib.el yatexmth.el yatexprc.el yatexsec.el
diffstat 17 files changed, 549 insertions(+), 228 deletions(-) [+]
line wrap: on
line diff
--- a/docs/htmlqa	Tue Dec 16 13:34:57 1997 +0000
+++ b/docs/htmlqa	Mon Oct 26 12:05:32 1998 +0000
@@ -36,7 +36,7 @@
 	の機能強化版 auto-insert-tkld を使いましょう。後者は、
 	ftp://ftp.ae.keio.ac.jp/pub/emacs-lisp/util/auto-inset-tkld.tar.Z
 	で入手できます。
-	http://www-nagao.kuee.kyoto-u.ac.jp/member/tsuchiya/elisp-tips.html#yahtml-mode-hook
+	http://www-nagao.kuee.kyoto-u.ac.jp/member/tsuchiya/elisp/yahtml-mode.html
 	に設定例が書いてあります。
 	
 ■その他
--- a/docs/yatexe.tex	Tue Dec 16 13:34:57 1997 +0000
+++ b/docs/yatexe.tex	Mon Oct 26 12:05:32 1998 +0000
@@ -29,7 +29,7 @@
 * Main features::               What YaTeX can do
 * Installation::                Guide to install
 * Typesetting::                 Call typesetting processes
-* %# notation::                 Quick notation of controlling YaTeX
+* %#notation::                  
 * Completion::                  Input LaTeX commands with completion
 * Local dictionaries::          Directory dependent completion
 * Commenting out::              Commenting/uncommenting text
@@ -77,10 +77,18 @@
 
 * view-sectioning::             
 
+Cursor jump
+
+* Jump to corresponding object::  
+* Invoking image processor::    
+* Jump to main file::           
+* Jumping around the environment::  
+* Jumping to last completion position::  
+
 Changing and Deleting
 
-* Changing La@TeX{} commands::  
-* Killing La@TeX{} commands::   
+* Changing LaTeX commands::     
+* Killing LaTeX commands::      
 
 Customizations
 
@@ -104,8 +112,8 @@
 
 How the add-in function works
 
-* Defining `option add-in'::    
-* Defining `argument add-in'::  
+* Defining option-add-in::      
+* Defining argument-add-in::    
 @end menu
 
 @node What is YaTeX?, Main features, Top, Top
@@ -181,7 +189,7 @@
 loaded, mode string on mode line will be turned to "YaTeX".
 
 
-@node Typesetting, %# notation, Installation, Top
+@node Typesetting, %#notation, Installation, Top
 @comment  node-name,  next,  previous,  up
 @chapter Typesetting
 @cindex typesetting
@@ -220,7 +228,7 @@
 
 @node Calling typesetter, Calling previewer, Typesetting, Typesetting
 @comment  node-name,  next,  previous,  up
-@section{Calling typesetter}
+@section Calling typesetter
 
   Typing @kbd{[prefix] t j}, the current editing window will be divided
 horizontally when you invoke latex command, and log message of La@TeX{}
@@ -246,7 +254,7 @@
   Since @kbd{[prefix] tr} pastes the region into the file
 @file{texput.tex} in the current directory, you should be careful of
 overwriting.  The method of specification of the region is shown in the
-section @xref{%#NOTATION}.
+section @xref{%#notation}.
 
   The documentstyle  for typeset-region is the same as that of editing
 file if you edit one  file,  and is the same as main file's if you
@@ -254,7 +262,7 @@
 
 @node Calling previewer, Printing out, Calling typesetter, Typesetting
 @comment  node-name,  next,  previous,  up
-@section{Calling previewer}
+@section Calling previewer
 
   @kbd{[prefix] t p} invokes the TeX previewer.  And if you are using
 xdvi-remote, which can be controled from other terminals, @kbd{[prefix] t
@@ -264,7 +272,7 @@
 
 @node Printing out,  , Calling previewer, Typesetting
 @comment  node-name,  next,  previous,  up
-@section{Printing out}
+@section Printing out
 
   When you type @code{[preifx] t l}, YaTeX asks you the range of
 dvi-printing by default.  You can skip this by invoking it with
@@ -274,7 +282,7 @@
         C-u [prefix] tl
 @end example
 
-@node %# notation, Completion, Typesetting, Top
+@node %#notation, Completion, Typesetting, Top
 @comment  node-name,  next,  previous,  up
 @chapter %# notation
 @cindex %# notation
@@ -289,7 +297,7 @@
 * Editing %# notation::         
 @end menu
 
-@node Changing typesetter, Static region for typesetting, %# notation, %# notation
+@node Changing typesetter, Static region for typesetting, %#notation, %#notation
 @comment  node-name,  next,  previous,  up
 @section To change the `latex' command or to split a source text.
 @cindex typesetter
@@ -304,7 +312,7 @@
 anywhere in the source text.  This is useful for changing
 typesetter.
 
-@node Splitting input files, Static region for typesetting, Changing typesetter, %# notation
+@node Splitting input files, Static region for typesetting, Changing typesetter, %#notation
 @comment  node-name,  next,  previous,  up
 
   And if you split the source text and
@@ -341,7 +349,7 @@
  is in the parent directory(not %#!latex ../main.tex).
 @end itemize
 
-@node Static region for typesetting, Lpr format, Changing typesetter, %# notation
+@node Static region for typesetting, Lpr format, Changing typesetter, %#notation
 @comment  node-name,  next,  previous,  up
 @section Static region
 @cindex static region
@@ -391,7 +399,7 @@
 @code{%#BEGIN} alone at the middle of very long text.  Do not forget to
 erase @code{%#BEGIN} @code{%#END} pair.
 
-@node Lpr format, Editing %# notation, Static region for typesetting, %# notation
+@node Lpr format, Editing %# notation, Static region for typesetting, %#notation
 @comment  node-name,  next,  previous,  up
 @section Lpr format
 @cindex lpr format
@@ -429,7 +437,7 @@
         %#LPR dvi2ps %s | lpr
 @end example
 
-@node Editing %# notation,  , Lpr format, %# notation
+@node Editing %# notation,  , Lpr format, %#notation
 @comment  node-name,  next,  previous,  up
 @section Editing %# notation
 
@@ -453,7 +461,7 @@
 When you type @kbd{b}, all @code{%#BEGIN} and @code{%#END} are
 automatically erased.
 
-@node Completion, Local dictionaries, %# notation, Top
+@node Completion, Local dictionaries, %#notation, Top
 @comment  node-name,  next,  previous,  up
 @chapter Completion
 @cindex completion
@@ -725,7 +733,7 @@
         @dots{} Shift up sectioning lines in region
 @item D
         @dots{} Shift down sectioning lines in region
-@item 0$B!A(B6
+@item 0@dots{}6
         @dots{} Hide sectioning commands whose level is lower than n
 @end table
 
@@ -1029,6 +1037,17 @@
 @cindex cursor jump
 @cindex prefix g
 
+
+@menu
+* Jump to corresponding object::  
+* Invoking image processor::    
+* Jump to main file::           
+* Jumping around the environment::  
+* Jumping to last completion position::  
+@end menu
+
+@node Jump to corresponding object, Invoking image processor, Cursor jump, Cursor jump
+@comment  node-name,  next,  previous,  up
 @section Jump to corresponding object
 
   Typing
@@ -1072,7 +1091,9 @@
 Note that this function doesn't work on @code{begin/end},
 @code{%#BEGIN/%#END} pairs because it is meaningless.
 
-@section{Invoking image processor}
+@node Invoking image processor, Jump to main file, Jump to corresponding object, Cursor jump
+@comment  node-name,  next,  previous,  up
+@section Invoking image processor
 @cindex{Drawing tool invocation}
 
 `image-including line' described above means such lines as
@@ -1102,6 +1123,8 @@
 image viewer or drawing tool.
 @end enumerate
 
+@node Jump to main file, Jumping around the environment, Invoking image processor, Cursor jump
+@comment  node-name,  next,  previous,  up
 @section Jump to main file
 
   Typing
@@ -1118,7 +1141,9 @@
 in a sub text switch the buffer to the main text specified by
 @code{%#!}  notation.
 
-@section Other jumping features
+@node Jumping around the environment, Jumping to last completion position, Jump to main file, Cursor jump
+@comment  node-name,  next,  previous,  up
+@section Jumping around the environment
 
   And these are the functions which work on the current La@TeX{}
 environment:
@@ -1135,6 +1160,16 @@
 @cindex M-C-e
 @cindex M-C-@@
 
+@node Jumping to last completion position,  , Jumping around the environment, Cursor jump
+@comment  node-name,  next,  previous,  up
+@section Jumping to last completion position
+
+YaTeX always memorize the position of completion into register @code{3}.
+So every time you make a trip to any other part of text other than you are
+writing, you can return to the editing paragraph by calling
+register-to-point with argument YaTeX-current-position-register, which is
+achieved by typing @kbd{C-x j 3}(by default).
+
 @node Changing and Deleting, Filling, Cursor jump, Top
 @comment  node-name,  next,  previous,  up
 @chapter Changing and Deleting
@@ -1152,11 +1187,11 @@
 @cindex prefix k
 
 @menu
-* Changing La@TeX{} commands::  
-* Killing La@TeX{} commands::   
+* Changing LaTeX commands::     
+* Killing LaTeX commands::      
 @end menu
 
-@node Changing La@TeX{} commands, Killing La@TeX{} commands, Changing and Deleting, Changing and Deleting
+@node Changing LaTeX commands, Killing LaTeX commands, Changing and Deleting, Changing and Deleting
 @comment  node-name,  next,  previous,  up
 @section Changing La@TeX{} commands
 
@@ -1183,7 +1218,7 @@
 it mind to put the cursor on a brace when you are thinking of changing a
 complicated argument.
 
-@node Killing La@TeX{} commands,  , Changing La@TeX{} commands, Changing and Deleting
+@node Killing LaTeX commands,  , Changing LaTeX commands, Changing and Deleting
 @comment  node-name,  next,  previous,  up
 @section Killing La@TeX{} commands
 @cindex Killing La@TeX{} commands
@@ -1908,11 +1943,11 @@
 job referring the value of its argument.
 
 @menu
-* Defining `option add-in'::    
-* Defining `argument add-in'::  
+* Defining option-add-in::      
+* Defining argument-add-in::    
 @end menu
 
-@node Defining `option add-in', Defining `argument add-in', How the add-in function works, How the add-in function works
+@node Defining option-add-in, Defining argument-add-in, How the add-in function works, How the add-in function works
 @comment  node-name,  next,  previous,  up
 @subsubsection Defining `option add-in'
 
@@ -1939,7 +1974,7 @@
           (concat "{" (read-string "Rule: ") "}"))
 @end lisp
 
-@node Defining `argument add-in',  , Defining `option add-in', How the add-in function works
+@node Defining argument-add-in,  , Defining option-add-in, How the add-in function works
 @comment  node-name,  next,  previous,  up
 @subsubsection Defining `argument add-in'
 
@@ -2050,7 +2085,7 @@
 @center @kbd{M-x YaTeX-generate-simple}
 This generator can make both ``option add-in'' and ``argument add-in''
 (@emph{refer the section add-in functions}
-@ref{How the add-in function works?}), whereas @code{YaTeX-generate}
+@ref{How the add-in function works}), whereas @code{YaTeX-generate}
 cannot make ``argument addin''.
 
   For example, assume you have the LaTeX command as follows.
--- a/docs/yatexj.tex	Tue Dec 16 13:34:57 1997 +0000
+++ b/docs/yatexj.tex	Mon Oct 26 12:05:32 1998 +0000
@@ -6,8 +6,9 @@
 @iftex
 @c @syncodeindex fn cp
 @c いつも忘れるのでここに書いとくか。
-@c ノードいじったら C-l C-u C-e
-@c メニュー増やしたら C-l C-u C-m
+@c ノードいじったら C-l C-u C-n 全部のノード更新 C-l C-u C-e
+@c メニュー増やしたら C-l C-u C-m 全部のメニュー更新 C-l C-u C-a
+@c フォーマットするときは C-l C-e C-b
 @syncodeindex vr cp
 @end iftex
 
@@ -83,6 +84,14 @@
 * Recursive completion::        再帰補完
 * view-sectioning::             セクション区切りのアウトライン表示
 
+カーソルジャンプ
+
+* 対応オブジェクトへのジャンプ::  
+* お絵描きツール起動::          
+* メインファイルへのジャンプ::  
+* 環境を単位としたジャンプ::    
+* 最後の補完位置へのジャンプ::  
+
 変更/削除
 
 * Changing LaTeX command::      La@TeX{} コマンドの変更
@@ -288,7 +297,7 @@
 @node Calling typesetter, Calling previewer, Invocation, Invocation
 @comment  node-name,  next,  previous,  up
 @section タイプセッタ起動
-@cindex タイプセッタ起動
+@cindex タイプセッタ起動[たいふせつたきとう]
 @cindex タイプセットエラー[たいふせつとえらあ]
 @cindex エラー修正[えらあしゆうせい]
 
@@ -317,7 +326,7 @@
 @subsection 領域タイプセット
 
   ポイントとマークの間、あるいはテキスト中に埋め込んだ @code{%#BEGIN} と
-@code{%#END}の間の領域(@ref{%#記法})だけを切り取ってタイプセットすることが
+@code{%#END}の間の領域(@ref{%#notation})だけを切り取ってタイプセットすることが
 できます。この場合の documentstyle は、単一ファイルの La@TeX{} ソースの編
 集時にはそのファイルの documentstyle が、別ファイルから include している場
 合にはメインファイルの documentstyle が自動的に選択されます。指定領域は、
@@ -534,7 +543,7 @@
 @node Editing %# notation,  , lpr format, %#notation
 @comment  node-name,  next,  previous,  up
 @section %#記法自体の編集
-@cindex %#きほうじたいのへんしゅう[%#きほうしたいのへんしゆう]
+@cindex %#記法自体の編集[%#きほうしたいのへんしゆう]
 
 以上のような@code{%#}で始まる各種制御記法を編集するためには
 
@@ -824,12 +833,14 @@
 示します(実際にやって見れば分かります)。
 
 @code{*Sectioning Lines*}バッファは、
+
 @table @kbd
 @item M-x YaTeX-section-overview
         @dots{} セクション区切り一覧バッファを生成
 @end table
-@cindex セクション区切り一覧バッファ[せくしよんくきりいちらんはつは]
-で作成することができます。このバッファをを選択し任意の行でスペースを押すと、
+
+@cindex セクション区切り一覧バッファ[せくしよんくきりいちらんはつふあ]
+で作成することができます。このバッファを選択し任意の行でスペースを押すと、
 該当するセクション区切りのある本文中の場所にジャンプします。さらに、同バッ
 ファで @kbd{u} を押すと、ソーステキストの対応するセクションコマンドが一階
 層上がり(例: subsection が section に変わる)、@kbd{d}を押すと一階層下がり
@@ -1185,6 +1196,17 @@
 @cindex カーソルジャンプ[かあそるしやんふ]
 @cindex prefix g
 
+
+@menu
+* 対応オブジェクトへのジャンプ::  
+* お絵描きツール起動::          
+* メインファイルへのジャンプ::  
+* 環境を単位としたジャンプ::    
+* 最後の補完位置へのジャンプ::  
+@end menu
+
+@node 対応オブジェクトへのジャンプ, お絵描きツール起動, Cursor jump, Cursor jump
+@comment  node-name,  next,  previous,  up
 @section 対応オブジェクトへのジャンプ
 
   文書中のいろいろな場所で
@@ -1212,7 +1234,7 @@
 ない場合はエラーになります。またこれは、領域固定のための @code{%#BEGIN} と 
 @code{%#END} のペアに対しても同様に動作します。なお、@code{label/ref}や
 @code{cite/bibitem}対応するものが別ファイルにある時は、ジャンプ先となるファ
-イルがオープンされていなければなりません。@xref{%#記法}
+イルがオープンされていなければなりません。@xref{%#notation}
 メインの .tex ファイルの @code{\include{chap1}} などにカーソルを合わせ、
 @kbd{[prefix] g} を押すと、@file{chap1.tex} にジャンプします。
 
@@ -1228,8 +1250,10 @@
 この機能は @code{begin/end}, @code{%#BEGIN/%#END} 間のジャンプに対しては
 (意味がないと思われるので)機能しないので注意してください。
 
-@section{お絵描きツール起動}
-@cindex お絵描きツール起動[おえかきつーるきとう]
+@node お絵描きツール起動, メインファイルへのジャンプ, 対応オブジェクトへのジャンプ, Cursor jump
+@comment  node-name,  next,  previous,  up
+@section お絵描きツール起動
+@cindex お絵描きツール起動[おえかきつうるきとう]
 
 上記の「画像ファイルの取り込みマクロ」とは、例えば 
 @code{\epsfile@{file=foo@}} のような挿絵取り込みコマンドのことで、この行に
@@ -1262,6 +1286,8 @@
 ルにかぎらず、任意の形式のファイルを任意のプロセッサで処理するコマンドを簡
 単に呼び出すことができます。
 
+@node メインファイルへのジャンプ, 環境を単位としたジャンプ, お絵描きツール起動, Cursor jump
+@comment  node-name,  next,  previous,  up
 @section メインファイルへのジャンプ
 
 @file{chap1.tex}のようなサブファイルで、
@@ -1278,6 +1304,8 @@
 オープンしていない場合は、カレントディレクトリから探して自動的にオープンし
 ます。
 
+@node 環境を単位としたジャンプ, 最後の補完位置へのジャンプ, メインファイルへのジャンプ, Cursor jump
+@comment  node-name,  next,  previous,  up
 @section 環境を単位としたジャンプ
 
 さらに現在の環境を単位として機能するコマンドに以下のものがあります。
@@ -1300,7 +1328,14 @@
 上記のコマンドは通常の@kbd{[prefix]}キーではなく@kbd{META}キーをプリフィク
 スとして機能するのでご注意下さい。
 
-  
+@node 最後の補完位置へのジャンプ,  , 環境を単位としたジャンプ, Cursor jump
+@comment  node-name,  next,  previous,  up
+@section 最後の補完位置へのジャンプ
+
+野鳥は補完入力した位置を常にレジスタ @code{3}に保存しています。
+入力途中で如何なるファイルの如何なる位置に行ったとしても、
+@kbd{C-x j 3}(@code{jump-to-register})を使って直ちに最後の補完入力位置に戻
+ることができます。
 
 @node Modifying/Deleting, Filling, Cursor jump, Top
 @comment  node-name,  next,  previous,  up
@@ -1486,14 +1521,14 @@
 
 @noindent 
 現在編集中のファイルを @code{\includeonly} のリストに加えたい時には@kbd{a}
-を、現在編集中のファイルだけを @code{\includeonly} にしたい時は@kbd{R}を、
+を、現在編集中のファイルだけを @code{\includeonly} にしたい時は@kbd{r}を、
 @code{\includeonly} の行をコメントアウトして無効化したい時には、@kbd{%}を
 それぞれ押して下さい。
 
 @node What column, Intelligent newline, Includeonly, Top
 @comment  node-name,  next,  previous,  up
 @chapter ここはどこ?
-@cindex ここどこ?[ここはとこ]
+@cindex ここはどこ?[ここはとこ?]
 @cindex prefix &
 @cindex 複雑なtabular[ふくさつなtabular]
 
@@ -1531,7 +1566,6 @@
 @chapter おまかせ改行
 @cindex おまかせ改行[おまかせかいきよう]
 @cindex &入力[&にゆうりよく]
-@cindex prefix &
 
   tabular[*], array, itemize, enumerate, tabbing 環境をbegin型補完で入力し
 た時、または各環境内で
@@ -1576,7 +1610,7 @@
 @node Changing mode of YaTeX, Online help, Intelligent newline, Top
 @comment  node-name,  next,  previous,  up
 @chapter 野鳥の動作モード切り替え
-@cindex モード切り替え[もーときりかえ]
+@cindex モード切り替え[もうときりかえ]
 @cindex prefix w
 
 @table @kbd
--- a/help/YATEXHLP.eng	Tue Dec 16 13:34:57 1997 +0000
+++ b/help/YATEXHLP.eng	Mon Oct 26 12:05:32 1998 +0000
@@ -800,7 +800,8 @@
            spacing is suppressed.
   *{N}{PRE} : equivalent to writing N copies of PRE in the preamble.  PRE
               may contain *{N'}{EXP'} expressions.
-  p{LEN} : makes entry in parbox of width LEN.
+  p{LEN} : makes entry in parbox of width LEN.  This is useful when
+	   each column contains long sentences.
 
 [[Usable commands in array, tabular environment]]
 \multicolumn
@@ -815,7 +816,7 @@
 <refer extracolsep>
 
 
-See below as sample.
+See below as an example.
 
 \LaTeX Expression				Printed image
 \begin{array}{ccr}
@@ -833,6 +834,18 @@
  \end{array} 
 \right)\]
 
+\begin{tabular}{lp{0.7\textwidth}
+ \hline						----------------------------
+ \verb|.|	& Period matches with		.  Period matches with any
+		  any single character.\\	   single character.
+ \verb|*|	& Asterisk matches with		*  Asterisk matches with 0
+		  0 or more  repetition	   	   or  more repetition  of 
+		  of preceding regexp.	   	   preceding regexp.
+\\ \hline					----------------------------
+\end{tabular}
+
+(End of example)
+
 \right(, \left) or \right{, left} or \right[, \left] or \right|, \left|
 can enclose whole of array environment by parentheses, braces, brackets,
 norm respectively.  The number of `\right's and `\left's should be the
--- a/help/YATEXHLP.jp	Tue Dec 16 13:34:57 1997 +0000
+++ b/help/YATEXHLP.jp	Mon Oct 26 12:05:32 1998 +0000
@@ -801,6 +801,7 @@
 		\arraycolsep や \tabcolsep のスペーシングは抑制される
 *{N}{PRE}	PREを N 回書いたのと同様の作用
 p{LEN}		そのカラムをLENの長さのparboxエントリとして作成する
+		表の項目に長い説明分が含まれる場合に用いると良い。
 
 【array, tabular 環境で使えるコマンド】
 \multicolumn
@@ -833,6 +834,17 @@
  \end{array} 
 \right)\]
 
+\begin{tabular}{lp{0.7\textwidth}
+ \hline						----------------------------
+ \verb|.|	& ピリオドは任意の		.  ピリオドは任意の一文字
+		  一文字にマッチします。\\	   にマッチします。
+ \verb|*|	& アスタリスクは直前の		*  アスタリスクは直前の正規
+		  正規表現が0回以上繰り返し	   表現が回以上繰り返し現れ
+		  現れることを意味します。	   ることを意味します。
+\\ \hline					----------------------------
+\end{tabular}
+
+
 array環境を \right( \left) で囲むと配列自体を大きな括弧で括る。同様に、
 \right\{ \left\} で配列を中括弧で、\right[ \left] で配列を大括弧で、
 \right| \left| で配列をノルム記号(絶対値記号)で括ることができる。
@@ -1405,6 +1417,17 @@
 	野鳥を使うTipsをまとめた「あなたもわたしも野鳥の…」というWWWペー
 	ジを作成して下さいました。
 
+小原功任さん(神戸大学)
+	AMS-LaTeXでの数式環境の不足分定義と、\[ .. \] ではfillしない事を
+	指摘して頂きました。
+
+竹内 奏吾さん(電通大)
+	YaTeX-section-overview の不具合を修正するパッチを送って頂きました。
+
+宇佐見 Kousukeさん()
+	数式モードでのセクション型マクロ対応の要望と足すべきマクロ一覧を
+	頂きました。
+
 yatex
 (setq auto-mode-alist (cons '("\\.tex$" . yatex-mode) auto-mode-alist))
 <refer YaTeX>
--- a/yahtml.el	Tue Dec 16 13:34:57 1997 +0000
+++ b/yahtml.el	Mon Oct 26 12:05:32 1998 +0000
@@ -1,7 +1,9 @@
 ;;; -*- Emacs-Lisp -*-
 ;;; (c ) 1994-1997 by HIROSE Yuuji [yuuji@ae.keio.ac.jp]
-;;; Last modified Tue Dec 16 21:10:05 1997 on crx
+;;; Last modified Mon Oct 26 19:57:36 1998 on firestorm
 ;;; $Id$
+(defconst yahtml-revision-number "1.65.5"
+  "Revision number of running yatex.el")
 
 ;;;[Installation]
 ;;; 
@@ -121,8 +123,7 @@
 ;;;			(lisp変数 yahtml-www-browser の設定をお忘れな
 ;;;			く。お推めは "netscape" で、ねすけの場合既にねす
 ;;;			けが起動されていた場合そのねすけに Reload 命令を
-;;;			送るという芸当が出来ます。ただし今のところX版の
-;;;			ねすけちゃんだけ)
+;;;			送るという芸当が出来ます)
 ;;;  * [prefix] a	YaTeX のアクセント記号補完と同じです。
 ;;;			&lt; &gt; 等が入力できます。
 ;;; 
@@ -340,7 +341,7 @@
 
 (defvar yahtml-typeface-table
   (append
-   '(("dfn") ("em") ("cite") ("code") ("kbd") ("samp")
+   '(("dfn") ("em") ("cite") ("code") ("kbd") ("samp") ("strike")
      ("strong") ("var") ("b") ("i") ("tt") ("u") ("address") ("font"))
    yahtml-env-table)
   "Default completion table of typeface designator")
@@ -380,13 +381,14 @@
   (interactive)
   (cond
    ((and YaTeX-emacs-20 (fboundp 'coding-system-equal))
-    (if t (or (coding-system-equal
-	       yahtml-coding-system buffer-file-coding-system)
-	      (set-buffer-file-coding-system yahtml-coding-system))
-      ;;^v which is better?
-      (let ((bmp (buffer-modified-p)))
+    (let ((mp (buffer-modified-p))
+	  (ud (memq buffer-file-coding-system
+		    '(undecided undecided-unix undecided-dos undecided-mac))))
+      (if (coding-system-equal
+	   yahtml-coding-system buffer-file-coding-system)
+	  nil ; if coding-system is the same, do nothing
 	(set-buffer-file-coding-system yahtml-coding-system)
-	(set-buffer-modified-p bmp))))
+	(if ud (set-buffer-modified-p mp)))))
    ((featurep 'mule)
     (set-file-coding-system yahtml-coding-system))
    ((boundp 'NEMACS)
@@ -636,7 +638,7 @@
 
 (defvar yahtml-completing-buffer nil)
 (defun yahtml-collect-labels (&optional file)
-  "Collect current buffers label (<a name=...>).
+  "Collect current buffers label (<?? name=...>).
 If optional argument FILE is specified collect labels in FILE."
   (let (list bound)
     (save-excursion
@@ -645,10 +647,10 @@
 		 (set-buffer (find-file-noselect file))))
       (save-excursion
 	(goto-char (point-min))
-	(while (re-search-forward "<a\\b" nil t)
+	(while (re-search-forward "<\\w+\\b" nil t)
 	  (setq bound (match-end 0))
 	  (search-forward ">" nil t)
-	  (if (and (re-search-backward "\\(name\\|id\\)=" bound t)
+	  (if (and (re-search-backward "\\(name\\|id\\)\\s *=" bound t)
 		   (progn
 		     (goto-char (match-end 0))
 		     (skip-chars-forward " \t\n")
@@ -863,7 +865,9 @@
 
 (defun yahtml:font ()
   "Add-in function for `font'"
-  (yahtml-make-optional-argument "color" (read-string "color=")))
+  (concat 
+   (yahtml-make-optional-argument "color" (read-string "color="))
+   (yahtml-make-optional-argument "size" (read-string "size="))))
 
 ;;; ---------- Simple tag ----------
 (defun yahtml-insert-tag (region-mode &optional tag)
@@ -920,9 +924,9 @@
   "Convenient function to insert <p></p>"
   (interactive "P")
   (if arg (yahtml-insert-tag nil "p")
-    (insert "<p>")
-    (save-excursion
-      (insert "</p>"))))
+    (save-excursion			;insert "/p" first to memorize "p"
+      (yahtml-insert-single "/p"))	;in the last-completion variable
+    (yahtml-insert-single "p")))
 
 ;;; ---------- Jump ----------
 (defun yahtml-on-href-p ()
@@ -1028,7 +1032,7 @@
 
 (defun yahtml-jump-to-name (name)
   "Jump to html's named tag."
-  (setq name (format "name\\s *=\\s *\"?%s\"?" name))
+  (setq name (format "\\(name\\|id\\)\\s *=\\s *\"?%s\"?" name))
   (or (and (re-search-forward name nil t) (goto-char (match-beginning 0)))
       (and (re-search-backward name nil t) (goto-char (match-beginning 0)))
       (message "Named tag `%s' not found" (substring href 1))))
@@ -1110,6 +1114,61 @@
 	   (concat yahtml-image-viewer " " image))
 	  (message "Invoking %s %s...Done" yahtml-image-viewer image)))))
 
+(defun yahtml-get-attrvalue (attr)
+  "Extract current tag's attribute value from buffer."
+  (let (e (case-fold-search t))
+    (save-excursion
+      (or (looking-at "<")
+	  (progn (skip-chars-backward "^<") (backward-char 1)))
+      (setq e (save-excursion (forward-list 1) (point)))
+      (if (and
+	   (re-search-forward (concat "\\b" attr "\\b") e t)
+	   (progn (skip-chars-forward " \t\n=")
+		  (looking-at "\"?\\([^\"> \t\n]+\\)\"?")))
+	  (YaTeX-match-string 1)))))
+
+(defun yahtml-goto-corresponding-source (&optional other)
+  "Goto applet's source."
+  (let ((env (yahtml-current-tag)) s (p (point)))
+    (cond
+     ((string-match "applet" env)
+      (if (setq s (yahtml-get-attrvalue "code"))
+	  (progn
+	    (setq s (YaTeX-match-string 1)
+		  s (concat
+		     (substring s 0 (string-match "\\.[A-Za-z]+$" s))
+		     ".java"))
+	    (if other (YaTeX-switch-to-buffer-other-window s)
+	      (YaTeX-switch-to-buffer s))
+	    s)				;return source file name
+	(message "No applet source specified")
+	(sit-for 1)
+	nil))
+     ((string-match "!--#include" env)
+      (cond
+       ((setq s (yahtml-get-attrvalue "file")) ;<!--#include file="foo"-->
+	(if other (YaTeX-switch-to-buffer-other-window s)
+	  (YaTeX-switch-to-buffer s))
+	s)
+       ((setq s (yahtml-get-attrvalue "virtual"));<!--#include virtual="foo"-->
+	(setq s (yahtml-url-to-path s))
+	(if other (YaTeX-switch-to-buffer-other-window s)
+	  (YaTeX-switch-to-buffer s))
+	s)))
+     ((and (string-match "!--#exec" env)
+	   (setq s (yahtml-get-attrvalue "cmd")))
+      (setq s (substring s 0 (string-match " \t\\?" s))) ;get argv0
+      (let ((b " *yahtmltmp*"))		;peek a little
+	(unwind-protect
+	    (progn
+	      (set-buffer (get-buffer-create b))
+	      (insert-file-contents s nil 0 100)
+	      (if (looking-at "#!")
+		  (if other (YaTeX-switch-to-buffer-other-window s)
+		    (YaTeX-switch-to-buffer s))))
+	  (kill-buffer (get-buffer b)))
+	(get-file-buffer s))))))
+
 (defun yahtml-goto-corresponding-* (&optional other)
   "Go to corresponding object."
   (interactive)
@@ -1117,6 +1176,7 @@
    ((yahtml-goto-corresponding-href other))
    ((yahtml-goto-corresponding-img))
    ((yahtml-goto-corresponding-begend))
+   ((yahtml-goto-corresponding-source other))
    (t (message "I don't know where to go."))
    ))
 
@@ -1132,7 +1192,7 @@
 
 ;;; ---------- killing ----------
 (defun yahtml-kill-begend (&optional whole)
-  (let ((tag (yahtml-on-begend-p)) p q r)
+  (let ((tag (yahtml-on-begend-p)) p q r bbolp)
     (if tag
 	(save-excursion
 	  (or (looking-at "<")
@@ -1147,23 +1207,26 @@
 	    (setq q (point)))		;now q has end-line's (point)
 	  (if (not whole)
 	      (kill-region
-	       (progn (skip-chars-backward " \t") (if (bolp) (point) q))
+	       (progn (skip-chars-backward " \t")
+		      (if (setq bbolp (bolp)) (point) q))
 	       (progn (forward-list 1)
 		      (setq r (point))
 		      (skip-chars-forward " \t")
-		      (if (and (eolp) (not (eobp))) (1+ (point)) r))))
+		      (if (and bbolp (eolp) (not (eobp))) (1+ (point)) r))))
 	  (goto-char p)
 	  (skip-chars-backward " \t")
 	  (if (not whole)
 	      (progn
 		(kill-append
 		 (buffer-substring
-		  (setq p (if (bolp) (point) p))
+		  (setq p (if (setq bbolp (bolp)) (point) p))
 		  (setq q (progn
 			    (forward-list 1)
 			    (setq r (point))
 			    (skip-chars-forward " \t")
-			    (if (and (eolp) (not (eobp))) (1+ (point)) r))))
+			    (if (and bbolp (eolp) (not (eobp)))
+				(1+ (point))
+			      r))))
 		 t)
 		(delete-region p q))
 	    (kill-region
@@ -1271,6 +1334,7 @@
 	  (setq tag (if yahtml-prefer-upcases (upcase tag) (downcase tag)))
 	  (insert (format "%s%s" tag (yahtml-addin tag)))
 	  (goto-char q)
+	  (set-marker q nil)
 	  (delete-region (point) (progn (skip-chars-forward "^>") (point)))
 	  (insert tag))))
       t))))
@@ -1305,6 +1369,8 @@
 		   'yahtml-tmp-form-table)))
 	  (delete-region beg end)
 	  (goto-char beg)
+	  (set-marker beg nil)
+	  (set-marker end nil)	
 	  (insert new)
 	  t)
       (goto-char p)
@@ -1388,8 +1454,10 @@
 
 (defun yahtml-fill-paragraph (arg)
   (interactive "P")
-  (let*((case-fold-search t) (p (point))
+  (let*((case-fold-search t) (p (point)) fill-prefix
 	(e (or (yahtml-inner-environment-but "^\\(a\\|p\\)\\b" t) "html"))
+	indent
+	(startp (get 'YaTeX-inner-environment 'point))
 	(prep (string-match "^pre$" e))
 	(ps1 (if prep (default-value 'paragraph-start)
 	       paragraph-start))
@@ -1401,6 +1469,12 @@
 	  (progn
 	    (if prep
 		(fset 'move-to-column 'yahtml-move-to-column))
+	    (save-excursion
+	      (beginning-of-line)
+	      (indent-to-column (yahtml-this-indent))
+	      (setq fill-prefix
+		    (buffer-substring (point) (point-beginning-of-line)))
+	      (delete-region (point) (point-beginning-of-line)))
 	    (fill-region-as-paragraph
 	     (progn (re-search-backward paragraph-start nil t)
 		    (or (save-excursion
@@ -1414,7 +1488,9 @@
 			(point)))
 	     (progn (goto-char p)
 		    (re-search-forward ps2 nil t)
-		    (match-beginning 0))))
+		    (match-beginning 0)
+		    
+		    )))
 	(fset 'move-to-column yahtml-saved-move-to-column)))))
 
 ;(defun yahtml-indent-new-commnet-line ()
@@ -1450,9 +1526,8 @@
 	  (and (bolp) (skip-chars-forward " \t")))
       (yahtml-indent-line-real))))
 
-(defun yahtml-indent-line-real ()
-  (interactive)
-  (let ((envs "[uod]l\\|table\\|[ht][rhd0-6]\\|select\\|blockquote\\|center\\|menu\\|dir")
+(defun yahtml-this-indent ()
+  (let ((envs "[uod]l\\|table\\|[ht][rhd0-6]\\|select\\|blockquote\\|center\\|menu\\|dir\\|font")
 	(itemizing-envs "^\\([uod]l\\|menu\\|dir\\)$")
 	(itms "<\\(dt\\|dd\\|li\\|t[rdh]\\|option\\)\\b")
 	inenv p col peol (case-fold-search t))
@@ -1471,17 +1546,16 @@
 	  (skip-chars-forward " \t")
 	  (cond				;lookup current line's tag
 	   ((looking-at (concat "</\\(" envs "\\)>"))
-	    (YaTeX-reindent col))
+	    col)
 	   ((looking-at itms)
-	    (YaTeX-reindent (+ col yahtml-environment-indent)))
+	    (+ col yahtml-environment-indent))
 	   ((and yahtml-hate-too-deep-indentation
 		 (looking-at (concat "<\\(" envs "\\)")))
-	    	    (YaTeX-reindent (+ col (* 2 yahtml-environment-indent))))
+	    (+ col (* 2 yahtml-environment-indent)))
 	   ((and (< p (point))
 		 (string-match itemizing-envs inenv)
 		 (save-excursion
 		   (and
-		    ;;(re-search-backward itms p t)
 		    (setq op (point))
 		    (goto-char p)
 		    (re-search-forward itms op t)
@@ -1492,22 +1566,28 @@
 		      (setq col (if (looking-at "$")
 				    (+ col yahtml-environment-indent)
 				  (current-column)))))))
-	    (YaTeX-reindent col))
+	    col)
 	   (t
-	    (YaTeX-reindent (+ col yahtml-environment-indent)))))))
-      (and (bolp) (skip-chars-forward " \t"))
-      (if (and (setq inenv (yahtml-on-begend-p))
-	       (string-match
-		(concat "^\\<\\(" yahtml-struct-name-regexp "\\)") inenv))
-	  (save-excursion
-	    (setq peol (point-end-of-line))
-	    (or (= (char-after (point)) ?<)
-		(progn (skip-chars-backward "^<") (forward-char -1)))
-	    (setq col (current-column))
-	    (if (and (yahtml-goto-corresponding-begend t)
-		     (> (point) peol))	;if on the different line
-		(YaTeX-reindent col)))))
-    (and (bolp) (skip-chars-forward " \t"))))
+	    (+ col yahtml-environment-indent)))))
+       (t col)))))
+
+(defun yahtml-indent-line-real ()
+  "Indent current line."
+  (interactive)
+  (YaTeX-reindent (yahtml-this-indent))
+  (if (bolp) (skip-chars-forward " \t"))
+  (let (peol col)
+    (if (and (setq inenv (yahtml-on-begend-p))
+	     (string-match
+	      (concat "^\\<\\(" yahtml-struct-name-regexp "\\)") inenv))
+	(save-excursion
+	  (setq peol (point-end-of-line))
+	  (or (= (char-after (point)) ?<)
+	      (progn (skip-chars-backward "^<") (forward-char -1)))
+	  (setq col (current-column))
+	  (if (and (yahtml-goto-corresponding-begend t)
+		   (> (point) peol))	;if on the different line
+	      (YaTeX-reindent col))))))
 
 ;(defun yahtml-fill-item ()
 ;  "Fill item HTML version"
@@ -1768,7 +1848,7 @@
     ;; include&exec
     ("<!--#\\(include\\|exec\\)" "-->" include)
     ;; string
-    (hilit-string-find 39 string)
+    (hilit-string-find ?\\ string)
     (yahtml-hilit-region-tag "\\(em\\|strong\\)" bold)
     ("</?[uod]l>" 0 decl)
     ("<\\(di\\|dt\\|li\\|dd\\)>" 0 label)
@@ -1799,6 +1879,7 @@
 	       (cons (cons 'yahtml-mode yahtml-hilit-patterns-alist)
 		     hilit-patterns-alist))))
 
+(run-hooks 'yahtml-load-hook)
 (provide 'yahtml)
 
 ; Local variables:
--- a/yatex.el	Tue Dec 16 13:34:57 1997 +0000
+++ b/yatex.el	Mon Oct 26 12:05:32 1998 +0000
@@ -1,8 +1,8 @@
 ;;; -*- Emacs-Lisp -*-
 ;;; Yet Another tex-mode for emacs.
-;;; yatex.el rev. 1.65
-;;; (c )1991-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
-;;; Last modified Tue Dec 16 22:15:26 1997 on crx
+;;; yatex.el rev. 1.66
+;;; (c )1991-1998 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
+;;; Last modified Mon Oct 26 21:05:14 1998 on firestorm
 ;;; $Id$
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -16,22 +16,16 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with this program; see the file COPYING.  If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; along with this program; see the file COPYING.  If not, write to the
+;; Software Foundation Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
 
 (require 'comment)
 (require 'yatexlib)
-(defconst YaTeX-revision-number "1.65"
+(defconst YaTeX-revision-number "1.66"
   "Revision number of running yatex.el"
 )
 ;---------- Local variables ----------
-;;;
-;; Initialize local variable for yatex-mode.
-;; Preserving user preferred definitions.
-;; ** Check all of these defvar-ed values **
-;; ** and setq other values more suitable **
-;; ** for your site, if needed.           **
-;;;
 (defvar YaTeX-prefix "\C-c"
   "*Prefix key to call YaTeX functions.
 You can select favorite prefix key by setq in your ~/.emacs."
@@ -139,7 +133,7 @@
   "*Regular expression of item command."
 )
 (defvar YaTeX-sectioning-regexp
-  "\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"
+  "part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\(\\*?\\|\\b\\)"
   "*LaTeX sectioning commands regexp."
 )
 (defvar YaTeX-paragraph-start
@@ -155,6 +149,7 @@
   (concat "^[ \t]*%\\|^[ \t]*$\\|^\C-l\\|\\\\\\\\$\\|^[ \t]*\\\\\\("
 	  YaTeX-sectioning-regexp		;sectioning commands
 	  "\\|begin{\\|end{"			;special declaration
+	  "\\|\\[\\|\\]"
 	  "\\|newpage\\b\\|vspace\\b"
 	  "\\)")
   "*Paragraph delimiter regexp of common LaTeX source.  Use this value
@@ -182,6 +177,7 @@
   (concat
    "array\\*?\\|eqnarray\\*?\\|tabbing\\|tabular\\*?\\|"	;LaTeX
    "align\\*?\\|split\\*?\\|aligned\\*?\\|alignat\\*?\\|"	;AMS-LaTeX
+   "[bpvV]?matrix\\|smallmatrix\\|cases\\|"			;AMS-LaTeX
    "xalignat\\*?\\|xxalignat\\*?")				;AMS-LaTeX
   "*Regexp of environments where `&' becomes field delimiter.")
 (defvar YaTeX-uncomment-once t
@@ -241,8 +237,13 @@
     ("newcommand" 2) ("renewcommand" 2)
     ("setcounter" 2) ("newenvironment" 3) ("newtheorem" 2)
     ("cline") ("framebox") ("savebox" 2) ("sbox" 2) ("newsavebox") ("usebox")
-    ("date") ("put") ("ref")
-    ("frac" 2) ("multicolumn" 3) ("shortstack")
+    ("date") ("put") ("ref") ("pageref")
+    ("multicolumn" 3) ("shortstack")
+    ;; for mathmode accent
+    ("tilde") ("hat") ("check") ("bar") ("dot") ("ddot") ("vec")
+    ("widetilde") ("widehat") ("overline") ("overrightarrow")
+    ;; section types in mathmode
+    ("frac" 2) ("sqrt") ("mathrm") ("mathbf") ("mathit")
     )
   "Default completion table for section-type completion."
 )
@@ -278,13 +279,14 @@
 
 (defvar singlecmd-table
   (append
-   '(("maketitle") ("sloppy") ("protect")
+   '(("maketitle") ("makeindex") ("sloppy") ("protect")
      ("LaTeX") ("TeX") ("item") ("item[]") ("appendix") ("hline")
      ;;("rightarrow") ("Rightarrow") ("leftarrow") ("Leftarrow")
-     ("pagebreak") ("newpage") ("clearpage") ("cleardoublepage")
+     ("pagebreak") ("nopagebreak")
+     ("newpage") ("clearpage") ("cleardoublepage")
      ("footnotemark") ("verb") ("verb*")
      ("linebreak") ("pagebreak") ("noindent") ("indent")
-     ("left") ("right")
+     ("left") ("right") ("dots")
      )
    (if YaTeX-greek-by-maketitle-completion
        '(("alpha") ("beta") ("gamma") ("delta") ("epsilon")
@@ -460,13 +462,14 @@
   (setq YaTeX-latex-message-code latex-message-kanji-code)))
 
 (defvar YaTeX-mode-syntax-table nil
+
   "*Syntax table for yatex-mode")
 
 (if YaTeX-mode-syntax-table nil
   (setq YaTeX-mode-syntax-table (make-syntax-table (standard-syntax-table)))
-  (modify-syntax-entry ?\< "(>" YaTeX-mode-syntax-table)
-  (modify-syntax-entry ?\> ")<" YaTeX-mode-syntax-table)
   (modify-syntax-entry ?\n " " YaTeX-mode-syntax-table)
+  (modify-syntax-entry ?\{ "(}" YaTeX-mode-syntax-table)
+  (modify-syntax-entry ?\} "){" YaTeX-mode-syntax-table)
 )
 
 ;---------- Provide YaTeX-mode ----------
@@ -547,9 +550,15 @@
   (cond ((boundp 'MULE)
 	 (set-file-coding-system  YaTeX-coding-system))
 	((and YaTeX-emacs-20 (fboundp 'coding-system-equal))
-	 (or (coding-system-equal
-	      YaTeX-coding-system buffer-file-coding-system)
-	     (set-buffer-file-coding-system YaTeX-coding-system)))
+	 (let ((mp (buffer-modified-p))
+	       (ud (memq
+		    buffer-file-coding-system
+		    '(undecided undecided-unix undecided-dos undecided-mac))))
+	   (if (coding-system-equal
+		YaTeX-coding-system buffer-file-coding-system)
+	       nil ; if coding-system is the same, do nothing
+	     (set-buffer-file-coding-system YaTeX-coding-system)
+	     (if ud (set-buffer-modified-p mp)))))
 	((featurep 'mule)
 	 (set-file-coding-system YaTeX-coding-system))
   	((boundp 'NEMACS)
@@ -744,6 +753,7 @@
 Optional 4th arg CMD is LaTeX command name, for non-interactive use."
   (interactive "P")
   (setq YaTeX-current-completion-type 'section)
+  (if (equal arg '(4)) (setq beg (region-beginning) end (region-end)))
   (unwind-protect
       (let*
 	  ((source-window (selected-window))
@@ -755,12 +765,12 @@
 		   (if (> (minibuffer-depth) 0)
 		       (format "%s???{} (default %s)%s: " YaTeX-ec section-name
 			       (format "[level:%d]" (minibuffer-depth)))
-		     (format "(C-v for view-section) %s???{} (default %s): "
-			     YaTeX-ec section-name)))
+		     (format "(C-v for view-section) %s???{%s} (default %s): "
+			     YaTeX-ec (if beg "region" "") section-name)))
 		 nil)))
 	   (section (if (string= section "") section-name section))
 	   (numarg	;; The number of section-type command's argument
-	    (or arg
+	    (or (and (numberp arg) arg)
 		(nth 1 (YaTeX-lookup-table section 'section))
 		1))
 	   (arg-reader (intern-soft (concat "YaTeX::" section)))
@@ -776,7 +786,8 @@
 	      (set-marker e (point))
 	      (goto-char beg)
 	      (insert YaTeX-ec section-name "{")
-	      (goto-char (marker-position e)))
+	      (goto-char e)
+	      (set-marker e nil))
 	  (use-global-map YaTeX-recursive-map)
 	  (if (= numarg 0) (YaTeX-make-singlecmd section-name)
 	    (progn (insert YaTeX-ec section-name)
@@ -830,6 +841,7 @@
 	       nil nil))))
     (if (string= fontsize "")
 	(setq fontsize fontsize-name))
+    (setq YaTeX-current-completion-type 'large)
     (setq fontsize-name fontsize)
     (YaTeX-update-table
      (list fontsize-name)
@@ -840,10 +852,11 @@
 	  (insert "{\\" fontsize-name " ")
 	  (exchange-point-and-mark)
 	  (insert "}"))
-      (insert "{\\" fontsize-name " }")
+      (insert "{\\" fontsize-name " ")
       (if YaTeX-current-position-register
 	  (point-to-register YaTeX-current-position-register))
-      (forward-char -1)))
+      (save-excursion
+	(insert (YaTeX-addin fontsize-name) "}"))))
 )
 
 (defun YaTeX-make-fontsize-region ()
@@ -1171,7 +1184,7 @@
   (interactive "P")
   (message
    (concat "J)latex R)egion B)ibtex mk(I)ndex "
-	   (if (not YaTeX-dos) "K)ill-latex ")
+	   (if (fboundp 'start-process) "K)ill-latex ")
 	   "P)review "
 	   (and (boundp 'window-system) window-system "S)earch ")
 	   "V)iewerr L)pr"))
@@ -1227,12 +1240,14 @@
 	(while (re-search-forward "^%#\\(BEGIN\\)\\|\\(END\\)$" nil t)
 	  (beginning-of-line)
 	  (delete-region (point) (progn (forward-line 1) (point))))
-	(goto-char (marker-position b))
+	(goto-char b)
 	(open-line 1)
 	(delete-region (point) (progn (beginning-of-line)(point)));for 19 :-<
 	(insert "%#BEGIN")
-	(goto-char (marker-position e))
-	(insert "%#END\n"))
+	(goto-char e)
+	(insert "%#END\n")
+	(set-marker b nil)
+	(set-marker e nil))
        )))
 )
 
@@ -1251,28 +1266,30 @@
   If optional second argument OTHERWIN is non-nil, move to other window."
 
   (let ((scmd "") label direc string blist (p (point)) (cb (current-buffer))
-	(refcommands "label\\|ref\\|cite\\|bibitem")
+	(refcommands "label\\|\\(page\\)?ref\\|cite\\|bibitem")
 	(func (function (lambda (string sfunc)
 			  (or
 			   (funcall sfunc string nil t)
-			   (funcall (if (eq sfunc 'search-forward)
-					'search-backward 'search-forward)
+			   (funcall (if (eq sfunc 're-search-forward)
+					're-search-backward 're-search-forward)
 				    string nil t))))))
     (cond
      ((YaTeX-on-section-command-p refcommands)
       (setq scmd (cdr (assoc (YaTeX-match-string 1)
-			     '(("label" . "ref") ("ref" . "label")
+			     '(("label" . "\\(page\\)?ref") ("ref" . "label")
+			       ("pageref" . "label")
 			       ("cite" . "bibitem") ("bibitem" . "cite")))))
       (goto-char (match-end 0))
       (let ((label (buffer-substring 
 		    (1- (point)) (progn (backward-list 1) (1+ (point))))))
-	(setq string (concat "\\" scmd "{" label "}"))
+	;(setq string (concat "\\" scmd "{" label "}"))
+	(setq string (concat "\\\\" scmd "{" (regexp-quote label) "}"))
 	(setq direc (if (string-match "ref\\|cite" scmd)
-			'search-forward 'search-backward))
+			're-search-forward 're-search-backward))
 	(if YaTeX-current-position-register
 	    (point-to-register YaTeX-current-position-register))
-	(if reverse (setq direc (if (eq direc 'search-forward)
-				    'search-backward 'search-forward)))
+	(if reverse (setq direc (if (eq direc 're-search-forward)
+				    're-search-backward 're-search-forward)))
 	(if (funcall func string direc)	;label/ref found!
 	    (progn
 	      (if otherwin
@@ -1322,8 +1339,9 @@
 	      (setq blist (cdr blist)))))
 	)
       (if YaTeX-emacs-19
-	  (setq search-ring (cons string search-ring))
-	(setq search-last-string string)))
+	  (setq regexp-search-ring
+		(cons string (delete string regexp-search-ring)))
+	(setq search-last-regexp string)))
      (t nil)))
 )
 
@@ -1459,6 +1477,7 @@
     ("\\\\postscriptbox{[^}]*}{[^}]*}{\\(\\([^,} ]*/\\)?[^}. ]+\\)\\(\\.e?ps\\)?}" 1)
     ("\\\\\\(epsfbox\\|includegraphics\\|epsfig\\)\\*?{\\(\\([^,} ]*/\\)?[^}. ]+\\)\\(\\.e?ps\\)?}" 2) ;\epsfbox{hoge.ps} or \includegraphics{hoge.eps}
     ("\\\\\\(psbox\\)\\(\\[[^]]+\\]\\)?{\\(\\([^,} ]*/\\)?[^} ]+\\)\\(\\.e?ps\\)}" 3) ;\psbox[options...]{hoge.eps} (97/1/11)
+    ("\\\\input{\\([^} ]+\\)\\(\\.tps\\)}" 1) ;tgif2tex (1998/9/16)
     )
   "See the documentation of YaTeX-processed-file-regexp-alist."
 )
@@ -1706,7 +1725,7 @@
       (if (> p (point)) (setq beg (1+ beg)) (forward-char 1))
       (funcall func YaTeX-comment-prefix beg (point) YaTeX-uncomment-once)))
   (message "%sommented out current environment."
-	   (if (eq func 'comment-region) "C" "Un-c"))
+	   (if (eq func 'comment-out-region) "C" "Un-c"))
 )
 
 (defun YaTeX-beginning-of-environment (&optional limit-search-bound end)
@@ -1781,12 +1800,12 @@
   (interactive)
   (save-excursion
     (if (YaTeX-on-begin-end-p)
-	(let ((p (make-marker)))
-	  (set-marker p (point))
+	(let ((p (point-marker)))
 	  (YaTeX-goto-corresponding-environment)
 	  (YaTeX-remove-prefix YaTeX-comment-prefix YaTeX-uncomment-once)
-	  (goto-char (marker-position p))
-	  (YaTeX-remove-prefix YaTeX-comment-prefix YaTeX-uncomment-once))
+	  (goto-char p)
+	  (YaTeX-remove-prefix YaTeX-comment-prefix YaTeX-uncomment-once)
+	  (set-marker p nil))
       (if (YaTeX-on-comment-p)
 	  (let*((fill-prefix "")
 		;;append `^%' to head of paragraph delimiter.
@@ -1835,11 +1854,11 @@
 	    (kill-region
 	     (progn
 	       (goto-char b2)
-	       (skip-chars-backward " \t")
+	       (skip-chars-backward " \t%")
 	       (if (bolp) (point) b2))
 	     e2))
 	(goto-char b1)
-	(skip-chars-backward " \t")
+	(skip-chars-backward " \t%")
 	(if (not kill-contents)
 	    (progn
 	      (kill-append
@@ -1876,12 +1895,14 @@
       (skip-chars-forward "^{")
       (forward-list 1)
       (set-marker end (point))
-      (if kill-all (delete-region beg end)
+      (if kill-all (kill-region beg end)
 	(goto-char beg)
-	(delete-region
+	(kill-region
 	 (point) (progn (skip-chars-forward "^{" end) (1+ (point))))
 	(goto-char end)
-	(backward-delete-char 1))))
+	(set-marker end nil)
+	(kill-append (buffer-substring (point) (1- (point))) nil)
+	(delete-backward-char 1))))
 )
 
 (defun YaTeX-kill-paren (kill-contents)
@@ -1985,10 +2006,10 @@
 	 ((string= newenv env)	(message "No need to change."))
 	 (t
 	  (search-forward (concat "{" env) (point-end-of-line) t)
-	  (replace-match (concat "{" newenv))
+	  (replace-match (concat "{" newenv) t)
 	  (exchange-point-and-mark)
 	  (search-forward (concat "{" env) (point-end-of-line) t)
-	  (replace-match (concat "{" newenv))))
+	  (replace-match (concat "{" newenv) t)))
 	t)))
 )
 
@@ -2323,6 +2344,7 @@
   (cond
    ((not (eq major-mode 'yatex-mode)) (fill-paragraph arg))
    ((YaTeX-quick-in-environment-p YaTeX-fill-inhibit-environments) nil)
+   ((YaTeX-in-math-mode-p) nil)
    (t
     (save-excursion
       (let ((verbrex (concat YaTeX-ec-regexp
@@ -2362,7 +2384,8 @@
 	  ;;(fill-paragraph arg)
 	  (fill-region-as-paragraph (point-min) (point-max) arg)
 	  (while spacelist
-	    (goto-char (marker-position (car poslist)))
+	    (goto-char (car poslist))
+	    (set-marker (car poslist) nil)
 	    (delete-char 1)
 	    (insert (car spacelist))
 	    (setq spacelist (cdr spacelist) poslist (cdr poslist)))
@@ -2480,7 +2503,7 @@
 	     (+ (YaTeX-current-indentation)
 		(or additional 0)
 		YaTeX-environment-indent)))))
-	depth iteminfo (p (point)) pp (peol (point-end-of-line))
+	sect depth iteminfo (p (point)) pp (peol (point-end-of-line))
 	;;inenv below is sometimes defined in YaTeX-indent-new-comment-line
 	(inenv (or (and (boundp 'inenv) inenv) (YaTeX-inner-environment t))))
     ;;(if NTT-jTeX		;;Do you need this section?
@@ -2498,11 +2521,9 @@
     (or inenv (setq inenv "document"))	;is the default environment
     (cond
      ((and (YaTeX-on-begin-end-p) (match-beginning 2)) ;if \end
-      (save-excursion
-	(beginning-of-line)
-	(YaTeX-reindent (YaTeX-current-indentation))))
+      (YaTeX-reindent (YaTeX-current-indentation)))
      ((string-match YaTeX-equation-env-regexp inenv)
-      (YaTeX-indent-line-equation))	;autoload-ed from yatex.env
+      (YaTeX-indent-line-equation))	;autoload-ed from yatexenv
      (;(YaTeX-in-environment-p '("itemize" "enumerate" "description" "list"))
       (string-match YaTeX-itemizing-env-regexp inenv)
       ;;(YaTeX-on-item-p) ??
@@ -2510,15 +2531,16 @@
       (if (save-excursion
 	    (beginning-of-line)
 	    (re-search-forward YaTeX-item-regexp peol t))
-	  (save-excursion
-	    (goto-char (1+ (match-beginning 0)))
-	    (setq depth
-		  (* YaTeX-environment-indent
-		     (cond
-		      ((looking-at "subsubsub")	3)
-		      ((looking-at "subsub")	2)
-		      ((looking-at "sub")	1)
-		      (t			0))))
+	  (progn
+	    (save-excursion
+	      (goto-char (1+ (match-beginning 0)))
+	      (setq depth
+		    (* YaTeX-environment-indent
+		       (cond
+			((looking-at "subsubsub")	3)
+			((looking-at "subsub")	2)
+			((looking-at "sub")	1)
+			(t			0)))))
 	    (funcall indent-relative depth))
 	(YaTeX-reindent (or (car (cdr (YaTeX-get-item-info nil inenv)))
 			    (+ (save-excursion
@@ -2532,10 +2554,13 @@
       (funcall indent-relative))
      ((YaTeX-on-section-command-p YaTeX-sectioning-regexp)
       (require 'yatexsec)		;to know YaTeX-sectioning-level
+      (setq sect (YaTeX-match-string 1))
+      (if (string-match "\\*$" sect)
+	  (setq sect (substring sect 0 -1)))
       (YaTeX-reindent
        (* (max
 	   (1-				;I want chapter to have indentation 0
-	    (or (cdr (assoc (YaTeX-match-string 1) YaTeX-sectioning-level))
+	    (or (cdr (assoc sect YaTeX-sectioning-level))
 		0))
 	   0)
 	  YaTeX-environment-indent)))
--- a/yatex.new	Tue Dec 16 13:34:57 1997 +0000
+++ b/yatex.new	Mon Oct 26 12:05:32 1998 +0000
@@ -1,6 +1,19 @@
 	What's new in YaTeX
 	野鳥/yahtml - 各バージョンの変更点について
 
+1.66	\section*{} などの*つきセクションコマンドでインデントがずれるの
+	を修正。
+	[prefix] g でのlabel/ref検索をre-searchにしpagerefにも飛べるよう
+	にした。またsearch-ringではなくregexp-search-ringを更新するので
+	継続検索は M-C-s or M-C-r で行うようになった。
+	XEmacsでのラベル補完のバグフィクス。
+	tgif2tex(*.tps) への [prefix] g を追加。
+	Emacs20のsuppress-keymapの仕様が変わったので対処。
+	Emacs20+yahtml でアイテム化タグでのfillがうまく行かなかったのを修正。
+	yahtmlで <applet code=foo.class> という位置で [prefix] g したときに
+	foo.java へ、#include ではそのファイル、#execではCGIスクリプトファ
+	イルへジャンプするようにした。
+
 1.65	yahtmlのお任せ改行のバグフィクス。
 	a, body, img タグのオプション引数入力アドインの強化。
 	section型マクロの第一引数が改行によって分断されていても正しく
--- a/yatex19.el	Tue Dec 16 13:34:57 1997 +0000
+++ b/yatex19.el	Mon Oct 26 12:05:32 1998 +0000
@@ -1,7 +1,7 @@
 ;;; -*- Emacs-Lisp -*-
 ;;; YaTeX facilities for Emacs 19
 ;;; (c )1994-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
-;;; Last modified Sun Dec 14 21:51:14 1997 on firestorm
+;;; Last modified Thu Jan 29 10:55:12 1998 on crx
 ;;; $Id$
 
 ;;; とりあえず hilit19 を使っている時に色が付くようにして
@@ -314,8 +314,8 @@
     ;; formulas
     ("[^\\]\\\\("  "\\\\)" formula)                   ; \( \)
     ("[^\\]\\\\\\[" "\\\\\\]" formula)                ; \[ \]
-    ("\\\\begin{\\(eqn\\|equation\\|x?x?align\\|split\\|multiline\\|gather\\)"
-     "\\\\end{\\(eqn\\|equation\\|x?x?align\\|split\\|multiline\\|gather\\).*}"
+    ("\\\\begin{\\(eqn\\|equation\\|x?x?align\\|split\\|multline\\|gather\\)"
+     "\\\\end{\\(eqn\\|equation\\|x?x?align\\|split\\|multline\\|gather\\).*}"
      formula)
     ("[^\\$]\\($\\($[^$]*\\$\\|[^$]*\\)\\$\\)" 1 formula); '$...$' or '$$...$$'
 
--- a/yatexadd.el	Tue Dec 16 13:34:57 1997 +0000
+++ b/yatexadd.el	Mon Oct 26 12:05:32 1998 +0000
@@ -1,8 +1,8 @@
 ;;; -*- Emacs-Lisp -*-
 ;;; YaTeX add-in functions.
-;;; yatexadd.el rev.13
+;;; yatexadd.el rev.14
 ;;; (c )1991-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
-;;; Last modified Wed Jun 25 21:21:13 1997 on domani
+;;; Last modified Mon Sep 28 13:03:37 1998 on firestorm
 ;;; $Id$
 
 ;;;
@@ -67,7 +67,9 @@
     (while (not (string-match
 		 (setq loc (read-key-sequence
 			    (format "%s position (`%s') [%s]: "
-				    guide oneof pos)));name is in YaTeX-addin
+				    guide oneof pos));name is in YaTeX-addin
+		       loc (if (fboundp 'events-to-keys)
+			       (events-to-keys loc) loc))
 		 "\r\^g\n"))
       (cond
        ((string-match loc oneof)
@@ -91,7 +93,8 @@
 
 (defun YaTeX:table ()
   "YaTeX add-in function for table environment."
-  (setq env-name "tabular")
+  (setq env-name "tabular"
+	section-name "caption")
   (YaTeX:read-position "htbp")
 )
 
@@ -345,7 +348,8 @@
 (defun YaTeX::label-setup-key-map ()
   (if YaTeX-label-select-map nil
     (message "Setting up label selection mode map...")
-    (setq YaTeX-label-select-map (copy-keymap global-map))
+    ;(setq YaTeX-label-select-map (copy-keymap global-map))
+    (setq YaTeX-label-select-map (make-keymap))
     (suppress-keymap YaTeX-label-select-map)
     (substitute-all-key-definition
      'previous-line 'YaTeX::label-previous YaTeX-label-select-map)
@@ -379,7 +383,8 @@
   (interactive) (forward-line -1) (message YaTeX-label-guide-msg))
 (defun YaTeX::label-search-tag ()
   (interactive)
-  (let ((case-fold-search t) (tag (regexp-quote (this-command-keys))))
+  (let ((case-fold-search t)
+	(tag (regexp-quote (char-to-string last-command-char))))
     (cond
      ((save-excursion
 	(forward-char 1)
@@ -447,6 +452,7 @@
 	  (use-local-map YaTeX-label-select-map)
 	  (message YaTeX-label-guide-msg)
 	  (goto-line (1+ initl)) ;goto recently defined label line
+	  (switch-to-buffer (current-buffer))
 	  (unwind-protect
 	      (progn
 		(recursive-edit)
@@ -834,5 +840,64 @@
       (if (string= "" sname) (setq sname YaTeX-default-documentclass))
       (setq YaTeX-default-documentclass sname)))))
 
+(defun YaTeX:caption ()
+  (setq section-name "label")
+  nil)
+
+;;; -------------------- math-mode stuff --------------------
+(defun YaTeX::tilde (&optional pos)
+  "For accent macros in mathmode"
+  (cond
+   ((equal pos 1)
+    (message "Put accent on variable: ")
+    (let ((v (char-to-string (read-char))) (case-fold-search nil))
+      (message "")
+      (cond
+       ((string-match "i\\|j" v)
+	(concat "\\" v "math"))
+       ((string-match "[\r\n\t ]" v)
+	"")
+       (t v))))
+   (nil "")))
+
+(fset 'YaTeX::hat	'YaTeX::tilde)
+(fset 'YaTeX::check	'YaTeX::tilde)
+(fset 'YaTeX::bar	'YaTeX::tilde)
+(fset 'YaTeX::dot	'YaTeX::tilde)
+(fset 'YaTeX::ddot	'YaTeX::tilde)
+(fset 'YaTeX::vec	'YaTeX::tilde)
+
+(defun YaTeX::widetilde (&optional pos)
+  "For multichar accent macros in mathmode"
+  (cond
+   ((equal pos 1)
+    (let ((m "Put over chars[%s ]: ") v v2)
+      (message m " ")
+      (setq v (char-to-string (read-char)))
+      (message "")
+      (if (string-match "[\r\n\t ]" v)
+	  ""
+	(message m v)
+	(setq v2 (char-to-string (read-char)))
+	(message "")
+	(if (string-match "[\r\n\t ]" v2)
+	    v
+	  (concat v v2)))))
+   (nil "")))
+
+(fset 'YaTeX::widehat		'YaTeX::widetilde)
+(fset 'YaTeX::overline		'YaTeX::widetilde)
+(fset 'YaTeX::overrightarrow	'YaTeX::widetilde)
+	
+
+;;;
+;; Add-in functions for large-type command.
+;;;
+(defun YaTeX:em ()
+  (cond
+   ((eq YaTeX-current-completion-type 'large) "\\/")
+   (t nil)))
+(fset 'YaTeX:it 'YaTeX:em)
+
 ;;; -------------------- End of yatexadd --------------------
 (provide 'yatexadd)
--- a/yatexenv.el	Tue Dec 16 13:34:57 1997 +0000
+++ b/yatexenv.el	Mon Oct 26 12:05:32 1998 +0000
@@ -2,7 +2,7 @@
 ;;; YaTeX environment-specific functions.
 ;;; yatexenv.el
 ;;; (c ) 1994-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
-;;; Last modified Wed Jun 25 21:30:45 1997 on domani
+;;; Last modified Wed Jan 14 16:44:36 1998 on firestorm
 ;;; $Id$
 
 ;;;
@@ -230,7 +230,7 @@
 	  (looking-at "\\\\right\\b"))
 	(progn (YaTeX-reindent
 		(save-excursion (YaTeX-goto-corresponding-leftright)
-				(current-column))))
+				(1- (current-column)))))
       (save-excursion
 	(forward-line -1)
 	(while (and (not (bobp)) (YaTeX-on-comment-p))
@@ -250,7 +250,7 @@
 	  (setq depth (+ (YaTeX-current-indentation) mp)))
 	 ((> l-r 0)
 	  (beginning-of-line)
-	  (search-forward "\\left" peol)
+	  (search-forward "\\left" peol nil l-r)
 	  (goto-char (1+ (match-beginning 0)))
 	  (setq depth (current-column)))
 	 ((< l-r 0)
@@ -258,7 +258,8 @@
 	  (YaTeX-goto-corresponding-leftright)
 	  (beginning-of-line)
 	  (skip-chars-forward " \t")
-	  (setq depth (+ (current-column) mp))) ;+mp is good?
+	  ;(setq depth (+ (current-column) mp)) ;+mp is good?
+	  (setq depth (current-column)))
 	 (t				;if \left - \right = 0
 	  (cond
 	   ((re-search-forward "\\\\\\\\\\s *$" peol t)
--- a/yatexhie.el	Tue Dec 16 13:34:57 1997 +0000
+++ b/yatexhie.el	Mon Oct 26 12:05:32 1998 +0000
@@ -2,7 +2,7 @@
 ;;; YaTeX hierarchy browser.
 ;;; yatexhie.el
 ;;; (c )1995 by HIROSE Yuuji [yuuji@ae.keio.ac.jp]
-;;; Last modified Thu Feb  2 23:55:59 1995 on figaro
+;;; Last modified Thu Sep 17 21:46:29 1998 on firestorm
 ;;; $Id$
 
 ;; ----- Customizable variables -----
@@ -43,7 +43,7 @@
 			(skip-chars-forward
 			 (concat "^ \t\n\r" YaTeX-ec-regexp "{}"))
 			(point)))))
-	 ((match-beginning 3)
+	 ((and (match-beginning 3) (looking-at "{"))
 	  (skip-chars-forward "{")
 	  (setq file (buffer-substring
 		      (point)
--- a/yatexhlp.el	Tue Dec 16 13:34:57 1997 +0000
+++ b/yatexhlp.el	Mon Oct 26 12:05:32 1998 +0000
@@ -1,8 +1,8 @@
 ;;; -*- Emacs-Lisp -*-
 ;;; YaTeX helper with LaTeX commands and macros.
 ;;; yatexhlp.el
-;;; (c )1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
-;;; Last modified Mon Apr  1 03:34:23 1996 on NSR
+;;; (c )1994,1998 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
+;;; Last modified Thu Mar 12 11:10:07 1998 on crx
 ;;; $Id$
 
 (let ((help-file (concat "YATEXHLP."
@@ -10,6 +10,7 @@
 			       (t "eng"))))
       (help-dir
        (cond
+	((and (boundp 'site-directory) site-directory) site-directory)
 	(YaTeX-emacs-19 (expand-file-name "../../site-lisp" doc-directory))
 	(t exec-directory))))
   (defvar YaTeX-help-file
@@ -17,8 +18,8 @@
     "*Help file of LaTeX/TeX commands or macros.")
   (defvar YaTeX-help-file-private
     (expand-file-name (concat "~/" help-file))
-    "*Private help file of LaTeX/TeX macros.")
-)
+    "*Private help file of LaTeX/TeX macros."))
+
 (defvar YaTeX-help-delimiter "\C-_" "Delimiter of each help entry.")
 (defvar YaTeX-help-entry-map (copy-keymap YaTeX-mode-map)
   "Key map used in help entry.")
--- a/yatexlib.el	Tue Dec 16 13:34:57 1997 +0000
+++ b/yatexlib.el	Mon Oct 26 12:05:32 1998 +0000
@@ -2,7 +2,7 @@
 ;;; YaTeX and yahtml common libraries, general functions and definitions
 ;;; yatexlib.el
 ;;; (c )1994-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
-;;; Last modified Tue Dec 16 14:48:22 1997 on firestorm
+;;; Last modified Mon Oct 19 13:41:29 1998 on firestorm
 ;;; $Id$
 
 ;; General variables
@@ -30,8 +30,8 @@
 	   1 (cond (YaTeX-dos 'shift_jis-dos)
 		   ((member 'shift_jis (coding-system-list)) 'shift_jis-unix)
 		   (t 'sjis)))
-	  '(2 . iso-2022-7bit-unix)
-	  '(3 . euc-japan))))
+	  '(2 . iso-2022-jp-unix)
+	  '(3 . euc-jp-unix))))
   "Kanji-code expression translation table.")
 (defvar YaTeX-inhibit-prefix-letter nil
   "*T for changing key definitions from [prefix] Letter to [prefix] C-Letter.")
@@ -190,11 +190,11 @@
 	(message
 	 (cond
 	  (YaTeX-japan
-	   "`%s'$B$NEPO?@h(B: U)$B%f!<%6<-=q(B L)$B%m!<%+%k<-=q(B N)$B%a%b%j(B D)$B$7$J$$(B")
+	   "`%s'の登録先: U)ユーザ辞書 L)ローカル辞書 N)メモリ D)しない")
 	  (t
 	   "Register `%s' into: U)serDic L)ocalDic N)one D)iscard"))
 	 (if (> (length car-v) 23)
-	     (concat (substring car-v 0 10) "..." (substring car-v -10))
+	     (concat (substring car-v 0 10) "..." (substring car-v -9))
 	   car-v))
 	(setq answer (char-to-string (read-char))))
       (cond
@@ -486,10 +486,11 @@
   "Replace recursively OLDDEF with NEWDEF for any keys in KEYMAP now
 defined as OLDDEF. In other words, OLDDEF is replaced with NEWDEF
 where ever it appears."
-  (mapcar
-   (function (lambda (key) (define-key keymap key newdef)))
-   (where-is-internal olddef keymap))
-)
+  (if YaTeX-emacs-19
+      (substitute-key-definition olddef newdef keymap global-map)
+    (mapcar
+     (function (lambda (key) (define-key keymap key newdef)))
+     (where-is-internal olddef keymap))))
 
 ;;;###autoload
 (defun YaTeX-match-string (n &optional m)
@@ -798,11 +799,17 @@
      bindlist))))
 
 
+;;;
+;; Functions for the Installation time
+;;;
 
 (defun bcf-and-exit ()
   "Byte compile rest of argument and kill-emacs."
   (if command-line-args-left
-      (progn
+      (let ((load-path (cons "." load-path)))
+	(and (fboundp 'set-language-environment)
+	     (featurep 'mule)
+	     (set-language-environment "Japanese"))
 	(mapcar 'byte-compile-file command-line-args-left)
 	(kill-emacs))))
 
--- a/yatexmth.el	Tue Dec 16 13:34:57 1997 +0000
+++ b/yatexmth.el	Mon Oct 26 12:05:32 1998 +0000
@@ -1,8 +1,8 @@
 ;;; -*- Emacs-Lisp -*-
 ;;; YaTeX math-mode-specific functions.
 ;;; yatexmth.el
-;;; (c )1993-1997 by HIROSE Yuuji [yuuji@ae.keio.ac.jp]
-;;; Last modified Tue Nov 25 12:33:05 1997 on firestorm
+;;; (c )1993-1998 by HIROSE Yuuji [yuuji@ae.keio.ac.jp]
+;;; Last modified Wed Sep 30 21:26:29 1998 on firestorm
 ;;; $Id$
 
 ;;; [Customization guide]
@@ -124,6 +124,7 @@
    ("!"		"neg"		("--+\n  |" YaTeX-image-neg))
    ("oo"	"infty"		("oo"		"∞"))
    ("\\"	"backslash"	("\\"		"\"))
+   ("..."	"cdots"		("..."		"…"))
 
    ;;binary operators
    ("+-"	"pm"		("+\n-" "±"))
@@ -232,12 +233,36 @@
    ;;left and right
    ("left"	"left"		"(leftmark)")
    ("right"	"right"		"(rightmark)")
-   ;other marks
+   ;;accent marks
+   ("tilde"	"tilde"		"~\n?")
+   ("T"		"tilde"		"~\n?")
+   ("wtilde"	"widetilde"	"~\n?")
+   ("hat"	"hat"		"^\n?")
+   ("what"	"widehat"	"/\\\n??")
+   ("w^"	"widehat"	"/\\\n?")
+   ("check"	"check"		"v\n?")
+   ("bar"	"bar"		"_\n?")
+   ("overline"	"overline"	"_\n?")
+   ("wbar"	"overline"	"--\n??")
+   ("dot"	"dot"		".\n?")
+   ("ddot"	"ddot"		"..\n??")
+   ("vec"	"vec"		("->\n??" "→\n??"))
+   ("~>"	"overrightarrow" ("-->\nAB" "→\nAB"))
+   ("VEC"	"overrightarrow" ("-->\nAB" "→\nAB"))
+   ;;rage-aware stuffs
+   ("prod"	"prod"		("-+--+-\n |  |" "Π"))
+   ("CUP"	"bigcup"	"|~~|\n|  |\n|  |")
+   ("union"	"bigcup"	"|~~|\n|  |\n|  |")
+   ("CAP"	"bigcap"	"|  |\n|  |\n|__|")
+   ("isc"	"bigcap"	"|  |\n|  |\n|__|")
+   ("O+"	"bigoplus"	"/~~~\\\n| + |\n\\___/")
+   ("Ox"	"bigotimes"	"/~~~\\\n| X |\n\\___/")
+   ;;other marks
    ("Z"		"aleph"		"|\\|")
    ("|\\|"	"aleph"		"|\\|")
    ("h-"	"hbar"		"_\nh")
-   ("i"		"imath"		"i")
-   ("j"		"jmath"		"j")
+ ;  ("i"		"imath"		"i") ;These chars are appeared only
+ ;  ("j"		"jmath"		"j") ;as section-type arguments
    ("l"		"ell"		"l")
    ("wp"	"wp"		"???")
    ("R"		"Re"		")R")
@@ -674,31 +699,25 @@
 			 )
 		nil)
 	      )))
+    (delete-region beg (point))
     (cond
-     ((eq result t)
-      (setq YaTeX-current-completion-type 'maketitle)
-
-      ;;;(sit-for 1)
-      (setq unread-command-char last-char)
-      (insert (YaTeX-addin single-command)))
+     ((memq result '(t select))
+      (if (eq result t)
+	  (setq unread-command-char last-char)
+	(message "Done."))
+      (if (assoc single-command section-table)
+	  (YaTeX-make-section nil nil nil single-command)
+	(setq YaTeX-current-completion-type 'maketitle)
+	(YaTeX-make-singlecmd single-command)))
      ((eq result 'abort)
-      (delete-region beg (point))
       (message "Abort."))
      ((eq result 'escape)
-      (delete-region beg (point))
       (call-interactively (global-key-binding this-key)))
-     ((eq result 'select)
-      (message "Done.")
-      (setq YaTeX-current-completion-type 'maketitle)
-      (insert (YaTeX-addin single-command)))
      ((eq result 'exit)
-      (delete-region beg (point))
       (YaTeX-toggle-math-mode))
      ((eq result 'menu)
-      (delete-region beg (point))
       (setq key (concat "^" (regexp-quote (substring key 0 -1))))
-      (insert (YaTeX-math-show-menu key)))))
-)
+      (insert (YaTeX-math-show-menu key))))))
 
 ;; ----- Change image completion types -----
 (defun YaTeX-math-member-p (item)
--- a/yatexprc.el	Tue Dec 16 13:34:57 1997 +0000
+++ b/yatexprc.el	Mon Oct 26 12:05:32 1998 +0000
@@ -2,7 +2,7 @@
 ;;; YaTeX process handler.
 ;;; yatexprc.el
 ;;; (c )1993-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
-;;; Last modified Thu Dec 11 16:16:21 1997 on crx
+;;; Last modified Mon Mar  9 11:44:29 1998 on crx
 ;;; $Id$
 
 ;(require 'yatex)
@@ -22,6 +22,7 @@
 
 (defvar YaTeX-shell-command-option
   (or (and (boundp 'shell-command-option) shell-command-option)
+      (and (boundp 'shell-command-switch) shell-command-switch)
       (if YaTeX-dos "/c" "-c"))
   "Shell option for command execution.")
 
@@ -329,8 +330,8 @@
   "Kill process PROC after sending signal to PROC.
 PROC should be process identifier."
   (cond
-   (YaTeX-dos
-    (error "MS-DOS can't have concurrent process."))
+   ((not (fboundp 'start-process))
+    (error "This system can't have concurrent process."))
    ((or (null proc) (not (eq (process-status proc) 'run)))
     (message "Typesetting process is not running."))
    (t
@@ -477,7 +478,7 @@
 	 nil t)
 	nil
       (select-window cur-win)
-      (error "No more erros on %s" cur-buf))
+      (error "No more errors on %s" cur-buf))
     (goto-char (match-beginning 0))
     (skip-chars-forward "^0-9" (match-end 0))
     (setq error-line
--- a/yatexsec.el	Tue Dec 16 13:34:57 1997 +0000
+++ b/yatexsec.el	Mon Oct 26 12:05:32 1998 +0000
@@ -1,8 +1,8 @@
 ;;; -*- Emacs-Lisp -*-
 ;;; YaTeX sectioning browser.
 ;;; yatexsec.el
-;;; (c ) 1994 by HIROSE Yuuji [yuuji@ae.keio.ac.jp]
-;;; Last modified Mon Feb 17 11:26:44 1997 on supra
+;;; (c ) 1994, 1998 by HIROSE Yuuji [yuuji@ae.keio.ac.jp]
+;;; Last modified Wed Sep 30 20:09:35 1998 on firestorm
 ;;; $Id$
 
 (defvar YaTeX-sectioning-level
@@ -290,7 +290,7 @@
       (set-buffer cb)
       (YaTeX-showup-buffer YaTeX-sectioning-buffer) ;show buffer
       (goto-char (point-min))
-      (with-output-to-temp-buffer YaTeX-sectioning-buffer
+      (let ((standard-output (get-buffer YaTeX-sectioning-buffer)))
 	(while (re-search-forward pattern nil t)
 	  (goto-char (1+ (match-beginning 0)))
 	  (setq level (YaTeX-get-sectioning-level)
@@ -373,8 +373,8 @@
     (if (and YaTeX-sectioning-buffer-parent
 	     (get-buffer YaTeX-sectioning-buffer-parent)
 	     (save-excursion
-	       (or (= (char-after (point)) ?\\ )
-		   (skip-chars-backward "^\\\\" (point-beginning-of-line)))
+	       (beginning-of-line)
+	       (skip-chars-forward "^\\\\" (point-end-of-line))
 	       (YaTeX-on-section-command-p YaTeX-sectioning-regexp)))
 	(save-excursion
 	  (or (buffer-name (get-buffer YaTeX-sectioning-buffer-parent))
@@ -460,10 +460,13 @@
 	      nsc (YaTeX-shifted-section (YaTeX-match-string 1) n))
 	(goto-char (match-beginning 0))
 	(let (buffer-read-only)
-	  (delete-region (point) (progn (beginning-of-line) (point)))
+	  ;(delete-region (point) (progn (beginning-of-line) (point)))
+	  (delete-region (progn (beginning-of-line) (point))
+			 (progn (skip-chars-forward " \t") (point)))
 	  (indent-to-column (cdr (assoc nsc YaTeX-sectioning-level)))
 	  (delete-region
-	   (1+ (point)) (progn (skip-chars-forward "^*{") (point)))
+	   (progn (skip-chars-forward "%\\\\") (point))
+	   (progn (skip-chars-forward "^*{") (point)))
 	  (insert nsc))
 	(YaTeX-on-section-command-p YaTeX-sectioning-regexp)
 	(setq to (YaTeX-match-string 0)

yatex.org