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 "2.0.1"
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 emacs-program-version)
59 (defvar xemacs-codename)
60 (defvar sxemacs-codename))
62 (defun riece-extended-version ()
63 "Stringified Riece version and Emacs version.
64 See the variable `riece-user-agent'."
66 (concat riece-product-name "/"
67 (prin1-to-string riece-version-number t)))
70 ((eq riece-user-agent 'emacs-riece-config)
72 ((eq riece-user-agent 'emacs-riece-type)
73 (symbol-name system-type))
77 ((eq riece-user-agent 'riece)
79 ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version)
80 (concat "Emacs/" (match-string 1 emacs-version)
82 (concat " (" system-v ")")
85 (concat "SXEmacs/" emacs-program-version
88 (when sxemacs-codename
89 (concat sxemacs-codename ", "))
92 (concat "XEmacs/" emacs-program-version
96 (concat xemacs-codename ", "))
99 (if (stringp riece-user-agent)
103 (concat " " emacs-v))))))
105 (defun riece-version (&optional arg)
106 "Version number of this version of Riece.
107 If ARG, use user-agent format."
110 (message "%s" (riece-extended-version))
111 (message "%s" riece-version)))
113 (provide 'riece-version)
115 ;;; riece-version.el ends here