Mercurial > emacs
annotate lisp/gnus/gnus-bcklg.el @ 19660:fa3d4e7a76d9
(reftex-customize): Added call to customize browse.
(reftex-show-commentary): New function.
(reftex-label-alist): Prefix may contain % escapes. Nth macro
argument may be context. May give two different context methods.
(reftex-default-label-alist-entries): Customization type changed.
(reftex-label-menu-flags): Extra flag for searches.
(reftex-cite-format): Changed completely, % escapes are now used.
(reftex-comment-citations): New variable.
(reftex-cite-comment-format): New variable.
(reftex-cite-punctuation): New variable.
(reftex-make-master-buffer): Changed name of master buffer,
removed interactive. Runs a hook on the buffer. Interprete
TEXINPUTS environment variable. Allow naked argument for \input.
Master buffer is now in fundamental mode.
(reftex-access-scan-info): Name of master buffer changed.
(reftex-section-regexp): Is now computed from section levels,
not set independantly.
(reftex-section-levels): Made customizable.
(reftex-label): Interpret % escapes in prefix. Use label format if given.
(reftex-replace-prefix-escapes): New function.
(reftex-uniquify-label): New function.
(reftex-next-label-number): Function definition removed.
(reftex-reference): Use reftex-uniquify-label.
Allow more general label commands.
(reftex-offer-label-menu):
Interpret new flag in reftex-label-menu-flags.
(reftex-make-and-insert-label-list): Use text properties to record label index.
(reftex-find-nearby-label): Allow more general label commands.
(reftex-scan-buffer-for-labels): Allow more general label commands.
(reftex-init-section-numbers): New function.
(reftex-allow-for-ctrl-m): New function.
(reftex-label-info-update): Allow more general label commands.
(reftex-label-info): New parameter derive.
(reftex-short-context): Interprete integer parse as nth arg of macro.
(reftex-nth-parens-substring): New function.
(reftex-select-item): Interprete the new 'cnt text property.
(reftex-pop-to-label): Allow more general label commands.
(reftex-nicify-text): Allow more general label commands.
(reftex-toc): Remember previous window configuration. Use text
properties to store info. Bind mouse-2.
(reftex-make-master-buffer): New Hook.
(reftex-last-window-height): New variable.
(reftex-toc-show-help): New function.
(reftex-toc-help): New constant.
(reftex-nearest-section): Use text properties to store info.
(reftex-empty-toc-buffer): New function.
(reftex-re-enlarge): New function.
(reftex-toc-goto-line): New function.
(reftex-toc-mouse-goto-line-and-hide): New function.
(reftex-cite-format-builtin): New constant.
(reftex-cite-format-default): Constant removed.
(reftex-cite-format-1-author-simple): Constant removed.
(reftex-cite-format-2-authors): Constant removed.
(reftex-get-bib-names): New function.
(reftex-get-bib-authors) Function removed.
(reftex-format-bib-entry): Use now reftex-get-bib-names.
(reftex-citation): Completely rewritten. Offers selection of
different cite macros first, then the reference menu. Works with
the various new variables mentioned above. Accept the `a' key to
use all selected citations.
(reftex-insert-bib-matches): New function.
(reftex-format-citation): Now interpretes % escapes.
(reftex-select-item): Emulate a search in the menu buffer.
Interpret the 'cnt text property.
(reftex-view-crossref): Allow more general label, cite and ref macros.
(reftex-highlight-overlays): Add third overlay for search
in menu buffer.
(reftex-label-alist-builtin): xalignat and xxalignat environments
added. Slightly reorganized.
(reftex-reset-scanning-information): Just empty *toc* buffer, do
not kill it.
(reftex-compute-ref-cite-tables): Read the new options in
`reftex-label-alist' and store them. Calculate the section regexp.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 01 Sep 1997 18:11:35 +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 |