comparison lisp/ilisp/ilisp-inp.el @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children b82b59fe008d
comparison
equal deleted inserted replaced
-1:000000000000 0:376386a54a3c
1 ;;; -*- Mode: Emacs-Lisp -*-
2
3 ;;; ilisp-inp.el --
4
5 ;;; This file is part of ILISP.
6 ;;; Version: 5.7
7 ;;;
8 ;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
9 ;;; 1993, 1994 Ivan Vasquez
10 ;;; 1994, 1995 Marco Antoniotti and Rick Busdiecker
11 ;;;
12 ;;; Other authors' names for which this Copyright notice also holds
13 ;;; may appear later in this file.
14 ;;;
15 ;;; Send mail to 'ilisp-request@lehman.com' to be included in the
16 ;;; ILISP mailing list. 'ilisp@lehman.com' is the general ILISP
17 ;;; mailing list were bugs and improvements are discussed.
18 ;;;
19 ;;; ILISP is freely redistributable under the terms found in the file
20 ;;; COPYING.
21
22
23
24 ;;;
25 ;;; ILISP input functions
26 ;;;
27
28 ;;;%%Input
29 (defun lisp-at-start ()
30 "Return the point if you are at the start of an input expression in
31 an inferior Lisp."
32 (save-excursion
33 (let ((point (point)))
34 (beginning-of-line)
35 (comint-skip-prompt)
36 (if (= point (point))
37 point))))
38
39 ;;;
40 (defun lisp-input-start ()
41 "Go to the start of the input region."
42 (let* ((pmark (process-mark (get-buffer-process (current-buffer)))))
43 (if (>= (point) pmark)
44 (goto-char pmark)
45 (progn
46 (end-of-line)
47 (if (re-search-backward comint-prompt-regexp (point-min) 'stay)
48 (comint-skip-prompt)
49 (point))))))