# HG changeset patch # User HIROSE Yuuji # Date 1364824393 -32400 # Node ID 0d3927b911ce5c66d9348c14b86f00e8ec0ce0ba # Parent 735a36dd65b22d118fc56d81816a260ab6496719# Parent 8d3156073892d10ecb20d5b4a1c5c970865861f1 Changes to 1.77 merged into default branch diff -r 735a36dd65b2 -r 0d3927b911ce makefile --- a/makefile Mon May 14 20:04:36 2012 +0900 +++ b/makefile Mon Apr 01 22:53:13 2013 +0900 @@ -49,7 +49,7 @@ # make clean to delete all producted files # make ci to check in all # make co to check out all -MVER = 1.76 +MVER = 1.77 LISP = ${LISP18} ${LISP19} YAHTML = yahtml.el COMMON = yatexlib.el yatexprc.el @@ -75,7 +75,7 @@ YAHTMLDIST = ${YAHTMLLISP} install 00readme makefile newpage.rb PACK = `ls ${DISTRIB}` TMPDIR = /tmp -VERSION = `head yatex.el|awk '/rev\./{print $$4}'` +VERSION = `head -20 yatex.el|awk -F'"' '/revision/{print $$2}'` PACKDIR = ${TMPDIR}/yatex${VERSION} all: diff -r 735a36dd65b2 -r 0d3927b911ce yahtml.el --- a/yahtml.el Mon May 14 20:04:36 2012 +0900 +++ b/yahtml.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,11 +1,13 @@ -;;; -*- Emacs-Lisp -*- -;;; (c) 1994-2012 by HIROSE Yuuji [yuuji(@)yatex.org] -;;; Last modified Thu May 10 11:06:39 2012 on firestorm +;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis -*- +;;; (c) 1994-2013 by HIROSE Yuuji [yuuji(@)yatex.org] +;;; Last modified Mon Apr 1 22:42:29 2013 on firestorm ;;; $Id$ (defconst yahtml-revision-number "1.76" "Revision number of running yahtml.el") +;;; Commentary: + ;;;[Installation] ;;; ;;; First, you have to install YaTeX and make sure it works fine. Then @@ -176,6 +178,7 @@ ;;; (というかほとんどやってもらった ^^;) ;;; +;;; Code: (require 'yatexlib) ;;; --- customizable variable starts here --- @@ -918,7 +921,7 @@ (let ((addin (concat "yahtml:" (downcase form))) s a) (concat (and (setq a (yahtml-css-get-element-completion-alist form)) - (not (equal last-command-char ?\C-j)) + (not (equal (YaTeX-last-key) ?\C-j)) (memq yahtml-current-completion-type '(multiline inline)) (not (string-match "#" form)) (yahtml-make-optional-argument ;should be made generic? @@ -2943,7 +2946,8 @@ (skip-chars-forward "^\"")(point))))) (if (file-exists-p f) (setq alist - (append alist (yahtml-css-collect-classes-file f))))) + (append alist (yahtml-css-collect-classes-file + f initial))))) (setq e (point)) (goto-char b) (while (re-search-forward ;ちょといい加減なREGEXP diff -r 735a36dd65b2 -r 0d3927b911ce yatex.el --- a/yatex.el Mon May 14 20:04:36 2012 +0900 +++ b/yatex.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,15 +1,14 @@ -;;; -*- Emacs-Lisp -*- -;;; Yet Another tex-mode for emacs - //野鳥// -;;; yatex.el rev. 1.76 -;;; (c)1991-2012 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sat May 12 14:53:03 2012 on firestorm +;;; yatex.el --- Yet Another tex-mode for emacs //野鳥// -*- coding: sjis -*- +;;; (c)1991-2013 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Mon Apr 1 22:40:25 2013 on firestorm ;;; $Id$ ;;; The latest version of this software is always available at; ;;; http://www.yatex.org/ +;;; Code: (require 'comment) (require 'yatexlib) -(defconst YaTeX-revision-number "1.76" +(defconst YaTeX-revision-number "1.77" "Revision number of running yatex.el") ;---------- Local variables ---------- @@ -44,7 +43,7 @@ ;;'main-file : switch tmp-dic according to main-file directory. ;;'directory : switch tmp-dic dir by dir." ;;) -(defvar YaTeX-use-LaTeX2e t "*Use LaTeX2e or not. Nil meas latex 2.09") +(defvar YaTeX-use-LaTeX2e t "*Use LaTeX2e or not. Nil means latex 2.09") (defvar tex-command (cond @@ -1364,7 +1363,7 @@ (setplist 'YaTeX-jmode nil)) (defun YaTeX-self-insert (arg) - (call-interactively (global-key-binding (char-to-string last-command-char)))) + (call-interactively (global-key-binding (char-to-string (YaTeX-last-key))))) (defun YaTeX-insert-inherit (&rest args) (apply (if (fboundp 'insert-and-inherit) 'insert-and-inherit 'insert) args)) @@ -1399,7 +1398,7 @@ ((and (= (preceding-char) ?\\ ) (/= (char-after (- (point) 2)) ?\\ ) (not (YaTeX-in-math-mode-p))) - (YaTeX-insert-inherit last-command-char "\n") + (YaTeX-insert-inherit (YaTeX-last-key) "\n") (indent-to (max 0 col)) (YaTeX-insert-inherit "\\]") (beginning-of-line) @@ -1507,7 +1506,9 @@ ; (backward-char 1)) (t (YaTeX-self-insert arg)))) -(defvar YaTeX-use-jmode-hook (not (and (fboundp 'skk-mode) (boundp 'skk-mode))) +(defvar YaTeX-use-jmode-hook + (and (featurep 'canna) (boundp 'canna:*initialized*) canna:*initialized*) + ;; (not (and (fboundp 'skk-mode) (boundp 'skk-mode))) "*Non-nil means activate automatic jmode switcher within/out math mode. Hopefully, change default to t in the next version of 1.75.") (defun YaTeX-jmode-hook (old new) @@ -1625,7 +1626,8 @@ ((= c ?k) (YaTeX-kill-typeset-process YaTeX-typeset-process)) ((= c ?p) (call-interactively 'YaTeX-preview)) ((= c ?q) (YaTeX-system "lpq" "*Printer queue*")) - ((= c ?d) (YaTeX-typeset-buffer YaTeX-dvipdf-command)) + ((= c ?d) (YaTeX-typeset-buffer + (or (YaTeX-get-builtin "DVIPDF") YaTeX-dvipdf-command))) ((= c ?v) (YaTeX-view-error)) ((= c ?l) (YaTeX-lpr arg)) ((= c ?m) (YaTeX-switch-mode-menu arg)) @@ -2544,7 +2546,8 @@ (progn (setq maketitle (substring (YaTeX-match-string 0) 1)) (setq memberp (YaTeX-math-member-p maketitle)))) - (let ((last-command-char (string-to-char (car memberp)))) + (let*((last-command-char (string-to-char (car memberp))) + (last-command-event last-command-char)) (setq beg (match-beginning 0) end (match-end 0)) (delete-region beg end) (YaTeX-math-insert-sequence t (cdr memberp)))))) diff -r 735a36dd65b2 -r 0d3927b911ce yatex.new --- a/yatex.new Mon May 14 20:04:36 2012 +0900 +++ b/yatex.new Mon Apr 01 22:53:13 2013 +0900 @@ -1,6 +1,11 @@ What's new in YaTeX/yahtml 野鳥/yahtml - 各バージョンの変更点について +1.77 last-command-char 廃止対策を追加。 + === yatex === + %#DVIPDF でdviからpdfへの変換コマンドを指定可能に。 + PDFヴューアに xpdf, pdfopen, mupdf, zathura, okular を追加。 + 1.76 === yatex === タイプセットでラベル未定義があったら自動的にrerunする。 自動rerun無効化は YaTeX-typeset-auto-rerun を nil に。 @@ -18,7 +23,7 @@ M-C-SPC で環境だけでなく数式環境もマークする。 [prefix] t d でタイプセッタ起動成功のあと dvipdfmx を起動。 \label{}でラベル名を入れたときは \ref{NAME} を自動的にkill-ringに追加。 - [prefix] t c で\label{NAME} の NAME を変えたら \ref のNAMEも変える。 + [prefix] c で\label{NAME} の NAME を変えたら \ref のNAMEも変える。 同上のことを \cite/\bibitem にも。 \bibitem{}を入れたときは \cite{TAG} を自動的にkill-ringに追加。 \end 補完のお節介検査の精度を少し上げた。 diff -r 735a36dd65b2 -r 0d3927b911ce yatex19.el --- a/yatex19.el Mon May 14 20:04:36 2012 +0900 +++ b/yatex19.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,9 +1,9 @@ -;;; -*- Emacs-Lisp -*- -;;; YaTeX facilities for Emacs 19 or later -;;; (c)1994-2012 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sun Jan 29 23:00:52 2012 on firestorm +;;; yatex19.el -- YaTeX facilities for Emacs 19 or later +;;; (c)1994-2013 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Mon Apr 1 22:42:46 2013 on firestorm ;;; $Id$ +;;; Code: ;(require 'yatex) (and (boundp 'YaTeX-use-hilit19) diff -r 735a36dd65b2 -r 0d3927b911ce yatexadd.el --- a/yatexadd.el Mon May 14 20:04:36 2012 +0900 +++ b/yatexadd.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,10 +1,10 @@ -;;; -*- Emacs-Lisp -*- -;;; YaTeX add-in functions. +;;; yatexadd.el --- YaTeX add-in functions ;;; yatexadd.el rev.20 -;;; (c)1991-2012 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Fri Mar 9 21:19:09 2012 on firestorm +;;; (c)1991-2013 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Mon Apr 1 22:43:00 2013 on firestorm ;;; $Id$ +;;; Code: ;;; ;;Sample functions for LaTeX environment. ;;; @@ -432,7 +432,7 @@ (defun YaTeX::label-search-tag () (interactive) (let ((case-fold-search t) - (tag (regexp-quote (char-to-string last-command-char)))) + (tag (regexp-quote (char-to-string (YaTeX-last-key))))) (cond ((save-excursion (forward-char 1) diff -r 735a36dd65b2 -r 0d3927b911ce yatexenv.el --- a/yatexenv.el Mon May 14 20:04:36 2012 +0900 +++ b/yatexenv.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,10 +1,9 @@ -;;; -*- Emacs-Lisp -*- -;;; YaTeX environment-specific functions. -;;; yatexenv.el -;;; (c) 1994-2012 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sun Feb 12 11:15:33 2012 on firestorm +;;; yatexenv.el --- YaTeX environment-specific functions +;;; (c) 1994-2013 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Mon Apr 1 22:43:10 2013 on firestorm ;;; $Id$ +;;; Code: ;;; ;; Functions for tabular environment ;;; diff -r 735a36dd65b2 -r 0d3927b911ce yatexgen.el --- a/yatexgen.el Mon May 14 20:04:36 2012 +0900 +++ b/yatexgen.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,16 +1,15 @@ -;;; -*- Emacs-Lisp -*- -;;; YaTeX add-in function generator. -;;; yatexgen.el rev.5 +;;; yatexgen.el --- YaTeX add-in function generator(rev.5) + ;;; (c)1991-1995,1999,2000 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Fri Jun 27 12:09:37 2003 on firestorm +;;; Last modified Sat Sep 1 08:10:36 2012 on firestorm ;;; $Id$ +;;; Code: (require 'yatex) (defmacro YaTeX-setq (var japanese english) (list 'setq var - (if YaTeX-japan japanese english)) -) + (if YaTeX-japan japanese english))) (put 'YaTeX-setq 'lisp-indent-hook 1) @@ -29,8 +28,7 @@ reading my messages *carefully*, or you'll fail to generate appropriate function. - Hit return key!" -) + Hit return key!") (YaTeX-setq YaTeX-generate-start-message "さぁはじめるよ.\n1.登録したい補完をやってみて. @@ -40,33 +38,27 @@ "Let's begin completion for which you want to make add-in function. If you want to make add-in function for \\documentstyle input only `\\documentstyle{}' *with* completion of yatex-mode. -If you finish this, please press RET." -) +If you finish this, please press RET.") (YaTeX-setq YaTeX-generate-abort-message "やめた、やめた〜いめんどくせ〜" - "Aborted." -) + "Aborted.") (YaTeX-setq YaTeX-generate-same-message "それじゃ、なにも変わってねぇだろーが! やめた。" - "I found no difference between them. So I'm quitting." -) + "I found no difference between them. So I'm quitting.") (YaTeX-setq YaTeX-generate-invalid-message "それは、ちと無理というものじゃ." - "It's impossible." -) + "It's impossible.") (YaTeX-setq YaTeX-generate-idontknow-message "う〜ん、難しくてよくわからないなぁ。ばかでごめんねェ〜" - "Sorry I can't tell your adding method." -) + "Sorry I can't tell your adding method.") (YaTeX-setq YaTeX-generate-confirm-message "ということは、付け足したい部分はこれでいいのね" - "Is it additional string of add-in function?" -) + "Is it additional string of add-in function?") (YaTeX-setq YaTeX-generate-output-message "2.じゃ、それにくっつけたいものを *カーソルの位置に* 足してみて. @@ -75,8 +67,7 @@ で、またおわったらりたーん!!" "2.Then input additional string *at CURSOR POSITION* According to last example \\documentstyle{}, -modify it \\documentstyle[12pt]{}. RET to finish." -) +modify it \\documentstyle[12pt]{}. RET to finish.") (YaTeX-setq YaTeX-generate-put-arg-message "3.このうち、キーボードから読み込んで欲しい文字列を順に入れて。 @@ -86,8 +77,7 @@ "3.In this string, extract string which you want to input from key board with quiry afterwards. For example, though additional string is \\documentstyle[12pt]{}, but you want enter only `12pt' by hand. -RET to finish!" -) +RET to finish!") (YaTeX-setq YaTeX-generate-read-prompt-message "4.では、あとでこれらの文字列を読み込む時に、どういうプロンプトを @@ -95,8 +85,7 @@ さっきの 12pt の部分だったら、『サイズは』とかがおすすめ。" "4.When you use this add-in function afterwards, what message do you like to be prompted with to enter these values. In last -example `12pt', typical prompt string may be `Size?: '." -) +example `12pt', typical prompt string may be `Size?: '.") (YaTeX-setq YaTeX-generate-done-message "よし! これが、君の作りたかった関数だ。~/.emacs にでも入れてせいぜい @@ -109,34 +98,29 @@ for testing of this function please. But you can see this function quite easy, can't you? You had better write your most favorite add-in function yourself! -" -) +") (YaTeX-setq YaTeX-generate-nomatch-message "こらこら、そんな文字列どこにもねーぞ!!" - "No such string in additional string." -) + "No such string in additional string.") + (YaTeX-setq YaTeX-generate-buffer "*付加関数生成バッファ*" - "*Generate-add-in-function*" -) + "*Generate-add-in-function*") (YaTeX-setq YaTeX-generate-message-buffer "*ご案内*" - "*Guide*" -) + "*Guide*") (YaTeX-setq YaTeX-generate-bug-message "ごめ〜ん!! ちょっと、このアドイン関数つくるの失敗しちゃったみたい!! 作者まで連絡してくださ〜〜〜い!" "Sorry I failed to make add-in function for you... -Send bug report to me." -) +Send bug report to me.") (YaTeX-setq YaTeX-generate-narrow-message "画面がせますぎるような気がします。" - "Too narrow screen height." -) + "Too narrow screen height.") (defvar YaTeX-generate-message-height 10 "Window height of YaTeX-generate-message-buffer") @@ -249,8 +233,7 @@ (condition-case error (eval-current-buffer) (error (insert YaTeX-generate-bug-message))) - (pop-to-buffer YaTeX-generate-message-buffer) -) + (pop-to-buffer YaTeX-generate-message-buffer)) (defun YaTeX-generate-parse-add-in (args add-in) "Parse add-in string and extract argument for it. @@ -313,8 +296,7 @@ (insert ")\n(concat " (YaTeX-generate-lisp-quote string) ")))\n") (indent-region (point-min) (point) nil) - used) -) + used)) (defun YaTeX-generate-ask-match-position () "Ask user whether match-position is in his expectation, @@ -331,14 +313,12 @@ (insert "\n" (if YaTeX-japan "ここにも対応してるの?" "this underlined part too?")) (other-window -1) - (y-or-n-p (if YaTeX-japan "下線部はあってますか" "Is underline right")) -) + (y-or-n-p (if YaTeX-japan "下線部はあってますか" "Is underline right"))) (defun YaTeX-generate-register-match () (nconc arg (list (list beg end))) (let ((x beg)) - (while (< x end) (aset used x i)(setq x (1+ x)))) -) + (while (< x end) (aset used x i)(setq x (1+ x))))) (defun YaTeX-generate-display-message (mes &optional bottom) "Display message to generation buffer." @@ -347,8 +327,7 @@ (insert "\n\n") (if bottom (recenter (1- bottom)) (recenter 0)) (insert mes) - (other-window -1) -) + (other-window -1)) (defun YaTeX-generate-move-to-add-in-position () "Move cursor where add-in function should insert string." @@ -366,9 +345,7 @@ ((eq YaTeX-current-completion-type 'maketitle) (goto-char (point-max)) (if (= (preceding-char) ? ) - (forward-char -1))) - ) -) + (forward-char -1))))) (defun YaTeX-generate-function-name () (concat @@ -376,8 +353,7 @@ (cond ((eq YaTeX-current-completion-type 'begin) YaTeX-env-name) ((eq YaTeX-current-completion-type 'section) YaTeX-section-name) - ((eq YaTeX-current-completion-type 'maketitle) YaTeX-single-command))) -) + ((eq YaTeX-current-completion-type 'maketitle) YaTeX-single-command)))) (defun YaTeX-generate-lisp-quote (str) (let ((len (length str))(i 0) (quote "")) @@ -388,8 +364,7 @@ (setq quote (concat quote "\"")) (setq quote (concat quote (substring str i (1+ i))))) (setq i (1+ i))) - quote) -) + quote)) (defun YaTeX-generate-quote-quote (str) (let ((len (length str))(i 0) (quote "")) @@ -398,15 +373,13 @@ (setq quote (concat quote (char-to-string 127)))) (setq quote (concat quote (substring str i (1+ i)))) (setq i (1+ i))) - quote) -) + quote)) (defun YaTeX-suppress-sparse-keymap (map) (let ((i ? )) (while (< i 127) (define-key map (char-to-string i) 'undefined) - (setq i (1+ i)))) -) + (setq i (1+ i))))) ;;; ;; Auto-generate Function for Lispers. @@ -423,8 +396,8 @@ ((= c ?p) 'oneof) ((= c ?o) 'coord) ;;((= c ?m) 'macro) - (t 'quit))) - ) + (t 'quit)))) + (defun YaTeX-generate-read-completion-table () (let ((i 1) cand (cands "(") (cb (current-buffer)) (buf (get-buffer-create " *Candidates*"))) @@ -441,8 +414,8 @@ (insert cand "\n")) (kill-buffer buf))) ;;(set-buffer cb) - (setq YaTeX-generate-current-completion-table (concat cands ")"))) -) + (setq YaTeX-generate-current-completion-table (concat cands ")")))) + (defun YaTeX-generate-corresponding-paren (left) (cond ((equal left "{") "}") @@ -450,16 +423,16 @@ ((equal left "(") ")") ((equal left "<") ">") ((equal left "\\begin{") "}") - (t left)) -) + (t left))) + (defun YaTeX-generate-create-read-string (&optional nth) (concat "(read-string \"" (read-string (if nth (format "Prompt for argument#%d: " nth) "Prompt: ")) ": \"\n" "\"" (read-string "Default: ") "\"" - ")\n") -) + ")\n")) + (defun YaTeX-generate-create-completing-read (&optional nth) (prog1 (concat @@ -475,21 +448,21 @@ (cons (cons (format "YaTeX-%s-%d" command (or nth 0)) YaTeX-generate-current-completion-table) - YaTeX-generate-variables-for-learning)))) -) + YaTeX-generate-variables-for-learning))))) + (defun YaTeX-generate-create-read-file-name (&optional nth) (concat "(read-file-name \"" (read-string (if nth (format "Prompt for argument#%d: " nth) "Prompt: ")) - ": \" "" \"\" t \"\")\n") -) + ": \" "" \"\" t \"\")\n")) + (defun YaTeX-generate-create-read-oneof (&optional nth readpos) (concat (if readpos "(YaTeX:read-position \"" "(YaTeX:read-oneof \"") - (read-string "Acceptable characters: " "lcr") "\")\n") -) + (read-string "Acceptable characters: " "lcr") "\")\n")) + (defun YaTeX-generate-option-type (command) (let ((func (format "YaTeX:%s" command)) leftp (buf (get-buffer-create YaTeX-generate-buffer)) type (n 1)) @@ -546,8 +519,8 @@ (goto-char (point-min)) (while (not (eobp)) (lisp-indent-line) (forward-line 1)) (eval-current-buffer) - buf) -) + buf)) + (defun YaTeX-generate-argument-type (command argc) "Create an argument-type add-in function." (interactive) @@ -581,8 +554,8 @@ (YaTeX-update-table (if (> argc 1) (list command argc) (list command)) 'section-table 'user-section-table 'tmp-section-table) - buf) -) + buf)) + (defun YaTeX-generate-simple (&optional command) "Simple but requiring some elisp knowledge add-in generator." (interactive) @@ -607,6 +580,6 @@ (YaTeX-generate-option-type command) (YaTeX-generate-argument-type command - (string-to-int (read-string "How many arguments?: ")))) nil) -) + (string-to-int (read-string "How many arguments?: ")))) nil)) + (provide 'yatexgen) diff -r 735a36dd65b2 -r 0d3927b911ce yatexhie.el --- a/yatexhie.el Mon May 14 20:04:36 2012 +0900 +++ b/yatexhie.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,10 +1,10 @@ -;;; -*- Emacs-Lisp -*- -;;; YaTeX hierarchy browser. -;;; yatexhie.el -;;; (c)1995-2012 by HIROSE Yuuji [yuuji@yatex.org] -;;; Last modified Mon Jan 9 20:19:06 2012 on firestorm +;;; yatexhie.el --- YaTeX hierarchy browser +;;; +;;; (c)1995-2013 by HIROSE Yuuji [yuuji@yatex.org] +;;; Last modified Mon Apr 1 22:43:34 2013 on firestorm ;;; $Id$ +;;; Code: ;; ----- Customizable variables ----- (defvar YaTeX-hierarchy-ignore-heading-regexp "\\$[A-Z][a-z]+: .* \\$\\|-\\*- .* -\\*-" diff -r 735a36dd65b2 -r 0d3927b911ce yatexhlp.el --- a/yatexhlp.el Mon May 14 20:04:36 2012 +0900 +++ b/yatexhlp.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,10 +1,10 @@ -;;; -*- Emacs-Lisp -*- -;;; YaTeX helper with LaTeX commands and macros. -;;; yatexhlp.el +;;; yatexhlp.el --- YaTeX helper with LaTeX commands and macros +;;; ;;; (c)1994,1998,2004 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Tue Oct 19 01:13:21 2004 on firestorm +;;; Last modified Sat Sep 1 08:11:14 2012 on firestorm ;;; $Id$ +;;; Code: (let ((help-file (concat "YATEXHLP." (cond (YaTeX-japan "jp") (t "eng")))) diff -r 735a36dd65b2 -r 0d3927b911ce yatexinf.el --- a/yatexinf.el Mon May 14 20:04:36 2012 +0900 +++ b/yatexinf.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,8 +1,8 @@ -;;; -*- Emacs-Lisp -*- -;;; YaTeX interfaces for Texinfo mode. -;;; (c)1994-2012 by HIROSE, Yuuji [yuuji@yatex.org] -;;; Last modified Mon Jan 9 20:19:55 2012 on firestorm +;;; yatexinf.el -- YaTeX interfaces for Texinfo mode +;;; (c)1994-2013 by HIROSE, Yuuji [yuuji@yatex.org] +;;; Last modified Mon Apr 1 22:43:58 2013 on firestorm +;;; Code: (require 'yatex) (or (boundp 'texinfo-mode-map) (load "texinfo")) diff -r 735a36dd65b2 -r 0d3927b911ce yatexlib.el --- a/yatexlib.el Mon May 14 20:04:36 2012 +0900 +++ b/yatexlib.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,10 +1,10 @@ -;;; -*- Emacs-Lisp -*- -;;; YaTeX and yahtml common libraries, general functions and definitions -;;; yatexlib.el -;;; (c)1994-2012 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Wed Feb 29 09:49:30 2012 on firestorm +;;; yatexlib.el --- YaTeX and yahtml common libraries +;;; +;;; (c)1994-2013 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Mon Apr 1 22:44:06 2013 on firestorm ;;; $Id$ +;;; Code: ;; General variables (defvar YaTeX-dos (memq system-type '(ms-dos windows-nt OS/2))) (defvar YaTeX-macos (memq system-type '(darwin))) @@ -755,13 +755,15 @@ (defvar YaTeX-skip-next-reader-char ?\C-j) (defun YaTeX-read-string-or-skip (&rest args) "Read string, or skip if last input char is \C-j." - (if (equal last-input-char YaTeX-skip-next-reader-char) + (if (equal (if (boundp 'last-input-event) last-input-event last-input-char) + YaTeX-skip-next-reader-char) "" (apply 'read-string args))) (defun YaTeX-completing-read-or-skip (&rest args) "Do completing-read, or skip if last input char is \C-j." - (if (equal last-input-char YaTeX-skip-next-reader-char) + (if (equal (if (boundp 'last-input-event) last-input-event last-input-char) + YaTeX-skip-next-reader-char) "" (apply 'completing-read args))) @@ -839,11 +841,18 @@ ;; Interface function for windows.el ;;; ;;;###autoload +(fset 'YaTeX-last-key + (if (fboundp 'win:last-key) + 'win:last-key + '(lambda () (if (boundp 'last-command-char) + last-command-char + last-command-event)))) (defun YaTeX-switch-to-window () "Switch to windows.el's window decided by last pressed key." (interactive) (or (featurep 'windows) (error "Why don't you use `windows.el'?")) - (win-switch-to-window 1 (- last-command-char win:base-key))) + (win-switch-to-window 1 (- (YaTeX-last-key) win:base-key))) + ;;;###autoload (defun YaTeX-command-to-string (cmd) diff -r 735a36dd65b2 -r 0d3927b911ce yatexm-o.el --- a/yatexm-o.el Mon May 14 20:04:36 2012 +0900 +++ b/yatexm-o.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,8 +1,9 @@ -;;; -*- Emacs-Lisp -*- -;;; Sample startup file to invoke yatex-mode with outline-minor mode. +;;; yatexm-o.el --- Sample to invoke yatex-mode with outline-minor mode + ;;; (c)1993 by HIROSE Yuuji [yuuji@yatex.org] -;;; Last modified Fri Jun 27 12:10:15 2003 on firestorm +;;; Last modified Sat Sep 1 08:12:40 2012 on firestorm +;;; Code: ;;; ;; outline-minor-mode(使用しない場合は不要です) ;;; diff -r 735a36dd65b2 -r 0d3927b911ce yatexmth.el --- a/yatexmth.el Mon May 14 20:04:36 2012 +0900 +++ b/yatexmth.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,10 +1,10 @@ -;;; -*- Emacs-Lisp -*- -;;; YaTeX math-mode-specific functions. -;;; yatexmth.el -;;; (c)1993-2012 by HIROSE Yuuji [yuuji@yatex.org] -;;; Last modified Tue Jan 24 08:58:56 2012 on firestorm +;;; yatexmth.el --- YaTeX math-mode-specific functions +;;; +;;; (c)1993-2013 by HIROSE Yuuji [yuuji@yatex.org] +;;; Last modified Mon Apr 1 22:44:22 2013 on firestorm ;;; $Id$ +;;; Commentary: ;;; [Customization guide] ;;; ;;; By default, you can use two completion groups in YaTeX math @@ -84,6 +84,7 @@ ;;; これらを ~/.emacs に書いておけば、math-mode で自分専用のイメージ ;;; 補完が利用できます。 +;;; Code: (defvar YaTeX-jisold (and (boundp 'dos-machine-type) (eq dos-machine-type 'pc98))) @@ -687,7 +688,9 @@ 2)))) (let ((char (read-char))) (or (eq char exit-char) - (setq unread-command-char char)))) + (if (boundp 'unread-command-events) + (setq unread-command-events (list char)) + (setq unread-command-char char))))) (if insert-end (save-excursion (delete-region insert-start insert-end))) @@ -699,7 +702,7 @@ (interactive "P") (let*((key (or initial "")) regkey str last-char list i (case-fold-search nil) match sign - (this-key (char-to-string last-command-char)) + (this-key (char-to-string (YaTeX-last-key))) (alistsym (cdr (assoc this-key YaTeX-math-key-list))) (alistname (symbol-name alistsym)) (alist (symbol-value alistsym)) @@ -779,7 +782,9 @@ (cond ((memq result '(t select)) (if (eq result t) - (setq unread-command-char last-char) + (if (boundp 'unread-command-events) + (setq unread-command-events (list last-char)) + (setq unread-command-char last-char)) (message "Done.")) (if (assoc YaTeX-single-command section-table) (YaTeX-make-section nil nil nil YaTeX-single-command) diff -r 735a36dd65b2 -r 0d3927b911ce yatexpkg.el --- a/yatexpkg.el Mon May 14 20:04:36 2012 +0900 +++ b/yatexpkg.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,10 +1,10 @@ -;;; -*- Emacs-Lisp -*- -;;; YaTeX package manager -;;; yatexpkg.el -;;; (c)2003-2012 by HIROSE, Yuuji [yuuji@yatex.org] -;;; Last modified Mon Jan 9 20:13:53 2012 on firestorm +;;; yatexpkg.el --- YaTeX package manager +;;; +;;; (c)2003-2013 by HIROSE, Yuuji [yuuji@yatex.org] +;;; Last modified Mon Apr 1 22:44:31 2013 on firestorm ;;; $Id$ +;;; Code: (defvar YaTeX-package-ams-envs (mapcar 'car YaTeX-ams-env-table)) diff -r 735a36dd65b2 -r 0d3927b911ce yatexprc.el --- a/yatexprc.el Mon May 14 20:04:36 2012 +0900 +++ b/yatexprc.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,10 +1,10 @@ -;;; -*- Emacs-Lisp -*- -;;; YaTeX process handler. -;;; yatexprc.el -;;; (c)1993-2012 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Fri Feb 17 22:35:38 2012 on firestorm +;;; yatexprc.el --- YaTeX process handler +;;; +;;; (c)1993-2013 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Mon Apr 1 22:44:38 2013 on firestorm ;;; $Id$ +;;; Code: ;(require 'yatex) (require 'yatexlib) @@ -849,7 +849,7 @@ (defvar YaTeX-dvi2-command-ext-alist '(("[agx]dvi\\|dviout" . ".dvi") ("ghostview\\|gv" . ".ps") - ("acroread\\|pdf\\|Preview\\|TeXShop\\|Skim\\|evince" . ".pdf"))) + ("acroread\\|xpdf\\|pdfopen\\|Preview\\|TeXShop\\|Skim\\|evince\\|mupdf\\|zathura\\|okular" . ".pdf"))) (defun YaTeX-get-preview-file-name (&optional preview-command) "Get file name to preview by inquiring YaTeX-get-latex-command" diff -r 735a36dd65b2 -r 0d3927b911ce yatexsec.el --- a/yatexsec.el Mon May 14 20:04:36 2012 +0900 +++ b/yatexsec.el Mon Apr 01 22:53:13 2013 +0900 @@ -1,10 +1,10 @@ -;;; -*- Emacs-Lisp -*- -;;; YaTeX sectioning browser. -;;; yatexsec.el -;;; (c) 1994-2012 by HIROSE Yuuji [yuuji@yatex.org] -;;; Last modified Mon Jan 9 20:20:32 2012 on firestorm +;;; yatexsec.el --- YaTeX sectioning browser +;;; +;;; (c) 1994-2013 by HIROSE Yuuji [yuuji@yatex.org] +;;; Last modified Mon Apr 1 22:46:28 2013 on firestorm ;;; $Id$ +;;; Code: (defvar YaTeX-sectioning-level '(("part" . 0) ("chapter" . 1) @@ -181,7 +181,7 @@ (defun YaTeX-sectioning-hide () "Call YaTeX-sectioning-hide-under with argument according to pressed key." (interactive) - (YaTeX-sectioning-hide-under (- last-command-char ?0))) + (YaTeX-sectioning-hide-under (- (YaTeX-last-key) ?0))) (defun YaTeX-sectioning-help () "Show help of sectioning."