~vm/vm/vmpc-prompt

« back to all changes in this revision

Viewing changes to lisp/vm-version.el

  • Committer: Robert Widhopf-Fenk
  • Date: 2007-01-12 01:50:26 UTC
  • Revision ID: hack@robf.de-20070112015026-pvfvgthu2e6lx7ik
Reorganized the VM source tree and added a configure script.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
  "Version number of VM.")
6
6
 
7
7
(defun vm-version ()
8
 
  "Returns the value of the variable vm-version."
 
8
  "Returns the value of the variable `vm-version'."
9
9
  (interactive)
10
10
  (save-excursion
11
11
    (unless (get-buffer " *vm-version*")
14
14
             (d (file-name-directory f)))
15
15
        (setq default-directory d)
16
16
        (erase-buffer)
17
 
        (cond ((file-exists-p (setq f (expand-file-name ",id" d)))
18
 
               ;; insert content of ,id (in distributed bundle)
19
 
               (insert-file-contents f)
20
 
               (goto-char (point-min))
21
 
               (re-search-forward "^[^$]*\\$Id: \\([^$]+\\)\\$[^$]*")
22
 
               (replace-match (match-string 1)))
23
 
              ((file-exists-p (expand-file-name ".bzr" d))
 
17
        (cond ((file-exists-p (expand-file-name ".bzr" d))
24
18
               ;; get the current branch nick and revno from bzr 
25
19
               (insert (concat (shell-command-to-string "bzr nick") "-"
26
20
                               (shell-command-to-string "bzr revno"))))
 
21
              ((and (locate-library "vm-revno") (load-library "vm-revno"))
 
22
               (insert vm-revno))
27
23
              (t
28
24
               (insert vm-version 
29
25
                       "-cannot_determine_precise_VM_version.")))