yatex

changeset 60:9e08ed569d80

yahtml: change keystroke of calling browser to [prefix] t p yahtml: don't count <a>tag contents as column in <pre> yahtml: support [prefix] c against src="", align="". and many many more
author yuuji
date Fri, 24 Jan 1997 09:04:06 +0000
parents 48ac97a6b6ce
children b9f753846b6b
files docs/qanda.eng docs/yatexe.tex docs/yatexj.tex help/YATEXHLP.jp yahtml.el yatex.el yatex.new yatex19.el yatexadd.el yatexenv.el yatexhks.el yatexmth.el yatexprc.el
diffstat 13 files changed, 743 insertions(+), 419 deletions(-) [+]
line diff
     1.1 --- a/docs/qanda.eng	Wed May 01 15:35:40 1996 +0000
     1.2 +++ b/docs/qanda.eng	Fri Jan 24 09:04:06 1997 +0000
     1.3 @@ -3,6 +3,9 @@
     1.4  %%
     1.5  %% C-u C-x $ shows only questions.  C-x $ shows all.
     1.6  %%
     1.7 +(New Item
     1.8 +     *It is bothering for me to determine I should call bibtex or latex...
     1.9 +     *Filling a paragraph doesn't work as I expected.
    1.10  
    1.11  [Installation]
    1.12  ==============
    1.13 @@ -201,6 +204,32 @@
    1.14  	ftp://ftp.ae.keio.ac.jp/pub/emacs-lisp/util/
    1.15  	ftp://archive.cis.ohio-state.edu/pub/gnu/elisp-archive/
    1.16  	
    1.17 +*It is bothering for me to determine I should call bibtex or latex...
    1.18 +	
    1.19 +	Why don't you try `latexmk' perl script, which is a TeX specific 
    1.20 +	tool as `make'?  It detects the dependency among the TeX-related 
    1.21 +	files such as .tex, .bib, and so on, and will execute suitable
    1.22 +	commands in a suitable sequence.  You can find `latexmk' script
    1.23 +	in a directory of supports/latexmk in some CTAN ftp directory.
    1.24 +	
    1.25 +*Filling a paragraph doesn't work as I expected.	
    1.26 +	
    1.27 +	It is because the indentation  depth  is different from  default
    1.28 +	depth.    Please keep  turning   on auto-fill   to  make filling
    1.29 +	function  work  well.  If  you bring  some  paragraph  which has
    1.30 +	different  indentation from other part  of document, you have to
    1.31 +	re-indent it with the default indentation by  typing TAB on each
    1.32 +	line.  If the paragraph is large, try the next operation;
    1.33 +	
    1.34 +	       (1)Type C-x . on the beginning of line
    1.35 +	       (2)Mark paragraph to be re-indented
    1.36 +	       (3)Type M-C-\
    1.37 +	
    1.38 +	then fill the paragraph.  If  you want fill that paragraph  with
    1.39 +	current   indentation depth,  move the     cursor on the   first
    1.40 +	appearance  of  non-white-space  character  on  the  line before
    1.41 +	filling.
    1.42 +	
    1.43  [About Emacs-19/Mule2]
    1.44  ======================
    1.45  *Equations are too dark to read when I use hilit19.
     2.1 --- a/docs/yatexe.tex	Wed May 01 15:35:40 1996 +0000
     2.2 +++ b/docs/yatexe.tex	Fri Jan 24 09:04:06 1997 +0000
     2.3 @@ -126,7 +126,7 @@
     2.4  @itemize
     2.5  @item Invocation of typesetter,  previewer and related programs(@kbd{C-c t})
     2.6  @item Typesetting on static region which is independent from point
     2.7 -@item Semiautomatic replacing of @code{\include only}
     2.8 +@item Semiautomatic replacing of @code{\includeonly}
     2.9  @item Jumping to error line(@kbd{C-c '})
    2.10  @item Completing-read of La@TeX{} commands such as @code{\begin@{@}},
    2.11          @code{\section} etc. 
    2.12 @@ -1562,9 +1562,9 @@
    2.13  @section Lisp variables
    2.14  @cindex customizable variables
    2.15  
    2.16 -  You   can change the   key assignments or   make completion more
    2.17 -comfortable  by  setting the values   of   various variables which
    2.18 -control the movement of yatex-mode.
    2.19 +  You can change the key assignments or make completion more comfortable
    2.20 +by setting the values of various variables which control the movement of
    2.21 +yatex-mode.
    2.22  
    2.23    For example, if you want to change the prefix key stroke from @kbd{C-c}
    2.24  to any other sequence, set YaTeX-prefix to whatever you want to use.  If
    2.25 @@ -1595,145 +1595,137 @@
    2.26  the variable by @kbd{M-x describe-variable}.
    2.27  
    2.28  @defvar YaTeX-prefix
    2.29 -        Prefix key stroke (@kbd{C-c})
    2.30 +Prefix key stroke (@kbd{C-c})
    2.31  @end defvar
    2.32  
    2.33  @defvar YaTeX-inhibit-prefix-letter
    2.34 -        Change key stroke from @kbd{C-c letter} to @kbd{C-c C-letter}
    2.35 -        (@code{nil})
    2.36 +Change key stroke from @kbd{C-c letter} to @kbd{C-c C-letter} (@code{nil})
    2.37  @end defvar
    2.38  
    2.39  @defvar YaTeX-fill-prefix
    2.40 -        Fill-prefix used in yatex-mode (@code{nil})
    2.41 +Fill-prefix used in yatex-mode (@code{nil})
    2.42  @end defvar
    2.43  
    2.44  @defvar YaTeX-user-completion-table
    2.45 -        Name of user dictionary where learned completion table will be stored.
    2.46 -        (@code{"~/.yatexrc"})
    2.47 +Name of user dictionary where learned completion table will be stored. 
    2.48 +(@code{"~/.yatexrc"})
    2.49 +@end defvar
    2.50 +
    2.51 +@defvar tex-command
    2.52 +La@TeX{} typesetter command (@code{"latex"})
    2.53 +@end defvar
    2.54 +
    2.55 +@defvar dvi2-command
    2.56 +Preview command (@code{"xdvi -geo +0+0 -s 4"})
    2.57 +@end defvar
    2.58 +
    2.59 +@defvar dviprint-command-format
    2.60 +Command format to print dvi file (@code{"dvi2ps %f %t %s | lpr"})
    2.61 +@end defvar
    2.62 +
    2.63 +@defvar dviprint-from-format
    2.64 +Start page format of above %f. %b will turn to start page (@code{"-f %b"})
    2.65 +@end defvar
    2.66 +
    2.67 +@defvar dviprint-to-format
    2.68 +End page format of above %t. %e will turn to @code{end} page (@code{"-t %e"})
    2.69 +@end defvar
    2.70 +
    2.71 +@defvar makeindex-command
    2.72 +Default makeindex command (@code{"makeindex"} (@code{"makeind"} on MS-DOS))
    2.73 +@end defvar
    2.74 +
    2.75 +@defvar section-name
    2.76 +Initial default value at the first section-type completion 
    2.77 +(@code{"documentstyle"})
    2.78 +@end defvar
    2.79 +
    2.80 +@defvar env-name
    2.81 +Initial default value at the first begin-type completion (@code{"document"})
    2.82 +@end defvar
    2.83 +
    2.84 +@defvar fontsize-name
    2.85 +Ditto of large-type (@code{"large"})
    2.86 +@end defvar
    2.87 +
    2.88 +@defvar single-command
    2.89 +Ditto of maketitle-type (@code{"maketitle"})
    2.90 +@end defvar
    2.91 +
    2.92 +@defvar YaTeX-need-nonstop
    2.93 +Put @code{\nonstopmode@{@}} or not (@code{nil})
    2.94 +@end defvar
    2.95 +
    2.96 +@defvar latex-warning-regexp
    2.97 +Regular expression of warning message latex command puts out 
    2.98 +(@code{"line.* [0-9]*"})
    2.99 +@end defvar
   2.100 +
   2.101 +@defvar latex-error-regexp
   2.102 +Regular expression of error message (@code{"l\\.[1-9][0-9]*"})
   2.103 +@end defvar
   2.104 +
   2.105 +@defvar latex-dos-emergency-message
   2.106 +Message latex command running on DOS puts at abort (@code{"Emergency stop"})
   2.107  @end defvar
   2.108  
   2.109  @defvar YaTeX-item-regexp
   2.110 -        Regular expression of item command(@code{"\\\\item"})
   2.111 -@end defvar
   2.112 -
   2.113 -@defvar tex-command
   2.114 -        La@TeX{} typesetter command (@code{"latex"})
   2.115 -@end defvar
   2.116 -
   2.117 -@defvar dvi2-command
   2.118 -        Preview command
   2.119 -        (@code{"xdvi -geo +0+0 -s 4 -display (getenv"DISPLAY")"})
   2.120 -@end defvar
   2.121 -
   2.122 -@defvar dviprint-command-format
   2.123 -        Command format to print dvi file (@code{"dvi2ps %f %t %s | lpr"})
   2.124 -@end defvar
   2.125 -
   2.126 -@defvar dviprint-from-format
   2.127 -        Start page format of above %f. %b will turn to start page
   2.128 -        (@code{"-f %b"})
   2.129 -@end defvar
   2.130 -
   2.131 -@defvar dviprint-to-format
   2.132 -        End page format of above %t. %e will turn to @code{end} page
   2.133 -        (@code{"-t %e"})
   2.134 -@end defvar
   2.135 -
   2.136 -@defvar section-name
   2.137 -        Initial default value at the first section-type completion
   2.138 -        (@code{"documentstyle"})
   2.139 -@end defvar
   2.140 -
   2.141 -@defvar env-name
   2.142 -        Initial default value at the first begin-type completion
   2.143 -        (@code{"document"})
   2.144 -@end defvar
   2.145 -
   2.146 -@defvar fontsize-name
   2.147 -        Ditto of large-type (@code{"large"})
   2.148 -@end defvar
   2.149 -
   2.150 -@defvar single-command
   2.151 -        Ditto of maketitle-type (@code{"maketitle"})
   2.152 -@end defvar
   2.153 -
   2.154 -@defvar YaTeX-need-nonstop
   2.155 -        Put @code{\nonstopmode@{@}} or not (@code{nil})
   2.156 -@end defvar
   2.157 -
   2.158 -@defvar latex-warning-regexp
   2.159 -        Regular expression of warning message latex command puts out
   2.160 -        (@code{"line.* [0-9]*"})
   2.161 -@end defvar
   2.162 -
   2.163 -@defvar latex-error-regexp
   2.164 -        Regular expression of error message (@code{"l\\.[1-9][0-9]*"})
   2.165 -@end defvar
   2.166 -
   2.167 -@defvar latex-dos-emergency-message
   2.168 -        Message latex command running on DOS puts at abort
   2.169 -        (@code{"Emergency stop"})
   2.170 -@end defvar
   2.171 -
   2.172 -@defvar YaTeX-item-regexp
   2.173 -        Regexp of La@TeX{} itemization command (@code{"\\\\(sub\\)*item"})
   2.174 +Regular expression of item command (@code{"\\\\item"})
   2.175  @end defvar
   2.176  
   2.177  @defvar YaTeX-verb-regexp
   2.178 -        Regexp of La@TeX{} verb command family.  Omit \\\\.
   2.179 -        (@code{"verb\\*?\\|path"})
   2.180 +Regexp of verb family.  Omit \\\\. (@code{"verb\\*?\\|path"})
   2.181  @end defvar
   2.182  
   2.183 -@defvar         YaTeX-nervous
   2.184 -        T for using local dictionary (@code{t})
   2.185 +@defvar YaTeX-nervous
   2.186 +T for using local dictionary (@code{t})
   2.187  @end defvar
   2.188  
   2.189  @defvar YaTeX-sectioning-regexp
   2.190 -        Regexp of La@TeX{} sectioning command
   2.191 -
   2.192 -        (@code{"part\\|chapter\\|\\(sub\\)*\\(section\\|paragraph\\)"})
   2.193 +Regexp of La@TeX{} sectioning command 
   2.194 +(@code{"\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"})
   2.195  @end defvar
   2.196  
   2.197  @defvar YaTeX-fill-inhibit-environments
   2.198 -        Inhibit fill in these environments (@code{'("verbatim" "tabular")})
   2.199 +Inhibit fill in these environments 
   2.200 +(@code{'("tabular" "tabular*" "array" "picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath" "verbatim" "verbatim*")})
   2.201  @end defvar
   2.202  
   2.203  @defvar YaTeX-uncomment-once
   2.204 -        @code{T} for deleting all preceding @code{%} (@code{nil})
   2.205 +T for deleting all preceding @code{%} (@code{nil})
   2.206  @end defvar
   2.207  
   2.208  @defvar YaTeX-close-paren-always
   2.209 -        @code{T} for always close all parenthesis automatically,
   2.210 -        @code{nil} for only eol(@code{t})
   2.211 +T for always close all parenthesis automatically, @code{nil} for only eol 
   2.212 +(@code{t})
   2.213  @end defvar
   2.214  
   2.215  @defvar YaTeX-auto-math-mode
   2.216 -        Switch math-mode automatically(@code{t})
   2.217 +Switch math-mode automatically (@code{t})
   2.218  @end defvar
   2.219  
   2.220  @defvar YaTeX-math-key-list-private
   2.221 -        User defined alist, math-mode-prefix vs completion alist
   2.222 -        used in image completion(@code{nil}).  See @file{yatexmth.el}
   2.223 -        for the information about how to define a completion alist.
   2.224 +User defined alist, math-mode-prefix vs completion alist
   2.225 +used in image completion (@code{nil}).  See @file{yatexmth.el}
   2.226 +for the information about how to define a completion alist.
   2.227  @end defvar
   2.228  
   2.229  @defvar YaTeX-default-pop-window-height
   2.230 -        Initial height of typesetting buffer when one-window.
   2.231 -        Number for the lines of the buffer, numerical string for
   2.232 -        the percentage of the screen-height.
   2.233 -        @code{nil} for half height(10)
   2.234 +Initial height of typesetting buffer when one-window.
   2.235 +Number for the lines of the buffer, numerical string for
   2.236 +the percentage of the screen-height. @code{nil} for half height (10)
   2.237  @end defvar
   2.238  
   2.239  @defvar YaTeX-help-file
   2.240 -        Global online help file name (@file{$EMACS/etc/YATEXHLP.jp})
   2.241 +Global online help file name (@file{$EMACS/etc/YATEXHLP.jp})
   2.242  @end defvar
   2.243  
   2.244  @defvar YaTeX-help-file-private
   2.245 -        Private online help file name (@file{"~/YATEXHLP.jp"})
   2.246 +Private online help file name (@file{"~/YATEXHLP.jp"})
   2.247  @end defvar
   2.248  
   2.249  @defvar YaTeX-no-begend-shortcut
   2.250 -        Disable [prefix] b ?? shortcut (@code{nil)}
   2.251 +Disable [prefix] b ?? shortcut (@code{nil)}
   2.252  @end defvar
   2.253  
   2.254  @defvar YaTeX-hilit-pattern-adjustment-private
   2.255 @@ -1758,16 +1750,17 @@
   2.256  
   2.257  @defvar YaTeX-skip-default-reader
   2.258  Non-nil for this variable skips the default argument reader of
   2.259 -section-type command when add-in function for it is not defined.
   2.260 +section-type command when add-in function for it is not defined 
   2.261 +(@code{nil})
   2.262  @end defvar
   2.263  
   2.264  @defvar YaTeX-create-file-prefix-g
   2.265  When typing @kbd{prefix g} on the @code{\include} line,
   2.266 -open the target file even if the file doesn't exist(@code{nil}).
   2.267 +open the target file even if the file doesn't exist (@code{nil})
   2.268  @end defvar
   2.269  
   2.270  @defvar YaTeX-simple-messages
   2.271 -Simplyfy messages of various completions(@code{nil})$B!#(B
   2.272 +Simplyfy messages of various completions (@code{nil})
   2.273  @end defvar
   2.274  
   2.275  @defvar YaTeX-hilit-sectioning-face
   2.276 @@ -1781,12 +1774,12 @@
   2.277  
   2.278  @defvar YaTeX-hilit-sectioning-attenuation-rate
   2.279  When color mode, this variable specifies how much attenuate the color
   2.280 -density of @code{\subparagraph} compared with that of @code{\chapter}.
   2.281 -See also $B!#(B@code{YaTeX-hilit-sectioning-face}.
   2.282 +density of @code{\subparagraph} compared with that of @code{\chapter} 
   2.283 +(@code{'(15 40)}) See also @code{YaTeX-hilit-sectioning-face}.
   2.284  @end defvar
   2.285  
   2.286  @defvar YaTeX-use-AMS-LaTeX
   2.287 -If you use AMS-LaTeX, set to @code{t}(@code{nil}).
   2.288 +If you use AMS-LaTeX, set to @code{t} (@code{nil})
   2.289  @end defvar
   2.290  
   2.291  @node Sample definitions, Hook variables, All customizable variables, Lisp variables
     3.1 --- a/docs/yatexj.tex	Wed May 01 15:35:40 1996 +0000
     3.2 +++ b/docs/yatexj.tex	Fri Jan 24 09:04:06 1997 +0000
     3.3 @@ -22,7 +22,7 @@
     3.4  
     3.5  @menu
     3.6  * Intro::                       はじめに
     3.7 -* Terminology::                  マニュアル参照上の注意
     3.8 +* Terminology::                 マニュアル参照上の注意
     3.9  * Main features::               主な機能
    3.10  * Installation::                インストール
    3.11  * Invocation::                  プロセス起動
    3.12 @@ -1524,8 +1524,8 @@
    3.13  @node Intelligent newline, Changing mode of YaTeX, What column, Top
    3.14  @comment  node-name,  next,  previous,  up
    3.15  @chapter おまかせ改行
    3.16 -@cindex おまかせ改行[おまかせかいぎょう]
    3.17 -@cindex &入力[&にゅうりょく]
    3.18 +@cindex おまかせ改行[おまかせかいきよう]
    3.19 +@cindex &入力[&にゆうりよく]
    3.20  @cindex prefix &
    3.21  
    3.22    tabular[*], array, itemize, enumerate, tabbing 環境をbegin型補完で入力し
    3.23 @@ -1780,11 +1780,11 @@
    3.24  変数の詳細な説明を参照してください。
    3.25  
    3.26  @defvar YaTeX-prefix
    3.27 -yatex-mode 中のプリフィクスキー(@kbd{C-c})
    3.28 +yatex-mode 中のプリフィクスキー (@kbd{\C-c})
    3.29  @end defvar
    3.30  
    3.31  @defvar YaTeX-inhibit-prefix-letter
    3.32 -prefix キーの直後のキーバインドで@kbd{英字}のものを@kbd{C-英字}に変更
    3.33 +prefix キーの直後のキーバインドで @kbd{英字} のものを @kbd{C-英字} に変更 
    3.34  (@code{nil})
    3.35  @end defvar
    3.36  
    3.37 @@ -1793,19 +1793,11 @@
    3.38  @end defvar
    3.39  
    3.40  @defvar YaTeX-user-completion-table
    3.41 -学習したLa@TeX{}コマンド保存ファイル名(@code{"~/.yatexrc"})
    3.42 +学習したLa@TeX{}コマンド保存ファイル名 (@code{"~/.yatexrc"})
    3.43  @end defvar
    3.44  
    3.45  @defvar YaTeX-kanji-code
    3.46 -文書を作成する時の漢字コード1=Shift JIS, 2=JIS, 3=EUC(2 (MS-DOSでは1))
    3.47 -@end defvar
    3.48 -
    3.49 -@defvar YaTeX-item-regexp
    3.50 -itemの桁揃えの時に用いる、itemの正規表現(@code{"\\\\(sub\\)*item"})
    3.51 -@end defvar
    3.52 -
    3.53 -@defvar YaTeX-verb-regexp
    3.54 -verbコマンドの正規表現。先頭の\\\\はつけない(@code{"verb\\*?\\|path"})
    3.55 +文書を作成する時の漢字コード 1=Shift JIS, 2=JIS, 3=EUC (2 (MS-DOSでは1))
    3.56  @end defvar
    3.57  
    3.58  @defvar tex-command
    3.59 @@ -1813,53 +1805,53 @@
    3.60  @end defvar
    3.61  
    3.62  @defvar dvi2-command
    3.63 -プレヴューアコマンド名(@code{"xdvi -geo +0+0 -s 4 -display (getenv"DISPLAY")"})
    3.64 +プレヴューアコマンド名 (@code{"xdvi -geo +0+0 -s 4"})
    3.65  @end defvar
    3.66  
    3.67  @defvar dviprint-command-format
    3.68 -dviファイルの印刷に使われるコマンド式(@code{"dvi2ps %f %t %s | lpr"})
    3.69 +dviファイルの印刷に使われるコマンド式 (@code{"dvi2ps %f %t %s | lpr"})
    3.70  @end defvar
    3.71  
    3.72  @defvar dviprint-from-format
    3.73  上の@code{%f}に相当する開始ページ指定書式、@code{%b} が開始ページ番号に変
    3.74 -わる(@code{"-f %b"})
    3.75 +わる (@code{"-f %b"})
    3.76  @end defvar
    3.77  
    3.78  @defvar dviprint-to-format
    3.79 -@code{%t} に相当する終了ページ指定書式、@code{%e}が終了ページ番号に変わる
    3.80 +@code{%t} に相当する終了ページ指定書式、@code{%e}が終了ページ番号に変わる 
    3.81  (@code{"-t %e"})
    3.82  @end defvar
    3.83  
    3.84  @defvar makeindex-command
    3.85 -makeindexコマンド(@code{"makeindex"} (MS-DOSでは@code{"makeind"}))
    3.86 +makeindexコマンド (@code{"makeindex"} (MS-DOSでは@code{"makeind"}))
    3.87  @end defvar
    3.88  
    3.89  @defvar section-name
    3.90 -最初のsection型補完の規定値(@code{"documentstyle"})
    3.91 +最初のsection型補完の規定値 (@code{"documentstyle"})
    3.92  @end defvar
    3.93  
    3.94  @defvar env-name
    3.95 -最初のbegin型補完の規定値(@code{"document"})
    3.96 +最初のbegin型補完の規定値 (@code{"document"})
    3.97  @end defvar
    3.98  
    3.99  @defvar fontsize-name
   3.100 -最初のlarge型補完の規定値(@code{"large"})
   3.101 +最初のlarge型補完の規定値 (@code{"large"})
   3.102  @end defvar
   3.103  
   3.104  @defvar single-command
   3.105 +最初のmaketitle型補完の規定値 (@code{"maketitle"})
   3.106  @end defvar
   3.107 -最初のmaketitle型補完の規定値(@code{"maketitle"})
   3.108  
   3.109  @defvar YaTeX-need-nonstop
   3.110 -@code{\nonstopmode@{@}}を自動的に付加するか(@code{nil})
   3.111 +@code{\nonstopmode@{@}}を自動的に付加するか (@code{nil})
   3.112  @end defvar
   3.113  
   3.114  @defvar latex-warning-regexp
   3.115 -latexコマンドの出力するウォーニング行の正規表現(@code{"line.* [0-9]*"})
   3.116 +latexコマンドの出力するウォーニング行の正規表現 (@code{"line.* [0-9]*"})
   3.117  @end defvar
   3.118  
   3.119  @defvar latex-error-regexp
   3.120 -同じくエラー行の正規表現(@code{"l\\.[1-9][0-9]*"})
   3.121 +同じくエラー行の正規表現 (@code{"l\\.[1-9][0-9]*"})
   3.122  @end defvar
   3.123  
   3.124  @defvar latex-dos-emergency-message
   3.125 @@ -1869,15 +1861,19 @@
   3.126  
   3.127  @defvar latex-message-kanji-code
   3.128  jlatex コマンドの出力するメッセージの漢字コード.タイプセットバッファ
   3.129 -の出力が化ける時は、これを設定する(2, Nemacsでのみ有効)
   3.130 +の出力が化ける時は、これを設定する (2, Nemacsでのみ有効)
   3.131  @end defvar
   3.132  
   3.133  @defvar NTT-jTeX
   3.134 -NTT-j@TeX{}使用時@code{t}にする(@code{nil})
   3.135 +NTT-j@TeX{}使用時は@code{t}にする (@code{nil})
   3.136  @end defvar
   3.137  
   3.138  @defvar YaTeX-item-regexp
   3.139 -item化コマンドの正規表現(@code{"\\\\(sub\\)*item"})
   3.140 +itemの桁揃えの時に用いる、itemの正規表現 (@code{"\\\\(sub\\)*item"})
   3.141 +@end defvar
   3.142 +
   3.143 +@defvar YaTeX-verb-regexp
   3.144 +verbコマンドの正規表現。先頭の\\\\はつけない (@code{"verb\\*?\\|path"})
   3.145  @end defvar
   3.146  
   3.147  @defvar YaTeX-nervous
   3.148 @@ -1885,48 +1881,48 @@
   3.149  @end defvar
   3.150  
   3.151  @defvar YaTeX-sectioning-regexp
   3.152 -セクション区切り設定コマンドの正規表現
   3.153 -(@code{"part\\|chapter\\|\\(sub\\)*\\(section\\|paragraph\\)"})
   3.154 +セクション区切り設定コマンドの正規表現 
   3.155 +(@code{"\\(part\\|chapter\\*?\\|\\(sub\\)*\\(section\\|paragraph\\)\\*?\\)\\b"})
   3.156  @end defvar
   3.157  
   3.158  @defvar YaTeX-fill-inhibit-environments
   3.159 -fill を抑止する環境名のリスト(@code{'("verbatim" "tabular")})
   3.160 +fill を抑止する環境名のリスト 
   3.161 +(@code{'("tabular" "tabular*" "array" "picture" "eqnarray" "eqnarray*" "equation" "math" "displaymath" "verbatim" "verbatim*")})
   3.162  @end defvar
   3.163  
   3.164  @defvar YaTeX-uncomment-once
   3.165 -領域uncommentで行頭の複数の@code{%}を全て削除するか(@code{nil})
   3.166 +領域uncommentで行頭の複数の@code{%}を全て削除するか (@code{nil})
   3.167  @end defvar
   3.168  
   3.169  @defvar YaTeX-close-paren-always
   3.170 -開き括弧の入力で常に閉じ括弧を入力する(@code{t})
   3.171 +開き括弧の入力で常に閉じ括弧を入力する (@code{t})
   3.172  @end defvar
   3.173  
   3.174  @defvar YaTeX-auto-math-mode
   3.175 -数式モードの切り替えを自動的に行う。(@code{t})
   3.176 +数式モードの切り替えを自動的に行う (@code{t})
   3.177  @end defvar
   3.178  
   3.179  @defvar YaTeX-math-key-list-private
   3.180 -        数式イメージ補完で用いる (プリフィクスキー . 対応補完テーブル) の
   3.181 -        alist(@code{nil})。補完テーブルの書き方については
   3.182 -        @file{yatexmth.el}を参照。
   3.183 +数式イメージ補完で用いる (プリフィクスキー . 対応補完テーブル) の
   3.184 +alist (@code{nil})。補完テーブルの書き方については@file{yatexmth.el}を参照。
   3.185  @end defvar
   3.186  
   3.187  @defvar YaTeX-default-pop-window-height
   3.188  1画面の時にタイプセットバッファを初めて作成する時の高さ。数値で行数、数字
   3.189 -文字列でEmacsウィンドウに対する百分率(10)。
   3.190 +文字列でEmacsウィンドウに対する百分率 (10)
   3.191  @end defvar
   3.192  
   3.193  @defvar YaTeX-help-file
   3.194 -共用ヘルプファイル(@file{$EMACS/etc/YATEXHLP.jp})
   3.195 +共用ヘルプファイル (@file{$EMACS/etc/YATEXHLP.jp})
   3.196  @end defvar
   3.197  
   3.198  @defvar YaTeX-help-file-private
   3.199 -個人用ヘルプファイル(@file{"~/YATEXHLP.jp"})
   3.200 +個人用ヘルプファイル (@file{"~/YATEXHLP.jp"})
   3.201  @end defvar
   3.202  
   3.203  @defvar YaTeX-no-begend-shortcut
   3.204  @kbd{[prefix] b ??} のショートカットを使わず、@kbd{[prefix] b} だけで補完
   3.205 -入力に入る(@kbd{nil})
   3.206 +入力に入る (@code{nil})
   3.207  @end defvar
   3.208  
   3.209  @defvar YaTeX-hilit-pattern-adjustment-private
   3.210 @@ -1950,20 +1946,20 @@
   3.211  
   3.212  @defvar YaTeX-skip-default-reader
   3.213  Non-nil に設定するとsection型コマンドの引数入力時、アドイン関数がなければ
   3.214 -ミニバッファでの読み込みをせずに入力を完了させる。
   3.215 +ミニバッファでの読み込みをせずに入力を完了させる (@code{nil})
   3.216  @end defvar
   3.217  
   3.218  @defvar YaTeX-create-file-prefix-g
   3.219  @code{\include}などで @kbd{prefix g}した時に、ジャンプ先が存在しないファイ
   3.220 -ルであってもオープンする(@code{nil})。
   3.221 +ルであってもオープンする (@code{nil})
   3.222  @end defvar
   3.223  
   3.224  @defvar YaTeX-simple-messages
   3.225 -各種補完時のメッセージ出力を簡素化する(@code{nil})。
   3.226 +各種補完時のメッセージ出力を簡素化する (@code{nil})
   3.227  @end defvar
   3.228  
   3.229  @defvar YaTeX-hilit-sectioning-face
   3.230 -色付けが有効な時の @code{\part} の色
   3.231 +色付けが有効な時の @code{\part} の色 
   3.232  (@code{'(yellow/dodgerblue yellow/slateblue)})。
   3.233  リストの第一要素は @code{hilit-background-mode} が @code{'light} の時の、
   3.234  第二要素は @code{'dark} の時の @code{\chapter} の色で、文字色/背景色 のよ
   3.235 @@ -1972,12 +1968,12 @@
   3.236  
   3.237  @defvar YaTeX-hilit-sectioning-attenuation-rate
   3.238  色付けが有効な時の、@code{\subparagraph} の色を @code{\chapter} の濃度の何
   3.239 -%薄くしたものにするか(@code{'(15 40)}。@code{YaTeX-hilit-sectioning-face}
   3.240 +%薄くしたものにするか (@code{'(15 40)}) @code{YaTeX-hilit-sectioning-face}
   3.241  の項参照。
   3.242  @end defvar
   3.243  
   3.244  @defvar YaTeX-use-AMS-LaTeX
   3.245 -AMS-LaTeX を使用する場合は @code{t} に設定する(@code{nil})。
   3.246 +AMS-LaTeX を使用する場合は @code{t} に設定する (@code{nil})
   3.247  @end defvar
   3.248  
   3.249  @node Sample definitions, Hook variables, All customizable variables, Lisp variables
     4.1 --- a/help/YATEXHLP.jp	Wed May 01 15:35:40 1996 +0000
     4.2 +++ b/help/YATEXHLP.jp	Fri Jan 24 09:04:06 1997 +0000
     4.3 @@ -687,6 +687,10 @@
     4.4  \sbox{\CMD}{テキスト}
     4.5  \saveboxと同じ。sboxはrobust, saveboxはfragile
     4.6  
     4.7 +usebox
     4.8 +\usebox{\CMD}
     4.9 +\saveboxで\CMDに保存されたテキストを配置する。
    4.10 +
    4.11  framebox
    4.12  \framebox{オブジェクト}
    4.13  「オブジェクト」に枠をつけて\makeboxと同様の処理をする。
    4.14 @@ -1211,7 +1215,7 @@
    4.15  以下の方々の御協力を頂きました。ここに感謝申し上げます。
    4.16  
    4.17  (順不同/代表項目のみ)
    4.18 -横田一也さん(マツダ)
    4.19 +横田和也さん(マツダ)
    4.20  	転載を行って頂きました。
    4.21  
    4.22  北岸隆史さん(豊橋技術科学大)
    4.23 @@ -1372,6 +1376,9 @@
    4.24  	label/ref補完で、labelやrefで始まる単語全てを候補にいれてしまう
    4.25  	バグを報告して頂きました。
    4.26  
    4.27 +吉田尚志さん(NTT DATA)
    4.28 +	Win32関連で多大なる貢献をして頂きました。
    4.29 +
    4.30  上田佳明さん(豊橋技科大)
    4.31  	Emacs 19.29 以降で生じるYaTeX-indent-new-comment-lineの不具合を
    4.32  	指摘して頂きました。
    4.33 @@ -1391,7 +1398,7 @@
    4.34  	YaTeX-default-pop-window-height の原案を頂きました。
    4.35  	$ \% $ のような場合の数式モード終了判定のミスを指摘して頂きました。
    4.36  
    4.37 -安藤利和(金沢工大)
    4.38 +安藤利和さん(金沢工大)
    4.39  	野鳥を使うTipsをまとめた「あなたもわたしも野鳥の…」というWWWペー
    4.40  	ジを作成して下さいました。
    4.41  
     5.1 --- a/yahtml.el	Wed May 01 15:35:40 1996 +0000
     5.2 +++ b/yahtml.el	Fri Jan 24 09:04:06 1997 +0000
     5.3 @@ -1,7 +1,6 @@
     5.4  ;;; -*- Emacs-Lisp -*-
     5.5 -;;; (c ) 1994 by HIROSE Yuuji [yuuji@ae.keio.ac.jp, pcs39334@asciinet.or.jp]
     5.6 -;;; Last modified Tue Apr 23 23:13:12 1996 on inspire
     5.7 -;;; This package is no longer tentative.
     5.8 +;;; (c ) 1994-1997 by HIROSE Yuuji [yuuji@ae.keio.ac.jp]
     5.9 +;;; Last modified Fri Jan 24 18:03:01 1997 on supra
    5.10  ;;; $Id$
    5.11  
    5.12  ;;;[Installation]
    5.13 @@ -35,6 +34,8 @@
    5.14  ;;;			`<input name="var" ...>'
    5.15  ;;;  * [prefix] l	Complete typeface-changing commands such as
    5.16  ;;;			`<i> ... </i>' or `<samp> ... </samp>'
    5.17 +;;; 			This completion can be used to make in-line
    5.18 +;;; 			tags which is normally completed with [prefix] b.
    5.19  ;;;  * [prefix] m	Complete single commands such as
    5.20  ;;;			`<br>' or `<hr> or <li>...'
    5.21  ;;;  * M-RET		Intelligent newline; if current TAG is one of
    5.22 @@ -50,7 +51,8 @@
    5.23  ;;;  * [prefix] c	Change html tags on the point.
    5.24  ;;;			When typeing [prefix] c on `href="xxx"', you can 
    5.25  ;;;			change the reference link with completion.
    5.26 -;;;  * [prefix] t b	View current html with WWW browser
    5.27 +;;;  * [prefix] t j	Call weblint on current file.
    5.28 +;;;  * [prefix] t p	View current html with WWW browser
    5.29  ;;; 			(To activate this, never fail to set the lisp
    5.30  ;;; 			 variable yahtml-www-browser.  Recommended value
    5.31  ;;; 			 is "netscape")
    5.32 @@ -60,8 +62,7 @@
    5.33  
    5.34  
    5.35  (require 'yatex)
    5.36 -(defvar yahtml-prefix-map nil)
    5.37 -(defvar yahtml-mode-map nil "Keymap used in yahtml-mode.")
    5.38 +;;; --- customizable variable starts here ---
    5.39  (defvar yahtml-image-viewer "xv" "*Image viewer program")
    5.40  (defvar yahtml-www-browser "netscape"
    5.41    "*WWW Browser command")
    5.42 @@ -77,18 +78,36 @@
    5.43    "*Directory index file name;
    5.44  Consult your site's WWW administrator.")
    5.45  
    5.46 +(defvar yahtml-environment-indent YaTeX-environment-indent
    5.47 +  "*Indentation depth of HTML's listing environment")
    5.48 +
    5.49 +(defvar yahtml-lint-program (if YaTeX-japan "jweblint" "weblint")
    5.50 +  "*Program name to lint HTML file")
    5.51 +(defvar yahtml-hate-too-deep-indentation nil
    5.52 +  "*Non-nil for this variable suppress deep indentation in listing environments.")
    5.53 +
    5.54 +;;; --- customizable variable ends here ---
    5.55 +
    5.56 +(defvar yahtml-prefix-map nil)
    5.57 +(defvar yahtml-mode-map nil "Keymap used in yahtml-mode.")
    5.58 +(defvar yahtml-lint-buffer-map nil "Keymap used in lint buffer.")
    5.59 +(defvar yahtml-shell-command-option
    5.60 +  (or (and (boundp 'shell-command-option) shell-command-option)
    5.61 +      (if (eq system-type 'ms-dos) "/c" "-c")))
    5.62 +
    5.63 +
    5.64  (defun yahtml-define-begend-key-normal (key env &optional map)
    5.65 -  "Define short cut yahtml-insert-begin-end key."
    5.66 +  "Define short cut yahtml-insert-begend key."
    5.67    (YaTeX-define-key
    5.68     key
    5.69     (list 'lambda '(arg) '(interactive "P")
    5.70 -	 (list 'yahtml-insert-begin-end env 'arg))
    5.71 +	 (list 'yahtml-insert-begend 'arg env))
    5.72     map))
    5.73  
    5.74  (defun yahtml-define-begend-region-key (key env &optional map)
    5.75 -  "Define short cut yahtml-insert-begin-end-region key."
    5.76 +  "Define short cut yahtml-insert-begend-region key."
    5.77    (YaTeX-define-key key (list 'lambda nil '(interactive)
    5.78 -			      (list 'yahtml-insert-begin-end env t)) map))
    5.79 +			      (list 'yahtml-insert-begend t env)) map))
    5.80  
    5.81  (defun yahtml-define-begend-key (key env &optional map)
    5.82    "Define short cut key for begin type completion both for
    5.83 @@ -128,20 +147,22 @@
    5.84      (YaTeX-define-key "s" 'yahtml-insert-form map)
    5.85      (YaTeX-define-key "l" 'yahtml-insert-tag map)
    5.86      (YaTeX-define-key "m" 'yahtml-insert-single map)
    5.87 -    (YaTeX-define-key "n" '(lambda () (interactive) (insert "<br>\n")) map)
    5.88 +    (YaTeX-define-key "n" '(lambda () (interactive) (if yahtml-prefer-upcases (insert "<BR>")(insert "<br>"))) map)
    5.89      (if YaTeX-no-begend-shortcut
    5.90  	(progn
    5.91  	  (YaTeX-define-key "B" 'yahtml-insert-begend-region map)
    5.92  	  (YaTeX-define-key "b" 'yahtml-insert-begend map))
    5.93 -      (yahtml-define-begend-key "bh" "HTML" map)
    5.94 -      (yahtml-define-begend-key "bH" "HEAD" map)
    5.95 -      (yahtml-define-begend-key "bt" "TITLE" map)
    5.96 +      (yahtml-define-begend-key "bh" "html" map)
    5.97 +      (yahtml-define-begend-key "bH" "head" map)
    5.98 +      (yahtml-define-begend-key "bt" "title" map)
    5.99        (yahtml-define-begend-key "bT" "table" map)
   5.100 -      (yahtml-define-begend-key "bb" "BODY" map)
   5.101 -      (yahtml-define-begend-key "bd" "DL" map)
   5.102 -      (yahtml-define-begend-key "b1" "H1" map)
   5.103 -      (yahtml-define-begend-key "b2" "H2" map)
   5.104 -      (yahtml-define-begend-key "b3" "H3" map)
   5.105 +      (yahtml-define-begend-key "bb" "body" map)
   5.106 +      (yahtml-define-begend-key "bc" "center" map)
   5.107 +      (yahtml-define-begend-key "bd" "dl" map)
   5.108 +      (yahtml-define-begend-key "bu" "ul" map)
   5.109 +      (yahtml-define-begend-key "b1" "h1" map)
   5.110 +      (yahtml-define-begend-key "b2" "h2" map)
   5.111 +      (yahtml-define-begend-key "b3" "h3" map)
   5.112        (yahtml-define-begend-key "ba" "a" map)
   5.113        (yahtml-define-begend-key "bf" "form" map)
   5.114        (yahtml-define-begend-key "bs" "select" map)
   5.115 @@ -156,17 +177,22 @@
   5.116      (YaTeX-define-key "c" 'yahtml-change-* map)
   5.117      (YaTeX-define-key "t" 'yahtml-browse-menu map)
   5.118      (YaTeX-define-key "a" 'yahtml-complete-mark map)
   5.119 +    (YaTeX-define-key "'" 'yahtml-prev-error map)
   5.120      ;;;;;(YaTeX-define-key "i" 'yahtml-fill-item map)
   5.121 -    )
   5.122 -)
   5.123 +    ))
   5.124 +
   5.125 +(if yahtml-lint-buffer-map nil
   5.126 +  (setq yahtml-lint-buffer-map (make-keymap))
   5.127 +  (define-key yahtml-lint-buffer-map " " 'yahtml-jump-to-error-line))
   5.128 +
   5.129  
   5.130  (defvar yahtml-paragraph-start
   5.131    (concat
   5.132 -   "^$\\|<[bh]r>\\|<p>\\|^[ \t]*</?\\(h[1-6]\\|p\\|d[ldt]\\|t[rdh]\\|li\\|body\\|html\\|head\\|title\\|ul\\|ol\\|dl\\|pre\\)>")
   5.133 +   "^$\\|<!--\\|^[ \t]*</?\\(h[1-6]\\|p\\|d[ldt]\\|[bhtd][rdh]\\|li\\|body\\|html\\|head\\|title\\|ul\\|ol\\|dl\\|pre\\|table\\|center\\)\\b")
   5.134    "*Regexp of html paragraph separater")
   5.135  (defvar yahtml-paragraph-separate
   5.136    (concat
   5.137 -   "^$\\|<[bh]r>\\|<p>\\|^[ \t]*</?\\(h[1-6]\\|p\\|d[ldt]\\|li\\|body\\|html\\|head\\|title\\|ul\\|ol\\|dl\\|pre\\)>")
   5.138 +   "^$\\|<!--\\|^[ \t]*</?\\(h[1-6]\\|p\\|[bhtd][ldt]\\|li\\|body\\|html\\|head\\|title\\|ul\\|ol\\|dl\\|pre\\|table\\|center\\|!--\\)\\b")
   5.139    "*Regexp of html paragraph separater")
   5.140  (defvar yahtml-syntax-table nil
   5.141    "*Syntax table for typesetting buffer")
   5.142 @@ -188,14 +214,14 @@
   5.143  (defvar yahtml-tmp-form-table nil)
   5.144  
   5.145  (defvar yahtml-env-table
   5.146 -  '(("html") ("head") ("title") ("body") ("dl") ("a") ("form") ("select")
   5.147 -    ("textarea")
   5.148 +  '(("html") ("head") ("title") ("body") ("dl") ("ul") ("ol") ("pre")
   5.149 +    ("a") ("form") ("select") ("center") ("textarea") ("blockquote")
   5.150      ("OrderedList" . "ol")
   5.151      ("UnorderedList" . "ul")
   5.152      ("DefinitionList" . "dl")
   5.153      ("Preformatted" . "pre")
   5.154      ("table") ("tr") ("th") ("td")
   5.155 -    ("h1") ("h2") ("h3") ("h4") ("h5") ("h6") ("ul")))
   5.156 +    ("h1") ("h2") ("h3") ("h4") ("h5") ("h6")))
   5.157  
   5.158  (defvar yahtml-itemizing-regexp
   5.159    "\\(ul\\|ul\\|dl\\)"
   5.160 @@ -206,8 +232,10 @@
   5.161  
   5.162  ;;; Completion tables for typeface designator
   5.163  (defvar yahtml-typeface-table
   5.164 -  '(("defn") ("em") ("cite") ("code") ("kbd") ("samp")
   5.165 -    ("strong") ("var") ("b") ("i") ("tt") ("u") ("address"))
   5.166 +  (append
   5.167 +   '(("dfn") ("em") ("cite") ("code") ("kbd") ("samp")
   5.168 +     ("strong") ("var") ("b") ("i") ("tt") ("u") ("address"))
   5.169 +   yahtml-env-table)
   5.170    "Default completion table of typeface designator")
   5.171  (defvar yahtml-user-typeface-table nil)
   5.172  (defvar yahtml-tmp-typeface-table nil)
   5.173 @@ -229,20 +257,9 @@
   5.174  (defvar yahtml-last-single-cmd nil)
   5.175  
   5.176  (defvar yahtml-prefer-upcases nil)
   5.177 -(cond
   5.178 - (yahtml-prefer-upcases
   5.179 -  (setq yahtml-form-table
   5.180 -	(mapcar (function (lambda (list) (list (upcase (car list)))))
   5.181 -		yahtml-form-table))
   5.182 -  (setq yahtml-env-table
   5.183 -	(mapcar (function (lambda (list) (list (upcase (car list)))))
   5.184 -		yahtml-env-table))
   5.185 -  (setq yahtml-typeface-table
   5.186 -	(mapcar (function (lambda (list) (list (upcase (car list)))))
   5.187 -		yahtml-typeface-table))))
   5.188  
   5.189  (defvar yahtml-struct-name-regexp
   5.190 -  "\\<\\(h[1-6]\\|[uod]l\\|body\\|title\\|head\\|table\\|t[rhd]\\|pre\\|a\\|form\\|select\\)\\b")
   5.191 +  "\\<\\(h[1-6]\\|[uod]l\\|html\\|body\\|title\\|head\\|table\\|t[rhd]\\|pre\\|a\\|form\\|select\\)\\b")
   5.192  
   5.193  
   5.194  (defun yahtml-mode ()
   5.195 @@ -257,9 +274,10 @@
   5.196      (setq kanji-fileio-code yahtml-kanji-code)))
   5.197    (setq major-mode 'yahtml-mode
   5.198  	mode-name "yahtml")
   5.199 +  (make-local-variable 'YaTeX-kanji-code)
   5.200    (make-local-variable 'YaTeX-ec) (setq YaTeX-ec "")
   5.201    (make-local-variable 'YaTeX-struct-begin)
   5.202 -  (setq YaTeX-struct-begin "<%1%2>")
   5.203 +  (setq YaTeX-struct-begin "<%1%2")
   5.204    (make-local-variable 'YaTeX-struct-end) (setq YaTeX-struct-end "</%1>")
   5.205    (make-local-variable 'YaTeX-struct-name-regexp)
   5.206    (setq YaTeX-struct-name-regexp yahtml-struct-name-regexp)
   5.207 @@ -282,6 +300,8 @@
   5.208    (setq indent-line-function 'yahtml-indent-line)
   5.209    (make-local-variable 'YaTeX-item-regexp)
   5.210    (setq YaTeX-item-regexp "<\\(li\\|d[td]\\)>")
   5.211 +  (make-local-variable 'YaTeX-typesetting-mode-map)
   5.212 +  (setq YaTeX-typesetting-mode-map yahtml-lint-buffer-map)
   5.213    (set-syntax-table yahtml-syntax-table)
   5.214    (use-local-map yahtml-mode-map)
   5.215    (run-hooks 'yahtml-mode-hook))
   5.216 @@ -324,8 +344,8 @@
   5.217     (nreverse
   5.218      '((em	"Embolden" .
   5.219  	  (lambda () (interactive) (yahtml-insert-tag nil "EM")))
   5.220 -      (defn	"Define a word" .
   5.221 -	(lambda () (interactive) (yahtml-insert-tag nil "DEFN")))
   5.222 +      (dfn	"Define a word" .
   5.223 +	(lambda () (interactive) (yahtml-insert-tag nil "DFN")))
   5.224        (cite	"Citation" .
   5.225  	(lambda () (interactive) (yahtml-insert-tag nil "CITE")))
   5.226        (code	"Code" .
   5.227 @@ -434,6 +454,7 @@
   5.228  	  (or (cdr (assoc yahtml-last-begend yahtml-env-table))
   5.229  	      yahtml-last-begend))
   5.230      (setq cmd yahtml-last-begend)
   5.231 +    (if yahtml-prefer-upcases (setq cmd (upcase cmd)))
   5.232      (if region
   5.233  	(let ((beg (region-beginning))
   5.234  	      (end (region-end))
   5.235 @@ -444,12 +465,10 @@
   5.236  	  (insert (format "<%s%s>%s" cmd addin (if bolp "\n" ""))))
   5.237        (insert (format "<%s%s>" cmd (yahtml-addin cmd)))
   5.238        (save-excursion
   5.239 -	(if bolp (progn
   5.240 -		   (insert "\n")
   5.241 -		   (indent-to-column cc)
   5.242 -		   (insert (format "</%s>" cmd)))
   5.243 -	  (insert (format "</%s>" cmd))))
   5.244 -      (if bolp (yahtml-intelligent-newline nil)))))
   5.245 +	(insert "\n")
   5.246 +	(indent-to-column cc)
   5.247 +	(insert (format "</%s>" cmd)))
   5.248 +      (yahtml-intelligent-newline nil))))
   5.249  
   5.250  (defun yahtml-insert-begend-region ()
   5.251    "Call yahtml-insert-begend in the region mode."
   5.252 @@ -461,12 +480,14 @@
   5.253    "Insert <FORM option=\"argument\">."
   5.254     (interactive)
   5.255     (or form
   5.256 -       (setq form
   5.257 -	     (YaTeX-cplread-with-learning
   5.258 -	      "Form: "
   5.259 -	       'yahtml-form-table 'yahtml-user-form-table
   5.260 -	       'yahtml-tmp-form-table)))
   5.261 +       (let ((completion-ignore-case t))
   5.262 +	 (setq form
   5.263 +	       (YaTeX-cplread-with-learning
   5.264 +		"Form: "
   5.265 +		'yahtml-form-table 'yahtml-user-form-table
   5.266 +		'yahtml-tmp-form-table))))
   5.267     (let ((p (point)) q)
   5.268 +     (if yahtml-prefer-upcases (setq form (upcase form)))
   5.269       (insert (format "<%s%s>" form (yahtml-addin form)))
   5.270       ;;(indent-relative-maybe)
   5.271       (if (cdr (assoc form yahtml-form-table))
   5.272 @@ -488,15 +509,20 @@
   5.273  (defun yahtml-collect-labels (&optional file)
   5.274    "Collect current buffers label (<a name=...>).
   5.275  If optional argument FILE is specified collect labels in FILE."
   5.276 -  (let (list)
   5.277 +  (let (list bound)
   5.278      (save-excursion
   5.279        (set-buffer yahtml-completing-buffer)
   5.280 -      (if file (set-buffer (find-file-noselect file)))
   5.281 +      (if file (let (hilit-auto-highlight)
   5.282 +		 (set-buffer (find-file-noselect file))))
   5.283        (save-excursion
   5.284  	(goto-char (point-min))
   5.285  	(while (re-search-forward "<a\\b" nil t)
   5.286 -	  (skip-chars-forward " \t\n")
   5.287 -	  (if (looking-at "name\\s *=\\s *\"?#?\\([^\">]+\\)\"?>")
   5.288 +	  (setq bound (match-end 0))
   5.289 +	  (search-forward ">" nil t)
   5.290 +	  (if (and (re-search-backward "\\(name\\|id\\)=" bound t)
   5.291 +		   (goto-char (match-end 0))
   5.292 +		   (skip-chars-forward " \t\n")
   5.293 +		   (looking-at "\"?#?\\([^\">]+\\)\"?\\b"))
   5.294  	      (setq list (cons
   5.295  			  (list (concat "#" (YaTeX-match-string 1)))
   5.296  			  list))))
   5.297 @@ -568,41 +594,67 @@
   5.298    
   5.299  (defun yahtml:a ()
   5.300    "Add-in function for <a>"
   5.301 -  (or yahtml-urls (yahtml-collect-url-history))
   5.302 -  (setq yahtml-completing-buffer (current-buffer))
   5.303 -;  (concat "href=\""
   5.304 -;	  (completing-read "href: " yahtml-urls)
   5.305 -;	  "\"")
   5.306 -  (message "(H)ref  (N)ame?")
   5.307 -  (cond
   5.308 -   ((string-match "[nN]" (char-to-string (read-char)))
   5.309 -    (concat "name=\"" (read-string "name: ") "\""))
   5.310 -   (t
   5.311 -    (concat "href=\""
   5.312 -	    (read-from-minibuffer "href: " "" yahtml-url-completion-map)
   5.313 -	    "\""))))
   5.314 +  (let ((l yahtml-prefer-upcases))
   5.315 +    (or yahtml-urls (yahtml-collect-url-history))
   5.316 +    (setq yahtml-completing-buffer (current-buffer))
   5.317 +;   (concat "href=\""
   5.318 +;	   (completing-read "href: " yahtml-urls)
   5.319 +;	   "\"")
   5.320 +    (message "(H)ref  (N)ame?")
   5.321 +    (cond
   5.322 +     ((string-match "[nN]" (char-to-string (read-char)))
   5.323 +      (concat (if l "NAME" "name") "=\"" (read-string "name: ") "\""))
   5.324 +     (t
   5.325 +      (concat (if l "HREF" "href") "=\""
   5.326 +	      (read-from-minibuffer "href: " "" yahtml-url-completion-map)
   5.327 +	      "\"")))))
   5.328  
   5.329 +(defvar yahtml-parameters-completion-alist
   5.330 +  '(("align" ("top") ("middle") ("bottom"))
   5.331 +    ("src" . file)
   5.332 +    ("method" ("POST") ("GET"))))
   5.333 +
   5.334 +(defun yahtml-read-parameter (par)
   5.335 +  (let* ((alist (cdr-safe (assoc (downcase par)
   5.336 +				yahtml-parameters-completion-alist)))
   5.337 +	 (prompt (concat par ": "))
   5.338 +	 v)
   5.339 +    (cond
   5.340 +     ((eq alist 'file)
   5.341 +      (read-file-name prompt "" nil nil ""))
   5.342 +     (alist
   5.343 +      (completing-read prompt alist))
   5.344 +     (t 
   5.345 +      (read-string prompt)))))
   5.346 +      
   5.347 +  
   5.348  (defun yahtml:img ()
   5.349    "Add-in function for <img>"
   5.350    (or yahtml-urls (yahtml-collect-url-history))
   5.351 -  (let ((src (read-file-name "src: " "" nil nil ""))
   5.352 -	(alg (completing-read "align: " '(("top") ("middle") ("bottom"))))
   5.353 -	(alt (read-string "alt: ")))
   5.354 -    (concat "src=\"" src "\""
   5.355 -	    (if (string< "" alg) (concat " align=\"" alg "\""))
   5.356 -	    (if (string< "" alt) (concat " alt=\"" alt "\"")))))
   5.357 +  (let ((src (yahtml-read-parameter "src"))
   5.358 +	(alg (yahtml-read-parameter "align"))
   5.359 +	(alt (yahtml-read-parameter "alt"))
   5.360 +	(l yahtml-prefer-upcases))
   5.361 +    (concat (if l "SRC" "src") "=\"" src "\""
   5.362 +	    (if (string< "" alg)
   5.363 +		(concat " " (if l "ALIGN" "align") "=\"" alg "\""))
   5.364 +	    (if (string< "" alt)
   5.365 +		(concat " " (if l "ALT" "alt") "=\"" alt "\"")))))
   5.366  
   5.367  (defun yahtml:form ()
   5.368    "Add-in function `form' input format"
   5.369    (concat
   5.370 -   " method=" (completing-read "Method: " '(("POST") ("GET")) nil t)
   5.371 -   " action=\"" (read-string "Action: ") "\""
   5.372 +   " " (if yahtml-prefer-upcases "METHOD" "method=")
   5.373 +   (completing-read "Method: " '(("POST") ("GET")) nil t)
   5.374 +   " " (if yahtml-prefer-upcases "ACTION" "action") "=\""
   5.375 +   (read-string "Action: ") "\""
   5.376     ))
   5.377  
   5.378  (defun yahtml:select ()
   5.379    "Add-in function for `select' input format"
   5.380    (setq yahtml-last-single-cmd "option")
   5.381 -  (concat " name=\"" (read-string "name: ") "\""))
   5.382 +  (concat " " (if yahtml-prefer-upcases "NAME" "name") "=\""
   5.383 +	  (read-string "name: ") "\""))
   5.384  
   5.385  (defun yahtml:ol ()
   5.386    (setq yahtml-last-single-cmd "li") "")
   5.387 @@ -616,11 +668,12 @@
   5.388  
   5.389  (defvar yahtml-input-types
   5.390    '(("text") ("password") ("checkbox") ("radio") ("submit")
   5.391 -    ("reset") ("image") ("hidden")))
   5.392 +    ("reset") ("image") ("hidden") ("file")))
   5.393  
   5.394  (defun yahtml:input ()
   5.395    "Add-in function for `input' form"
   5.396 -  (let (name type value checked (size "") (maxlength ""))
   5.397 +  (let ((size "") name type value checked (maxlength "")
   5.398 +	(l yahtml-prefer-upcases))
   5.399      (setq name (read-string "name: ")
   5.400  	  type (completing-read "type (default=text): "
   5.401  				yahtml-input-types nil t)
   5.402 @@ -629,11 +682,15 @@
   5.403  	(setq size (read-string "size: ")
   5.404  	      maxlength (read-string "maxlength: ")))
   5.405      (concat
   5.406 -     "name=\"" name "\""
   5.407 -     (if (string< "" type) (concat " type=\"" type "\""))
   5.408 -     (if (string< "" value) (concat " value=\"" value "\""))
   5.409 -     (if (string< "" size) (concat " size=\"" size "\""))
   5.410 -     (if (string< "" maxlength) (concat " maxlength=\"" maxlength "\""))
   5.411 +     (if l "NAME" "name") "=\"" name "\""
   5.412 +     (if (string< "" type)
   5.413 +	 (concat " " (if l "TYPE" "type") "=\"" type "\""))
   5.414 +     (if (string< "" value)
   5.415 +	 (concat " " (if l "VALUE" "value") "=\"" value "\""))
   5.416 +     (if (string< "" size)
   5.417 +	 (concat " " (if l "SIZE" "size") "=\"" size "\""))
   5.418 +     (if (string< "" maxlength)
   5.419 +	 (concat " " (if l "MAXLENGTH" "maxlength") "=\"" maxlength "\""))
   5.420      )))
   5.421  
   5.422  (defun yahtml:textarea ()
   5.423 @@ -641,8 +698,8 @@
   5.424    (interactive)
   5.425    (let (name rows cols)
   5.426      (setq name (read-string "Name: ")
   5.427 -	  cols (read-string "Columns: "
   5.428 -	  rows (read-string "Rows: ")))
   5.429 +	  cols (read-string "Columns: ")
   5.430 +	  rows (read-string "Rows: "))
   5.431      (concat
   5.432       (concat (if yahtml-prefer-upcases "NAME=" "name=")
   5.433  	     "\"" name "\"")
   5.434 @@ -657,24 +714,26 @@
   5.435    "Insert <TAG> </TAG> and put cursor inside of them."
   5.436    (interactive "P")
   5.437    (or tag
   5.438 -      (setq tag
   5.439 -	    (YaTeX-cplread-with-learning
   5.440 -	     (format "Tag %s(default %s): "
   5.441 -		     (if region-mode "region: " "") yahtml-last-typeface-cmd)
   5.442 -	     'yahtml-typeface-table 'yahtml-user-typeface-table
   5.443 -	     'yahtml-tmp-typeface-table)))
   5.444 +      (let ((completion-ignore-case t))
   5.445 +	(setq tag
   5.446 +	      (YaTeX-cplread-with-learning
   5.447 +	       (format "Tag %s(default %s): "
   5.448 +		       (if region-mode "region: " "") yahtml-last-typeface-cmd)
   5.449 +	       'yahtml-typeface-table 'yahtml-user-typeface-table
   5.450 +	       'yahtml-tmp-typeface-table))))
   5.451    (if (string= "" tag) (setq tag yahtml-last-typeface-cmd))
   5.452 -  (setq tag (funcall (if yahtml-prefer-upcases 'upcase 'downcase) tag)
   5.453 -	yahtml-last-typeface-cmd tag)
   5.454 +  (setq tag (or (cdr (assoc tag yahtml-typeface-table)) tag))
   5.455 +  (setq yahtml-last-typeface-cmd tag
   5.456 +	tag (funcall (if yahtml-prefer-upcases 'upcase 'downcase) tag))
   5.457    (if region-mode
   5.458        (if (if (string< "19" emacs-version) (mark t) (mark))
   5.459  	  (save-excursion
   5.460  	    (if (> (point) (mark)) (exchange-point-and-mark))
   5.461 -	    (insert "<" tag ">")
   5.462 +	    (insert (format "<%s%s>" tag (yahtml-addin tag)))
   5.463  	    (exchange-point-and-mark)
   5.464  	    (insert "</" tag ">"))
   5.465  	(message "No mark set now"))
   5.466 -    (insert (format "<%s> " tag))
   5.467 +    (insert (format "<%s%s>" tag (yahtml-addin tag)))
   5.468      (save-excursion (insert (format "</%s>" tag)))))
   5.469  
   5.470  (defun yahtml-insert-single (cmd)
   5.471 @@ -688,22 +747,30 @@
   5.472  		   (concat "(default " yahtml-last-single-cmd ")") ""))
   5.473         'yahtml-single-cmd-table 'yahtml-user-single-cmd-table
   5.474         'yahtml-tmp-single-cmd-table))))
   5.475 -  (if (string< "" cmd) (setq yahtml-last-single-cmd cmd))
   5.476 -  (setq cmd (funcall (if yahtml-prefer-upcases 'upcase 'downcase) cmd))
   5.477 +  (if (string= "" cmd) (setq cmd yahtml-last-single-cmd))
   5.478    (setq yahtml-last-single-cmd
   5.479 -	(or (cdr (assoc yahtml-last-single-cmd yahtml-single-cmd-table))
   5.480 -	    yahtml-last-single-cmd))
   5.481 -  (insert (format "<%s>" yahtml-last-single-cmd)))
   5.482 +	(or (cdr (assoc cmd yahtml-single-cmd-table)) cmd))
   5.483 +  (setq cmd (funcall (if yahtml-prefer-upcases 'upcase 'downcase)
   5.484 +		     yahtml-last-single-cmd))
   5.485 +  (insert (format "<%s>" cmd)))
   5.486  
   5.487  ;;; ---------- Jump ----------
   5.488  (defun yahtml-on-href-p ()
   5.489    "Check if point is on href clause."
   5.490 -  (let ((p (point)) cmd)
   5.491 +  (let ((p (point)) e cmd (case-fold-search t))
   5.492      (save-excursion
   5.493 -      (or (bobp) (skip-chars-backward "^ \t\n"))
   5.494 -      (and (looking-at "href\\s *=\\s *\"?\\([^\"> \t\n]+\\)\"?")
   5.495 +      (and (string= (YaTeX-inner-environment t) "a")
   5.496 +	   (save-excursion
   5.497 +	     (search-forward "</a>" nil t)
   5.498 +	     (setq e (point)))
   5.499 +	   (goto-char (get 'YaTeX-inner-environment 'point))
   5.500 +	   (search-forward "href" e t)
   5.501 +	   (search-forward "=" e t)
   5.502 +	   (skip-chars-forward " \t\n")
   5.503 +	   (looking-at "\"?\\([^\"> \t\n]+\\)\"?")
   5.504  	   (< p (match-end 0))
   5.505 -	   (YaTeX-match-string 1)))))
   5.506 +	   (YaTeX-match-string 1)
   5.507 +	   ))))
   5.508  
   5.509  (defun yahtml-netscape-sentinel (proc mes)
   5.510    (cond
   5.511 @@ -717,8 +784,9 @@
   5.512  	  (progn
   5.513  	    (message "Starting netscape...")
   5.514  	    (start-process
   5.515 -	     "browser" (process-buffer proc) shell-file-name "-c"
   5.516 -	     (format "%s %s" yahtml-www-browser
   5.517 +	     "browser" (process-buffer proc)
   5.518 +	     shell-file-name yahtml-shell-command-option
   5.519 +	     (format "%s \"%s\"" yahtml-www-browser
   5.520  		     (get 'yahtml-netscape-sentinel 'url)))
   5.521  	    (message "Starting netscape...Done")))
   5.522        (set-buffer cb)))))
   5.523 @@ -729,25 +797,28 @@
   5.524    "Call WWW Browser to see HREF."
   5.525    (let ((pb "* WWW Browser *") (cb (current-buffer)))
   5.526      (cond
   5.527 -     ((string-match "[Nn]etscape" yahtml-www-browser)
   5.528 +     ((and (string-match "[Nn]etscape" yahtml-www-browser)
   5.529 +	   (not (eq system-type 'windows-nt)))
   5.530        (if (get-buffer pb)
   5.531  	  (progn (set-buffer pb) (erase-buffer) (set-buffer cb)))
   5.532        (put 'yahtml-netscape-sentinel 'url href)
   5.533        (set-process-sentinel
   5.534         (setq yahtml-browser-process
   5.535  	     (start-process
   5.536 -	      "browser" pb shell-file-name "-c"
   5.537 -	      (format "%s -remote 'openURL(%s)'" yahtml-www-browser href)))
   5.538 +	      "browser" pb shell-file-name yahtml-shell-command-option ;"-c"
   5.539 +	      (format "%s -remote \"openURL(%s)\"" yahtml-www-browser href)))
   5.540         'yahtml-netscape-sentinel))
   5.541       ((and (string= "w3" yahtml-www-browser) (fboundp 'w3-fetch))
   5.542        (w3-fetch href))
   5.543       ((stringp yahtml-www-browser)
   5.544 -      (if (eq (process-status yahtml-browser-process) 'run)
   5.545 +      (if (and yahtml-browser-process
   5.546 +	       (eq (process-status yahtml-browser-process) 'run))
   5.547  	  (message "%s is already running" yahtml-www-browser)
   5.548  	(setq yahtml-browser-process
   5.549  	      (start-process
   5.550 -	       "browser" "* WWW Browser *" shell-file-name
   5.551 -	       (format "%s %s" yahtml-www-browser href)))))
   5.552 +	       "browser" "* WWW Browser *"
   5.553 +	       shell-file-name yahtml-shell-command-option
   5.554 +	       (format "%s \"%s\"" yahtml-www-browser href)))))
   5.555       (t
   5.556        (message "Sorry, jump across http is not supported.")))))
   5.557  
   5.558 @@ -756,7 +827,7 @@
   5.559    (let ((href (yahtml-on-href-p)) file name)
   5.560      (if href
   5.561  	(cond
   5.562 -	 ((string-match "^http:" href)
   5.563 +	 ((string-match "^\\(ht\\|f\\)tp:" href)
   5.564  	  (yahtml-browse-html href))
   5.565  	 (t (setq file (substring href 0 (string-match "#" href)))
   5.566  	    (if (string-match "#" href)
   5.567 @@ -782,13 +853,13 @@
   5.568  
   5.569  (defun yahtml-on-begend-p (&optional p)
   5.570    "Check if point is on begend clause."
   5.571 -  (let ((p (point)) cmd (case-fold-search t))
   5.572 +  (let ((p (or p (point))) cmd (case-fold-search t))
   5.573      (save-excursion
   5.574 -      (if p (goto-char p))
   5.575 +      (goto-char p)
   5.576        (if (equal (char-after (point)) ?<) (forward-char 1))
   5.577        (if (and (re-search-backward "<" nil t)
   5.578  	       (looking-at
   5.579 -		(concat "<\\(/?" yahtml-command-regexp "\\)\\b"))
   5.580 +		(concat "<\\(/?" yahtml-struct-name-regexp "\\)\\b"))
   5.581  	       (condition-case nil
   5.582  		   (forward-list 1)
   5.583  		 (error nil))
   5.584 @@ -852,7 +923,8 @@
   5.585  	(progn
   5.586  	  (message "Invoking %s %s..." yahtml-image-viewer image)
   5.587  	  (start-process
   5.588 -	   "Viewer" " * Image Viewer *" shell-file-name "-c"
   5.589 +	   "Viewer" " * Image Viewer *"
   5.590 +	   shell-file-name yahtml-shell-command-option ;"-c"
   5.591  	   (concat yahtml-image-viewer " " image))
   5.592  	  (message "Invoking %s %s...Done" yahtml-image-viewer image)))))
   5.593  
   5.594 @@ -902,9 +974,25 @@
   5.595  
   5.596  
   5.597  ;;; ---------- changing ----------
   5.598 +(defun yahtml-on-assignment-p ()
   5.599 +  "Return if current point is on parameter assignment.
   5.600 +If so, return parameter name, otherwise nil.
   5.601 +This function should be able to treat white spaces in value, but not yet."
   5.602 +  (let ((p (point)))
   5.603 +    (save-excursion
   5.604 +      (put 'yahtml-on-assignment-p 'region nil)
   5.605 +      (skip-chars-backward "^ \t")
   5.606 +      (and (looking-at "\\([A-Za-z0-9]+\\)\\s *=\\s *\"?\\([^ \t\"]+\\)\"?")
   5.607 +	   (< p (match-end 0))
   5.608 +	   (>= p (1- (match-beginning 2)))
   5.609 +	   (put 'yahtml-on-assignment-p 'region
   5.610 +		(cons (match-beginning 2) (match-end 2)))
   5.611 +	   (YaTeX-match-string 1)))))
   5.612 +
   5.613  (defun yahtml-change-begend ()
   5.614    (let ((tag (yahtml-on-begend-p))
   5.615  	(completion-ignore-case t)
   5.616 +	(case-fold-search t)
   5.617  	(p (point)) (q (make-marker))
   5.618  	(default (append yahtml-env-table yahtml-typeface-table))
   5.619  	(user (append yahtml-user-env-table yahtml-user-typeface-table))
   5.620 @@ -913,20 +1001,30 @@
   5.621      (cond
   5.622       (tag
   5.623        (cond
   5.624 -       ((and (equal tag "a")
   5.625 +       ((and (string-match "^a$" tag)
   5.626  	     (save-excursion
   5.627  	       (and
   5.628 -		(re-search-backward "<a" nil t)
   5.629 +		(re-search-backward "<a\\b" nil t)
   5.630  		(goto-char (match-end 0))
   5.631  		(skip-chars-forward " \t\n")
   5.632 +		(setq b1 (point))
   5.633 +		(search-forward ">" nil t)
   5.634 +		(setq e1 (match-beginning 0))
   5.635 +		(goto-char b1)
   5.636 +		(re-search-forward "href\\s *=" e1 t)
   5.637  		(>= p (point))
   5.638 -		(looking-at "href\\s *=\\s *\"?\\([^\"> \t\n]+\\)\"?")
   5.639 +		(goto-char (match-end 0))
   5.640 +		(skip-chars-forward " \t\n")
   5.641 +		(looking-at "\"?\\([^\"> \t\n]+\\)\"?")
   5.642  		(< p (match-end 0)))))
   5.643  	(setq b1 (match-beginning 1) e1 (match-end 1)
   5.644 +	      yahtml-completing-buffer (current-buffer)
   5.645  	      href (read-from-minibuffer
   5.646  		    "Change href to: " "" yahtml-url-completion-map))
   5.647  	(if (string< "" href)
   5.648  	    (progn
   5.649 +	      ;;(setq href  ;??
   5.650 +		;;    (if yahtml-prefer-upcases (upcase href) (downcase href)))
   5.651  	      (delete-region b1 e1)
   5.652  	      (goto-char b1)
   5.653  	      (insert href))))
   5.654 @@ -945,25 +1043,64 @@
   5.655  	      (progn
   5.656  		(set-marker q (point))
   5.657  		(goto-char p)))
   5.658 -	  (setq tag (YaTeX-cplread-with-learning
   5.659 -		     (format "Change `%s' to(default %s): "
   5.660 -			     tag yahtml-last-begend)
   5.661 -		     'default 'user 'tmp))
   5.662 +	  (setq tag (let ((completion-ignore-case t))
   5.663 +		      (YaTeX-cplread-with-learning
   5.664 +		       (format "Change `%s' to(default %s): "
   5.665 +			       tag yahtml-last-begend)
   5.666 +		       'default 'user 'tmp)))
   5.667  	  (delete-region (point) (progn (skip-chars-forward "^>") (point)))
   5.668  	  (if (string= "" tag) (setq tag yahtml-last-begend))
   5.669  	  (setq yahtml-last-begend
   5.670  		(or (cdr (assoc tag yahtml-env-table)) tag)
   5.671  		tag yahtml-last-begend)
   5.672 +	  (setq tag (if yahtml-prefer-upcases (upcase tag) (downcase tag)))
   5.673  	  (insert (format "%s%s" tag (yahtml-addin tag)))
   5.674  	  (goto-char q)
   5.675  	  (delete-region (point) (progn (skip-chars-forward "^>") (point)))
   5.676 -	  (insert tag))))))))
   5.677 +	  (insert tag))))
   5.678 +      t))))
   5.679 +
   5.680 +(defun yahtml-change-command ()
   5.681 +  (let ((p (point)) (case-fold-search t) cmd par new
   5.682 +	(beg (make-marker)) (end (make-marker)))
   5.683 +    (skip-chars-backward "^<")
   5.684 +    (if (and
   5.685 +	 (looking-at yahtml-command-regexp)
   5.686 +	 (progn
   5.687 +	   (set-marker beg (match-beginning 0))
   5.688 +	   (set-marker end (match-end 0))
   5.689 +	   t)				;for further work
   5.690 +	 (progn
   5.691 +	   (forward-char -1)
   5.692 +	   (condition-case nil
   5.693 +	       (forward-list 1)
   5.694 +	     (error nil))
   5.695 +	   (< p (point))))
   5.696 +	(progn
   5.697 +	  (goto-char p)
   5.698 +	  (if (setq par (yahtml-on-assignment-p))
   5.699 +	      (progn
   5.700 +		(setq new (yahtml-read-parameter par))
   5.701 +		(set-marker beg (car (get 'yahtml-on-assignment-p 'region)))
   5.702 +		(set-marker end (cdr (get 'yahtml-on-assignment-p 'region))))
   5.703 +	    (setq new
   5.704 +		  (YaTeX-cplread-with-learning
   5.705 +		   "Change form to: "
   5.706 +		   'yahtml-form-table 'yahtml-user-form-table
   5.707 +		   'yahtml-tmp-form-table)))
   5.708 +	  (delete-region beg end)
   5.709 +	  (goto-char beg)
   5.710 +	  (insert new)
   5.711 +	  t)
   5.712 +      (goto-char p)
   5.713 +      nil)))
   5.714  
   5.715  (defun yahtml-change-* ()
   5.716    "Change current position's HTML tag (set)."
   5.717    (interactive)
   5.718    (cond
   5.719     ((yahtml-change-begend))
   5.720 +   ((yahtml-change-command))
   5.721    ))
   5.722  
   5.723  ;;; ---------- commenting ----------
   5.724 @@ -977,34 +1114,93 @@
   5.725  
   5.726  
   5.727  
   5.728 +(defun yahtml-inner-environment-but (exclude &optional quick)
   5.729 +  "Return the inner environment but matches with EXCLUDE tag."
   5.730 +  (let (e)
   5.731 +    (save-excursion
   5.732 +      (while (and (setq e (YaTeX-inner-environment quick))
   5.733 +		  (string-match exclude e))
   5.734 +	(goto-char (get 'YaTeX-inner-environment 'point))))
   5.735 +    e))
   5.736 +
   5.737  ;;; ---------- filling ----------
   5.738 +
   5.739 +(defvar yahtml-saved-move-to-column (symbol-function 'move-to-column))
   5.740 +(defun yahtml-move-to-column (col &optional force)
   5.741 +  (beginning-of-line)
   5.742 +  (let ((ccol 0))
   5.743 +  (while (and (> col ccol) (not (eolp)))
   5.744 +    (if (eq (following-char) ?\<)
   5.745 +	(progn
   5.746 +	  (while (and (not (eq (following-char) ?\>))
   5.747 +		      (not (eolp)))
   5.748 +		   (forward-char))
   5.749 +	  (or (eolp) (forward-char)))
   5.750 +      (or (eolp) (forward-char))
   5.751 +      (if (eq (preceding-char) ?\t)
   5.752 +	  (let ((wd (- 8 (% (+ ccol 8) 8))))
   5.753 +	    (if (and force (< col (+ ccol wd)))
   5.754 +		(progn
   5.755 +		  (backward-char 1)
   5.756 +		  (insert-char ?\  (- col ccol))
   5.757 +		  (setq ccol col))
   5.758 +	      (setq ccol (+ ccol wd))))
   5.759 +	(setq ccol (1+ ccol)))
   5.760 +      (if (and YaTeX-japan
   5.761 +	       (string-match "[chj]" (char-category (preceding-char))))
   5.762 +	  (setq ccol (1+ ccol)))))
   5.763 +  (if (and force (> col ccol))
   5.764 +      (progn
   5.765 +	(insert-char ?\  (- col ccol))
   5.766 +	col)
   5.767 +    ccol)))
   5.768 +
   5.769  (defun yahtml-fill-paragraph (arg)
   5.770    (interactive "P")
   5.771 -  (let ((case-fold-search t) (p (point)))
   5.772 +  (let*((case-fold-search t) (p (point))
   5.773 +	(e (or (yahtml-inner-environment-but "^a\\b" t) "html"))
   5.774 +	(prep (string-match "^pre$" e))
   5.775 +	(ps1 (if prep (default-value 'paragraph-start)
   5.776 +	       paragraph-start))
   5.777 +	(ps2 (if prep (concat (default-value 'paragraph-start)
   5.778 +			      "\\|^\\s *</?pre>")
   5.779 +	       paragraph-start)))
   5.780      (save-excursion
   5.781 -      (fill-region-as-paragraph
   5.782 -       (progn (re-search-backward paragraph-start nil t)
   5.783 -	      (or (save-excursion
   5.784 -		    (goto-char (match-end 0))
   5.785 -		    (if (looking-at "[ \t]*$")
   5.786 -			(progn (forward-line 1) (point))))
   5.787 -		  (point)))
   5.788 -       (progn (goto-char p)
   5.789 -	      (re-search-forward paragraph-start nil t)
   5.790 -	      (match-beginning 0))))))
   5.791 +      (unwind-protect
   5.792 +	  (progn
   5.793 +	    (if prep
   5.794 +		(fset 'move-to-column 'yahtml-move-to-column))
   5.795 +	    (fill-region-as-paragraph
   5.796 +	     (progn (re-search-backward paragraph-start nil t)
   5.797 +		    (or (save-excursion
   5.798 +			  (goto-char (match-end 0))
   5.799 +			  (skip-chars-forward " \t>")
   5.800 +			  (if (looking-at "[ \t]*$")
   5.801 +			      (progn (forward-line 1) (point))))
   5.802 +			(point)))
   5.803 +	     (progn (goto-char p)
   5.804 +		    (re-search-forward ps2 nil t)
   5.805 +		    (match-beginning 0))))
   5.806 +	(fset 'move-to-column yahtml-saved-move-to-column)))))
   5.807 +
   5.808 +;(defun yahtml-indent-new-commnet-line ()
   5.809 +;  (unwind-protect
   5.810 +;      (progn
   5.811 +;	(fset 'move-to-column 'yahtml-move-to-column)
   5.812 +;	(apply 'YaTeX-saved-indent-new-comment-line (if soft (list soft))))
   5.813 +;    (fset 'move-to-column yahtml-saved-move-to-column)))
   5.814  
   5.815  ;;; 
   5.816  ;;; ---------- indentation ----------
   5.817  ;;; 
   5.818 -(defvar yahtml-hate-too-deep-indentation nil)
   5.819  (defun yahtml-indent-line ()
   5.820    (interactive)
   5.821 -  (let ((envs "[uod]l\\|table\\|t[rhd]\\|select\\|a\\b")
   5.822 +  (let ((envs "[uod]l\\|table\\|t[rhd]\\|select")
   5.823  	(itms "<\\(dt\\|dd\\|li\\|t[rdh]\\|option\\)>")
   5.824  	inenv p col peol (case-fold-search t))
   5.825      (save-excursion
   5.826        (beginning-of-line)
   5.827 -      (setq inenv (or (YaTeX-inner-environment) "html")
   5.828 +      (setq inenv (or (yahtml-inner-environment-but "^a\\b" t) "html")
   5.829  	    col (get 'YaTeX-inner-environment 'indent)
   5.830  	    p (get 'YaTeX-inner-environment 'point)
   5.831  	    op))
   5.832 @@ -1020,7 +1216,7 @@
   5.833  	   ((or (looking-at itms)
   5.834  		(and yahtml-hate-too-deep-indentation
   5.835  		     (looking-at (concat "<" envs))))
   5.836 -	    (YaTeX-reindent (+ col YaTeX-environment-indent)))
   5.837 +	    (YaTeX-reindent (+ col yahtml-environment-indent)))
   5.838  	   ((and (< p (point))
   5.839  		 (save-excursion
   5.840  		   (and
   5.841 @@ -1033,7 +1229,7 @@
   5.842  		    (setq col (current-column)))))
   5.843  	    (YaTeX-reindent col))
   5.844  	   (t
   5.845 -	    (YaTeX-reindent (+ col YaTeX-environment-indent)))))))
   5.846 +	    (YaTeX-reindent (+ col yahtml-environment-indent)))))))
   5.847        (and (bolp) (skip-chars-forward " \t"))
   5.848        (if (and (setq inenv (yahtml-on-begend-p))
   5.849  	       (string-match (concat "^\\(" envs "\\)") inenv))
   5.850 @@ -1075,19 +1271,33 @@
   5.851  ;     (t nil))))
   5.852  
   5.853  ;;; 
   5.854 -;;; ---------- Browsing ----------
   5.855 +;;; ---------- Lint and Browsing ----------
   5.856  ;;; 
   5.857  (defun yahtml-browse-menu ()
   5.858    "Browsing menu"
   5.859    (interactive)
   5.860 -  (message "B)rowse R)eload...")
   5.861 +  (message "J)weblint p)Browse R)eload...")
   5.862    (let ((c (char-to-string (read-char))))
   5.863      (cond
   5.864 -     ((string-match "[bj]" c)
   5.865 +     ((string-match "j" c)
   5.866 +      (yahtml-lint-buffer (current-buffer)))
   5.867 +     ((string-match "[bp]" c)
   5.868        (yahtml-browse-current-file))
   5.869       ((string-match "r" c)
   5.870        (yahtml-browse-reload)))))
   5.871  
   5.872 +(defvar yahtml-lint-buffer "*weblint*")
   5.873 +
   5.874 +(defun yahtml-lint-buffer (buf)
   5.875 +  "Call lint on buffer BUF."
   5.876 +  (interactive "bCall lint on buffer: ")
   5.877 +  (setq buf (get-buffer buf))
   5.878 +  (YaTeX-save-buffers)
   5.879 +  (YaTeX-typeset
   5.880 +   (concat yahtml-lint-program " "
   5.881 +	   (file-name-nondirectory (buffer-file-name buf)))
   5.882 +   yahtml-lint-buffer  "lint" "lint"))
   5.883 +
   5.884  (defun yahtml-file-to-url (file)
   5.885    "Convert local unix file name to URL.
   5.886  If no matches found in yahtml-path-url-alist, return raw file name."
   5.887 @@ -1095,6 +1305,10 @@
   5.888      (if (file-directory-p file)
   5.889  	(setq file (expand-file-name yahtml-directory-index file))
   5.890        (setq file (expand-file-name file)))
   5.891 +    (if (string-match "^[A-Za-z]:/" file)
   5.892 +	(progn
   5.893 +	  ;; (aset file 1 ?|) ;$B$3$l$OMW$i$J$$$i$7$$!D(B
   5.894 +	  (setq file (concat "///" file))))
   5.895      (while list
   5.896        (if (string-match (concat "^" (regexp-quote (car (car list)))) file)
   5.897  	  (setq url (cdr (car list))
   5.898 @@ -1158,7 +1372,7 @@
   5.899        (set-process-sentinel
   5.900         (setq yahtml-browser-process
   5.901  	     (start-process
   5.902 -	      "browser" pb shell-file-name "-c"
   5.903 +	      "browser" pb shell-file-name yahtml-shell-command-option ;"-c"
   5.904  	      (format "%s -remote 'reload'" yahtml-www-browser)))
   5.905         'yahtml-netscape-sentinel))
   5.906       (t
   5.907 @@ -1168,9 +1382,10 @@
   5.908  (defun yahtml-intelligent-newline (arg)
   5.909    "Intelligent newline for HTML"
   5.910    (interactive "P")
   5.911 -  (let ((env (downcase (or (YaTeX-inner-environment) "html"))) func)
   5.912 +  (let (env func)
   5.913 +    (end-of-line)
   5.914 +    (setq env (downcase (or (YaTeX-inner-environment) "html")))
   5.915      (setq func (intern-soft (concat "yahtml-intelligent-newline-" env)))
   5.916 -    (end-of-line)
   5.917      (newline)
   5.918      (if (and env func (fboundp func))
   5.919  	(funcall func))))
   5.920 @@ -1219,7 +1434,7 @@
   5.921  
   5.922  ;;; ---------- complete marks ----------
   5.923  (defun yahtml-complete-mark ()
   5.924 -  "Complete &gt, &lt, &asterisk, and &quote."
   5.925 +  "Complete &gt, &lt, &ampersand, and &quote."
   5.926    (interactive)
   5.927    (message "1:< 2:> 3:& 4:\"")
   5.928    (let ((c (read-char)))
   5.929 @@ -1231,7 +1446,30 @@
   5.930        (insert (format "&%s;" (nth c '("lt" "gt" "amp" "quot")))))))
   5.931  
   5.932  
   5.933 -;;; ---------- ----------
   5.934 +;;; ---------- jump to error line ----------
   5.935 +(defvar yahtml-error-line-regexp
   5.936 +  "^\\(.*\\)(\\([0-9]+\\)):"
   5.937 +  "*Regexp of error position which is produced by lint program.")
   5.938 +(defun yahtml-prev-error ()
   5.939 +  "Jump to previous error seeing lint buffer."
   5.940 +  (interactive)
   5.941 +  (or (get-buffer yahtml-lint-buffer)
   5.942 +      (error "No lint program ran."))
   5.943 +  (YaTeX-showup-buffer yahtml-lint-buffer nil t)
   5.944 +  (yahtml-jump-to-error-line))
   5.945 +
   5.946 +(defun yahtml-jump-to-error-line ()
   5.947 +  (interactive)
   5.948 +  (let ((p (point)) (e (point-end-of-line)))
   5.949 +    (end-of-line)
   5.950 +    (if (re-search-backward yahtml-error-line-regexp nil t)
   5.951 +	(let ((f (YaTeX-match-string 1))
   5.952 +	      (l (string-to-int (YaTeX-match-string 2))))
   5.953 +	  (forward-line -1)
   5.954 +	  (YaTeX-showup-buffer f nil t)
   5.955 +	  (goto-line l))
   5.956 +      (message "No line number usage"))))
   5.957 +    
   5.958  ;;; ---------- ----------
   5.959  
   5.960  ;;;
     6.1 --- a/yatex.el	Wed May 01 15:35:40 1996 +0000
     6.2 +++ b/yatex.el	Fri Jan 24 09:04:06 1997 +0000
     6.3 @@ -1,8 +1,8 @@
     6.4  ;;; -*- Emacs-Lisp -*-
     6.5  ;;; Yet Another tex-mode for emacs.
     6.6 -;;; yatex.el rev. 1.62
     6.7 -;;; (c )1991-1995 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
     6.8 -;;; Last modified Thu May  2 00:13:21 1996 on supra
     6.9 +;;; yatex.el rev. 1.63
    6.10 +;;; (c )1991-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
    6.11 +;;; Last modified Fri Jan 24 17:57:14 1997 on supra
    6.12  ;;; $Id$
    6.13  
    6.14  ;; This program is free software; you can redistribute it and/or modify
    6.15 @@ -20,7 +20,7 @@
    6.16  ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
    6.17  
    6.18  (require 'comment)
    6.19 -(defconst YaTeX-revision-number "1.62"
    6.20 +(defconst YaTeX-revision-number "1.63"
    6.21    "Revision number of running yatex.el"
    6.22  )
    6.23  
    6.24 @@ -258,7 +258,7 @@
    6.25      ("setcounter" 2) ("addtocounter" 2) ("stepcounter" 2)
    6.26      ("newcommand" 2) ("renewcommand" 2)
    6.27      ("setcounter" 2) ("newenvironment" 3) ("newtheorem" 2)
    6.28 -    ("cline") ("framebox") ("savebox") ("date") ("put") ("ref")
    6.29 +    ("cline") ("framebox") ("savebox" 2) ("date") ("put") ("ref")
    6.30      ("frac" 2) ("multicolumn" 3) ("shortstack")
    6.31      )
    6.32    "Default completion table for section-type completion."
    6.33 @@ -634,12 +634,14 @@
    6.34  	paragraph-separate YaTeX-paragraph-separate
    6.35  	indent-line-function 'YaTeX-indent-line
    6.36  	comment-start YaTeX-comment-prefix
    6.37 +	comment-end ""
    6.38  	;;comment-start-skip "[^\\\\]%+[ \t]*"
    6.39  	)
    6.40    (use-local-map YaTeX-mode-map)
    6.41    (if YaTeX-dos (setq YaTeX-saved-screen-height (screen-height)))
    6.42    (YaTeX-read-user-completion-table)
    6.43    (and (fboundp 'YaTeX-19-collect-macros) (YaTeX-19-collect-macros))
    6.44 +  (turn-on-auto-fill)			;1.63
    6.45    (run-hooks 'text-mode-hook 'yatex-mode-hook)
    6.46  )
    6.47  
    6.48 @@ -694,6 +696,7 @@
    6.49  (autoload 'YaTeX-main-file-p "yatexprc" "Check if the file is main." t)
    6.50  (autoload 'YaTeX-get-builtin "yatexprc" "Get %# built-in." t)
    6.51  (autoload 'YaTeX-system "yatexprc" "Call system command" t)
    6.52 +(autoload 'YaTeX-save-buffers "yatexprc" "Save buffers of same major mode" t)
    6.53  
    6.54  ;;autoload from yatexmth.el
    6.55  (autoload 'YaTeX-math-insert-sequence "yatexmth" "Image input." t)
    6.56 @@ -723,6 +726,9 @@
    6.57  (autoload 'YaTeX-display-hierarchy "yatexhie"
    6.58    "YaTeX document hierarchy browser" t)
    6.59  
    6.60 +;; autoload from yahtml.el
    6.61 +(autoload 'yahtml-inner-environment-but "yahtml" "yahtml internal func." t)
    6.62 +
    6.63  ;;;
    6.64  ;; YaTeX-mode functions
    6.65  ;;;
    6.66 @@ -822,7 +828,8 @@
    6.67  	(open
    6.68  	 (concat "^" (or (cdr (assq major-mode '((yahtml-mode . "<")))) "{")))
    6.69  	(close
    6.70 -	 (concat "^" (or (cdr(assq major-mode '((yahtml-mode . " >")))) "}"))))
    6.71 +	 (concat "^"
    6.72 +		 (or (cdr(assq major-mode '((yahtml-mode . "\n\t >")))) "}"))))
    6.73      (save-excursion
    6.74        (if quick
    6.75  	  (setq bound
    6.76 @@ -855,10 +862,7 @@
    6.77  (defun YaTeX-end-environment ()
    6.78    "Close opening environment"
    6.79    (interactive)
    6.80 -  (let ((curp (point))
    6.81 -	(env (YaTeX-inner-environment))
    6.82 -	(md (match-data)))
    6.83 -
    6.84 +  (let ((env (YaTeX-inner-environment)))
    6.85      (if (not env) (error "No premature environment")
    6.86        (save-excursion
    6.87  	(if (YaTeX-search-active-forward
    6.88 @@ -870,18 +874,14 @@
    6.89  		nil
    6.90  	      (error "end environment aborted."))))
    6.91        (message "")			;Erase (y or n) message.
    6.92 -      ;(insert "\\end{" env "}")
    6.93        (YaTeX-insert-struc 'end env)
    6.94 -      (store-match-data md)
    6.95 -      (setq curp (point))
    6.96 -      (goto-char (match-end 0))
    6.97 -      (if (pos-visible-in-window-p)
    6.98 -	  (sit-for (if YaTeX-dos 2 1))
    6.99 -	(message "Matches with %s at line %d"
   6.100 -		 (YaTeX-replace-format-args YaTeX-struct-begin env "" "")
   6.101 -		 (count-lines (point-min) (point))))
   6.102 -      (goto-char curp))
   6.103 -    )
   6.104 +      (save-excursion
   6.105 +	(goto-char (or (get 'YaTeX-inner-environment 'point) (match-end 0)))
   6.106 +	(if (pos-visible-in-window-p)
   6.107 +	    (sit-for (if YaTeX-dos 2 1))
   6.108 +	  (message "Matches with %s at line %d"
   6.109 +		   (YaTeX-replace-format-args YaTeX-struct-begin env "" "")
   6.110 +		   (count-lines (point-min) (point)))))))
   6.111  )
   6.112  
   6.113  ;;;VER2
   6.114 @@ -1210,7 +1210,11 @@
   6.115        (insert (or open "{") env (or close "}")))
   6.116       (t
   6.117        (insert (or open "{") (or close "}"))
   6.118 -      (forward-char -1))))
   6.119 +      (forward-char -1)
   6.120 +      (if (and (eq (char-after (point)) ?\})
   6.121 +	       (eq (char-after (- (point) 2)) ?\\ ))
   6.122 +	  (progn (insert "\\") (forward-char -1)))
   6.123 +      )))
   6.124  )
   6.125  
   6.126  (defun YaTeX-jmode ()
   6.127 @@ -1224,7 +1228,8 @@
   6.128      (canna-toggle-japanese-mode))
   6.129     ((and (boundp 'egg:*mode-on*) egg:*mode-on* egg:*input-mode*)
   6.130      (egg:toggle-egg-mode-on-off))
   6.131 -   ((and (fboundp 'skk-mode)) (skk-mode -1))
   6.132 +   ((and (fboundp 'skk-mode) (boundp 'skk-mode) skk-mode)
   6.133 +    (if (fboundp 'skk-mode-off) (skk-mode-off) (j-mode-off)))
   6.134     ((and (fboundp 'fep-force-off) (fep-force-off))))
   6.135  )
   6.136  
   6.137 @@ -1556,28 +1561,28 @@
   6.138  	      nil)))))
   6.139  )
   6.140  
   6.141 -;(defun YaTeX-goto-corresponding-file (&optional other)
   6.142 -;  "Visit or switch buffer of corresponding file,
   6.143 -;looking at \\input or \\include or \includeonly on current line."
   6.144 -;  (if (not (YaTeX-on-includes-p)) nil
   6.145 -;    (let ((parent buffer-file-name) input-file)
   6.146 -;      (save-excursion
   6.147 -;	(if (search-forward "{" (point-end-of-line) t)
   6.148 -;	    nil
   6.149 -;	  (skip-chars-backward "^,{"))
   6.150 -;	(setq input-file
   6.151 -;	      (buffer-substring
   6.152 -;	       (point) (progn (skip-chars-forward "^ ,}") (point))))
   6.153 -;	(if (not (string-match "\\.\\(tex\\|sty\\)$" input-file))
   6.154 -;	    (setq input-file (concat input-file ".tex"))))
   6.155 -;      (cond
   6.156 -;       (other (YaTeX-switch-to-buffer-other-window input-file))
   6.157 -;       ((get-file-buffer input-file) (goto-buffer-window input-file))
   6.158 -;       (t (YaTeX-switch-to-buffer input-file)))
   6.159 -;      (or (YaTeX-get-builtin "!")
   6.160 -;	  YaTeX-parent-file
   6.161 -;	  (setq YaTeX-parent-file parent))))
   6.162 -;)
   6.163 +(defun YaTeX-goto-corresponding-file (&optional other)
   6.164 +  "Visit or switch buffer of corresponding file,
   6.165 +looking at \\input or \\include or \includeonly on current line."
   6.166 +  (if (not (YaTeX-on-includes-p)) nil
   6.167 +    (let ((parent buffer-file-name) input-file)
   6.168 +      (save-excursion
   6.169 +	(if (search-forward "{" (point-end-of-line) t)
   6.170 +	    nil
   6.171 +	  (skip-chars-backward "^,{"))
   6.172 +	(setq input-file
   6.173 +	      (buffer-substring
   6.174 +	       (point) (progn (skip-chars-forward "^ ,}") (point))))
   6.175 +	(if (not (string-match "\\.\\(tex\\|sty\\)$" input-file))
   6.176 +	    (setq input-file (concat input-file ".tex"))))
   6.177 +      (cond
   6.178 +       (other (YaTeX-switch-to-buffer-other-window input-file))
   6.179 +       ((get-file-buffer input-file) (goto-buffer-window input-file))
   6.180 +       (t (YaTeX-switch-to-buffer input-file)))
   6.181 +      (or (YaTeX-get-builtin "!")
   6.182 +	  YaTeX-parent-file
   6.183 +	  (setq YaTeX-parent-file parent))))
   6.184 +)
   6.185  
   6.186  (defun YaTeX-goto-corresponding-BEGIN-END ()
   6.187    (if (not (YaTeX-on-BEGIN-END-p)) nil
   6.188 @@ -1619,11 +1624,11 @@
   6.189  ")
   6.190  
   6.191  (defvar YaTeX-processed-file-regexp-alist-default
   6.192 -  '(("\\\\epsfile{[^},]*file=\\([^,}. ]+\\)\\(\\.e?ps\\)?[^}]*}" 1)
   6.193 -    ("\\\\epsfig{[^},]*fi\\(le\\|gure\\)=\\([^,}. ]+\\)\\(\\.e?ps\\)?[^}]*}" 2)
   6.194 -    ("\\\\postscriptbox{[^}]*}{[^}]*}{\\([^} ]+\\)\\(\\.e?ps\\)?}" 1)
   6.195 -    ("\\\\\\(epsfbox\\|includegraphics\\){\\([^} ]+\\)\\(\\.e?ps\\)?}" 2)
   6.196 -    ("\\\\\\(include\\|input\\){\\([^},.]+\\)\\(\\.\\(tex\\|sty\\)\\)?}" 2 t)
   6.197 +  '(("\\\\epsfile{[^},]*file=\\(\\([^,} ]*/\\)?[^,}. ]+\\)\\(\\.e?ps\\)?[^}]*}" 1)
   6.198 +    ("\\\\epsfig{[^},]*fi\\(le\\|gure\\)=\\(\\([^,} ]*/\\)?[^,}. ]+\\)\\(\\.e?ps\\)?[^}]*}" 2)
   6.199 +    ("\\\\postscriptbox{[^}]*}{[^}]*}{\\(\\([^,} ]*/\\)?[^}. ]+\\)\\(\\.e?ps\\)?}" 1)
   6.200 +    ("\\\\\\(epsfbox\\|includegraphics\\){\\(\\([^,} ]*/\\)?[^} ]+\\)\\(\\.e?ps\\)?}" 2)
   6.201 +    ("\\\\\\(psbox\\)\\(\\[[^]]+\\]\\)?{\\(\\([^,} ]*/\\)?[^} ]+\\)\\(\\.e?ps\\)}" 3) ;\psbox[options...]{hoge.eps} (97/1/11)
   6.202      )
   6.203    "See the documentation of YaTeX-processed-file-regexp-alist."
   6.204  )
   6.205 @@ -1674,7 +1679,8 @@
   6.206  			      (cdr (assoc cmd YaTeX-file-processor-alist))))
   6.207  	      (while plist		;if processor is not specified
   6.208  		(setq ext (cdr (car plist)))
   6.209 -		(if (file-exists-p (concat file ext))
   6.210 +		(if (and (string< "" (concat file ext))
   6.211 +			 (file-exists-p (concat file ext)))
   6.212  		      (setq cmd (car (car plist))
   6.213  			    src (concat file ext) plist nil))
   6.214  		(setq plist (cdr plist)))
   6.215 @@ -1702,7 +1708,7 @@
   6.216  		 ((symbolp cmd)
   6.217  		  (cond
   6.218  		   ((symbol-function cmd)
   6.219 -		    (funcall cmd src)))
   6.220 +		    (funcall cmd src other)))
   6.221  		  t)))))))
   6.222  )
   6.223  
   6.224 @@ -1729,7 +1735,8 @@
   6.225        (if (and
   6.226  	   (looking-at (concat YaTeX-ec-regexp "\\(" command "\\)"
   6.227  			       "\\(\\(\\[[^]]+\\]\\)*\\)"	;optional arg
   6.228 -			       "[ \t\n\r]*{[^}]+}")) ;arg braces
   6.229 +			       ;"[ \t\n\r]*{[^}]+}")) ;arg braces
   6.230 +			       "[ \t\n\r]*{[^}]*}")) ;arg braces
   6.231  	   (not (YaTeX-lookup-table
   6.232  		 (setq word (YaTeX-match-string 1)) 'singlecmd)))
   6.233  	  (progn
   6.234 @@ -1813,8 +1820,8 @@
   6.235    (cond
   6.236     ((YaTeX-goto-corresponding-label arg))
   6.237     ((YaTeX-goto-corresponding-environment))
   6.238 +   ((YaTeX-goto-corresponding-file arg))
   6.239     ((YaTeX-goto-corresponding-file-processor arg))
   6.240 -   ;;((YaTeX-goto-corresponding-file))
   6.241     ((YaTeX-goto-corresponding-BEGIN-END))
   6.242     ((and (string-match
   6.243  	  YaTeX-equation-env-regexp	;to delay loading
   6.244 @@ -2368,11 +2375,11 @@
   6.245  (defun YaTeX-remove-trailing-comment (start end)
   6.246    "Remove trailing comment from START to end."
   6.247    (save-excursion
   6.248 -    (let ((trcom (concat YaTeX-comment-prefix "+$")))
   6.249 +    (let ((trcom (concat YaTeX-comment-prefix "$")))
   6.250        (goto-char start)
   6.251        (while (re-search-forward trcom end t)
   6.252  	(if (/= (char-after (1- (match-beginning 0))) ?\\ )
   6.253 -	    (replace-match "")))))
   6.254 +	    (replace-match "\\1")))))
   6.255  )
   6.256  
   6.257  (defun YaTeX-get-item-info (&optional recent thisenv)
   6.258 @@ -2539,14 +2546,20 @@
   6.259    "Tuned `indent-new-comment-line' function for yatex.
   6.260  See the documentation of `YaTeX-saved-indent-new-comment-line'."
   6.261    (cond
   6.262 -   ((or (not (eq major-mode 'yatex-mode))
   6.263 +   ((or (not (memq major-mode '(yatex-mode yahtml-mode)))
   6.264  	(string-match
   6.265  	 "document"
   6.266  	 (or (and (boundp 'inenv) inenv)
   6.267  	     (or (YaTeX-inner-environment t) "document"))))
   6.268      (apply 'YaTeX-saved-indent-new-comment-line (if soft (list soft))))
   6.269 +;   ((and (eq major-mode 'yahtml-mode)
   6.270 +;	 (string-match
   6.271 +;	  "^[Pp][Rr][Ee]" (yahtml-inner-environment-but "^[Aa]\\b" t)))
   6.272 +;    (yahtml-indent-new-commnet-line))
   6.273 +   ((YaTeX-in-math-mode-p) nil)		;1996/12/30
   6.274     (t (let (fill-prefix)
   6.275 -	(apply 'YaTeX-saved-indent-new-comment-line (if soft (list soft)))))))
   6.276 +	(apply 'YaTeX-saved-indent-new-comment-line (if soft (list soft))))))
   6.277 +)
   6.278  
   6.279  (defun YaTeX-fill-* ()
   6.280    "Fill paragraph according to its condition."
   6.281 @@ -2750,7 +2763,7 @@
   6.282      (if YaTeX-user-table-is-read nil
   6.283        (message "Loading user completion table")
   6.284        (if (file-exists-p user-table) (load-file user-table)
   6.285 -	(message "Personal completion table not found.")))
   6.286 +	(message "Welcome to the field of YaTeX.  I'm glad to see you!")))
   6.287      (setq YaTeX-user-table-is-read t)
   6.288      (cond
   6.289       ((file-exists-p local-table)
     7.1 --- a/yatex.new	Wed May 01 15:35:40 1996 +0000
     7.2 +++ b/yatex.new	Fri Jan 24 09:04:06 1997 +0000
     7.3 @@ -1,6 +1,18 @@
     7.4  	What's new in YaTeX
     7.5  	野鳥/yahtml - 各バージョンの変更点について
     7.6  
     7.7 +1.63	数式モードに入ったら漢字モードをOFFにするようにした(本来1.62)
     7.8 +	yahtmlで [prefix] t j で(j)weblintを呼ぶようにした。
     7.9 +	yahtmlのブラウザ起動は、[prefix] t p に変更。
    7.10 +	yahtmlで、<pre>の中でfillした場合、<a>タグなどを文字数にカウント
    7.11 +	せずにfillするようにした。
    7.12 +	LaTeX2eのフォント設定マクロを正しくhilitするようにした。
    7.13 +	yahtmlで src="??" や align="???" などのchangeができるようにした。
    7.14 +	yahtmlのNAME補完のときにauto-hilightが効かないようにした。
    7.15 +	数式モードのときはauto-fillが効かないようにした。
    7.16 +	\のあとに{を入れたときは\}を入れるようにした。
    7.17 +	yahtmlでブラウザにIEを指定したときの不具合を修正。
    7.18 +
    7.19  1.62	\ref の引数が二行に渡る時行末に%を付けるようにした
    7.20  	yahtmlでおまかせ改行が不必要に起動するのを修正
    7.21  	href の補完文字列に # が含まれる時は name を補完
     8.1 --- a/yatex19.el	Wed May 01 15:35:40 1996 +0000
     8.2 +++ b/yatex19.el	Fri Jan 24 09:04:06 1997 +0000
     8.3 @@ -1,7 +1,7 @@
     8.4  ;;; -*- Emacs-Lisp -*-
     8.5  ;;; YaTeX facilities for Emacs 19
     8.6 -;;; (c )1994-1995 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
     8.7 -;;; Last modified Thu Mar 14 10:51:00 1996 on supra
     8.8 +;;; (c )1994-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
     8.9 +;;; Last modified Fri Jan 24 18:00:49 1997 on supra
    8.10  ;;; $Id$
    8.11  
    8.12  ;;; とりあえず hilit19 を使っている時に色が付くようにして
    8.13 @@ -270,9 +270,10 @@
    8.14  
    8.15      ;; (re-)define new commands/environments/counters
    8.16      (YaTeX-19-region-section-type
    8.17 -     "\\\\\\(re\\)?new\\(environment\\|command\\|theorem\\){" defun)
    8.18 +     "\\\\\\(re\\)?new\\(environment\\|command\\|theorem\\|length\\|counter\\){"
    8.19 +     defun)
    8.20      (YaTeX-19-region-section-type
    8.21 -     "\\\\\\(re\\)?new\\(length\\|counter\\){" define)
    8.22 +     "\\\\textbf{" bold)
    8.23  
    8.24      ;; various declarations/definitions
    8.25      (YaTeX-19-region-section-type
    8.26 @@ -342,6 +343,9 @@
    8.27  ;;; セクションコマンドを、構造レベルの高さに応じて色の濃度を変える
    8.28  ;;; 背景が黒でないと何が嬉しいのか分からないに違いない.
    8.29  ;;; もしかして白地の時は構造レベルに応じて色を明るくしたほうが良いのか?
    8.30 +;(if (fboundp 'win32-color-values)
    8.31 +;    (fset 'x-color-values 'win32-color-values))
    8.32 +
    8.33  (cond
    8.34   ((and (featurep 'hilit19) (fboundp 'x-color-values))
    8.35    (let*((sectface
     9.1 --- a/yatexadd.el	Wed May 01 15:35:40 1996 +0000
     9.2 +++ b/yatexadd.el	Fri Jan 24 09:04:06 1997 +0000
     9.3 @@ -1,8 +1,8 @@
     9.4  ;;; -*- Emacs-Lisp -*-
     9.5  ;;; YaTeX add-in functions.
     9.6  ;;; yatexadd.el rev.13
     9.7 -;;; (c )1991-1995 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
     9.8 -;;; Last modified Sat Apr 27 21:38:36 1996 on NSR
     9.9 +;;; (c )1991-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
    9.10 +;;; Last modified Fri Jan 24 18:00:45 1997 on supra
    9.11  ;;; $Id$
    9.12  
    9.13  ;;;
    9.14 @@ -91,6 +91,7 @@
    9.15  
    9.16  (defun YaTeX:table ()
    9.17    "YaTeX add-in function for table environment."
    9.18 +  (setq env-name "tabular")
    9.19    (YaTeX:read-position "htbp")
    9.20  )
    9.21  
    9.22 @@ -388,16 +389,25 @@
    9.23  (defun YaTeX::ref (argp &optional labelcmd refcmd)
    9.24    (cond
    9.25     ((= argp 1)
    9.26 -    (save-excursion
    9.27 -      (let ((lnum 0) e0 label label-list (buf (current-buffer))
    9.28 -	    (labelcmd (or labelcmd "label")) (refcmd (or refcmd "ref"))
    9.29 -	    (p (point)) initl line)
    9.30 -	(goto-char (point-min))
    9.31 -	(message "Collecting labels...")
    9.32 -	(save-window-excursion
    9.33 -	  (YaTeX-showup-buffer
    9.34 -	   YaTeX-label-buffer (function (lambda (x) (window-width x))))
    9.35 +    (let ((lnum 0) e0 label label-list (buf (current-buffer))
    9.36 +	  (labelcmd (or labelcmd "label")) (refcmd (or refcmd "ref"))
    9.37 +	  (p (point)) initl line cf)
    9.38 +      (message "Collecting labels...")
    9.39 +      (save-window-excursion
    9.40 +	(YaTeX-showup-buffer
    9.41 +	 YaTeX-label-buffer (function (lambda (x) (window-width x))))
    9.42 +	(if (fboundp 'select-frame) (setq cf (selected-frame)))
    9.43 +	(if (eq (window-buffer (minibuffer-window)) buf)
    9.44 +	    (progn
    9.45 +	      (other-window 1)
    9.46 +	      (setq buf (current-buffer))
    9.47 +	      (set-buffer buf)
    9.48 +	      ;(message "cb=%s" buf)(sit-for 3)
    9.49 +	      ))
    9.50 +	(save-excursion
    9.51 +	  (goto-char (point-min))
    9.52  	  (with-output-to-temp-buffer YaTeX-label-buffer
    9.53 +	    (princ (format "=== LABELS in [%s] ===\n" (buffer-name buf)))
    9.54  	    (while (YaTeX-re-search-active-forward
    9.55  		    (concat "\\\\" labelcmd "\\b")
    9.56  		    (regexp-quote YaTeX-comment-prefix) nil t)
    9.57 @@ -422,21 +432,24 @@
    9.58  	    (princ YaTeX-label-menu-any)
    9.59  	    );with
    9.60  	  (goto-char p)
    9.61 +	  (or initl (setq initl lnum))
    9.62  	  (message "Collecting %s...Done" labelcmd)
    9.63 +	  (if (fboundp 'select-frame) (select-frame cf))
    9.64  	  (YaTeX-showup-buffer YaTeX-label-buffer nil t)
    9.65  	  (YaTeX::label-setup-key-map)
    9.66  	  (setq truncate-lines t)
    9.67  	  (setq buffer-read-only t)
    9.68  	  (use-local-map YaTeX-label-select-map)
    9.69  	  (message YaTeX-label-guide-msg)
    9.70 -	  (goto-line (or initl lnum))	;goto recently defined label line
    9.71 +	  (goto-line (1+ initl)) ;goto recently defined label line
    9.72  	  (unwind-protect
    9.73  	      (progn
    9.74  		(recursive-edit)
    9.75  		(set-buffer (get-buffer YaTeX-label-buffer)) ;assertion
    9.76  		(beginning-of-line)
    9.77 -		(setq line (count-lines (point-min)(point)))
    9.78 +		(setq line (1- (count-lines (point-min)(point))))
    9.79  		(cond
    9.80 +		 ((= line -1) (setq label ""))
    9.81  		 ((= line lnum) (setq label (YaTeX-label-other)))
    9.82  		 ((= line (1+ lnum))
    9.83  		  (save-excursion
    10.1 --- a/yatexenv.el	Wed May 01 15:35:40 1996 +0000
    10.2 +++ b/yatexenv.el	Fri Jan 24 09:04:06 1997 +0000
    10.3 @@ -1,8 +1,8 @@
    10.4  ;;; -*- Emacs-Lisp -*-
    10.5  ;;; YaTeX environment-specific functions.
    10.6  ;;; yatexenv.el
    10.7 -;;; (c ) 1994, 1995 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
    10.8 -;;; Last modified Mon Apr 15 16:24:00 1996 on supra
    10.9 +;;; (c ) 1994-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
   10.10 +;;; Last modified Fri Jan 24 18:00:38 1997 on supra
   10.11  ;;; $Id$
   10.12  
   10.13  ;;;
   10.14 @@ -74,7 +74,7 @@
   10.15    (cond
   10.16     ((YaTeX-quick-in-environment-p '("tabular" "tabular*" "array" "array*"))
   10.17      (YaTeX-array-what-column))
   10.18 -   (t (message "Not in array/tabuar environment.")))
   10.19 +   (t (message "Not in array/tabular environment.")))
   10.20  )
   10.21  
   10.22  (defun YaTeX-tabular-parse-format (&optional tabular*)
    11.1 --- a/yatexhks.el	Wed May 01 15:35:40 1996 +0000
    11.2 +++ b/yatexhks.el	Fri Jan 24 09:04:06 1997 +0000
    11.3 @@ -32,6 +32,8 @@
    11.4    '(lambda () (interactive) (YaTeX-make-singlecmd "leftarrow")))
    11.5  (define-key YaTeX-user-extensional-map "l"
    11.6    '(lambda () (interactive) (YaTeX-make-section nil nil nil "label")))
    11.7 +(define-key YaTeX-user-extensional-map "f"
    11.8 +  '(lambda () (interactive) (YaTeX-make-section nil nil nil "frac")))
    11.9  (define-key YaTeX-user-extensional-map "S"
   11.10    '(lambda () (interactive) (YaTeX-make-section nil nil nil "setlength")))
   11.11  (define-key YaTeX-user-extensional-map "b"
    12.1 --- a/yatexmth.el	Wed May 01 15:35:40 1996 +0000
    12.2 +++ b/yatexmth.el	Fri Jan 24 09:04:06 1997 +0000
    12.3 @@ -1,8 +1,8 @@
    12.4  ;;; -*- Emacs-Lisp -*-
    12.5  ;;; YaTeX math-mode-specific functions.
    12.6  ;;; yatexmth.el rev.4
    12.7 -;;; (c )1993-1995 by HIROSE Yuuji [yuuji@ae.keio.ac.jp]
    12.8 -;;; Last modified Tue Apr 23 23:17:24 1996 on inspire
    12.9 +;;; (c )1993-1997 by HIROSE Yuuji [yuuji@ae.keio.ac.jp]
   12.10 +;;; Last modified Fri Jan 24 18:00:08 1997 on supra
   12.11  ;;; $Id$
   12.12  
   12.13  ;;; [Customization guide]
   12.14 @@ -541,6 +541,7 @@
   12.15  	(setq list (cdr list)))
   12.16        (goto-line 4)
   12.17        (use-local-map YaTeX-math-menu-map)
   12.18 +      (setq buffer-read-only t)
   12.19        (unwind-protect
   12.20  	  (recursive-edit)
   12.21  	(skip-chars-backward "^ \t\n")
   12.22 @@ -597,9 +598,14 @@
   12.23    (let*((key (or initial "")) regkey str  last-char list i
   12.24  	(case-fold-search nil) match sign
   12.25  	(this-key (char-to-string last-command-char))
   12.26 -	(alist (symbol-value (cdr (assoc this-key YaTeX-math-key-list))))
   12.27 +	(alistsym (cdr (assoc this-key YaTeX-math-key-list)))
   12.28 +	(alistname (symbol-name alistsym))
   12.29 +	(alist (symbol-value alistsym))
   12.30  	(n (length alist)) (beg (point)) result)
   12.31      (if initial (insert YaTeX-ec (car (cdr (assoc initial alist)))))
   12.32 +    (if (string-match "^YaTeX-" alistname)
   12.33 +	(setq alistname (substring alistname (length "YaTeX-"))))
   12.34 +    (setq alistname (substring alistname 0 (string-match "-" alistname)))
   12.35      (setq result
   12.36  	  (catch 'complete
   12.37  	    (if (and (not force)
   12.38 @@ -608,7 +614,8 @@
   12.39  		       (not YaTeX-math-mode)))
   12.40  		(throw 'complete 'escape));this tag should be exit, but...
   12.41  	    (while t
   12.42 -	      (message "Sequence%s: %s"
   12.43 +	      (message "%ssequence%s: %s"
   12.44 +		       (if YaTeX-simple-messages "" (concat alistname " "))
   12.45  		       (if YaTeX-simple-messages "" "(TAB for menu)") key)
   12.46  	      (setq last-char (read-char)
   12.47  		    key (concat key (char-to-string last-char))
    13.1 --- a/yatexprc.el	Wed May 01 15:35:40 1996 +0000
    13.2 +++ b/yatexprc.el	Fri Jan 24 09:04:06 1997 +0000
    13.3 @@ -1,8 +1,8 @@
    13.4  ;;; -*- Emacs-Lisp -*-
    13.5  ;;; YaTeX process handler.
    13.6  ;;; yatexprc.el
    13.7 -;;; (c )1993-1995 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
    13.8 -;;; Last modified Fri Mar 29 00:15:35 1996 on inspire
    13.9 +;;; (c )1993-1997 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
   13.10 +;;; Last modified Fri Jan 24 17:59:44 1997 on supra
   13.11  ;;; $Id$
   13.12  
   13.13  (require 'yatex)
   13.14 @@ -33,16 +33,20 @@
   13.15    (modify-syntax-entry ?\] "w" YaTeX-typeset-buffer-syntax)
   13.16  )
   13.17  
   13.18 -(defun YaTeX-typeset (command buffer)
   13.19 +(defun YaTeX-typeset (command buffer &optional prcname modename)
   13.20    "Execute jlatex (or other) to LaTeX typeset."
   13.21    (interactive)
   13.22    (save-excursion
   13.23 -    (let ((p (point)) (window (selected-window)) execdir (cb (current-buffer)))
   13.24 +    (let ((p (point)) (window (selected-window)) execdir (cb (current-buffer))
   13.25 +	  (map YaTeX-typesetting-mode-map))
   13.26        (if (and YaTeX-typeset-process
   13.27  	       (eq (process-status YaTeX-typeset-process) 'run))
   13.28  	  ;; if tex command is halting.
   13.29  	  (YaTeX-kill-typeset-process YaTeX-typeset-process))
   13.30 -      (YaTeX-visit-main t) ;;execution directory
   13.31 +      (YaTeX-put-nonstopmode)
   13.32 +      (setq prcname (or prcname "LaTeX")
   13.33 +	    modename (or modename "typeset"))
   13.34 +      (if (eq major-mode 'yatex-mode) (YaTeX-visit-main t)) ;;execution dir
   13.35        (setq execdir default-directory)
   13.36        ;;Select lower-most window if there are more than 2 windows and
   13.37        ;;typeset buffer not seen.
   13.38 @@ -54,23 +58,24 @@
   13.39        (erase-buffer)
   13.40        (cond
   13.41         (YaTeX-dos			;if MS-DOS
   13.42 -	(YaTeX-put-nonstopmode)
   13.43 +	;(YaTeX-put-nonstopmode)
   13.44  	(call-process
   13.45  	 shell-file-name nil buffer nil YaTeX-shell-command-option command)
   13.46 -	(YaTeX-remove-nonstopmode))
   13.47 +	;(YaTeX-remove-nonstopmode)
   13.48 +	)
   13.49         (t				;if UNIX
   13.50  	(set-process-buffer
   13.51  	 (setq YaTeX-typeset-process
   13.52 -	       (start-process "LaTeX" buffer shell-file-name
   13.53 +	       (start-process prcname buffer shell-file-name
   13.54  			      YaTeX-shell-command-option command))
   13.55  	 (get-buffer buffer))
   13.56  	(set-process-sentinel YaTeX-typeset-process 'YaTeX-typeset-sentinel)))
   13.57        (message (format "Calling `%s'..." command))
   13.58        (setq YaTeX-current-TeX-buffer (buffer-name))
   13.59 -      (use-local-map YaTeX-typesetting-mode-map)
   13.60 +      (use-local-map map)		;map may be localized
   13.61        (set-syntax-table YaTeX-typeset-buffer-syntax)
   13.62 -      (setq mode-name "typeset")
   13.63 -      (if YaTeX-typeset-process		; if process is running (maybe on UNIX)
   13.64 +      (setq mode-name modename)
   13.65 +      (if YaTeX-typeset-process		;if process is running (maybe on UNIX)
   13.66  	  (cond ((boundp 'MULE)
   13.67  		 (set-current-process-coding-system
   13.68  		  YaTeX-latex-message-code YaTeX-coding-system))
   13.69 @@ -92,7 +97,8 @@
   13.70  	(goto-char (point-max))
   13.71  	(recenter -1))
   13.72        (select-window window)
   13.73 -      (switch-to-buffer cb)))
   13.74 +      (switch-to-buffer cb)
   13.75 +      (YaTeX-remove-nonstopmode)))
   13.76  )
   13.77  
   13.78  (defun YaTeX-typeset-sentinel (proc mes)
   13.79 @@ -114,14 +120,14 @@
   13.80  		 ;;(YaTeX-showup-buffer pbuf nil t)
   13.81                   (goto-char (point-max))
   13.82  		 (if pwin (recenter -3))
   13.83 -                 (insert ?\n "latex typesetting " mes)
   13.84 +                 (insert ?\n mode-name " " mes)
   13.85                   (forward-char -1)
   13.86                   (insert " at " (substring (current-time-string) 0 -5) "\n")
   13.87                   (forward-char 1)
   13.88                   (setq mode-line-process
   13.89                         (concat ": "
   13.90                                 (symbol-name (process-status proc))))
   13.91 -		 (message "latex typesetting %s."
   13.92 +		 (message mode-name " %s."
   13.93  			  (if (eq (process-status proc) 'exit)
   13.94  			      "done" "ceased"))
   13.95                   ;; If buffer and mode line shows that the process
   13.96 @@ -226,7 +232,8 @@
   13.97  )
   13.98  
   13.99  (defun YaTeX-typeset-buffer ()
  13.100 -  "Typeset whole buffer.  If %#! usage says other buffer is main text,
  13.101 +  "Typeset whole buffer.
  13.102 +If %#! usage says other buffer is main text,
  13.103  visit main buffer to confirm if its includeonly list contains current
  13.104  buffer's file.  And if it doesn't contain editing text, ask user which
  13.105  action wants to be done, A:Add list, R:Replace list, %:comment-out list."
  13.106 @@ -382,7 +389,8 @@
  13.107         (YaTeX-dos			;if MS-DOS
  13.108  	(send-string-to-terminal "\e[2J\e[>5h") ;CLS & hide cursor
  13.109  	(call-process shell-file-name "con" "*dvi-preview*" nil
  13.110 -		      YaTeX-shell-command-option preview-command preview-file)
  13.111 +		      YaTeX-shell-command-option
  13.112 +		      (concat preview-command preview-file))
  13.113  	(send-string-to-terminal "\e[>5l") ;show cursor
  13.114  	(redraw-display))
  13.115         (t				;if UNIX
  13.116 @@ -478,7 +486,7 @@
  13.117      (select-window typeset-win)
  13.118      (skip-chars-backward "0-9")
  13.119      (recenter (/ (window-height) 2))
  13.120 -    (sit-for 3)
  13.121 +    (sit-for 1)
  13.122      (goto-char (match-beginning 0))
  13.123      (select-window error-win))
  13.124  )
  13.125 @@ -565,18 +573,19 @@
  13.126  )
  13.127        
  13.128  (defun YaTeX-put-nonstopmode ()
  13.129 -  (if YaTeX-need-nonstop
  13.130 +  (if (and YaTeX-need-nonstop (eq major-mode 'yatex-mode))
  13.131        (if (re-search-backward "\\\\nonstopmode{}" (point-min) t)
  13.132  	  nil                    ;if already written in text then do nothing
  13.133  	(save-excursion
  13.134  	  (YaTeX-visit-main t)
  13.135  	  (goto-char (point-min))
  13.136 -	  (insert "\\nonstopmode{}%_YaTeX_%\n")))
  13.137 +	  (insert "\\nonstopmode{}%_YaTeX_%\n")
  13.138 +	  (if (buffer-file-name) (basic-save-buffer))))
  13.139      )
  13.140  )
  13.141  
  13.142  (defun YaTeX-remove-nonstopmode ()
  13.143 -  (if YaTeX-need-nonstop ;for speed
  13.144 +  (if (and YaTeX-need-nonstop (eq major-mode 'yatex-mode)) ;for speed
  13.145        (save-excursion
  13.146  	(YaTeX-visit-main t)
  13.147  	(goto-char (point-min))
  13.148 @@ -776,17 +785,18 @@
  13.149  )
  13.150  
  13.151  (defun YaTeX-save-buffers ()
  13.152 -  "Save buffers which is in yatex-mode."
  13.153 +  "Save buffers whose major-mode is equal to current major-mode."
  13.154    (basic-save-buffer)
  13.155 -  (save-excursion
  13.156 -    (mapcar '(lambda (buf)
  13.157 -	       (set-buffer buf)
  13.158 -	       (if (and (buffer-file-name buf)
  13.159 -			(eq major-mode 'yatex-mode)
  13.160 -			(buffer-modified-p buf)
  13.161 -			(y-or-n-p (format "Save %s" (buffer-name buf))))
  13.162 -		   (save-buffer buf)))
  13.163 -	    (buffer-list)))
  13.164 +  (let ((cmm major-mode))
  13.165 +    (save-excursion
  13.166 +      (mapcar '(lambda (buf)
  13.167 +		 (set-buffer buf)
  13.168 +		 (if (and (buffer-file-name buf)
  13.169 +			  (eq major-mode cmm)
  13.170 +			  (buffer-modified-p buf)
  13.171 +			  (y-or-n-p (format "Save %s" (buffer-name buf))))
  13.172 +		     (save-buffer buf)))
  13.173 +	      (buffer-list))))
  13.174  )
  13.175  
  13.176  (provide 'yatexprc)