comparison lisp/progmodes/idlw-shell.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 55ba5af4bf3a
children 468b7fa34d2c
comparison
equal deleted inserted replaced
104542:5986db97372e 104543:da8b3e61b182
1 ;; idlw-shell.el --- run IDL as an inferior process of Emacs. 1 ;; idlw-shell.el --- run IDL as an inferior process of Emacs.
2 2
3 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 3 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
4 ;; Free Software Foundation, Inc. 4 ;; 2009 Free Software Foundation, Inc.
5 5
6 ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> 6 ;; Authors: J.D. Smith <jdsmith@as.arizona.edu>
7 ;; Carsten Dominik <dominik@astro.uva.nl> 7 ;; Carsten Dominik <dominik@astro.uva.nl>
8 ;; Chris Chase <chase@att.com> 8 ;; Chris Chase <chase@att.com>
9 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> 9 ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu>
2315 (setq frame (idlwave-shell-pc-frame))) 2315 (setq frame (idlwave-shell-pc-frame)))
2316 (cond 2316 (cond
2317 (frame 2317 (frame
2318 (set-buffer (idlwave-find-file-noselect (car frame) 'shell)) 2318 (set-buffer (idlwave-find-file-noselect (car frame) 'shell))
2319 (widen) 2319 (widen)
2320 (goto-line (nth 1 frame))))) 2320 (goto-char (point-min))
2321 (forward-line (1- (nth 1 frame))))))
2321 2322
2322 (defun idlwave-shell-pc-frame () 2323 (defun idlwave-shell-pc-frame ()
2323 "Returns the frame for IDL execution." 2324 "Returns the frame for IDL execution."
2324 (and idlwave-shell-halt-frame 2325 (and idlwave-shell-halt-frame
2325 (list (nth 0 idlwave-shell-halt-frame) 2326 (list (nth 0 idlwave-shell-halt-frame)
2386 ;; enter the buffer and mark the line 2387 ;; enter the buffer and mark the line
2387 (save-excursion 2388 (save-excursion
2388 (set-buffer buffer) 2389 (set-buffer buffer)
2389 (save-restriction 2390 (save-restriction
2390 (widen) 2391 (widen)
2391 (goto-line (nth 1 frame)) 2392 (goto-char (point-min))
2392 (forward-line 0) 2393 (forward-line (1- (nth 1 frame)))
2393 (setq pos (point)) 2394 (setq pos (point))
2394 (setq idlwave-shell-is-stopped t) 2395 (setq idlwave-shell-is-stopped t)
2395 2396
2396 (if idlwave-shell-stop-line-overlay 2397 (if idlwave-shell-stop-line-overlay
2397 (progn 2398 (progn