;;; 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
(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))
(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
(unwind-protect
(apply 'run-hooks funcs)
(set-buffer buf))))
-
+
;;;
;;; .netrc and .authinforc parsing
;;;
;;; 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)
(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)