Rename `gnus-bound-and-true-dumber-p' to `gnus-bound-and-true-p'.
[gnus] / lisp / gnus-util.el
index 03ff4a2..f811c96 100644 (file)
@@ -471,12 +471,13 @@ Cache the result as a text property stored in DATE."
       (setq i (* 2 i)))
     i))
 
-(defcustom gnus-verbose 7
+(defcustom gnus-verbose 6
   "*Integer that says how verbose Gnus should be.
 The higher the number, the more messages Gnus will flash to say what
 it's doing.  At zero, Gnus will be totally mute; at five, Gnus will
 display most important messages; and at ten, Gnus will keep on
 jabbering all the time."
+  :version "24.1"
   :group 'gnus-start
   :type 'integer)
 
@@ -1249,6 +1250,13 @@ This function saves the current buffer."
        (with-current-buffer gnus-group-buffer
         (eq major-mode 'gnus-group-mode))))
 
+(defun gnus-process-live-p (process)
+  "Returns non-nil if PROCESS is alive.
+A process is considered alive if its status is `run', `open',
+`listen', `connect' or `stop'."
+  (memq (process-status process)
+        '(run open listen connect stop)))
+
 (defun gnus-remove-if (predicate sequence &optional hash-table-p)
   "Return a copy of SEQUENCE with all items satisfying PREDICATE removed.
 SEQUENCE should be a list, a vector, or a string.  Returns always a list.
@@ -1978,6 +1986,10 @@ definitions to shadow the loaded ones for use in file byte-compilation."
              (gnus-macroexpand-all expanded environment)))
        form))))
 
+;; simple check, can be a macro but this way, although slow, it's really clear
+(defun gnus-bound-and-true-p (sym)
+  (and (boundp sym) (symbol-value sym)))
+
 (provide 'gnus-util)
 
 ;;; gnus-util.el ends here