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 wrap: on
line diff
--- a/yatexenv.el	Mon Oct 31 17:49:43 1994 +0000
+++ b/yatexenv.el	Fri Nov 25 08:26:13 1994 +0000
@@ -2,7 +2,7 @@
 ;;; YaTeX environment-specific functions.
 ;;; yatexenv.el
 ;;; (c ) 1994 by HIROSE Yuuji.[yuuji@ae.keio.ac.jp]
-;;; Last modified Tue Sep 20 01:35:46 1994 on figaro
+;;; Last modified Thu Nov 24 04:33:18 1994 on 98fa
 ;;; $Id$
 
 ;;;
@@ -13,7 +13,8 @@
 (defun YaTeX-array-what-column ()
   "Show matching columne title of array environment.
 When calling from a program, make sure to be in array/tabular environment."
-  (let ((p (point)) beg eot bor (nlptn "\\\\\\\\") (andptn "[^\\]&") (n 0)
+  (let ((p (point)) beg eot bor (nlptn "\\\\\\\\") (andptn "[^\\]&")
+	(n 0) j
 	(firsterr "This line might be the first row."))
     (save-excursion
       (YaTeX-beginning-of-environment)
@@ -46,24 +47,23 @@
 		     -1)))))
       (message "%s" n)
       (goto-char (1- beg))
-      (cond
-       ((= n 1) (message "Here is the FIRST column!"))
-       (t (while (> n 1)
-	    (or (re-search-forward andptn p nil)
-		(error "This column exceeds the limit."))
-	    (setq n (1- n)))
-	  (skip-chars-forward "\\s ")
-	  (message
-	   "Here is the column of: %s"
-	   (buffer-substring
-	    (point)
-	    (progn
-	      (re-search-forward (concat andptn "\\|" nlptn) eot)
-	      (goto-char (match-beginning 0))
-	      (if (looking-at andptn)
-		  (forward-char 1))
-	      (skip-chars-backward "\\s ")
-	      (point))))))))
+      (setq j n)
+      (while (> j 1)
+	(or (re-search-forward andptn p nil)
+	    (error "This column exceeds the limit."))
+	(setq j (1- j)))
+      (skip-chars-forward "\\s ")
+      (message
+       "This is the column(#%d) of: %s" n
+       (buffer-substring
+	(point)
+	(progn
+	  (re-search-forward (concat andptn "\\|" nlptn) eot)
+	  (goto-char (match-beginning 0))
+	  (if (looking-at andptn)
+	      (forward-char 1))
+	  (skip-chars-backward "\\s ")
+	  (point))))))
 )
 
 ;;;###autoload

yatex.org