Mercurial > hgrepos > hgweb.cgi > yatex
changeset 327:2bc5b59840d5 dev
Change default previewer after [prefix]td
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Thu, 13 Nov 2014 08:59:40 +0900 |
parents | d989511a492a |
children | d972598d233b |
files | yatex.el |
diffstat | 1 files changed, 16 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/yatex.el Wed Nov 05 09:09:22 2014 +0900 +++ b/yatex.el Thu Nov 13 08:59:40 2014 +0900 @@ -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 Sun Jul 6 13:25:42 2014 on firestorm +;;; Last modified Sun Sep 21 21:57:39 2014 on firestorm ;;; $Id$ ;;; The latest version of this software is always available at; ;;; http://www.yatex.org/ @@ -61,6 +61,13 @@ "*Default previewer command including its option. This default value is for X window system.") +(defvar tex-pdfview-command ;previewer command for your site + (cond + (YaTeX-dos "acroread") + (YaTeX-macos "open") + (t "evince")) + "*Default PDF viewer command including its option.") + (defvar makeindex-command (if YaTeX-dos "makeind" "makeindex") "*Default makeindex command.") @@ -1619,7 +1626,8 @@ (require 'yatexprc) ;for Nemacs's bug (select-window sw) (cond - ((memq c '(?j ?\C-j)) (YaTeX-typeset-buffer)) ; memq for usability test + ((memq c '(?j ?\C-j)) (YaTeX-typeset-buffer) ; memq for usability test + (put 'dvi2-command 'format 'dvi)) ((= c ?r) (YaTeX-typeset-region)) ((= c ?e) (YaTeX-typeset-environment)) ((= c ?b) (YaTeX-call-builtin-on-file @@ -1630,7 +1638,8 @@ ((= c ?p) (call-interactively 'YaTeX-preview)) ((= c ?q) (YaTeX-system "lpq" "*Printer queue*")) ((= c ?d) (YaTeX-typeset-buffer - (or (YaTeX-get-builtin "DVIPDF") YaTeX-dvipdf-command))) + (or (YaTeX-get-builtin "DVIPDF") YaTeX-dvipdf-command)) + (put 'dvi2-command 'format 'pdf)) ((= c ?v) (YaTeX-view-error)) ((= c ?l) (YaTeX-lpr arg)) ((= c ?m) (YaTeX-switch-mode-menu arg)) @@ -2019,9 +2028,10 @@ (goto-char (match-beginning 0)) (throw 'found t)) ;;If inside of parentheses, try to escape. - (while (condition-case err - (progn (up-list -1) t) - (error nil))) + (while (and (not (= (preceding-char) ?\])) ;skip optional arg + (condition-case err + (progn (up-list -1) t) + (error nil)))) (while (equal (preceding-char) ?\]) (backward-list)) ;;(2) search command directly (skip-chars-forward "^{}[]")