;;; -*- Mode: Emacs-Lisp -*-
;;; This file is part of ILISP.
+;;; Please refer to the file COPYING for copyrights and licensing
+;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
+;;; of present and past contributors.
-;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
-;;; 1993, 1994 Ivan Vasquez
-;;; 1994, 1995, 1996 Marco Antoniotti and Rick Busdiecker
-;;; 1996-2000 Marco Antoniotti and Rick Campbell
-;;; Other authors' names for which this Copyright notice also holds
-;;; may appear later in this file.
-;;; Send mail to 'email@example.com' to be included in the
-;;; ILISP mailing list. 'firstname.lastname@example.org' is the general ILISP
-;;; mailing list were bugs and improvements are discussed.
-;;; ILISP is freely redistributable under the terms found in the file
(if (and tags-file-name (not source-ok))
(progn (setq lisp-using-tags t)
- (if (string-match "Lucid" emacs-version)
- (find-tag symbol-name stay)
- (find-tag symbol-name nil stay))
+ ;; Search through all files listed in tags table
+ (setq tags-loop-scan (list locator
+ (tags-loop-continue t))
+ (if (string-match "Lucid" emacs-version)
+ (find-tag symbol-name stay)
+ (find-tag symbol-name nil stay))))
;;; 19990804 Marco Antoniotti
-;;; The new ones (method and generic-fu
nction) should be carefully checked.
+;;; The new ones (method and generic-fuction) should be carefully checked.
(defun lisp-locate-clisp (symbol type first back)
"Try to find SYMBOL's TYPE definition in the current buffer.
-Return T if suc
cessful. FIRST is T if this is the first time in a
+Return T if sucessful. FIRST is T if this is the first time in a
file. BACK is T to go backwards."
(let* ((name (regexp-quote (lisp-symbol-name symbol)))
+;;;%% Locators for Scheme
+;;; Matthias Koeppe <mail.math.uni-magdeburg.de>
+;;; The standard locators would fail on "(define (thunk) ....)" and
+;;; report "(define (procedure ...) ....)" as a call to procedure.
+(defun ilisp-locate-scheme-definition (symbol type first back)
+ "Find SYMBOL's TYPE definition in the current file. Return T if successful.
+This is the Scheme counterpart of `lisp-locate-ilisp'."
+ "[ \t\n]*(def[^ \t\n]*[ \t\n]+(*%s\[ \t\n()]"
+ (regexp-quote (lisp-symbol-name symbol))))
+(defun ilisp-locate-scheme-calls (symbol type first back)
+ "Locate calls to SYMBOL.
+This is the Scheme counterpart of `lisp-locate-calls'."
+ (format "[( \t\n]+%s[ \t\n()]+"
+ ;; Scheme has no package prefixes, so we use
+ ;; lisp-symbol-name instead of lisp-buffer-symbol.
+ (lisp-symbol-name symbol))))
+ (def-regexp "[ \t\n]*(def[^ \t\n]*[ \t\n]+(*")
+ (while (eq result 'unknown)
+ (re-search-backward call-regexp nil t)
+ (re-search-forward call-regexp nil t))
+ (if (not (save-excursion ; check whether definition
+ (goto-char (match-beginning 0))
+ (backward-sexp) (backward-char)
+ (looking-at def-regexp)))
+ (t (setq result nil))))
;;; end of file -- ilisp-src.el --