Mercurial > hg > xemacs-beta
comparison lisp/version.el @ 187:b405438285a2 r20-3b20
Import from CVS: tag r20-3b20
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:56:28 +0200 |
parents | 5a88923fcbfe |
children | 41ff10fd062f |
comparison
equal
deleted
inserted
replaced
186:24ac94803b48 | 187:b405438285a2 |
---|---|
84 "Return string describing the version of Emacs that is running. | 84 "Return string describing the version of Emacs that is running. |
85 When called interactively with a prefix argument, insert string at point. | 85 When called interactively with a prefix argument, insert string at point. |
86 Don't use this function in programs to choose actions according | 86 Don't use this function in programs to choose actions according |
87 to the system configuration; look at `system-configuration' instead." | 87 to the system configuration; look at `system-configuration' instead." |
88 (interactive "p") | 88 (interactive "p") |
89 (let ((version-string | 89 (save-match-data |
90 (format | 90 (let ((version-string |
91 "XEmacs %s %s(%s%s) of %s %s on %s" | 91 (format |
92 (substring emacs-version 0 (string-match " XEmacs" emacs-version)) | 92 "XEmacs %s %s(%s%s) of %s %s on %s" |
93 (if (not (featurep 'infodock)) | 93 (substring emacs-version 0 (string-match " XEmacs" emacs-version)) |
94 "[Lucid] " | 94 (if (not (featurep 'infodock)) |
95 "") | 95 "[Lucid] " |
96 system-configuration | 96 "") |
97 (cond ((or (and (fboundp 'featurep) | 97 system-configuration |
98 (featurep 'mule)) | 98 (cond ((or (and (fboundp 'featurep) |
99 (memq 'mule features)) ", Mule") | 99 (featurep 'mule)) |
100 (t "")) | 100 (memq 'mule features)) ", Mule") |
101 (substring emacs-build-time 0 | 101 (t "")) |
102 (string-match " *[0-9]*:" emacs-build-time)) | 102 (substring emacs-build-time 0 |
103 (substring emacs-build-time | 103 (string-match " *[0-9]*:" emacs-build-time)) |
104 (string-match "[0-9]*$" emacs-build-time)) | 104 (substring emacs-build-time |
105 emacs-build-system))) | 105 (string-match "[0-9]*$" emacs-build-time)) |
106 (cond | 106 emacs-build-system))) |
107 ((null arg) version-string) | 107 (cond |
108 ((eq arg 1) (message "%s" version-string)) | 108 ((null arg) version-string) |
109 (t (insert version-string))))) | 109 ((eq arg 1) (message "%s" version-string)) |
110 (t (insert version-string)))))) | |
110 | 111 |
111 ;; from emacs-vers.el | 112 ;; from emacs-vers.el |
112 (defun emacs-version>= (major &optional minor) | 113 (defun emacs-version>= (major &optional minor) |
113 "Return true if the Emacs version is >= to the given MAJOR and MINOR numbers. | 114 "Return true if the Emacs version is >= to the given MAJOR and MINOR numbers. |
114 The MAJOR version number argument is required, but the MINOR version number | 115 The MAJOR version number argument is required, but the MINOR version number |