Mercurial > emacs
diff lisp/calc/calc.el @ 104543:da8b3e61b182
Use forward-line rather than goto-line.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 22 Aug 2009 19:29:18 +0000 |
parents | bdaf1510bb98 |
children | c4fb8f245750 |
line wrap: on
line diff
--- a/lisp/calc/calc.el Sat Aug 22 19:21:18 2009 +0000 +++ b/lisp/calc/calc.el Sat Aug 22 19:29:18 2009 +0000 @@ -1,7 +1,7 @@ ;;; calc.el --- the GNU Emacs calculator -;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005, +;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com> @@ -1615,11 +1615,13 @@ (and (memq 'position-point calc-command-flags) (if (eq major-mode 'calc-mode) (progn - (goto-line calc-final-point-line) + (goto-char (point-min)) + (forward-line (1- calc-final-point-line)) (move-to-column calc-final-point-column)) (save-current-buffer (calc-select-buffer) - (goto-line calc-final-point-line) + (goto-char (point-min)) + (forward-line (1- calc-final-point-line)) (move-to-column calc-final-point-column)))) (unless (memq 'keep-flags calc-command-flags) (save-excursion @@ -2019,7 +2021,8 @@ (eq (marker-buffer calc-trail-pointer) calc-trail-buffer)) (save-excursion (set-buffer calc-trail-buffer) - (goto-line 2) + (goto-char (point-min)) + (forward-line 1) (setq calc-trail-pointer (point-marker)))) calc-trail-buffer)