Mercurial > hgrepos > hgweb.cgi > 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 wrap: on
line diff
--- a/yatexmth.el Wed Mar 16 10:26:25 2011 +0900 +++ b/yatexmth.el Thu Mar 24 10:38:10 2011 +0900 @@ -2,7 +2,7 @@ ;;; YaTeX math-mode-specific functions. ;;; yatexmth.el ;;; (c)1993-2010 by HIROSE Yuuji [yuuji@yatex.org] -;;; Last modified Wed Mar 16 10:18:04 2011 on firestorm +;;; Last modified Thu Mar 24 10:30:18 2011 on firestorm ;;; $Id$ ;;; [Customization guide] @@ -635,7 +635,7 @@ (progn (YaTeX-math-display-list (car list) cols) (setq cols (% (1+ cols) maxcols)))) (setq list (cdr list))) - (goto-line 4) + (goto-char (point-min)) (forward-line 3) (use-local-map YaTeX-math-menu-map) (setq buffer-read-only t) (unwind-protect
--- a/yatexsec.el Wed Mar 16 10:26:25 2011 +0900 +++ b/yatexsec.el Thu Mar 24 10:38:10 2011 +0900 @@ -2,7 +2,7 @@ ;;; YaTeX sectioning browser. ;;; yatexsec.el ;;; (c) 1994,1998,1999,2003 by HIROSE Yuuji [yuuji@yatex.org] -;;; Last modified Fri Jun 27 12:10:34 2003 on firestorm +;;; Last modified Thu Mar 24 10:35:24 2011 on firestorm ;;; $Id$ (defvar YaTeX-sectioning-level @@ -133,7 +133,8 @@ (or (and ln (string< "" ln) (progn - (goto-line (max 1 (1- (string-to-int ln)))) + (goto-char (point-min)) + (forward-line (max 0 (- (string-to-int ln) 2))) (and (search-forward ptn nil t) (goto-char (match-beginning 0)))))