*** empty log message ***
[gnus] / lisp / gnus.el
index 7a54d83..10cf215 100644 (file)
@@ -226,7 +226,7 @@ is restarted, and sometimes reloaded."
   :link '(custom-manual "(gnus)Exiting Gnus")
   :group 'gnus)
 
-(defconst gnus-version-number "5.4.22"
+(defconst gnus-version-number "5.4.29"
   "Version number for this version of Gnus.")
 
 (defconst gnus-version (format "Gnus v%s" gnus-version-number)
@@ -711,7 +711,14 @@ be set in `.emacs' instead."
 (require 'gnus-util)
 (require 'nnheader)
 
-(defcustom gnus-directory (or (getenv "SAVEDIR") "~/News/")
+(defcustom gnus-home-directory "~/"
+  "Directory variable that specifies the \"home\" directory.
+All other Gnus path variables are initialized from this variable."
+  :group 'gnus-files
+  :type 'directory)
+
+(defcustom gnus-directory (or (getenv "SAVEDIR")
+                             (nnheader-concat gnus-home-directory "News/"))
   "Directory variable from which all other Gnus file variables are derived."
   :group 'gnus-files
   :type 'directory)
@@ -817,7 +824,7 @@ server buffer."
 
 (defcustom gnus-message-archive-group nil
   "*Name of the group in which to save the messages you've written.
-This can either be a string, a list of strings; or an alist
+This can either be a string; a list of strings; or an alist
 of regexps/functions/forms to be evaluated to return a string (or a list
 of strings).  The functions are called with the name of the current
 group (or nil) as a parameter.
@@ -880,19 +887,9 @@ no need to set this variable."
   :type '(choice (const :tag "default" nil)
                 string))
 
-(defcustom gnus-local-organization nil
+(defvar gnus-local-organization nil
   "String with a description of what organization (if any) the user belongs to.
-The ORGANIZATION environment variable is used instead if it is defined.
-If this variable contains a function, this function will be called
-with the current newsgroup name as the argument.  The function should
-return a string.
-
-In any case, if the string (either in the variable, in the environment
-variable, or returned by the function) is a file name, the contents of
-this file will be used as the organization."
-  :group 'gnus-message
-  :type '(choice (const :tag "default" nil)
-                string))
+Obsolete variable; use `message-user-organization' instead.")
 
 ;; Customization variables
 
@@ -2388,27 +2385,27 @@ If NEWSGROUP is nil, return the global kill file name instead."
   (memq option (assoc (format "%s" (car method))
                      gnus-valid-select-methods)))
 
+(defun gnus-similar-server-opened (method)
+  (let ((opened gnus-opened-servers))
+    (while (and method opened)
+      (when (and (equal (cadr method) (cadaar opened))
+                (not (equal method (caar opened))))
+       (setq method nil))
+      (pop opened))
+    (not method)))
+
 (defun gnus-server-extend-method (group method)
   ;; This function "extends" a virtual server. If the server is
   ;; "hello", and the select method is ("hello" (my-var "something"))
   ;; in the group "alt.alt", this will result in a new virtual server
   ;; called "hello+alt.alt".
-  (if (or (not (gnus-similar-server-opened method))
+  (if (or (not (inline (gnus-similar-server-opened method)))
          (not (cddr method)))
       method
     `(,(car method) ,(concat (cadr method) "+" group)
       (,(intern (format "%s-address" (car method))) ,(cadr method))
       ,@(cddr method))))
 
-(defun gnus-similar-server-opened (method)
-  (let ((opened gnus-opened-servers))
-    (while (and method opened)
-      (when (and (equal (cadr method) (cadaar opened))
-                (not (equal method (caar opened))))
-       (setq method nil))
-      (pop opened))
-    (not method)))
-
 (defun gnus-server-status (method)
   "Return the status of METHOD."
   (nth 1 (assoc method gnus-opened-servers)))
@@ -2436,9 +2433,9 @@ If NEWSGROUP is nil, return the global kill file name instead."
            gnus-select-method
          (setq method
                (cond ((stringp method)
-                      (gnus-server-to-method method))
+                      (inline (gnus-server-to-method method)))
                      ((stringp (cadr method))
-                      (gnus-server-extend-method group method))
+                      (inline (gnus-server-extend-method group method)))
                      (t
                       method)))
          (cond ((equal (cadr method) "")
@@ -2448,7 +2445,7 @@ If NEWSGROUP is nil, return the global kill file name instead."
                (t
                 (gnus-server-add-address method)))))))
 
-(defun gnus-check-backend-function (func group)
+(defsubst gnus-check-backend-function (func group)
   "Check whether GROUP supports function FUNC.
 GROUP can either be a string (a group name) or a select method."
   (ignore-errors