Importing Pterodactyl Gnus v0.73.
[elisp/gnus.git-] / lisp / gnus-util.el
index 7ac42e7..6c329c0 100644 (file)
@@ -1,5 +1,5 @@
 ;;; gnus-util.el --- utility functions for Gnus
-;; Copyright (C) 1996,97,98 Free Software Foundation, Inc.
+;; Copyright (C) 1996,97,98,99 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news
@@ -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))
@@ -575,7 +580,7 @@ Bind `print-quoted' and `print-readably' to t while printing."
        (gnus-put-text-property
         b (setq b (next-single-property-change b 'gnus-face nil end))
         prop val)))))
-  
+
 ;;; Protected and atomic operations.  dmoore@ucsd.edu 21.11.1996
 ;;; The primary idea here is to try to protect internal datastructures
 ;;; from becoming corrupted when the user hits C-g, or if a hook or
@@ -787,7 +792,7 @@ ARG is passed to the first function."
     (unwind-protect
        (apply 'run-hooks funcs)
       (set-buffer buf))))
-  
+
 ;;;
 ;;; .netrc and .authinforc parsing
 ;;;
@@ -877,7 +882,7 @@ ARG is passed to the first function."
 
 ;;; Various
 
-(defvar gnus-group-buffer) ; Compiler directive
+(defvar gnus-group-buffer)             ; Compiler directive
 (defun gnus-alive-p ()
   "Say whether Gnus is running or not."
   (and (boundp 'gnus-group-buffer)
@@ -931,7 +936,7 @@ ARG is passed to the first function."
 
 (defun gnus-annotation-in-region-p (b e)
   (if (= b e)
-      (eq (cadr (memq 'gnus-undeletable (text-properties-at b))) t) 
+      (eq (cadr (memq 'gnus-undeletable (text-properties-at b))) t)
     (text-property-any b e 'gnus-undeletable t)))
 
 (provide 'gnus-util)