1 ;;; riece-version.el --- version information about Riece
2 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
3 ;; Free Software Foundation, Inc.
4 ;; Copyright (C) 1998-2003 Daiki Ueno
6 ;; Author: Daiki Ueno <ueno@unixuser.org>
8 ;; Keywords: IRC, riece
10 ;; This file is part of Riece.
12 ;; This program is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either version 2, or (at your option)
17 ;; This program is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
25 ;; Boston, MA 02111-1307, USA.
29 ;; NOTE: Most part of this file is copied from Gnus.
31 (defcustom riece-user-agent 'emacs-riece-type
32 "Which information should be exposed in the User-Agent header.
34 It can be one of the symbols `riece' \(show only Riece version\), `emacs-riece'
35 \(show only Emacs and Riece versions\), `emacs-riece-config' \(same as
36 `emacs-riece' plus system configuration\), `emacs-riece-type' \(same as
37 `emacs-riece' plus system type\) or a custom string. If you set it to a
38 string, be sure to use a valid format, see RFC 2616."
41 (item :tag "Show Riece and Emacs versions and system type"
43 (item :tag "Show Riece and Emacs versions and system configuration"
45 (item :tag "Show Riece and Emacs versions" emacs-riece)
46 (item :tag "Show only Riece version" riece)
47 (string :tag "Other")))
49 (defconst riece-product-name "Riece")
51 (defconst riece-version-number "1.0.7"
52 "Version number for this version of Riece.")
54 (defconst riece-version (format "Riece v%s" riece-version-number)
55 "Version string for this version of Riece.")
58 (defvar xemacs-codename)
59 (defvar sxemacs-codename))
61 (defun riece-extended-version ()
62 "Stringified Riece version and Emacs version.
63 See the variable `riece-user-agent'."
65 (concat riece-product-name "/"
66 (prin1-to-string riece-version-number t)))
69 ((eq riece-user-agent 'emacs-riece-config)
71 ((eq riece-user-agent 'emacs-riece-type)
72 (symbol-name system-type))
76 ((eq riece-user-agent 'riece)
78 ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version)
79 (concat "Emacs/" (match-string 1 emacs-version)
81 (concat " (" system-v ")")
84 (concat "SXEmacs/" emacs-program-version
87 (when sxemacs-codename
88 (concat sxemacs-codename ", "))
91 (concat "XEmacs/" emacs-program-version
95 (concat xemacs-codename ", "))
98 (if (stringp riece-user-agent)
102 (concat " " emacs-v))))))
104 (defun riece-version (&optional arg)
105 "Version number of this version of Riece.
106 If ARG, use user-agent format."
109 (message "%s" (riece-extended-version))
110 (message "%s" riece-version)))
112 (provide 'riece-version)
114 ;;; riece-version.el ends here