5
(defconst vm-version "7.03"
6
"Version number of VM.")
9
"Returns the value of the variable vm-version."
12
(defconst vm-xemacs-p nil)
13
(defconst vm-xemacs-mule-p nil)
14
(defconst vm-xemacs-file-coding-p nil)
15
(defconst vm-fsfemacs-p nil)
16
(defconst vm-fsfemacs-mule-p nil)
17
(defun vm-xemacs-p () vm-xemacs-p)
18
(defun vm-xemacs-mule-p () vm-xemacs-mule-p)
19
(defun vm-xemacs-file-coding-p () vm-xemacs-file-coding-p)
20
(defun vm-fsfemacs-p () vm-fsfemacs-p)
21
(defun vm-fsfemacs-mule-p () vm-fsfemacs-mule-p)
22
(defun vm-note-emacs-version ()
23
(setq vm-xemacs-p (string-match "XEmacs" emacs-version)
24
vm-xemacs-mule-p (and vm-xemacs-p (featurep 'mule)
26
(fboundp 'set-buffer-file-coding-system))
27
vm-xemacs-file-coding-p (and vm-xemacs-p (featurep 'file-coding)
29
(fboundp 'set-buffer-file-coding-system))
30
vm-fsfemacs-p (not vm-xemacs-p)
31
vm-fsfemacs-mule-p (and (not vm-xemacs-mule-p) (featurep 'mule)
32
(fboundp 'set-buffer-file-coding-system))))
33
(vm-note-emacs-version)
35
(defun vm-mouse-fsfemacs-mouse-p ()
37
(fboundp 'set-mouse-position)))
39
(defun vm-mouse-xemacs-mouse-p ()
41
(fboundp 'set-mouse-position)))
43
(defun vm-menu-fsfemacs-menus-p ()
45
(fboundp 'menu-bar-mode)))
47
(defun vm-menu-fsfemacs19-menus-p ()
49
(fboundp 'menu-bar-mode)
50
(= emacs-major-version 19)))
52
(defun vm-menu-xemacs-menus-p ()
54
(fboundp 'set-buffer-menubar)))
56
(defun vm-menu-can-eval-item-name ()
58
(fboundp 'check-menu-syntax)
60
(check-menu-syntax '("bar" ((identity "foo") 'ding t)))
63
(defun vm-multiple-frames-possible-p ()
65
(or (memq 'win (device-matching-specifier-tag-list))
66
(featurep 'tty-frames)))
68
(fboundp 'make-frame))))
70
(defun vm-mouse-support-possible-p ()
72
(featurep 'window-system))
74
(fboundp 'track-mouse))))
76
(defun vm-mouse-support-possible-here-p ()
78
(memq 'win (device-matching-specifier-tag-list)))
80
(memq window-system '(x w32 win32)))))
82
(defun vm-menu-support-possible-p ()
86
(fboundp 'menu-bar-mode))))
88
(defun vm-toolbar-support-possible-p ()
89
(or (and vm-xemacs-p (featurep 'toolbar))
90
(and vm-fsfemacs-p (fboundp 'tool-bar-mode) (boundp 'tool-bar-map))))
92
(defun vm-multiple-fonts-possible-p ()
94
(memq (device-type) '(x mswindows)))
96
(memq window-system '(x w32 win32)))))
98
(defun vm-images-possible-here-p ()
99
(or (and vm-xemacs-p (memq (device-type) '(x mswindows)))
100
(and vm-fsfemacs-p window-system
101
(or (fboundp 'image-type-available-p)
102
(and (stringp vm-imagemagick-convert-program)
103
(stringp vm-imagemagick-identify-program))))))
105
(defun vm-image-type-available-p (type)
106
(if (fboundp 'image-type-available-p)
107
(image-type-available-p type)
108
(or (featurep type) (eq type 'xbm))))