*** empty log message ***
[gnus] / lisp / gnus.el
index 7a54d83..055efc4 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.51"
   "Version number for this version of Gnus.")
 
 (defconst gnus-version (format "Gnus v%s" gnus-version-number)
@@ -258,7 +258,6 @@ be set in `.emacs' instead."
   (defalias 'gnus-topic-remove-excess-properties 'ignore)
   (defalias 'gnus-appt-select-lowest-window 'appt-select-lowest-window)
   (defalias 'gnus-mail-strip-quoted-names 'mail-strip-quoted-names)
-  (defalias 'gnus-add-hook 'add-hook)
   (defalias 'gnus-character-to-event 'identity)
   (defalias 'gnus-add-text-properties 'add-text-properties)
   (defalias 'gnus-put-text-property 'put-text-property)
@@ -711,7 +710,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 +823,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 +886,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
 
@@ -1346,7 +1342,6 @@ want."
             gnus-article-fill-cited-article
             gnus-article-remove-cr
             gnus-article-de-quoted-unreadable
-            gnus-article-display-x-face
             gnus-summary-stop-page-breaking
             ;; gnus-summary-caesar-message
             ;; gnus-summary-verbose-headers
@@ -1370,7 +1365,9 @@ want."
             gnus-article-strip-leading-blank-lines
             gnus-article-strip-multiple-blank-lines
             gnus-article-strip-blank-lines
-            gnus-article-treat-overstrike))
+            gnus-article-treat-overstrike
+            gnus-article-display-x-face
+            gnus-smiley-display))
 
 (defcustom gnus-article-save-directory gnus-directory
   "*Name of the directory articles will be saved in (default \"~/News\")."
@@ -1434,7 +1431,7 @@ want."
 (defvar gnus-have-read-active-file nil)
 
 (defconst gnus-maintainer
-  "gnus-bug@ifi.uio.no (The Gnus Bugfixing Girls + Boys)"
+  "bugs@gnus.org (The Gnus Bugfixing Girls + Boys)"
   "The mail address of the Gnus maintainers.")
 
 (defvar gnus-info-nodes
@@ -2247,8 +2244,8 @@ If SYMBOL, return the value of that symbol in the group parameters."
 (defun gnus-group-add-parameter (group param)
   "Add parameter PARAM to GROUP."
   (let ((info (gnus-get-info group)))
-    (if (not info)
-       ()                              ; This is a dead group.  We just ignore it.
+    (when info
+      (gnus-group-remove-parameter group (if (consp param) (car param) param))
       ;; Cons the new param to the old one and update.
       (gnus-group-set-info (cons param (gnus-info-params info))
                           group 'params))))
@@ -2256,8 +2253,8 @@ If SYMBOL, return the value of that symbol in the group parameters."
 (defun gnus-group-set-parameter (group name value)
   "Set parameter NAME to VALUE in GROUP."
   (let ((info (gnus-get-info group)))
-    (if (not info)
-       ()                              ; This is a dead group.  We just ignore it.
+    (when info
+      (gnus-group-remove-parameter group name)
       (let ((old-params (gnus-info-params info))
            (new-params (list (cons name value))))
        (while old-params
@@ -2267,6 +2264,17 @@ If SYMBOL, return the value of that symbol in the group parameters."
          (setq old-params (cdr old-params)))
        (gnus-group-set-info new-params group 'params)))))
 
+(defun gnus-group-remove-parameter (group name)
+  "Remove parameter NAME from GROUP."
+  (let ((info (gnus-get-info group)))
+    (when info
+      (let ((params (gnus-info-params info)))
+       (when params
+         (setq params (delq name params))
+         (while (assq name params)
+           (setq params (delq (assq name params) params)))
+         (gnus-info-set-params info params))))))
+
 (defun gnus-group-add-score (group &optional score)
   "Add SCORE to the GROUP score.
 If SCORE is nil, add 1 to the score of GROUP."
@@ -2388,27 +2396,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 +2444,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 +2456,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