diff --git a/install b/install index d86e359..8ec64fa 100644 --- a/install +++ b/install @@ -20,16 +20,24 @@ in your ~/.emacs. �ȂǂƂ��܂��B -Then edit makefile and set your environment variable `DISPLAY' correctly, -exec the next. -������ makefile ��ҏW���A�‹��ϐ� DISPLAY �̒l�𐳂����Z�b�g���Ă��� +Then edit makefile and exec the next command. +������ makefile ��ҏW���A % make install + (or "sudo make install") �ŃC���X�g�[�����s���Ă��������B - If `make install' fails, do as follows; - ���� `make install' �ł��܂��s���Ȃ����͉��L�̂悤�Ɏ蓮�ŃC���X�g�[�� +Without installing to default-dir, you can use yatex by adding the elisp +obtained by below to ~/.emacs. +�C���X�g�[�����Ȃ��Ă��ȉ��̃R�}���h�o�͂� ~/.emacs �ɒlj������ +���ʂɎg���܂��B + + % make show-init2 + + +If `make install' fails, do as follows; +���� `make install' �ł��܂��s���Ȃ����͉��L�̂悤�Ɏ蓮�ŃC���X�g�[�� ���s���Ă��������B First, copy `*.el' to suitable directory. diff --git a/makefile b/makefile index 7e4a8e3..6efadd8 100644 --- a/makefile +++ b/makefile @@ -3,13 +3,13 @@ # # Edit these variables to be suitable for your site -PREFIX = /usr/local - -## mule2 +EMACS = emacs #EMACS = mule +PREFIX = `${EMACS} -batch --eval '(princ (expand-file-name "../../../.." data-directory))'` +# PREFIX = /usr/local + #EMACSDIR= ${PREFIX}/lib/${EMACS} ## emacs20 or later -EMACS = emacs EMACSDIR= ${PREFIX}/share/${EMACS} ## XEmacs #EMACS = xemacs @@ -25,8 +25,8 @@ LISPDIR = ${EMACSDIR}/site-lisp/yatex # LISPDIR = ${EMACSDIR}/site-packages/lisp/yatex DOCDIR = ${LISPDIR}/docs -HELPDIR = ${EMACSDIR}/site-lisp -INFODIR = ${PREFIX}/info +HELPDIR = ${LISPDIR}/help +INFODIR = ${PREFIX}/share/info TAR = tar INSTALL = install -c -m 444 @@ -41,7 +41,6 @@ # Do not edit below ################### # make install to install YaTeX into public space -# make install-nw same as above, but -nw mode, or Emacs18(Nemacs) # make ajimi to feel taste # make ajimi-nw same as above, but -nw mode # make package to create package for relase @@ -87,7 +86,7 @@ # @echo "If you don't use X-clinet of Emacs," # @echo 'type "make install-nw" instead.' -install: install-real +install: install-real install-message #install-yahtml: bytecompile-yahtml install-yahtml: [ -d ${LISPDIR} ] || mkdir ${LISPDIR} @@ -98,9 +97,10 @@ ${INSTALL} *.el* ${LISPDIR} install-real: - if [ ! -d ${LISPDIR} ]; then ${MKDIR} ${LISPDIR}; fi - if [ ! -d ${DOCDIR} ]; then ${MKDIR} ${DOCDIR}; fi - if [ ! -d ${INFODIR} ]; then ${MKDIR} ${INFODIR}; fi + [ -d ${LISPDIR} ] || ${MKDIR} ${LISPDIR} + [ -d ${HELPDIR} ] || ${MKDIR} ${HELPDIR} + [ -d ${DOCDIR} ] || ${MKDIR} ${DOCDIR} + [ -d ${INFODIR} ] || ${MKDIR} ${INFODIR} for f in *.el; do \ rm -f ${LISPDIR}/$${f}c; \ done @@ -108,10 +108,24 @@ ${INSTALL} ${DOCSRC} ${DOCDIR} ${INSTALL} ${DOCOBJ} ${INFODIR} ${INSTALL} ${HELP} ${HELPDIR} + +install-message: @echo "--------------------------------" @echo "If you have install-info command, type 'make install-info'." @echo "If not, add next lines into your site's info dir manually." @cat dir + @echo "--------------------------------" + @echo "=== INSTALLATION DONE ===" + @echo " You might need to add these expression below to your ~/.emacs" + @echo " ��λ. ~/.emacs ���˰ʲ����ɲä���ɬ�פ����뤫�⤷��ޤ���." + @echo + @echo ";;; ------ Startup definitions for YaTeX ------ ;;;" + @make show-init + @echo ";;; ------------------------------------------- ;;;" + @echo + @echo " To get elisp above again, call make command as below." + @echo " �嵭elisp���������ˤϰʲ��Τ褦��make��ư���Ƥ�������." + @echo " % make $${PREFIX:+PREFIX=$$PREFIX }show-init" install-info: for f in ${DOCOBJ}; do \ @@ -120,6 +134,30 @@ --section=Emacs $${f} ${INFODIR}/dir; \ done +show-init: + @printf '%s\n%s\n%s\n%s\n' \ + '(setq auto-mode-alist' \ + " (cons (cons \"\\.tex$$\" 'yatex-mode) auto-mode-alist))" \ + "(autoload 'yatex-mode \"yatex\" \"Yet Another LaTeX mode\" t)" \ + "(add-to-list 'load-path \"${LISPDIR}\")" + @printf '(setq tex-command "%s")%s\n' \ + `CMDS='platex pdflatex ptex2pdf lualatex' DFLT=latex \ + make search-cmd` + @printf '(setq dvi2-command "%s")%s\n' \ + `CMDS='pxdvi xdvik kxdvi dviout texworks' DFLT=xdvi \ + make search-cmd` + @printf '(setq tex-pdfview-command "%s")%s\n' \ + `CMDS='evince mupdf xpdf kpdf texworks sumatrapdf' \ + DFLT=acroread \ + make search-cmd` + +show-init2: + @make LISPDIR=$$PWD show-init + +search-cmd: + @for f in $$CMDS; do \ + type $$f >/dev/null 2>&1 && echo $$f && exit 0; done; echo $$DFLT + install-nw: bytecompile-nw install-real elc: bytecompile diff --git a/yatex.el b/yatex.el index dd8908c..a95578b 100644 --- a/yatex.el +++ b/yatex.el @@ -1,6 +1,6 @@ ;;; yatex.el --- Yet Another tex-mode for emacs //�쒹// -*- coding: sjis -*- -;;; (c)1991-2014 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Wed Dec 31 18:50:06 2014 on sdr +;;; (c)1991-2015 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Tue Jan 6 08:53:32 2015 on firestorm ;;; $Id$ ;;; The latest version of this software is always available at; ;;; http://www.yatex.org/ @@ -8,7 +8,7 @@ ;;; Code: (require 'comment) (require 'yatexlib) -(defconst YaTeX-revision-number "1.78.3" +(defconst YaTeX-revision-number "1.78.4" "Revision number of running yatex.el") ;---------- Local variables ---------- diff --git a/yatexhlp.el b/yatexhlp.el index 13309ca..b749440 100644 --- a/yatexhlp.el +++ b/yatexhlp.el @@ -1,7 +1,7 @@ ;;; yatexhlp.el --- YaTeX helper with LaTeX commands and macros ;;; -;;; (c)1994,1998,2004,2014 by HIROSE Yuuji.[yuuji@yatex.org] -;;; Last modified Sun Dec 21 22:55:07 2014 on firestorm +;;; (c)1994,1998,2004,2014,2015 by HIROSE Yuuji.[yuuji@yatex.org] +;;; Last modified Tue Jan 6 20:24:31 2015 on firestorm ;;; $Id$ ;;; Code: @@ -12,8 +12,9 @@ (cond ((and (boundp 'site-directory) site-directory) site-directory) ((string-match "\\.app/" doc-directory) ;For Emacs.app(Darwin) - (expand-file-name "../site-lisp" doc-directory)) - (YaTeX-emacs-19 (expand-file-name "../../site-lisp" doc-directory)) + (expand-file-name "../site-lisp/yatex" doc-directory)) + (YaTeX-emacs-19 + (expand-file-name "../../site-lisp/yatex" doc-directory)) (t exec-directory)))) (defvar YaTeX-help-file (expand-file-name help-file help-dir)