[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pvs error




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))))))))