yatex

changeset 295:0d3927b911ce

Changes to 1.77 merged into default branch
author HIROSE Yuuji <yuuji@gentei.org>
date Mon, 01 Apr 2013 22:53:13 +0900
parents 735a36dd65b2 8d3156073892
children ef87626ec2f9
files
diffstat 17 files changed, 161 insertions(+), 162 deletions(-) [+]
line diff
     1.1 --- a/makefile	Mon May 14 20:04:36 2012 +0900
     1.2 +++ b/makefile	Mon Apr 01 22:53:13 2013 +0900
     1.3 @@ -49,7 +49,7 @@
     1.4  # make clean		to delete all producted files
     1.5  # make ci		to check in all
     1.6  # make co		to check out all
     1.7 -MVER	= 1.76
     1.8 +MVER	= 1.77
     1.9  LISP	= ${LISP18} ${LISP19}
    1.10  YAHTML	= yahtml.el
    1.11  COMMON	= yatexlib.el yatexprc.el
    1.12 @@ -75,7 +75,7 @@
    1.13  YAHTMLDIST = ${YAHTMLLISP} install 00readme makefile newpage.rb
    1.14  PACK	= `ls ${DISTRIB}`
    1.15  TMPDIR	= /tmp
    1.16 -VERSION = `head yatex.el|awk '/rev\./{print $$4}'`
    1.17 +VERSION = `head -20 yatex.el|awk -F'"' '/revision/{print $$2}'`
    1.18  PACKDIR	= ${TMPDIR}/yatex${VERSION}
    1.19  
    1.20  all:
     2.1 --- a/yahtml.el	Mon May 14 20:04:36 2012 +0900
     2.2 +++ b/yahtml.el	Mon Apr 01 22:53:13 2013 +0900
     2.3 @@ -1,11 +1,13 @@
     2.4 -;;; -*- Emacs-Lisp -*-
     2.5 -;;; (c) 1994-2012 by HIROSE Yuuji [yuuji(@)yatex.org]
     2.6 -;;; Last modified Thu May 10 11:06:39 2012 on firestorm
     2.7 +;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis -*-
     2.8 +;;; (c) 1994-2013 by HIROSE Yuuji [yuuji(@)yatex.org]
     2.9 +;;; Last modified Mon Apr  1 22:42:29 2013 on firestorm
    2.10  ;;; $Id$
    2.11  
    2.12  (defconst yahtml-revision-number "1.76"
    2.13    "Revision number of running yahtml.el")
    2.14  
    2.15 +;;; Commentary:
    2.16 +
    2.17  ;;;[Installation]
    2.18  ;;; 
    2.19  ;;; First, you have to install YaTeX and make sure it works fine.  Then
    2.20 @@ -176,6 +178,7 @@
    2.21  ;;;		(というかほとんどやってもらった ^^;)
    2.22  ;;; 
    2.23  
    2.24 +;;; Code:
    2.25  
    2.26  (require 'yatexlib)
    2.27  ;;; --- customizable variable starts here ---
    2.28 @@ -918,7 +921,7 @@
    2.29     (let ((addin (concat "yahtml:" (downcase form))) s a)
    2.30       (concat
    2.31        (and (setq a (yahtml-css-get-element-completion-alist form))
    2.32 -	   (not (equal last-command-char ?\C-j))
    2.33 +	   (not (equal (YaTeX-last-key) ?\C-j))
    2.34  	   (memq yahtml-current-completion-type '(multiline inline))
    2.35  	   (not (string-match "#" form))
    2.36  	   (yahtml-make-optional-argument ;should be made generic?
    2.37 @@ -2943,7 +2946,8 @@
    2.38  			       (skip-chars-forward "^\"")(point)))))
    2.39  		(if (file-exists-p f)
    2.40  		    (setq alist
    2.41 -			  (append alist (yahtml-css-collect-classes-file f)))))
    2.42 +			  (append alist (yahtml-css-collect-classes-file
    2.43 +					 f initial)))))
    2.44  	    (setq e (point))
    2.45  	    (goto-char b)
    2.46  	    (while (re-search-forward	;ちょといい加減なREGEXP
     3.1 --- a/yatex.el	Mon May 14 20:04:36 2012 +0900
     3.2 +++ b/yatex.el	Mon Apr 01 22:53:13 2013 +0900
     3.3 @@ -1,15 +1,14 @@
     3.4 -;;; -*- Emacs-Lisp -*-
     3.5 -;;; Yet Another tex-mode for emacs - //野鳥//
     3.6 -;;; yatex.el rev. 1.76
     3.7 -;;; (c)1991-2012 by HIROSE Yuuji.[yuuji@yatex.org]
     3.8 -;;; Last modified Sat May 12 14:53:03 2012 on firestorm
     3.9 +;;; yatex.el --- Yet Another tex-mode for emacs //野鳥// -*- coding: sjis -*-
    3.10 +;;; (c)1991-2013 by HIROSE Yuuji.[yuuji@yatex.org]
    3.11 +;;; Last modified Mon Apr  1 22:40:25 2013 on firestorm
    3.12  ;;; $Id$
    3.13  ;;; The latest version of this software is always available at;
    3.14  ;;; http://www.yatex.org/
    3.15  
    3.16 +;;; Code:
    3.17  (require 'comment)
    3.18  (require 'yatexlib)
    3.19 -(defconst YaTeX-revision-number "1.76"
    3.20 +(defconst YaTeX-revision-number "1.77"
    3.21    "Revision number of running yatex.el")
    3.22  
    3.23  ;---------- Local variables ----------
    3.24 @@ -44,7 +43,7 @@
    3.25  ;;'main-file	: switch tmp-dic according to main-file directory.
    3.26  ;;'directory	: switch tmp-dic dir by dir."
    3.27  ;;)
    3.28 -(defvar YaTeX-use-LaTeX2e t "*Use LaTeX2e or not.  Nil meas latex 2.09")
    3.29 +(defvar YaTeX-use-LaTeX2e t "*Use LaTeX2e or not.  Nil means latex 2.09")
    3.30  
    3.31  (defvar tex-command
    3.32    (cond
    3.33 @@ -1364,7 +1363,7 @@
    3.34    (setplist 'YaTeX-jmode nil))
    3.35  
    3.36  (defun YaTeX-self-insert (arg)
    3.37 -  (call-interactively (global-key-binding (char-to-string last-command-char))))
    3.38 +  (call-interactively (global-key-binding (char-to-string (YaTeX-last-key)))))
    3.39  (defun YaTeX-insert-inherit (&rest args)
    3.40    (apply (if (fboundp 'insert-and-inherit) 'insert-and-inherit 'insert)
    3.41  	   args))
    3.42 @@ -1399,7 +1398,7 @@
    3.43       ((and (= (preceding-char) ?\\ )
    3.44  	   (/= (char-after (- (point) 2)) ?\\ )
    3.45  	   (not (YaTeX-in-math-mode-p)))
    3.46 -      (YaTeX-insert-inherit last-command-char "\n")
    3.47 +      (YaTeX-insert-inherit (YaTeX-last-key) "\n")
    3.48        (indent-to (max 0 col))
    3.49        (YaTeX-insert-inherit "\\]")
    3.50        (beginning-of-line)
    3.51 @@ -1507,7 +1506,9 @@
    3.52  ;    (backward-char 1))
    3.53     (t (YaTeX-self-insert arg))))
    3.54  
    3.55 -(defvar YaTeX-use-jmode-hook (not (and (fboundp 'skk-mode) (boundp 'skk-mode)))
    3.56 +(defvar YaTeX-use-jmode-hook
    3.57 +  (and (featurep 'canna) (boundp 'canna:*initialized*) canna:*initialized*)
    3.58 +  ;; (not (and (fboundp 'skk-mode) (boundp 'skk-mode)))
    3.59    "*Non-nil means activate automatic jmode switcher within/out math mode.
    3.60  Hopefully, change default to t in the next version of 1.75.")
    3.61  (defun YaTeX-jmode-hook (old new)
    3.62 @@ -1625,7 +1626,8 @@
    3.63       ((= c ?k) (YaTeX-kill-typeset-process YaTeX-typeset-process))
    3.64       ((= c ?p) (call-interactively 'YaTeX-preview))
    3.65       ((= c ?q) (YaTeX-system "lpq" "*Printer queue*"))
    3.66 -     ((= c ?d) (YaTeX-typeset-buffer YaTeX-dvipdf-command))
    3.67 +     ((= c ?d) (YaTeX-typeset-buffer
    3.68 +		(or (YaTeX-get-builtin "DVIPDF") YaTeX-dvipdf-command)))
    3.69       ((= c ?v) (YaTeX-view-error))
    3.70       ((= c ?l) (YaTeX-lpr arg))
    3.71       ((= c ?m) (YaTeX-switch-mode-menu arg))
    3.72 @@ -2544,7 +2546,8 @@
    3.73  	     (progn
    3.74  	       (setq maketitle (substring (YaTeX-match-string 0) 1))
    3.75  	       (setq memberp (YaTeX-math-member-p maketitle))))
    3.76 -	(let ((last-command-char (string-to-char (car memberp))))
    3.77 +	(let*((last-command-char (string-to-char (car memberp)))
    3.78 +	      (last-command-event last-command-char))
    3.79  	  (setq beg (match-beginning 0) end (match-end 0))
    3.80  	  (delete-region beg end)
    3.81  	  (YaTeX-math-insert-sequence t (cdr memberp))))))
     4.1 --- a/yatex.new	Mon May 14 20:04:36 2012 +0900
     4.2 +++ b/yatex.new	Mon Apr 01 22:53:13 2013 +0900
     4.3 @@ -1,6 +1,11 @@
     4.4  	What's new in YaTeX/yahtml
     4.5  	野鳥/yahtml - 各バージョンの変更点について
     4.6  
     4.7 +1.77	last-command-char 廃止対策を追加。
     4.8 +	=== yatex ===
     4.9 +	%#DVIPDF でdviからpdfへの変換コマンドを指定可能に。
    4.10 +	PDFヴューアに xpdf, pdfopen, mupdf, zathura, okular を追加。
    4.11 +
    4.12  1.76	=== yatex ===
    4.13  	タイプセットでラベル未定義があったら自動的にrerunする。
    4.14  	自動rerun無効化は YaTeX-typeset-auto-rerun を nil に。
    4.15 @@ -18,7 +23,7 @@
    4.16  	M-C-SPC で環境だけでなく数式環境もマークする。
    4.17  	[prefix] t d でタイプセッタ起動成功のあと dvipdfmx を起動。
    4.18  	\label{}でラベル名を入れたときは \ref{NAME} を自動的にkill-ringに追加。
    4.19 -	[prefix] t c で\label{NAME} の NAME を変えたら \ref のNAMEも変える。
    4.20 +	[prefix] c で\label{NAME} の NAME を変えたら \ref のNAMEも変える。
    4.21  	同上のことを \cite/\bibitem にも。
    4.22  	\bibitem{}を入れたときは \cite{TAG} を自動的にkill-ringに追加。
    4.23  	\end 補完のお節介検査の精度を少し上げた。
     5.1 --- a/yatex19.el	Mon May 14 20:04:36 2012 +0900
     5.2 +++ b/yatex19.el	Mon Apr 01 22:53:13 2013 +0900
     5.3 @@ -1,9 +1,9 @@
     5.4 -;;; -*- Emacs-Lisp -*-
     5.5 -;;; YaTeX facilities for Emacs 19 or later
     5.6 -;;; (c)1994-2012 by HIROSE Yuuji.[yuuji@yatex.org]
     5.7 -;;; Last modified Sun Jan 29 23:00:52 2012 on firestorm
     5.8 +;;; yatex19.el -- YaTeX facilities for Emacs 19 or later
     5.9 +;;; (c)1994-2013 by HIROSE Yuuji.[yuuji@yatex.org]
    5.10 +;;; Last modified Mon Apr  1 22:42:46 2013 on firestorm
    5.11  ;;; $Id$
    5.12  
    5.13 +;;; Code:
    5.14  ;(require 'yatex)
    5.15  
    5.16  (and (boundp 'YaTeX-use-hilit19)
     6.1 --- a/yatexadd.el	Mon May 14 20:04:36 2012 +0900
     6.2 +++ b/yatexadd.el	Mon Apr 01 22:53:13 2013 +0900
     6.3 @@ -1,10 +1,10 @@
     6.4 -;;; -*- Emacs-Lisp -*-
     6.5 -;;; YaTeX add-in functions.
     6.6 +;;; yatexadd.el --- YaTeX add-in functions
     6.7  ;;; yatexadd.el rev.20
     6.8 -;;; (c)1991-2012 by HIROSE Yuuji.[yuuji@yatex.org]
     6.9 -;;; Last modified Fri Mar  9 21:19:09 2012 on firestorm
    6.10 +;;; (c)1991-2013 by HIROSE Yuuji.[yuuji@yatex.org]
    6.11 +;;; Last modified Mon Apr  1 22:43:00 2013 on firestorm
    6.12  ;;; $Id$
    6.13  
    6.14 +;;; Code:
    6.15  ;;;
    6.16  ;;Sample functions for LaTeX environment.
    6.17  ;;;
    6.18 @@ -432,7 +432,7 @@
    6.19  (defun YaTeX::label-search-tag ()
    6.20    (interactive)
    6.21    (let ((case-fold-search t)
    6.22 -	(tag (regexp-quote (char-to-string last-command-char))))
    6.23 +	(tag (regexp-quote (char-to-string (YaTeX-last-key)))))
    6.24      (cond
    6.25       ((save-excursion
    6.26  	(forward-char 1)
     7.1 --- a/yatexenv.el	Mon May 14 20:04:36 2012 +0900
     7.2 +++ b/yatexenv.el	Mon Apr 01 22:53:13 2013 +0900
     7.3 @@ -1,10 +1,9 @@
     7.4 -;;; -*- Emacs-Lisp -*-
     7.5 -;;; YaTeX environment-specific functions.
     7.6 -;;; yatexenv.el
     7.7 -;;; (c) 1994-2012 by HIROSE Yuuji.[yuuji@yatex.org]
     7.8 -;;; Last modified Sun Feb 12 11:15:33 2012 on firestorm
     7.9 +;;; yatexenv.el --- YaTeX environment-specific functions
    7.10 +;;; (c) 1994-2013 by HIROSE Yuuji.[yuuji@yatex.org]
    7.11 +;;; Last modified Mon Apr  1 22:43:10 2013 on firestorm
    7.12  ;;; $Id$
    7.13  
    7.14 +;;; Code:
    7.15  ;;;
    7.16  ;; Functions for tabular environment
    7.17  ;;;
     8.1 --- a/yatexgen.el	Mon May 14 20:04:36 2012 +0900
     8.2 +++ b/yatexgen.el	Mon Apr 01 22:53:13 2013 +0900
     8.3 @@ -1,16 +1,15 @@
     8.4 -;;; -*- Emacs-Lisp -*-
     8.5 -;;; YaTeX add-in function generator.
     8.6 -;;; yatexgen.el rev.5
     8.7 +;;; yatexgen.el --- YaTeX add-in function generator(rev.5)
     8.8 +
     8.9  ;;; (c)1991-1995,1999,2000 by HIROSE Yuuji.[yuuji@yatex.org]
    8.10 -;;; Last modified Fri Jun 27 12:09:37 2003 on firestorm
    8.11 +;;; Last modified Sat Sep  1 08:10:36 2012 on firestorm
    8.12  ;;; $Id$
    8.13  
    8.14 +;;; Code:
    8.15  (require 'yatex)
    8.16  
    8.17  (defmacro YaTeX-setq (var japanese english)
    8.18    (list 'setq var
    8.19 -	(if YaTeX-japan japanese english))
    8.20 -)
    8.21 +	(if YaTeX-japan japanese english)))
    8.22  
    8.23  (put 'YaTeX-setq 'lisp-indent-hook 1)
    8.24  
    8.25 @@ -29,8 +28,7 @@
    8.26  reading my messages *carefully*, or you'll fail to generate appropriate
    8.27  function.
    8.28  
    8.29 -  Hit return key!"
    8.30 -)
    8.31 +  Hit return key!")
    8.32  
    8.33  (YaTeX-setq YaTeX-generate-start-message
    8.34    "さぁはじめるよ.\n1.登録したい補完をやってみて.
    8.35 @@ -40,33 +38,27 @@
    8.36    "Let's begin completion for which you want to make add-in function.
    8.37  If you want to make add-in function for \\documentstyle input only
    8.38  `\\documentstyle{}' *with* completion of yatex-mode.
    8.39 -If you finish this, please press RET."
    8.40 -)
    8.41 +If you finish this, please press RET.")
    8.42  
    8.43  (YaTeX-setq YaTeX-generate-abort-message
    8.44    "やめた、やめた〜いめんどくせ〜"
    8.45 -  "Aborted."
    8.46 -)
    8.47 +  "Aborted.")
    8.48  
    8.49  (YaTeX-setq YaTeX-generate-same-message
    8.50    "それじゃ、なにも変わってねぇだろーが! やめた。"
    8.51 -  "I found no difference between them.  So I'm quitting."
    8.52 -)
    8.53 +  "I found no difference between them.  So I'm quitting.")
    8.54  
    8.55  (YaTeX-setq YaTeX-generate-invalid-message
    8.56    "それは、ちと無理というものじゃ."
    8.57 -  "It's impossible."
    8.58 -)
    8.59 +  "It's impossible.")
    8.60  
    8.61  (YaTeX-setq YaTeX-generate-idontknow-message
    8.62    "う〜ん、難しくてよくわからないなぁ。ばかでごめんねェ〜"
    8.63 -  "Sorry I can't tell your adding method."
    8.64 -)
    8.65 +  "Sorry I can't tell your adding method.")
    8.66  
    8.67  (YaTeX-setq YaTeX-generate-confirm-message
    8.68    "ということは、付け足したい部分はこれでいいのね"
    8.69 -  "Is it additional string of add-in function?"
    8.70 -)
    8.71 +  "Is it additional string of add-in function?")
    8.72  
    8.73  (YaTeX-setq YaTeX-generate-output-message
    8.74    "2.じゃ、それにくっつけたいものを *カーソルの位置に* 足してみて. 
    8.75 @@ -75,8 +67,7 @@
    8.76  で、またおわったらりたーん!!"
    8.77    "2.Then input additional string *at CURSOR POSITION*
    8.78  According to last example \\documentstyle{},
    8.79 -modify it \\documentstyle[12pt]{}.  RET to finish."
    8.80 -)
    8.81 +modify it \\documentstyle[12pt]{}.  RET to finish.")
    8.82  
    8.83  (YaTeX-setq YaTeX-generate-put-arg-message
    8.84    "3.このうち、キーボードから読み込んで欲しい文字列を順に入れて。
    8.85 @@ -86,8 +77,7 @@
    8.86    "3.In this string, extract string which you want to input from key
    8.87  board with quiry afterwards.  For example, though additional string is
    8.88  \\documentstyle[12pt]{}, but you want enter only `12pt' by hand.
    8.89 -RET to finish!"
    8.90 -)
    8.91 +RET to finish!")
    8.92  
    8.93  (YaTeX-setq YaTeX-generate-read-prompt-message
    8.94    "4.では、あとでこれらの文字列を読み込む時に、どういうプロンプトを
    8.95 @@ -95,8 +85,7 @@
    8.96  さっきの 12pt の部分だったら、『サイズは』とかがおすすめ。"
    8.97    "4.When you use this add-in function afterwards, what message
    8.98  do you like to be prompted with to enter these values.  In last
    8.99 -example `12pt', typical prompt string may be `Size?: '."
   8.100 -)
   8.101 +example `12pt', typical prompt string may be `Size?: '.")
   8.102  
   8.103  (YaTeX-setq YaTeX-generate-done-message
   8.104    "よし! これが、君の作りたかった関数だ。~/.emacs にでも入れてせいぜい
   8.105 @@ -109,34 +98,29 @@
   8.106  for testing of this function please.
   8.107    But you can see this function quite easy, can't you? You had better
   8.108  write your most favorite add-in function yourself!
   8.109 -"
   8.110 -)
   8.111 +")
   8.112  
   8.113  (YaTeX-setq YaTeX-generate-nomatch-message
   8.114    "こらこら、そんな文字列どこにもねーぞ!!"
   8.115 -  "No such string in additional string."
   8.116 -)
   8.117 +  "No such string in additional string.")
   8.118 +
   8.119  (YaTeX-setq YaTeX-generate-buffer
   8.120    "*付加関数生成バッファ*"
   8.121 -  "*Generate-add-in-function*"
   8.122 -)
   8.123 +  "*Generate-add-in-function*")
   8.124  
   8.125  (YaTeX-setq YaTeX-generate-message-buffer
   8.126    "*ご案内*"
   8.127 -  "*Guide*"
   8.128 -)
   8.129 +  "*Guide*")
   8.130  
   8.131  (YaTeX-setq YaTeX-generate-bug-message
   8.132    "ごめ〜ん!! ちょっと、このアドイン関数つくるの失敗しちゃったみたい!!
   8.133  作者まで連絡してくださ〜〜〜い!"
   8.134    "Sorry I failed to make add-in function for you...
   8.135 -Send bug report to me."
   8.136 -)
   8.137 +Send bug report to me.")
   8.138  
   8.139  (YaTeX-setq YaTeX-generate-narrow-message
   8.140    "画面がせますぎるような気がします。"
   8.141 -  "Too narrow screen height."
   8.142 -)
   8.143 +  "Too narrow screen height.")
   8.144  
   8.145  (defvar YaTeX-generate-message-height
   8.146    10 "Window height of YaTeX-generate-message-buffer")
   8.147 @@ -249,8 +233,7 @@
   8.148    (condition-case error
   8.149        (eval-current-buffer)
   8.150      (error (insert YaTeX-generate-bug-message)))
   8.151 -  (pop-to-buffer YaTeX-generate-message-buffer)
   8.152 -)
   8.153 +  (pop-to-buffer YaTeX-generate-message-buffer))
   8.154  
   8.155  (defun YaTeX-generate-parse-add-in (args add-in)
   8.156    "Parse add-in string and extract argument for it.
   8.157 @@ -313,8 +296,7 @@
   8.158      (insert ")\n(concat " (YaTeX-generate-lisp-quote string)
   8.159  	    ")))\n")
   8.160      (indent-region (point-min) (point) nil)
   8.161 -    used)
   8.162 -)
   8.163 +    used))
   8.164  
   8.165  (defun YaTeX-generate-ask-match-position ()
   8.166    "Ask user whether match-position is in his expectation,
   8.167 @@ -331,14 +313,12 @@
   8.168    (insert "\n" (if YaTeX-japan "ここにも対応してるの?"
   8.169  		 "this underlined part too?"))
   8.170    (other-window -1)
   8.171 -  (y-or-n-p (if YaTeX-japan "下線部はあってますか" "Is underline right"))
   8.172 -)
   8.173 +  (y-or-n-p (if YaTeX-japan "下線部はあってますか" "Is underline right")))
   8.174  
   8.175  (defun YaTeX-generate-register-match ()
   8.176    (nconc arg (list (list beg end)))
   8.177    (let ((x beg))
   8.178 -    (while (< x end) (aset used x i)(setq x (1+ x))))
   8.179 -)
   8.180 +    (while (< x end) (aset used x i)(setq x (1+ x)))))
   8.181  
   8.182  (defun YaTeX-generate-display-message (mes &optional bottom)
   8.183    "Display message to generation buffer."
   8.184 @@ -347,8 +327,7 @@
   8.185    (insert "\n\n")
   8.186    (if bottom (recenter (1- bottom)) (recenter 0))
   8.187    (insert mes)
   8.188 -  (other-window -1)
   8.189 -)
   8.190 +  (other-window -1))
   8.191  
   8.192  (defun YaTeX-generate-move-to-add-in-position ()
   8.193    "Move cursor where add-in function should insert string."
   8.194 @@ -366,9 +345,7 @@
   8.195     ((eq YaTeX-current-completion-type 'maketitle)
   8.196      (goto-char (point-max))
   8.197      (if (= (preceding-char) ? )
   8.198 -	(forward-char -1)))
   8.199 -   )
   8.200 -)
   8.201 +	(forward-char -1)))))
   8.202  
   8.203  (defun YaTeX-generate-function-name ()
   8.204    (concat
   8.205 @@ -376,8 +353,7 @@
   8.206     (cond
   8.207      ((eq YaTeX-current-completion-type 'begin) YaTeX-env-name)
   8.208      ((eq YaTeX-current-completion-type 'section) YaTeX-section-name)
   8.209 -    ((eq YaTeX-current-completion-type 'maketitle) YaTeX-single-command)))
   8.210 -)
   8.211 +    ((eq YaTeX-current-completion-type 'maketitle) YaTeX-single-command))))
   8.212  
   8.213  (defun YaTeX-generate-lisp-quote (str)
   8.214    (let ((len (length str))(i 0) (quote ""))
   8.215 @@ -388,8 +364,7 @@
   8.216  	  (setq quote (concat quote "\""))
   8.217  	(setq quote (concat quote (substring str i (1+ i)))))
   8.218        (setq i (1+ i)))
   8.219 -    quote)
   8.220 -)
   8.221 +    quote))
   8.222  
   8.223  (defun YaTeX-generate-quote-quote (str)
   8.224    (let ((len (length str))(i 0) (quote ""))
   8.225 @@ -398,15 +373,13 @@
   8.226  	  (setq quote (concat quote (char-to-string 127))))
   8.227        (setq quote (concat quote (substring str i (1+ i))))
   8.228        (setq i (1+ i)))
   8.229 -    quote)
   8.230 -)
   8.231 +    quote))
   8.232  
   8.233  (defun YaTeX-suppress-sparse-keymap (map)
   8.234    (let ((i ? ))
   8.235      (while (< i 127)
   8.236        (define-key map (char-to-string i) 'undefined)
   8.237 -      (setq i (1+ i))))
   8.238 -)
   8.239 +      (setq i (1+ i)))))
   8.240  
   8.241  ;;;
   8.242  ;; Auto-generate Function for Lispers.
   8.243 @@ -423,8 +396,8 @@
   8.244       ((= c ?p) 'oneof)
   8.245       ((= c ?o) 'coord)
   8.246       ;;((= c ?m) 'macro)
   8.247 -     (t        'quit)))
   8.248 - )
   8.249 +     (t        'quit))))
   8.250 +
   8.251  (defun YaTeX-generate-read-completion-table ()
   8.252    (let ((i 1) cand (cands "(") (cb (current-buffer))
   8.253  	(buf (get-buffer-create " *Candidates*")))
   8.254 @@ -441,8 +414,8 @@
   8.255  	(insert cand "\n"))
   8.256        (kill-buffer buf)))
   8.257      ;;(set-buffer cb)
   8.258 -    (setq YaTeX-generate-current-completion-table (concat cands ")")))
   8.259 -)
   8.260 +    (setq YaTeX-generate-current-completion-table (concat cands ")"))))
   8.261 +
   8.262  (defun YaTeX-generate-corresponding-paren (left)
   8.263    (cond
   8.264     ((equal left "{") "}")
   8.265 @@ -450,16 +423,16 @@
   8.266     ((equal left "(") ")")
   8.267     ((equal left "<") ">")
   8.268     ((equal left "\\begin{") "}")
   8.269 -   (t left))
   8.270 -)
   8.271 +   (t left)))
   8.272 +
   8.273  (defun YaTeX-generate-create-read-string (&optional nth)
   8.274    (concat
   8.275     "(read-string \""
   8.276     (read-string (if nth (format "Prompt for argument#%d: " nth) "Prompt: "))
   8.277     ": \"\n"
   8.278     "\"" (read-string "Default: ") "\""
   8.279 -   ")\n")
   8.280 -)
   8.281 +   ")\n"))
   8.282 +
   8.283  (defun YaTeX-generate-create-completing-read (&optional nth)
   8.284    (prog1
   8.285        (concat
   8.286 @@ -475,21 +448,21 @@
   8.287  	      (cons
   8.288  	       (cons (format "YaTeX-%s-%d" command (or nth 0))
   8.289  		     YaTeX-generate-current-completion-table)
   8.290 -	       YaTeX-generate-variables-for-learning))))
   8.291 -)
   8.292 +	       YaTeX-generate-variables-for-learning)))))
   8.293 +
   8.294  (defun YaTeX-generate-create-read-file-name (&optional nth)
   8.295    (concat
   8.296     "(read-file-name \""
   8.297     (read-string (if nth (format "Prompt for argument#%d: " nth) "Prompt: "))
   8.298 -   ": \" "" \"\" t \"\")\n")
   8.299 -)
   8.300 +   ": \" "" \"\" t \"\")\n"))
   8.301 +
   8.302  (defun YaTeX-generate-create-read-oneof (&optional nth readpos)
   8.303    (concat
   8.304     (if readpos
   8.305         "(YaTeX:read-position \""
   8.306       "(YaTeX:read-oneof \"")
   8.307 -   (read-string "Acceptable characters: " "lcr") "\")\n")
   8.308 -)
   8.309 +   (read-string "Acceptable characters: " "lcr") "\")\n"))
   8.310 +
   8.311  (defun YaTeX-generate-option-type (command)
   8.312    (let ((func (format "YaTeX:%s" command)) leftp
   8.313  	(buf (get-buffer-create YaTeX-generate-buffer)) type (n 1))
   8.314 @@ -546,8 +519,8 @@
   8.315      (goto-char (point-min))
   8.316      (while (not (eobp)) (lisp-indent-line) (forward-line 1))
   8.317      (eval-current-buffer)
   8.318 -    buf)
   8.319 -)
   8.320 +    buf))
   8.321 +
   8.322  (defun YaTeX-generate-argument-type (command argc)
   8.323    "Create an argument-type add-in function."
   8.324    (interactive)
   8.325 @@ -581,8 +554,8 @@
   8.326      (YaTeX-update-table
   8.327       (if (> argc 1) (list command argc) (list command))
   8.328       'section-table 'user-section-table 'tmp-section-table)
   8.329 -    buf)
   8.330 -)
   8.331 +    buf))
   8.332 +
   8.333  (defun YaTeX-generate-simple (&optional command)
   8.334    "Simple but requiring some elisp knowledge add-in generator."
   8.335    (interactive)
   8.336 @@ -607,6 +580,6 @@
   8.337         (YaTeX-generate-option-type command)
   8.338       (YaTeX-generate-argument-type
   8.339        command
   8.340 -      (string-to-int (read-string "How many arguments?: ")))) nil)
   8.341 -)
   8.342 +      (string-to-int (read-string "How many arguments?: ")))) nil))
   8.343 +
   8.344  (provide 'yatexgen)
     9.1 --- a/yatexhie.el	Mon May 14 20:04:36 2012 +0900
     9.2 +++ b/yatexhie.el	Mon Apr 01 22:53:13 2013 +0900
     9.3 @@ -1,10 +1,10 @@
     9.4 -;;; -*- Emacs-Lisp -*-
     9.5 -;;; YaTeX hierarchy browser.
     9.6 -;;; yatexhie.el
     9.7 -;;; (c)1995-2012 by HIROSE Yuuji [yuuji@yatex.org]
     9.8 -;;; Last modified Mon Jan  9 20:19:06 2012 on firestorm
     9.9 +;;; yatexhie.el --- YaTeX hierarchy browser
    9.10 +;;; 
    9.11 +;;; (c)1995-2013 by HIROSE Yuuji [yuuji@yatex.org]
    9.12 +;;; Last modified Mon Apr  1 22:43:34 2013 on firestorm
    9.13  ;;; $Id$
    9.14  
    9.15 +;;; Code:
    9.16  ;; ----- Customizable variables -----
    9.17  (defvar YaTeX-hierarchy-ignore-heading-regexp
    9.18    "\\$[A-Z][a-z]+: .* \\$\\|-\\*- .* -\\*-"
    10.1 --- a/yatexhlp.el	Mon May 14 20:04:36 2012 +0900
    10.2 +++ b/yatexhlp.el	Mon Apr 01 22:53:13 2013 +0900
    10.3 @@ -1,10 +1,10 @@
    10.4 -;;; -*- Emacs-Lisp -*-
    10.5 -;;; YaTeX helper with LaTeX commands and macros.
    10.6 -;;; yatexhlp.el
    10.7 +;;; yatexhlp.el --- YaTeX helper with LaTeX commands and macros
    10.8 +;;; 
    10.9  ;;; (c)1994,1998,2004 by HIROSE Yuuji.[yuuji@yatex.org]
   10.10 -;;; Last modified Tue Oct 19 01:13:21 2004 on firestorm
   10.11 +;;; Last modified Sat Sep  1 08:11:14 2012 on firestorm
   10.12  ;;; $Id$
   10.13  
   10.14 +;;; Code:
   10.15  (let ((help-file (concat "YATEXHLP."
   10.16  			 (cond (YaTeX-japan "jp")
   10.17  			       (t "eng"))))
    11.1 --- a/yatexinf.el	Mon May 14 20:04:36 2012 +0900
    11.2 +++ b/yatexinf.el	Mon Apr 01 22:53:13 2013 +0900
    11.3 @@ -1,8 +1,8 @@
    11.4 -;;; -*- Emacs-Lisp -*-
    11.5 -;;; YaTeX interfaces for Texinfo mode.
    11.6 -;;; (c)1994-2012 by HIROSE, Yuuji [yuuji@yatex.org]
    11.7 -;;; Last modified Mon Jan  9 20:19:55 2012 on firestorm
    11.8 +;;; yatexinf.el -- YaTeX interfaces for Texinfo mode
    11.9 +;;; (c)1994-2013 by HIROSE, Yuuji [yuuji@yatex.org]
   11.10 +;;; Last modified Mon Apr  1 22:43:58 2013 on firestorm
   11.11  
   11.12 +;;; Code:
   11.13  (require 'yatex)
   11.14  (or (boundp 'texinfo-mode-map)
   11.15      (load "texinfo"))
    12.1 --- a/yatexlib.el	Mon May 14 20:04:36 2012 +0900
    12.2 +++ b/yatexlib.el	Mon Apr 01 22:53:13 2013 +0900
    12.3 @@ -1,10 +1,10 @@
    12.4 -;;; -*- Emacs-Lisp -*-
    12.5 -;;; YaTeX and yahtml common libraries, general functions and definitions
    12.6 -;;; yatexlib.el
    12.7 -;;; (c)1994-2012 by HIROSE Yuuji.[yuuji@yatex.org]
    12.8 -;;; Last modified Wed Feb 29 09:49:30 2012 on firestorm
    12.9 +;;; yatexlib.el --- YaTeX and yahtml common libraries
   12.10 +;;; 
   12.11 +;;; (c)1994-2013 by HIROSE Yuuji.[yuuji@yatex.org]
   12.12 +;;; Last modified Mon Apr  1 22:44:06 2013 on firestorm
   12.13  ;;; $Id$
   12.14  
   12.15 +;;; Code:
   12.16  ;; General variables
   12.17  (defvar YaTeX-dos (memq system-type '(ms-dos windows-nt OS/2)))
   12.18  (defvar YaTeX-macos (memq system-type '(darwin)))
   12.19 @@ -755,13 +755,15 @@
   12.20  (defvar YaTeX-skip-next-reader-char ?\C-j)
   12.21  (defun YaTeX-read-string-or-skip (&rest args)
   12.22    "Read string, or skip if last input char is \C-j."
   12.23 -  (if (equal last-input-char YaTeX-skip-next-reader-char)
   12.24 +  (if (equal (if (boundp 'last-input-event) last-input-event last-input-char)
   12.25 +	     YaTeX-skip-next-reader-char)
   12.26        ""
   12.27      (apply 'read-string args)))
   12.28  
   12.29  (defun YaTeX-completing-read-or-skip (&rest args)
   12.30    "Do completing-read, or skip if last input char is \C-j."
   12.31 -  (if (equal last-input-char YaTeX-skip-next-reader-char)
   12.32 +  (if (equal (if (boundp 'last-input-event) last-input-event last-input-char)
   12.33 +	     YaTeX-skip-next-reader-char)
   12.34        ""
   12.35      (apply 'completing-read args)))
   12.36  
   12.37 @@ -839,11 +841,18 @@
   12.38  ;; Interface function for windows.el
   12.39  ;;;
   12.40  ;;;###autoload
   12.41 +(fset 'YaTeX-last-key
   12.42 +      (if (fboundp 'win:last-key)
   12.43 +	  'win:last-key
   12.44 +	'(lambda () (if (boundp 'last-command-char)
   12.45 +			last-command-char
   12.46 +		      last-command-event))))
   12.47  (defun YaTeX-switch-to-window ()
   12.48    "Switch to windows.el's window decided by last pressed key."
   12.49    (interactive)
   12.50    (or (featurep 'windows) (error "Why don't you use `windows.el'?"))
   12.51 -  (win-switch-to-window 1 (- last-command-char win:base-key)))
   12.52 +  (win-switch-to-window 1 (- (YaTeX-last-key) win:base-key)))
   12.53 +
   12.54  
   12.55  ;;;###autoload
   12.56  (defun YaTeX-command-to-string (cmd)
    13.1 --- a/yatexm-o.el	Mon May 14 20:04:36 2012 +0900
    13.2 +++ b/yatexm-o.el	Mon Apr 01 22:53:13 2013 +0900
    13.3 @@ -1,8 +1,9 @@
    13.4 -;;; -*- Emacs-Lisp -*-
    13.5 -;;; Sample startup file to invoke yatex-mode with outline-minor mode.
    13.6 +;;; yatexm-o.el --- Sample to invoke yatex-mode with outline-minor mode
    13.7 +
    13.8  ;;; (c)1993 by HIROSE Yuuji [yuuji@yatex.org]
    13.9 -;;; Last modified Fri Jun 27 12:10:15 2003 on firestorm
   13.10 +;;; Last modified Sat Sep  1 08:12:40 2012 on firestorm
   13.11  
   13.12 +;;; Code:
   13.13  ;;;
   13.14  ;; outline-minor-mode(使用しない場合は不要です)
   13.15  ;;; 
    14.1 --- a/yatexmth.el	Mon May 14 20:04:36 2012 +0900
    14.2 +++ b/yatexmth.el	Mon Apr 01 22:53:13 2013 +0900
    14.3 @@ -1,10 +1,10 @@
    14.4 -;;; -*- Emacs-Lisp -*-
    14.5 -;;; YaTeX math-mode-specific functions.
    14.6 -;;; yatexmth.el
    14.7 -;;; (c)1993-2012 by HIROSE Yuuji [yuuji@yatex.org]
    14.8 -;;; Last modified Tue Jan 24 08:58:56 2012 on firestorm
    14.9 +;;; yatexmth.el --- YaTeX math-mode-specific functions
   14.10 +;;; 
   14.11 +;;; (c)1993-2013 by HIROSE Yuuji [yuuji@yatex.org]
   14.12 +;;; Last modified Mon Apr  1 22:44:22 2013 on firestorm
   14.13  ;;; $Id$
   14.14  
   14.15 +;;; Commentary:
   14.16  ;;; [Customization guide]
   14.17  ;;;
   14.18  ;;;	  By default,  you can use two  completion  groups in YaTeX math
   14.19 @@ -84,6 +84,7 @@
   14.20  ;;;	これらを ~/.emacs に書いておけば、math-mode で自分専用のイメージ
   14.21  ;;;	補完が利用できます。
   14.22  
   14.23 +;;; Code:
   14.24  (defvar YaTeX-jisold
   14.25    (and (boundp 'dos-machine-type)
   14.26         (eq dos-machine-type 'pc98)))
   14.27 @@ -687,7 +688,9 @@
   14.28  				    2))))
   14.29  	      (let ((char (read-char)))
   14.30  		(or (eq char exit-char)
   14.31 -		    (setq unread-command-char char))))
   14.32 +		    (if (boundp 'unread-command-events)
   14.33 +			(setq unread-command-events (list char))
   14.34 +		      (setq unread-command-char char)))))
   14.35  	  (if insert-end
   14.36  	      (save-excursion
   14.37  		(delete-region insert-start insert-end)))
   14.38 @@ -699,7 +702,7 @@
   14.39    (interactive "P")
   14.40    (let*((key (or initial "")) regkey str  last-char list i
   14.41  	(case-fold-search nil) match sign
   14.42 -	(this-key (char-to-string last-command-char))
   14.43 +	(this-key (char-to-string (YaTeX-last-key)))
   14.44  	(alistsym (cdr (assoc this-key YaTeX-math-key-list)))
   14.45  	(alistname (symbol-name alistsym))
   14.46  	(alist (symbol-value alistsym))
   14.47 @@ -779,7 +782,9 @@
   14.48      (cond
   14.49       ((memq result '(t select))
   14.50        (if (eq result t)
   14.51 -	  (setq unread-command-char last-char)
   14.52 +	  (if (boundp 'unread-command-events)
   14.53 +	      (setq unread-command-events (list last-char))
   14.54 +	    (setq unread-command-char last-char))
   14.55  	(message "Done."))
   14.56        (if (assoc YaTeX-single-command section-table)
   14.57  	  (YaTeX-make-section nil nil nil YaTeX-single-command)
    15.1 --- a/yatexpkg.el	Mon May 14 20:04:36 2012 +0900
    15.2 +++ b/yatexpkg.el	Mon Apr 01 22:53:13 2013 +0900
    15.3 @@ -1,10 +1,10 @@
    15.4 -;;; -*- Emacs-Lisp -*-
    15.5 -;;; YaTeX package manager
    15.6 -;;; yatexpkg.el
    15.7 -;;; (c)2003-2012 by HIROSE, Yuuji [yuuji@yatex.org]
    15.8 -;;; Last modified Mon Jan  9 20:13:53 2012 on firestorm
    15.9 +;;; yatexpkg.el --- YaTeX package manager
   15.10 +;;; 
   15.11 +;;; (c)2003-2013 by HIROSE, Yuuji [yuuji@yatex.org]
   15.12 +;;; Last modified Mon Apr  1 22:44:31 2013 on firestorm
   15.13  ;;; $Id$
   15.14  
   15.15 +;;; Code:
   15.16  (defvar YaTeX-package-ams-envs
   15.17    (mapcar 'car YaTeX-ams-env-table))
   15.18  
    16.1 --- a/yatexprc.el	Mon May 14 20:04:36 2012 +0900
    16.2 +++ b/yatexprc.el	Mon Apr 01 22:53:13 2013 +0900
    16.3 @@ -1,10 +1,10 @@
    16.4 -;;; -*- Emacs-Lisp -*-
    16.5 -;;; YaTeX process handler.
    16.6 -;;; yatexprc.el
    16.7 -;;; (c)1993-2012 by HIROSE Yuuji.[yuuji@yatex.org]
    16.8 -;;; Last modified Fri Feb 17 22:35:38 2012 on firestorm
    16.9 +;;; yatexprc.el --- YaTeX process handler
   16.10 +;;; 
   16.11 +;;; (c)1993-2013 by HIROSE Yuuji.[yuuji@yatex.org]
   16.12 +;;; Last modified Mon Apr  1 22:44:38 2013 on firestorm
   16.13  ;;; $Id$
   16.14  
   16.15 +;;; Code:
   16.16  ;(require 'yatex)
   16.17  (require 'yatexlib)
   16.18  
   16.19 @@ -849,7 +849,7 @@
   16.20  (defvar YaTeX-dvi2-command-ext-alist
   16.21   '(("[agx]dvi\\|dviout" . ".dvi")
   16.22     ("ghostview\\|gv" . ".ps")
   16.23 -   ("acroread\\|pdf\\|Preview\\|TeXShop\\|Skim\\|evince" . ".pdf")))
   16.24 +   ("acroread\\|xpdf\\|pdfopen\\|Preview\\|TeXShop\\|Skim\\|evince\\|mupdf\\|zathura\\|okular" . ".pdf")))
   16.25  
   16.26  (defun YaTeX-get-preview-file-name (&optional preview-command)
   16.27    "Get file name to preview by inquiring YaTeX-get-latex-command"
    17.1 --- a/yatexsec.el	Mon May 14 20:04:36 2012 +0900
    17.2 +++ b/yatexsec.el	Mon Apr 01 22:53:13 2013 +0900
    17.3 @@ -1,10 +1,10 @@
    17.4 -;;; -*- Emacs-Lisp -*-
    17.5 -;;; YaTeX sectioning browser.
    17.6 -;;; yatexsec.el
    17.7 -;;; (c) 1994-2012 by HIROSE Yuuji [yuuji@yatex.org]
    17.8 -;;; Last modified Mon Jan  9 20:20:32 2012 on firestorm
    17.9 +;;; yatexsec.el --- YaTeX sectioning browser
   17.10 +;;; 
   17.11 +;;; (c) 1994-2013 by HIROSE Yuuji [yuuji@yatex.org]
   17.12 +;;; Last modified Mon Apr  1 22:46:28 2013 on firestorm
   17.13  ;;; $Id$
   17.14  
   17.15 +;;; Code:
   17.16  (defvar YaTeX-sectioning-level
   17.17    '(("part" . 0)
   17.18      ("chapter" . 1)
   17.19 @@ -181,7 +181,7 @@
   17.20  (defun YaTeX-sectioning-hide ()
   17.21    "Call YaTeX-sectioning-hide-under with argument according to pressed key."
   17.22    (interactive)
   17.23 -  (YaTeX-sectioning-hide-under (- last-command-char ?0)))
   17.24 +  (YaTeX-sectioning-hide-under (- (YaTeX-last-key) ?0)))
   17.25  
   17.26  (defun YaTeX-sectioning-help ()
   17.27    "Show help of sectioning."