yatex
diff yatexadd.el @ 51:b0371b6ed799
Created `ChangeLog'.
Log hereafter will be written in `ChangeLog'.
author | yuuji |
---|---|
date | Tue, 20 Dec 1994 21:00:21 +0000 |
parents | eb0512bfcb7f |
children | 5d94deabb9f9 |
line diff
1.1 --- a/yatexadd.el Fri Nov 25 08:26:13 1994 +0000 1.2 +++ b/yatexadd.el Tue Dec 20 21:00:21 1994 +0000 1.3 @@ -1,8 +1,8 @@ 1.4 ;;; -*- Emacs-Lisp -*- 1.5 ;;; YaTeX add-in functions. 1.6 -;;; yatexadd.el rev.9 1.7 +;;; yatexadd.el rev.11 1.8 ;;; (c )1991-1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp] 1.9 -;;; Last modified Sat Nov 12 07:03:15 1994 on VFR 1.10 +;;; Last modified Mon Dec 19 03:07:01 1994 on landcruiser 1.11 ;;; $Id$ 1.12 1.13 ;;; 1.14 @@ -176,19 +176,47 @@ 1.15 (YaTeX:read-coordinates "Dimension")) 1.16 ) 1.17 1.18 +(defvar YaTeX-minibuffer-quick-map nil) 1.19 +(if YaTeX-minibuffer-quick-map nil 1.20 + (setq YaTeX-minibuffer-quick-map 1.21 + (copy-keymap minibuffer-local-completion-map)) 1.22 + (let ((ch (1+ ? ))) 1.23 + (while (< ch 127) 1.24 + (define-key YaTeX-minibuffer-quick-map (char-to-string ch) 1.25 + 'YaTeX-minibuffer-quick-complete) 1.26 + (setq ch (1+ ch))))) 1.27 + 1.28 +(defvar YaTeX:left-right-delimiters 1.29 + '(("(" . ")") (")" . "(") ("[" . "]") ("]" . "[") 1.30 + ("\\{" . "\\}") ("\\}" . "\\{") ("|") ("\\|") 1.31 + ("\\lfloor" . "\\rfloor") ("\\lceil" . "\\rceil") 1.32 + ("\\langle" . "\\rangle") ("/") (".") 1.33 + ("\\rfloor" . "\\rfloor") ("\\rceil" . "\\lceil") 1.34 + ("\\rangle" . "\\langle") ("\\backslash") 1.35 + ("\\uparrow") ("\\downarrow") ("\\updownarrow") ("\\Updownarrow")) 1.36 + "TeX math delimiter, which can be completed after \\right or \\left.") 1.37 + 1.38 +(defvar YaTeX:left-right-default nil "Default string of YaTeX:right.") 1.39 + 1.40 (defun YaTeX:left () 1.41 - (let (c) 1.42 - (while (not (string-match 1.43 - (progn (message "Which parenthesis? One of [{(|)}]: ") 1.44 - (setq c (regexp-quote (char-to-string (read-char))))) 1.45 - "[{(|)}]"))) 1.46 - (setq single-command "right") 1.47 - (cond 1.48 - ((string-match c "[(|)]") c) 1.49 - (t (concat "\\" c)))) 1.50 -) 1.51 + (let ((minibuffer-completion-table YaTeX:left-right-delimiters) 1.52 + delimiter (leftp (string= single-command "left"))) 1.53 + (setq delimiter 1.54 + (read-from-minibuffer 1.55 + (format "Delimiter%s: " 1.56 + (if YaTeX:left-right-default 1.57 + (format "(default=`%s')" YaTeX:left-right-default) 1.58 + "(SPC for menu)")) 1.59 + nil YaTeX-minibuffer-quick-map)) 1.60 + (if (string= "" delimiter) (setq delimiter YaTeX:left-right-default)) 1.61 + (setq single-command (if leftp "right" "left") 1.62 + YaTeX:left-right-default 1.63 + (or (cdr (assoc delimiter YaTeX:left-right-delimiters)) delimiter)) 1.64 + delimiter)) 1.65 + 1.66 (fset 'YaTeX:right 'YaTeX:left) 1.67 1.68 + 1.69 (defun YaTeX:read-coordinates (&optional mes varX varY) 1.70 (concat 1.71 "(" 1.72 @@ -487,7 +515,7 @@ 1.73 (if (> argc 0) (insert (format "[%d]" argc))) 1.74 (if (and (stringp command) 1.75 (string< "" command) 1.76 - (y-or-n-p "Update user completion table?")) 1.77 + (y-or-n-p "Update dictionary?")) 1.78 (cond 1.79 ((= argc 0) 1.80 (YaTeX-update-table 1.81 @@ -515,6 +543,8 @@ 1.82 "Page style: " 1.83 '(("plain") ("empty") ("headings") ("myheadings") ("normal") nil)) 1.84 ) 1.85 +(fset 'YaTeX::thispagestyle 'YaTeX::pagestyle) 1.86 + 1.87 ;; 1.88 ; completion for the arguments of \pagenumbering 1.89 ;; 1.90 @@ -570,6 +600,7 @@ 1.91 "*User definable alist of local style parameters.") 1.92 1.93 (defvar YaTeX:length-history nil "Holds history of length.") 1.94 +(put 'YaTeX:length-history 'no-default t) 1.95 (defun YaTeX::setlength (&optional argp) 1.96 "YaTeX add-in function for arguments of \\setlength." 1.97 (cond 1.98 @@ -583,8 +614,7 @@ 1.99 nil nil "\\") 1.100 ) 1.101 ((equal 2 argp) 1.102 - (let ((minibuffer-history-symbol 'YaTeX:length-history)) 1.103 - (read-string "Length: ")))) 1.104 + (read-string-with-history "Length: " nil 'YaTeX:length-history))) 1.105 ) 1.106 (fset 'YaTeX::addtolength 'YaTeX::setlength) 1.107 1.108 @@ -670,7 +700,7 @@ 1.109 (minibuffer-completion-table dt) 1.110 (opt (read-from-minibuffer 1.111 "Style options ([opt1,opt2,...]): " 1.112 - nil YaTeX-minibuffer-completion-map)) 1.113 + nil YaTeX-minibuffer-completion-map nil)) 1.114 (substr opt) o) 1.115 (if (string< "" opt) 1.116 (progn 1.117 @@ -689,9 +719,10 @@ 1.118 ""))) 1.119 1.120 (defun YaTeX::documentstyle (&optional argp) 1.121 - "YaTeX add-in function for arguments of \\socumentstyle." 1.122 + "YaTeX add-in function for arguments of \\documentstyle." 1.123 (cond 1.124 ((equal argp 1) 1.125 + (setq env-name "document") 1.126 (let ((sname 1.127 (YaTeX-cplread-with-learning 1.128 (format "Documentstyle (default %s): "