Show
Ignore:
Timestamp:
09/10/05 10:16:00 (3 years ago)
Author:
miyoshi
Message:

--

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/gnus/gnus-util.el

    r3809 r3863  
    11;;; gnus-util.el --- utility functions for Gnus 
    22 
    3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 
    4 ;;   2005 Free Software Foundation, Inc. 
     3;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 
     4;;       Free Software Foundation, Inc. 
    55 
    66;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 
     
    4141  ;; Fixme: this should be a gnus variable, not nnmail-. 
    4242  (defvar nnmail-pathname-coding-system) 
     43  (defvar nnmail-active-file-coding-system) 
    4344 
    4445  ;; Inappropriate references to other parts of Gnus. 
    4546  (defvar gnus-emphasize-whitespace-regexp) 
     47  (defvar gnus-original-article-buffer) 
     48  (defvar gnus-user-agent) 
    4649  ) 
    4750(require 'time-date) 
     
    15151518 
    15161519(eval-when-compile 
    1517   (defvar xemacs-codename)) 
     1520  (defvar xemacs-codename) 
     1521  (defvar sxemacs-codename) 
     1522  (defvar emacs-program-version)) 
    15181523 
    15191524(defun gnus-emacs-version () 
    15201525  "Stringified Emacs version." 
    1521   (let ((system-v 
    1522          (cond 
    1523           ((eq gnus-user-agent 'emacs-gnus-config) 
    1524            system-configuration) 
    1525           ((eq gnus-user-agent 'emacs-gnus-type) 
    1526            (symbol-name system-type)) 
    1527           (t nil)))) 
     1526  (let* ((lst (if (listp gnus-user-agent) 
     1527                  gnus-user-agent 
     1528                '(gnus emacs type))) 
     1529         (system-v (cond ((memq 'config lst) 
     1530                          system-configuration) 
     1531                         ((memq 'type lst) 
     1532                          (symbol-name system-type)) 
     1533                         (t nil))) 
     1534         codename emacsname) 
     1535    (cond ((featurep 'sxemacs) 
     1536           (setq emacsname "SXEmacs" 
     1537                 codename sxemacs-codename)) 
     1538          ((featurep 'xemacs) 
     1539           (setq emacsname "XEmacs" 
     1540                 codename xemacs-codename)) 
     1541          (t 
     1542           (setq emacsname "Emacs"))) 
    15281543    (cond 
    1529      ((eq gnus-user-agent 'gnus
     1544     ((not (memq 'emacs lst)
    15301545      nil) 
    15311546     ((string-match "^\\(\\([.0-9]+\\)*\\)\\.[0-9]+$" emacs-version) 
     1547      ;; Emacs: 
    15321548      (concat "Emacs/" (match-string 1 emacs-version) 
    15331549              (if system-v 
    15341550                  (concat " (" system-v ")") 
    15351551                ""))) 
    1536      ((string-match 
    1537        "\\([A-Z]*[Mm][Aa][Cc][Ss]\\)[^(]*\\(\\((beta.*)\\|'\\)\\)?" 
    1538        emacs-version) 
    1539       (concat 
    1540        (match-string 1 emacs-version) 
    1541        (format "/%d.%d" emacs-major-version emacs-minor-version) 
    1542        (if (match-beginning 3) 
    1543            (match-string 3 emacs-version) 
    1544          "") 
    1545        (if (boundp 'xemacs-codename) 
    1546            (concat 
    1547             " (" xemacs-codename 
    1548             (if system-v 
    1549                 (concat ", " system-v ")") 
     1552     ((or (featurep 'sxemacs) (featurep 'xemacs)) 
     1553      ;; XEmacs or SXEmacs: 
     1554      (concat emacsname "/" emacs-program-version 
     1555              " (" 
     1556              (when (and (memq 'codename lst) 
     1557                         codename) 
     1558                (concat codename 
     1559                        (when system-v ", "))) 
     1560              (when system-v system-v) 
    15501561              ")")) 
    1551          ""))) 
    15521562     (t emacs-version)))) 
    15531563