[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pvs error
- To: Magesh Narayanan <mnarayan@ececs.uc.edu>
- Subject: Re: pvs error
- From: Dave Stringer-Calvert <dave_sc@csl.sri.com>
- Date: Thu, 25 Jun 1998 15:07:08 -0700
- cc: pvs-help@csl.sri.com
- In-reply-to: Your message of "Thu, 25 Jun 1998 14:16:24 EDT." <Pine.LNX.3.96.980625141434.8370J-100000@viking.ececs.uc.edu>
Magesh ---
I've reproduced your problem with emacs20, and the the fix is included
below. You can either edit the file <PVSHOME>/emacs/pvs-utils.el and
replace the definition of function get-pvs-file-buffer with the new code,
or just put the code in a file called .pvsemacs in your home directory.
Dave
---
Dr Dave Stringer-Calvert, Software Engineer, Computer Science Laboratory,
SRI International, 333 Ravenswood Avenue, Menlo Park, CA 94025-3493, USA.
Phone: (650) 859-3291 Fax: (650) 859-2844 Email: dave_sc@csl.sri.com
-------------------------cut here-----------------------------------------
(defun get-pvs-file-buffer (fname)
(let* ((name (pathname-name fname))
(ext (pathname-type fname))
(pdir (pathname-directory name))
(dir (if (equal pdir "")
*pvs-current-directory*
pdir)))
(if (and ext (not (equal ext "")))
(let ((filename (format "%s%s.%s" dir name ext)))
(find-file-noselect filename))
(let ((files nil))
(dolist (ext *pvs-file-extensions*)
(let ((filename (format "%s%s.%s" dir name ext)))
(when (file-exists-p filename)
(push filename files))))
(cond ((cdr files)
(error "%s is ambiguous: one of %s" name files))
((car files)
(find-file-noselect (car files))))))))