Importing pgnus-0.57
[elisp/gnus.git-] / lisp / gnus-util.el
index 29052c6..510f0db 100644 (file)
@@ -497,11 +497,16 @@ If N, return the Nth ancestor instead."
        (first 't1)
        (last 't2))
     (when (consp function)
-      (if (eq (car function) 'not)
-         (setq function (cadr function)
-               first 't2
-               last 't1)
-       (error "Invalid sort spec: %s" function)))
+      (cond
+       ;; Reversed spec.
+       ((eq (car function) 'not)
+       (setq function (cadr function)
+             first 't2
+             last 't1))
+       ((gnus-functionp function)
+       )
+       (t
+       (error "Invalid sort spec: %s" function))))if
     (if (cdr funs)
        `(or (,function ,first ,last)
             (and (not (,function ,last ,first))
@@ -929,6 +934,11 @@ ARG is passed to the first function."
     (when win
       (set-window-start win (or point (point))))))
 
+(defun gnus-annotation-in-region-p (b e)
+  (if (= b e)
+      (eq (cadr (memq 'gnus-undeletable (text-properties-at b))) t) 
+    (text-property-any b e 'gnus-undeletable t)))
+
 (provide 'gnus-util)
 
 ;;; gnus-util.el ends here