Mercurial > emacs
annotate lisp/gnus/gnus-bcklg.el @ 20892:18f3cb26243f before-miles-orphaned-changes gcc-2_8_1-980401 gcc-2_8_1-980407 gcc-2_8_1-980412 gcc-2_8_1-980413 gcc-2_8_1-RELEASE gcc_2_8_1-980315 libc-980214 libc-980215 libc-980216 libc-980217 libc-980218 libc-980219 libc-980220 libc-980221 libc-980222 libc-980223 libc-980224 libc-980225 libc-980226 libc-980227 libc-980228 libc-980301 libc-980302 libc-980303 libc-980304 libc-980306 libc-980307 libc-980308 libc-980309 libc-980310 libc-980311 libc-980312 libc-980313 libc-980314 libc-980315 libc-980316 libc-980317 libc-980318 libc-980319 libc-980320 libc-980321 libc-980322 libc-980323 libc-980324 libc-980325 libc-980326 libc-980327 libc-980328 libc-980329 libc-980330 libc-980331 libc-980401 libc-980402 libc-980403 libc-980404 libc-980405 libc-980406 libc-980407 libc-980408 libc-980409 libc-980410 libc-980411 libc-980412 libc-980413 libc-980414 libc-980428 libc-980429 libc-980430 libc-980501 libc-980502 libc-980503 libc-980504 libc-980505 libc-980506 libc-980507 libc-980508 libc-980509 libc-980510 libc-980512 libc-980513 libc-980514 libc-980515 libc-980516 libc-980517 libc-980518 libc-980519 libc-980520 libc-980521 libc-980522 libc-980523 libc-980524 libc-980525 libc-980526 libc-980527 libc-980528 libc-980529 libc-980530 libc-980531 libc-980601 libc-980602 libc-980603 libc-980604 libc-980605 libc-980606 libc-980607 libc-980608 libc-980609 libc-980610 libc-980611 libc-980612 libc-980613
Add PentiumII (i786). Add '7' to all i[3456] entries.
Add AMD and Cyrix names for P5 and P6.
author | Richard Kenner <kenner@gnu.org> |
---|---|
date | Fri, 13 Feb 1998 12:16:46 +0000 |
parents | 8d840c4548c0 |
children | 15fc6acbae7a |
rev | line source |
---|---|
17493 | 1 ;;; gnus-bcklg.el --- backlog functions for Gnus |
2 ;; Copyright (C) 1996,97 Free Software Foundation, Inc. | |
3 | |
4 ;; Author: Lars Magne Ingebrigtsen <larsi@ifi.uio.no> | |
5 ;; Keywords: news | |
6 | |
7 ;; This file is part of GNU Emacs. | |
8 | |
9 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
10 ;; it under the terms of the GNU General Public License as published by | |
11 ;; the Free Software Foundation; either version 2, or (at your option) | |
12 ;; any later version. | |
13 | |
14 ;; GNU Emacs is distributed in the hope that it will be useful, | |
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 ;; GNU General Public License for more details. | |
18 | |
19 ;; You should have received a copy of the GNU General Public License | |
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
22 ;; Boston, MA 02111-1307, USA. | |
23 | |
24 ;;; Commentary: | |
25 | |
26 ;;; Code: | |
27 | |
19493
8d840c4548c0
Require cl at compile time.
Richard M. Stallman <rms@gnu.org>
parents:
17493
diff
changeset
|
28 (eval-when-compile (require 'cl)) |
8d840c4548c0
Require cl at compile time.
Richard M. Stallman <rms@gnu.org>
parents:
17493
diff
changeset
|
29 |
17493 | 30 (require 'gnus) |
31 | |
32 ;;; | |
33 ;;; Buffering of read articles. | |
34 ;;; | |
35 | |
36 (defvar gnus-backlog-buffer " *Gnus Backlog*") | |
37 (defvar gnus-backlog-articles nil) | |
38 (defvar gnus-backlog-hashtb nil) | |
39 | |
40 (defun gnus-backlog-buffer () | |
41 "Return the backlog buffer." | |
42 (or (get-buffer gnus-backlog-buffer) | |
43 (save-excursion | |
44 (set-buffer (get-buffer-create gnus-backlog-buffer)) | |
45 (buffer-disable-undo (current-buffer)) | |
46 (setq buffer-read-only t) | |
47 (gnus-add-current-to-buffer-list) | |
48 (get-buffer gnus-backlog-buffer)))) | |
49 | |
50 (defun gnus-backlog-setup () | |
51 "Initialize backlog variables." | |
52 (unless gnus-backlog-hashtb | |
53 (setq gnus-backlog-hashtb (gnus-make-hashtable 1024)))) | |
54 | |
55 (gnus-add-shutdown 'gnus-backlog-shutdown 'gnus) | |
56 | |
57 (defun gnus-backlog-shutdown () | |
58 "Clear all backlog variables and buffers." | |
59 (when (get-buffer gnus-backlog-buffer) | |
60 (kill-buffer gnus-backlog-buffer)) | |
61 (setq gnus-backlog-hashtb nil | |
62 gnus-backlog-articles nil)) | |
63 | |
64 (defun gnus-backlog-enter-article (group number buffer) | |
65 (gnus-backlog-setup) | |
66 (let ((ident (intern (concat group ":" (int-to-string number)) | |
67 gnus-backlog-hashtb)) | |
68 b) | |
69 (if (memq ident gnus-backlog-articles) | |
70 () ; It's already kept. | |
71 ;; Remove the oldest article, if necessary. | |
72 (and (numberp gnus-keep-backlog) | |
73 (>= (length gnus-backlog-articles) gnus-keep-backlog) | |
74 (gnus-backlog-remove-oldest-article)) | |
75 (push ident gnus-backlog-articles) | |
76 ;; Insert the new article. | |
77 (save-excursion | |
78 (set-buffer (gnus-backlog-buffer)) | |
79 (let (buffer-read-only) | |
80 (goto-char (point-max)) | |
81 (unless (bolp) | |
82 (insert "\n")) | |
83 (setq b (point)) | |
84 (insert-buffer-substring buffer) | |
85 ;; Tag the beginning of the article with the ident. | |
86 (gnus-put-text-property b (1+ b) 'gnus-backlog ident)))))) | |
87 | |
88 (defun gnus-backlog-remove-oldest-article () | |
89 (save-excursion | |
90 (set-buffer (gnus-backlog-buffer)) | |
91 (goto-char (point-min)) | |
92 (if (zerop (buffer-size)) | |
93 () ; The buffer is empty. | |
94 (let ((ident (get-text-property (point) 'gnus-backlog)) | |
95 buffer-read-only) | |
96 ;; Remove the ident from the list of articles. | |
97 (when ident | |
98 (setq gnus-backlog-articles (delq ident gnus-backlog-articles))) | |
99 ;; Delete the article itself. | |
100 (delete-region | |
101 (point) (next-single-property-change | |
102 (1+ (point)) 'gnus-backlog nil (point-max))))))) | |
103 | |
104 (defun gnus-backlog-remove-article (group number) | |
105 "Remove article NUMBER in GROUP from the backlog." | |
106 (when (numberp number) | |
107 (gnus-backlog-setup) | |
108 (let ((ident (intern (concat group ":" (int-to-string number)) | |
109 gnus-backlog-hashtb)) | |
110 beg end) | |
111 (when (memq ident gnus-backlog-articles) | |
112 ;; It was in the backlog. | |
113 (save-excursion | |
114 (set-buffer (gnus-backlog-buffer)) | |
115 (let (buffer-read-only) | |
116 (when (setq beg (text-property-any | |
117 (point-min) (point-max) 'gnus-backlog | |
118 ident)) | |
119 ;; Find the end (i. e., the beginning of the next article). | |
120 (setq end | |
121 (next-single-property-change | |
122 (1+ beg) 'gnus-backlog (current-buffer) (point-max))) | |
123 (delete-region beg end) | |
124 ;; Return success. | |
125 t))))))) | |
126 | |
127 (defun gnus-backlog-request-article (group number buffer) | |
128 (when (numberp number) | |
129 (gnus-backlog-setup) | |
130 (let ((ident (intern (concat group ":" (int-to-string number)) | |
131 gnus-backlog-hashtb)) | |
132 beg end) | |
133 (when (memq ident gnus-backlog-articles) | |
134 ;; It was in the backlog. | |
135 (save-excursion | |
136 (set-buffer (gnus-backlog-buffer)) | |
137 (if (not (setq beg (text-property-any | |
138 (point-min) (point-max) 'gnus-backlog | |
139 ident))) | |
140 ;; It wasn't in the backlog after all. | |
141 (ignore | |
142 (setq gnus-backlog-articles (delq ident gnus-backlog-articles))) | |
143 ;; Find the end (i. e., the beginning of the next article). | |
144 (setq end | |
145 (next-single-property-change | |
146 (1+ beg) 'gnus-backlog (current-buffer) (point-max))))) | |
147 (let ((buffer-read-only nil)) | |
148 (erase-buffer) | |
149 (insert-buffer-substring gnus-backlog-buffer beg end) | |
150 t))))) | |
151 | |
152 (provide 'gnus-bcklg) | |
153 | |
154 ;;; gnus-bcklg.el ends here |