Home Intro Announce FAQ Docs Download Mail Status Bugs Users Related FM Tools

PVS Bug 718


Synopsis:        detecting XEmacs 21
Severity:        serious
Priority:        medium
Responsible:     owre
State:           analyzed
Class:           sw-bug
Arrival-Date:    Fri Nov  8 12:10:01 2002
Originator:      Jan Schaumann
Organization:    netmeister.org
Release:         PVS 2.4
Environment: 
 System:          
 Architecture: 

Description: 
  Hi,
  
  I noticed that pvs is not detecing all variants of XEmacs 21.x
  correctly, causing problems when using 'pvs -emacs xemacs'.
  
  My emacs-version contains: "21.1 (patch 14) \"Cuyahoga Valley\" XEmacs
  Lucid"
  
  In ${PREFIX}/pvs/emacs/go-pvs.el I made this change to avoid errors:
  
  --- /tmp/go-pvs.el      Fri Nov  8 13:21:25 2002
  +++ /usr/pkg/pvs/emacs/go-pvs.el        Fri Nov  8 12:59:21 2002
  @@ -9,6 +9,8 @@
   (defconst pvs-emacs-system
     (cond ((string-match "Xemacs 21" (emacs-version))
           'xemacs21)
  +       ((and (string-match "XEmacs" (emacs-version)) (string-match "21"
  (emacs-version)))
  +        'xemacs21)
          ((string-match "XEmacs 20" (emacs-version))
           'xemacs20)
          ((string-match "XEmacs 19" (emacs-version))
  
  
  Now, I don't know if this is The Right Thing (string-match "XEmacs 21"
  may have sufficed), but thought I'd let you know.
  
  Cheers,
  -Jan
  
  -- 
  http://www.netbsd.org -
           Multiarchitecture OS, no hype required.

How-To-Repeat: 

Fix: 
Modified go-pvs.el as suggested, but made the match a little more specific
so as not to accidentally match, e.g., the normal string might be
something like

"XEmacs 20.8 (patch 8) \"Bryce Canyon\" [Lucid] (i686-pc-linux) of Fri Nov 21 1999 on linuxfs1.csl.sri.com"

so the new test is

(string-match "^21\..*XEmacs" emacs-version)

The two forms of string seem to come from two different definitions of
emacs-version; one is a constant and one a function.  The constant is of
the form reported in the bug report, but I couldn't find a version of
XEmacs where the function returned that form.

Home Intro Announce FAQ Docs Download Mail Status Bugs Users Related FM Tools