Mercurial > emacs
comparison lisp/mail/rnews.el @ 26455:03d8424273d3
Use new backquote syntax.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 15 Nov 1999 14:24:32 +0000 |
parents | cbe304a26771 |
children |
comparison
equal
deleted
inserted
replaced
26454:2f0e687605b8 | 26455:03d8424273d3 |
---|---|
149 (defmacro news-cadar (x) (list 'car (list 'cdr (list 'car x)))) | 149 (defmacro news-cadar (x) (list 'car (list 'cdr (list 'car x)))) |
150 (defmacro news-caadr (x) (list 'car (list 'car (list 'cdr x)))) | 150 (defmacro news-caadr (x) (list 'car (list 'car (list 'cdr x)))) |
151 (defmacro news-cdadr (x) (list 'cdr (list 'car (list 'cdr x)))) | 151 (defmacro news-cdadr (x) (list 'cdr (list 'car (list 'cdr x)))) |
152 | 152 |
153 (defmacro news-wins (pfx index) | 153 (defmacro news-wins (pfx index) |
154 (` (file-exists-p (concat (, pfx) "/" (int-to-string (, index)))))) | 154 `(file-exists-p (concat ,pfx "/" (int-to-string ,index)))) |
155 | 155 |
156 (defvar news-max-plausible-gap 2 | 156 (defvar news-max-plausible-gap 2 |
157 "* In an rnews directory, the maximum possible gap size. | 157 "* In an rnews directory, the maximum possible gap size. |
158 A gap is a sequence of missing messages between two messages that exist. | 158 A gap is a sequence of missing messages between two messages that exist. |
159 An empty file does not contribute to a gap -- it ends one.") | 159 An empty file does not contribute to a gap -- it ends one.") |
164 (news-find-first-or-last prefix base 1)))) | 164 (news-find-first-or-last prefix base 1)))) |
165 | 165 |
166 (defmacro news-/ (a1 a2) | 166 (defmacro news-/ (a1 a2) |
167 ;; a form of / that guarantees that (/ -1 2) = 0 | 167 ;; a form of / that guarantees that (/ -1 2) = 0 |
168 (if (zerop (/ -1 2)) | 168 (if (zerop (/ -1 2)) |
169 (` (/ (, a1) (, a2))) | 169 `(/ ,a1 ,a2) |
170 (` (if (< (, a1) 0) | 170 `(if (< ,a1 0) |
171 (- (/ (- (, a1)) (, a2))) | 171 (- (/ (- ,a1) ,a2)) |
172 (/ (, a1) (, a2)))))) | 172 (/ ,a1 ,a2)))) |
173 | 173 |
174 (defun news-find-first-or-last (pfx base dirn) | 174 (defun news-find-first-or-last (pfx base dirn) |
175 ;; first use powers of two to find a plausible ceiling | 175 ;; first use powers of two to find a plausible ceiling |
176 (let ((original-dir dirn)) | 176 (let ((original-dir dirn)) |
177 (while (news-wins pfx (+ base dirn)) | 177 (while (news-wins pfx (+ base dirn)) |