yatex

diff yatexenv.el @ 49:eb0512bfcb7f

Abolish user-article table. Use normal read-string instead. Supply smart add-in function for documentstyle. Update user dictionary whenever new words entered. Enhance [prefix] c. Allow user defined sectioning commands in yatexsec.
author yuuji
date Fri, 25 Nov 1994 08:26:13 +0000
parents cd1b63102eed
children 5f4b18da14b3
line diff
     1.1 --- a/yatexenv.el	Mon Sep 19 16:54:19 1994 +0000
     1.2 +++ b/yatexenv.el	Fri Nov 25 08:26:13 1994 +0000
     1.3 @@ -2,7 +2,7 @@
     1.4  ;;; YaTeX environment-specific functions.
     1.5  ;;; yatexenv.el
     1.6  ;;; (c ) 1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
     1.7 -;;; Last modified Tue Sep 20 01:35:46 1994 on figaro
     1.8 +;;; Last modified Thu Nov 24 04:33:18 1994 on 98fa
     1.9  ;;; $Id$
    1.10  
    1.11  ;;;
    1.12 @@ -13,7 +13,8 @@
    1.13  (defun YaTeX-array-what-column ()
    1.14    "Show matching columne title of array environment.
    1.15  When calling from a program, make sure to be in array/tabular environment."
    1.16 -  (let ((p (point)) beg eot bor (nlptn "\\\\\\\\") (andptn "[^\\]&") (n 0)
    1.17 +  (let ((p (point)) beg eot bor (nlptn "\\\\\\\\") (andptn "[^\\]&")
    1.18 +	(n 0) j
    1.19  	(firsterr "This line might be the first row."))
    1.20      (save-excursion
    1.21        (YaTeX-beginning-of-environment)
    1.22 @@ -46,24 +47,23 @@
    1.23  		     -1)))))
    1.24        (message "%s" n)
    1.25        (goto-char (1- beg))
    1.26 -      (cond
    1.27 -       ((= n 1) (message "Here is the FIRST column!"))
    1.28 -       (t (while (> n 1)
    1.29 -	    (or (re-search-forward andptn p nil)
    1.30 -		(error "This column exceeds the limit."))
    1.31 -	    (setq n (1- n)))
    1.32 -	  (skip-chars-forward "\\s ")
    1.33 -	  (message
    1.34 -	   "Here is the column of: %s"
    1.35 -	   (buffer-substring
    1.36 -	    (point)
    1.37 -	    (progn
    1.38 -	      (re-search-forward (concat andptn "\\|" nlptn) eot)
    1.39 -	      (goto-char (match-beginning 0))
    1.40 -	      (if (looking-at andptn)
    1.41 -		  (forward-char 1))
    1.42 -	      (skip-chars-backward "\\s ")
    1.43 -	      (point))))))))
    1.44 +      (setq j n)
    1.45 +      (while (> j 1)
    1.46 +	(or (re-search-forward andptn p nil)
    1.47 +	    (error "This column exceeds the limit."))
    1.48 +	(setq j (1- j)))
    1.49 +      (skip-chars-forward "\\s ")
    1.50 +      (message
    1.51 +       "This is the column(#%d) of: %s" n
    1.52 +       (buffer-substring
    1.53 +	(point)
    1.54 +	(progn
    1.55 +	  (re-search-forward (concat andptn "\\|" nlptn) eot)
    1.56 +	  (goto-char (match-beginning 0))
    1.57 +	  (if (looking-at andptn)
    1.58 +	      (forward-char 1))
    1.59 +	  (skip-chars-backward "\\s ")
    1.60 +	  (point))))))
    1.61  )
    1.62  
    1.63  ;;;###autoload