yatex

changeset 178:2f9069006bdb dev

avoid using goto-line
author yuuji@gentei.org
date Thu, 24 Mar 2011 10:38:10 +0900
parents 9c5a764a871f
children a925cf5222f3
files yatexmth.el yatexsec.el
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line diff
     1.1 --- a/yatexmth.el	Wed Mar 16 10:26:25 2011 +0900
     1.2 +++ b/yatexmth.el	Thu Mar 24 10:38:10 2011 +0900
     1.3 @@ -2,7 +2,7 @@
     1.4  ;;; YaTeX math-mode-specific functions.
     1.5  ;;; yatexmth.el
     1.6  ;;; (c)1993-2010 by HIROSE Yuuji [yuuji@yatex.org]
     1.7 -;;; Last modified Wed Mar 16 10:18:04 2011 on firestorm
     1.8 +;;; Last modified Thu Mar 24 10:30:18 2011 on firestorm
     1.9  ;;; $Id$
    1.10  
    1.11  ;;; [Customization guide]
    1.12 @@ -635,7 +635,7 @@
    1.13  	    (progn (YaTeX-math-display-list (car list) cols)
    1.14  		   (setq cols (% (1+ cols) maxcols))))
    1.15  	(setq list (cdr list)))
    1.16 -      (goto-line 4)
    1.17 +      (goto-char (point-min)) (forward-line 3)
    1.18        (use-local-map YaTeX-math-menu-map)
    1.19        (setq buffer-read-only t)
    1.20        (unwind-protect
     2.1 --- a/yatexsec.el	Wed Mar 16 10:26:25 2011 +0900
     2.2 +++ b/yatexsec.el	Thu Mar 24 10:38:10 2011 +0900
     2.3 @@ -2,7 +2,7 @@
     2.4  ;;; YaTeX sectioning browser.
     2.5  ;;; yatexsec.el
     2.6  ;;; (c) 1994,1998,1999,2003 by HIROSE Yuuji [yuuji@yatex.org]
     2.7 -;;; Last modified Fri Jun 27 12:10:34 2003 on firestorm
     2.8 +;;; Last modified Thu Mar 24 10:35:24 2011 on firestorm
     2.9  ;;; $Id$
    2.10  
    2.11  (defvar YaTeX-sectioning-level
    2.12 @@ -133,7 +133,8 @@
    2.13  	  (or
    2.14  	   (and ln (string< "" ln)
    2.15  		(progn
    2.16 -		  (goto-line (max 1 (1- (string-to-int ln))))
    2.17 +		  (goto-char (point-min))
    2.18 +		  (forward-line (max 0 (- (string-to-int ln) 2)))
    2.19  		  (and
    2.20  		   (search-forward ptn nil t)
    2.21  		   (goto-char (match-beginning 0)))))